e.host?e.protocol+"//"+e.host:e.href;d&&d.put(a,e);a=e}return a};function x(a){a||(a={debug:!1,windowContext:window});this.l={};this.j={};this.H=a.debug;this.o=this.L=this.M=!1;this.w=this.C=this.D=this.h=this.B=null;this.c=a.windowContext||window}f=x.prototype;
f.listen=function(a){var b=this;return(new Promise(function(d,c){b.o?c(Error("Already connected.")):b.M?c(Error("Already listening for connections.")):Array.isArray(a)?(b.D=b.O.bind(b,a,d,c),b.c.addEventListener("message",b.D)):c(Error("allowedOrigi