diff --git a/dist/tebex.cjs b/dist/tebex.cjs index 4ffa89d..ca86838 100644 --- a/dist/tebex.cjs +++ b/dist/tebex.cjs @@ -12474,10 +12474,10 @@ const DEFAULT_WIDTH = "800px"; const DEFAULT_HEIGHT = "760px"; const THEME_NAMES = [ + "auto", "default", "light", - "dark", - // "auto", TODO: detect user's preference for light/dark theme + "dark" ]; const COLOR_NAMES = [ "primary", @@ -12656,8 +12656,10 @@ isApplePayAvailable: isApplePayAvailable(), isEmbedded: !popup, referrer: url.hostname, + origin: url.origin, path: url.pathname, - version: "1.3.0" + params: url.search, + version: "1.4.0", }); await this.zoid.renderTo(window, container, popup ? "popup" : "iframe"); __classPrivateFieldSet(this, _Checkout_didRender, true, "f"); @@ -12860,7 +12862,7 @@ /** * Current Tebex.js package version */ - const version = "1.3.0"; + const version = "1.4.0"; /** * Tebex checkout API */ diff --git a/dist/tebex.min.js b/dist/tebex.min.js index 7b9ea3c..4873de1 100644 --- a/dist/tebex.min.js +++ b/dist/tebex.min.js @@ -21,5 +21,5 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -var Tebex=function(e){"use strict";function n(e,n,t,r){if("a"===t&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?r:"a"===t?r.call(e):r?r.value:n.get(e)}function t(e,n,t,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!o:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,t):o?o.value=t:n.set(e,t),t}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}var a=o,u=i;function s(e){if(a===setTimeout)return setTimeout(e,0);if((a===o||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(n){try{return a.call(null,e,0)}catch(n){return a.call(this,e,0)}}}"function"==typeof r.setTimeout&&(a=setTimeout),"function"==typeof r.clearTimeout&&(u=clearTimeout);var c,f=[],d=!1,l=-1;function h(){d&&c&&(d=!1,c.length?f=c.concat(f):l=-1,f.length&&p())}function p(){if(!d){var e=s(h);d=!0;for(var n=f.length;n;){for(c=f,f=[];++l1)for(var t=1;t{e||((e="")=>{throw new Error("Tebex.js error"+(e?": ":"")+e.trim())})(n)},D=e=>"string"==typeof e,W=e=>"object"==typeof e&&null!==e&&!(e=>Array.isArray(e))(e),N=()=>"undefined"!=typeof window&&void 0!==window.document,j=(e,n)=>{if(!N())return!1;if(!window.matchMedia)return!0;return window.matchMedia(`(max-width: ${e}) or (max-height: ${n})`).matches},k=e=>document.createElement(e),I=(e,n)=>e.getAttribute(n),z=(e,n,t)=>{const r=n.replace(/([A-Z])/g,(e=>`-${e[0].toLowerCase()}`));!0===t?e.setAttribute(r,""):!1===t||null==t?e.removeAttribute(r):e.setAttribute(r,t+"")},M=e=>document.contains(e)||(e=>{const n=e.getRootNode();return n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&void 0!==n.host})(e),F=(e,n,...t)=>{const r=k(e);if(W(n))for(let e in n)z(r,e,n[e]);for(let e of t.flat())r.append(e);return r},U=async()=>new Promise((e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))})),L=async e=>new Promise((n=>{getComputedStyle(e).transition||n();const t=()=>{e.removeEventListener("transitionend",t),e.removeEventListener("transitioncancel",t),n()};e.addEventListener("transitionend",t),e.addEventListener("transitioncancel",t)}));var B=N()?window:{document:{body:{}}},q=[],Y=[],J="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function Z(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)q[n]=e[n],Y[e.charCodeAt(n)]=n;Y["-".charCodeAt(0)]=62,Y["_".charCodeAt(0)]=63}function $(e,n,t){for(var r,o,i=[],a=n;a>18&63]+q[o>>12&63]+q[o>>6&63]+q[63&o]);return i.join("")}function V(e){var n;H||Z();for(var t=e.length,r=t%3,o="",i=[],a=16383,u=0,s=t-r;us?s:u+a));return 1===r?(n=e[t-1],o+=q[n>>2],o+=q[n<<4&63],o+="=="):2===r&&(n=(e[t-2]<<8)+e[t-1],o+=q[n>>10],o+=q[n>>4&63],o+=q[n<<2&63],o+="="),i.push(o),i.join("")}function G(e,n,t,r,o){var i,a,u=8*o-r-1,s=(1<>1,f=-7,d=t?o-1:0,l=t?-1:1,h=e[n+d];for(d+=l,i=h&(1<<-f)-1,h>>=-f,f+=u;f>0;i=256*i+e[n+d],d+=l,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[n+d],d+=l,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)}function X(e,n,t,r,o,i){var a,u,s,c=8*i-o-1,f=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,w=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=f):(a=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-a))<1&&(a--,s*=2),(n+=a+d>=1?l/s:l*Math.pow(2,1-d))*s>=2&&(a++,s/=2),a+d>=f?(u=0,a=f):a+d>=1?(u=(n*s-1)*Math.pow(2,o),a+=d):(u=n*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[t+h]=255&u,h+=p,u/=256,o-=8);for(a=a<0;e[t+h]=255&a,h+=p,a/=256,c-=8);e[t+h-p]|=128*w}var K={}.toString,Q=Array.isArray||function(e){return"[object Array]"==K.call(e)};function ee(){return te.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(e,n){if(ee()=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return 0|e}function se(e){return!(null==e||!e._isBuffer)}function ce(e,n){if(se(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Ie(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return ze(e).length;default:if(r)return Ie(e).length;n=(""+n).toLowerCase(),r=!0}}function fe(e,n,t){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oe(this,n,t);case"utf8":case"utf-8":return Ee(this,n,t);case"ascii":return xe(this,n,t);case"latin1":case"binary":return Pe(this,n,t);case"base64":return be(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,n,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function de(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function le(e,n,t,r,o){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof n&&(n=te.from(n,r)),se(n))return 0===n.length?-1:he(e,n,t,r,o);if("number"==typeof n)return n&=255,te.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,t):Uint8Array.prototype.lastIndexOf.call(e,n,t):he(e,[n],t,r,o);throw new TypeError("val must be string, number or Buffer")}function he(e,n,t,r,o){var i,a=1,u=e.length,s=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||n.length<2)return-1;a=2,u/=2,s/=2,t/=2}function c(e,n){return 1===a?e[n]:e.readUInt16BE(n*a)}if(o){var f=-1;for(i=t;iu&&(t=u-s),i=t;i>=0;i--){for(var d=!0,l=0;lo&&(r=o):r=o;var i=n.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=t%256,i.push(o),i.push(r);return i}(n,e.length-t),e,t,r)}function be(e,n,t){return 0===n&&t===e.length?V(e):V(e.slice(n,t))}function Ee(e,n,t){t=Math.min(e.length,t);for(var r=[],o=n;o239?4:c>223?3:c>191?2:1;if(o+d<=t)switch(d){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(f=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,d=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=d}return function(e){var n=e.length;if(n<=_e)return String.fromCharCode.apply(String,e);var t="",r=0;for(;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},te.prototype.compare=function(e,n,t,r,o){if(!se(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),n<0||t>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=t)return 0;if(r>=o)return-1;if(n>=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(t>>>=0)-(n>>>=0),u=Math.min(i,a),s=this.slice(r,o),c=e.slice(n,t),f=0;fo)&&(t=o),e.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return pe(this,e,n,t);case"utf8":case"utf-8":return we(this,e,n,t);case"ascii":return me(this,e,n,t);case"latin1":case"binary":return ve(this,e,n,t);case"base64":return ye(this,e,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,n,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},te.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _e=4096;function xe(e,n,t){var r="";t=Math.min(e.length,t);for(var o=n;or)&&(t=r);for(var o="",i=n;it)throw new RangeError("Trying to access beyond buffer length")}function Ae(e,n,t,r,o,i){if(!se(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function Te(e,n,t,r){n<0&&(n=65535+n+1);for(var o=0,i=Math.min(e.length-t,2);o>>8*(r?o:1-o)}function Re(e,n,t,r){n<0&&(n=4294967295+n+1);for(var o=0,i=Math.min(e.length-t,4);o>>8*(r?o:3-o)&255}function De(e,n,t,r,o,i){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function We(e,n,t,r,o){return o||De(e,0,t,4),X(e,n,t,r,23,4),t+4}function Ne(e,n,t,r,o){return o||De(e,0,t,8),X(e,n,t,r,52,8),t+8}te.prototype.slice=function(e,n){var t,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n0&&(o*=256);)r+=this[e+--n]*o;return r},te.prototype.readUInt8=function(e,n){return n||Se(e,1,this.length),this[e]},te.prototype.readUInt16LE=function(e,n){return n||Se(e,2,this.length),this[e]|this[e+1]<<8},te.prototype.readUInt16BE=function(e,n){return n||Se(e,2,this.length),this[e]<<8|this[e+1]},te.prototype.readUInt32LE=function(e,n){return n||Se(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},te.prototype.readUInt32BE=function(e,n){return n||Se(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},te.prototype.readIntLE=function(e,n,t){e|=0,n|=0,t||Se(e,n,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*n)),r},te.prototype.readIntBE=function(e,n,t){e|=0,n|=0,t||Se(e,n,this.length);for(var r=n,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*n)),i},te.prototype.readInt8=function(e,n){return n||Se(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},te.prototype.readInt16LE=function(e,n){n||Se(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},te.prototype.readInt16BE=function(e,n){n||Se(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},te.prototype.readInt32LE=function(e,n){return n||Se(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},te.prototype.readInt32BE=function(e,n){return n||Se(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},te.prototype.readFloatLE=function(e,n){return n||Se(e,4,this.length),G(this,e,!0,23,4)},te.prototype.readFloatBE=function(e,n){return n||Se(e,4,this.length),G(this,e,!1,23,4)},te.prototype.readDoubleLE=function(e,n){return n||Se(e,8,this.length),G(this,e,!0,52,8)},te.prototype.readDoubleBE=function(e,n){return n||Se(e,8,this.length),G(this,e,!1,52,8)},te.prototype.writeUIntLE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||Ae(this,e,n,t,Math.pow(2,8*t)-1,0);var o=1,i=0;for(this[n]=255&e;++i=0&&(i*=256);)this[n+o]=e/i&255;return n+t},te.prototype.writeUInt8=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,1,255,0),te.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},te.prototype.writeUInt16LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,65535,0),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Te(this,e,n,!0),n+2},te.prototype.writeUInt16BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,65535,0),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Te(this,e,n,!1),n+2},te.prototype.writeUInt32LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,4294967295,0),te.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Re(this,e,n,!0),n+4},te.prototype.writeUInt32BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,4294967295,0),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Re(this,e,n,!1),n+4},te.prototype.writeIntLE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);Ae(this,e,n,t,o-1,-o)}var i=0,a=1,u=0;for(this[n]=255&e;++i>0)-u&255;return n+t},te.prototype.writeIntBE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);Ae(this,e,n,t,o-1,-o)}var i=t-1,a=1,u=0;for(this[n+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[n+i+1]&&(u=1),this[n+i]=(e/a>>0)-u&255;return n+t},te.prototype.writeInt8=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,1,127,-128),te.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},te.prototype.writeInt16LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,32767,-32768),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Te(this,e,n,!0),n+2},te.prototype.writeInt16BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,32767,-32768),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Te(this,e,n,!1),n+2},te.prototype.writeInt32LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,2147483647,-2147483648),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Re(this,e,n,!0),n+4},te.prototype.writeInt32BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Re(this,e,n,!1),n+4},te.prototype.writeFloatLE=function(e,n,t){return We(this,e,n,!0,t)},te.prototype.writeFloatBE=function(e,n,t){return We(this,e,n,!1,t)},te.prototype.writeDoubleLE=function(e,n,t){return Ne(this,e,n,!0,t)},te.prototype.writeDoubleBE=function(e,n,t){return Ne(this,e,n,!1,t)},te.prototype.copy=function(e,n,t,r){if(t||(t=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-n=0;--o)e[o+n]=this[o+t];else if(i<1e3||!te.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(i=n;i55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function ze(e){return function(e){var n,t,r,o,i,a;H||Z();var u=e.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[u-2]?2:"="===e[u-1]?1:0,a=new J(3*u/4-i),r=i>0?u-4:u;var s=0;for(n=0,t=0;n>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=Y[e.charCodeAt(n)]<<2|Y[e.charCodeAt(n+1)]>>4,a[s++]=255&o):1===i&&(o=Y[e.charCodeAt(n)]<<10|Y[e.charCodeAt(n+1)]<<4|Y[e.charCodeAt(n+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(je,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Me(e,n,t,r){for(var o=0;o=n.length||o>=e.length);++o)n[o+t]=e[o];return o}function Fe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ue,Le={exports:{}};function Be(){return Ue||(Ue=1,"undefined"!=typeof self&&self,Le.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){function r(e,n){return(r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+pe(e,n+1)}}function we(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function me(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function ve(e){return e}function ye(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function ge(e){return[].slice.call(e)}function be(e){return null!=e}function Ee(e){return"[object RegExp]"==={}.toString.call(e)}function _e(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function xe(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=he((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return p.all(o).then(le)}};return o}function Pe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}fe.clear=function(){ce=se},fe((function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n}));var Oe=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return o(n,e),n}(ee(Error));function Ce(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Se(){return Boolean(document.body)&&"complete"===document.readyState}function Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Te(e){return encodeURIComponent(e)}function Re(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ae(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var s=t.__id__||ie();e=_n.unwrap(e);var c=t.__name__||t.name||r;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",r+"::")),_n.isProxyWindow(e)?(xn(s,t,c,e,n),e.awaitWindow().then((function(e){xn(s,t,c,e,n)}))):xn(s,t,c,e,n),pn("cross_domain_function",{id:s,name:c})}function Cn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=vn);var t=JSON.stringify(e,(function(e){var t=this[e];if(ln(this))return t;var r=hn(t);if(!r)return t;var o=n[r]||mn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return pn("cross_domain_zalgo_promise",{then:On(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return On(e,n,t,r,{on:i,send:a})},o.object=function(e){return J(e)||_n.isProxyWindow(e)?pn("cross_domain_window",_n.serialize(e,{send:a})):e},o))}function Sn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=gn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(ln(this))return t;var r,o;if(ln(t)?(r=t.__type__,o=t.__val__):(r=hn(t),o=t),!r)return o;var i=n[r]||yn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new p(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return _n.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var s=Pn(e,o);if(s&&s.val!==r)return s.val.apply({source:B,origin:O()},u);var c=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(e,n,t,{send:i})},o.cross_domain_window=function(e){return _n.deserialize(e,{send:i})},o))}var An={};function Tn(e,n,t,r){var o=r.on,i=r.send;return p.try((function(){var r=an().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||p.flush().then((function(){if(k(e))throw new Error("Window is closed");var t,a=Cn(e,n,((t={}).__post_robot_10_0_44__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(An),s=[],c=0;c1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(Xn.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Ye(r)}),1)})),a.on(Xn.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=Ke(n)),"number"==typeof t&&(f.style.height=Ke(t))})),f}}var lt=xe(),ht=xe();function pt(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,s=e.dimensions,c=void 0===s?{}:s,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?Gn.IFRAME:m,y=e.containerTemplate,g=void 0===y?dt:y,b=e.prerenderTemplate,E=void 0===b?null:b,_=e.validate,x=e.eligible,P=void 0===x?function(){return{eligible:!0}}:x,O=e.logger,S=void 0===O?{info:le}:O,A=e.exports,T=void 0===A?le:A,R=e.method,D=e.children,W=void 0===D?function(){return{}}:D,N=n.replace(/-/g,"_"),j=i({},{window:{type:$n.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!J(n)&&!_n.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(J(n)){if(k(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return Un(e.value)}},timeout:{type:$n.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:$n.STRING,required:!1},onDisplay:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onRendered:{type:$n.FUNCTION,required:!1,sendToChild:!1,default:at,decorate:ut},onRender:{type:$n.FUNCTION,required:!1,sendToChild:!1,default:at,decorate:ut},onClose:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onDestroy:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onResize:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at},onFocus:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at},close:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:$n.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:$n.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:N,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:j,dimensions:c,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:P,children:W,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===$n.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+ve(e,n+1)}}function ye(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function ge(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function be(e){return e}function Ee(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function _e(e){return[].slice.call(e)}function xe(e){return null!=e}function Pe(e){return"[object RegExp]"==={}.toString.call(e)}function Oe(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Ce(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=me((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return p.all(o).then(we)}};return o}function Se(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}he.clear=function(){le=de},he((function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n}));var Ae=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return o(n,e),n}(oe(Error));function Te(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Re(){return Boolean(document.body)&&"complete"===document.readyState}function De(){return Boolean(document.body)&&"interactive"===document.readyState}function We(e){return encodeURIComponent(e)}function Ne(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ce(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var s=t.__id__||se();e=Bn.unwrap(e);var c=t.__name__||t.name||r;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",r+"::")),Bn.isProxyWindow(e)?(qn(s,t,c,e,n),e.awaitWindow().then((function(e){qn(s,t,c,e,n)}))):qn(s,t,c,e,n),En("cross_domain_function",{id:s,name:c})}function Hn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=Pn);var t=JSON.stringify(e,(function(e){var t=this[e];if(gn(this))return t;var r=bn(t);if(!r)return t;var o=n[r]||xn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return En("cross_domain_zalgo_promise",{then:Jn(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return Jn(e,n,t,r,{on:i,send:a})},o.object=function(e){return Z(e)||Bn.isProxyWindow(e)?En("cross_domain_window",Bn.serialize(e,{send:a})):e},o))}function Zn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=Cn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(gn(this))return t;var r,o;if(gn(t)?(r=t.__type__,o=t.__val__):(r=bn(t),o=t),!r)return o;var i=n[r]||On[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new p(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return Bn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var s=Yn(e,o);if(s&&s.val!==r)return s.val.apply({source:B,origin:O()},u);var c=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Bn.deserialize(e,{send:i})},o))}var $n={};function Vn(e,n,t,r){var o=r.on,i=r.send;return p.try((function(){var r=ln().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||p.flush().then((function(){if(k(e))throw new Error("Window is closed");var t,a=Hn(e,n,((t={}).__post_robot_10_0_44__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys($n),s=[],c=0;c1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(gt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Ze(r)}),1)})),a.on(gt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=rn(n)),"number"==typeof t&&(f.style.height=rn(t))})),f}}function jt(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body"),i=n.createElement("style"),a=n.createElement("div");return a.classList.add("spinner"),t.cspNonce&&i.setAttribute("nonce",t.cspNonce),r.appendChild(o),o.appendChild(a),o.appendChild(i),i.appendChild(n.createTextNode("\n html, body {\n width: 100%;\n height: 100%;\n }\n\n .spinner {\n position: fixed;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n }\n\n @keyframes rotation {\n from {\n transform: translateX(-50%) translateY(-50%) rotate(0deg);\n }\n to {\n transform: translateX(-50%) translateY(-50%) rotate(359deg);\n }\n }\n ")),r}var kt=Ce(),It=Ce();function zt(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,s=e.dimensions,c=void 0===s?{}:s,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?yt.IFRAME:m,y=e.containerTemplate,g=void 0===y?Nt:y,b=e.prerenderTemplate,E=void 0===b?jt:b,_=e.validate,x=e.eligible,P=void 0===x?function(){return{eligible:!0}}:x,O=e.logger,S=void 0===O?{info:we}:O,A=e.exports,T=void 0===A?we:A,R=e.method,D=e.children,W=void 0===D?function(){return{}}:D,N=n.replace(/-/g,"_"),j=i({},{window:{type:mt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!Z(n)&&!Bn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(Z(n)){if(k(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return ut(e.value)}},timeout:{type:mt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:mt.STRING,required:!1},onDisplay:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onRendered:{type:mt.FUNCTION,required:!1,sendToChild:!1,default:At,decorate:Tt},onRender:{type:mt.FUNCTION,required:!1,sendToChild:!1,default:At,decorate:Tt},onClose:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onDestroy:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onResize:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At},onFocus:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At},close:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:mt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:mt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:N,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:j,dimensions:c,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:P,children:W,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===mt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t({emit(e,...n){let t=this.events[e]||[];for(let e=0,r=t.length;e{this.events[e]=this.events[e]?.filter((e=>n!==e))}}});class Ve{constructor(){R(N()),this.body=document.body;const e=k("style");e.append(".tebex-js-lightbox{all:unset;zoom:1;forced-color-adjust:none;position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:var(--tebex-js-z-index,9999999);background:var(--tebex-js-lightbox-bg,rgba(0,0,0,.8));opacity:0;transition-property:opacity;transition-duration:var(--tebex-js-duration,.4s);transition-timing-function:var(--tebex-js-timing,ease);will-change:opacity;display:flex;justify-content:center;align-items:center;user-select:none;-webkit-user-select:none;-moz-user-select:none;}.tebex-js-lightbox--visible{opacity:1;}.tebex-js-lightbox__holder{display:block;border:0;overflow:hidden;border-radius:5px;}.tebex-js-lightbox__holder > div{display:block!important;}"),this.body.append(e),this.root=this.render(),this.holder=this.root.querySelector(".tebex-js-lightbox__holder")}render(){return F("div",{class:"tebex-js-lightbox"},F("div",{class:"tebex-js-lightbox__holder",role:"dialog"}))}async show(){this.body.append(this.root),await U(),this.root.classList.add("tebex-js-lightbox--visible"),await L(this.root)}async hide(){this.root.classList.remove("tebex-js-lightbox--visible"),await U(),await L(this.root),this.body.removeChild(this.root)}destroy(){this.root.parentNode&&this.body.removeChild(this.root)}}const Ge=({doc:e,props:n})=>{const t=F("html",null,F("body",null,F("style",{nonce:n.cspNonce},"html,body{width:100px;height:100px;overflow:hidden;}.tebex-js-spinner{position:fixed;max-height:60vmin;max-width:60vmin;height:40px;width:40px;top:50%;left:50%;box-sizing:border-box;border:3px solid rgba(0,0,0,.2);border-top-color:#FFF;border-radius:100%;animation:tebex-js-spinner-rotation .7s infinite linear;}@keyframes tebex-js-spinner-rotation{from{transform:translateX(-50%) translateY(-50%) rotate(0deg);}to{transform:translateX(-50%) translateY(-50%) rotate(359deg);}}"),F("div",{class:"tebex-js-spinner"})));return e&&e.adoptNode(t),t};var Xe,Ke,Qe,en,nn,tn;const rn="800px",on="760px",an=["default","light","dark"],un=["primary","secondary"],sn=["open","close","payment:complete","payment:error"];class cn{constructor(){Xe.add(this),this.ident=null,this.locale=null,this.theme="default",this.colors=[],this.endpoint="https://pay.tebex.io",this.popupOnMobile=!1,this.isOpen=!1,this.emitter=$e(),this.lightbox=null,this.component=null,this.zoid=null,Ke.set(this,!1),Qe.set(this,void 0)}init(e){var n;this.ident=e.ident,this.locale=e.locale??null,this.theme=e.theme??this.theme,this.colors=e.colors??this.colors,this.endpoint=e.endpoint??this.endpoint,this.popupOnMobile=e.popupOnMobile??this.popupOnMobile,R(!(void 0===(n=this.ident)||null==n),"ident option is required"),R(an.includes(this.theme),`invalid theme option "${this.theme}"`);for(let{color:e,name:n}of this.colors)R(un.includes(n),`invalid color name "${n}"`),R(!e.includes("var("),`invalid ${n} color: colors cannot include CSS variables`)}on(e,n){return"payment_complete"===e&&(e="payment:complete"),"payment_error"===e&&(e="payment:error"),R(sn.includes(e),`invalid event name "${e}"`),this.emitter.on(e,n)}async launch(){if(!this.popupOnMobile&&j(rn,on))return await n(this,Xe,"m",tn).call(this,document.body,!0),this.isOpen=!0,void this.emitter.emit("open");await n(this,Xe,"m",en).call(this)}async close(){this.lightbox&&await this.lightbox.hide(),this.zoid&&(await this.zoid.close(),this.isOpen=!1,this.emitter.emit("close"))}destroy(){this.lightbox&&this.lightbox.destroy(),this.zoid&&(this.zoid.close(),this.isOpen=!1,this.emitter.emit("close"))}async render(e,t,r,o=this.popupOnMobile){R(M(e),"Target element must already be inserted into the page before it can be used"),t=D(t)?t:`${t}px`,r=D(r)?r:`${r}px`,n(this,Xe,"m",nn).call(this,t,r),await n(this,Xe,"m",tn).call(this,e,o&&j(t,r)),this.isOpen=!0,this.emitter.emit("open")}async renderFinished(){return new Promise((e=>{t(this,Qe,e,"f"),n(this,Ke,"f")&&e()}))}}Ke=new WeakMap,Qe=new WeakMap,Xe=new WeakSet,en=async function(){this.lightbox||(this.lightbox=new Ve),await this.lightbox.show(),await n(this,Xe,"m",tn).call(this,this.lightbox.holder,!1),this.isOpen=!0,this.emitter.emit("open")},nn=function(e=rn,n=on){this.component=Ze.create({tag:"tebex-js-checkout-component",url:()=>this.endpoint+"/"+this.ident,autoResize:{width:!1,height:!1},dimensions:{width:e,height:n},prerenderTemplate:Ge,attributes:{iframe:{allow:"payment https://pay.tebex.io"}}})},tn=async function(e,r){const o=new URL(window.location.href);this.component||n(this,Xe,"m",nn).call(this),this.zoid=this.component({locale:this.locale,colors:this.colors,theme:this.theme,onOpenWindow:e=>{window.open(e)},onClosePopup:async()=>{await this.zoid.close(),this.lightbox&&await this.lightbox.hide(),this.isOpen=!1,this.emitter.emit("close")},onPaymentComplete:e=>{this.emitter.emit("payment:complete",e)},onPaymentError:e=>{this.emitter.emit("payment:error",e)},isApplePayAvailable:N()&&void 0!==window.ApplePaySession&&window.ApplePaySession.canMakePayments(),isEmbedded:!r,referrer:o.hostname,path:o.pathname,version:"1.3.0"}),await this.zoid.renderTo(window,e,r?"popup":"iframe"),t(this,Ke,!0,"f"),n(this,Qe,"f")&&n(this,Qe,"f").call(this)};const fn={OPEN:"open",CLOSE:"close",PAYMENT_COMPLETE:"payment:complete",PAYMENT_ERROR:"payment:error"};var dn,ln,hn,pn,wn,mn=Object.freeze({__proto__:null,events:fn});class vn extends HTMLElement{get ident(){return this.checkout.ident}set ident(e){z(this,"ident",e)}get open(){return this._open}set open(e){z(this,"open",e)}get height(){return this._height}set height(e){z(this,"height",e)}static get observedAttributes(){return["ident","open","height"]}constructor(){super(),dn.add(this),this.checkout=new cn,this._root=null,this._slot=null,this._shadow=null,this._mode="popover",this._height=700,this._open=!1,this._didInit=!1,this._didConnect=!1,hn.set(this,(()=>{if("inline"===this._mode&&this._slot.assignedElements().length>0&&((e="")=>{console.warn("Tebex.js warning"+(e?": ":"")+e.trim())})(" does not support child elements in inline mode"),"inline"===this._mode)return;let e=[];const n=()=>this.setAttribute("open",""),t=()=>{const t=this._slot.assignedElements();for(let t of e)t.removeEventListener("click",n);for(let e of t)e.addEventListener("click",n);e=t};t(),this._slot.addEventListener("slotchange",t)})),this._shadow=this.attachShadow({mode:"open"}),this._root=k("div"),this._slot=k("slot"),this._root.append(this._slot),this._shadow.append(this._root)}connectedCallback(){this._didConnect=!0;for(let e of sn)this.checkout.on(e,(n=>{this.dispatchEvent(new CustomEvent(e,{detail:n}))}));I(this,"ident")&&n(this,dn,"m",ln).call(this)}disconnectedCallback(){this.checkout.destroy(),this.checkout=new cn,this._didConnect=!1,this._open=!1,this._didInit=!1,this._didConnect=!1}attributeChangedCallback(e,t,r){if(t!==r)switch(e){case"ident":R(!this._didInit,"This checkout element already has an ident - to use a new ident, create a new element"),n(this,dn,"m",ln).call(this);break;case"open":this._open=!("false"!==t&&t||""!==r&&!r),n(this,dn,"m",pn).call(this);break;case"height":this._height=parseInt(r),n(this,dn,"m",wn).call(this)}}async renderFinished(){this.checkout&&await this.checkout.renderFinished()}}hn=new WeakMap,dn=new WeakSet,ln=async function(){if(this._didInit||!this._didConnect)return;this._didInit=!0;let e=[];this.hasAttribute("color-primary")&&e.push({name:"primary",color:I(this,"color-primary")}),this.hasAttribute("color-secondary")&&e.push({name:"secondary",color:I(this,"color-secondary")}),this.checkout.init({ident:I(this,"ident"),locale:I(this,"locale"),theme:I(this,"theme"),colors:e,popupOnMobile:null!==I(this,"popup-on-mobile"),endpoint:I(this,"endpoint")}),this._mode=this.hasAttribute("inline")?"inline":"popover","inline"===this._mode?await this.checkout.render(this._root,"100%",this._height,!1):"popover"===this._mode&&(this.checkout.on("close",(()=>this.removeAttribute("open"))),n(this,dn,"m",pn).call(this)),this.checkout.on("payment:complete",(()=>{if(this.hasAttribute("redirect-on-complete")){const e=this.getAttribute("redirect-on-complete");location.href=e}})),n(this,hn,"f").call(this)},pn=function(){"popover"===this._mode&&this._didConnect&&this._didInit&&(this._open&&!this.checkout.isOpen&&this.checkout.launch(),!this._open&&this.checkout.isOpen&&this.checkout.close())},wn=function(){if("inline"!==this._mode)return;const e=this.checkout.zoid;e&&e.resize({height:this._height})},N()&&customElements.define("tebex-checkout",vn);const yn="1.3.0",gn=new cn;var bn={version:yn,checkout:gn,...mn};return e.checkout=gn,e.default=bn,e.events=fn,e.version=yn,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +var Tebex=function(e){"use strict";function n(e,n,t,r){if("a"===t&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?r:"a"===t?r.call(e):r?r.value:n.get(e)}function t(e,n,t,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!o:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,t):o?o.value=t:n.set(e,t),t}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}var a=o,u=i;function s(e){if(a===setTimeout)return setTimeout(e,0);if((a===o||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(n){try{return a.call(null,e,0)}catch(n){return a.call(this,e,0)}}}"function"==typeof r.setTimeout&&(a=setTimeout),"function"==typeof r.clearTimeout&&(u=clearTimeout);var c,f=[],d=!1,l=-1;function h(){d&&c&&(d=!1,c.length?f=c.concat(f):l=-1,f.length&&p())}function p(){if(!d){var e=s(h);d=!0;for(var n=f.length;n;){for(c=f,f=[];++l1)for(var t=1;t{e||((e="")=>{throw new Error("Tebex.js error"+(e?": ":"")+e.trim())})(n)},D=e=>"string"==typeof e,W=e=>"object"==typeof e&&null!==e&&!(e=>Array.isArray(e))(e),N=()=>"undefined"!=typeof window&&void 0!==window.document,j=(e,n)=>{if(!N())return!1;if(!window.matchMedia)return!0;return window.matchMedia(`(max-width: ${e}) or (max-height: ${n})`).matches},k=e=>document.createElement(e),I=(e,n)=>e.getAttribute(n),z=(e,n,t)=>{const r=n.replace(/([A-Z])/g,(e=>`-${e[0].toLowerCase()}`));!0===t?e.setAttribute(r,""):!1===t||null==t?e.removeAttribute(r):e.setAttribute(r,t+"")},M=e=>document.contains(e)||(e=>{const n=e.getRootNode();return n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&void 0!==n.host})(e),F=(e,n,...t)=>{const r=k(e);if(W(n))for(let e in n)z(r,e,n[e]);for(let e of t.flat())r.append(e);return r},U=async()=>new Promise((e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))})),L=async e=>new Promise((n=>{getComputedStyle(e).transition||n();const t=()=>{e.removeEventListener("transitionend",t),e.removeEventListener("transitioncancel",t),n()};e.addEventListener("transitionend",t),e.addEventListener("transitioncancel",t)}));var B=N()?window:{document:{body:{}}},q=[],Y=[],J="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function Z(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)q[n]=e[n],Y[e.charCodeAt(n)]=n;Y["-".charCodeAt(0)]=62,Y["_".charCodeAt(0)]=63}function $(e,n,t){for(var r,o,i=[],a=n;a>18&63]+q[o>>12&63]+q[o>>6&63]+q[63&o]);return i.join("")}function V(e){var n;H||Z();for(var t=e.length,r=t%3,o="",i=[],a=16383,u=0,s=t-r;us?s:u+a));return 1===r?(n=e[t-1],o+=q[n>>2],o+=q[n<<4&63],o+="=="):2===r&&(n=(e[t-2]<<8)+e[t-1],o+=q[n>>10],o+=q[n>>4&63],o+=q[n<<2&63],o+="="),i.push(o),i.join("")}function G(e,n,t,r,o){var i,a,u=8*o-r-1,s=(1<>1,f=-7,d=t?o-1:0,l=t?-1:1,h=e[n+d];for(d+=l,i=h&(1<<-f)-1,h>>=-f,f+=u;f>0;i=256*i+e[n+d],d+=l,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[n+d],d+=l,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)}function X(e,n,t,r,o,i){var a,u,s,c=8*i-o-1,f=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,w=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=f):(a=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-a))<1&&(a--,s*=2),(n+=a+d>=1?l/s:l*Math.pow(2,1-d))*s>=2&&(a++,s/=2),a+d>=f?(u=0,a=f):a+d>=1?(u=(n*s-1)*Math.pow(2,o),a+=d):(u=n*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[t+h]=255&u,h+=p,u/=256,o-=8);for(a=a<0;e[t+h]=255&a,h+=p,a/=256,c-=8);e[t+h-p]|=128*w}var K={}.toString,Q=Array.isArray||function(e){return"[object Array]"==K.call(e)};function ee(){return te.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(e,n){if(ee()=ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ee().toString(16)+" bytes");return 0|e}function se(e){return!(null==e||!e._isBuffer)}function ce(e,n){if(se(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Ie(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return ze(e).length;default:if(r)return Ie(e).length;n=(""+n).toLowerCase(),r=!0}}function fe(e,n,t){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oe(this,n,t);case"utf8":case"utf-8":return Ee(this,n,t);case"ascii":return xe(this,n,t);case"latin1":case"binary":return Pe(this,n,t);case"base64":return be(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,n,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function de(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function le(e,n,t,r,o){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof n&&(n=te.from(n,r)),se(n))return 0===n.length?-1:he(e,n,t,r,o);if("number"==typeof n)return n&=255,te.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,t):Uint8Array.prototype.lastIndexOf.call(e,n,t):he(e,[n],t,r,o);throw new TypeError("val must be string, number or Buffer")}function he(e,n,t,r,o){var i,a=1,u=e.length,s=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||n.length<2)return-1;a=2,u/=2,s/=2,t/=2}function c(e,n){return 1===a?e[n]:e.readUInt16BE(n*a)}if(o){var f=-1;for(i=t;iu&&(t=u-s),i=t;i>=0;i--){for(var d=!0,l=0;lo&&(r=o):r=o;var i=n.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=t%256,i.push(o),i.push(r);return i}(n,e.length-t),e,t,r)}function be(e,n,t){return 0===n&&t===e.length?V(e):V(e.slice(n,t))}function Ee(e,n,t){t=Math.min(e.length,t);for(var r=[],o=n;o239?4:c>223?3:c>191?2:1;if(o+d<=t)switch(d){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(f=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,d=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=d}return function(e){var n=e.length;if(n<=_e)return String.fromCharCode.apply(String,e);var t="",r=0;for(;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},te.prototype.compare=function(e,n,t,r,o){if(!se(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),n<0||t>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=t)return 0;if(r>=o)return-1;if(n>=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(t>>>=0)-(n>>>=0),u=Math.min(i,a),s=this.slice(r,o),c=e.slice(n,t),f=0;fo)&&(t=o),e.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return pe(this,e,n,t);case"utf8":case"utf-8":return we(this,e,n,t);case"ascii":return me(this,e,n,t);case"latin1":case"binary":return ve(this,e,n,t);case"base64":return ye(this,e,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,n,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},te.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _e=4096;function xe(e,n,t){var r="";t=Math.min(e.length,t);for(var o=n;or)&&(t=r);for(var o="",i=n;it)throw new RangeError("Trying to access beyond buffer length")}function Ae(e,n,t,r,o,i){if(!se(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function Te(e,n,t,r){n<0&&(n=65535+n+1);for(var o=0,i=Math.min(e.length-t,2);o>>8*(r?o:1-o)}function Re(e,n,t,r){n<0&&(n=4294967295+n+1);for(var o=0,i=Math.min(e.length-t,4);o>>8*(r?o:3-o)&255}function De(e,n,t,r,o,i){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function We(e,n,t,r,o){return o||De(e,0,t,4),X(e,n,t,r,23,4),t+4}function Ne(e,n,t,r,o){return o||De(e,0,t,8),X(e,n,t,r,52,8),t+8}te.prototype.slice=function(e,n){var t,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n0&&(o*=256);)r+=this[e+--n]*o;return r},te.prototype.readUInt8=function(e,n){return n||Se(e,1,this.length),this[e]},te.prototype.readUInt16LE=function(e,n){return n||Se(e,2,this.length),this[e]|this[e+1]<<8},te.prototype.readUInt16BE=function(e,n){return n||Se(e,2,this.length),this[e]<<8|this[e+1]},te.prototype.readUInt32LE=function(e,n){return n||Se(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},te.prototype.readUInt32BE=function(e,n){return n||Se(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},te.prototype.readIntLE=function(e,n,t){e|=0,n|=0,t||Se(e,n,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*n)),r},te.prototype.readIntBE=function(e,n,t){e|=0,n|=0,t||Se(e,n,this.length);for(var r=n,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*n)),i},te.prototype.readInt8=function(e,n){return n||Se(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},te.prototype.readInt16LE=function(e,n){n||Se(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},te.prototype.readInt16BE=function(e,n){n||Se(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},te.prototype.readInt32LE=function(e,n){return n||Se(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},te.prototype.readInt32BE=function(e,n){return n||Se(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},te.prototype.readFloatLE=function(e,n){return n||Se(e,4,this.length),G(this,e,!0,23,4)},te.prototype.readFloatBE=function(e,n){return n||Se(e,4,this.length),G(this,e,!1,23,4)},te.prototype.readDoubleLE=function(e,n){return n||Se(e,8,this.length),G(this,e,!0,52,8)},te.prototype.readDoubleBE=function(e,n){return n||Se(e,8,this.length),G(this,e,!1,52,8)},te.prototype.writeUIntLE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||Ae(this,e,n,t,Math.pow(2,8*t)-1,0);var o=1,i=0;for(this[n]=255&e;++i=0&&(i*=256);)this[n+o]=e/i&255;return n+t},te.prototype.writeUInt8=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,1,255,0),te.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},te.prototype.writeUInt16LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,65535,0),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Te(this,e,n,!0),n+2},te.prototype.writeUInt16BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,65535,0),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Te(this,e,n,!1),n+2},te.prototype.writeUInt32LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,4294967295,0),te.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Re(this,e,n,!0),n+4},te.prototype.writeUInt32BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,4294967295,0),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Re(this,e,n,!1),n+4},te.prototype.writeIntLE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);Ae(this,e,n,t,o-1,-o)}var i=0,a=1,u=0;for(this[n]=255&e;++i>0)-u&255;return n+t},te.prototype.writeIntBE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);Ae(this,e,n,t,o-1,-o)}var i=t-1,a=1,u=0;for(this[n+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[n+i+1]&&(u=1),this[n+i]=(e/a>>0)-u&255;return n+t},te.prototype.writeInt8=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,1,127,-128),te.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},te.prototype.writeInt16LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,32767,-32768),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):Te(this,e,n,!0),n+2},te.prototype.writeInt16BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,2,32767,-32768),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):Te(this,e,n,!1),n+2},te.prototype.writeInt32LE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,2147483647,-2147483648),te.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Re(this,e,n,!0),n+4},te.prototype.writeInt32BE=function(e,n,t){return e=+e,n|=0,t||Ae(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),te.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Re(this,e,n,!1),n+4},te.prototype.writeFloatLE=function(e,n,t){return We(this,e,n,!0,t)},te.prototype.writeFloatBE=function(e,n,t){return We(this,e,n,!1,t)},te.prototype.writeDoubleLE=function(e,n,t){return Ne(this,e,n,!0,t)},te.prototype.writeDoubleBE=function(e,n,t){return Ne(this,e,n,!1,t)},te.prototype.copy=function(e,n,t,r){if(t||(t=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-n=0;--o)e[o+n]=this[o+t];else if(i<1e3||!te.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(i=n;i55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function ze(e){return function(e){var n,t,r,o,i,a;H||Z();var u=e.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[u-2]?2:"="===e[u-1]?1:0,a=new J(3*u/4-i),r=i>0?u-4:u;var s=0;for(n=0,t=0;n>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=Y[e.charCodeAt(n)]<<2|Y[e.charCodeAt(n+1)]>>4,a[s++]=255&o):1===i&&(o=Y[e.charCodeAt(n)]<<10|Y[e.charCodeAt(n+1)]<<4|Y[e.charCodeAt(n+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(je,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Me(e,n,t,r){for(var o=0;o=n.length||o>=e.length);++o)n[o+t]=e[o];return o}function Fe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ue,Le={exports:{}};function Be(){return Ue||(Ue=1,"undefined"!=typeof self&&self,Le.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){function r(e,n){return(r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+pe(e,n+1)}}function we(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function me(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function ve(e){return e}function ye(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function ge(e){return[].slice.call(e)}function be(e){return null!=e}function Ee(e){return"[object RegExp]"==={}.toString.call(e)}function _e(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function xe(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=he((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return p.all(o).then(le)}};return o}function Pe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}fe.clear=function(){ce=se},fe((function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n}));var Oe=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return o(n,e),n}(ee(Error));function Ce(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Se(){return Boolean(document.body)&&"complete"===document.readyState}function Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Te(e){return encodeURIComponent(e)}function Re(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ae(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var s=t.__id__||ie();e=_n.unwrap(e);var c=t.__name__||t.name||r;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",r+"::")),_n.isProxyWindow(e)?(xn(s,t,c,e,n),e.awaitWindow().then((function(e){xn(s,t,c,e,n)}))):xn(s,t,c,e,n),pn("cross_domain_function",{id:s,name:c})}function Cn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=vn);var t=JSON.stringify(e,(function(e){var t=this[e];if(ln(this))return t;var r=hn(t);if(!r)return t;var o=n[r]||mn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return pn("cross_domain_zalgo_promise",{then:On(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return On(e,n,t,r,{on:i,send:a})},o.object=function(e){return J(e)||_n.isProxyWindow(e)?pn("cross_domain_window",_n.serialize(e,{send:a})):e},o))}function Sn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=gn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(ln(this))return t;var r,o;if(ln(t)?(r=t.__type__,o=t.__val__):(r=hn(t),o=t),!r)return o;var i=n[r]||yn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new p(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return _n.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var s=Pn(e,o);if(s&&s.val!==r)return s.val.apply({source:B,origin:O()},u);var c=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(e,n,t,{send:i})},o.cross_domain_window=function(e){return _n.deserialize(e,{send:i})},o))}var An={};function Tn(e,n,t,r){var o=r.on,i=r.send;return p.try((function(){var r=an().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||p.flush().then((function(){if(k(e))throw new Error("Window is closed");var t,a=Cn(e,n,((t={}).__post_robot_10_0_44__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(An),s=[],c=0;c1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(Xn.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Ye(r)}),1)})),a.on(Xn.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=Ke(n)),"number"==typeof t&&(f.style.height=Ke(t))})),f}}var lt=xe(),ht=xe();function pt(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,s=e.dimensions,c=void 0===s?{}:s,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?Gn.IFRAME:m,y=e.containerTemplate,g=void 0===y?dt:y,b=e.prerenderTemplate,E=void 0===b?null:b,_=e.validate,x=e.eligible,P=void 0===x?function(){return{eligible:!0}}:x,O=e.logger,S=void 0===O?{info:le}:O,A=e.exports,T=void 0===A?le:A,R=e.method,D=e.children,W=void 0===D?function(){return{}}:D,N=n.replace(/-/g,"_"),j=i({},{window:{type:$n.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!J(n)&&!_n.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(J(n)){if(k(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return Un(e.value)}},timeout:{type:$n.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:$n.STRING,required:!1},onDisplay:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onRendered:{type:$n.FUNCTION,required:!1,sendToChild:!1,default:at,decorate:ut},onRender:{type:$n.FUNCTION,required:!1,sendToChild:!1,default:at,decorate:ut},onClose:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onDestroy:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at,decorate:ut},onResize:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at},onFocus:{type:$n.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:at},close:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:$n.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:$n.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:$n.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:N,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:j,dimensions:c,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:P,children:W,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===$n.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+ve(e,n+1)}}function ye(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function ge(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function be(e){return e}function Ee(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function _e(e){return[].slice.call(e)}function xe(e){return null!=e}function Pe(e){return"[object RegExp]"==={}.toString.call(e)}function Oe(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Ce(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=me((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return p.all(o).then(we)}};return o}function Se(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}he.clear=function(){le=de},he((function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n}));var Ae=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return o(n,e),n}(oe(Error));function Te(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Re(){return Boolean(document.body)&&"complete"===document.readyState}function De(){return Boolean(document.body)&&"interactive"===document.readyState}function We(e){return encodeURIComponent(e)}function Ne(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ce(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var s=t.__id__||se();e=Bn.unwrap(e);var c=t.__name__||t.name||r;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",r+"::")),Bn.isProxyWindow(e)?(qn(s,t,c,e,n),e.awaitWindow().then((function(e){qn(s,t,c,e,n)}))):qn(s,t,c,e,n),En("cross_domain_function",{id:s,name:c})}function Hn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=Pn);var t=JSON.stringify(e,(function(e){var t=this[e];if(gn(this))return t;var r=bn(t);if(!r)return t;var o=n[r]||xn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return En("cross_domain_zalgo_promise",{then:Jn(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return Jn(e,n,t,r,{on:i,send:a})},o.object=function(e){return Z(e)||Bn.isProxyWindow(e)?En("cross_domain_window",Bn.serialize(e,{send:a})):e},o))}function Zn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=Cn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(gn(this))return t;var r,o;if(gn(t)?(r=t.__type__,o=t.__val__):(r=bn(t),o=t),!r)return o;var i=n[r]||On[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new p(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return Bn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var s=Yn(e,o);if(s&&s.val!==r)return s.val.apply({source:B,origin:O()},u);var c=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:c},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Bn.deserialize(e,{send:i})},o))}var $n={};function Vn(e,n,t,r){var o=r.on,i=r.send;return p.try((function(){var r=ln().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||p.flush().then((function(){if(k(e))throw new Error("Window is closed");var t,a=Hn(e,n,((t={}).__post_robot_10_0_44__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys($n),s=[],c=0;c1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(gt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Ze(r)}),1)})),a.on(gt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=rn(n)),"number"==typeof t&&(f.style.height=rn(t))})),f}}function jt(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body"),i=n.createElement("style"),a=n.createElement("div");return a.classList.add("spinner"),t.cspNonce&&i.setAttribute("nonce",t.cspNonce),r.appendChild(o),o.appendChild(a),o.appendChild(i),i.appendChild(n.createTextNode("\n html, body {\n width: 100%;\n height: 100%;\n }\n\n .spinner {\n position: fixed;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n }\n\n @keyframes rotation {\n from {\n transform: translateX(-50%) translateY(-50%) rotate(0deg);\n }\n to {\n transform: translateX(-50%) translateY(-50%) rotate(359deg);\n }\n }\n ")),r}var kt=Ce(),It=Ce();function zt(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,s=e.dimensions,c=void 0===s?{}:s,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?yt.IFRAME:m,y=e.containerTemplate,g=void 0===y?Nt:y,b=e.prerenderTemplate,E=void 0===b?jt:b,_=e.validate,x=e.eligible,P=void 0===x?function(){return{eligible:!0}}:x,O=e.logger,S=void 0===O?{info:we}:O,A=e.exports,T=void 0===A?we:A,R=e.method,D=e.children,W=void 0===D?function(){return{}}:D,N=n.replace(/-/g,"_"),j=i({},{window:{type:mt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!Z(n)&&!Bn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(Z(n)){if(k(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return ut(e.value)}},timeout:{type:mt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:mt.STRING,required:!1},onDisplay:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onRendered:{type:mt.FUNCTION,required:!1,sendToChild:!1,default:At,decorate:Tt},onRender:{type:mt.FUNCTION,required:!1,sendToChild:!1,default:At,decorate:Tt},onClose:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onDestroy:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At,decorate:Tt},onResize:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At},onFocus:{type:mt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:At},close:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:mt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:mt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:mt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:N,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:j,dimensions:c,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:P,children:W,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===mt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t({emit(e,...n){let t=this.events[e]||[];for(let e=0,r=t.length;e{this.events[e]=this.events[e]?.filter((e=>n!==e))}}});class Ve{constructor(){R(N()),this.body=document.body;const e=k("style");e.append(".tebex-js-lightbox{all:unset;zoom:1;forced-color-adjust:none;position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:var(--tebex-js-z-index,9999999);background:var(--tebex-js-lightbox-bg,rgba(0,0,0,.8));opacity:0;transition-property:opacity;transition-duration:var(--tebex-js-duration,.4s);transition-timing-function:var(--tebex-js-timing,ease);will-change:opacity;display:flex;justify-content:center;align-items:center;user-select:none;-webkit-user-select:none;-moz-user-select:none;}.tebex-js-lightbox--visible{opacity:1;}.tebex-js-lightbox__holder{display:block;border:0;overflow:hidden;border-radius:5px;}.tebex-js-lightbox__holder > div{display:block!important;}"),this.body.append(e),this.root=this.render(),this.holder=this.root.querySelector(".tebex-js-lightbox__holder")}render(){return F("div",{class:"tebex-js-lightbox"},F("div",{class:"tebex-js-lightbox__holder",role:"dialog"}))}async show(){this.body.append(this.root),await U(),this.root.classList.add("tebex-js-lightbox--visible"),await L(this.root)}async hide(){this.root.classList.remove("tebex-js-lightbox--visible"),await U(),await L(this.root),this.body.removeChild(this.root)}destroy(){this.root.parentNode&&this.body.removeChild(this.root)}}const Ge=({doc:e,props:n})=>{const t=F("html",null,F("body",null,F("style",{nonce:n.cspNonce},"html,body{width:100px;height:100px;overflow:hidden;}.tebex-js-spinner{position:fixed;max-height:60vmin;max-width:60vmin;height:40px;width:40px;top:50%;left:50%;box-sizing:border-box;border:3px solid rgba(0,0,0,.2);border-top-color:#FFF;border-radius:100%;animation:tebex-js-spinner-rotation .7s infinite linear;}@keyframes tebex-js-spinner-rotation{from{transform:translateX(-50%) translateY(-50%) rotate(0deg);}to{transform:translateX(-50%) translateY(-50%) rotate(359deg);}}"),F("div",{class:"tebex-js-spinner"})));return e&&e.adoptNode(t),t};var Xe,Ke,Qe,en,nn,tn;const rn="800px",on="760px",an=["auto","default","light","dark"],un=["primary","secondary"],sn=["open","close","payment:complete","payment:error"];class cn{constructor(){Xe.add(this),this.ident=null,this.locale=null,this.theme="default",this.colors=[],this.endpoint="https://pay.tebex.io",this.popupOnMobile=!1,this.isOpen=!1,this.emitter=$e(),this.lightbox=null,this.component=null,this.zoid=null,Ke.set(this,!1),Qe.set(this,void 0)}init(e){var n;this.ident=e.ident,this.locale=e.locale??null,this.theme=e.theme??this.theme,this.colors=e.colors??this.colors,this.endpoint=e.endpoint??this.endpoint,this.popupOnMobile=e.popupOnMobile??this.popupOnMobile,R(!(void 0===(n=this.ident)||null==n),"ident option is required"),R(an.includes(this.theme),`invalid theme option "${this.theme}"`);for(let{color:e,name:n}of this.colors)R(un.includes(n),`invalid color name "${n}"`),R(!e.includes("var("),`invalid ${n} color: colors cannot include CSS variables`)}on(e,n){return"payment_complete"===e&&(e="payment:complete"),"payment_error"===e&&(e="payment:error"),R(sn.includes(e),`invalid event name "${e}"`),this.emitter.on(e,n)}async launch(){if(!this.popupOnMobile&&j(rn,on))return await n(this,Xe,"m",tn).call(this,document.body,!0),this.isOpen=!0,void this.emitter.emit("open");await n(this,Xe,"m",en).call(this)}async close(){this.lightbox&&await this.lightbox.hide(),this.zoid&&(await this.zoid.close(),this.isOpen=!1,this.emitter.emit("close"))}destroy(){this.lightbox&&this.lightbox.destroy(),this.zoid&&(this.zoid.close(),this.isOpen=!1,this.emitter.emit("close"))}async render(e,t,r,o=this.popupOnMobile){R(M(e),"Target element must already be inserted into the page before it can be used"),t=D(t)?t:`${t}px`,r=D(r)?r:`${r}px`,n(this,Xe,"m",nn).call(this,t,r),await n(this,Xe,"m",tn).call(this,e,o&&j(t,r)),this.isOpen=!0,this.emitter.emit("open")}async renderFinished(){return new Promise((e=>{t(this,Qe,e,"f"),n(this,Ke,"f")&&e()}))}}Ke=new WeakMap,Qe=new WeakMap,Xe=new WeakSet,en=async function(){this.lightbox||(this.lightbox=new Ve),await this.lightbox.show(),await n(this,Xe,"m",tn).call(this,this.lightbox.holder,!1),this.isOpen=!0,this.emitter.emit("open")},nn=function(e=rn,n=on){this.component=Ze.create({tag:"tebex-js-checkout-component",url:()=>this.endpoint+"/"+this.ident,autoResize:{width:!1,height:!1},dimensions:{width:e,height:n},prerenderTemplate:Ge,attributes:{iframe:{allow:"payment https://pay.tebex.io"}}})},tn=async function(e,r){const o=new URL(window.location.href);this.component||n(this,Xe,"m",nn).call(this),this.zoid=this.component({locale:this.locale,colors:this.colors,theme:this.theme,onOpenWindow:e=>{window.open(e)},onClosePopup:async()=>{await this.zoid.close(),this.lightbox&&await this.lightbox.hide(),this.isOpen=!1,this.emitter.emit("close")},onPaymentComplete:e=>{this.emitter.emit("payment:complete",e)},onPaymentError:e=>{this.emitter.emit("payment:error",e)},isApplePayAvailable:N()&&void 0!==window.ApplePaySession&&window.ApplePaySession.canMakePayments(),isEmbedded:!r,referrer:o.hostname,origin:o.origin,path:o.pathname,params:o.search,version:"1.4.0"}),await this.zoid.renderTo(window,e,r?"popup":"iframe"),t(this,Ke,!0,"f"),n(this,Qe,"f")&&n(this,Qe,"f").call(this)};const fn={OPEN:"open",CLOSE:"close",PAYMENT_COMPLETE:"payment:complete",PAYMENT_ERROR:"payment:error"};var dn,ln,hn,pn,wn,mn=Object.freeze({__proto__:null,events:fn});class vn extends HTMLElement{get ident(){return this.checkout.ident}set ident(e){z(this,"ident",e)}get open(){return this._open}set open(e){z(this,"open",e)}get height(){return this._height}set height(e){z(this,"height",e)}static get observedAttributes(){return["ident","open","height"]}constructor(){super(),dn.add(this),this.checkout=new cn,this._root=null,this._slot=null,this._shadow=null,this._mode="popover",this._height=700,this._open=!1,this._didInit=!1,this._didConnect=!1,hn.set(this,(()=>{if("inline"===this._mode&&this._slot.assignedElements().length>0&&((e="")=>{console.warn("Tebex.js warning"+(e?": ":"")+e.trim())})(" does not support child elements in inline mode"),"inline"===this._mode)return;let e=[];const n=()=>this.setAttribute("open",""),t=()=>{const t=this._slot.assignedElements();for(let t of e)t.removeEventListener("click",n);for(let e of t)e.addEventListener("click",n);e=t};t(),this._slot.addEventListener("slotchange",t)})),this._shadow=this.attachShadow({mode:"open"}),this._root=k("div"),this._slot=k("slot"),this._root.append(this._slot),this._shadow.append(this._root)}connectedCallback(){this._didConnect=!0;for(let e of sn)this.checkout.on(e,(n=>{this.dispatchEvent(new CustomEvent(e,{detail:n}))}));I(this,"ident")&&n(this,dn,"m",ln).call(this)}disconnectedCallback(){this.checkout.destroy(),this.checkout=new cn,this._didConnect=!1,this._open=!1,this._didInit=!1,this._didConnect=!1}attributeChangedCallback(e,t,r){if(t!==r)switch(e){case"ident":R(!this._didInit,"This checkout element already has an ident - to use a new ident, create a new element"),n(this,dn,"m",ln).call(this);break;case"open":this._open=!("false"!==t&&t||""!==r&&!r),n(this,dn,"m",pn).call(this);break;case"height":this._height=parseInt(r),n(this,dn,"m",wn).call(this)}}async renderFinished(){this.checkout&&await this.checkout.renderFinished()}}hn=new WeakMap,dn=new WeakSet,ln=async function(){if(this._didInit||!this._didConnect)return;this._didInit=!0;let e=[];this.hasAttribute("color-primary")&&e.push({name:"primary",color:I(this,"color-primary")}),this.hasAttribute("color-secondary")&&e.push({name:"secondary",color:I(this,"color-secondary")}),this.checkout.init({ident:I(this,"ident"),locale:I(this,"locale"),theme:I(this,"theme"),colors:e,popupOnMobile:null!==I(this,"popup-on-mobile"),endpoint:I(this,"endpoint")}),this._mode=this.hasAttribute("inline")?"inline":"popover","inline"===this._mode?await this.checkout.render(this._root,"100%",this._height,!1):"popover"===this._mode&&(this.checkout.on("close",(()=>this.removeAttribute("open"))),n(this,dn,"m",pn).call(this)),this.checkout.on("payment:complete",(()=>{if(this.hasAttribute("redirect-on-complete")){const e=this.getAttribute("redirect-on-complete");location.href=e}})),n(this,hn,"f").call(this)},pn=function(){"popover"===this._mode&&this._didConnect&&this._didInit&&(this._open&&!this.checkout.isOpen&&this.checkout.launch(),!this._open&&this.checkout.isOpen&&this.checkout.close())},wn=function(){if("inline"!==this._mode)return;const e=this.checkout.zoid;e&&e.resize({height:this._height})},N()&&customElements.define("tebex-checkout",vn);const yn="1.4.0",gn=new cn;var bn={version:yn,checkout:gn,...mn};return e.checkout=gn,e.default=bn,e.events=fn,e.version=yn,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); //# sourceMappingURL=tebex.min.js.map diff --git a/dist/tebex.min.js.map b/dist/tebex.min.js.map index 516dc1f..740df11 100644 --- a/dist/tebex.min.js.map +++ b/dist/tebex.min.js.map @@ -1 +1 @@ -{"version":3,"file":"tebex.min.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/rollup-plugin-node-globals/src/global.js","../node_modules/process-es6/browser.js","../src/utils/err.ts","../src/utils/is.ts","../src/utils/detect.ts","../src/utils/dom.ts","../src/utils/css.ts","../src/stubs/window.ts","../node_modules/buffer-es6/base64.js","../node_modules/buffer-es6/ieee754.js","../node_modules/buffer-es6/isArray.js","../node_modules/buffer-es6/index.js","../node_modules/zoid/dist/zoid.frame.js","../node_modules/zoid/dist/zoid.js","../node_modules/zoid/index.js","../node_modules/nanoevents/index.js","../src/lightbox.tsx","../src/spinner.tsx","../src/checkout.ts","../src/legacy/events.ts","../src/webComponents/TebexCheckout.ts","../src/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nexport default {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n};\n",null,null,null,null,null,null,"\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n return true;\n // rollup issues\n // try {\n // var arr = new Uint8Array(1)\n // arr.__proto__ = {\n // __proto__: Uint8Array.prototype,\n // foo: function () { return 42 }\n // }\n // return arr.foo() === 42 && // typed array instances can be augmented\n // typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n // arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n // } catch (e) {\n // return false\n // }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nexport function SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","!function(root, factory) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = factory() : \"function\" == typeof define && define.amd ? define(\"zoid\", [], factory) : \"object\" == typeof exports ? exports.zoid = factory() : root.zoid = factory();\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function(modules) {\n var installedModules = {};\n function __webpack_require__(moduleId) {\n if (installedModules[moduleId]) return installedModules[moduleId].exports;\n var module = installedModules[moduleId] = {\n i: moduleId,\n l: !1,\n exports: {}\n };\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n module.l = !0;\n return module.exports;\n }\n __webpack_require__.m = modules;\n __webpack_require__.c = installedModules;\n __webpack_require__.d = function(exports, name, getter) {\n __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {\n enumerable: !0,\n get: getter\n });\n };\n __webpack_require__.r = function(exports) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {\n value: \"Module\"\n });\n Object.defineProperty(exports, \"__esModule\", {\n value: !0\n });\n };\n __webpack_require__.t = function(value, mode) {\n 1 & mode && (value = __webpack_require__(value));\n if (8 & mode) return value;\n if (4 & mode && \"object\" == typeof value && value && value.__esModule) return value;\n var ns = Object.create(null);\n __webpack_require__.r(ns);\n Object.defineProperty(ns, \"default\", {\n enumerable: !0,\n value: value\n });\n if (2 & mode && \"string\" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {\n return value[key];\n }.bind(null, key));\n return ns;\n };\n __webpack_require__.n = function(module) {\n var getter = module && module.__esModule ? function() {\n return module.default;\n } : function() {\n return module;\n };\n __webpack_require__.d(getter, \"a\", getter);\n return getter;\n };\n __webpack_require__.o = function(object, property) {\n return {}.hasOwnProperty.call(object, property);\n };\n __webpack_require__.p = \"\";\n return __webpack_require__(__webpack_require__.s = 0);\n }([ function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_require__.r(__webpack_exports__);\n __webpack_require__.d(__webpack_exports__, \"PopupOpenError\", (function() {\n return dom_PopupOpenError;\n }));\n __webpack_require__.d(__webpack_exports__, \"create\", (function() {\n return component_create;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroy\", (function() {\n return component_destroy;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyComponents\", (function() {\n return destroyComponents;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyAll\", (function() {\n return destroyAll;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_TYPE\", (function() {\n return PROP_TYPE;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_SERIALIZATION\", (function() {\n return PROP_SERIALIZATION;\n }));\n __webpack_require__.d(__webpack_exports__, \"CONTEXT\", (function() {\n return CONTEXT;\n }));\n __webpack_require__.d(__webpack_exports__, \"EVENT\", (function() {\n return EVENT;\n }));\n function _setPrototypeOf(o, p) {\n return (_setPrototypeOf = Object.setPrototypeOf || function(o, p) {\n o.__proto__ = p;\n return o;\n })(o, p);\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _extends() {\n return (_extends = Object.assign || function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) ({}).hasOwnProperty.call(source, key) && (target[key] = source[key]);\n }\n return target;\n }).apply(this, arguments);\n }\n function utils_isPromise(item) {\n try {\n if (!item) return !1;\n if (\"undefined\" != typeof Promise && item instanceof Promise) return !0;\n if (\"undefined\" != typeof window && \"function\" == typeof window.Window && item instanceof window.Window) return !1;\n if (\"undefined\" != typeof window && \"function\" == typeof window.constructor && item instanceof window.constructor) return !1;\n var _toString = {}.toString;\n if (_toString) {\n var name = _toString.call(item);\n if (\"[object Window]\" === name || \"[object global]\" === name || \"[object DOMWindow]\" === name) return !1;\n }\n if (\"function\" == typeof item.then) return !0;\n } catch (err) {\n return !1;\n }\n return !1;\n }\n var dispatchedErrors = [];\n var possiblyUnhandledPromiseHandlers = [];\n var activeCount = 0;\n var flushPromise;\n function flushActive() {\n if (!activeCount && flushPromise) {\n var promise = flushPromise;\n flushPromise = null;\n promise.resolve();\n }\n }\n function startActive() {\n activeCount += 1;\n }\n function endActive() {\n activeCount -= 1;\n flushActive();\n }\n var promise_ZalgoPromise = function() {\n function ZalgoPromise(handler) {\n var _this = this;\n this.resolved = void 0;\n this.rejected = void 0;\n this.errorHandled = void 0;\n this.value = void 0;\n this.error = void 0;\n this.handlers = void 0;\n this.dispatching = void 0;\n this.stack = void 0;\n this.resolved = !1;\n this.rejected = !1;\n this.errorHandled = !1;\n this.handlers = [];\n if (handler) {\n var _result;\n var _error;\n var resolved = !1;\n var rejected = !1;\n var isAsync = !1;\n startActive();\n try {\n handler((function(res) {\n if (isAsync) _this.resolve(res); else {\n resolved = !0;\n _result = res;\n }\n }), (function(err) {\n if (isAsync) _this.reject(err); else {\n rejected = !0;\n _error = err;\n }\n }));\n } catch (err) {\n endActive();\n this.reject(err);\n return;\n }\n endActive();\n isAsync = !0;\n resolved ? this.resolve(_result) : rejected && this.reject(_error);\n }\n }\n var _proto = ZalgoPromise.prototype;\n _proto.resolve = function(result) {\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(result)) throw new Error(\"Can not resolve promise with another promise\");\n this.resolved = !0;\n this.value = result;\n this.dispatch();\n return this;\n };\n _proto.reject = function(error) {\n var _this2 = this;\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(error)) throw new Error(\"Can not reject promise with another promise\");\n if (!error) {\n var _err = error && \"function\" == typeof error.toString ? error.toString() : {}.toString.call(error);\n error = new Error(\"Expected reject to be called with Error, got \" + _err);\n }\n this.rejected = !0;\n this.error = error;\n this.errorHandled || setTimeout((function() {\n _this2.errorHandled || function(err, promise) {\n if (-1 === dispatchedErrors.indexOf(err)) {\n dispatchedErrors.push(err);\n setTimeout((function() {\n throw err;\n }), 1);\n for (var j = 0; j < possiblyUnhandledPromiseHandlers.length; j++) possiblyUnhandledPromiseHandlers[j](err, promise);\n }\n }(error, _this2);\n }), 1);\n this.dispatch();\n return this;\n };\n _proto.asyncReject = function(error) {\n this.errorHandled = !0;\n this.reject(error);\n return this;\n };\n _proto.dispatch = function() {\n var resolved = this.resolved, rejected = this.rejected, handlers = this.handlers;\n if (!this.dispatching && (resolved || rejected)) {\n this.dispatching = !0;\n startActive();\n var chain = function(firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n secondPromise.resolve(res);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < handlers.length; i++) {\n var _handlers$i = handlers[i], onSuccess = _handlers$i.onSuccess, onError = _handlers$i.onError, promise = _handlers$i.promise;\n var _result2 = void 0;\n if (resolved) try {\n _result2 = onSuccess ? onSuccess(this.value) : this.value;\n } catch (err) {\n promise.reject(err);\n continue;\n } else if (rejected) {\n if (!onError) {\n promise.reject(this.error);\n continue;\n }\n try {\n _result2 = onError(this.error);\n } catch (err) {\n promise.reject(err);\n continue;\n }\n }\n if (_result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected)) {\n var promiseResult = _result2;\n promiseResult.resolved ? promise.resolve(promiseResult.value) : promise.reject(promiseResult.error);\n promiseResult.errorHandled = !0;\n } else utils_isPromise(_result2) ? _result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected) ? _result2.resolved ? promise.resolve(_result2.value) : promise.reject(_result2.error) : chain(_result2, promise) : promise.resolve(_result2);\n }\n handlers.length = 0;\n this.dispatching = !1;\n endActive();\n }\n };\n _proto.then = function(onSuccess, onError) {\n if (onSuccess && \"function\" != typeof onSuccess && !onSuccess.call) throw new Error(\"Promise.then expected a function for success handler\");\n if (onError && \"function\" != typeof onError && !onError.call) throw new Error(\"Promise.then expected a function for error handler\");\n var promise = new ZalgoPromise;\n this.handlers.push({\n promise: promise,\n onSuccess: onSuccess,\n onError: onError\n });\n this.errorHandled = !0;\n this.dispatch();\n return promise;\n };\n _proto.catch = function(onError) {\n return this.then(void 0, onError);\n };\n _proto.finally = function(onFinally) {\n if (onFinally && \"function\" != typeof onFinally && !onFinally.call) throw new Error(\"Promise.finally expected a function\");\n return this.then((function(result) {\n return ZalgoPromise.try(onFinally).then((function() {\n return result;\n }));\n }), (function(err) {\n return ZalgoPromise.try(onFinally).then((function() {\n throw err;\n }));\n }));\n };\n _proto.timeout = function(time, err) {\n var _this3 = this;\n if (this.resolved || this.rejected) return this;\n var timeout = setTimeout((function() {\n _this3.resolved || _this3.rejected || _this3.reject(err || new Error(\"Promise timed out after \" + time + \"ms\"));\n }), time);\n return this.then((function(result) {\n clearTimeout(timeout);\n return result;\n }));\n };\n _proto.toPromise = function() {\n if (\"undefined\" == typeof Promise) throw new TypeError(\"Could not find Promise\");\n return Promise.resolve(this);\n };\n _proto.lazy = function() {\n this.errorHandled = !0;\n return this;\n };\n ZalgoPromise.resolve = function(value) {\n return value instanceof ZalgoPromise ? value : utils_isPromise(value) ? new ZalgoPromise((function(resolve, reject) {\n return value.then(resolve, reject);\n })) : (new ZalgoPromise).resolve(value);\n };\n ZalgoPromise.reject = function(error) {\n return (new ZalgoPromise).reject(error);\n };\n ZalgoPromise.asyncReject = function(error) {\n return (new ZalgoPromise).asyncReject(error);\n };\n ZalgoPromise.all = function(promises) {\n var promise = new ZalgoPromise;\n var count = promises.length;\n var results = [].slice();\n if (!count) {\n promise.resolve(results);\n return promise;\n }\n var chain = function(i, firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n results[i] = res;\n 0 == (count -= 1) && promise.resolve(results);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < promises.length; i++) {\n var prom = promises[i];\n if (prom instanceof ZalgoPromise) {\n if (prom.resolved) {\n results[i] = prom.value;\n count -= 1;\n continue;\n }\n } else if (!utils_isPromise(prom)) {\n results[i] = prom;\n count -= 1;\n continue;\n }\n chain(i, ZalgoPromise.resolve(prom), promise);\n }\n 0 === count && promise.resolve(results);\n return promise;\n };\n ZalgoPromise.hash = function(promises) {\n var result = {};\n var awaitPromises = [];\n var _loop = function(key) {\n if (promises.hasOwnProperty(key)) {\n var value = promises[key];\n utils_isPromise(value) ? awaitPromises.push(value.then((function(res) {\n result[key] = res;\n }))) : result[key] = value;\n }\n };\n for (var key in promises) _loop(key);\n return ZalgoPromise.all(awaitPromises).then((function() {\n return result;\n }));\n };\n ZalgoPromise.map = function(items, method) {\n return ZalgoPromise.all(items.map(method));\n };\n ZalgoPromise.onPossiblyUnhandledException = function(handler) {\n return function(handler) {\n possiblyUnhandledPromiseHandlers.push(handler);\n return {\n cancel: function() {\n possiblyUnhandledPromiseHandlers.splice(possiblyUnhandledPromiseHandlers.indexOf(handler), 1);\n }\n };\n }(handler);\n };\n ZalgoPromise.try = function(method, context, args) {\n if (method && \"function\" != typeof method && !method.call) throw new Error(\"Promise.try expected a function\");\n var result;\n startActive();\n try {\n result = method.apply(context, args || []);\n } catch (err) {\n endActive();\n return ZalgoPromise.reject(err);\n }\n endActive();\n return ZalgoPromise.resolve(result);\n };\n ZalgoPromise.delay = function(_delay) {\n return new ZalgoPromise((function(resolve) {\n setTimeout(resolve, _delay);\n }));\n };\n ZalgoPromise.isPromise = function(value) {\n return !!(value && value instanceof ZalgoPromise) || utils_isPromise(value);\n };\n ZalgoPromise.flush = function() {\n return function(Zalgo) {\n var promise = flushPromise = flushPromise || new Zalgo;\n flushActive();\n return promise;\n }(ZalgoPromise);\n };\n return ZalgoPromise;\n }();\n function isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n var WINDOW_TYPE = {\n IFRAME: \"iframe\",\n POPUP: \"popup\"\n };\n var IE_WIN_ACCESS_ERROR = \"Call was rejected by callee.\\r\\n\";\n function getActualProtocol(win) {\n void 0 === win && (win = window);\n return win.location.protocol;\n }\n function getProtocol(win) {\n void 0 === win && (win = window);\n if (win.mockDomain) {\n var protocol = win.mockDomain.split(\"//\")[0];\n if (protocol) return protocol;\n }\n return getActualProtocol(win);\n }\n function isAboutProtocol(win) {\n void 0 === win && (win = window);\n return \"about:\" === getProtocol(win);\n }\n function utils_getParent(win) {\n void 0 === win && (win = window);\n if (win) try {\n if (win.parent && win.parent !== win) return win.parent;\n } catch (err) {}\n }\n function getOpener(win) {\n void 0 === win && (win = window);\n if (win && !utils_getParent(win)) try {\n return win.opener;\n } catch (err) {}\n }\n function canReadFromWindow(win) {\n try {\n return !0;\n } catch (err) {}\n return !1;\n }\n function getActualDomain(win) {\n void 0 === win && (win = window);\n var location = win.location;\n if (!location) throw new Error(\"Can not read window location\");\n var protocol = getActualProtocol(win);\n if (!protocol) throw new Error(\"Can not read window protocol\");\n if (\"file:\" === protocol) return \"file://\";\n if (\"about:\" === protocol) {\n var parent = utils_getParent(win);\n return parent && canReadFromWindow() ? getActualDomain(parent) : \"about://\";\n }\n var host = location.host;\n if (!host) throw new Error(\"Can not read window host\");\n return protocol + \"//\" + host;\n }\n function getDomain(win) {\n void 0 === win && (win = window);\n var domain = getActualDomain(win);\n return domain && win.mockDomain && 0 === win.mockDomain.indexOf(\"mock:\") ? win.mockDomain : domain;\n }\n function isSameDomain(win) {\n if (!function(win) {\n try {\n if (win === window) return !0;\n } catch (err) {}\n try {\n var desc = Object.getOwnPropertyDescriptor(win, \"location\");\n if (desc && !1 === desc.enumerable) return !1;\n } catch (err) {}\n try {\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (function(win) {\n void 0 === win && (win = window);\n return \"mock:\" === getProtocol(win);\n }(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (getActualDomain(win) === getActualDomain(window)) return !0;\n } catch (err) {}\n return !1;\n }(win)) return !1;\n try {\n if (win === window) return !0;\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n if (getDomain(window) === getDomain(win)) return !0;\n } catch (err) {}\n return !1;\n }\n function assertSameDomain(win) {\n if (!isSameDomain(win)) throw new Error(\"Expected window to be same domain\");\n return win;\n }\n function isAncestorParent(parent, child) {\n if (!parent || !child) return !1;\n var childParent = utils_getParent(child);\n return childParent ? childParent === parent : -1 !== function(win) {\n var result = [];\n try {\n for (;win.parent !== win; ) {\n result.push(win.parent);\n win = win.parent;\n }\n } catch (err) {}\n return result;\n }(child).indexOf(parent);\n }\n function getFrames(win) {\n var result = [];\n var frames;\n try {\n frames = win.frames;\n } catch (err) {\n frames = win;\n }\n var len;\n try {\n len = frames.length;\n } catch (err) {}\n if (0 === len) return result;\n if (len) {\n for (var i = 0; i < len; i++) {\n var frame = void 0;\n try {\n frame = frames[i];\n } catch (err) {\n continue;\n }\n result.push(frame);\n }\n return result;\n }\n for (var _i = 0; _i < 100; _i++) {\n var _frame = void 0;\n try {\n _frame = frames[_i];\n } catch (err) {\n return result;\n }\n if (!_frame) return result;\n result.push(_frame);\n }\n return result;\n }\n function getAllChildFrames(win) {\n var result = [];\n for (var _i3 = 0, _getFrames2 = getFrames(win); _i3 < _getFrames2.length; _i3++) {\n var frame = _getFrames2[_i3];\n result.push(frame);\n for (var _i5 = 0, _getAllChildFrames2 = getAllChildFrames(frame); _i5 < _getAllChildFrames2.length; _i5++) result.push(_getAllChildFrames2[_i5]);\n }\n return result;\n }\n function getTop(win) {\n void 0 === win && (win = window);\n try {\n if (win.top) return win.top;\n } catch (err) {}\n if (utils_getParent(win) === win) return win;\n try {\n if (isAncestorParent(window, win) && window.top) return window.top;\n } catch (err) {}\n try {\n if (isAncestorParent(win, window) && window.top) return window.top;\n } catch (err) {}\n for (var _i7 = 0, _getAllChildFrames4 = getAllChildFrames(win); _i7 < _getAllChildFrames4.length; _i7++) {\n var frame = _getAllChildFrames4[_i7];\n try {\n if (frame.top) return frame.top;\n } catch (err) {}\n if (utils_getParent(frame) === frame) return frame;\n }\n }\n function getAllFramesInWindow(win) {\n var top = getTop(win);\n if (!top) throw new Error(\"Can not determine top window\");\n var result = [].concat(getAllChildFrames(top), [ top ]);\n -1 === result.indexOf(win) && (result = [].concat(result, [ win ], getAllChildFrames(win)));\n return result;\n }\n var iframeWindows = [];\n var iframeFrames = [];\n function isWindowClosed(win, allowMock) {\n void 0 === allowMock && (allowMock = !0);\n try {\n if (win === window) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (!win) return !0;\n } catch (err) {\n return !0;\n }\n try {\n if (win.closed) return !0;\n } catch (err) {\n return !err || err.message !== IE_WIN_ACCESS_ERROR;\n }\n if (allowMock && isSameDomain(win)) try {\n if (win.mockclosed) return !0;\n } catch (err) {}\n try {\n if (!win.parent || !win.top) return !0;\n } catch (err) {}\n var iframeIndex = function(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }(iframeWindows, win);\n if (-1 !== iframeIndex) {\n var frame = iframeFrames[iframeIndex];\n if (frame && function(frame) {\n if (!frame.contentWindow) return !0;\n if (!frame.parentNode) return !0;\n var doc = frame.ownerDocument;\n if (doc && doc.documentElement && !doc.documentElement.contains(frame)) {\n var parent = frame;\n for (;parent.parentNode && parent.parentNode !== parent; ) parent = parent.parentNode;\n if (!parent.host || !doc.documentElement.contains(parent.host)) return !0;\n }\n return !1;\n }(frame)) return !0;\n }\n return !1;\n }\n function getFrameByName(win, name) {\n var winFrames = getFrames(win);\n for (var _i9 = 0; _i9 < winFrames.length; _i9++) {\n var childFrame = winFrames[_i9];\n try {\n if (isSameDomain(childFrame) && childFrame.name === name && -1 !== winFrames.indexOf(childFrame)) return childFrame;\n } catch (err) {}\n }\n try {\n if (-1 !== winFrames.indexOf(win.frames[name])) return win.frames[name];\n } catch (err) {}\n try {\n if (-1 !== winFrames.indexOf(win[name])) return win[name];\n } catch (err) {}\n }\n function getAncestor(win) {\n void 0 === win && (win = window);\n return getOpener(win = win || window) || utils_getParent(win) || void 0;\n }\n function anyMatch(collection1, collection2) {\n for (var _i17 = 0; _i17 < collection1.length; _i17++) {\n var item1 = collection1[_i17];\n for (var _i19 = 0; _i19 < collection2.length; _i19++) if (item1 === collection2[_i19]) return !0;\n }\n return !1;\n }\n function getDistanceFromTop(win) {\n void 0 === win && (win = window);\n var distance = 0;\n var parent = win;\n for (;parent; ) (parent = utils_getParent(parent)) && (distance += 1);\n return distance;\n }\n function isSameTopWindow(win1, win2) {\n var top1 = getTop(win1) || win1;\n var top2 = getTop(win2) || win2;\n try {\n if (top1 && top2) return top1 === top2;\n } catch (err) {}\n var allFrames1 = getAllFramesInWindow(win1);\n var allFrames2 = getAllFramesInWindow(win2);\n if (anyMatch(allFrames1, allFrames2)) return !0;\n var opener1 = getOpener(top1);\n var opener2 = getOpener(top2);\n return opener1 && anyMatch(getAllFramesInWindow(opener1), allFrames2) || opener2 && anyMatch(getAllFramesInWindow(opener2), allFrames1), \n !1;\n }\n function matchDomain(pattern, origin) {\n if (\"string\" == typeof pattern) {\n if (\"string\" == typeof origin) return \"*\" === pattern || origin === pattern;\n if (isRegex(origin)) return !1;\n if (Array.isArray(origin)) return !1;\n }\n return isRegex(pattern) ? isRegex(origin) ? pattern.toString() === origin.toString() : !Array.isArray(origin) && Boolean(origin.match(pattern)) : !!Array.isArray(pattern) && (Array.isArray(origin) ? JSON.stringify(pattern) === JSON.stringify(origin) : !isRegex(origin) && pattern.some((function(subpattern) {\n return matchDomain(subpattern, origin);\n })));\n }\n function getDomainFromUrl(url) {\n return url.match(/^(https?|mock|file):\\/\\//) ? url.split(\"/\").slice(0, 3).join(\"/\") : getDomain();\n }\n function onCloseWindow(win, callback, delay, maxtime) {\n void 0 === delay && (delay = 1e3);\n void 0 === maxtime && (maxtime = 1 / 0);\n var timeout;\n !function check() {\n if (isWindowClosed(win)) {\n timeout && clearTimeout(timeout);\n return callback();\n }\n if (maxtime <= 0) clearTimeout(timeout); else {\n maxtime -= delay;\n timeout = setTimeout(check, delay);\n }\n }();\n return {\n cancel: function() {\n timeout && clearTimeout(timeout);\n }\n };\n }\n function isWindow(obj) {\n try {\n if (obj === window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (\"[object Window]\" === {}.toString.call(obj)) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (window.Window && obj instanceof window.Window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.self === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.parent === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.top === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && \"__unlikely_value__\" === obj.__cross_domain_utils_window_check__) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (\"postMessage\" in obj && \"self\" in obj && \"location\" in obj) return !0;\n } catch (err) {}\n return !1;\n }\n function getFrameForWindow(win) {\n if (isSameDomain(win)) return assertSameDomain(win).frameElement;\n for (var _i21 = 0, _document$querySelect2 = document.querySelectorAll(\"iframe\"); _i21 < _document$querySelect2.length; _i21++) {\n var frame = _document$querySelect2[_i21];\n if (frame && frame.contentWindow && frame.contentWindow === win) return frame;\n }\n }\n function closeWindow(win) {\n if (function(win) {\n void 0 === win && (win = window);\n return Boolean(utils_getParent(win));\n }(win)) {\n var frame = getFrameForWindow(win);\n if (frame && frame.parentElement) {\n frame.parentElement.removeChild(frame);\n return;\n }\n }\n try {\n win.close();\n } catch (err) {}\n }\n function util_safeIndexOf(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }\n var weakmap_CrossDomainSafeWeakMap = function() {\n function CrossDomainSafeWeakMap() {\n this.name = void 0;\n this.weakmap = void 0;\n this.keys = void 0;\n this.values = void 0;\n this.name = \"__weakmap_\" + (1e9 * Math.random() >>> 0) + \"__\";\n if (function() {\n if (\"undefined\" == typeof WeakMap) return !1;\n if (void 0 === Object.freeze) return !1;\n try {\n var testWeakMap = new WeakMap;\n var testKey = {};\n Object.freeze(testKey);\n testWeakMap.set(testKey, \"__testvalue__\");\n return \"__testvalue__\" === testWeakMap.get(testKey);\n } catch (err) {\n return !1;\n }\n }()) try {\n this.weakmap = new WeakMap;\n } catch (err) {}\n this.keys = [];\n this.values = [];\n }\n var _proto = CrossDomainSafeWeakMap.prototype;\n _proto._cleanupClosedWindows = function() {\n var weakmap = this.weakmap;\n var keys = this.keys;\n for (var i = 0; i < keys.length; i++) {\n var value = keys[i];\n if (isWindow(value) && isWindowClosed(value)) {\n if (weakmap) try {\n weakmap.delete(value);\n } catch (err) {}\n keys.splice(i, 1);\n this.values.splice(i, 1);\n i -= 1;\n }\n }\n };\n _proto.isSafeToReadWrite = function(key) {\n return !isWindow(key);\n };\n _proto.set = function(key, value) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.set(key, value);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var name = this.name;\n var entry = key[name];\n entry && entry[0] === key ? entry[1] = value : Object.defineProperty(key, name, {\n value: [ key, value ],\n writable: !0\n });\n return;\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var values = this.values;\n var index = util_safeIndexOf(keys, key);\n if (-1 === index) {\n keys.push(key);\n values.push(value);\n } else values[index] = value;\n };\n _proto.get = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return weakmap.get(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return entry && entry[0] === key ? entry[1] : void 0;\n } catch (err) {}\n this._cleanupClosedWindows();\n var index = util_safeIndexOf(this.keys, key);\n if (-1 !== index) return this.values[index];\n };\n _proto.delete = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.delete(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n entry && entry[0] === key && (entry[0] = entry[1] = void 0);\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var index = util_safeIndexOf(keys, key);\n if (-1 !== index) {\n keys.splice(index, 1);\n this.values.splice(index, 1);\n }\n };\n _proto.has = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return !0;\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return !(!entry || entry[0] !== key);\n } catch (err) {}\n this._cleanupClosedWindows();\n return -1 !== util_safeIndexOf(this.keys, key);\n };\n _proto.getOrSet = function(key, getter) {\n if (this.has(key)) return this.get(key);\n var value = getter();\n this.set(key, value);\n return value;\n };\n return CrossDomainSafeWeakMap;\n }();\n function _getPrototypeOf(o) {\n return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n })(o);\n }\n function _isNativeReflectConstruct() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));\n return !0;\n } catch (e) {\n return !1;\n }\n }\n function construct_construct(Parent, args, Class) {\n return (construct_construct = _isNativeReflectConstruct() ? Reflect.construct : function(Parent, args, Class) {\n var a = [ null ];\n a.push.apply(a, args);\n var instance = new (Function.bind.apply(Parent, a));\n Class && _setPrototypeOf(instance, Class.prototype);\n return instance;\n }).apply(null, arguments);\n }\n function wrapNativeSuper_wrapNativeSuper(Class) {\n var _cache = \"function\" == typeof Map ? new Map : void 0;\n return (wrapNativeSuper_wrapNativeSuper = function(Class) {\n if (null === Class || !(fn = Class, -1 !== Function.toString.call(fn).indexOf(\"[native code]\"))) return Class;\n var fn;\n if (\"function\" != typeof Class) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== _cache) {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct_construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n })(Class);\n }\n function getFunctionName(fn) {\n return fn.name || fn.__name__ || fn.displayName || \"anonymous\";\n }\n function setFunctionName(fn, name) {\n try {\n delete fn.name;\n fn.name = name;\n } catch (err) {}\n fn.__name__ = fn.displayName = name;\n return fn;\n }\n function base64encode(str) {\n if (\"function\" == typeof btoa) return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (function(m, p1) {\n return String.fromCharCode(parseInt(p1, 16));\n }))).replace(/[=]/g, \"\");\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"utf8\").toString(\"base64\").replace(/[=]/g, \"\");\n throw new Error(\"Can not find window.btoa or Buffer\");\n }\n function uniqueID() {\n var chars = \"0123456789abcdef\";\n return \"uid_\" + \"xxxxxxxxxx\".replace(/./g, (function() {\n return chars.charAt(Math.floor(Math.random() * chars.length));\n })) + \"_\" + base64encode((new Date).toISOString().slice(11, 19).replace(\"T\", \".\")).replace(/[^a-zA-Z0-9]/g, \"\").toLowerCase();\n }\n var objectIDs;\n function serializeArgs(args) {\n try {\n return JSON.stringify([].slice.call(args), (function(subkey, val) {\n return \"function\" == typeof val ? \"memoize[\" + function(obj) {\n objectIDs = objectIDs || new weakmap_CrossDomainSafeWeakMap;\n if (null == obj || \"object\" != typeof obj && \"function\" != typeof obj) throw new Error(\"Invalid object\");\n var uid = objectIDs.get(obj);\n if (!uid) {\n uid = typeof obj + \":\" + uniqueID();\n objectIDs.set(obj, uid);\n }\n return uid;\n }(val) + \"]\" : val;\n }));\n } catch (err) {\n throw new Error(\"Arguments not serializable -- can not be used to memoize\");\n }\n }\n function getEmptyObject() {\n return {};\n }\n var memoizeGlobalIndex = 0;\n var memoizeGlobalIndexValidFrom = 0;\n function memoize(method, options) {\n void 0 === options && (options = {});\n var _options$thisNamespac = options.thisNamespace, thisNamespace = void 0 !== _options$thisNamespac && _options$thisNamespac, cacheTime = options.time;\n var simpleCache;\n var thisCache;\n var memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n var memoizedFunction = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n if (memoizeIndex < memoizeGlobalIndexValidFrom) {\n simpleCache = null;\n thisCache = null;\n memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n }\n var cache;\n cache = thisNamespace ? (thisCache = thisCache || new weakmap_CrossDomainSafeWeakMap).getOrSet(this, getEmptyObject) : simpleCache = simpleCache || {};\n var cacheKey = serializeArgs(args);\n var cacheResult = cache[cacheKey];\n if (cacheResult && cacheTime && Date.now() - cacheResult.time < cacheTime) {\n delete cache[cacheKey];\n cacheResult = null;\n }\n if (cacheResult) return cacheResult.value;\n var time = Date.now();\n var value = method.apply(this, arguments);\n cache[cacheKey] = {\n time: time,\n value: value\n };\n return value;\n };\n memoizedFunction.reset = function() {\n simpleCache = null;\n thisCache = null;\n };\n return setFunctionName(memoizedFunction, (options.name || getFunctionName(method)) + \"::memoized\");\n }\n memoize.clear = function() {\n memoizeGlobalIndexValidFrom = memoizeGlobalIndex;\n };\n function memoizePromise(method) {\n var cache = {};\n function memoizedPromiseFunction() {\n var _arguments = arguments, _this = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n var key = serializeArgs(args);\n if (cache.hasOwnProperty(key)) return cache[key];\n cache[key] = promise_ZalgoPromise.try((function() {\n return method.apply(_this, _arguments);\n })).finally((function() {\n delete cache[key];\n }));\n return cache[key];\n }\n memoizedPromiseFunction.reset = function() {\n cache = {};\n };\n return setFunctionName(memoizedPromiseFunction, getFunctionName(method) + \"::promiseMemoized\");\n }\n function src_util_noop() {}\n function once(method) {\n var called = !1;\n return setFunctionName((function() {\n if (!called) {\n called = !0;\n return method.apply(this, arguments);\n }\n }), getFunctionName(method) + \"::once\");\n }\n function stringifyError(err, level) {\n void 0 === level && (level = 1);\n if (level >= 3) return \"stringifyError stack overflow\";\n try {\n if (!err) return \"\";\n if (\"string\" == typeof err) return err;\n if (err instanceof Error) {\n var stack = err && err.stack;\n var message = err && err.message;\n if (stack && message) return -1 !== stack.indexOf(message) ? stack : message + \"\\n\" + stack;\n if (stack) return stack;\n if (message) return message;\n }\n return err && err.toString && \"function\" == typeof err.toString ? err.toString() : {}.toString.call(err);\n } catch (newErr) {\n return \"Error while stringifying error: \" + stringifyError(newErr, level + 1);\n }\n }\n function stringify(item) {\n return \"string\" == typeof item ? item : item && item.toString && \"function\" == typeof item.toString ? item.toString() : {}.toString.call(item);\n }\n function extend(obj, source) {\n if (!source) return obj;\n if (Object.assign) return Object.assign(obj, source);\n for (var key in source) source.hasOwnProperty(key) && (obj[key] = source[key]);\n return obj;\n }\n memoize((function(obj) {\n if (Object.values) return Object.values(obj);\n var result = [];\n for (var key in obj) obj.hasOwnProperty(key) && result.push(obj[key]);\n return result;\n }));\n function identity(item) {\n return item;\n }\n function safeInterval(method, time) {\n var timeout;\n !function loop() {\n timeout = setTimeout((function() {\n method();\n loop();\n }), time);\n }();\n return {\n cancel: function() {\n clearTimeout(timeout);\n }\n };\n }\n function arrayFrom(item) {\n return [].slice.call(item);\n }\n function isDefined(value) {\n return null != value;\n }\n function util_isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n function util_getOrSet(obj, key, getter) {\n if (obj.hasOwnProperty(key)) return obj[key];\n var val = getter();\n obj[key] = val;\n return val;\n }\n function cleanup(obj) {\n var tasks = [];\n var cleaned = !1;\n var cleanErr;\n var cleaner = {\n set: function(name, item) {\n if (!cleaned) {\n obj[name] = item;\n cleaner.register((function() {\n delete obj[name];\n }));\n }\n return item;\n },\n register: function(method) {\n var task = once((function() {\n return method(cleanErr);\n }));\n cleaned ? method(cleanErr) : tasks.push(task);\n return {\n cancel: function() {\n var index = tasks.indexOf(task);\n -1 !== index && tasks.splice(index, 1);\n }\n };\n },\n all: function(err) {\n cleanErr = err;\n var results = [];\n cleaned = !0;\n for (;tasks.length; ) {\n var task = tasks.shift();\n results.push(task());\n }\n return promise_ZalgoPromise.all(results).then(src_util_noop);\n }\n };\n return cleaner;\n }\n function assertExists(name, thing) {\n if (null == thing) throw new Error(\"Expected \" + name + \" to be present\");\n return thing;\n }\n var util_ExtendableError = function(_Error) {\n _inheritsLoose(ExtendableError, _Error);\n function ExtendableError(message) {\n var _this6;\n (_this6 = _Error.call(this, message) || this).name = _this6.constructor.name;\n \"function\" == typeof Error.captureStackTrace ? Error.captureStackTrace(function(self) {\n if (void 0 === self) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return self;\n }(_this6), _this6.constructor) : _this6.stack = new Error(message).stack;\n return _this6;\n }\n return ExtendableError;\n }(wrapNativeSuper_wrapNativeSuper(Error));\n function getBody() {\n var body = document.body;\n if (!body) throw new Error(\"Body element not found\");\n return body;\n }\n function isDocumentReady() {\n return Boolean(document.body) && \"complete\" === document.readyState;\n }\n function isDocumentInteractive() {\n return Boolean(document.body) && \"interactive\" === document.readyState;\n }\n function urlEncode(str) {\n return encodeURIComponent(str);\n }\n memoize((function() {\n return new promise_ZalgoPromise((function(resolve) {\n if (isDocumentReady() || isDocumentInteractive()) return resolve();\n var interval = setInterval((function() {\n if (isDocumentReady() || isDocumentInteractive()) {\n clearInterval(interval);\n return resolve();\n }\n }), 10);\n }));\n }));\n function parseQuery(queryString) {\n return function(method, logic, args) {\n void 0 === args && (args = []);\n var cache = method.__inline_memoize_cache__ = method.__inline_memoize_cache__ || {};\n var key = serializeArgs(args);\n return cache.hasOwnProperty(key) ? cache[key] : cache[key] = function() {\n var params = {};\n if (!queryString) return params;\n if (-1 === queryString.indexOf(\"=\")) return params;\n for (var _i2 = 0, _queryString$split2 = queryString.split(\"&\"); _i2 < _queryString$split2.length; _i2++) {\n var pair = _queryString$split2[_i2];\n (pair = pair.split(\"=\"))[0] && pair[1] && (params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]));\n }\n return params;\n }.apply(void 0, args);\n }(parseQuery, 0, [ queryString ]);\n }\n function extendQuery(originalQuery, props) {\n void 0 === props && (props = {});\n return props && Object.keys(props).length ? function(obj) {\n void 0 === obj && (obj = {});\n return Object.keys(obj).filter((function(key) {\n return \"string\" == typeof obj[key] || \"boolean\" == typeof obj[key];\n })).map((function(key) {\n var val = obj[key];\n if (\"string\" != typeof val && \"boolean\" != typeof val) throw new TypeError(\"Invalid type for query\");\n return urlEncode(key) + \"=\" + urlEncode(val.toString());\n })).join(\"&\");\n }(_extends({}, parseQuery(originalQuery), props)) : originalQuery;\n }\n function appendChild(container, child) {\n container.appendChild(child);\n }\n function isElement(element) {\n return element instanceof window.Element || null !== element && \"object\" == typeof element && 1 === element.nodeType && \"object\" == typeof element.style && \"object\" == typeof element.ownerDocument;\n }\n function getElementSafe(id, doc) {\n void 0 === doc && (doc = document);\n return isElement(id) ? id : \"string\" == typeof id ? doc.querySelector(id) : void 0;\n }\n function elementReady(id) {\n return new promise_ZalgoPromise((function(resolve, reject) {\n var name = stringify(id);\n var el = getElementSafe(id);\n if (el) return resolve(el);\n if (isDocumentReady()) return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n var interval = setInterval((function() {\n if (el = getElementSafe(id)) {\n resolve(el);\n clearInterval(interval);\n } else if (isDocumentReady()) {\n clearInterval(interval);\n return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n }\n }), 10);\n }));\n }\n var dom_PopupOpenError = function(_ExtendableError) {\n _inheritsLoose(PopupOpenError, _ExtendableError);\n function PopupOpenError() {\n return _ExtendableError.apply(this, arguments) || this;\n }\n return PopupOpenError;\n }(util_ExtendableError);\n var awaitFrameLoadPromises;\n function awaitFrameLoad(frame) {\n if ((awaitFrameLoadPromises = awaitFrameLoadPromises || new weakmap_CrossDomainSafeWeakMap).has(frame)) {\n var _promise = awaitFrameLoadPromises.get(frame);\n if (_promise) return _promise;\n }\n var promise = new promise_ZalgoPromise((function(resolve, reject) {\n frame.addEventListener(\"load\", (function() {\n !function(frame) {\n !function() {\n for (var i = 0; i < iframeWindows.length; i++) {\n var closed = !1;\n try {\n closed = iframeWindows[i].closed;\n } catch (err) {}\n if (closed) {\n iframeFrames.splice(i, 1);\n iframeWindows.splice(i, 1);\n }\n }\n }();\n if (frame && frame.contentWindow) try {\n iframeWindows.push(frame.contentWindow);\n iframeFrames.push(frame);\n } catch (err) {}\n }(frame);\n resolve(frame);\n }));\n frame.addEventListener(\"error\", (function(err) {\n frame.contentWindow ? resolve(frame) : reject(err);\n }));\n }));\n awaitFrameLoadPromises.set(frame, promise);\n return promise;\n }\n function awaitFrameWindow(frame) {\n return awaitFrameLoad(frame).then((function(loadedFrame) {\n if (!loadedFrame.contentWindow) throw new Error(\"Could not find window in iframe\");\n return loadedFrame.contentWindow;\n }));\n }\n function dom_iframe(options, container) {\n void 0 === options && (options = {});\n var style = options.style || {};\n var frame = function(tag, options, container) {\n void 0 === tag && (tag = \"div\");\n void 0 === options && (options = {});\n tag = tag.toLowerCase();\n var element = document.createElement(tag);\n options.style && extend(element.style, options.style);\n options.class && (element.className = options.class.join(\" \"));\n options.id && element.setAttribute(\"id\", options.id);\n if (options.attributes) for (var _i10 = 0, _Object$keys2 = Object.keys(options.attributes); _i10 < _Object$keys2.length; _i10++) {\n var key = _Object$keys2[_i10];\n element.setAttribute(key, options.attributes[key]);\n }\n options.styleSheet && function(el, styleText, doc) {\n void 0 === doc && (doc = window.document);\n el.styleSheet ? el.styleSheet.cssText = styleText : el.appendChild(doc.createTextNode(styleText));\n }(element, options.styleSheet);\n if (options.html) {\n if (\"iframe\" === tag) throw new Error(\"Iframe html can not be written unless container provided and iframe in DOM\");\n element.innerHTML = options.html;\n }\n return element;\n }(\"iframe\", {\n attributes: _extends({\n allowTransparency: \"true\"\n }, options.attributes || {}),\n style: _extends({\n backgroundColor: \"transparent\",\n border: \"none\"\n }, style),\n html: options.html,\n class: options.class\n });\n var isIE = window.navigator.userAgent.match(/MSIE|Edge/i);\n frame.hasAttribute(\"id\") || frame.setAttribute(\"id\", uniqueID());\n awaitFrameLoad(frame);\n container && function(id, doc) {\n void 0 === doc && (doc = document);\n var element = getElementSafe(id, doc);\n if (element) return element;\n throw new Error(\"Can not find element: \" + stringify(id));\n }(container).appendChild(frame);\n (options.url || isIE) && frame.setAttribute(\"src\", options.url || \"about:blank\");\n return frame;\n }\n function addEventListener(obj, event, handler) {\n obj.addEventListener(event, handler);\n return {\n cancel: function() {\n obj.removeEventListener(event, handler);\n }\n };\n }\n function showElement(element) {\n element.style.setProperty(\"display\", \"\");\n }\n function hideElement(element) {\n element.style.setProperty(\"display\", \"none\", \"important\");\n }\n function destroyElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n function isElementClosed(el) {\n return !(el && el.parentNode && el.ownerDocument && el.ownerDocument.documentElement && el.ownerDocument.documentElement.contains(el));\n }\n function onResize(el, handler, _temp) {\n var _ref2 = void 0 === _temp ? {} : _temp, _ref2$width = _ref2.width, width = void 0 === _ref2$width || _ref2$width, _ref2$height = _ref2.height, height = void 0 === _ref2$height || _ref2$height, _ref2$interval = _ref2.interval, interval = void 0 === _ref2$interval ? 100 : _ref2$interval, _ref2$win = _ref2.win, win = void 0 === _ref2$win ? window : _ref2$win;\n var currentWidth = el.offsetWidth;\n var currentHeight = el.offsetHeight;\n var canceled = !1;\n handler({\n width: currentWidth,\n height: currentHeight\n });\n var check = function() {\n if (!canceled && function(el) {\n return Boolean(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n }(el)) {\n var newWidth = el.offsetWidth;\n var newHeight = el.offsetHeight;\n (width && newWidth !== currentWidth || height && newHeight !== currentHeight) && handler({\n width: newWidth,\n height: newHeight\n });\n currentWidth = newWidth;\n currentHeight = newHeight;\n }\n };\n var observer;\n var timeout;\n win.addEventListener(\"resize\", check);\n if (void 0 !== win.ResizeObserver) {\n (observer = new win.ResizeObserver(check)).observe(el);\n timeout = safeInterval(check, 10 * interval);\n } else if (void 0 !== win.MutationObserver) {\n (observer = new win.MutationObserver(check)).observe(el, {\n attributes: !0,\n childList: !0,\n subtree: !0,\n characterData: !1\n });\n timeout = safeInterval(check, 10 * interval);\n } else timeout = safeInterval(check, interval);\n return {\n cancel: function() {\n canceled = !0;\n observer.disconnect();\n window.removeEventListener(\"resize\", check);\n timeout.cancel();\n }\n };\n }\n function isShadowElement(element) {\n for (;element.parentNode; ) element = element.parentNode;\n return \"[object ShadowRoot]\" === element.toString();\n }\n var currentScript = \"undefined\" != typeof document ? document.currentScript : null;\n var getCurrentScript = memoize((function() {\n if (currentScript) return currentScript;\n if (currentScript = function() {\n try {\n var stack = function() {\n try {\n throw new Error(\"_\");\n } catch (err) {\n return err.stack || \"\";\n }\n }();\n var stackDetails = /.*at [^(]*\\((.*):(.+):(.+)\\)$/gi.exec(stack);\n var scriptLocation = stackDetails && stackDetails[1];\n if (!scriptLocation) return;\n for (var _i22 = 0, _Array$prototype$slic2 = [].slice.call(document.getElementsByTagName(\"script\")).reverse(); _i22 < _Array$prototype$slic2.length; _i22++) {\n var script = _Array$prototype$slic2[_i22];\n if (script.src && script.src === scriptLocation) return script;\n }\n } catch (err) {}\n }()) return currentScript;\n throw new Error(\"Can not determine current script\");\n }));\n var currentUID = uniqueID();\n memoize((function() {\n var script;\n try {\n script = getCurrentScript();\n } catch (err) {\n return currentUID;\n }\n var uid = script.getAttribute(\"data-uid\");\n if (uid && \"string\" == typeof uid) return uid;\n if ((uid = script.getAttribute(\"data-uid-auto\")) && \"string\" == typeof uid) return uid;\n if (script.src) {\n var hashedString = function(str) {\n var hash = \"\";\n for (var i = 0; i < str.length; i++) {\n var total = str[i].charCodeAt(0) * i;\n str[i + 1] && (total += str[i + 1].charCodeAt(0) * (i - 1));\n hash += String.fromCharCode(97 + Math.abs(total) % 26);\n }\n return hash;\n }(JSON.stringify({\n src: script.src,\n dataset: script.dataset\n }));\n uid = \"uid_\" + hashedString.slice(hashedString.length - 30);\n } else uid = uniqueID();\n script.setAttribute(\"data-uid-auto\", uid);\n return uid;\n }));\n function toPx(val) {\n return function(val) {\n if (\"number\" == typeof val) return val;\n var match = val.match(/^([0-9]+)(px|%)$/);\n if (!match) throw new Error(\"Could not match css value from \" + val);\n return parseInt(match[1], 10);\n }(val) + \"px\";\n }\n function toCSS(val) {\n return \"number\" == typeof val ? toPx(val) : \"string\" == typeof (str = val) && /^[0-9]+%$/.test(str) ? val : toPx(val);\n var str;\n }\n function global_getGlobal(win) {\n void 0 === win && (win = window);\n var globalKey = \"__post_robot_10_0_44__\";\n return win !== window ? win[globalKey] : win[globalKey] = win[globalKey] || {};\n }\n var getObj = function() {\n return {};\n };\n function globalStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return util_getOrSet(global_getGlobal(), key, (function() {\n var store = defStore();\n return {\n has: function(storeKey) {\n return store.hasOwnProperty(storeKey);\n },\n get: function(storeKey, defVal) {\n return store.hasOwnProperty(storeKey) ? store[storeKey] : defVal;\n },\n set: function(storeKey, val) {\n store[storeKey] = val;\n return val;\n },\n del: function(storeKey) {\n delete store[storeKey];\n },\n getOrSet: function(storeKey, getter) {\n return util_getOrSet(store, storeKey, getter);\n },\n reset: function() {\n store = defStore();\n },\n keys: function() {\n return Object.keys(store);\n }\n };\n }));\n }\n var WildCard = function() {};\n function getWildcard() {\n var global = global_getGlobal();\n global.WINDOW_WILDCARD = global.WINDOW_WILDCARD || new WildCard;\n return global.WINDOW_WILDCARD;\n }\n function windowStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return globalStore(\"windowStore\").getOrSet(key, (function() {\n var winStore = new weakmap_CrossDomainSafeWeakMap;\n var getStore = function(win) {\n return winStore.getOrSet(win, defStore);\n };\n return {\n has: function(win) {\n return getStore(win).hasOwnProperty(key);\n },\n get: function(win, defVal) {\n var store = getStore(win);\n return store.hasOwnProperty(key) ? store[key] : defVal;\n },\n set: function(win, val) {\n getStore(win)[key] = val;\n return val;\n },\n del: function(win) {\n delete getStore(win)[key];\n },\n getOrSet: function(win, getter) {\n return util_getOrSet(getStore(win), key, getter);\n }\n };\n }));\n }\n function getInstanceID() {\n return globalStore(\"instance\").getOrSet(\"instanceID\", uniqueID);\n }\n function resolveHelloPromise(win, _ref) {\n var domain = _ref.domain;\n var helloPromises = windowStore(\"helloPromises\");\n var existingPromise = helloPromises.get(win);\n existingPromise && existingPromise.resolve({\n domain: domain\n });\n var newPromise = promise_ZalgoPromise.resolve({\n domain: domain\n });\n helloPromises.set(win, newPromise);\n return newPromise;\n }\n function sayHello(win, _ref4) {\n return (0, _ref4.send)(win, \"postrobot_hello\", {\n instanceID: getInstanceID()\n }, {\n domain: \"*\",\n timeout: -1\n }).then((function(_ref5) {\n var origin = _ref5.origin, instanceID = _ref5.data.instanceID;\n resolveHelloPromise(win, {\n domain: origin\n });\n return {\n win: win,\n domain: origin,\n instanceID: instanceID\n };\n }));\n }\n function getWindowInstanceID(win, _ref6) {\n var send = _ref6.send;\n return windowStore(\"windowInstanceIDPromises\").getOrSet(win, (function() {\n return sayHello(win, {\n send: send\n }).then((function(_ref7) {\n return _ref7.instanceID;\n }));\n }));\n }\n function markWindowKnown(win) {\n windowStore(\"knownWindows\").set(win, !0);\n }\n function isSerializedType(item) {\n return \"object\" == typeof item && null !== item && \"string\" == typeof item.__type__;\n }\n function determineType(val) {\n return void 0 === val ? \"undefined\" : null === val ? \"null\" : Array.isArray(val) ? \"array\" : \"function\" == typeof val ? \"function\" : \"object\" == typeof val ? val instanceof Error ? \"error\" : \"function\" == typeof val.then ? \"promise\" : \"[object RegExp]\" === {}.toString.call(val) ? \"regex\" : \"[object Date]\" === {}.toString.call(val) ? \"date\" : \"object\" : \"string\" == typeof val ? \"string\" : \"number\" == typeof val ? \"number\" : \"boolean\" == typeof val ? \"boolean\" : void 0;\n }\n function serializeType(type, val) {\n return {\n __type__: type,\n __val__: val\n };\n }\n var _SERIALIZER;\n var SERIALIZER = ((_SERIALIZER = {}).function = function() {}, _SERIALIZER.error = function(_ref) {\n return serializeType(\"error\", {\n message: _ref.message,\n stack: _ref.stack,\n code: _ref.code,\n data: _ref.data\n });\n }, _SERIALIZER.promise = function() {}, _SERIALIZER.regex = function(val) {\n return serializeType(\"regex\", val.source);\n }, _SERIALIZER.date = function(val) {\n return serializeType(\"date\", val.toJSON());\n }, _SERIALIZER.array = function(val) {\n return val;\n }, _SERIALIZER.object = function(val) {\n return val;\n }, _SERIALIZER.string = function(val) {\n return val;\n }, _SERIALIZER.number = function(val) {\n return val;\n }, _SERIALIZER.boolean = function(val) {\n return val;\n }, _SERIALIZER.null = function(val) {\n return val;\n }, _SERIALIZER[void 0] = function(val) {\n return serializeType(\"undefined\", val);\n }, _SERIALIZER);\n var defaultSerializers = {};\n var _DESERIALIZER;\n var DESERIALIZER = ((_DESERIALIZER = {}).function = function() {\n throw new Error(\"Function serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.error = function(_ref2) {\n var stack = _ref2.stack, code = _ref2.code, data = _ref2.data;\n var error = new Error(_ref2.message);\n error.code = code;\n data && (error.data = data);\n error.stack = stack + \"\\n\\n\" + error.stack;\n return error;\n }, _DESERIALIZER.promise = function() {\n throw new Error(\"Promise serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.regex = function(val) {\n return new RegExp(val);\n }, _DESERIALIZER.date = function(val) {\n return new Date(val);\n }, _DESERIALIZER.array = function(val) {\n return val;\n }, _DESERIALIZER.object = function(val) {\n return val;\n }, _DESERIALIZER.string = function(val) {\n return val;\n }, _DESERIALIZER.number = function(val) {\n return val;\n }, _DESERIALIZER.boolean = function(val) {\n return val;\n }, _DESERIALIZER.null = function(val) {\n return val;\n }, _DESERIALIZER[void 0] = function() {}, _DESERIALIZER);\n var defaultDeserializers = {};\n new promise_ZalgoPromise((function(resolve) {\n if (window.document && window.document.body) return resolve(window.document.body);\n var interval = setInterval((function() {\n if (window.document && window.document.body) {\n clearInterval(interval);\n return resolve(window.document.body);\n }\n }), 10);\n }));\n function cleanupProxyWindows() {\n var idToProxyWindow = globalStore(\"idToProxyWindow\");\n for (var _i2 = 0, _idToProxyWindow$keys2 = idToProxyWindow.keys(); _i2 < _idToProxyWindow$keys2.length; _i2++) {\n var id = _idToProxyWindow$keys2[_i2];\n idToProxyWindow.get(id).shouldClean() && idToProxyWindow.del(id);\n }\n }\n function getSerializedWindow(winPromise, _ref) {\n var send = _ref.send, _ref$id = _ref.id, id = void 0 === _ref$id ? uniqueID() : _ref$id;\n var windowNamePromise = winPromise.then((function(win) {\n if (isSameDomain(win)) return assertSameDomain(win).name;\n }));\n var windowTypePromise = winPromise.then((function(window) {\n if (isWindowClosed(window)) throw new Error(\"Window is closed, can not determine type\");\n return getOpener(window) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;\n }));\n windowNamePromise.catch(src_util_noop);\n windowTypePromise.catch(src_util_noop);\n var getName = function() {\n return winPromise.then((function(win) {\n if (!isWindowClosed(win)) return isSameDomain(win) ? assertSameDomain(win).name : windowNamePromise;\n }));\n };\n return {\n id: id,\n getType: function() {\n return windowTypePromise;\n },\n getInstanceID: memoizePromise((function() {\n return winPromise.then((function(win) {\n return getWindowInstanceID(win, {\n send: send\n });\n }));\n })),\n close: function() {\n return winPromise.then(closeWindow);\n },\n getName: getName,\n focus: function() {\n return winPromise.then((function(win) {\n win.focus();\n }));\n },\n isClosed: function() {\n return winPromise.then((function(win) {\n return isWindowClosed(win);\n }));\n },\n setLocation: function(href, opts) {\n void 0 === opts && (opts = {});\n return winPromise.then((function(win) {\n var domain = window.location.protocol + \"//\" + window.location.host;\n var _opts$method = opts.method, method = void 0 === _opts$method ? \"get\" : _opts$method, body = opts.body;\n if (0 === href.indexOf(\"/\")) href = \"\" + domain + href; else if (!href.match(/^https?:\\/\\//) && 0 !== href.indexOf(domain)) throw new Error(\"Expected url to be http or https url, or absolute path, got \" + JSON.stringify(href));\n if (\"post\" === method) return getName().then((function(name) {\n if (!name) throw new Error(\"Can not post to window without target name\");\n !function(_ref3) {\n var url = _ref3.url, target = _ref3.target, body = _ref3.body, _ref3$method = _ref3.method, method = void 0 === _ref3$method ? \"post\" : _ref3$method;\n var form = document.createElement(\"form\");\n form.setAttribute(\"target\", target);\n form.setAttribute(\"method\", method);\n form.setAttribute(\"action\", url);\n form.style.display = \"none\";\n if (body) for (var _i24 = 0, _Object$keys4 = Object.keys(body); _i24 < _Object$keys4.length; _i24++) {\n var _body$key;\n var key = _Object$keys4[_i24];\n var input = document.createElement(\"input\");\n input.setAttribute(\"name\", key);\n input.setAttribute(\"value\", null == (_body$key = body[key]) ? void 0 : _body$key.toString());\n form.appendChild(input);\n }\n getBody().appendChild(form);\n form.submit();\n getBody().removeChild(form);\n }({\n url: href,\n target: name,\n method: method,\n body: body\n });\n }));\n if (\"get\" !== method) throw new Error(\"Unsupported method: \" + method);\n if (isSameDomain(win)) try {\n if (win.location && \"function\" == typeof win.location.replace) {\n win.location.replace(href);\n return;\n }\n } catch (err) {}\n win.location = href;\n }));\n },\n setName: function(name) {\n return winPromise.then((function(win) {\n var sameDomain = isSameDomain(win);\n var frame = getFrameForWindow(win);\n if (!sameDomain) throw new Error(\"Can not set name for cross-domain window: \" + name);\n assertSameDomain(win).name = name;\n frame && frame.setAttribute(\"name\", name);\n windowNamePromise = promise_ZalgoPromise.resolve(name);\n }));\n }\n };\n }\n var window_ProxyWindow = function() {\n function ProxyWindow(_ref2) {\n var send = _ref2.send, win = _ref2.win, serializedWindow = _ref2.serializedWindow;\n this.id = void 0;\n this.isProxyWindow = !0;\n this.serializedWindow = void 0;\n this.actualWindow = void 0;\n this.actualWindowPromise = void 0;\n this.send = void 0;\n this.name = void 0;\n this.actualWindowPromise = new promise_ZalgoPromise;\n this.serializedWindow = serializedWindow || getSerializedWindow(this.actualWindowPromise, {\n send: send\n });\n globalStore(\"idToProxyWindow\").set(this.getID(), this);\n win && this.setWindow(win, {\n send: send\n });\n }\n var _proto = ProxyWindow.prototype;\n _proto.getID = function() {\n return this.serializedWindow.id;\n };\n _proto.getType = function() {\n return this.serializedWindow.getType();\n };\n _proto.isPopup = function() {\n return this.getType().then((function(type) {\n return type === WINDOW_TYPE.POPUP;\n }));\n };\n _proto.setLocation = function(href, opts) {\n var _this = this;\n return this.serializedWindow.setLocation(href, opts).then((function() {\n return _this;\n }));\n };\n _proto.getName = function() {\n return this.serializedWindow.getName();\n };\n _proto.setName = function(name) {\n var _this2 = this;\n return this.serializedWindow.setName(name).then((function() {\n return _this2;\n }));\n };\n _proto.close = function() {\n var _this3 = this;\n return this.serializedWindow.close().then((function() {\n return _this3;\n }));\n };\n _proto.focus = function() {\n var _this4 = this;\n var isPopupPromise = this.isPopup();\n var getNamePromise = this.getName();\n var reopenPromise = promise_ZalgoPromise.hash({\n isPopup: isPopupPromise,\n name: getNamePromise\n }).then((function(_ref3) {\n var name = _ref3.name;\n _ref3.isPopup && name && window.open(\"\", name);\n }));\n var focusPromise = this.serializedWindow.focus();\n return promise_ZalgoPromise.all([ reopenPromise, focusPromise ]).then((function() {\n return _this4;\n }));\n };\n _proto.isClosed = function() {\n return this.serializedWindow.isClosed();\n };\n _proto.getWindow = function() {\n return this.actualWindow;\n };\n _proto.setWindow = function(win, _ref4) {\n var send = _ref4.send;\n this.actualWindow = win;\n this.actualWindowPromise.resolve(this.actualWindow);\n this.serializedWindow = getSerializedWindow(this.actualWindowPromise, {\n send: send,\n id: this.getID()\n });\n windowStore(\"winToProxyWindow\").set(win, this);\n };\n _proto.awaitWindow = function() {\n return this.actualWindowPromise;\n };\n _proto.matchWindow = function(win, _ref5) {\n var _this5 = this;\n var send = _ref5.send;\n return promise_ZalgoPromise.try((function() {\n return _this5.actualWindow ? win === _this5.actualWindow : promise_ZalgoPromise.hash({\n proxyInstanceID: _this5.getInstanceID(),\n knownWindowInstanceID: getWindowInstanceID(win, {\n send: send\n })\n }).then((function(_ref6) {\n var match = _ref6.proxyInstanceID === _ref6.knownWindowInstanceID;\n match && _this5.setWindow(win, {\n send: send\n });\n return match;\n }));\n }));\n };\n _proto.unwrap = function() {\n return this.actualWindow || this;\n };\n _proto.getInstanceID = function() {\n return this.serializedWindow.getInstanceID();\n };\n _proto.shouldClean = function() {\n return Boolean(this.actualWindow && isWindowClosed(this.actualWindow));\n };\n _proto.serialize = function() {\n return this.serializedWindow;\n };\n ProxyWindow.unwrap = function(win) {\n return ProxyWindow.isProxyWindow(win) ? win.unwrap() : win;\n };\n ProxyWindow.serialize = function(win, _ref7) {\n var send = _ref7.send;\n cleanupProxyWindows();\n return ProxyWindow.toProxyWindow(win, {\n send: send\n }).serialize();\n };\n ProxyWindow.deserialize = function(serializedWindow, _ref8) {\n var send = _ref8.send;\n cleanupProxyWindows();\n return globalStore(\"idToProxyWindow\").get(serializedWindow.id) || new ProxyWindow({\n serializedWindow: serializedWindow,\n send: send\n });\n };\n ProxyWindow.isProxyWindow = function(obj) {\n return Boolean(obj && !isWindow(obj) && obj.isProxyWindow);\n };\n ProxyWindow.toProxyWindow = function(win, _ref9) {\n var send = _ref9.send;\n cleanupProxyWindows();\n if (ProxyWindow.isProxyWindow(win)) return win;\n var actualWindow = win;\n return windowStore(\"winToProxyWindow\").get(actualWindow) || new ProxyWindow({\n win: actualWindow,\n send: send\n });\n };\n return ProxyWindow;\n }();\n function addMethod(id, val, name, source, domain) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n if (window_ProxyWindow.isProxyWindow(source)) proxyWindowMethods.set(id, {\n val: val,\n name: name,\n domain: domain,\n source: source\n }); else {\n proxyWindowMethods.del(id);\n methodStore.getOrSet(source, (function() {\n return {};\n }))[id] = {\n domain: domain,\n name: name,\n val: val,\n source: source\n };\n }\n }\n function lookupMethod(source, id) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n return methodStore.getOrSet(source, (function() {\n return {};\n }))[id] || proxyWindowMethods.get(id);\n }\n function function_serializeFunction(destination, domain, val, key, _ref3) {\n on = (_ref = {\n on: _ref3.on,\n send: _ref3.send\n }).on, send = _ref.send, globalStore(\"builtinListeners\").getOrSet(\"functionCalls\", (function() {\n return on(\"postrobot_method\", {\n domain: \"*\"\n }, (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var id = data.id, name = data.name;\n var meth = lookupMethod(source, id);\n if (!meth) throw new Error(\"Could not find method '\" + name + \"' with id: \" + data.id + \" in \" + getDomain(window));\n var methodSource = meth.source, domain = meth.domain, val = meth.val;\n return promise_ZalgoPromise.try((function() {\n if (!matchDomain(domain, origin)) throw new Error(\"Method '\" + data.name + \"' domain \" + JSON.stringify(util_isRegex(meth.domain) ? meth.domain.source : meth.domain) + \" does not match origin \" + origin + \" in \" + getDomain(window));\n if (window_ProxyWindow.isProxyWindow(methodSource)) return methodSource.matchWindow(source, {\n send: send\n }).then((function(match) {\n if (!match) throw new Error(\"Method call '\" + data.name + \"' failed - proxy window does not match source in \" + getDomain(window));\n }));\n })).then((function() {\n return val.apply({\n source: source,\n origin: origin\n }, data.args);\n }), (function(err) {\n return promise_ZalgoPromise.try((function() {\n if (val.onError) return val.onError(err);\n })).then((function() {\n err.stack && (err.stack = \"Remote call to \" + name + \"(\" + function(args) {\n void 0 === args && (args = []);\n return arrayFrom(args).map((function(arg) {\n return \"string\" == typeof arg ? \"'\" + arg + \"'\" : void 0 === arg ? \"undefined\" : null === arg ? \"null\" : \"boolean\" == typeof arg ? arg.toString() : Array.isArray(arg) ? \"[ ... ]\" : \"object\" == typeof arg ? \"{ ... }\" : \"function\" == typeof arg ? \"() => { ... }\" : \"<\" + typeof arg + \">\";\n })).join(\", \");\n }(data.args) + \") failed\\n\\n\" + err.stack);\n throw err;\n }));\n })).then((function(result) {\n return {\n result: result,\n id: id,\n name: name\n };\n }));\n }));\n }));\n var _ref, on, send;\n var id = val.__id__ || uniqueID();\n destination = window_ProxyWindow.unwrap(destination);\n var name = val.__name__ || val.name || key;\n \"string\" == typeof name && \"function\" == typeof name.indexOf && 0 === name.indexOf(\"anonymous::\") && (name = name.replace(\"anonymous::\", key + \"::\"));\n if (window_ProxyWindow.isProxyWindow(destination)) {\n addMethod(id, val, name, destination, domain);\n destination.awaitWindow().then((function(win) {\n addMethod(id, val, name, win, domain);\n }));\n } else addMethod(id, val, name, destination, domain);\n return serializeType(\"cross_domain_function\", {\n id: id,\n name: name\n });\n }\n function serializeMessage(destination, domain, obj, _ref) {\n var _serialize;\n var on = _ref.on, send = _ref.send;\n return function(obj, serializers) {\n void 0 === serializers && (serializers = defaultSerializers);\n var result = JSON.stringify(obj, (function(key) {\n var val = this[key];\n if (isSerializedType(this)) return val;\n var type = determineType(val);\n if (!type) return val;\n var serializer = serializers[type] || SERIALIZER[type];\n return serializer ? serializer(val, key) : val;\n }));\n return void 0 === result ? \"undefined\" : result;\n }(obj, ((_serialize = {}).promise = function(val, key) {\n return function(destination, domain, val, key, _ref) {\n return serializeType(\"cross_domain_zalgo_promise\", {\n then: function_serializeFunction(destination, domain, (function(resolve, reject) {\n return val.then(resolve, reject);\n }), key, {\n on: _ref.on,\n send: _ref.send\n })\n });\n }(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.function = function(val, key) {\n return function_serializeFunction(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.object = function(val) {\n return isWindow(val) || window_ProxyWindow.isProxyWindow(val) ? serializeType(\"cross_domain_window\", window_ProxyWindow.serialize(val, {\n send: send\n })) : val;\n }, _serialize));\n }\n function deserializeMessage(source, origin, message, _ref2) {\n var _deserialize;\n var send = _ref2.send;\n return function(str, deserializers) {\n void 0 === deserializers && (deserializers = defaultDeserializers);\n if (\"undefined\" !== str) return JSON.parse(str, (function(key, val) {\n if (isSerializedType(this)) return val;\n var type;\n var value;\n if (isSerializedType(val)) {\n type = val.__type__;\n value = val.__val__;\n } else {\n type = determineType(val);\n value = val;\n }\n if (!type) return value;\n var deserializer = deserializers[type] || DESERIALIZER[type];\n return deserializer ? deserializer(value, key) : value;\n }));\n }(message, ((_deserialize = {}).cross_domain_zalgo_promise = function(serializedPromise) {\n return function(source, origin, _ref2) {\n return new promise_ZalgoPromise(_ref2.then);\n }(0, 0, serializedPromise);\n }, _deserialize.cross_domain_function = function(serializedFunction) {\n return function(source, origin, _ref4, _ref5) {\n var id = _ref4.id, name = _ref4.name;\n var send = _ref5.send;\n var getDeserializedFunction = function(opts) {\n void 0 === opts && (opts = {});\n function crossDomainFunctionWrapper() {\n var _arguments = arguments;\n return window_ProxyWindow.toProxyWindow(source, {\n send: send\n }).awaitWindow().then((function(win) {\n var meth = lookupMethod(win, id);\n if (meth && meth.val !== crossDomainFunctionWrapper) return meth.val.apply({\n source: window,\n origin: getDomain()\n }, _arguments);\n var _args = [].slice.call(_arguments);\n return opts.fireAndForget ? send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !0\n }) : send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !1\n }).then((function(res) {\n return res.data.result;\n }));\n })).catch((function(err) {\n throw err;\n }));\n }\n crossDomainFunctionWrapper.__name__ = name;\n crossDomainFunctionWrapper.__origin__ = origin;\n crossDomainFunctionWrapper.__source__ = source;\n crossDomainFunctionWrapper.__id__ = id;\n crossDomainFunctionWrapper.origin = origin;\n return crossDomainFunctionWrapper;\n };\n var crossDomainFunctionWrapper = getDeserializedFunction();\n crossDomainFunctionWrapper.fireAndForget = getDeserializedFunction({\n fireAndForget: !0\n });\n return crossDomainFunctionWrapper;\n }(source, origin, serializedFunction, {\n send: send\n });\n }, _deserialize.cross_domain_window = function(serializedWindow) {\n return window_ProxyWindow.deserialize(serializedWindow, {\n send: send\n });\n }, _deserialize));\n }\n var SEND_MESSAGE_STRATEGIES = {};\n SEND_MESSAGE_STRATEGIES.postrobot_post_message = function(win, serializedMessage, domain) {\n 0 === domain.indexOf(\"file:\") && (domain = \"*\");\n win.postMessage(serializedMessage, domain);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_global = function(win, serializedMessage) {\n if (!function(win) {\n return (win = win || window).navigator.mockUserAgent || win.navigator.userAgent;\n }(window).match(/MSIE|rv:11|trident|edge\\/12|edge\\/13/i)) throw new Error(\"Global messaging not needed for browser\");\n if (!isSameDomain(win)) throw new Error(\"Post message through global disabled between different domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use global to communicate between two different windows, not between frames\");\n var foreignGlobal = global_getGlobal(win);\n if (!foreignGlobal) throw new Error(\"Can not find postRobot global on foreign window\");\n foreignGlobal.receiveMessage({\n source: window,\n origin: getDomain(),\n data: serializedMessage\n });\n };\n function send_sendMessage(win, domain, message, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n return promise_ZalgoPromise.try((function() {\n var domainBuffer = windowStore().getOrSet(win, (function() {\n return {};\n }));\n domainBuffer.buffer = domainBuffer.buffer || [];\n domainBuffer.buffer.push(message);\n domainBuffer.flush = domainBuffer.flush || promise_ZalgoPromise.flush().then((function() {\n if (isWindowClosed(win)) throw new Error(\"Window is closed\");\n var serializedMessage = serializeMessage(win, domain, ((_ref = {}).__post_robot_10_0_44__ = domainBuffer.buffer || [], \n _ref), {\n on: on,\n send: send\n });\n var _ref;\n delete domainBuffer.buffer;\n var strategies = Object.keys(SEND_MESSAGE_STRATEGIES);\n var errors = [];\n for (var _i2 = 0; _i2 < strategies.length; _i2++) {\n var strategyName = strategies[_i2];\n try {\n SEND_MESSAGE_STRATEGIES[strategyName](win, serializedMessage, domain);\n } catch (err) {\n errors.push(err);\n }\n }\n if (errors.length === strategies.length) throw new Error(\"All post-robot messaging strategies failed:\\n\\n\" + errors.map((function(err, i) {\n return i + \". \" + stringifyError(err);\n })).join(\"\\n\\n\"));\n }));\n return domainBuffer.flush.then((function() {\n delete domainBuffer.flush;\n }));\n })).then(src_util_noop);\n }\n function getResponseListener(hash) {\n return globalStore(\"responseListeners\").get(hash);\n }\n function deleteResponseListener(hash) {\n globalStore(\"responseListeners\").del(hash);\n }\n function isResponseListenerErrored(hash) {\n return globalStore(\"erroredResponseListeners\").has(hash);\n }\n function getRequestListener(_ref) {\n var name = _ref.name, win = _ref.win, domain = _ref.domain;\n var requestListeners = windowStore(\"requestListeners\");\n \"*\" === win && (win = null);\n \"*\" === domain && (domain = null);\n if (!name) throw new Error(\"Name required to get request listener\");\n for (var _i4 = 0, _ref3 = [ win, getWildcard() ]; _i4 < _ref3.length; _i4++) {\n var winQualifier = _ref3[_i4];\n if (winQualifier) {\n var nameListeners = requestListeners.get(winQualifier);\n if (nameListeners) {\n var domainListeners = nameListeners[name];\n if (domainListeners) {\n if (domain && \"string\" == typeof domain) {\n if (domainListeners[domain]) return domainListeners[domain];\n if (domainListeners.__domain_regex__) for (var _i6 = 0, _domainListeners$__DO2 = domainListeners.__domain_regex__; _i6 < _domainListeners$__DO2.length; _i6++) {\n var _domainListeners$__DO3 = _domainListeners$__DO2[_i6], listener = _domainListeners$__DO3.listener;\n if (matchDomain(_domainListeners$__DO3.regex, domain)) return listener;\n }\n }\n if (domainListeners[\"*\"]) return domainListeners[\"*\"];\n }\n }\n }\n }\n }\n function handleRequest(source, origin, message, _ref) {\n var on = _ref.on, send = _ref.send;\n var options = getRequestListener({\n name: message.name,\n win: source,\n domain: origin\n });\n var logName = \"postrobot_method\" === message.name && message.data && \"string\" == typeof message.data.name ? message.data.name + \"()\" : message.name;\n function sendResponse(ack, data, error) {\n return promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_response\",\n hash: message.hash,\n name: message.name,\n ack: ack,\n data: data,\n error: error\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send response message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n }));\n }\n return promise_ZalgoPromise.all([ promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_ack\",\n hash: message.hash,\n name: message.name\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send ack message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n })), promise_ZalgoPromise.try((function() {\n if (!options) throw new Error(\"No handler found for post message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Request origin \" + origin + \" does not match domain \" + options.domain.toString());\n return options.handler({\n source: source,\n origin: origin,\n data: message.data\n });\n })).then((function(data) {\n return sendResponse(\"success\", data);\n }), (function(error) {\n return sendResponse(\"error\", null, error);\n })) ]).then(src_util_noop).catch((function(err) {\n if (options && options.handleError) return options.handleError(err);\n throw err;\n }));\n }\n function handleAck(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message ack for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n try {\n if (!matchDomain(options.domain, origin)) throw new Error(\"Ack origin \" + origin + \" does not match domain \" + options.domain.toString());\n if (source !== options.win) throw new Error(\"Ack source does not match registered window\");\n } catch (err) {\n options.promise.reject(err);\n }\n options.ack = !0;\n }\n }\n function handleResponse(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message response for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Response origin \" + origin + \" does not match domain \" + (pattern = options.domain, \n Array.isArray(pattern) ? \"(\" + pattern.join(\" | \") + \")\" : isRegex(pattern) ? \"RegExp(\" + pattern.toString() + \")\" : pattern.toString()));\n var pattern;\n if (source !== options.win) throw new Error(\"Response source does not match registered window\");\n deleteResponseListener(message.hash);\n \"error\" === message.ack ? options.promise.reject(message.error) : \"success\" === message.ack && options.promise.resolve({\n source: source,\n origin: origin,\n data: message.data\n });\n }\n }\n function receive_receiveMessage(event, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n var receivedMessages = globalStore(\"receivedMessages\");\n try {\n if (!window || window.closed || !event.source) return;\n } catch (err) {\n return;\n }\n var source = event.source, origin = event.origin;\n var messages = function(message, source, origin, _ref) {\n var on = _ref.on, send = _ref.send;\n var parsedMessage;\n try {\n parsedMessage = deserializeMessage(source, origin, message, {\n on: on,\n send: send\n });\n } catch (err) {\n return;\n }\n if (parsedMessage && \"object\" == typeof parsedMessage && null !== parsedMessage) {\n var parseMessages = parsedMessage.__post_robot_10_0_44__;\n if (Array.isArray(parseMessages)) return parseMessages;\n }\n }(event.data, source, origin, {\n on: on,\n send: send\n });\n if (messages) {\n markWindowKnown(source);\n for (var _i2 = 0; _i2 < messages.length; _i2++) {\n var message = messages[_i2];\n if (receivedMessages.has(message.id)) return;\n receivedMessages.set(message.id, !0);\n if (isWindowClosed(source) && !message.fireAndForget) return;\n 0 === message.origin.indexOf(\"file:\") && (origin = \"file://\");\n try {\n \"postrobot_message_request\" === message.type ? handleRequest(source, origin, message, {\n on: on,\n send: send\n }) : \"postrobot_message_response\" === message.type ? handleResponse(source, origin, message) : \"postrobot_message_ack\" === message.type && handleAck(source, origin, message);\n } catch (err) {\n setTimeout((function() {\n throw err;\n }), 0);\n }\n }\n }\n }\n function on_on(name, options, handler) {\n if (!name) throw new Error(\"Expected name\");\n if (\"function\" == typeof (options = options || {})) {\n handler = options;\n options = {};\n }\n if (!handler) throw new Error(\"Expected handler\");\n (options = options || {}).name = name;\n options.handler = handler || options.handler;\n var win = options.window;\n var domain = options.domain;\n var requestListener = function addRequestListener(_ref4, listener) {\n var name = _ref4.name, win = _ref4.win, domain = _ref4.domain;\n var requestListeners = windowStore(\"requestListeners\");\n if (!name || \"string\" != typeof name) throw new Error(\"Name required to add request listener\");\n if (Array.isArray(win)) {\n var listenersCollection = [];\n for (var _i8 = 0, _win2 = win; _i8 < _win2.length; _i8++) listenersCollection.push(addRequestListener({\n name: name,\n domain: domain,\n win: _win2[_i8]\n }, listener));\n return {\n cancel: function() {\n for (var _i10 = 0; _i10 < listenersCollection.length; _i10++) listenersCollection[_i10].cancel();\n }\n };\n }\n if (Array.isArray(domain)) {\n var _listenersCollection = [];\n for (var _i12 = 0, _domain2 = domain; _i12 < _domain2.length; _i12++) _listenersCollection.push(addRequestListener({\n name: name,\n win: win,\n domain: _domain2[_i12]\n }, listener));\n return {\n cancel: function() {\n for (var _i14 = 0; _i14 < _listenersCollection.length; _i14++) _listenersCollection[_i14].cancel();\n }\n };\n }\n var existingListener = getRequestListener({\n name: name,\n win: win,\n domain: domain\n });\n win && \"*\" !== win || (win = getWildcard());\n domain = domain || \"*\";\n if (existingListener) throw win && domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString() + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : win ? new Error(\"Request listener already exists for \" + name + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString()) : new Error(\"Request listener already exists for \" + name);\n var nameListeners = requestListeners.getOrSet(win, (function() {\n return {};\n }));\n var domainListeners = util_getOrSet(nameListeners, name, (function() {\n return {};\n }));\n var strDomain = domain.toString();\n var regexListeners;\n var regexListener;\n util_isRegex(domain) ? (regexListeners = util_getOrSet(domainListeners, \"__domain_regex__\", (function() {\n return [];\n }))).push(regexListener = {\n regex: domain,\n listener: listener\n }) : domainListeners[strDomain] = listener;\n return {\n cancel: function() {\n delete domainListeners[strDomain];\n if (regexListener) {\n regexListeners.splice(regexListeners.indexOf(regexListener, 1));\n regexListeners.length || delete domainListeners.__domain_regex__;\n }\n Object.keys(domainListeners).length || delete nameListeners[name];\n win && !Object.keys(nameListeners).length && requestListeners.del(win);\n }\n };\n }({\n name: name,\n win: win,\n domain: domain\n }, {\n handler: options.handler,\n handleError: options.errorHandler || function(err) {\n throw err;\n },\n window: win,\n domain: domain || \"*\",\n name: name\n });\n return {\n cancel: function() {\n requestListener.cancel();\n }\n };\n }\n var send_send = function send(win, name, data, options) {\n var domainMatcher = (options = options || {}).domain || \"*\";\n var responseTimeout = options.timeout || -1;\n var childTimeout = options.timeout || 5e3;\n var fireAndForget = options.fireAndForget || !1;\n return promise_ZalgoPromise.try((function() {\n !function(name, win, domain) {\n if (!name) throw new Error(\"Expected name\");\n if (domain && \"string\" != typeof domain && !Array.isArray(domain) && !util_isRegex(domain)) throw new TypeError(\"Can not send \" + name + \". Expected domain \" + JSON.stringify(domain) + \" to be a string, array, or regex\");\n if (isWindowClosed(win)) throw new Error(\"Can not send \" + name + \". Target window is closed\");\n }(name, win, domainMatcher);\n if (function(parent, child) {\n var actualParent = getAncestor(child);\n if (actualParent) return actualParent === parent;\n if (child === parent) return !1;\n if (getTop(child) === child) return !1;\n for (var _i15 = 0, _getFrames8 = getFrames(parent); _i15 < _getFrames8.length; _i15++) if (_getFrames8[_i15] === child) return !0;\n return !1;\n }(window, win)) return function(win, timeout, name) {\n void 0 === timeout && (timeout = 5e3);\n void 0 === name && (name = \"Window\");\n var promise = function(win) {\n return windowStore(\"helloPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }(win);\n -1 !== timeout && (promise = promise.timeout(timeout, new Error(name + \" did not load after \" + timeout + \"ms\")));\n return promise;\n }(win, childTimeout);\n })).then((function(_temp) {\n return function(win, targetDomain, actualDomain, _ref) {\n var send = _ref.send;\n return promise_ZalgoPromise.try((function() {\n return \"string\" == typeof targetDomain ? targetDomain : promise_ZalgoPromise.try((function() {\n return actualDomain || sayHello(win, {\n send: send\n }).then((function(_ref2) {\n return _ref2.domain;\n }));\n })).then((function(normalizedDomain) {\n if (!matchDomain(targetDomain, targetDomain)) throw new Error(\"Domain \" + stringify(targetDomain) + \" does not match \" + stringify(targetDomain));\n return normalizedDomain;\n }));\n }));\n }(win, domainMatcher, (void 0 === _temp ? {} : _temp).domain, {\n send: send\n });\n })).then((function(targetDomain) {\n var domain = targetDomain;\n var logName = \"postrobot_method\" === name && data && \"string\" == typeof data.name ? data.name + \"()\" : name;\n var promise = new promise_ZalgoPromise;\n var hash = name + \"_\" + uniqueID();\n if (!fireAndForget) {\n var responseListener = {\n name: name,\n win: win,\n domain: domain,\n promise: promise\n };\n !function(hash, listener) {\n globalStore(\"responseListeners\").set(hash, listener);\n }(hash, responseListener);\n var reqPromises = windowStore(\"requestPromises\").getOrSet(win, (function() {\n return [];\n }));\n reqPromises.push(promise);\n promise.catch((function() {\n !function(hash) {\n globalStore(\"erroredResponseListeners\").set(hash, !0);\n }(hash);\n deleteResponseListener(hash);\n }));\n var totalAckTimeout = function(win) {\n return windowStore(\"knownWindows\").get(win, !1);\n }(win) ? 1e4 : 2e3;\n var totalResTimeout = responseTimeout;\n var ackTimeout = totalAckTimeout;\n var resTimeout = totalResTimeout;\n var interval = safeInterval((function() {\n if (isWindowClosed(win)) return promise.reject(new Error(\"Window closed for \" + name + \" before \" + (responseListener.ack ? \"response\" : \"ack\")));\n if (responseListener.cancelled) return promise.reject(new Error(\"Response listener was cancelled for \" + name));\n ackTimeout = Math.max(ackTimeout - 500, 0);\n -1 !== resTimeout && (resTimeout = Math.max(resTimeout - 500, 0));\n return responseListener.ack || 0 !== ackTimeout ? 0 === resTimeout ? promise.reject(new Error(\"No response for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalResTimeout + \"ms\")) : void 0 : promise.reject(new Error(\"No ack for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalAckTimeout + \"ms\"));\n }), 500);\n promise.finally((function() {\n interval.cancel();\n reqPromises.splice(reqPromises.indexOf(promise, 1));\n })).catch(src_util_noop);\n }\n return send_sendMessage(win, domain, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_request\",\n hash: hash,\n name: name,\n data: data,\n fireAndForget: fireAndForget\n }, {\n on: on_on,\n send: send\n }).then((function() {\n return fireAndForget ? promise.resolve() : promise;\n }), (function(err) {\n throw new Error(\"Send request message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }));\n }));\n };\n function setup_toProxyWindow(win) {\n return window_ProxyWindow.toProxyWindow(win, {\n send: send_send\n });\n }\n function lib_global_getGlobal(win) {\n if (!isSameDomain(win)) throw new Error(\"Can not get global for window on different domain\");\n win.__zoid_9_0_86__ || (win.__zoid_9_0_86__ = {});\n return win.__zoid_9_0_86__;\n }\n function tryGlobal(win, handler) {\n try {\n return handler(lib_global_getGlobal(win));\n } catch (err) {}\n }\n function getProxyObject(obj) {\n return {\n get: function() {\n var _this = this;\n return promise_ZalgoPromise.try((function() {\n if (_this.source && _this.source !== window) throw new Error(\"Can not call get on proxy object from a remote window\");\n return obj;\n }));\n }\n };\n }\n function basicSerialize(data) {\n return base64encode(JSON.stringify(data));\n }\n function getUIDRefStore(win) {\n var global = lib_global_getGlobal(win);\n global.references = global.references || {};\n return global.references;\n }\n function crossDomainSerialize(_ref) {\n var data = _ref.data, metaData = _ref.metaData, sender = _ref.sender, receiver = _ref.receiver, _ref$passByReference = _ref.passByReference, passByReference = void 0 !== _ref$passByReference && _ref$passByReference, _ref$basic = _ref.basic, basic = void 0 !== _ref$basic && _ref$basic;\n var proxyWin = setup_toProxyWindow(receiver.win);\n var serializedMessage = basic ? JSON.stringify(data) : serializeMessage(proxyWin, receiver.domain, data, {\n on: on_on,\n send: send_send\n });\n var reference = passByReference ? function(val) {\n var uid = uniqueID();\n getUIDRefStore(window)[uid] = val;\n return {\n type: \"uid\",\n uid: uid\n };\n }(serializedMessage) : {\n type: \"raw\",\n val: serializedMessage\n };\n return {\n serializedData: basicSerialize({\n sender: {\n domain: sender.domain\n },\n metaData: metaData,\n reference: reference\n }),\n cleanReference: function() {\n win = window, \"uid\" === (ref = reference).type && delete getUIDRefStore(win)[ref.uid];\n var win, ref;\n }\n };\n }\n function crossDomainDeserialize(_ref2) {\n var sender = _ref2.sender, _ref2$basic = _ref2.basic, basic = void 0 !== _ref2$basic && _ref2$basic;\n var message = function(serializedData) {\n return JSON.parse(function(str) {\n if (\"function\" == typeof atob) return decodeURIComponent([].map.call(atob(str), (function(c) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })).join(\"\"));\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"base64\").toString(\"utf8\");\n throw new Error(\"Can not find window.atob or Buffer\");\n }(serializedData));\n }(_ref2.data);\n var reference = message.reference, metaData = message.metaData;\n var win;\n win = \"function\" == typeof sender.win ? sender.win({\n metaData: metaData\n }) : sender.win;\n var domain;\n domain = \"function\" == typeof sender.domain ? sender.domain({\n metaData: metaData\n }) : \"string\" == typeof sender.domain ? sender.domain : message.sender.domain;\n var serializedData = function(win, ref) {\n if (\"raw\" === ref.type) return ref.val;\n if (\"uid\" === ref.type) return getUIDRefStore(win)[ref.uid];\n throw new Error(\"Unsupported ref type: \" + ref.type);\n }(win, reference);\n return {\n data: basic ? JSON.parse(serializedData) : function(source, origin, message) {\n return deserializeMessage(source, origin, message, {\n on: on_on,\n send: send_send\n });\n }(win, domain, serializedData),\n metaData: metaData,\n sender: {\n win: win,\n domain: domain\n },\n reference: reference\n };\n }\n var PROP_TYPE = {\n STRING: \"string\",\n OBJECT: \"object\",\n FUNCTION: \"function\",\n BOOLEAN: \"boolean\",\n NUMBER: \"number\",\n ARRAY: \"array\"\n };\n var PROP_SERIALIZATION = {\n JSON: \"json\",\n DOTIFY: \"dotify\",\n BASE64: \"base64\"\n };\n var CONTEXT = WINDOW_TYPE;\n var EVENT = {\n RENDER: \"zoid-render\",\n RENDERED: \"zoid-rendered\",\n DISPLAY: \"zoid-display\",\n ERROR: \"zoid-error\",\n CLOSE: \"zoid-close\",\n DESTROY: \"zoid-destroy\",\n PROPS: \"zoid-props\",\n RESIZE: \"zoid-resize\",\n FOCUS: \"zoid-focus\"\n };\n function buildChildWindowName(_ref) {\n return \"__zoid__\" + _ref.name + \"__\" + _ref.serializedPayload + \"__\";\n }\n function parseWindowName(windowName) {\n if (!windowName) throw new Error(\"No window name\");\n var _windowName$split = windowName.split(\"__\"), zoidcomp = _windowName$split[1], name = _windowName$split[2], serializedInitialPayload = _windowName$split[3];\n if (\"zoid\" !== zoidcomp) throw new Error(\"Window not rendered by zoid - got \" + zoidcomp);\n if (!name) throw new Error(\"Expected component name\");\n if (!serializedInitialPayload) throw new Error(\"Expected serialized payload ref\");\n return {\n name: name,\n serializedInitialPayload: serializedInitialPayload\n };\n }\n var parseInitialParentPayload = memoize((function(windowName) {\n var _crossDomainDeseriali = crossDomainDeserialize({\n data: parseWindowName(windowName).serializedInitialPayload,\n sender: {\n win: function(_ref2) {\n return function(windowRef) {\n if (\"opener\" === windowRef.type) return assertExists(\"opener\", getOpener(window));\n if (\"parent\" === windowRef.type && \"number\" == typeof windowRef.distance) return assertExists(\"parent\", function(win, n) {\n void 0 === n && (n = 1);\n return function(win, n) {\n void 0 === n && (n = 1);\n var parent = win;\n for (var i = 0; i < n; i++) {\n if (!parent) return;\n parent = utils_getParent(parent);\n }\n return parent;\n }(win, getDistanceFromTop(win) - n);\n }(window, windowRef.distance));\n if (\"global\" === windowRef.type && windowRef.uid && \"string\" == typeof windowRef.uid) {\n var _ret = function() {\n var uid = windowRef.uid;\n var ancestor = getAncestor(window);\n if (!ancestor) throw new Error(\"Can not find ancestor window\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(ancestor); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var frame = _getAllFramesInWindow2[_i2];\n if (isSameDomain(frame)) {\n var win = tryGlobal(frame, (function(global) {\n return global.windows && global.windows[uid];\n }));\n if (win) return {\n v: win\n };\n }\n }\n }();\n if (\"object\" == typeof _ret) return _ret.v;\n } else if (\"name\" === windowRef.type) {\n var name = windowRef.name;\n return assertExists(\"namedWindow\", function(win, name) {\n return getFrameByName(win, name) || function findChildFrameByName(win, name) {\n var frame = getFrameByName(win, name);\n if (frame) return frame;\n for (var _i11 = 0, _getFrames4 = getFrames(win); _i11 < _getFrames4.length; _i11++) {\n var namedFrame = findChildFrameByName(_getFrames4[_i11], name);\n if (namedFrame) return namedFrame;\n }\n }(getTop(win) || win, name);\n }(assertExists(\"ancestor\", getAncestor(window)), name));\n }\n throw new Error(\"Unable to find \" + windowRef.type + \" parent component window\");\n }(_ref2.metaData.windowRef);\n }\n }\n });\n return {\n parent: _crossDomainDeseriali.sender,\n payload: _crossDomainDeseriali.data,\n reference: _crossDomainDeseriali.reference\n };\n }));\n function getInitialParentPayload() {\n return parseInitialParentPayload(window.name);\n }\n function window_getWindowRef(targetWindow, currentWindow) {\n void 0 === currentWindow && (currentWindow = window);\n if (targetWindow === utils_getParent(currentWindow)) return {\n type: \"parent\",\n distance: getDistanceFromTop(targetWindow)\n };\n if (targetWindow === getOpener(currentWindow)) return {\n type: \"opener\"\n };\n if (isSameDomain(targetWindow) && !(win = targetWindow, win === getTop(win))) {\n var windowName = assertSameDomain(targetWindow).name;\n if (windowName) return {\n type: \"name\",\n name: windowName\n };\n }\n var win;\n }\n function normalizeChildProp(propsDef, props, key, value, helpers) {\n if (!propsDef.hasOwnProperty(key)) return value;\n var prop = propsDef[key];\n return \"function\" == typeof prop.childDecorate ? prop.childDecorate({\n value: value,\n uid: helpers.uid,\n tag: helpers.tag,\n close: helpers.close,\n focus: helpers.focus,\n onError: helpers.onError,\n onProps: helpers.onProps,\n resize: helpers.resize,\n getParent: helpers.getParent,\n getParentDomain: helpers.getParentDomain,\n show: helpers.show,\n hide: helpers.hide,\n export: helpers.export,\n getSiblings: helpers.getSiblings\n }) : value;\n }\n function child_focus() {\n return promise_ZalgoPromise.try((function() {\n window.focus();\n }));\n }\n function child_destroy() {\n return promise_ZalgoPromise.try((function() {\n window.close();\n }));\n }\n var props_defaultNoop = function() {\n return src_util_noop;\n };\n var props_decorateOnce = function(_ref) {\n return once(_ref.value);\n };\n function eachProp(props, propsDef, handler) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(_extends({}, props, propsDef)); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n handler(key, propsDef[key], props[key]);\n }\n }\n function serializeProps(propsDef, props, method) {\n var params = {};\n return promise_ZalgoPromise.all(function(props, propsDef, handler) {\n var results = [];\n eachProp(props, propsDef, (function(key, propDef, value) {\n var result = function(key, propDef, value) {\n return promise_ZalgoPromise.resolve().then((function() {\n var _METHOD$GET$METHOD$PO, _METHOD$GET$METHOD$PO2;\n if (null != value && propDef) {\n var getParam = (_METHOD$GET$METHOD$PO = {}, _METHOD$GET$METHOD$PO.get = propDef.queryParam, \n _METHOD$GET$METHOD$PO.post = propDef.bodyParam, _METHOD$GET$METHOD$PO)[method];\n var getValue = (_METHOD$GET$METHOD$PO2 = {}, _METHOD$GET$METHOD$PO2.get = propDef.queryValue, \n _METHOD$GET$METHOD$PO2.post = propDef.bodyValue, _METHOD$GET$METHOD$PO2)[method];\n if (getParam) return promise_ZalgoPromise.hash({\n finalParam: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getParam ? getParam({\n value: value\n }) : \"string\" == typeof getParam ? getParam : key;\n })),\n finalValue: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getValue && isDefined(value) ? getValue({\n value: value\n }) : value;\n }))\n }).then((function(_ref) {\n var finalParam = _ref.finalParam, finalValue = _ref.finalValue;\n var result;\n if (\"boolean\" == typeof finalValue) result = finalValue.toString(); else if (\"string\" == typeof finalValue) result = finalValue.toString(); else if (\"object\" == typeof finalValue && null !== finalValue) {\n if (propDef.serialization === PROP_SERIALIZATION.JSON) result = JSON.stringify(finalValue); else if (propDef.serialization === PROP_SERIALIZATION.BASE64) result = base64encode(JSON.stringify(finalValue)); else if (propDef.serialization === PROP_SERIALIZATION.DOTIFY || !propDef.serialization) {\n result = function dotify(obj, prefix, newobj) {\n void 0 === prefix && (prefix = \"\");\n void 0 === newobj && (newobj = {});\n prefix = prefix ? prefix + \".\" : prefix;\n for (var key in obj) obj.hasOwnProperty(key) && null != obj[key] && \"function\" != typeof obj[key] && (obj[key] && Array.isArray(obj[key]) && obj[key].length && obj[key].every((function(val) {\n return \"object\" != typeof val;\n })) ? newobj[\"\" + prefix + key + \"[]\"] = obj[key].join(\",\") : obj[key] && \"object\" == typeof obj[key] ? newobj = dotify(obj[key], \"\" + prefix + key, newobj) : newobj[\"\" + prefix + key] = obj[key].toString());\n return newobj;\n }(finalValue, key);\n for (var _i2 = 0, _Object$keys2 = Object.keys(result); _i2 < _Object$keys2.length; _i2++) {\n var dotkey = _Object$keys2[_i2];\n params[dotkey] = result[dotkey];\n }\n return;\n }\n } else \"number\" == typeof finalValue && (result = finalValue.toString());\n params[finalParam] = result;\n }));\n }\n }));\n }(key, propDef, value);\n results.push(result);\n }));\n return results;\n }(props, propsDef)).then((function() {\n return params;\n }));\n }\n function parentComponent(_ref) {\n var uid = _ref.uid, options = _ref.options, _ref$overrides = _ref.overrides, overrides = void 0 === _ref$overrides ? {} : _ref$overrides, _ref$parentWin = _ref.parentWin, parentWin = void 0 === _ref$parentWin ? window : _ref$parentWin;\n var propsDef = options.propsDef, containerTemplate = options.containerTemplate, prerenderTemplate = options.prerenderTemplate, tag = options.tag, name = options.name, attributes = options.attributes, dimensions = options.dimensions, autoResize = options.autoResize, url = options.url, domainMatch = options.domain, xports = options.exports;\n var initPromise = new promise_ZalgoPromise;\n var handledErrors = [];\n var clean = cleanup();\n var state = {};\n var inputProps = {};\n var internalState = {\n visible: !0\n };\n var event = overrides.event ? overrides.event : (triggered = {}, handlers = {}, \n emitter = {\n on: function(eventName, handler) {\n var handlerList = handlers[eventName] = handlers[eventName] || [];\n handlerList.push(handler);\n var cancelled = !1;\n return {\n cancel: function() {\n if (!cancelled) {\n cancelled = !0;\n handlerList.splice(handlerList.indexOf(handler), 1);\n }\n }\n };\n },\n once: function(eventName, handler) {\n var listener = emitter.on(eventName, (function() {\n listener.cancel();\n handler();\n }));\n return listener;\n },\n trigger: function(eventName) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n var handlerList = handlers[eventName];\n var promises = [];\n if (handlerList) {\n var _loop = function(_i2) {\n var handler = handlerList[_i2];\n promises.push(promise_ZalgoPromise.try((function() {\n return handler.apply(void 0, args);\n })));\n };\n for (var _i2 = 0; _i2 < handlerList.length; _i2++) _loop(_i2);\n }\n return promise_ZalgoPromise.all(promises).then(src_util_noop);\n },\n triggerOnce: function(eventName) {\n if (triggered[eventName]) return promise_ZalgoPromise.resolve();\n triggered[eventName] = !0;\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) args[_key4 - 1] = arguments[_key4];\n return emitter.trigger.apply(emitter, [ eventName ].concat(args));\n },\n reset: function() {\n handlers = {};\n }\n });\n var triggered, handlers, emitter;\n var props = overrides.props ? overrides.props : {};\n var currentProxyWin;\n var currentProxyContainer;\n var childComponent;\n var currentChildDomain;\n var currentContainer;\n var onErrorOverride = overrides.onError;\n var getProxyContainerOverride = overrides.getProxyContainer;\n var showOverride = overrides.show;\n var hideOverride = overrides.hide;\n var closeOverride = overrides.close;\n var renderContainerOverride = overrides.renderContainer;\n var getProxyWindowOverride = overrides.getProxyWindow;\n var setProxyWinOverride = overrides.setProxyWin;\n var openFrameOverride = overrides.openFrame;\n var openPrerenderFrameOverride = overrides.openPrerenderFrame;\n var prerenderOverride = overrides.prerender;\n var openOverride = overrides.open;\n var openPrerenderOverride = overrides.openPrerender;\n var watchForUnloadOverride = overrides.watchForUnload;\n var getInternalStateOverride = overrides.getInternalState;\n var setInternalStateOverride = overrides.setInternalState;\n var resolveInitPromise = function() {\n return promise_ZalgoPromise.try((function() {\n return overrides.resolveInitPromise ? overrides.resolveInitPromise() : initPromise.resolve();\n }));\n };\n var rejectInitPromise = function(err) {\n return promise_ZalgoPromise.try((function() {\n return overrides.rejectInitPromise ? overrides.rejectInitPromise(err) : initPromise.reject(err);\n }));\n };\n var getPropsForChild = function(initialChildDomain) {\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n prop && !1 === prop.sendToChild || prop && prop.sameDomain && !matchDomain(initialChildDomain, getDomain(window)) || (result[key] = props[key]);\n }\n return promise_ZalgoPromise.hash(result);\n };\n var getInternalState = function() {\n return promise_ZalgoPromise.try((function() {\n return getInternalStateOverride ? getInternalStateOverride() : internalState;\n }));\n };\n var setInternalState = function(newInternalState) {\n return promise_ZalgoPromise.try((function() {\n return setInternalStateOverride ? setInternalStateOverride(newInternalState) : internalState = _extends({}, internalState, newInternalState);\n }));\n };\n var getProxyWindow = function() {\n return getProxyWindowOverride ? getProxyWindowOverride() : promise_ZalgoPromise.try((function() {\n var windowProp = props.window;\n if (windowProp) {\n var _proxyWin = setup_toProxyWindow(windowProp);\n clean.register((function() {\n return windowProp.close();\n }));\n return _proxyWin;\n }\n return new window_ProxyWindow({\n send: send_send\n });\n }));\n };\n var setProxyWin = function(proxyWin) {\n return setProxyWinOverride ? setProxyWinOverride(proxyWin) : promise_ZalgoPromise.try((function() {\n currentProxyWin = proxyWin;\n }));\n };\n var show = function() {\n return showOverride ? showOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !0\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(showElement) : null\n }).then(src_util_noop);\n };\n var hide = function() {\n return hideOverride ? hideOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !1\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(hideElement) : null\n }).then(src_util_noop);\n };\n var getUrl = function() {\n return \"function\" == typeof url ? url({\n props: props\n }) : url;\n };\n var getAttributes = function() {\n return \"function\" == typeof attributes ? attributes({\n props: props\n }) : attributes;\n };\n var getInitialChildDomain = function() {\n return getDomainFromUrl(getUrl());\n };\n var openFrame = function(context, _ref2) {\n var windowName = _ref2.windowName;\n return openFrameOverride ? openFrameOverride(context, {\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: windowName,\n title: name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerenderFrame = function(context) {\n return openPrerenderFrameOverride ? openPrerenderFrameOverride(context) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: \"__zoid_prerender_frame__\" + name + \"_\" + uniqueID() + \"__\",\n title: \"prerender__\" + name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerender = function(context, proxyWin, proxyPrerenderFrame) {\n return openPrerenderOverride ? openPrerenderOverride(context, proxyWin, proxyPrerenderFrame) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyPrerenderFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyPrerenderFrame.get().then((function(prerenderFrame) {\n clean.register((function() {\n return destroyElement(prerenderFrame);\n }));\n return awaitFrameWindow(prerenderFrame).then((function(prerenderFrameWindow) {\n return assertSameDomain(prerenderFrameWindow);\n })).then((function(win) {\n return setup_toProxyWindow(win);\n }));\n }));\n }\n throw new Error(\"No render context available for \" + context);\n }));\n };\n var focus = function() {\n return promise_ZalgoPromise.try((function() {\n if (currentProxyWin) return promise_ZalgoPromise.all([ event.trigger(EVENT.FOCUS), currentProxyWin.focus() ]).then(src_util_noop);\n }));\n };\n var getCurrentWindowReferenceUID = function() {\n var global = lib_global_getGlobal(window);\n global.windows = global.windows || {};\n global.windows[uid] = window;\n clean.register((function() {\n delete global.windows[uid];\n }));\n return uid;\n };\n var getWindowRef = function(target, initialChildDomain, context, proxyWin) {\n if (initialChildDomain === getDomain(window)) return {\n type: \"global\",\n uid: getCurrentWindowReferenceUID()\n };\n if (target !== window) throw new Error(\"Can not construct cross-domain window reference for different target window\");\n if (props.window) {\n var actualComponentWindow = proxyWin.getWindow();\n if (!actualComponentWindow) throw new Error(\"Can not construct cross-domain window reference for lazy window prop\");\n if (getAncestor(actualComponentWindow) !== window) throw new Error(\"Can not construct cross-domain window reference for window prop with different ancestor\");\n }\n if (context === CONTEXT.POPUP) return {\n type: \"opener\"\n };\n if (context === CONTEXT.IFRAME) return {\n type: \"parent\",\n distance: getDistanceFromTop(window)\n };\n throw new Error(\"Can not construct window reference for child\");\n };\n var initChild = function(childDomain, childExports) {\n return promise_ZalgoPromise.try((function() {\n currentChildDomain = childDomain;\n childComponent = childExports;\n resolveInitPromise();\n clean.register((function() {\n return childExports.close.fireAndForget().catch(src_util_noop);\n }));\n }));\n };\n var resize = function(_ref3) {\n var width = _ref3.width, height = _ref3.height;\n return promise_ZalgoPromise.try((function() {\n event.trigger(EVENT.RESIZE, {\n width: width,\n height: height\n });\n }));\n };\n var destroy = function(err) {\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.DESTROY);\n })).catch(src_util_noop).then((function() {\n return clean.all(err);\n })).then((function() {\n initPromise.asyncReject(err || new Error(\"Component destroyed\"));\n }));\n };\n var close = memoize((function(err) {\n return promise_ZalgoPromise.try((function() {\n if (closeOverride) {\n if (isWindowClosed(closeOverride.__source__)) return;\n return closeOverride();\n }\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.CLOSE);\n })).then((function() {\n return destroy(err || new Error(\"Component closed\"));\n }));\n }));\n }));\n var open = function(context, _ref4) {\n var proxyWin = _ref4.proxyWin, proxyFrame = _ref4.proxyFrame, windowName = _ref4.windowName;\n return openOverride ? openOverride(context, {\n proxyWin: proxyWin,\n proxyFrame: proxyFrame,\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyFrame.get().then((function(frame) {\n return awaitFrameWindow(frame).then((function(win) {\n clean.register((function() {\n return destroyElement(frame);\n }));\n clean.register((function() {\n return function(win) {\n for (var _i2 = 0, _requestPromises$get2 = windowStore(\"requestPromises\").get(win, []); _i2 < _requestPromises$get2.length; _i2++) _requestPromises$get2[_i2].reject(new Error(\"Window \" + (isWindowClosed(win) ? \"closed\" : \"cleaned up\") + \" before response\")).catch(src_util_noop);\n }(win);\n }));\n return win;\n }));\n }));\n }\n throw new Error(\"No render context available for \" + context);\n })).then((function(win) {\n proxyWin.setWindow(win, {\n send: send_send\n });\n return proxyWin.setName(windowName).then((function() {\n return proxyWin;\n }));\n }));\n };\n var watchForUnload = function() {\n return promise_ZalgoPromise.try((function() {\n var unloadWindowListener = addEventListener(window, \"unload\", once((function() {\n destroy(new Error(\"Window navigated away\"));\n })));\n var closeParentWindowListener = onCloseWindow(parentWin, destroy, 3e3);\n clean.register(closeParentWindowListener.cancel);\n clean.register(unloadWindowListener.cancel);\n if (watchForUnloadOverride) return watchForUnloadOverride();\n }));\n };\n var checkWindowClose = function(proxyWin) {\n var closed = !1;\n return proxyWin.isClosed().then((function(isClosed) {\n if (isClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n return promise_ZalgoPromise.delay(200).then((function() {\n return proxyWin.isClosed();\n })).then((function(secondIsClosed) {\n if (secondIsClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n }));\n })).then((function() {\n return closed;\n }));\n };\n var onError = function(err) {\n return onErrorOverride ? onErrorOverride(err) : promise_ZalgoPromise.try((function() {\n if (-1 === handledErrors.indexOf(err)) {\n handledErrors.push(err);\n initPromise.asyncReject(err);\n return event.trigger(EVENT.ERROR, err);\n }\n }));\n };\n var exportsPromise = new promise_ZalgoPromise;\n var xport = function(actualExports) {\n return promise_ZalgoPromise.try((function() {\n exportsPromise.resolve(actualExports);\n }));\n };\n initChild.onError = onError;\n var renderTemplate = function(renderer, _ref8) {\n return renderer({\n uid: uid,\n container: _ref8.container,\n context: _ref8.context,\n doc: _ref8.doc,\n frame: _ref8.frame,\n prerenderFrame: _ref8.prerenderFrame,\n focus: focus,\n close: close,\n state: state,\n props: props,\n tag: tag,\n dimensions: \"function\" == typeof dimensions ? dimensions({\n props: props\n }) : dimensions,\n event: event\n });\n };\n var prerender = function(proxyPrerenderWin, _ref9) {\n var context = _ref9.context;\n return prerenderOverride ? prerenderOverride(proxyPrerenderWin, {\n context: context\n }) : promise_ZalgoPromise.try((function() {\n if (prerenderTemplate) {\n var prerenderWindow = proxyPrerenderWin.getWindow();\n if (prerenderWindow && isSameDomain(prerenderWindow) && function(win) {\n try {\n if (!win.location.href) return !0;\n if (\"about:blank\" === win.location.href) return !0;\n } catch (err) {}\n return !1;\n }(prerenderWindow)) {\n var doc = (prerenderWindow = assertSameDomain(prerenderWindow)).document;\n var el = renderTemplate(prerenderTemplate, {\n context: context,\n doc: doc\n });\n if (el) {\n if (el.ownerDocument !== doc) throw new Error(\"Expected prerender template to have been created with document from child window\");\n !function(win, el) {\n var tag = el.tagName.toLowerCase();\n if (\"html\" !== tag) throw new Error(\"Expected element to be html, got \" + tag);\n var documentElement = win.document.documentElement;\n for (var _i6 = 0, _arrayFrom2 = arrayFrom(documentElement.children); _i6 < _arrayFrom2.length; _i6++) documentElement.removeChild(_arrayFrom2[_i6]);\n for (var _i8 = 0, _arrayFrom4 = arrayFrom(el.children); _i8 < _arrayFrom4.length; _i8++) documentElement.appendChild(_arrayFrom4[_i8]);\n }(prerenderWindow, el);\n var _autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, _autoResize$element = autoResize.element, element = void 0 === _autoResize$element ? \"body\" : _autoResize$element;\n if ((element = getElementSafe(element, doc)) && (width || height)) {\n var prerenderResizeListener = onResize(element, (function(_ref10) {\n resize({\n width: width ? _ref10.width : void 0,\n height: height ? _ref10.height : void 0\n });\n }), {\n width: width,\n height: height,\n win: prerenderWindow\n });\n event.on(EVENT.RENDERED, prerenderResizeListener.cancel);\n }\n }\n }\n }\n }));\n };\n var renderContainer = function(proxyContainer, _ref11) {\n var proxyFrame = _ref11.proxyFrame, proxyPrerenderFrame = _ref11.proxyPrerenderFrame, context = _ref11.context, rerender = _ref11.rerender;\n return renderContainerOverride ? renderContainerOverride(proxyContainer, {\n proxyFrame: proxyFrame,\n proxyPrerenderFrame: proxyPrerenderFrame,\n context: context,\n rerender: rerender\n }) : promise_ZalgoPromise.hash({\n container: proxyContainer.get(),\n frame: proxyFrame ? proxyFrame.get() : null,\n prerenderFrame: proxyPrerenderFrame ? proxyPrerenderFrame.get() : null,\n internalState: getInternalState()\n }).then((function(_ref12) {\n var container = _ref12.container, visible = _ref12.internalState.visible;\n var innerContainer = renderTemplate(containerTemplate, {\n context: context,\n container: container,\n frame: _ref12.frame,\n prerenderFrame: _ref12.prerenderFrame,\n doc: document\n });\n if (innerContainer) {\n visible || hideElement(innerContainer);\n appendChild(container, innerContainer);\n var containerWatcher = function(element, handler) {\n handler = once(handler);\n var cancelled = !1;\n var mutationObservers = [];\n var interval;\n var sacrificialFrame;\n var sacrificialFrameWin;\n var cancel = function() {\n cancelled = !0;\n for (var _i18 = 0; _i18 < mutationObservers.length; _i18++) mutationObservers[_i18].disconnect();\n interval && interval.cancel();\n sacrificialFrameWin && sacrificialFrameWin.removeEventListener(\"unload\", elementClosed);\n sacrificialFrame && destroyElement(sacrificialFrame);\n };\n var elementClosed = function() {\n if (!cancelled) {\n handler();\n cancel();\n }\n };\n if (isElementClosed(element)) {\n elementClosed();\n return {\n cancel: cancel\n };\n }\n if (window.MutationObserver) {\n var mutationElement = element.parentElement;\n for (;mutationElement; ) {\n var mutationObserver = new window.MutationObserver((function() {\n isElementClosed(element) && elementClosed();\n }));\n mutationObserver.observe(mutationElement, {\n childList: !0\n });\n mutationObservers.push(mutationObserver);\n mutationElement = mutationElement.parentElement;\n }\n }\n (sacrificialFrame = document.createElement(\"iframe\")).setAttribute(\"name\", \"__detect_close_\" + uniqueID() + \"__\");\n sacrificialFrame.style.display = \"none\";\n awaitFrameWindow(sacrificialFrame).then((function(frameWin) {\n (sacrificialFrameWin = assertSameDomain(frameWin)).addEventListener(\"unload\", elementClosed);\n }));\n element.appendChild(sacrificialFrame);\n interval = safeInterval((function() {\n isElementClosed(element) && elementClosed();\n }), 1e3);\n return {\n cancel: cancel\n };\n }(innerContainer, (function() {\n var removeError = new Error(\"Detected container element removed from DOM\");\n return promise_ZalgoPromise.delay(1).then((function() {\n if (!isElementClosed(innerContainer)) {\n clean.all(removeError);\n return rerender().then(resolveInitPromise, rejectInitPromise);\n }\n close(removeError);\n }));\n }));\n clean.register((function() {\n return containerWatcher.cancel();\n }));\n clean.register((function() {\n return destroyElement(innerContainer);\n }));\n return currentProxyContainer = getProxyObject(innerContainer);\n }\n }));\n };\n var getHelpers = function() {\n return {\n state: state,\n event: event,\n close: close,\n focus: focus,\n resize: resize,\n onError: onError,\n updateProps: updateProps,\n show: show,\n hide: hide\n };\n };\n var setProps = function(newInputProps) {\n void 0 === newInputProps && (newInputProps = {});\n var container = currentContainer;\n var helpers = getHelpers();\n extend(inputProps, newInputProps);\n !function(propsDef, existingProps, inputProps, helpers, container) {\n var state = helpers.state, close = helpers.close, focus = helpers.focus, event = helpers.event, onError = helpers.onError;\n eachProp(inputProps, propsDef, (function(key, propDef, val) {\n var valueDetermined = !1;\n var value = val;\n Object.defineProperty(existingProps, key, {\n configurable: !0,\n enumerable: !0,\n get: function() {\n if (valueDetermined) return value;\n valueDetermined = !0;\n return function() {\n if (!propDef) return value;\n var alias = propDef.alias;\n alias && !isDefined(val) && isDefined(inputProps[alias]) && (value = inputProps[alias]);\n propDef.value && (value = propDef.value({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n !propDef.default || isDefined(value) || isDefined(inputProps[key]) || (value = propDef.default({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n if (isDefined(value)) {\n if (propDef.type === PROP_TYPE.ARRAY ? !Array.isArray(value) : typeof value !== propDef.type) throw new TypeError(\"Prop is not of type \" + propDef.type + \": \" + key);\n } else if (!1 !== propDef.required && !isDefined(inputProps[key])) throw new Error('Expected prop \"' + key + '\" to be defined');\n isDefined(value) && propDef.decorate && (value = propDef.decorate({\n value: value,\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n return value;\n }();\n }\n });\n }));\n eachProp(existingProps, propsDef, src_util_noop);\n }(propsDef, props, inputProps, helpers, container);\n };\n var updateProps = function(newProps) {\n setProps(newProps);\n return initPromise.then((function() {\n var child = childComponent;\n var proxyWin = currentProxyWin;\n if (child && proxyWin && currentChildDomain) return getPropsForChild(currentChildDomain).then((function(childProps) {\n return child.updateProps(childProps).catch((function(err) {\n return checkWindowClose(proxyWin).then((function(closed) {\n if (!closed) throw err;\n }));\n }));\n }));\n }));\n };\n var getProxyContainer = function(container) {\n return getProxyContainerOverride ? getProxyContainerOverride(container) : promise_ZalgoPromise.try((function() {\n return elementReady(container);\n })).then((function(containerElement) {\n isShadowElement(containerElement) && (containerElement = function insertShadowSlot(element) {\n var shadowHost = function(element) {\n var shadowRoot = function(element) {\n for (;element.parentNode; ) element = element.parentNode;\n if (isShadowElement(element)) return element;\n }(element);\n if (shadowRoot && shadowRoot.host) return shadowRoot.host;\n }(element);\n if (!shadowHost) throw new Error(\"Element is not in shadow dom\");\n var slotName = \"shadow-slot-\" + uniqueID();\n var slot = document.createElement(\"slot\");\n slot.setAttribute(\"name\", slotName);\n element.appendChild(slot);\n var slotProvider = document.createElement(\"div\");\n slotProvider.setAttribute(\"slot\", slotName);\n shadowHost.appendChild(slotProvider);\n return isShadowElement(shadowHost) ? insertShadowSlot(slotProvider) : slotProvider;\n }(containerElement));\n currentContainer = containerElement;\n return getProxyObject(containerElement);\n }));\n };\n return {\n init: function() {\n !function() {\n event.on(EVENT.RENDER, (function() {\n return props.onRender();\n }));\n event.on(EVENT.DISPLAY, (function() {\n return props.onDisplay();\n }));\n event.on(EVENT.RENDERED, (function() {\n return props.onRendered();\n }));\n event.on(EVENT.CLOSE, (function() {\n return props.onClose();\n }));\n event.on(EVENT.DESTROY, (function() {\n return props.onDestroy();\n }));\n event.on(EVENT.RESIZE, (function() {\n return props.onResize();\n }));\n event.on(EVENT.FOCUS, (function() {\n return props.onFocus();\n }));\n event.on(EVENT.PROPS, (function(newProps) {\n return props.onProps(newProps);\n }));\n event.on(EVENT.ERROR, (function(err) {\n return props && props.onError ? props.onError(err) : rejectInitPromise(err).then((function() {\n setTimeout((function() {\n throw err;\n }), 1);\n }));\n }));\n clean.register(event.reset);\n }();\n },\n render: function(_ref14) {\n var target = _ref14.target, container = _ref14.container, context = _ref14.context, rerender = _ref14.rerender;\n return promise_ZalgoPromise.try((function() {\n var initialChildDomain = getInitialChildDomain();\n var childDomainMatch = domainMatch || getInitialChildDomain();\n !function(target, childDomainMatch, container) {\n if (target !== window) {\n if (!isSameTopWindow(window, target)) throw new Error(\"Can only renderTo an adjacent frame\");\n var origin = getDomain();\n if (!matchDomain(childDomainMatch, origin) && !isSameDomain(target)) throw new Error(\"Can not render remotely to \" + childDomainMatch.toString() + \" - can only render to \" + origin);\n if (container && \"string\" != typeof container) throw new Error(\"Container passed to renderTo must be a string selector, got \" + typeof container + \" }\");\n }\n }(target, childDomainMatch, container);\n var delegatePromise = promise_ZalgoPromise.try((function() {\n if (target !== window) return function(context, target) {\n var delegateProps = {};\n for (var _i4 = 0, _Object$keys4 = Object.keys(props); _i4 < _Object$keys4.length; _i4++) {\n var propName = _Object$keys4[_i4];\n var propDef = propsDef[propName];\n propDef && propDef.allowDelegate && (delegateProps[propName] = props[propName]);\n }\n var childOverridesPromise = send_send(target, \"zoid_delegate_\" + name, {\n uid: uid,\n overrides: {\n props: delegateProps,\n event: event,\n close: close,\n onError: onError,\n getInternalState: getInternalState,\n setInternalState: setInternalState,\n resolveInitPromise: resolveInitPromise,\n rejectInitPromise: rejectInitPromise\n }\n }).then((function(_ref13) {\n var parentComp = _ref13.data.parent;\n clean.register((function(err) {\n if (!isWindowClosed(target)) return parentComp.destroy(err);\n }));\n return parentComp.getDelegateOverrides();\n })).catch((function(err) {\n throw new Error(\"Unable to delegate rendering. Possibly the component is not loaded in the target window.\\n\\n\" + stringifyError(err));\n }));\n getProxyContainerOverride = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyContainer.apply(childOverrides, args);\n }));\n };\n renderContainerOverride = function() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.renderContainer.apply(childOverrides, args);\n }));\n };\n showOverride = function() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.show.apply(childOverrides, args);\n }));\n };\n hideOverride = function() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.hide.apply(childOverrides, args);\n }));\n };\n watchForUnloadOverride = function() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) args[_key5] = arguments[_key5];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.watchForUnload.apply(childOverrides, args);\n }));\n };\n if (context === CONTEXT.IFRAME) {\n getProxyWindowOverride = function() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) args[_key6] = arguments[_key6];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyWindow.apply(childOverrides, args);\n }));\n };\n openFrameOverride = function() {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) args[_key7] = arguments[_key7];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openFrame.apply(childOverrides, args);\n }));\n };\n openPrerenderFrameOverride = function() {\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) args[_key8] = arguments[_key8];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerenderFrame.apply(childOverrides, args);\n }));\n };\n prerenderOverride = function() {\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) args[_key9] = arguments[_key9];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.prerender.apply(childOverrides, args);\n }));\n };\n openOverride = function() {\n for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) args[_key10] = arguments[_key10];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.open.apply(childOverrides, args);\n }));\n };\n openPrerenderOverride = function() {\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) args[_key11] = arguments[_key11];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerender.apply(childOverrides, args);\n }));\n };\n }\n return childOverridesPromise;\n }(context, target);\n }));\n var windowProp = props.window;\n var watchForUnloadPromise = watchForUnload();\n var buildBodyPromise = serializeProps(propsDef, props, \"post\");\n var onRenderPromise = event.trigger(EVENT.RENDER);\n var getProxyContainerPromise = getProxyContainer(container);\n var getProxyWindowPromise = getProxyWindow();\n var finalSetPropsPromise = getProxyContainerPromise.then((function() {\n return setProps();\n }));\n var buildUrlPromise = finalSetPropsPromise.then((function() {\n return serializeProps(propsDef, props, \"get\").then((function(query) {\n return function(url, options) {\n var query = options.query || {};\n var hash = options.hash || {};\n var originalUrl;\n var originalHash;\n var _url$split = url.split(\"#\");\n originalHash = _url$split[1];\n var _originalUrl$split = (originalUrl = _url$split[0]).split(\"?\");\n originalUrl = _originalUrl$split[0];\n var queryString = extendQuery(_originalUrl$split[1], query);\n var hashString = extendQuery(originalHash, hash);\n queryString && (originalUrl = originalUrl + \"?\" + queryString);\n hashString && (originalUrl = originalUrl + \"#\" + hashString);\n return originalUrl;\n }(function(url) {\n if (!(domain = getDomainFromUrl(url), 0 === domain.indexOf(\"mock:\"))) return url;\n var domain;\n throw new Error(\"Mock urls not supported out of test mode\");\n }(getUrl()), {\n query: query\n });\n }));\n }));\n var buildWindowNamePromise = getProxyWindowPromise.then((function(proxyWin) {\n return function(_temp2) {\n var _ref6 = void 0 === _temp2 ? {} : _temp2, proxyWin = _ref6.proxyWin, initialChildDomain = _ref6.initialChildDomain, childDomainMatch = _ref6.childDomainMatch, _ref6$target = _ref6.target, target = void 0 === _ref6$target ? window : _ref6$target, context = _ref6.context;\n return function(_temp) {\n var _ref5 = void 0 === _temp ? {} : _temp, proxyWin = _ref5.proxyWin, childDomainMatch = _ref5.childDomainMatch, context = _ref5.context;\n return getPropsForChild(_ref5.initialChildDomain).then((function(childProps) {\n return {\n uid: uid,\n context: context,\n tag: tag,\n childDomainMatch: childDomainMatch,\n version: \"9_0_86\",\n props: childProps,\n exports: (win = proxyWin, {\n init: function(childExports) {\n return initChild(this.origin, childExports);\n },\n close: close,\n checkClose: function() {\n return checkWindowClose(win);\n },\n resize: resize,\n onError: onError,\n show: show,\n hide: hide,\n export: xport\n })\n };\n var win;\n }));\n }({\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n context: context\n }).then((function(childPayload) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: childPayload,\n metaData: {\n windowRef: getWindowRef(target, initialChildDomain, context, proxyWin)\n },\n sender: {\n domain: getDomain(window)\n },\n receiver: {\n win: proxyWin,\n domain: childDomainMatch\n },\n passByReference: initialChildDomain === getDomain()\n }), serializedData = _crossDomainSerialize.serializedData;\n clean.register(_crossDomainSerialize.cleanReference);\n return serializedData;\n }));\n }({\n proxyWin: (_ref7 = {\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n target: target,\n context: context\n }).proxyWin,\n initialChildDomain: _ref7.initialChildDomain,\n childDomainMatch: _ref7.childDomainMatch,\n target: _ref7.target,\n context: _ref7.context\n }).then((function(serializedPayload) {\n return buildChildWindowName({\n name: name,\n serializedPayload: serializedPayload\n });\n }));\n var _ref7;\n }));\n var openFramePromise = buildWindowNamePromise.then((function(windowName) {\n return openFrame(context, {\n windowName: windowName\n });\n }));\n var openPrerenderFramePromise = openPrerenderFrame(context);\n var renderContainerPromise = promise_ZalgoPromise.hash({\n proxyContainer: getProxyContainerPromise,\n proxyFrame: openFramePromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref15) {\n return renderContainer(_ref15.proxyContainer, {\n context: context,\n proxyFrame: _ref15.proxyFrame,\n proxyPrerenderFrame: _ref15.proxyPrerenderFrame,\n rerender: rerender\n });\n })).then((function(proxyContainer) {\n return proxyContainer;\n }));\n var openPromise = promise_ZalgoPromise.hash({\n windowName: buildWindowNamePromise,\n proxyFrame: openFramePromise,\n proxyWin: getProxyWindowPromise\n }).then((function(_ref16) {\n var proxyWin = _ref16.proxyWin;\n return windowProp ? proxyWin : open(context, {\n windowName: _ref16.windowName,\n proxyWin: proxyWin,\n proxyFrame: _ref16.proxyFrame\n });\n }));\n var openPrerenderPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref17) {\n return openPrerender(context, _ref17.proxyWin, _ref17.proxyPrerenderFrame);\n }));\n var setStatePromise = openPromise.then((function(proxyWin) {\n currentProxyWin = proxyWin;\n return setProxyWin(proxyWin);\n }));\n var prerenderPromise = promise_ZalgoPromise.hash({\n proxyPrerenderWin: openPrerenderPromise,\n state: setStatePromise\n }).then((function(_ref18) {\n return prerender(_ref18.proxyPrerenderWin, {\n context: context\n });\n }));\n var setWindowNamePromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowName: buildWindowNamePromise\n }).then((function(_ref19) {\n if (windowProp) return _ref19.proxyWin.setName(_ref19.windowName);\n }));\n var getMethodPromise = promise_ZalgoPromise.hash({\n body: buildBodyPromise\n }).then((function(_ref20) {\n return options.method ? options.method : Object.keys(_ref20.body).length ? \"post\" : \"get\";\n }));\n var loadUrlPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowUrl: buildUrlPromise,\n body: buildBodyPromise,\n method: getMethodPromise,\n windowName: setWindowNamePromise,\n prerender: prerenderPromise\n }).then((function(_ref21) {\n return _ref21.proxyWin.setLocation(_ref21.windowUrl, {\n method: _ref21.method,\n body: _ref21.body\n });\n }));\n var watchForClosePromise = openPromise.then((function(proxyWin) {\n !function watchForClose(proxyWin, context) {\n var cancelled = !1;\n clean.register((function() {\n cancelled = !0;\n }));\n return promise_ZalgoPromise.delay(2e3).then((function() {\n return proxyWin.isClosed();\n })).then((function(isClosed) {\n if (!cancelled) return isClosed ? close(new Error(\"Detected \" + context + \" close\")) : watchForClose(proxyWin, context);\n }));\n }(proxyWin, context);\n }));\n var onDisplayPromise = promise_ZalgoPromise.hash({\n container: renderContainerPromise,\n prerender: prerenderPromise\n }).then((function() {\n return event.trigger(EVENT.DISPLAY);\n }));\n var openBridgePromise = openPromise.then((function(proxyWin) {}));\n var runTimeoutPromise = loadUrlPromise.then((function() {\n return promise_ZalgoPromise.try((function() {\n var timeout = props.timeout;\n if (timeout) return initPromise.timeout(timeout, new Error(\"Loading component timed out after \" + timeout + \" milliseconds\"));\n }));\n }));\n var onRenderedPromise = initPromise.then((function() {\n return event.trigger(EVENT.RENDERED);\n }));\n return promise_ZalgoPromise.hash({\n initPromise: initPromise,\n buildUrlPromise: buildUrlPromise,\n onRenderPromise: onRenderPromise,\n getProxyContainerPromise: getProxyContainerPromise,\n openFramePromise: openFramePromise,\n openPrerenderFramePromise: openPrerenderFramePromise,\n renderContainerPromise: renderContainerPromise,\n openPromise: openPromise,\n openPrerenderPromise: openPrerenderPromise,\n setStatePromise: setStatePromise,\n prerenderPromise: prerenderPromise,\n loadUrlPromise: loadUrlPromise,\n buildWindowNamePromise: buildWindowNamePromise,\n setWindowNamePromise: setWindowNamePromise,\n watchForClosePromise: watchForClosePromise,\n onDisplayPromise: onDisplayPromise,\n openBridgePromise: openBridgePromise,\n runTimeoutPromise: runTimeoutPromise,\n onRenderedPromise: onRenderedPromise,\n delegatePromise: delegatePromise,\n watchForUnloadPromise: watchForUnloadPromise,\n finalSetPropsPromise: finalSetPropsPromise\n });\n })).catch((function(err) {\n return promise_ZalgoPromise.all([ onError(err), destroy(err) ]).then((function() {\n throw err;\n }), (function() {\n throw err;\n }));\n })).then(src_util_noop);\n },\n destroy: destroy,\n getProps: function() {\n return props;\n },\n setProps: setProps,\n export: xport,\n getHelpers: getHelpers,\n getDelegateOverrides: function() {\n return promise_ZalgoPromise.try((function() {\n return {\n getProxyContainer: getProxyContainer,\n show: show,\n hide: hide,\n renderContainer: renderContainer,\n getProxyWindow: getProxyWindow,\n watchForUnload: watchForUnload,\n openFrame: openFrame,\n openPrerenderFrame: openPrerenderFrame,\n prerender: prerender,\n open: open,\n openPrerender: openPrerender,\n setProxyWin: setProxyWin\n };\n }));\n },\n getExports: function() {\n return xports({\n getExports: function() {\n return exportsPromise;\n }\n });\n }\n };\n }\n function defaultContainerTemplate(_ref) {\n var uid = _ref.uid, frame = _ref.frame, prerenderFrame = _ref.prerenderFrame, doc = _ref.doc, props = _ref.props, event = _ref.event, dimensions = _ref.dimensions;\n var width = dimensions.width, height = dimensions.height;\n if (frame && prerenderFrame) {\n var div = doc.createElement(\"div\");\n div.setAttribute(\"id\", uid);\n var style = doc.createElement(\"style\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n style.appendChild(doc.createTextNode(\"\\n #\" + uid + \" {\\n display: inline-block;\\n position: relative;\\n width: \" + width + \";\\n height: \" + height + \";\\n }\\n\\n #\" + uid + \" > iframe {\\n display: inline-block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n top: 0;\\n left: 0;\\n transition: opacity .2s ease-in-out;\\n }\\n\\n #\" + uid + \" > iframe.zoid-invisible {\\n opacity: 0;\\n }\\n\\n #\" + uid + \" > iframe.zoid-visible {\\n opacity: 1;\\n }\\n \"));\n div.appendChild(frame);\n div.appendChild(prerenderFrame);\n div.appendChild(style);\n prerenderFrame.classList.add(\"zoid-visible\");\n frame.classList.add(\"zoid-invisible\");\n event.on(EVENT.RENDERED, (function() {\n prerenderFrame.classList.remove(\"zoid-visible\");\n prerenderFrame.classList.add(\"zoid-invisible\");\n frame.classList.remove(\"zoid-invisible\");\n frame.classList.add(\"zoid-visible\");\n setTimeout((function() {\n destroyElement(prerenderFrame);\n }), 1);\n }));\n event.on(EVENT.RESIZE, (function(_ref2) {\n var newWidth = _ref2.width, newHeight = _ref2.height;\n \"number\" == typeof newWidth && (div.style.width = toCSS(newWidth));\n \"number\" == typeof newHeight && (div.style.height = toCSS(newHeight));\n }));\n return div;\n }\n }\n var cleanInstances = cleanup();\n var cleanZoid = cleanup();\n function component(opts) {\n var options = function(options) {\n var tag = options.tag, url = options.url, domain = options.domain, bridgeUrl = options.bridgeUrl, _options$props = options.props, props = void 0 === _options$props ? {} : _options$props, _options$dimensions = options.dimensions, dimensions = void 0 === _options$dimensions ? {} : _options$dimensions, _options$autoResize = options.autoResize, autoResize = void 0 === _options$autoResize ? {} : _options$autoResize, _options$allowedParen = options.allowedParentDomains, allowedParentDomains = void 0 === _options$allowedParen ? \"*\" : _options$allowedParen, _options$attributes = options.attributes, attributes = void 0 === _options$attributes ? {} : _options$attributes, _options$defaultConte = options.defaultContext, defaultContext = void 0 === _options$defaultConte ? CONTEXT.IFRAME : _options$defaultConte, _options$containerTem = options.containerTemplate, containerTemplate = void 0 === _options$containerTem ? defaultContainerTemplate : _options$containerTem, _options$prerenderTem = options.prerenderTemplate, prerenderTemplate = void 0 === _options$prerenderTem ? null : _options$prerenderTem, validate = options.validate, _options$eligible = options.eligible, eligible = void 0 === _options$eligible ? function() {\n return {\n eligible: !0\n };\n } : _options$eligible, _options$logger = options.logger, logger = void 0 === _options$logger ? {\n info: src_util_noop\n } : _options$logger, _options$exports = options.exports, xportsDefinition = void 0 === _options$exports ? src_util_noop : _options$exports, method = options.method, _options$children = options.children, children = void 0 === _options$children ? function() {\n return {};\n } : _options$children;\n var name = tag.replace(/-/g, \"_\");\n var propsDef = _extends({}, {\n window: {\n type: PROP_TYPE.OBJECT,\n sendToChild: !1,\n required: !1,\n allowDelegate: !0,\n validate: function(_ref2) {\n var value = _ref2.value;\n if (!isWindow(value) && !window_ProxyWindow.isProxyWindow(value)) throw new Error(\"Expected Window or ProxyWindow\");\n if (isWindow(value)) {\n if (isWindowClosed(value)) throw new Error(\"Window is closed\");\n if (!isSameDomain(value)) throw new Error(\"Window is not same domain\");\n }\n },\n decorate: function(_ref3) {\n return setup_toProxyWindow(_ref3.value);\n }\n },\n timeout: {\n type: PROP_TYPE.NUMBER,\n required: !1,\n sendToChild: !1\n },\n cspNonce: {\n type: PROP_TYPE.STRING,\n required: !1\n },\n onDisplay: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRendered: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRender: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onClose: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onDestroy: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onResize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n onFocus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n close: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref4) {\n return _ref4.close;\n }\n },\n focus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref5) {\n return _ref5.focus;\n }\n },\n resize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref6) {\n return _ref6.resize;\n }\n },\n uid: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref7) {\n return _ref7.uid;\n }\n },\n tag: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref8) {\n return _ref8.tag;\n }\n },\n getParent: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref9) {\n return _ref9.getParent;\n }\n },\n getParentDomain: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref10) {\n return _ref10.getParentDomain;\n }\n },\n show: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref11) {\n return _ref11.show;\n }\n },\n hide: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref12) {\n return _ref12.hide;\n }\n },\n export: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref13) {\n return _ref13.export;\n }\n },\n onError: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref14) {\n return _ref14.onError;\n }\n },\n onProps: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref15) {\n return _ref15.onProps;\n }\n },\n getSiblings: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref16) {\n return _ref16.getSiblings;\n }\n }\n }, props);\n if (!containerTemplate) throw new Error(\"Container template required\");\n return {\n name: name,\n tag: tag,\n url: url,\n domain: domain,\n bridgeUrl: bridgeUrl,\n method: method,\n propsDef: propsDef,\n dimensions: dimensions,\n autoResize: autoResize,\n allowedParentDomains: allowedParentDomains,\n attributes: attributes,\n defaultContext: defaultContext,\n containerTemplate: containerTemplate,\n prerenderTemplate: prerenderTemplate,\n validate: validate,\n logger: logger,\n eligible: eligible,\n children: children,\n exports: \"function\" == typeof xportsDefinition ? xportsDefinition : function(_ref) {\n var getExports = _ref.getExports;\n var result = {};\n var _loop = function(_i2, _Object$keys2) {\n var key = _Object$keys2[_i2];\n var type = xportsDefinition[key].type;\n var valuePromise = getExports().then((function(res) {\n return res[key];\n }));\n result[key] = type === PROP_TYPE.FUNCTION ? function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return valuePromise.then((function(value) {\n return value.apply(void 0, args);\n }));\n } : valuePromise;\n };\n for (var _i2 = 0, _Object$keys2 = Object.keys(xportsDefinition); _i2 < _Object$keys2.length; _i2++) _loop(_i2, _Object$keys2);\n return result;\n }\n };\n }(opts);\n var name = options.name, tag = options.tag, defaultContext = options.defaultContext, eligible = options.eligible, children = options.children;\n var global = lib_global_getGlobal(window);\n var instances = [];\n var isChild = function() {\n if (function(name) {\n try {\n return parseWindowName(window.name).name === name;\n } catch (err) {}\n return !1;\n }(name)) {\n var _payload = getInitialParentPayload().payload;\n if (_payload.tag === tag && matchDomain(_payload.childDomainMatch, getDomain())) return !0;\n }\n return !1;\n };\n var registerChild = memoize((function() {\n if (isChild()) {\n if (window.xprops) {\n delete global.components[tag];\n throw new Error(\"Can not register \" + name + \" as child - child already registered\");\n }\n var child = function(options) {\n var tag = options.tag, propsDef = options.propsDef, autoResize = options.autoResize, allowedParentDomains = options.allowedParentDomains;\n var onPropHandlers = [];\n var _getInitialParentPayl = getInitialParentPayload(), parent = _getInitialParentPayl.parent, payload = _getInitialParentPayl.payload;\n var parentComponentWindow = parent.win, parentDomain = parent.domain;\n var props;\n var exportsPromise = new promise_ZalgoPromise;\n var version = payload.version, uid = payload.uid, parentExports = payload.exports, context = payload.context, initialProps = payload.props;\n if (\"9_0_86\" !== version) throw new Error(\"Parent window has zoid version \" + version + \", child window has version 9_0_86\");\n var show = parentExports.show, hide = parentExports.hide, close = parentExports.close, onError = parentExports.onError, checkClose = parentExports.checkClose, parentExport = parentExports.export, parentResize = parentExports.resize, parentInit = parentExports.init;\n var getParent = function() {\n return parentComponentWindow;\n };\n var getParentDomain = function() {\n return parentDomain;\n };\n var onProps = function(handler) {\n onPropHandlers.push(handler);\n return {\n cancel: function() {\n onPropHandlers.splice(onPropHandlers.indexOf(handler), 1);\n }\n };\n };\n var resize = function(_ref) {\n return parentResize.fireAndForget({\n width: _ref.width,\n height: _ref.height\n });\n };\n var xport = function(xports) {\n exportsPromise.resolve(xports);\n return parentExport(xports);\n };\n var getSiblings = function(_temp) {\n var anyParent = (void 0 === _temp ? {} : _temp).anyParent;\n var result = [];\n var currentParent = props.parent;\n void 0 === anyParent && (anyParent = !currentParent);\n if (!anyParent && !currentParent) throw new Error(\"No parent found for \" + tag + \" child\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(window); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var win = _getAllFramesInWindow2[_i2];\n if (isSameDomain(win)) {\n var xprops = assertSameDomain(win).xprops;\n if (xprops && getParent() === xprops.getParent()) {\n var winParent = xprops.parent;\n if (anyParent || !currentParent || winParent && winParent.uid === currentParent.uid) {\n var xports = tryGlobal(win, (function(global) {\n return global.exports;\n }));\n result.push({\n props: xprops,\n exports: xports\n });\n }\n }\n }\n }\n return result;\n };\n var setProps = function(newProps, origin, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var normalizedProps = function(parentComponentWindow, propsDef, props, origin, helpers, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n if (!prop || !prop.sameDomain || origin === getDomain(window) && isSameDomain(parentComponentWindow)) {\n var value = normalizeChildProp(propsDef, 0, key, props[key], helpers);\n result[key] = value;\n prop && prop.alias && !result[prop.alias] && (result[prop.alias] = value);\n }\n }\n if (!isUpdate) for (var _i4 = 0, _Object$keys4 = Object.keys(propsDef); _i4 < _Object$keys4.length; _i4++) {\n var _key = _Object$keys4[_i4];\n props.hasOwnProperty(_key) || (result[_key] = normalizeChildProp(propsDef, 0, _key, void 0, helpers));\n }\n return result;\n }(parentComponentWindow, propsDef, newProps, origin, {\n tag: tag,\n show: show,\n hide: hide,\n close: close,\n focus: child_focus,\n onError: onError,\n resize: resize,\n getSiblings: getSiblings,\n onProps: onProps,\n getParent: getParent,\n getParentDomain: getParentDomain,\n uid: uid,\n export: xport\n }, isUpdate);\n props ? extend(props, normalizedProps) : props = normalizedProps;\n for (var _i4 = 0; _i4 < onPropHandlers.length; _i4++) (0, onPropHandlers[_i4])(props);\n };\n var updateProps = function(newProps) {\n return promise_ZalgoPromise.try((function() {\n return setProps(newProps, parentDomain, !0);\n }));\n };\n return {\n init: function() {\n return promise_ZalgoPromise.try((function() {\n isSameDomain(parentComponentWindow) && function(_ref3) {\n var componentName = _ref3.componentName, parentComponentWindow = _ref3.parentComponentWindow;\n var _crossDomainDeseriali2 = crossDomainDeserialize({\n data: parseWindowName(window.name).serializedInitialPayload,\n sender: {\n win: parentComponentWindow\n },\n basic: !0\n }), sender = _crossDomainDeseriali2.sender;\n if (\"uid\" === _crossDomainDeseriali2.reference.type || \"global\" === _crossDomainDeseriali2.metaData.windowRef.type) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: _crossDomainDeseriali2.data,\n metaData: {\n windowRef: window_getWindowRef(parentComponentWindow)\n },\n sender: {\n domain: sender.domain\n },\n receiver: {\n win: window,\n domain: getDomain()\n },\n basic: !0\n });\n window.name = buildChildWindowName({\n name: componentName,\n serializedPayload: _crossDomainSerialize.serializedData\n });\n }\n }({\n componentName: options.name,\n parentComponentWindow: parentComponentWindow\n });\n lib_global_getGlobal(window).exports = options.exports({\n getExports: function() {\n return exportsPromise;\n }\n });\n !function(allowedParentDomains, domain) {\n if (!matchDomain(allowedParentDomains, domain)) throw new Error(\"Can not be rendered by domain: \" + domain);\n }(allowedParentDomains, parentDomain);\n markWindowKnown(parentComponentWindow);\n !function() {\n window.addEventListener(\"beforeunload\", (function() {\n checkClose.fireAndForget();\n }));\n window.addEventListener(\"unload\", (function() {\n checkClose.fireAndForget();\n }));\n onCloseWindow(parentComponentWindow, (function() {\n child_destroy();\n }));\n }();\n return parentInit({\n updateProps: updateProps,\n close: child_destroy\n });\n })).then((function() {\n return (_autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, \n _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, \n _autoResize$element = autoResize.element, elementReady(void 0 === _autoResize$element ? \"body\" : _autoResize$element).catch(src_util_noop).then((function(element) {\n return {\n width: width,\n height: height,\n element: element\n };\n }))).then((function(_ref3) {\n var width = _ref3.width, height = _ref3.height, element = _ref3.element;\n element && (width || height) && context !== CONTEXT.POPUP && onResize(element, (function(_ref4) {\n resize({\n width: width ? _ref4.width : void 0,\n height: height ? _ref4.height : void 0\n });\n }), {\n width: width,\n height: height\n });\n }));\n var _autoResize$width, width, _autoResize$height, height, _autoResize$element;\n })).catch((function(err) {\n onError(err);\n }));\n },\n getProps: function() {\n if (props) return props;\n setProps(initialProps, parentDomain);\n return props;\n }\n };\n }(options);\n child.init();\n return child;\n }\n }));\n registerChild();\n !function() {\n var allowDelegateListener = on_on(\"zoid_allow_delegate_\" + name, (function() {\n return !0;\n }));\n var delegateListener = on_on(\"zoid_delegate_\" + name, (function(_ref2) {\n var _ref2$data = _ref2.data;\n return {\n parent: parentComponent({\n uid: _ref2$data.uid,\n options: options,\n overrides: _ref2$data.overrides,\n parentWin: _ref2.source\n })\n };\n }));\n cleanZoid.register(allowDelegateListener.cancel);\n cleanZoid.register(delegateListener.cancel);\n }();\n global.components = global.components || {};\n if (global.components[tag]) throw new Error(\"Can not register multiple components with the same tag: \" + tag);\n global.components[tag] = !0;\n return {\n init: function init(inputProps) {\n var instance;\n var uid = \"zoid-\" + tag + \"-\" + uniqueID();\n var props = inputProps || {};\n var _eligible = eligible({\n props: props\n }), eligibility = _eligible.eligible, reason = _eligible.reason;\n var onDestroy = props.onDestroy;\n props.onDestroy = function() {\n instance && eligibility && instances.splice(instances.indexOf(instance), 1);\n if (onDestroy) return onDestroy.apply(void 0, arguments);\n };\n var parent = parentComponent({\n uid: uid,\n options: options\n });\n parent.init();\n eligibility ? parent.setProps(props) : props.onDestroy && props.onDestroy();\n cleanInstances.register((function(err) {\n return parent.destroy(err || new Error(\"zoid destroyed all components\"));\n }));\n var clone = function(_temp) {\n var _ref4$decorate = (void 0 === _temp ? {} : _temp).decorate;\n return init((void 0 === _ref4$decorate ? identity : _ref4$decorate)(props));\n };\n var _render = function(target, container, context) {\n return promise_ZalgoPromise.try((function() {\n if (!eligibility) {\n var err = new Error(reason || name + \" component is not eligible\");\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }\n if (!isWindow(target)) throw new Error(\"Must pass window to renderTo\");\n return function(props, context) {\n return promise_ZalgoPromise.try((function() {\n if (props.window) return setup_toProxyWindow(props.window).getType();\n if (context) {\n if (context !== CONTEXT.IFRAME && context !== CONTEXT.POPUP) throw new Error(\"Unrecognized context: \" + context);\n return context;\n }\n return defaultContext;\n }));\n }(props, context);\n })).then((function(finalContext) {\n container = function(context, container) {\n if (container) {\n if (\"string\" != typeof container && !isElement(container)) throw new TypeError(\"Expected string or element selector to be passed\");\n return container;\n }\n if (context === CONTEXT.POPUP) return \"body\";\n throw new Error(\"Expected element to be passed to render iframe\");\n }(finalContext, container);\n if (target !== window && \"string\" != typeof container) throw new Error(\"Must pass string element when rendering to another window\");\n return parent.render({\n target: target,\n container: container,\n context: finalContext,\n rerender: function() {\n var newInstance = clone();\n extend(instance, newInstance);\n return newInstance.renderTo(target, container, context);\n }\n });\n })).catch((function(err) {\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }));\n };\n instance = _extends({}, parent.getExports(), parent.getHelpers(), function() {\n var childComponents = children();\n var result = {};\n var _loop2 = function(_i4, _Object$keys4) {\n var childName = _Object$keys4[_i4];\n var Child = childComponents[childName];\n result[childName] = function(childInputProps) {\n var parentProps = parent.getProps();\n var childProps = _extends({}, childInputProps, {\n parent: {\n uid: uid,\n props: parentProps,\n export: parent.export\n }\n });\n return Child(childProps);\n };\n };\n for (var _i4 = 0, _Object$keys4 = Object.keys(childComponents); _i4 < _Object$keys4.length; _i4++) _loop2(_i4, _Object$keys4);\n return result;\n }(), {\n isEligible: function() {\n return eligibility;\n },\n clone: clone,\n render: function(container, context) {\n return _render(window, container, context);\n },\n renderTo: function(target, container, context) {\n return _render(target, container, context);\n }\n });\n eligibility && instances.push(instance);\n return instance;\n },\n instances: instances,\n driver: function(driverName, dep) {\n throw new Error(\"Driver support not enabled\");\n },\n isChild: isChild,\n canRenderTo: function(win) {\n return send_send(win, \"zoid_allow_delegate_\" + name).then((function(_ref3) {\n return _ref3.data;\n })).catch((function() {\n return !1;\n }));\n },\n registerChild: registerChild\n };\n }\n var component_create = function(options) {\n !function() {\n if (!global_getGlobal().initialized) {\n global_getGlobal().initialized = !0;\n on = (_ref3 = {\n on: on_on,\n send: send_send\n }).on, send = _ref3.send, (global = global_getGlobal()).receiveMessage = global.receiveMessage || function(message) {\n return receive_receiveMessage(message, {\n on: on,\n send: send\n });\n };\n !function(_ref5) {\n var on = _ref5.on, send = _ref5.send;\n globalStore().getOrSet(\"postMessageListener\", (function() {\n return addEventListener(window, \"message\", (function(event) {\n !function(event, _ref4) {\n var on = _ref4.on, send = _ref4.send;\n promise_ZalgoPromise.try((function() {\n var source = event.source || event.sourceElement;\n var origin = event.origin || event.originalEvent && event.originalEvent.origin;\n var data = event.data;\n \"null\" === origin && (origin = \"file://\");\n if (source) {\n if (!origin) throw new Error(\"Post message did not have origin domain\");\n receive_receiveMessage({\n source: source,\n origin: origin,\n data: data\n }, {\n on: on,\n send: send\n });\n }\n }));\n }(event, {\n on: on,\n send: send\n });\n }));\n }));\n }({\n on: on_on,\n send: send_send\n });\n !function(_ref8) {\n var on = _ref8.on, send = _ref8.send;\n globalStore(\"builtinListeners\").getOrSet(\"helloListener\", (function() {\n var listener = on(\"postrobot_hello\", {\n domain: \"*\"\n }, (function(_ref3) {\n resolveHelloPromise(_ref3.source, {\n domain: _ref3.origin\n });\n return {\n instanceID: getInstanceID()\n };\n }));\n var parent = getAncestor();\n parent && sayHello(parent, {\n send: send\n }).catch((function(err) {}));\n return listener;\n }));\n }({\n on: on_on,\n send: send_send\n });\n }\n var _ref3, on, send, global;\n }();\n var comp = component(options);\n var init = function(props) {\n return comp.init(props);\n };\n init.driver = function(name, dep) {\n return comp.driver(name, dep);\n };\n init.isChild = function() {\n return comp.isChild();\n };\n init.canRenderTo = function(win) {\n return comp.canRenderTo(win);\n };\n init.instances = comp.instances;\n var child = comp.registerChild();\n child && (window.xprops = init.xprops = child.getProps());\n return init;\n };\n function destroyComponents(err) {\n var destroyPromise = cleanInstances.all(err);\n cleanInstances = cleanup();\n return destroyPromise;\n }\n var destroyAll = destroyComponents;\n function component_destroy(err) {\n destroyAll();\n delete window.__zoid_9_0_86__;\n !function() {\n !function() {\n var responseListeners = globalStore(\"responseListeners\");\n for (var _i2 = 0, _responseListeners$ke2 = responseListeners.keys(); _i2 < _responseListeners$ke2.length; _i2++) {\n var hash = _responseListeners$ke2[_i2];\n var listener = responseListeners.get(hash);\n listener && (listener.cancelled = !0);\n responseListeners.del(hash);\n }\n }();\n (listener = globalStore().get(\"postMessageListener\")) && listener.cancel();\n var listener;\n delete window.__post_robot_10_0_44__;\n }();\n return cleanZoid.all(err);\n }\n } ]);\n}));","!function(root, factory) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = factory() : \"function\" == typeof define && define.amd ? define(\"zoid\", [], factory) : \"object\" == typeof exports ? exports.zoid = factory() : root.zoid = factory();\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function(modules) {\n var installedModules = {};\n function __webpack_require__(moduleId) {\n if (installedModules[moduleId]) return installedModules[moduleId].exports;\n var module = installedModules[moduleId] = {\n i: moduleId,\n l: !1,\n exports: {}\n };\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n module.l = !0;\n return module.exports;\n }\n __webpack_require__.m = modules;\n __webpack_require__.c = installedModules;\n __webpack_require__.d = function(exports, name, getter) {\n __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {\n enumerable: !0,\n get: getter\n });\n };\n __webpack_require__.r = function(exports) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {\n value: \"Module\"\n });\n Object.defineProperty(exports, \"__esModule\", {\n value: !0\n });\n };\n __webpack_require__.t = function(value, mode) {\n 1 & mode && (value = __webpack_require__(value));\n if (8 & mode) return value;\n if (4 & mode && \"object\" == typeof value && value && value.__esModule) return value;\n var ns = Object.create(null);\n __webpack_require__.r(ns);\n Object.defineProperty(ns, \"default\", {\n enumerable: !0,\n value: value\n });\n if (2 & mode && \"string\" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {\n return value[key];\n }.bind(null, key));\n return ns;\n };\n __webpack_require__.n = function(module) {\n var getter = module && module.__esModule ? function() {\n return module.default;\n } : function() {\n return module;\n };\n __webpack_require__.d(getter, \"a\", getter);\n return getter;\n };\n __webpack_require__.o = function(object, property) {\n return {}.hasOwnProperty.call(object, property);\n };\n __webpack_require__.p = \"\";\n return __webpack_require__(__webpack_require__.s = 0);\n }([ function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_require__.r(__webpack_exports__);\n __webpack_require__.d(__webpack_exports__, \"PopupOpenError\", (function() {\n return dom_PopupOpenError;\n }));\n __webpack_require__.d(__webpack_exports__, \"create\", (function() {\n return component_create;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroy\", (function() {\n return component_destroy;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyComponents\", (function() {\n return destroyComponents;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyAll\", (function() {\n return destroyAll;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_TYPE\", (function() {\n return PROP_TYPE;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_SERIALIZATION\", (function() {\n return PROP_SERIALIZATION;\n }));\n __webpack_require__.d(__webpack_exports__, \"CONTEXT\", (function() {\n return CONTEXT;\n }));\n __webpack_require__.d(__webpack_exports__, \"EVENT\", (function() {\n return EVENT;\n }));\n function _setPrototypeOf(o, p) {\n return (_setPrototypeOf = Object.setPrototypeOf || function(o, p) {\n o.__proto__ = p;\n return o;\n })(o, p);\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _extends() {\n return (_extends = Object.assign || function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) ({}).hasOwnProperty.call(source, key) && (target[key] = source[key]);\n }\n return target;\n }).apply(this, arguments);\n }\n function utils_isPromise(item) {\n try {\n if (!item) return !1;\n if (\"undefined\" != typeof Promise && item instanceof Promise) return !0;\n if (\"undefined\" != typeof window && \"function\" == typeof window.Window && item instanceof window.Window) return !1;\n if (\"undefined\" != typeof window && \"function\" == typeof window.constructor && item instanceof window.constructor) return !1;\n var _toString = {}.toString;\n if (_toString) {\n var name = _toString.call(item);\n if (\"[object Window]\" === name || \"[object global]\" === name || \"[object DOMWindow]\" === name) return !1;\n }\n if (\"function\" == typeof item.then) return !0;\n } catch (err) {\n return !1;\n }\n return !1;\n }\n var dispatchedErrors = [];\n var possiblyUnhandledPromiseHandlers = [];\n var activeCount = 0;\n var flushPromise;\n function flushActive() {\n if (!activeCount && flushPromise) {\n var promise = flushPromise;\n flushPromise = null;\n promise.resolve();\n }\n }\n function startActive() {\n activeCount += 1;\n }\n function endActive() {\n activeCount -= 1;\n flushActive();\n }\n var promise_ZalgoPromise = function() {\n function ZalgoPromise(handler) {\n var _this = this;\n this.resolved = void 0;\n this.rejected = void 0;\n this.errorHandled = void 0;\n this.value = void 0;\n this.error = void 0;\n this.handlers = void 0;\n this.dispatching = void 0;\n this.stack = void 0;\n this.resolved = !1;\n this.rejected = !1;\n this.errorHandled = !1;\n this.handlers = [];\n if (handler) {\n var _result;\n var _error;\n var resolved = !1;\n var rejected = !1;\n var isAsync = !1;\n startActive();\n try {\n handler((function(res) {\n if (isAsync) _this.resolve(res); else {\n resolved = !0;\n _result = res;\n }\n }), (function(err) {\n if (isAsync) _this.reject(err); else {\n rejected = !0;\n _error = err;\n }\n }));\n } catch (err) {\n endActive();\n this.reject(err);\n return;\n }\n endActive();\n isAsync = !0;\n resolved ? this.resolve(_result) : rejected && this.reject(_error);\n }\n }\n var _proto = ZalgoPromise.prototype;\n _proto.resolve = function(result) {\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(result)) throw new Error(\"Can not resolve promise with another promise\");\n this.resolved = !0;\n this.value = result;\n this.dispatch();\n return this;\n };\n _proto.reject = function(error) {\n var _this2 = this;\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(error)) throw new Error(\"Can not reject promise with another promise\");\n if (!error) {\n var _err = error && \"function\" == typeof error.toString ? error.toString() : {}.toString.call(error);\n error = new Error(\"Expected reject to be called with Error, got \" + _err);\n }\n this.rejected = !0;\n this.error = error;\n this.errorHandled || setTimeout((function() {\n _this2.errorHandled || function(err, promise) {\n if (-1 === dispatchedErrors.indexOf(err)) {\n dispatchedErrors.push(err);\n setTimeout((function() {\n throw err;\n }), 1);\n for (var j = 0; j < possiblyUnhandledPromiseHandlers.length; j++) possiblyUnhandledPromiseHandlers[j](err, promise);\n }\n }(error, _this2);\n }), 1);\n this.dispatch();\n return this;\n };\n _proto.asyncReject = function(error) {\n this.errorHandled = !0;\n this.reject(error);\n return this;\n };\n _proto.dispatch = function() {\n var resolved = this.resolved, rejected = this.rejected, handlers = this.handlers;\n if (!this.dispatching && (resolved || rejected)) {\n this.dispatching = !0;\n startActive();\n var chain = function(firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n secondPromise.resolve(res);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < handlers.length; i++) {\n var _handlers$i = handlers[i], onSuccess = _handlers$i.onSuccess, onError = _handlers$i.onError, promise = _handlers$i.promise;\n var _result2 = void 0;\n if (resolved) try {\n _result2 = onSuccess ? onSuccess(this.value) : this.value;\n } catch (err) {\n promise.reject(err);\n continue;\n } else if (rejected) {\n if (!onError) {\n promise.reject(this.error);\n continue;\n }\n try {\n _result2 = onError(this.error);\n } catch (err) {\n promise.reject(err);\n continue;\n }\n }\n if (_result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected)) {\n var promiseResult = _result2;\n promiseResult.resolved ? promise.resolve(promiseResult.value) : promise.reject(promiseResult.error);\n promiseResult.errorHandled = !0;\n } else utils_isPromise(_result2) ? _result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected) ? _result2.resolved ? promise.resolve(_result2.value) : promise.reject(_result2.error) : chain(_result2, promise) : promise.resolve(_result2);\n }\n handlers.length = 0;\n this.dispatching = !1;\n endActive();\n }\n };\n _proto.then = function(onSuccess, onError) {\n if (onSuccess && \"function\" != typeof onSuccess && !onSuccess.call) throw new Error(\"Promise.then expected a function for success handler\");\n if (onError && \"function\" != typeof onError && !onError.call) throw new Error(\"Promise.then expected a function for error handler\");\n var promise = new ZalgoPromise;\n this.handlers.push({\n promise: promise,\n onSuccess: onSuccess,\n onError: onError\n });\n this.errorHandled = !0;\n this.dispatch();\n return promise;\n };\n _proto.catch = function(onError) {\n return this.then(void 0, onError);\n };\n _proto.finally = function(onFinally) {\n if (onFinally && \"function\" != typeof onFinally && !onFinally.call) throw new Error(\"Promise.finally expected a function\");\n return this.then((function(result) {\n return ZalgoPromise.try(onFinally).then((function() {\n return result;\n }));\n }), (function(err) {\n return ZalgoPromise.try(onFinally).then((function() {\n throw err;\n }));\n }));\n };\n _proto.timeout = function(time, err) {\n var _this3 = this;\n if (this.resolved || this.rejected) return this;\n var timeout = setTimeout((function() {\n _this3.resolved || _this3.rejected || _this3.reject(err || new Error(\"Promise timed out after \" + time + \"ms\"));\n }), time);\n return this.then((function(result) {\n clearTimeout(timeout);\n return result;\n }));\n };\n _proto.toPromise = function() {\n if (\"undefined\" == typeof Promise) throw new TypeError(\"Could not find Promise\");\n return Promise.resolve(this);\n };\n _proto.lazy = function() {\n this.errorHandled = !0;\n return this;\n };\n ZalgoPromise.resolve = function(value) {\n return value instanceof ZalgoPromise ? value : utils_isPromise(value) ? new ZalgoPromise((function(resolve, reject) {\n return value.then(resolve, reject);\n })) : (new ZalgoPromise).resolve(value);\n };\n ZalgoPromise.reject = function(error) {\n return (new ZalgoPromise).reject(error);\n };\n ZalgoPromise.asyncReject = function(error) {\n return (new ZalgoPromise).asyncReject(error);\n };\n ZalgoPromise.all = function(promises) {\n var promise = new ZalgoPromise;\n var count = promises.length;\n var results = [].slice();\n if (!count) {\n promise.resolve(results);\n return promise;\n }\n var chain = function(i, firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n results[i] = res;\n 0 == (count -= 1) && promise.resolve(results);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < promises.length; i++) {\n var prom = promises[i];\n if (prom instanceof ZalgoPromise) {\n if (prom.resolved) {\n results[i] = prom.value;\n count -= 1;\n continue;\n }\n } else if (!utils_isPromise(prom)) {\n results[i] = prom;\n count -= 1;\n continue;\n }\n chain(i, ZalgoPromise.resolve(prom), promise);\n }\n 0 === count && promise.resolve(results);\n return promise;\n };\n ZalgoPromise.hash = function(promises) {\n var result = {};\n var awaitPromises = [];\n var _loop = function(key) {\n if (promises.hasOwnProperty(key)) {\n var value = promises[key];\n utils_isPromise(value) ? awaitPromises.push(value.then((function(res) {\n result[key] = res;\n }))) : result[key] = value;\n }\n };\n for (var key in promises) _loop(key);\n return ZalgoPromise.all(awaitPromises).then((function() {\n return result;\n }));\n };\n ZalgoPromise.map = function(items, method) {\n return ZalgoPromise.all(items.map(method));\n };\n ZalgoPromise.onPossiblyUnhandledException = function(handler) {\n return function(handler) {\n possiblyUnhandledPromiseHandlers.push(handler);\n return {\n cancel: function() {\n possiblyUnhandledPromiseHandlers.splice(possiblyUnhandledPromiseHandlers.indexOf(handler), 1);\n }\n };\n }(handler);\n };\n ZalgoPromise.try = function(method, context, args) {\n if (method && \"function\" != typeof method && !method.call) throw new Error(\"Promise.try expected a function\");\n var result;\n startActive();\n try {\n result = method.apply(context, args || []);\n } catch (err) {\n endActive();\n return ZalgoPromise.reject(err);\n }\n endActive();\n return ZalgoPromise.resolve(result);\n };\n ZalgoPromise.delay = function(_delay) {\n return new ZalgoPromise((function(resolve) {\n setTimeout(resolve, _delay);\n }));\n };\n ZalgoPromise.isPromise = function(value) {\n return !!(value && value instanceof ZalgoPromise) || utils_isPromise(value);\n };\n ZalgoPromise.flush = function() {\n return function(Zalgo) {\n var promise = flushPromise = flushPromise || new Zalgo;\n flushActive();\n return promise;\n }(ZalgoPromise);\n };\n return ZalgoPromise;\n }();\n function isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n var WINDOW_TYPE = {\n IFRAME: \"iframe\",\n POPUP: \"popup\"\n };\n var IE_WIN_ACCESS_ERROR = \"Call was rejected by callee.\\r\\n\";\n function getActualProtocol(win) {\n void 0 === win && (win = window);\n return win.location.protocol;\n }\n function getProtocol(win) {\n void 0 === win && (win = window);\n if (win.mockDomain) {\n var protocol = win.mockDomain.split(\"//\")[0];\n if (protocol) return protocol;\n }\n return getActualProtocol(win);\n }\n function isAboutProtocol(win) {\n void 0 === win && (win = window);\n return \"about:\" === getProtocol(win);\n }\n function utils_getParent(win) {\n void 0 === win && (win = window);\n if (win) try {\n if (win.parent && win.parent !== win) return win.parent;\n } catch (err) {}\n }\n function getOpener(win) {\n void 0 === win && (win = window);\n if (win && !utils_getParent(win)) try {\n return win.opener;\n } catch (err) {}\n }\n function canReadFromWindow(win) {\n try {\n return !0;\n } catch (err) {}\n return !1;\n }\n function getActualDomain(win) {\n void 0 === win && (win = window);\n var location = win.location;\n if (!location) throw new Error(\"Can not read window location\");\n var protocol = getActualProtocol(win);\n if (!protocol) throw new Error(\"Can not read window protocol\");\n if (\"file:\" === protocol) return \"file://\";\n if (\"about:\" === protocol) {\n var parent = utils_getParent(win);\n return parent && canReadFromWindow() ? getActualDomain(parent) : \"about://\";\n }\n var host = location.host;\n if (!host) throw new Error(\"Can not read window host\");\n return protocol + \"//\" + host;\n }\n function getDomain(win) {\n void 0 === win && (win = window);\n var domain = getActualDomain(win);\n return domain && win.mockDomain && 0 === win.mockDomain.indexOf(\"mock:\") ? win.mockDomain : domain;\n }\n function isSameDomain(win) {\n if (!function(win) {\n try {\n if (win === window) return !0;\n } catch (err) {}\n try {\n var desc = Object.getOwnPropertyDescriptor(win, \"location\");\n if (desc && !1 === desc.enumerable) return !1;\n } catch (err) {}\n try {\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (function(win) {\n void 0 === win && (win = window);\n return \"mock:\" === getProtocol(win);\n }(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (getActualDomain(win) === getActualDomain(window)) return !0;\n } catch (err) {}\n return !1;\n }(win)) return !1;\n try {\n if (win === window) return !0;\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n if (getDomain(window) === getDomain(win)) return !0;\n } catch (err) {}\n return !1;\n }\n function assertSameDomain(win) {\n if (!isSameDomain(win)) throw new Error(\"Expected window to be same domain\");\n return win;\n }\n function isAncestorParent(parent, child) {\n if (!parent || !child) return !1;\n var childParent = utils_getParent(child);\n return childParent ? childParent === parent : -1 !== function(win) {\n var result = [];\n try {\n for (;win.parent !== win; ) {\n result.push(win.parent);\n win = win.parent;\n }\n } catch (err) {}\n return result;\n }(child).indexOf(parent);\n }\n function getFrames(win) {\n var result = [];\n var frames;\n try {\n frames = win.frames;\n } catch (err) {\n frames = win;\n }\n var len;\n try {\n len = frames.length;\n } catch (err) {}\n if (0 === len) return result;\n if (len) {\n for (var i = 0; i < len; i++) {\n var frame = void 0;\n try {\n frame = frames[i];\n } catch (err) {\n continue;\n }\n result.push(frame);\n }\n return result;\n }\n for (var _i = 0; _i < 100; _i++) {\n var _frame = void 0;\n try {\n _frame = frames[_i];\n } catch (err) {\n return result;\n }\n if (!_frame) return result;\n result.push(_frame);\n }\n return result;\n }\n function getAllChildFrames(win) {\n var result = [];\n for (var _i3 = 0, _getFrames2 = getFrames(win); _i3 < _getFrames2.length; _i3++) {\n var frame = _getFrames2[_i3];\n result.push(frame);\n for (var _i5 = 0, _getAllChildFrames2 = getAllChildFrames(frame); _i5 < _getAllChildFrames2.length; _i5++) result.push(_getAllChildFrames2[_i5]);\n }\n return result;\n }\n function getTop(win) {\n void 0 === win && (win = window);\n try {\n if (win.top) return win.top;\n } catch (err) {}\n if (utils_getParent(win) === win) return win;\n try {\n if (isAncestorParent(window, win) && window.top) return window.top;\n } catch (err) {}\n try {\n if (isAncestorParent(win, window) && window.top) return window.top;\n } catch (err) {}\n for (var _i7 = 0, _getAllChildFrames4 = getAllChildFrames(win); _i7 < _getAllChildFrames4.length; _i7++) {\n var frame = _getAllChildFrames4[_i7];\n try {\n if (frame.top) return frame.top;\n } catch (err) {}\n if (utils_getParent(frame) === frame) return frame;\n }\n }\n function getAllFramesInWindow(win) {\n var top = getTop(win);\n if (!top) throw new Error(\"Can not determine top window\");\n var result = [].concat(getAllChildFrames(top), [ top ]);\n -1 === result.indexOf(win) && (result = [].concat(result, [ win ], getAllChildFrames(win)));\n return result;\n }\n var iframeWindows = [];\n var iframeFrames = [];\n function isWindowClosed(win, allowMock) {\n void 0 === allowMock && (allowMock = !0);\n try {\n if (win === window) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (!win) return !0;\n } catch (err) {\n return !0;\n }\n try {\n if (win.closed) return !0;\n } catch (err) {\n return !err || err.message !== IE_WIN_ACCESS_ERROR;\n }\n if (allowMock && isSameDomain(win)) try {\n if (win.mockclosed) return !0;\n } catch (err) {}\n try {\n if (!win.parent || !win.top) return !0;\n } catch (err) {}\n var iframeIndex = function(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }(iframeWindows, win);\n if (-1 !== iframeIndex) {\n var frame = iframeFrames[iframeIndex];\n if (frame && function(frame) {\n if (!frame.contentWindow) return !0;\n if (!frame.parentNode) return !0;\n var doc = frame.ownerDocument;\n if (doc && doc.documentElement && !doc.documentElement.contains(frame)) {\n var parent = frame;\n for (;parent.parentNode && parent.parentNode !== parent; ) parent = parent.parentNode;\n if (!parent.host || !doc.documentElement.contains(parent.host)) return !0;\n }\n return !1;\n }(frame)) return !0;\n }\n return !1;\n }\n function utils_getUserAgent(win) {\n return (win = win || window).navigator.mockUserAgent || win.navigator.userAgent;\n }\n function getFrameByName(win, name) {\n var winFrames = getFrames(win);\n for (var _i9 = 0; _i9 < winFrames.length; _i9++) {\n var childFrame = winFrames[_i9];\n try {\n if (isSameDomain(childFrame) && childFrame.name === name && -1 !== winFrames.indexOf(childFrame)) return childFrame;\n } catch (err) {}\n }\n try {\n if (-1 !== winFrames.indexOf(win.frames[name])) return win.frames[name];\n } catch (err) {}\n try {\n if (-1 !== winFrames.indexOf(win[name])) return win[name];\n } catch (err) {}\n }\n function isOpener(parent, child) {\n return parent === getOpener(child);\n }\n function getAncestor(win) {\n void 0 === win && (win = window);\n return getOpener(win = win || window) || utils_getParent(win) || void 0;\n }\n function anyMatch(collection1, collection2) {\n for (var _i17 = 0; _i17 < collection1.length; _i17++) {\n var item1 = collection1[_i17];\n for (var _i19 = 0; _i19 < collection2.length; _i19++) if (item1 === collection2[_i19]) return !0;\n }\n return !1;\n }\n function getDistanceFromTop(win) {\n void 0 === win && (win = window);\n var distance = 0;\n var parent = win;\n for (;parent; ) (parent = utils_getParent(parent)) && (distance += 1);\n return distance;\n }\n function isSameTopWindow(win1, win2) {\n var top1 = getTop(win1) || win1;\n var top2 = getTop(win2) || win2;\n try {\n if (top1 && top2) return top1 === top2;\n } catch (err) {}\n var allFrames1 = getAllFramesInWindow(win1);\n var allFrames2 = getAllFramesInWindow(win2);\n if (anyMatch(allFrames1, allFrames2)) return !0;\n var opener1 = getOpener(top1);\n var opener2 = getOpener(top2);\n return opener1 && anyMatch(getAllFramesInWindow(opener1), allFrames2) || opener2 && anyMatch(getAllFramesInWindow(opener2), allFrames1), \n !1;\n }\n function matchDomain(pattern, origin) {\n if (\"string\" == typeof pattern) {\n if (\"string\" == typeof origin) return \"*\" === pattern || origin === pattern;\n if (isRegex(origin)) return !1;\n if (Array.isArray(origin)) return !1;\n }\n return isRegex(pattern) ? isRegex(origin) ? pattern.toString() === origin.toString() : !Array.isArray(origin) && Boolean(origin.match(pattern)) : !!Array.isArray(pattern) && (Array.isArray(origin) ? JSON.stringify(pattern) === JSON.stringify(origin) : !isRegex(origin) && pattern.some((function(subpattern) {\n return matchDomain(subpattern, origin);\n })));\n }\n function getDomainFromUrl(url) {\n return url.match(/^(https?|mock|file):\\/\\//) ? url.split(\"/\").slice(0, 3).join(\"/\") : getDomain();\n }\n function onCloseWindow(win, callback, delay, maxtime) {\n void 0 === delay && (delay = 1e3);\n void 0 === maxtime && (maxtime = 1 / 0);\n var timeout;\n !function check() {\n if (isWindowClosed(win)) {\n timeout && clearTimeout(timeout);\n return callback();\n }\n if (maxtime <= 0) clearTimeout(timeout); else {\n maxtime -= delay;\n timeout = setTimeout(check, delay);\n }\n }();\n return {\n cancel: function() {\n timeout && clearTimeout(timeout);\n }\n };\n }\n function isWindow(obj) {\n try {\n if (obj === window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (\"[object Window]\" === {}.toString.call(obj)) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (window.Window && obj instanceof window.Window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.self === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.parent === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.top === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && \"__unlikely_value__\" === obj.__cross_domain_utils_window_check__) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (\"postMessage\" in obj && \"self\" in obj && \"location\" in obj) return !0;\n } catch (err) {}\n return !1;\n }\n function normalizeMockUrl(url) {\n if (!(domain = getDomainFromUrl(url), 0 === domain.indexOf(\"mock:\"))) return url;\n var domain;\n throw new Error(\"Mock urls not supported out of test mode\");\n }\n function getFrameForWindow(win) {\n if (isSameDomain(win)) return assertSameDomain(win).frameElement;\n for (var _i21 = 0, _document$querySelect2 = document.querySelectorAll(\"iframe\"); _i21 < _document$querySelect2.length; _i21++) {\n var frame = _document$querySelect2[_i21];\n if (frame && frame.contentWindow && frame.contentWindow === win) return frame;\n }\n }\n function closeWindow(win) {\n if (function(win) {\n void 0 === win && (win = window);\n return Boolean(utils_getParent(win));\n }(win)) {\n var frame = getFrameForWindow(win);\n if (frame && frame.parentElement) {\n frame.parentElement.removeChild(frame);\n return;\n }\n }\n try {\n win.close();\n } catch (err) {}\n }\n function util_safeIndexOf(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }\n var weakmap_CrossDomainSafeWeakMap = function() {\n function CrossDomainSafeWeakMap() {\n this.name = void 0;\n this.weakmap = void 0;\n this.keys = void 0;\n this.values = void 0;\n this.name = \"__weakmap_\" + (1e9 * Math.random() >>> 0) + \"__\";\n if (function() {\n if (\"undefined\" == typeof WeakMap) return !1;\n if (void 0 === Object.freeze) return !1;\n try {\n var testWeakMap = new WeakMap;\n var testKey = {};\n Object.freeze(testKey);\n testWeakMap.set(testKey, \"__testvalue__\");\n return \"__testvalue__\" === testWeakMap.get(testKey);\n } catch (err) {\n return !1;\n }\n }()) try {\n this.weakmap = new WeakMap;\n } catch (err) {}\n this.keys = [];\n this.values = [];\n }\n var _proto = CrossDomainSafeWeakMap.prototype;\n _proto._cleanupClosedWindows = function() {\n var weakmap = this.weakmap;\n var keys = this.keys;\n for (var i = 0; i < keys.length; i++) {\n var value = keys[i];\n if (isWindow(value) && isWindowClosed(value)) {\n if (weakmap) try {\n weakmap.delete(value);\n } catch (err) {}\n keys.splice(i, 1);\n this.values.splice(i, 1);\n i -= 1;\n }\n }\n };\n _proto.isSafeToReadWrite = function(key) {\n return !isWindow(key);\n };\n _proto.set = function(key, value) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.set(key, value);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var name = this.name;\n var entry = key[name];\n entry && entry[0] === key ? entry[1] = value : Object.defineProperty(key, name, {\n value: [ key, value ],\n writable: !0\n });\n return;\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var values = this.values;\n var index = util_safeIndexOf(keys, key);\n if (-1 === index) {\n keys.push(key);\n values.push(value);\n } else values[index] = value;\n };\n _proto.get = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return weakmap.get(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return entry && entry[0] === key ? entry[1] : void 0;\n } catch (err) {}\n this._cleanupClosedWindows();\n var index = util_safeIndexOf(this.keys, key);\n if (-1 !== index) return this.values[index];\n };\n _proto.delete = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.delete(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n entry && entry[0] === key && (entry[0] = entry[1] = void 0);\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var index = util_safeIndexOf(keys, key);\n if (-1 !== index) {\n keys.splice(index, 1);\n this.values.splice(index, 1);\n }\n };\n _proto.has = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return !0;\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return !(!entry || entry[0] !== key);\n } catch (err) {}\n this._cleanupClosedWindows();\n return -1 !== util_safeIndexOf(this.keys, key);\n };\n _proto.getOrSet = function(key, getter) {\n if (this.has(key)) return this.get(key);\n var value = getter();\n this.set(key, value);\n return value;\n };\n return CrossDomainSafeWeakMap;\n }();\n function _getPrototypeOf(o) {\n return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n })(o);\n }\n function _isNativeReflectConstruct() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));\n return !0;\n } catch (e) {\n return !1;\n }\n }\n function construct_construct(Parent, args, Class) {\n return (construct_construct = _isNativeReflectConstruct() ? Reflect.construct : function(Parent, args, Class) {\n var a = [ null ];\n a.push.apply(a, args);\n var instance = new (Function.bind.apply(Parent, a));\n Class && _setPrototypeOf(instance, Class.prototype);\n return instance;\n }).apply(null, arguments);\n }\n function wrapNativeSuper_wrapNativeSuper(Class) {\n var _cache = \"function\" == typeof Map ? new Map : void 0;\n return (wrapNativeSuper_wrapNativeSuper = function(Class) {\n if (null === Class || !(fn = Class, -1 !== Function.toString.call(fn).indexOf(\"[native code]\"))) return Class;\n var fn;\n if (\"function\" != typeof Class) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== _cache) {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct_construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n })(Class);\n }\n function getFunctionName(fn) {\n return fn.name || fn.__name__ || fn.displayName || \"anonymous\";\n }\n function setFunctionName(fn, name) {\n try {\n delete fn.name;\n fn.name = name;\n } catch (err) {}\n fn.__name__ = fn.displayName = name;\n return fn;\n }\n function base64encode(str) {\n if (\"function\" == typeof btoa) return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (function(m, p1) {\n return String.fromCharCode(parseInt(p1, 16));\n }))).replace(/[=]/g, \"\");\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"utf8\").toString(\"base64\").replace(/[=]/g, \"\");\n throw new Error(\"Can not find window.btoa or Buffer\");\n }\n function uniqueID() {\n var chars = \"0123456789abcdef\";\n return \"uid_\" + \"xxxxxxxxxx\".replace(/./g, (function() {\n return chars.charAt(Math.floor(Math.random() * chars.length));\n })) + \"_\" + base64encode((new Date).toISOString().slice(11, 19).replace(\"T\", \".\")).replace(/[^a-zA-Z0-9]/g, \"\").toLowerCase();\n }\n var objectIDs;\n function serializeArgs(args) {\n try {\n return JSON.stringify([].slice.call(args), (function(subkey, val) {\n return \"function\" == typeof val ? \"memoize[\" + function(obj) {\n objectIDs = objectIDs || new weakmap_CrossDomainSafeWeakMap;\n if (null == obj || \"object\" != typeof obj && \"function\" != typeof obj) throw new Error(\"Invalid object\");\n var uid = objectIDs.get(obj);\n if (!uid) {\n uid = typeof obj + \":\" + uniqueID();\n objectIDs.set(obj, uid);\n }\n return uid;\n }(val) + \"]\" : val;\n }));\n } catch (err) {\n throw new Error(\"Arguments not serializable -- can not be used to memoize\");\n }\n }\n function getEmptyObject() {\n return {};\n }\n var memoizeGlobalIndex = 0;\n var memoizeGlobalIndexValidFrom = 0;\n function memoize(method, options) {\n void 0 === options && (options = {});\n var _options$thisNamespac = options.thisNamespace, thisNamespace = void 0 !== _options$thisNamespac && _options$thisNamespac, cacheTime = options.time;\n var simpleCache;\n var thisCache;\n var memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n var memoizedFunction = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n if (memoizeIndex < memoizeGlobalIndexValidFrom) {\n simpleCache = null;\n thisCache = null;\n memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n }\n var cache;\n cache = thisNamespace ? (thisCache = thisCache || new weakmap_CrossDomainSafeWeakMap).getOrSet(this, getEmptyObject) : simpleCache = simpleCache || {};\n var cacheKey = serializeArgs(args);\n var cacheResult = cache[cacheKey];\n if (cacheResult && cacheTime && Date.now() - cacheResult.time < cacheTime) {\n delete cache[cacheKey];\n cacheResult = null;\n }\n if (cacheResult) return cacheResult.value;\n var time = Date.now();\n var value = method.apply(this, arguments);\n cache[cacheKey] = {\n time: time,\n value: value\n };\n return value;\n };\n memoizedFunction.reset = function() {\n simpleCache = null;\n thisCache = null;\n };\n return setFunctionName(memoizedFunction, (options.name || getFunctionName(method)) + \"::memoized\");\n }\n memoize.clear = function() {\n memoizeGlobalIndexValidFrom = memoizeGlobalIndex;\n };\n function memoizePromise(method) {\n var cache = {};\n function memoizedPromiseFunction() {\n var _arguments = arguments, _this = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n var key = serializeArgs(args);\n if (cache.hasOwnProperty(key)) return cache[key];\n cache[key] = promise_ZalgoPromise.try((function() {\n return method.apply(_this, _arguments);\n })).finally((function() {\n delete cache[key];\n }));\n return cache[key];\n }\n memoizedPromiseFunction.reset = function() {\n cache = {};\n };\n return setFunctionName(memoizedPromiseFunction, getFunctionName(method) + \"::promiseMemoized\");\n }\n function src_util_noop() {}\n function once(method) {\n var called = !1;\n return setFunctionName((function() {\n if (!called) {\n called = !0;\n return method.apply(this, arguments);\n }\n }), getFunctionName(method) + \"::once\");\n }\n function stringifyError(err, level) {\n void 0 === level && (level = 1);\n if (level >= 3) return \"stringifyError stack overflow\";\n try {\n if (!err) return \"\";\n if (\"string\" == typeof err) return err;\n if (err instanceof Error) {\n var stack = err && err.stack;\n var message = err && err.message;\n if (stack && message) return -1 !== stack.indexOf(message) ? stack : message + \"\\n\" + stack;\n if (stack) return stack;\n if (message) return message;\n }\n return err && err.toString && \"function\" == typeof err.toString ? err.toString() : {}.toString.call(err);\n } catch (newErr) {\n return \"Error while stringifying error: \" + stringifyError(newErr, level + 1);\n }\n }\n function stringify(item) {\n return \"string\" == typeof item ? item : item && item.toString && \"function\" == typeof item.toString ? item.toString() : {}.toString.call(item);\n }\n function extend(obj, source) {\n if (!source) return obj;\n if (Object.assign) return Object.assign(obj, source);\n for (var key in source) source.hasOwnProperty(key) && (obj[key] = source[key]);\n return obj;\n }\n memoize((function(obj) {\n if (Object.values) return Object.values(obj);\n var result = [];\n for (var key in obj) obj.hasOwnProperty(key) && result.push(obj[key]);\n return result;\n }));\n function identity(item) {\n return item;\n }\n function safeInterval(method, time) {\n var timeout;\n !function loop() {\n timeout = setTimeout((function() {\n method();\n loop();\n }), time);\n }();\n return {\n cancel: function() {\n clearTimeout(timeout);\n }\n };\n }\n function arrayFrom(item) {\n return [].slice.call(item);\n }\n function isDefined(value) {\n return null != value;\n }\n function util_isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n function util_getOrSet(obj, key, getter) {\n if (obj.hasOwnProperty(key)) return obj[key];\n var val = getter();\n obj[key] = val;\n return val;\n }\n function cleanup(obj) {\n var tasks = [];\n var cleaned = !1;\n var cleanErr;\n var cleaner = {\n set: function(name, item) {\n if (!cleaned) {\n obj[name] = item;\n cleaner.register((function() {\n delete obj[name];\n }));\n }\n return item;\n },\n register: function(method) {\n var task = once((function() {\n return method(cleanErr);\n }));\n cleaned ? method(cleanErr) : tasks.push(task);\n return {\n cancel: function() {\n var index = tasks.indexOf(task);\n -1 !== index && tasks.splice(index, 1);\n }\n };\n },\n all: function(err) {\n cleanErr = err;\n var results = [];\n cleaned = !0;\n for (;tasks.length; ) {\n var task = tasks.shift();\n results.push(task());\n }\n return promise_ZalgoPromise.all(results).then(src_util_noop);\n }\n };\n return cleaner;\n }\n function assertExists(name, thing) {\n if (null == thing) throw new Error(\"Expected \" + name + \" to be present\");\n return thing;\n }\n var util_ExtendableError = function(_Error) {\n _inheritsLoose(ExtendableError, _Error);\n function ExtendableError(message) {\n var _this6;\n (_this6 = _Error.call(this, message) || this).name = _this6.constructor.name;\n \"function\" == typeof Error.captureStackTrace ? Error.captureStackTrace(function(self) {\n if (void 0 === self) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return self;\n }(_this6), _this6.constructor) : _this6.stack = new Error(message).stack;\n return _this6;\n }\n return ExtendableError;\n }(wrapNativeSuper_wrapNativeSuper(Error));\n function getBody() {\n var body = document.body;\n if (!body) throw new Error(\"Body element not found\");\n return body;\n }\n function isDocumentReady() {\n return Boolean(document.body) && \"complete\" === document.readyState;\n }\n function isDocumentInteractive() {\n return Boolean(document.body) && \"interactive\" === document.readyState;\n }\n function urlEncode(str) {\n return encodeURIComponent(str);\n }\n memoize((function() {\n return new promise_ZalgoPromise((function(resolve) {\n if (isDocumentReady() || isDocumentInteractive()) return resolve();\n var interval = setInterval((function() {\n if (isDocumentReady() || isDocumentInteractive()) {\n clearInterval(interval);\n return resolve();\n }\n }), 10);\n }));\n }));\n function parseQuery(queryString) {\n return function(method, logic, args) {\n void 0 === args && (args = []);\n var cache = method.__inline_memoize_cache__ = method.__inline_memoize_cache__ || {};\n var key = serializeArgs(args);\n return cache.hasOwnProperty(key) ? cache[key] : cache[key] = function() {\n var params = {};\n if (!queryString) return params;\n if (-1 === queryString.indexOf(\"=\")) return params;\n for (var _i2 = 0, _queryString$split2 = queryString.split(\"&\"); _i2 < _queryString$split2.length; _i2++) {\n var pair = _queryString$split2[_i2];\n (pair = pair.split(\"=\"))[0] && pair[1] && (params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]));\n }\n return params;\n }.apply(void 0, args);\n }(parseQuery, 0, [ queryString ]);\n }\n function extendQuery(originalQuery, props) {\n void 0 === props && (props = {});\n return props && Object.keys(props).length ? function(obj) {\n void 0 === obj && (obj = {});\n return Object.keys(obj).filter((function(key) {\n return \"string\" == typeof obj[key] || \"boolean\" == typeof obj[key];\n })).map((function(key) {\n var val = obj[key];\n if (\"string\" != typeof val && \"boolean\" != typeof val) throw new TypeError(\"Invalid type for query\");\n return urlEncode(key) + \"=\" + urlEncode(val.toString());\n })).join(\"&\");\n }(_extends({}, parseQuery(originalQuery), props)) : originalQuery;\n }\n function appendChild(container, child) {\n container.appendChild(child);\n }\n function isElement(element) {\n return element instanceof window.Element || null !== element && \"object\" == typeof element && 1 === element.nodeType && \"object\" == typeof element.style && \"object\" == typeof element.ownerDocument;\n }\n function getElementSafe(id, doc) {\n void 0 === doc && (doc = document);\n return isElement(id) ? id : \"string\" == typeof id ? doc.querySelector(id) : void 0;\n }\n function elementReady(id) {\n return new promise_ZalgoPromise((function(resolve, reject) {\n var name = stringify(id);\n var el = getElementSafe(id);\n if (el) return resolve(el);\n if (isDocumentReady()) return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n var interval = setInterval((function() {\n if (el = getElementSafe(id)) {\n resolve(el);\n clearInterval(interval);\n } else if (isDocumentReady()) {\n clearInterval(interval);\n return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n }\n }), 10);\n }));\n }\n var dom_PopupOpenError = function(_ExtendableError) {\n _inheritsLoose(PopupOpenError, _ExtendableError);\n function PopupOpenError() {\n return _ExtendableError.apply(this, arguments) || this;\n }\n return PopupOpenError;\n }(util_ExtendableError);\n var awaitFrameLoadPromises;\n function awaitFrameLoad(frame) {\n if ((awaitFrameLoadPromises = awaitFrameLoadPromises || new weakmap_CrossDomainSafeWeakMap).has(frame)) {\n var _promise = awaitFrameLoadPromises.get(frame);\n if (_promise) return _promise;\n }\n var promise = new promise_ZalgoPromise((function(resolve, reject) {\n frame.addEventListener(\"load\", (function() {\n !function(frame) {\n !function() {\n for (var i = 0; i < iframeWindows.length; i++) {\n var closed = !1;\n try {\n closed = iframeWindows[i].closed;\n } catch (err) {}\n if (closed) {\n iframeFrames.splice(i, 1);\n iframeWindows.splice(i, 1);\n }\n }\n }();\n if (frame && frame.contentWindow) try {\n iframeWindows.push(frame.contentWindow);\n iframeFrames.push(frame);\n } catch (err) {}\n }(frame);\n resolve(frame);\n }));\n frame.addEventListener(\"error\", (function(err) {\n frame.contentWindow ? resolve(frame) : reject(err);\n }));\n }));\n awaitFrameLoadPromises.set(frame, promise);\n return promise;\n }\n function awaitFrameWindow(frame) {\n return awaitFrameLoad(frame).then((function(loadedFrame) {\n if (!loadedFrame.contentWindow) throw new Error(\"Could not find window in iframe\");\n return loadedFrame.contentWindow;\n }));\n }\n function dom_iframe(options, container) {\n void 0 === options && (options = {});\n var style = options.style || {};\n var frame = function(tag, options, container) {\n void 0 === tag && (tag = \"div\");\n void 0 === options && (options = {});\n tag = tag.toLowerCase();\n var element = document.createElement(tag);\n options.style && extend(element.style, options.style);\n options.class && (element.className = options.class.join(\" \"));\n options.id && element.setAttribute(\"id\", options.id);\n if (options.attributes) for (var _i10 = 0, _Object$keys2 = Object.keys(options.attributes); _i10 < _Object$keys2.length; _i10++) {\n var key = _Object$keys2[_i10];\n element.setAttribute(key, options.attributes[key]);\n }\n options.styleSheet && function(el, styleText, doc) {\n void 0 === doc && (doc = window.document);\n el.styleSheet ? el.styleSheet.cssText = styleText : el.appendChild(doc.createTextNode(styleText));\n }(element, options.styleSheet);\n if (options.html) {\n if (\"iframe\" === tag) throw new Error(\"Iframe html can not be written unless container provided and iframe in DOM\");\n element.innerHTML = options.html;\n }\n return element;\n }(\"iframe\", {\n attributes: _extends({\n allowTransparency: \"true\"\n }, options.attributes || {}),\n style: _extends({\n backgroundColor: \"transparent\",\n border: \"none\"\n }, style),\n html: options.html,\n class: options.class\n });\n var isIE = window.navigator.userAgent.match(/MSIE|Edge/i);\n frame.hasAttribute(\"id\") || frame.setAttribute(\"id\", uniqueID());\n awaitFrameLoad(frame);\n container && function(id, doc) {\n void 0 === doc && (doc = document);\n var element = getElementSafe(id, doc);\n if (element) return element;\n throw new Error(\"Can not find element: \" + stringify(id));\n }(container).appendChild(frame);\n (options.url || isIE) && frame.setAttribute(\"src\", options.url || \"about:blank\");\n return frame;\n }\n function addEventListener(obj, event, handler) {\n obj.addEventListener(event, handler);\n return {\n cancel: function() {\n obj.removeEventListener(event, handler);\n }\n };\n }\n function showElement(element) {\n element.style.setProperty(\"display\", \"\");\n }\n function hideElement(element) {\n element.style.setProperty(\"display\", \"none\", \"important\");\n }\n function destroyElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n function isElementClosed(el) {\n return !(el && el.parentNode && el.ownerDocument && el.ownerDocument.documentElement && el.ownerDocument.documentElement.contains(el));\n }\n function onResize(el, handler, _temp) {\n var _ref2 = void 0 === _temp ? {} : _temp, _ref2$width = _ref2.width, width = void 0 === _ref2$width || _ref2$width, _ref2$height = _ref2.height, height = void 0 === _ref2$height || _ref2$height, _ref2$interval = _ref2.interval, interval = void 0 === _ref2$interval ? 100 : _ref2$interval, _ref2$win = _ref2.win, win = void 0 === _ref2$win ? window : _ref2$win;\n var currentWidth = el.offsetWidth;\n var currentHeight = el.offsetHeight;\n var canceled = !1;\n handler({\n width: currentWidth,\n height: currentHeight\n });\n var check = function() {\n if (!canceled && function(el) {\n return Boolean(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n }(el)) {\n var newWidth = el.offsetWidth;\n var newHeight = el.offsetHeight;\n (width && newWidth !== currentWidth || height && newHeight !== currentHeight) && handler({\n width: newWidth,\n height: newHeight\n });\n currentWidth = newWidth;\n currentHeight = newHeight;\n }\n };\n var observer;\n var timeout;\n win.addEventListener(\"resize\", check);\n if (void 0 !== win.ResizeObserver) {\n (observer = new win.ResizeObserver(check)).observe(el);\n timeout = safeInterval(check, 10 * interval);\n } else if (void 0 !== win.MutationObserver) {\n (observer = new win.MutationObserver(check)).observe(el, {\n attributes: !0,\n childList: !0,\n subtree: !0,\n characterData: !1\n });\n timeout = safeInterval(check, 10 * interval);\n } else timeout = safeInterval(check, interval);\n return {\n cancel: function() {\n canceled = !0;\n observer.disconnect();\n window.removeEventListener(\"resize\", check);\n timeout.cancel();\n }\n };\n }\n function isShadowElement(element) {\n for (;element.parentNode; ) element = element.parentNode;\n return \"[object ShadowRoot]\" === element.toString();\n }\n var currentScript = \"undefined\" != typeof document ? document.currentScript : null;\n var getCurrentScript = memoize((function() {\n if (currentScript) return currentScript;\n if (currentScript = function() {\n try {\n var stack = function() {\n try {\n throw new Error(\"_\");\n } catch (err) {\n return err.stack || \"\";\n }\n }();\n var stackDetails = /.*at [^(]*\\((.*):(.+):(.+)\\)$/gi.exec(stack);\n var scriptLocation = stackDetails && stackDetails[1];\n if (!scriptLocation) return;\n for (var _i22 = 0, _Array$prototype$slic2 = [].slice.call(document.getElementsByTagName(\"script\")).reverse(); _i22 < _Array$prototype$slic2.length; _i22++) {\n var script = _Array$prototype$slic2[_i22];\n if (script.src && script.src === scriptLocation) return script;\n }\n } catch (err) {}\n }()) return currentScript;\n throw new Error(\"Can not determine current script\");\n }));\n var currentUID = uniqueID();\n memoize((function() {\n var script;\n try {\n script = getCurrentScript();\n } catch (err) {\n return currentUID;\n }\n var uid = script.getAttribute(\"data-uid\");\n if (uid && \"string\" == typeof uid) return uid;\n if ((uid = script.getAttribute(\"data-uid-auto\")) && \"string\" == typeof uid) return uid;\n if (script.src) {\n var hashedString = function(str) {\n var hash = \"\";\n for (var i = 0; i < str.length; i++) {\n var total = str[i].charCodeAt(0) * i;\n str[i + 1] && (total += str[i + 1].charCodeAt(0) * (i - 1));\n hash += String.fromCharCode(97 + Math.abs(total) % 26);\n }\n return hash;\n }(JSON.stringify({\n src: script.src,\n dataset: script.dataset\n }));\n uid = \"uid_\" + hashedString.slice(hashedString.length - 30);\n } else uid = uniqueID();\n script.setAttribute(\"data-uid-auto\", uid);\n return uid;\n }));\n function isPerc(str) {\n return \"string\" == typeof str && /^[0-9]+%$/.test(str);\n }\n function toNum(val) {\n if (\"number\" == typeof val) return val;\n var match = val.match(/^([0-9]+)(px|%)$/);\n if (!match) throw new Error(\"Could not match css value from \" + val);\n return parseInt(match[1], 10);\n }\n function toPx(val) {\n return toNum(val) + \"px\";\n }\n function toCSS(val) {\n return \"number\" == typeof val ? toPx(val) : isPerc(val) ? val : toPx(val);\n }\n function normalizeDimension(dim, max) {\n if (\"number\" == typeof dim) return dim;\n if (isPerc(dim)) return parseInt(max * toNum(dim) / 100, 10);\n if (\"string\" == typeof (str = dim) && /^[0-9]+px$/.test(str)) return toNum(dim);\n var str;\n throw new Error(\"Can not normalize dimension: \" + dim);\n }\n function global_getGlobal(win) {\n void 0 === win && (win = window);\n var globalKey = \"__post_robot_10_0_44__\";\n return win !== window ? win[globalKey] : win[globalKey] = win[globalKey] || {};\n }\n var getObj = function() {\n return {};\n };\n function globalStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return util_getOrSet(global_getGlobal(), key, (function() {\n var store = defStore();\n return {\n has: function(storeKey) {\n return store.hasOwnProperty(storeKey);\n },\n get: function(storeKey, defVal) {\n return store.hasOwnProperty(storeKey) ? store[storeKey] : defVal;\n },\n set: function(storeKey, val) {\n store[storeKey] = val;\n return val;\n },\n del: function(storeKey) {\n delete store[storeKey];\n },\n getOrSet: function(storeKey, getter) {\n return util_getOrSet(store, storeKey, getter);\n },\n reset: function() {\n store = defStore();\n },\n keys: function() {\n return Object.keys(store);\n }\n };\n }));\n }\n var WildCard = function() {};\n function getWildcard() {\n var global = global_getGlobal();\n global.WINDOW_WILDCARD = global.WINDOW_WILDCARD || new WildCard;\n return global.WINDOW_WILDCARD;\n }\n function windowStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return globalStore(\"windowStore\").getOrSet(key, (function() {\n var winStore = new weakmap_CrossDomainSafeWeakMap;\n var getStore = function(win) {\n return winStore.getOrSet(win, defStore);\n };\n return {\n has: function(win) {\n return getStore(win).hasOwnProperty(key);\n },\n get: function(win, defVal) {\n var store = getStore(win);\n return store.hasOwnProperty(key) ? store[key] : defVal;\n },\n set: function(win, val) {\n getStore(win)[key] = val;\n return val;\n },\n del: function(win) {\n delete getStore(win)[key];\n },\n getOrSet: function(win, getter) {\n return util_getOrSet(getStore(win), key, getter);\n }\n };\n }));\n }\n function getInstanceID() {\n return globalStore(\"instance\").getOrSet(\"instanceID\", uniqueID);\n }\n function resolveHelloPromise(win, _ref) {\n var domain = _ref.domain;\n var helloPromises = windowStore(\"helloPromises\");\n var existingPromise = helloPromises.get(win);\n existingPromise && existingPromise.resolve({\n domain: domain\n });\n var newPromise = promise_ZalgoPromise.resolve({\n domain: domain\n });\n helloPromises.set(win, newPromise);\n return newPromise;\n }\n function sayHello(win, _ref4) {\n return (0, _ref4.send)(win, \"postrobot_hello\", {\n instanceID: getInstanceID()\n }, {\n domain: \"*\",\n timeout: -1\n }).then((function(_ref5) {\n var origin = _ref5.origin, instanceID = _ref5.data.instanceID;\n resolveHelloPromise(win, {\n domain: origin\n });\n return {\n win: win,\n domain: origin,\n instanceID: instanceID\n };\n }));\n }\n function getWindowInstanceID(win, _ref6) {\n var send = _ref6.send;\n return windowStore(\"windowInstanceIDPromises\").getOrSet(win, (function() {\n return sayHello(win, {\n send: send\n }).then((function(_ref7) {\n return _ref7.instanceID;\n }));\n }));\n }\n function awaitWindowHello(win, timeout, name) {\n void 0 === timeout && (timeout = 5e3);\n void 0 === name && (name = \"Window\");\n var promise = function(win) {\n return windowStore(\"helloPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }(win);\n -1 !== timeout && (promise = promise.timeout(timeout, new Error(name + \" did not load after \" + timeout + \"ms\")));\n return promise;\n }\n function markWindowKnown(win) {\n windowStore(\"knownWindows\").set(win, !0);\n }\n function isSerializedType(item) {\n return \"object\" == typeof item && null !== item && \"string\" == typeof item.__type__;\n }\n function determineType(val) {\n return void 0 === val ? \"undefined\" : null === val ? \"null\" : Array.isArray(val) ? \"array\" : \"function\" == typeof val ? \"function\" : \"object\" == typeof val ? val instanceof Error ? \"error\" : \"function\" == typeof val.then ? \"promise\" : \"[object RegExp]\" === {}.toString.call(val) ? \"regex\" : \"[object Date]\" === {}.toString.call(val) ? \"date\" : \"object\" : \"string\" == typeof val ? \"string\" : \"number\" == typeof val ? \"number\" : \"boolean\" == typeof val ? \"boolean\" : void 0;\n }\n function serializeType(type, val) {\n return {\n __type__: type,\n __val__: val\n };\n }\n var _SERIALIZER;\n var SERIALIZER = ((_SERIALIZER = {}).function = function() {}, _SERIALIZER.error = function(_ref) {\n return serializeType(\"error\", {\n message: _ref.message,\n stack: _ref.stack,\n code: _ref.code,\n data: _ref.data\n });\n }, _SERIALIZER.promise = function() {}, _SERIALIZER.regex = function(val) {\n return serializeType(\"regex\", val.source);\n }, _SERIALIZER.date = function(val) {\n return serializeType(\"date\", val.toJSON());\n }, _SERIALIZER.array = function(val) {\n return val;\n }, _SERIALIZER.object = function(val) {\n return val;\n }, _SERIALIZER.string = function(val) {\n return val;\n }, _SERIALIZER.number = function(val) {\n return val;\n }, _SERIALIZER.boolean = function(val) {\n return val;\n }, _SERIALIZER.null = function(val) {\n return val;\n }, _SERIALIZER[void 0] = function(val) {\n return serializeType(\"undefined\", val);\n }, _SERIALIZER);\n var defaultSerializers = {};\n var _DESERIALIZER;\n var DESERIALIZER = ((_DESERIALIZER = {}).function = function() {\n throw new Error(\"Function serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.error = function(_ref2) {\n var stack = _ref2.stack, code = _ref2.code, data = _ref2.data;\n var error = new Error(_ref2.message);\n error.code = code;\n data && (error.data = data);\n error.stack = stack + \"\\n\\n\" + error.stack;\n return error;\n }, _DESERIALIZER.promise = function() {\n throw new Error(\"Promise serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.regex = function(val) {\n return new RegExp(val);\n }, _DESERIALIZER.date = function(val) {\n return new Date(val);\n }, _DESERIALIZER.array = function(val) {\n return val;\n }, _DESERIALIZER.object = function(val) {\n return val;\n }, _DESERIALIZER.string = function(val) {\n return val;\n }, _DESERIALIZER.number = function(val) {\n return val;\n }, _DESERIALIZER.boolean = function(val) {\n return val;\n }, _DESERIALIZER.null = function(val) {\n return val;\n }, _DESERIALIZER[void 0] = function() {}, _DESERIALIZER);\n var defaultDeserializers = {};\n function needsBridgeForBrowser() {\n return !!utils_getUserAgent(window).match(/MSIE|trident|edge\\/12|edge\\/13/i);\n }\n function needsBridgeForWin(win) {\n return !isSameTopWindow(window, win);\n }\n function needsBridgeForDomain(domain, win) {\n if (domain) {\n if (getDomain() !== getDomainFromUrl(domain)) return !0;\n } else if (win && !isSameDomain(win)) return !0;\n return !1;\n }\n function needsBridge(_ref) {\n var win = _ref.win, domain = _ref.domain;\n return !(!needsBridgeForBrowser() || domain && !needsBridgeForDomain(domain, win) || win && !needsBridgeForWin(win));\n }\n function getBridgeName(domain) {\n return \"__postrobot_bridge___\" + (domain = domain || getDomainFromUrl(domain)).replace(/[^a-zA-Z0-9]+/g, \"_\");\n }\n function isBridge() {\n return Boolean(window.name && window.name === getBridgeName(getDomain()));\n }\n var documentBodyReady = new promise_ZalgoPromise((function(resolve) {\n if (window.document && window.document.body) return resolve(window.document.body);\n var interval = setInterval((function() {\n if (window.document && window.document.body) {\n clearInterval(interval);\n return resolve(window.document.body);\n }\n }), 10);\n }));\n function registerRemoteWindow(win) {\n windowStore(\"remoteWindowPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }\n function findRemoteWindow(win) {\n var remoteWinPromise = windowStore(\"remoteWindowPromises\").get(win);\n if (!remoteWinPromise) throw new Error(\"Remote window promise not found\");\n return remoteWinPromise;\n }\n function registerRemoteSendMessage(win, domain, sendMessage) {\n findRemoteWindow(win).resolve((function(remoteWin, remoteDomain, message) {\n if (remoteWin !== win) throw new Error(\"Remote window does not match window\");\n if (!matchDomain(remoteDomain, domain)) throw new Error(\"Remote domain \" + remoteDomain + \" does not match domain \" + domain);\n sendMessage.fireAndForget(message);\n }));\n }\n function rejectRemoteSendMessage(win, err) {\n findRemoteWindow(win).reject(err).catch(src_util_noop);\n }\n function linkWindow(_ref3) {\n var win = _ref3.win, name = _ref3.name, domain = _ref3.domain;\n var popupWindowsByName = globalStore(\"popupWindowsByName\");\n var popupWindowsByWin = windowStore(\"popupWindowsByWin\");\n for (var _i2 = 0, _popupWindowsByName$k2 = popupWindowsByName.keys(); _i2 < _popupWindowsByName$k2.length; _i2++) {\n var winName = _popupWindowsByName$k2[_i2];\n var _details = popupWindowsByName.get(winName);\n _details && !isWindowClosed(_details.win) || popupWindowsByName.del(winName);\n }\n if (isWindowClosed(win)) return {\n win: win,\n name: name,\n domain: domain\n };\n var details = popupWindowsByWin.getOrSet(win, (function() {\n return name ? popupWindowsByName.getOrSet(name, (function() {\n return {\n win: win,\n name: name\n };\n })) : {\n win: win\n };\n }));\n if (details.win && details.win !== win) throw new Error(\"Different window already linked for window: \" + (name || \"undefined\"));\n if (name) {\n details.name = name;\n popupWindowsByName.set(name, details);\n }\n if (domain) {\n details.domain = domain;\n registerRemoteWindow(win);\n }\n popupWindowsByWin.set(win, details);\n return details;\n }\n function setupBridge(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n windowOpen = window.open, window.open = function(url, name, options, last) {\n var win = windowOpen.call(this, normalizeMockUrl(url), name, options, last);\n if (!win) return win;\n linkWindow({\n win: win,\n name: name,\n domain: url ? getDomainFromUrl(url) : null\n });\n return win;\n };\n var windowOpen;\n !function(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n var popupWindowsByName = globalStore(\"popupWindowsByName\");\n on(\"postrobot_open_tunnel\", (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var bridgePromise = globalStore(\"bridges\").get(origin);\n if (!bridgePromise) throw new Error(\"Can not find bridge promise for domain \" + origin);\n return bridgePromise.then((function(bridge) {\n if (source !== bridge) throw new Error(\"Message source does not matched registered bridge for domain \" + origin);\n if (!data.name) throw new Error(\"Register window expected to be passed window name\");\n if (!data.sendMessage) throw new Error(\"Register window expected to be passed sendMessage method\");\n if (!popupWindowsByName.has(data.name)) throw new Error(\"Window with name \" + data.name + \" does not exist, or was not opened by this window\");\n var getWindowDetails = function() {\n return popupWindowsByName.get(data.name);\n };\n if (!getWindowDetails().domain) throw new Error(\"We do not have a registered domain for window \" + data.name);\n if (getWindowDetails().domain !== origin) throw new Error(\"Message origin \" + origin + \" does not matched registered window origin \" + (getWindowDetails().domain || \"unknown\"));\n registerRemoteSendMessage(getWindowDetails().win, origin, data.sendMessage);\n return {\n sendMessage: function(message) {\n if (window && !window.closed && getWindowDetails()) {\n var domain = getWindowDetails().domain;\n if (domain) try {\n receiveMessage({\n data: message,\n origin: domain,\n source: getWindowDetails().win\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n promise_ZalgoPromise.reject(err);\n }\n }\n }\n };\n }));\n }));\n }({\n on: on,\n send: send,\n receiveMessage: receiveMessage\n });\n !function(_ref2) {\n var send = _ref2.send;\n global_getGlobal(window).openTunnelToParent = function(_ref3) {\n var name = _ref3.name, source = _ref3.source, canary = _ref3.canary, sendMessage = _ref3.sendMessage;\n var tunnelWindows = globalStore(\"tunnelWindows\");\n var parentWindow = utils_getParent(window);\n if (!parentWindow) throw new Error(\"No parent window found to open tunnel to\");\n var id = function(_ref) {\n var name = _ref.name, source = _ref.source, canary = _ref.canary, sendMessage = _ref.sendMessage;\n !function() {\n var tunnelWindows = globalStore(\"tunnelWindows\");\n for (var _i2 = 0, _tunnelWindows$keys2 = tunnelWindows.keys(); _i2 < _tunnelWindows$keys2.length; _i2++) {\n var key = _tunnelWindows$keys2[_i2];\n isWindowClosed(tunnelWindows[key].source) && tunnelWindows.del(key);\n }\n }();\n var id = uniqueID();\n globalStore(\"tunnelWindows\").set(id, {\n name: name,\n source: source,\n canary: canary,\n sendMessage: sendMessage\n });\n return id;\n }({\n name: name,\n source: source,\n canary: canary,\n sendMessage: sendMessage\n });\n return send(parentWindow, \"postrobot_open_tunnel\", {\n name: name,\n sendMessage: function() {\n var tunnelWindow = tunnelWindows.get(id);\n if (tunnelWindow && tunnelWindow.source && !isWindowClosed(tunnelWindow.source)) {\n try {\n tunnelWindow.canary();\n } catch (err) {\n return;\n }\n tunnelWindow.sendMessage.apply(this, arguments);\n }\n }\n }, {\n domain: \"*\"\n });\n };\n }({\n send: send\n });\n !function(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n promise_ZalgoPromise.try((function() {\n var opener = getOpener(window);\n if (opener && needsBridge({\n win: opener\n })) {\n registerRemoteWindow(opener);\n return (win = opener, windowStore(\"remoteBridgeAwaiters\").getOrSet(win, (function() {\n return promise_ZalgoPromise.try((function() {\n var frame = getFrameByName(win, getBridgeName(getDomain()));\n if (frame) return isSameDomain(frame) && global_getGlobal(assertSameDomain(frame)) ? frame : new promise_ZalgoPromise((function(resolve) {\n var interval;\n var timeout;\n interval = setInterval((function() {\n if (frame && isSameDomain(frame) && global_getGlobal(assertSameDomain(frame))) {\n clearInterval(interval);\n clearTimeout(timeout);\n return resolve(frame);\n }\n }), 100);\n timeout = setTimeout((function() {\n clearInterval(interval);\n return resolve();\n }), 2e3);\n }));\n }));\n }))).then((function(bridge) {\n return bridge ? window.name ? global_getGlobal(assertSameDomain(bridge)).openTunnelToParent({\n name: window.name,\n source: window,\n canary: function() {},\n sendMessage: function(message) {\n try {\n window;\n } catch (err) {\n return;\n }\n if (window && !window.closed) try {\n receiveMessage({\n data: message,\n origin: this.origin,\n source: this.source\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n promise_ZalgoPromise.reject(err);\n }\n }\n }).then((function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n if (source !== opener) throw new Error(\"Source does not match opener\");\n registerRemoteSendMessage(source, origin, data.sendMessage);\n })).catch((function(err) {\n rejectRemoteSendMessage(opener, err);\n throw err;\n })) : rejectRemoteSendMessage(opener, new Error(\"Can not register with opener: window does not have a name\")) : rejectRemoteSendMessage(opener, new Error(\"Can not register with opener: no bridge found in opener\"));\n }));\n var win;\n }\n }));\n }({\n on: on,\n send: send,\n receiveMessage: receiveMessage\n });\n }\n function cleanupProxyWindows() {\n var idToProxyWindow = globalStore(\"idToProxyWindow\");\n for (var _i2 = 0, _idToProxyWindow$keys2 = idToProxyWindow.keys(); _i2 < _idToProxyWindow$keys2.length; _i2++) {\n var id = _idToProxyWindow$keys2[_i2];\n idToProxyWindow.get(id).shouldClean() && idToProxyWindow.del(id);\n }\n }\n function getSerializedWindow(winPromise, _ref) {\n var send = _ref.send, _ref$id = _ref.id, id = void 0 === _ref$id ? uniqueID() : _ref$id;\n var windowNamePromise = winPromise.then((function(win) {\n if (isSameDomain(win)) return assertSameDomain(win).name;\n }));\n var windowTypePromise = winPromise.then((function(window) {\n if (isWindowClosed(window)) throw new Error(\"Window is closed, can not determine type\");\n return getOpener(window) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;\n }));\n windowNamePromise.catch(src_util_noop);\n windowTypePromise.catch(src_util_noop);\n var getName = function() {\n return winPromise.then((function(win) {\n if (!isWindowClosed(win)) return isSameDomain(win) ? assertSameDomain(win).name : windowNamePromise;\n }));\n };\n return {\n id: id,\n getType: function() {\n return windowTypePromise;\n },\n getInstanceID: memoizePromise((function() {\n return winPromise.then((function(win) {\n return getWindowInstanceID(win, {\n send: send\n });\n }));\n })),\n close: function() {\n return winPromise.then(closeWindow);\n },\n getName: getName,\n focus: function() {\n return winPromise.then((function(win) {\n win.focus();\n }));\n },\n isClosed: function() {\n return winPromise.then((function(win) {\n return isWindowClosed(win);\n }));\n },\n setLocation: function(href, opts) {\n void 0 === opts && (opts = {});\n return winPromise.then((function(win) {\n var domain = window.location.protocol + \"//\" + window.location.host;\n var _opts$method = opts.method, method = void 0 === _opts$method ? \"get\" : _opts$method, body = opts.body;\n if (0 === href.indexOf(\"/\")) href = \"\" + domain + href; else if (!href.match(/^https?:\\/\\//) && 0 !== href.indexOf(domain)) throw new Error(\"Expected url to be http or https url, or absolute path, got \" + JSON.stringify(href));\n if (\"post\" === method) return getName().then((function(name) {\n if (!name) throw new Error(\"Can not post to window without target name\");\n !function(_ref3) {\n var url = _ref3.url, target = _ref3.target, body = _ref3.body, _ref3$method = _ref3.method, method = void 0 === _ref3$method ? \"post\" : _ref3$method;\n var form = document.createElement(\"form\");\n form.setAttribute(\"target\", target);\n form.setAttribute(\"method\", method);\n form.setAttribute(\"action\", url);\n form.style.display = \"none\";\n if (body) for (var _i24 = 0, _Object$keys4 = Object.keys(body); _i24 < _Object$keys4.length; _i24++) {\n var _body$key;\n var key = _Object$keys4[_i24];\n var input = document.createElement(\"input\");\n input.setAttribute(\"name\", key);\n input.setAttribute(\"value\", null == (_body$key = body[key]) ? void 0 : _body$key.toString());\n form.appendChild(input);\n }\n getBody().appendChild(form);\n form.submit();\n getBody().removeChild(form);\n }({\n url: href,\n target: name,\n method: method,\n body: body\n });\n }));\n if (\"get\" !== method) throw new Error(\"Unsupported method: \" + method);\n if (isSameDomain(win)) try {\n if (win.location && \"function\" == typeof win.location.replace) {\n win.location.replace(href);\n return;\n }\n } catch (err) {}\n win.location = href;\n }));\n },\n setName: function(name) {\n return winPromise.then((function(win) {\n linkWindow({\n win: win,\n name: name\n });\n var sameDomain = isSameDomain(win);\n var frame = getFrameForWindow(win);\n if (!sameDomain) throw new Error(\"Can not set name for cross-domain window: \" + name);\n assertSameDomain(win).name = name;\n frame && frame.setAttribute(\"name\", name);\n windowNamePromise = promise_ZalgoPromise.resolve(name);\n }));\n }\n };\n }\n var window_ProxyWindow = function() {\n function ProxyWindow(_ref2) {\n var send = _ref2.send, win = _ref2.win, serializedWindow = _ref2.serializedWindow;\n this.id = void 0;\n this.isProxyWindow = !0;\n this.serializedWindow = void 0;\n this.actualWindow = void 0;\n this.actualWindowPromise = void 0;\n this.send = void 0;\n this.name = void 0;\n this.actualWindowPromise = new promise_ZalgoPromise;\n this.serializedWindow = serializedWindow || getSerializedWindow(this.actualWindowPromise, {\n send: send\n });\n globalStore(\"idToProxyWindow\").set(this.getID(), this);\n win && this.setWindow(win, {\n send: send\n });\n }\n var _proto = ProxyWindow.prototype;\n _proto.getID = function() {\n return this.serializedWindow.id;\n };\n _proto.getType = function() {\n return this.serializedWindow.getType();\n };\n _proto.isPopup = function() {\n return this.getType().then((function(type) {\n return type === WINDOW_TYPE.POPUP;\n }));\n };\n _proto.setLocation = function(href, opts) {\n var _this = this;\n return this.serializedWindow.setLocation(href, opts).then((function() {\n return _this;\n }));\n };\n _proto.getName = function() {\n return this.serializedWindow.getName();\n };\n _proto.setName = function(name) {\n var _this2 = this;\n return this.serializedWindow.setName(name).then((function() {\n return _this2;\n }));\n };\n _proto.close = function() {\n var _this3 = this;\n return this.serializedWindow.close().then((function() {\n return _this3;\n }));\n };\n _proto.focus = function() {\n var _this4 = this;\n var isPopupPromise = this.isPopup();\n var getNamePromise = this.getName();\n var reopenPromise = promise_ZalgoPromise.hash({\n isPopup: isPopupPromise,\n name: getNamePromise\n }).then((function(_ref3) {\n var name = _ref3.name;\n _ref3.isPopup && name && window.open(\"\", name);\n }));\n var focusPromise = this.serializedWindow.focus();\n return promise_ZalgoPromise.all([ reopenPromise, focusPromise ]).then((function() {\n return _this4;\n }));\n };\n _proto.isClosed = function() {\n return this.serializedWindow.isClosed();\n };\n _proto.getWindow = function() {\n return this.actualWindow;\n };\n _proto.setWindow = function(win, _ref4) {\n var send = _ref4.send;\n this.actualWindow = win;\n this.actualWindowPromise.resolve(this.actualWindow);\n this.serializedWindow = getSerializedWindow(this.actualWindowPromise, {\n send: send,\n id: this.getID()\n });\n windowStore(\"winToProxyWindow\").set(win, this);\n };\n _proto.awaitWindow = function() {\n return this.actualWindowPromise;\n };\n _proto.matchWindow = function(win, _ref5) {\n var _this5 = this;\n var send = _ref5.send;\n return promise_ZalgoPromise.try((function() {\n return _this5.actualWindow ? win === _this5.actualWindow : promise_ZalgoPromise.hash({\n proxyInstanceID: _this5.getInstanceID(),\n knownWindowInstanceID: getWindowInstanceID(win, {\n send: send\n })\n }).then((function(_ref6) {\n var match = _ref6.proxyInstanceID === _ref6.knownWindowInstanceID;\n match && _this5.setWindow(win, {\n send: send\n });\n return match;\n }));\n }));\n };\n _proto.unwrap = function() {\n return this.actualWindow || this;\n };\n _proto.getInstanceID = function() {\n return this.serializedWindow.getInstanceID();\n };\n _proto.shouldClean = function() {\n return Boolean(this.actualWindow && isWindowClosed(this.actualWindow));\n };\n _proto.serialize = function() {\n return this.serializedWindow;\n };\n ProxyWindow.unwrap = function(win) {\n return ProxyWindow.isProxyWindow(win) ? win.unwrap() : win;\n };\n ProxyWindow.serialize = function(win, _ref7) {\n var send = _ref7.send;\n cleanupProxyWindows();\n return ProxyWindow.toProxyWindow(win, {\n send: send\n }).serialize();\n };\n ProxyWindow.deserialize = function(serializedWindow, _ref8) {\n var send = _ref8.send;\n cleanupProxyWindows();\n return globalStore(\"idToProxyWindow\").get(serializedWindow.id) || new ProxyWindow({\n serializedWindow: serializedWindow,\n send: send\n });\n };\n ProxyWindow.isProxyWindow = function(obj) {\n return Boolean(obj && !isWindow(obj) && obj.isProxyWindow);\n };\n ProxyWindow.toProxyWindow = function(win, _ref9) {\n var send = _ref9.send;\n cleanupProxyWindows();\n if (ProxyWindow.isProxyWindow(win)) return win;\n var actualWindow = win;\n return windowStore(\"winToProxyWindow\").get(actualWindow) || new ProxyWindow({\n win: actualWindow,\n send: send\n });\n };\n return ProxyWindow;\n }();\n function addMethod(id, val, name, source, domain) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n if (window_ProxyWindow.isProxyWindow(source)) proxyWindowMethods.set(id, {\n val: val,\n name: name,\n domain: domain,\n source: source\n }); else {\n proxyWindowMethods.del(id);\n methodStore.getOrSet(source, (function() {\n return {};\n }))[id] = {\n domain: domain,\n name: name,\n val: val,\n source: source\n };\n }\n }\n function lookupMethod(source, id) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n return methodStore.getOrSet(source, (function() {\n return {};\n }))[id] || proxyWindowMethods.get(id);\n }\n function function_serializeFunction(destination, domain, val, key, _ref3) {\n on = (_ref = {\n on: _ref3.on,\n send: _ref3.send\n }).on, send = _ref.send, globalStore(\"builtinListeners\").getOrSet(\"functionCalls\", (function() {\n return on(\"postrobot_method\", {\n domain: \"*\"\n }, (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var id = data.id, name = data.name;\n var meth = lookupMethod(source, id);\n if (!meth) throw new Error(\"Could not find method '\" + name + \"' with id: \" + data.id + \" in \" + getDomain(window));\n var methodSource = meth.source, domain = meth.domain, val = meth.val;\n return promise_ZalgoPromise.try((function() {\n if (!matchDomain(domain, origin)) throw new Error(\"Method '\" + data.name + \"' domain \" + JSON.stringify(util_isRegex(meth.domain) ? meth.domain.source : meth.domain) + \" does not match origin \" + origin + \" in \" + getDomain(window));\n if (window_ProxyWindow.isProxyWindow(methodSource)) return methodSource.matchWindow(source, {\n send: send\n }).then((function(match) {\n if (!match) throw new Error(\"Method call '\" + data.name + \"' failed - proxy window does not match source in \" + getDomain(window));\n }));\n })).then((function() {\n return val.apply({\n source: source,\n origin: origin\n }, data.args);\n }), (function(err) {\n return promise_ZalgoPromise.try((function() {\n if (val.onError) return val.onError(err);\n })).then((function() {\n err.stack && (err.stack = \"Remote call to \" + name + \"(\" + function(args) {\n void 0 === args && (args = []);\n return arrayFrom(args).map((function(arg) {\n return \"string\" == typeof arg ? \"'\" + arg + \"'\" : void 0 === arg ? \"undefined\" : null === arg ? \"null\" : \"boolean\" == typeof arg ? arg.toString() : Array.isArray(arg) ? \"[ ... ]\" : \"object\" == typeof arg ? \"{ ... }\" : \"function\" == typeof arg ? \"() => { ... }\" : \"<\" + typeof arg + \">\";\n })).join(\", \");\n }(data.args) + \") failed\\n\\n\" + err.stack);\n throw err;\n }));\n })).then((function(result) {\n return {\n result: result,\n id: id,\n name: name\n };\n }));\n }));\n }));\n var _ref, on, send;\n var id = val.__id__ || uniqueID();\n destination = window_ProxyWindow.unwrap(destination);\n var name = val.__name__ || val.name || key;\n \"string\" == typeof name && \"function\" == typeof name.indexOf && 0 === name.indexOf(\"anonymous::\") && (name = name.replace(\"anonymous::\", key + \"::\"));\n if (window_ProxyWindow.isProxyWindow(destination)) {\n addMethod(id, val, name, destination, domain);\n destination.awaitWindow().then((function(win) {\n addMethod(id, val, name, win, domain);\n }));\n } else addMethod(id, val, name, destination, domain);\n return serializeType(\"cross_domain_function\", {\n id: id,\n name: name\n });\n }\n function serializeMessage(destination, domain, obj, _ref) {\n var _serialize;\n var on = _ref.on, send = _ref.send;\n return function(obj, serializers) {\n void 0 === serializers && (serializers = defaultSerializers);\n var result = JSON.stringify(obj, (function(key) {\n var val = this[key];\n if (isSerializedType(this)) return val;\n var type = determineType(val);\n if (!type) return val;\n var serializer = serializers[type] || SERIALIZER[type];\n return serializer ? serializer(val, key) : val;\n }));\n return void 0 === result ? \"undefined\" : result;\n }(obj, ((_serialize = {}).promise = function(val, key) {\n return function(destination, domain, val, key, _ref) {\n return serializeType(\"cross_domain_zalgo_promise\", {\n then: function_serializeFunction(destination, domain, (function(resolve, reject) {\n return val.then(resolve, reject);\n }), key, {\n on: _ref.on,\n send: _ref.send\n })\n });\n }(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.function = function(val, key) {\n return function_serializeFunction(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.object = function(val) {\n return isWindow(val) || window_ProxyWindow.isProxyWindow(val) ? serializeType(\"cross_domain_window\", window_ProxyWindow.serialize(val, {\n send: send\n })) : val;\n }, _serialize));\n }\n function deserializeMessage(source, origin, message, _ref2) {\n var _deserialize;\n var send = _ref2.send;\n return function(str, deserializers) {\n void 0 === deserializers && (deserializers = defaultDeserializers);\n if (\"undefined\" !== str) return JSON.parse(str, (function(key, val) {\n if (isSerializedType(this)) return val;\n var type;\n var value;\n if (isSerializedType(val)) {\n type = val.__type__;\n value = val.__val__;\n } else {\n type = determineType(val);\n value = val;\n }\n if (!type) return value;\n var deserializer = deserializers[type] || DESERIALIZER[type];\n return deserializer ? deserializer(value, key) : value;\n }));\n }(message, ((_deserialize = {}).cross_domain_zalgo_promise = function(serializedPromise) {\n return function(source, origin, _ref2) {\n return new promise_ZalgoPromise(_ref2.then);\n }(0, 0, serializedPromise);\n }, _deserialize.cross_domain_function = function(serializedFunction) {\n return function(source, origin, _ref4, _ref5) {\n var id = _ref4.id, name = _ref4.name;\n var send = _ref5.send;\n var getDeserializedFunction = function(opts) {\n void 0 === opts && (opts = {});\n function crossDomainFunctionWrapper() {\n var _arguments = arguments;\n return window_ProxyWindow.toProxyWindow(source, {\n send: send\n }).awaitWindow().then((function(win) {\n var meth = lookupMethod(win, id);\n if (meth && meth.val !== crossDomainFunctionWrapper) return meth.val.apply({\n source: window,\n origin: getDomain()\n }, _arguments);\n var _args = [].slice.call(_arguments);\n return opts.fireAndForget ? send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !0\n }) : send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !1\n }).then((function(res) {\n return res.data.result;\n }));\n })).catch((function(err) {\n throw err;\n }));\n }\n crossDomainFunctionWrapper.__name__ = name;\n crossDomainFunctionWrapper.__origin__ = origin;\n crossDomainFunctionWrapper.__source__ = source;\n crossDomainFunctionWrapper.__id__ = id;\n crossDomainFunctionWrapper.origin = origin;\n return crossDomainFunctionWrapper;\n };\n var crossDomainFunctionWrapper = getDeserializedFunction();\n crossDomainFunctionWrapper.fireAndForget = getDeserializedFunction({\n fireAndForget: !0\n });\n return crossDomainFunctionWrapper;\n }(source, origin, serializedFunction, {\n send: send\n });\n }, _deserialize.cross_domain_window = function(serializedWindow) {\n return window_ProxyWindow.deserialize(serializedWindow, {\n send: send\n });\n }, _deserialize));\n }\n var SEND_MESSAGE_STRATEGIES = {};\n SEND_MESSAGE_STRATEGIES.postrobot_post_message = function(win, serializedMessage, domain) {\n 0 === domain.indexOf(\"file:\") && (domain = \"*\");\n win.postMessage(serializedMessage, domain);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_bridge = function(win, serializedMessage, domain) {\n if (!needsBridgeForBrowser() && !isBridge()) throw new Error(\"Bridge not needed for browser\");\n if (isSameDomain(win)) throw new Error(\"Post message through bridge disabled between same domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use bridge to communicate between two different windows, not between frames\");\n !function(win, domain, message) {\n var messagingChild = isOpener(window, win);\n var messagingParent = isOpener(win, window);\n if (!messagingChild && !messagingParent) throw new Error(\"Can only send messages to and from parent and popup windows\");\n findRemoteWindow(win).then((function(sendMessage) {\n return sendMessage(win, domain, message);\n }));\n }(win, domain, serializedMessage);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_global = function(win, serializedMessage) {\n if (!utils_getUserAgent(window).match(/MSIE|rv:11|trident|edge\\/12|edge\\/13/i)) throw new Error(\"Global messaging not needed for browser\");\n if (!isSameDomain(win)) throw new Error(\"Post message through global disabled between different domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use global to communicate between two different windows, not between frames\");\n var foreignGlobal = global_getGlobal(win);\n if (!foreignGlobal) throw new Error(\"Can not find postRobot global on foreign window\");\n foreignGlobal.receiveMessage({\n source: window,\n origin: getDomain(),\n data: serializedMessage\n });\n };\n function send_sendMessage(win, domain, message, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n return promise_ZalgoPromise.try((function() {\n var domainBuffer = windowStore().getOrSet(win, (function() {\n return {};\n }));\n domainBuffer.buffer = domainBuffer.buffer || [];\n domainBuffer.buffer.push(message);\n domainBuffer.flush = domainBuffer.flush || promise_ZalgoPromise.flush().then((function() {\n if (isWindowClosed(win)) throw new Error(\"Window is closed\");\n var serializedMessage = serializeMessage(win, domain, ((_ref = {}).__post_robot_10_0_44__ = domainBuffer.buffer || [], \n _ref), {\n on: on,\n send: send\n });\n var _ref;\n delete domainBuffer.buffer;\n var strategies = Object.keys(SEND_MESSAGE_STRATEGIES);\n var errors = [];\n for (var _i2 = 0; _i2 < strategies.length; _i2++) {\n var strategyName = strategies[_i2];\n try {\n SEND_MESSAGE_STRATEGIES[strategyName](win, serializedMessage, domain);\n } catch (err) {\n errors.push(err);\n }\n }\n if (errors.length === strategies.length) throw new Error(\"All post-robot messaging strategies failed:\\n\\n\" + errors.map((function(err, i) {\n return i + \". \" + stringifyError(err);\n })).join(\"\\n\\n\"));\n }));\n return domainBuffer.flush.then((function() {\n delete domainBuffer.flush;\n }));\n })).then(src_util_noop);\n }\n function getResponseListener(hash) {\n return globalStore(\"responseListeners\").get(hash);\n }\n function deleteResponseListener(hash) {\n globalStore(\"responseListeners\").del(hash);\n }\n function isResponseListenerErrored(hash) {\n return globalStore(\"erroredResponseListeners\").has(hash);\n }\n function getRequestListener(_ref) {\n var name = _ref.name, win = _ref.win, domain = _ref.domain;\n var requestListeners = windowStore(\"requestListeners\");\n \"*\" === win && (win = null);\n \"*\" === domain && (domain = null);\n if (!name) throw new Error(\"Name required to get request listener\");\n for (var _i4 = 0, _ref3 = [ win, getWildcard() ]; _i4 < _ref3.length; _i4++) {\n var winQualifier = _ref3[_i4];\n if (winQualifier) {\n var nameListeners = requestListeners.get(winQualifier);\n if (nameListeners) {\n var domainListeners = nameListeners[name];\n if (domainListeners) {\n if (domain && \"string\" == typeof domain) {\n if (domainListeners[domain]) return domainListeners[domain];\n if (domainListeners.__domain_regex__) for (var _i6 = 0, _domainListeners$__DO2 = domainListeners.__domain_regex__; _i6 < _domainListeners$__DO2.length; _i6++) {\n var _domainListeners$__DO3 = _domainListeners$__DO2[_i6], listener = _domainListeners$__DO3.listener;\n if (matchDomain(_domainListeners$__DO3.regex, domain)) return listener;\n }\n }\n if (domainListeners[\"*\"]) return domainListeners[\"*\"];\n }\n }\n }\n }\n }\n function handleRequest(source, origin, message, _ref) {\n var on = _ref.on, send = _ref.send;\n var options = getRequestListener({\n name: message.name,\n win: source,\n domain: origin\n });\n var logName = \"postrobot_method\" === message.name && message.data && \"string\" == typeof message.data.name ? message.data.name + \"()\" : message.name;\n function sendResponse(ack, data, error) {\n return promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_response\",\n hash: message.hash,\n name: message.name,\n ack: ack,\n data: data,\n error: error\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send response message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n }));\n }\n return promise_ZalgoPromise.all([ promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_ack\",\n hash: message.hash,\n name: message.name\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send ack message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n })), promise_ZalgoPromise.try((function() {\n if (!options) throw new Error(\"No handler found for post message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Request origin \" + origin + \" does not match domain \" + options.domain.toString());\n return options.handler({\n source: source,\n origin: origin,\n data: message.data\n });\n })).then((function(data) {\n return sendResponse(\"success\", data);\n }), (function(error) {\n return sendResponse(\"error\", null, error);\n })) ]).then(src_util_noop).catch((function(err) {\n if (options && options.handleError) return options.handleError(err);\n throw err;\n }));\n }\n function handleAck(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message ack for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n try {\n if (!matchDomain(options.domain, origin)) throw new Error(\"Ack origin \" + origin + \" does not match domain \" + options.domain.toString());\n if (source !== options.win) throw new Error(\"Ack source does not match registered window\");\n } catch (err) {\n options.promise.reject(err);\n }\n options.ack = !0;\n }\n }\n function handleResponse(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message response for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Response origin \" + origin + \" does not match domain \" + (pattern = options.domain, \n Array.isArray(pattern) ? \"(\" + pattern.join(\" | \") + \")\" : isRegex(pattern) ? \"RegExp(\" + pattern.toString() + \")\" : pattern.toString()));\n var pattern;\n if (source !== options.win) throw new Error(\"Response source does not match registered window\");\n deleteResponseListener(message.hash);\n \"error\" === message.ack ? options.promise.reject(message.error) : \"success\" === message.ack && options.promise.resolve({\n source: source,\n origin: origin,\n data: message.data\n });\n }\n }\n function receive_receiveMessage(event, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n var receivedMessages = globalStore(\"receivedMessages\");\n try {\n if (!window || window.closed || !event.source) return;\n } catch (err) {\n return;\n }\n var source = event.source, origin = event.origin;\n var messages = function(message, source, origin, _ref) {\n var on = _ref.on, send = _ref.send;\n var parsedMessage;\n try {\n parsedMessage = deserializeMessage(source, origin, message, {\n on: on,\n send: send\n });\n } catch (err) {\n return;\n }\n if (parsedMessage && \"object\" == typeof parsedMessage && null !== parsedMessage) {\n var parseMessages = parsedMessage.__post_robot_10_0_44__;\n if (Array.isArray(parseMessages)) return parseMessages;\n }\n }(event.data, source, origin, {\n on: on,\n send: send\n });\n if (messages) {\n markWindowKnown(source);\n for (var _i2 = 0; _i2 < messages.length; _i2++) {\n var message = messages[_i2];\n if (receivedMessages.has(message.id)) return;\n receivedMessages.set(message.id, !0);\n if (isWindowClosed(source) && !message.fireAndForget) return;\n 0 === message.origin.indexOf(\"file:\") && (origin = \"file://\");\n try {\n \"postrobot_message_request\" === message.type ? handleRequest(source, origin, message, {\n on: on,\n send: send\n }) : \"postrobot_message_response\" === message.type ? handleResponse(source, origin, message) : \"postrobot_message_ack\" === message.type && handleAck(source, origin, message);\n } catch (err) {\n setTimeout((function() {\n throw err;\n }), 0);\n }\n }\n }\n }\n function on_on(name, options, handler) {\n if (!name) throw new Error(\"Expected name\");\n if (\"function\" == typeof (options = options || {})) {\n handler = options;\n options = {};\n }\n if (!handler) throw new Error(\"Expected handler\");\n (options = options || {}).name = name;\n options.handler = handler || options.handler;\n var win = options.window;\n var domain = options.domain;\n var requestListener = function addRequestListener(_ref4, listener) {\n var name = _ref4.name, win = _ref4.win, domain = _ref4.domain;\n var requestListeners = windowStore(\"requestListeners\");\n if (!name || \"string\" != typeof name) throw new Error(\"Name required to add request listener\");\n if (Array.isArray(win)) {\n var listenersCollection = [];\n for (var _i8 = 0, _win2 = win; _i8 < _win2.length; _i8++) listenersCollection.push(addRequestListener({\n name: name,\n domain: domain,\n win: _win2[_i8]\n }, listener));\n return {\n cancel: function() {\n for (var _i10 = 0; _i10 < listenersCollection.length; _i10++) listenersCollection[_i10].cancel();\n }\n };\n }\n if (Array.isArray(domain)) {\n var _listenersCollection = [];\n for (var _i12 = 0, _domain2 = domain; _i12 < _domain2.length; _i12++) _listenersCollection.push(addRequestListener({\n name: name,\n win: win,\n domain: _domain2[_i12]\n }, listener));\n return {\n cancel: function() {\n for (var _i14 = 0; _i14 < _listenersCollection.length; _i14++) _listenersCollection[_i14].cancel();\n }\n };\n }\n var existingListener = getRequestListener({\n name: name,\n win: win,\n domain: domain\n });\n win && \"*\" !== win || (win = getWildcard());\n domain = domain || \"*\";\n if (existingListener) throw win && domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString() + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : win ? new Error(\"Request listener already exists for \" + name + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString()) : new Error(\"Request listener already exists for \" + name);\n var nameListeners = requestListeners.getOrSet(win, (function() {\n return {};\n }));\n var domainListeners = util_getOrSet(nameListeners, name, (function() {\n return {};\n }));\n var strDomain = domain.toString();\n var regexListeners;\n var regexListener;\n util_isRegex(domain) ? (regexListeners = util_getOrSet(domainListeners, \"__domain_regex__\", (function() {\n return [];\n }))).push(regexListener = {\n regex: domain,\n listener: listener\n }) : domainListeners[strDomain] = listener;\n return {\n cancel: function() {\n delete domainListeners[strDomain];\n if (regexListener) {\n regexListeners.splice(regexListeners.indexOf(regexListener, 1));\n regexListeners.length || delete domainListeners.__domain_regex__;\n }\n Object.keys(domainListeners).length || delete nameListeners[name];\n win && !Object.keys(nameListeners).length && requestListeners.del(win);\n }\n };\n }({\n name: name,\n win: win,\n domain: domain\n }, {\n handler: options.handler,\n handleError: options.errorHandler || function(err) {\n throw err;\n },\n window: win,\n domain: domain || \"*\",\n name: name\n });\n return {\n cancel: function() {\n requestListener.cancel();\n }\n };\n }\n var send_send = function send(win, name, data, options) {\n var domainMatcher = (options = options || {}).domain || \"*\";\n var responseTimeout = options.timeout || -1;\n var childTimeout = options.timeout || 5e3;\n var fireAndForget = options.fireAndForget || !1;\n return promise_ZalgoPromise.try((function() {\n !function(name, win, domain) {\n if (!name) throw new Error(\"Expected name\");\n if (domain && \"string\" != typeof domain && !Array.isArray(domain) && !util_isRegex(domain)) throw new TypeError(\"Can not send \" + name + \". Expected domain \" + JSON.stringify(domain) + \" to be a string, array, or regex\");\n if (isWindowClosed(win)) throw new Error(\"Can not send \" + name + \". Target window is closed\");\n }(name, win, domainMatcher);\n if (function(parent, child) {\n var actualParent = getAncestor(child);\n if (actualParent) return actualParent === parent;\n if (child === parent) return !1;\n if (getTop(child) === child) return !1;\n for (var _i15 = 0, _getFrames8 = getFrames(parent); _i15 < _getFrames8.length; _i15++) if (_getFrames8[_i15] === child) return !0;\n return !1;\n }(window, win)) return awaitWindowHello(win, childTimeout);\n })).then((function(_temp) {\n return function(win, targetDomain, actualDomain, _ref) {\n var send = _ref.send;\n return promise_ZalgoPromise.try((function() {\n return \"string\" == typeof targetDomain ? targetDomain : promise_ZalgoPromise.try((function() {\n return actualDomain || sayHello(win, {\n send: send\n }).then((function(_ref2) {\n return _ref2.domain;\n }));\n })).then((function(normalizedDomain) {\n if (!matchDomain(targetDomain, targetDomain)) throw new Error(\"Domain \" + stringify(targetDomain) + \" does not match \" + stringify(targetDomain));\n return normalizedDomain;\n }));\n }));\n }(win, domainMatcher, (void 0 === _temp ? {} : _temp).domain, {\n send: send\n });\n })).then((function(targetDomain) {\n var domain = targetDomain;\n var logName = \"postrobot_method\" === name && data && \"string\" == typeof data.name ? data.name + \"()\" : name;\n var promise = new promise_ZalgoPromise;\n var hash = name + \"_\" + uniqueID();\n if (!fireAndForget) {\n var responseListener = {\n name: name,\n win: win,\n domain: domain,\n promise: promise\n };\n !function(hash, listener) {\n globalStore(\"responseListeners\").set(hash, listener);\n }(hash, responseListener);\n var reqPromises = windowStore(\"requestPromises\").getOrSet(win, (function() {\n return [];\n }));\n reqPromises.push(promise);\n promise.catch((function() {\n !function(hash) {\n globalStore(\"erroredResponseListeners\").set(hash, !0);\n }(hash);\n deleteResponseListener(hash);\n }));\n var totalAckTimeout = function(win) {\n return windowStore(\"knownWindows\").get(win, !1);\n }(win) ? 1e4 : 2e3;\n var totalResTimeout = responseTimeout;\n var ackTimeout = totalAckTimeout;\n var resTimeout = totalResTimeout;\n var interval = safeInterval((function() {\n if (isWindowClosed(win)) return promise.reject(new Error(\"Window closed for \" + name + \" before \" + (responseListener.ack ? \"response\" : \"ack\")));\n if (responseListener.cancelled) return promise.reject(new Error(\"Response listener was cancelled for \" + name));\n ackTimeout = Math.max(ackTimeout - 500, 0);\n -1 !== resTimeout && (resTimeout = Math.max(resTimeout - 500, 0));\n return responseListener.ack || 0 !== ackTimeout ? 0 === resTimeout ? promise.reject(new Error(\"No response for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalResTimeout + \"ms\")) : void 0 : promise.reject(new Error(\"No ack for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalAckTimeout + \"ms\"));\n }), 500);\n promise.finally((function() {\n interval.cancel();\n reqPromises.splice(reqPromises.indexOf(promise, 1));\n })).catch(src_util_noop);\n }\n return send_sendMessage(win, domain, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_request\",\n hash: hash,\n name: name,\n data: data,\n fireAndForget: fireAndForget\n }, {\n on: on_on,\n send: send\n }).then((function() {\n return fireAndForget ? promise.resolve() : promise;\n }), (function(err) {\n throw new Error(\"Send request message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }));\n }));\n };\n function setup_toProxyWindow(win) {\n return window_ProxyWindow.toProxyWindow(win, {\n send: send_send\n });\n }\n function cleanUpWindow(win) {\n for (var _i2 = 0, _requestPromises$get2 = windowStore(\"requestPromises\").get(win, []); _i2 < _requestPromises$get2.length; _i2++) _requestPromises$get2[_i2].reject(new Error(\"Window \" + (isWindowClosed(win) ? \"closed\" : \"cleaned up\") + \" before response\")).catch(src_util_noop);\n }\n var src_bridge;\n src_bridge = {\n setupBridge: setupBridge,\n openBridge: function(url, domain) {\n var bridges = globalStore(\"bridges\");\n var bridgeFrames = globalStore(\"bridgeFrames\");\n domain = domain || getDomainFromUrl(url);\n return bridges.getOrSet(domain, (function() {\n return promise_ZalgoPromise.try((function() {\n if (getDomain() === domain) throw new Error(\"Can not open bridge on the same domain as current domain: \" + domain);\n var name = getBridgeName(domain);\n if (getFrameByName(window, name)) throw new Error(\"Frame with name \" + name + \" already exists on page\");\n var iframe = function(name, url) {\n var iframe = document.createElement(\"iframe\");\n iframe.setAttribute(\"name\", name);\n iframe.setAttribute(\"id\", name);\n iframe.setAttribute(\"style\", \"display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;\");\n iframe.setAttribute(\"frameborder\", \"0\");\n iframe.setAttribute(\"border\", \"0\");\n iframe.setAttribute(\"scrolling\", \"no\");\n iframe.setAttribute(\"allowTransparency\", \"true\");\n iframe.setAttribute(\"tabindex\", \"-1\");\n iframe.setAttribute(\"hidden\", \"true\");\n iframe.setAttribute(\"title\", \"\");\n iframe.setAttribute(\"role\", \"presentation\");\n iframe.src = url;\n return iframe;\n }(name, url);\n bridgeFrames.set(domain, iframe);\n return documentBodyReady.then((function(body) {\n body.appendChild(iframe);\n var bridge = iframe.contentWindow;\n return new promise_ZalgoPromise((function(resolve, reject) {\n iframe.addEventListener(\"load\", resolve);\n iframe.addEventListener(\"error\", reject);\n })).then((function() {\n return awaitWindowHello(bridge, 5e3, \"Bridge \" + url);\n })).then((function() {\n return bridge;\n }));\n }));\n }));\n }));\n },\n linkWindow: linkWindow,\n linkUrl: function(win, url) {\n linkWindow({\n win: win,\n domain: getDomainFromUrl(url)\n });\n },\n isBridge: isBridge,\n needsBridge: needsBridge,\n needsBridgeForBrowser: needsBridgeForBrowser,\n hasBridge: function(url, domain) {\n return globalStore(\"bridges\").has(domain || getDomainFromUrl(url));\n },\n needsBridgeForWin: needsBridgeForWin,\n needsBridgeForDomain: needsBridgeForDomain,\n destroyBridges: function() {\n var bridges = globalStore(\"bridges\");\n var bridgeFrames = globalStore(\"bridgeFrames\");\n for (var _i4 = 0, _bridgeFrames$keys2 = bridgeFrames.keys(); _i4 < _bridgeFrames$keys2.length; _i4++) {\n var frame = bridgeFrames.get(_bridgeFrames$keys2[_i4]);\n frame && frame.parentNode && frame.parentNode.removeChild(frame);\n }\n bridgeFrames.reset();\n bridges.reset();\n }\n };\n function lib_global_getGlobal(win) {\n if (!isSameDomain(win)) throw new Error(\"Can not get global for window on different domain\");\n win.__zoid_9_0_86__ || (win.__zoid_9_0_86__ = {});\n return win.__zoid_9_0_86__;\n }\n function tryGlobal(win, handler) {\n try {\n return handler(lib_global_getGlobal(win));\n } catch (err) {}\n }\n function getProxyObject(obj) {\n return {\n get: function() {\n var _this = this;\n return promise_ZalgoPromise.try((function() {\n if (_this.source && _this.source !== window) throw new Error(\"Can not call get on proxy object from a remote window\");\n return obj;\n }));\n }\n };\n }\n function basicSerialize(data) {\n return base64encode(JSON.stringify(data));\n }\n function getUIDRefStore(win) {\n var global = lib_global_getGlobal(win);\n global.references = global.references || {};\n return global.references;\n }\n function crossDomainSerialize(_ref) {\n var data = _ref.data, metaData = _ref.metaData, sender = _ref.sender, receiver = _ref.receiver, _ref$passByReference = _ref.passByReference, passByReference = void 0 !== _ref$passByReference && _ref$passByReference, _ref$basic = _ref.basic, basic = void 0 !== _ref$basic && _ref$basic;\n var proxyWin = setup_toProxyWindow(receiver.win);\n var serializedMessage = basic ? JSON.stringify(data) : serializeMessage(proxyWin, receiver.domain, data, {\n on: on_on,\n send: send_send\n });\n var reference = passByReference ? function(val) {\n var uid = uniqueID();\n getUIDRefStore(window)[uid] = val;\n return {\n type: \"uid\",\n uid: uid\n };\n }(serializedMessage) : {\n type: \"raw\",\n val: serializedMessage\n };\n return {\n serializedData: basicSerialize({\n sender: {\n domain: sender.domain\n },\n metaData: metaData,\n reference: reference\n }),\n cleanReference: function() {\n win = window, \"uid\" === (ref = reference).type && delete getUIDRefStore(win)[ref.uid];\n var win, ref;\n }\n };\n }\n function crossDomainDeserialize(_ref2) {\n var sender = _ref2.sender, _ref2$basic = _ref2.basic, basic = void 0 !== _ref2$basic && _ref2$basic;\n var message = function(serializedData) {\n return JSON.parse(function(str) {\n if (\"function\" == typeof atob) return decodeURIComponent([].map.call(atob(str), (function(c) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })).join(\"\"));\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"base64\").toString(\"utf8\");\n throw new Error(\"Can not find window.atob or Buffer\");\n }(serializedData));\n }(_ref2.data);\n var reference = message.reference, metaData = message.metaData;\n var win;\n win = \"function\" == typeof sender.win ? sender.win({\n metaData: metaData\n }) : sender.win;\n var domain;\n domain = \"function\" == typeof sender.domain ? sender.domain({\n metaData: metaData\n }) : \"string\" == typeof sender.domain ? sender.domain : message.sender.domain;\n var serializedData = function(win, ref) {\n if (\"raw\" === ref.type) return ref.val;\n if (\"uid\" === ref.type) return getUIDRefStore(win)[ref.uid];\n throw new Error(\"Unsupported ref type: \" + ref.type);\n }(win, reference);\n return {\n data: basic ? JSON.parse(serializedData) : function(source, origin, message) {\n return deserializeMessage(source, origin, message, {\n on: on_on,\n send: send_send\n });\n }(win, domain, serializedData),\n metaData: metaData,\n sender: {\n win: win,\n domain: domain\n },\n reference: reference\n };\n }\n var PROP_TYPE = {\n STRING: \"string\",\n OBJECT: \"object\",\n FUNCTION: \"function\",\n BOOLEAN: \"boolean\",\n NUMBER: \"number\",\n ARRAY: \"array\"\n };\n var PROP_SERIALIZATION = {\n JSON: \"json\",\n DOTIFY: \"dotify\",\n BASE64: \"base64\"\n };\n var CONTEXT = WINDOW_TYPE;\n var EVENT = {\n RENDER: \"zoid-render\",\n RENDERED: \"zoid-rendered\",\n DISPLAY: \"zoid-display\",\n ERROR: \"zoid-error\",\n CLOSE: \"zoid-close\",\n DESTROY: \"zoid-destroy\",\n PROPS: \"zoid-props\",\n RESIZE: \"zoid-resize\",\n FOCUS: \"zoid-focus\"\n };\n function buildChildWindowName(_ref) {\n return \"__zoid__\" + _ref.name + \"__\" + _ref.serializedPayload + \"__\";\n }\n function parseWindowName(windowName) {\n if (!windowName) throw new Error(\"No window name\");\n var _windowName$split = windowName.split(\"__\"), zoidcomp = _windowName$split[1], name = _windowName$split[2], serializedInitialPayload = _windowName$split[3];\n if (\"zoid\" !== zoidcomp) throw new Error(\"Window not rendered by zoid - got \" + zoidcomp);\n if (!name) throw new Error(\"Expected component name\");\n if (!serializedInitialPayload) throw new Error(\"Expected serialized payload ref\");\n return {\n name: name,\n serializedInitialPayload: serializedInitialPayload\n };\n }\n var parseInitialParentPayload = memoize((function(windowName) {\n var _crossDomainDeseriali = crossDomainDeserialize({\n data: parseWindowName(windowName).serializedInitialPayload,\n sender: {\n win: function(_ref2) {\n return function(windowRef) {\n if (\"opener\" === windowRef.type) return assertExists(\"opener\", getOpener(window));\n if (\"parent\" === windowRef.type && \"number\" == typeof windowRef.distance) return assertExists(\"parent\", function(win, n) {\n void 0 === n && (n = 1);\n return function(win, n) {\n void 0 === n && (n = 1);\n var parent = win;\n for (var i = 0; i < n; i++) {\n if (!parent) return;\n parent = utils_getParent(parent);\n }\n return parent;\n }(win, getDistanceFromTop(win) - n);\n }(window, windowRef.distance));\n if (\"global\" === windowRef.type && windowRef.uid && \"string\" == typeof windowRef.uid) {\n var _ret = function() {\n var uid = windowRef.uid;\n var ancestor = getAncestor(window);\n if (!ancestor) throw new Error(\"Can not find ancestor window\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(ancestor); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var frame = _getAllFramesInWindow2[_i2];\n if (isSameDomain(frame)) {\n var win = tryGlobal(frame, (function(global) {\n return global.windows && global.windows[uid];\n }));\n if (win) return {\n v: win\n };\n }\n }\n }();\n if (\"object\" == typeof _ret) return _ret.v;\n } else if (\"name\" === windowRef.type) {\n var name = windowRef.name;\n return assertExists(\"namedWindow\", function(win, name) {\n return getFrameByName(win, name) || function findChildFrameByName(win, name) {\n var frame = getFrameByName(win, name);\n if (frame) return frame;\n for (var _i11 = 0, _getFrames4 = getFrames(win); _i11 < _getFrames4.length; _i11++) {\n var namedFrame = findChildFrameByName(_getFrames4[_i11], name);\n if (namedFrame) return namedFrame;\n }\n }(getTop(win) || win, name);\n }(assertExists(\"ancestor\", getAncestor(window)), name));\n }\n throw new Error(\"Unable to find \" + windowRef.type + \" parent component window\");\n }(_ref2.metaData.windowRef);\n }\n }\n });\n return {\n parent: _crossDomainDeseriali.sender,\n payload: _crossDomainDeseriali.data,\n reference: _crossDomainDeseriali.reference\n };\n }));\n function getInitialParentPayload() {\n return parseInitialParentPayload(window.name);\n }\n function window_getWindowRef(targetWindow, currentWindow) {\n void 0 === currentWindow && (currentWindow = window);\n if (targetWindow === utils_getParent(currentWindow)) return {\n type: \"parent\",\n distance: getDistanceFromTop(targetWindow)\n };\n if (targetWindow === getOpener(currentWindow)) return {\n type: \"opener\"\n };\n if (isSameDomain(targetWindow) && !(win = targetWindow, win === getTop(win))) {\n var windowName = assertSameDomain(targetWindow).name;\n if (windowName) return {\n type: \"name\",\n name: windowName\n };\n }\n var win;\n }\n function normalizeChildProp(propsDef, props, key, value, helpers) {\n if (!propsDef.hasOwnProperty(key)) return value;\n var prop = propsDef[key];\n return \"function\" == typeof prop.childDecorate ? prop.childDecorate({\n value: value,\n uid: helpers.uid,\n tag: helpers.tag,\n close: helpers.close,\n focus: helpers.focus,\n onError: helpers.onError,\n onProps: helpers.onProps,\n resize: helpers.resize,\n getParent: helpers.getParent,\n getParentDomain: helpers.getParentDomain,\n show: helpers.show,\n hide: helpers.hide,\n export: helpers.export,\n getSiblings: helpers.getSiblings\n }) : value;\n }\n function child_focus() {\n return promise_ZalgoPromise.try((function() {\n window.focus();\n }));\n }\n function child_destroy() {\n return promise_ZalgoPromise.try((function() {\n window.close();\n }));\n }\n var props_defaultNoop = function() {\n return src_util_noop;\n };\n var props_decorateOnce = function(_ref) {\n return once(_ref.value);\n };\n function eachProp(props, propsDef, handler) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(_extends({}, props, propsDef)); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n handler(key, propsDef[key], props[key]);\n }\n }\n function serializeProps(propsDef, props, method) {\n var params = {};\n return promise_ZalgoPromise.all(function(props, propsDef, handler) {\n var results = [];\n eachProp(props, propsDef, (function(key, propDef, value) {\n var result = function(key, propDef, value) {\n return promise_ZalgoPromise.resolve().then((function() {\n var _METHOD$GET$METHOD$PO, _METHOD$GET$METHOD$PO2;\n if (null != value && propDef) {\n var getParam = (_METHOD$GET$METHOD$PO = {}, _METHOD$GET$METHOD$PO.get = propDef.queryParam, \n _METHOD$GET$METHOD$PO.post = propDef.bodyParam, _METHOD$GET$METHOD$PO)[method];\n var getValue = (_METHOD$GET$METHOD$PO2 = {}, _METHOD$GET$METHOD$PO2.get = propDef.queryValue, \n _METHOD$GET$METHOD$PO2.post = propDef.bodyValue, _METHOD$GET$METHOD$PO2)[method];\n if (getParam) return promise_ZalgoPromise.hash({\n finalParam: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getParam ? getParam({\n value: value\n }) : \"string\" == typeof getParam ? getParam : key;\n })),\n finalValue: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getValue && isDefined(value) ? getValue({\n value: value\n }) : value;\n }))\n }).then((function(_ref) {\n var finalParam = _ref.finalParam, finalValue = _ref.finalValue;\n var result;\n if (\"boolean\" == typeof finalValue) result = finalValue.toString(); else if (\"string\" == typeof finalValue) result = finalValue.toString(); else if (\"object\" == typeof finalValue && null !== finalValue) {\n if (propDef.serialization === PROP_SERIALIZATION.JSON) result = JSON.stringify(finalValue); else if (propDef.serialization === PROP_SERIALIZATION.BASE64) result = base64encode(JSON.stringify(finalValue)); else if (propDef.serialization === PROP_SERIALIZATION.DOTIFY || !propDef.serialization) {\n result = function dotify(obj, prefix, newobj) {\n void 0 === prefix && (prefix = \"\");\n void 0 === newobj && (newobj = {});\n prefix = prefix ? prefix + \".\" : prefix;\n for (var key in obj) obj.hasOwnProperty(key) && null != obj[key] && \"function\" != typeof obj[key] && (obj[key] && Array.isArray(obj[key]) && obj[key].length && obj[key].every((function(val) {\n return \"object\" != typeof val;\n })) ? newobj[\"\" + prefix + key + \"[]\"] = obj[key].join(\",\") : obj[key] && \"object\" == typeof obj[key] ? newobj = dotify(obj[key], \"\" + prefix + key, newobj) : newobj[\"\" + prefix + key] = obj[key].toString());\n return newobj;\n }(finalValue, key);\n for (var _i2 = 0, _Object$keys2 = Object.keys(result); _i2 < _Object$keys2.length; _i2++) {\n var dotkey = _Object$keys2[_i2];\n params[dotkey] = result[dotkey];\n }\n return;\n }\n } else \"number\" == typeof finalValue && (result = finalValue.toString());\n params[finalParam] = result;\n }));\n }\n }));\n }(key, propDef, value);\n results.push(result);\n }));\n return results;\n }(props, propsDef)).then((function() {\n return params;\n }));\n }\n function parentComponent(_ref) {\n var uid = _ref.uid, options = _ref.options, _ref$overrides = _ref.overrides, overrides = void 0 === _ref$overrides ? {} : _ref$overrides, _ref$parentWin = _ref.parentWin, parentWin = void 0 === _ref$parentWin ? window : _ref$parentWin;\n var propsDef = options.propsDef, containerTemplate = options.containerTemplate, prerenderTemplate = options.prerenderTemplate, tag = options.tag, name = options.name, attributes = options.attributes, dimensions = options.dimensions, autoResize = options.autoResize, url = options.url, domainMatch = options.domain, xports = options.exports;\n var initPromise = new promise_ZalgoPromise;\n var handledErrors = [];\n var clean = cleanup();\n var state = {};\n var inputProps = {};\n var internalState = {\n visible: !0\n };\n var event = overrides.event ? overrides.event : (triggered = {}, handlers = {}, \n emitter = {\n on: function(eventName, handler) {\n var handlerList = handlers[eventName] = handlers[eventName] || [];\n handlerList.push(handler);\n var cancelled = !1;\n return {\n cancel: function() {\n if (!cancelled) {\n cancelled = !0;\n handlerList.splice(handlerList.indexOf(handler), 1);\n }\n }\n };\n },\n once: function(eventName, handler) {\n var listener = emitter.on(eventName, (function() {\n listener.cancel();\n handler();\n }));\n return listener;\n },\n trigger: function(eventName) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n var handlerList = handlers[eventName];\n var promises = [];\n if (handlerList) {\n var _loop = function(_i2) {\n var handler = handlerList[_i2];\n promises.push(promise_ZalgoPromise.try((function() {\n return handler.apply(void 0, args);\n })));\n };\n for (var _i2 = 0; _i2 < handlerList.length; _i2++) _loop(_i2);\n }\n return promise_ZalgoPromise.all(promises).then(src_util_noop);\n },\n triggerOnce: function(eventName) {\n if (triggered[eventName]) return promise_ZalgoPromise.resolve();\n triggered[eventName] = !0;\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) args[_key4 - 1] = arguments[_key4];\n return emitter.trigger.apply(emitter, [ eventName ].concat(args));\n },\n reset: function() {\n handlers = {};\n }\n });\n var triggered, handlers, emitter;\n var props = overrides.props ? overrides.props : {};\n var currentProxyWin;\n var currentProxyContainer;\n var childComponent;\n var currentChildDomain;\n var currentContainer;\n var onErrorOverride = overrides.onError;\n var getProxyContainerOverride = overrides.getProxyContainer;\n var showOverride = overrides.show;\n var hideOverride = overrides.hide;\n var closeOverride = overrides.close;\n var renderContainerOverride = overrides.renderContainer;\n var getProxyWindowOverride = overrides.getProxyWindow;\n var setProxyWinOverride = overrides.setProxyWin;\n var openFrameOverride = overrides.openFrame;\n var openPrerenderFrameOverride = overrides.openPrerenderFrame;\n var prerenderOverride = overrides.prerender;\n var openOverride = overrides.open;\n var openPrerenderOverride = overrides.openPrerender;\n var watchForUnloadOverride = overrides.watchForUnload;\n var getInternalStateOverride = overrides.getInternalState;\n var setInternalStateOverride = overrides.setInternalState;\n var getDimensions = function() {\n return \"function\" == typeof dimensions ? dimensions({\n props: props\n }) : dimensions;\n };\n var resolveInitPromise = function() {\n return promise_ZalgoPromise.try((function() {\n return overrides.resolveInitPromise ? overrides.resolveInitPromise() : initPromise.resolve();\n }));\n };\n var rejectInitPromise = function(err) {\n return promise_ZalgoPromise.try((function() {\n return overrides.rejectInitPromise ? overrides.rejectInitPromise(err) : initPromise.reject(err);\n }));\n };\n var getPropsForChild = function(initialChildDomain) {\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n prop && !1 === prop.sendToChild || prop && prop.sameDomain && !matchDomain(initialChildDomain, getDomain(window)) || (result[key] = props[key]);\n }\n return promise_ZalgoPromise.hash(result);\n };\n var getInternalState = function() {\n return promise_ZalgoPromise.try((function() {\n return getInternalStateOverride ? getInternalStateOverride() : internalState;\n }));\n };\n var setInternalState = function(newInternalState) {\n return promise_ZalgoPromise.try((function() {\n return setInternalStateOverride ? setInternalStateOverride(newInternalState) : internalState = _extends({}, internalState, newInternalState);\n }));\n };\n var getProxyWindow = function() {\n return getProxyWindowOverride ? getProxyWindowOverride() : promise_ZalgoPromise.try((function() {\n var windowProp = props.window;\n if (windowProp) {\n var _proxyWin = setup_toProxyWindow(windowProp);\n clean.register((function() {\n return windowProp.close();\n }));\n return _proxyWin;\n }\n return new window_ProxyWindow({\n send: send_send\n });\n }));\n };\n var setProxyWin = function(proxyWin) {\n return setProxyWinOverride ? setProxyWinOverride(proxyWin) : promise_ZalgoPromise.try((function() {\n currentProxyWin = proxyWin;\n }));\n };\n var show = function() {\n return showOverride ? showOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !0\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(showElement) : null\n }).then(src_util_noop);\n };\n var hide = function() {\n return hideOverride ? hideOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !1\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(hideElement) : null\n }).then(src_util_noop);\n };\n var getUrl = function() {\n return \"function\" == typeof url ? url({\n props: props\n }) : url;\n };\n var getAttributes = function() {\n return \"function\" == typeof attributes ? attributes({\n props: props\n }) : attributes;\n };\n var getInitialChildDomain = function() {\n return getDomainFromUrl(getUrl());\n };\n var openFrame = function(context, _ref2) {\n var windowName = _ref2.windowName;\n return openFrameOverride ? openFrameOverride(context, {\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: windowName,\n title: name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerenderFrame = function(context) {\n return openPrerenderFrameOverride ? openPrerenderFrameOverride(context) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: \"__zoid_prerender_frame__\" + name + \"_\" + uniqueID() + \"__\",\n title: \"prerender__\" + name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerender = function(context, proxyWin, proxyPrerenderFrame) {\n return openPrerenderOverride ? openPrerenderOverride(context, proxyWin, proxyPrerenderFrame) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyPrerenderFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyPrerenderFrame.get().then((function(prerenderFrame) {\n clean.register((function() {\n return destroyElement(prerenderFrame);\n }));\n return awaitFrameWindow(prerenderFrame).then((function(prerenderFrameWindow) {\n return assertSameDomain(prerenderFrameWindow);\n })).then((function(win) {\n return setup_toProxyWindow(win);\n }));\n }));\n }\n if (context === CONTEXT.POPUP) return proxyWin;\n throw new Error(\"No render context available for \" + context);\n }));\n };\n var focus = function() {\n return promise_ZalgoPromise.try((function() {\n if (currentProxyWin) return promise_ZalgoPromise.all([ event.trigger(EVENT.FOCUS), currentProxyWin.focus() ]).then(src_util_noop);\n }));\n };\n var getCurrentWindowReferenceUID = function() {\n var global = lib_global_getGlobal(window);\n global.windows = global.windows || {};\n global.windows[uid] = window;\n clean.register((function() {\n delete global.windows[uid];\n }));\n return uid;\n };\n var getWindowRef = function(target, initialChildDomain, context, proxyWin) {\n if (initialChildDomain === getDomain(window)) return {\n type: \"global\",\n uid: getCurrentWindowReferenceUID()\n };\n if (target !== window) throw new Error(\"Can not construct cross-domain window reference for different target window\");\n if (props.window) {\n var actualComponentWindow = proxyWin.getWindow();\n if (!actualComponentWindow) throw new Error(\"Can not construct cross-domain window reference for lazy window prop\");\n if (getAncestor(actualComponentWindow) !== window) throw new Error(\"Can not construct cross-domain window reference for window prop with different ancestor\");\n }\n if (context === CONTEXT.POPUP) return {\n type: \"opener\"\n };\n if (context === CONTEXT.IFRAME) return {\n type: \"parent\",\n distance: getDistanceFromTop(window)\n };\n throw new Error(\"Can not construct window reference for child\");\n };\n var initChild = function(childDomain, childExports) {\n return promise_ZalgoPromise.try((function() {\n currentChildDomain = childDomain;\n childComponent = childExports;\n resolveInitPromise();\n clean.register((function() {\n return childExports.close.fireAndForget().catch(src_util_noop);\n }));\n }));\n };\n var resize = function(_ref3) {\n var width = _ref3.width, height = _ref3.height;\n return promise_ZalgoPromise.try((function() {\n event.trigger(EVENT.RESIZE, {\n width: width,\n height: height\n });\n }));\n };\n var destroy = function(err) {\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.DESTROY);\n })).catch(src_util_noop).then((function() {\n return clean.all(err);\n })).then((function() {\n initPromise.asyncReject(err || new Error(\"Component destroyed\"));\n }));\n };\n var close = memoize((function(err) {\n return promise_ZalgoPromise.try((function() {\n if (closeOverride) {\n if (isWindowClosed(closeOverride.__source__)) return;\n return closeOverride();\n }\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.CLOSE);\n })).then((function() {\n return destroy(err || new Error(\"Component closed\"));\n }));\n }));\n }));\n var open = function(context, _ref4) {\n var proxyWin = _ref4.proxyWin, proxyFrame = _ref4.proxyFrame, windowName = _ref4.windowName;\n return openOverride ? openOverride(context, {\n proxyWin: proxyWin,\n proxyFrame: proxyFrame,\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyFrame.get().then((function(frame) {\n return awaitFrameWindow(frame).then((function(win) {\n clean.register((function() {\n return destroyElement(frame);\n }));\n clean.register((function() {\n return cleanUpWindow(win);\n }));\n return win;\n }));\n }));\n }\n if (context === CONTEXT.POPUP) {\n var _getDimensions = getDimensions(), _getDimensions$width = _getDimensions.width, width = void 0 === _getDimensions$width ? \"300px\" : _getDimensions$width, _getDimensions$height = _getDimensions.height, height = void 0 === _getDimensions$height ? \"150px\" : _getDimensions$height;\n width = normalizeDimension(width, window.outerWidth);\n height = normalizeDimension(height, window.outerWidth);\n var win = function(url, options) {\n var _options$closeOnUnloa = (options = options || {}).closeOnUnload, closeOnUnload = void 0 === _options$closeOnUnloa ? 1 : _options$closeOnUnloa, _options$name = options.name, name = void 0 === _options$name ? \"\" : _options$name, width = options.width, height = options.height;\n var top = 0;\n var left = 0;\n width && (window.outerWidth ? left = Math.round((window.outerWidth - width) / 2) + window.screenX : window.screen.width && (left = Math.round((window.screen.width - width) / 2)));\n height && (window.outerHeight ? top = Math.round((window.outerHeight - height) / 2) + window.screenY : window.screen.height && (top = Math.round((window.screen.height - height) / 2)));\n delete options.closeOnUnload;\n delete options.name;\n width && height && (options = _extends({\n top: top,\n left: left,\n width: width,\n height: height,\n status: 1,\n toolbar: 0,\n menubar: 0,\n resizable: 1,\n scrollbars: 1\n }, options));\n var params = Object.keys(options).map((function(key) {\n if (null != options[key]) return key + \"=\" + stringify(options[key]);\n })).filter(Boolean).join(\",\");\n var win;\n try {\n win = window.open(\"\", name, params);\n } catch (err) {\n throw new dom_PopupOpenError(\"Can not open popup window - \" + (err.stack || err.message));\n }\n if (isWindowClosed(win)) {\n var err;\n throw new dom_PopupOpenError(\"Can not open popup window - blocked\");\n }\n closeOnUnload && window.addEventListener(\"unload\", (function() {\n return win.close();\n }));\n return win;\n }(0, _extends({\n name: windowName,\n width: width,\n height: height\n }, getAttributes().popup));\n clean.register((function() {\n return closeWindow(win);\n }));\n clean.register((function() {\n return cleanUpWindow(win);\n }));\n return win;\n }\n throw new Error(\"No render context available for \" + context);\n })).then((function(win) {\n proxyWin.setWindow(win, {\n send: send_send\n });\n return proxyWin.setName(windowName).then((function() {\n return proxyWin;\n }));\n }));\n };\n var watchForUnload = function() {\n return promise_ZalgoPromise.try((function() {\n var unloadWindowListener = addEventListener(window, \"unload\", once((function() {\n destroy(new Error(\"Window navigated away\"));\n })));\n var closeParentWindowListener = onCloseWindow(parentWin, destroy, 3e3);\n clean.register(closeParentWindowListener.cancel);\n clean.register(unloadWindowListener.cancel);\n if (watchForUnloadOverride) return watchForUnloadOverride();\n }));\n };\n var checkWindowClose = function(proxyWin) {\n var closed = !1;\n return proxyWin.isClosed().then((function(isClosed) {\n if (isClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n return promise_ZalgoPromise.delay(200).then((function() {\n return proxyWin.isClosed();\n })).then((function(secondIsClosed) {\n if (secondIsClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n }));\n })).then((function() {\n return closed;\n }));\n };\n var onError = function(err) {\n return onErrorOverride ? onErrorOverride(err) : promise_ZalgoPromise.try((function() {\n if (-1 === handledErrors.indexOf(err)) {\n handledErrors.push(err);\n initPromise.asyncReject(err);\n return event.trigger(EVENT.ERROR, err);\n }\n }));\n };\n var exportsPromise = new promise_ZalgoPromise;\n var xport = function(actualExports) {\n return promise_ZalgoPromise.try((function() {\n exportsPromise.resolve(actualExports);\n }));\n };\n initChild.onError = onError;\n var renderTemplate = function(renderer, _ref8) {\n return renderer({\n uid: uid,\n container: _ref8.container,\n context: _ref8.context,\n doc: _ref8.doc,\n frame: _ref8.frame,\n prerenderFrame: _ref8.prerenderFrame,\n focus: focus,\n close: close,\n state: state,\n props: props,\n tag: tag,\n dimensions: getDimensions(),\n event: event\n });\n };\n var prerender = function(proxyPrerenderWin, _ref9) {\n var context = _ref9.context;\n return prerenderOverride ? prerenderOverride(proxyPrerenderWin, {\n context: context\n }) : promise_ZalgoPromise.try((function() {\n if (prerenderTemplate) {\n var prerenderWindow = proxyPrerenderWin.getWindow();\n if (prerenderWindow && isSameDomain(prerenderWindow) && function(win) {\n try {\n if (!win.location.href) return !0;\n if (\"about:blank\" === win.location.href) return !0;\n } catch (err) {}\n return !1;\n }(prerenderWindow)) {\n var doc = (prerenderWindow = assertSameDomain(prerenderWindow)).document;\n var el = renderTemplate(prerenderTemplate, {\n context: context,\n doc: doc\n });\n if (el) {\n if (el.ownerDocument !== doc) throw new Error(\"Expected prerender template to have been created with document from child window\");\n !function(win, el) {\n var tag = el.tagName.toLowerCase();\n if (\"html\" !== tag) throw new Error(\"Expected element to be html, got \" + tag);\n var documentElement = win.document.documentElement;\n for (var _i6 = 0, _arrayFrom2 = arrayFrom(documentElement.children); _i6 < _arrayFrom2.length; _i6++) documentElement.removeChild(_arrayFrom2[_i6]);\n for (var _i8 = 0, _arrayFrom4 = arrayFrom(el.children); _i8 < _arrayFrom4.length; _i8++) documentElement.appendChild(_arrayFrom4[_i8]);\n }(prerenderWindow, el);\n var _autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, _autoResize$element = autoResize.element, element = void 0 === _autoResize$element ? \"body\" : _autoResize$element;\n if ((element = getElementSafe(element, doc)) && (width || height)) {\n var prerenderResizeListener = onResize(element, (function(_ref10) {\n resize({\n width: width ? _ref10.width : void 0,\n height: height ? _ref10.height : void 0\n });\n }), {\n width: width,\n height: height,\n win: prerenderWindow\n });\n event.on(EVENT.RENDERED, prerenderResizeListener.cancel);\n }\n }\n }\n }\n }));\n };\n var renderContainer = function(proxyContainer, _ref11) {\n var proxyFrame = _ref11.proxyFrame, proxyPrerenderFrame = _ref11.proxyPrerenderFrame, context = _ref11.context, rerender = _ref11.rerender;\n return renderContainerOverride ? renderContainerOverride(proxyContainer, {\n proxyFrame: proxyFrame,\n proxyPrerenderFrame: proxyPrerenderFrame,\n context: context,\n rerender: rerender\n }) : promise_ZalgoPromise.hash({\n container: proxyContainer.get(),\n frame: proxyFrame ? proxyFrame.get() : null,\n prerenderFrame: proxyPrerenderFrame ? proxyPrerenderFrame.get() : null,\n internalState: getInternalState()\n }).then((function(_ref12) {\n var container = _ref12.container, visible = _ref12.internalState.visible;\n var innerContainer = renderTemplate(containerTemplate, {\n context: context,\n container: container,\n frame: _ref12.frame,\n prerenderFrame: _ref12.prerenderFrame,\n doc: document\n });\n if (innerContainer) {\n visible || hideElement(innerContainer);\n appendChild(container, innerContainer);\n var containerWatcher = function(element, handler) {\n handler = once(handler);\n var cancelled = !1;\n var mutationObservers = [];\n var interval;\n var sacrificialFrame;\n var sacrificialFrameWin;\n var cancel = function() {\n cancelled = !0;\n for (var _i18 = 0; _i18 < mutationObservers.length; _i18++) mutationObservers[_i18].disconnect();\n interval && interval.cancel();\n sacrificialFrameWin && sacrificialFrameWin.removeEventListener(\"unload\", elementClosed);\n sacrificialFrame && destroyElement(sacrificialFrame);\n };\n var elementClosed = function() {\n if (!cancelled) {\n handler();\n cancel();\n }\n };\n if (isElementClosed(element)) {\n elementClosed();\n return {\n cancel: cancel\n };\n }\n if (window.MutationObserver) {\n var mutationElement = element.parentElement;\n for (;mutationElement; ) {\n var mutationObserver = new window.MutationObserver((function() {\n isElementClosed(element) && elementClosed();\n }));\n mutationObserver.observe(mutationElement, {\n childList: !0\n });\n mutationObservers.push(mutationObserver);\n mutationElement = mutationElement.parentElement;\n }\n }\n (sacrificialFrame = document.createElement(\"iframe\")).setAttribute(\"name\", \"__detect_close_\" + uniqueID() + \"__\");\n sacrificialFrame.style.display = \"none\";\n awaitFrameWindow(sacrificialFrame).then((function(frameWin) {\n (sacrificialFrameWin = assertSameDomain(frameWin)).addEventListener(\"unload\", elementClosed);\n }));\n element.appendChild(sacrificialFrame);\n interval = safeInterval((function() {\n isElementClosed(element) && elementClosed();\n }), 1e3);\n return {\n cancel: cancel\n };\n }(innerContainer, (function() {\n var removeError = new Error(\"Detected container element removed from DOM\");\n return promise_ZalgoPromise.delay(1).then((function() {\n if (!isElementClosed(innerContainer)) {\n clean.all(removeError);\n return rerender().then(resolveInitPromise, rejectInitPromise);\n }\n close(removeError);\n }));\n }));\n clean.register((function() {\n return containerWatcher.cancel();\n }));\n clean.register((function() {\n return destroyElement(innerContainer);\n }));\n return currentProxyContainer = getProxyObject(innerContainer);\n }\n }));\n };\n var getHelpers = function() {\n return {\n state: state,\n event: event,\n close: close,\n focus: focus,\n resize: resize,\n onError: onError,\n updateProps: updateProps,\n show: show,\n hide: hide\n };\n };\n var setProps = function(newInputProps) {\n void 0 === newInputProps && (newInputProps = {});\n var container = currentContainer;\n var helpers = getHelpers();\n extend(inputProps, newInputProps);\n !function(propsDef, existingProps, inputProps, helpers, container) {\n var state = helpers.state, close = helpers.close, focus = helpers.focus, event = helpers.event, onError = helpers.onError;\n eachProp(inputProps, propsDef, (function(key, propDef, val) {\n var valueDetermined = !1;\n var value = val;\n Object.defineProperty(existingProps, key, {\n configurable: !0,\n enumerable: !0,\n get: function() {\n if (valueDetermined) return value;\n valueDetermined = !0;\n return function() {\n if (!propDef) return value;\n var alias = propDef.alias;\n alias && !isDefined(val) && isDefined(inputProps[alias]) && (value = inputProps[alias]);\n propDef.value && (value = propDef.value({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n !propDef.default || isDefined(value) || isDefined(inputProps[key]) || (value = propDef.default({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n if (isDefined(value)) {\n if (propDef.type === PROP_TYPE.ARRAY ? !Array.isArray(value) : typeof value !== propDef.type) throw new TypeError(\"Prop is not of type \" + propDef.type + \": \" + key);\n } else if (!1 !== propDef.required && !isDefined(inputProps[key])) throw new Error('Expected prop \"' + key + '\" to be defined');\n isDefined(value) && propDef.decorate && (value = propDef.decorate({\n value: value,\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n return value;\n }();\n }\n });\n }));\n eachProp(existingProps, propsDef, src_util_noop);\n }(propsDef, props, inputProps, helpers, container);\n };\n var updateProps = function(newProps) {\n setProps(newProps);\n return initPromise.then((function() {\n var child = childComponent;\n var proxyWin = currentProxyWin;\n if (child && proxyWin && currentChildDomain) return getPropsForChild(currentChildDomain).then((function(childProps) {\n return child.updateProps(childProps).catch((function(err) {\n return checkWindowClose(proxyWin).then((function(closed) {\n if (!closed) throw err;\n }));\n }));\n }));\n }));\n };\n var getProxyContainer = function(container) {\n return getProxyContainerOverride ? getProxyContainerOverride(container) : promise_ZalgoPromise.try((function() {\n return elementReady(container);\n })).then((function(containerElement) {\n isShadowElement(containerElement) && (containerElement = function insertShadowSlot(element) {\n var shadowHost = function(element) {\n var shadowRoot = function(element) {\n for (;element.parentNode; ) element = element.parentNode;\n if (isShadowElement(element)) return element;\n }(element);\n if (shadowRoot && shadowRoot.host) return shadowRoot.host;\n }(element);\n if (!shadowHost) throw new Error(\"Element is not in shadow dom\");\n var slotName = \"shadow-slot-\" + uniqueID();\n var slot = document.createElement(\"slot\");\n slot.setAttribute(\"name\", slotName);\n element.appendChild(slot);\n var slotProvider = document.createElement(\"div\");\n slotProvider.setAttribute(\"slot\", slotName);\n shadowHost.appendChild(slotProvider);\n return isShadowElement(shadowHost) ? insertShadowSlot(slotProvider) : slotProvider;\n }(containerElement));\n currentContainer = containerElement;\n return getProxyObject(containerElement);\n }));\n };\n return {\n init: function() {\n !function() {\n event.on(EVENT.RENDER, (function() {\n return props.onRender();\n }));\n event.on(EVENT.DISPLAY, (function() {\n return props.onDisplay();\n }));\n event.on(EVENT.RENDERED, (function() {\n return props.onRendered();\n }));\n event.on(EVENT.CLOSE, (function() {\n return props.onClose();\n }));\n event.on(EVENT.DESTROY, (function() {\n return props.onDestroy();\n }));\n event.on(EVENT.RESIZE, (function() {\n return props.onResize();\n }));\n event.on(EVENT.FOCUS, (function() {\n return props.onFocus();\n }));\n event.on(EVENT.PROPS, (function(newProps) {\n return props.onProps(newProps);\n }));\n event.on(EVENT.ERROR, (function(err) {\n return props && props.onError ? props.onError(err) : rejectInitPromise(err).then((function() {\n setTimeout((function() {\n throw err;\n }), 1);\n }));\n }));\n clean.register(event.reset);\n }();\n },\n render: function(_ref14) {\n var target = _ref14.target, container = _ref14.container, context = _ref14.context, rerender = _ref14.rerender;\n return promise_ZalgoPromise.try((function() {\n var initialChildDomain = getInitialChildDomain();\n var childDomainMatch = domainMatch || getInitialChildDomain();\n !function(target, childDomainMatch, container) {\n if (target !== window) {\n if (!isSameTopWindow(window, target)) throw new Error(\"Can only renderTo an adjacent frame\");\n var origin = getDomain();\n if (!matchDomain(childDomainMatch, origin) && !isSameDomain(target)) throw new Error(\"Can not render remotely to \" + childDomainMatch.toString() + \" - can only render to \" + origin);\n if (container && \"string\" != typeof container) throw new Error(\"Container passed to renderTo must be a string selector, got \" + typeof container + \" }\");\n }\n }(target, childDomainMatch, container);\n var delegatePromise = promise_ZalgoPromise.try((function() {\n if (target !== window) return function(context, target) {\n var delegateProps = {};\n for (var _i4 = 0, _Object$keys4 = Object.keys(props); _i4 < _Object$keys4.length; _i4++) {\n var propName = _Object$keys4[_i4];\n var propDef = propsDef[propName];\n propDef && propDef.allowDelegate && (delegateProps[propName] = props[propName]);\n }\n var childOverridesPromise = send_send(target, \"zoid_delegate_\" + name, {\n uid: uid,\n overrides: {\n props: delegateProps,\n event: event,\n close: close,\n onError: onError,\n getInternalState: getInternalState,\n setInternalState: setInternalState,\n resolveInitPromise: resolveInitPromise,\n rejectInitPromise: rejectInitPromise\n }\n }).then((function(_ref13) {\n var parentComp = _ref13.data.parent;\n clean.register((function(err) {\n if (!isWindowClosed(target)) return parentComp.destroy(err);\n }));\n return parentComp.getDelegateOverrides();\n })).catch((function(err) {\n throw new Error(\"Unable to delegate rendering. Possibly the component is not loaded in the target window.\\n\\n\" + stringifyError(err));\n }));\n getProxyContainerOverride = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyContainer.apply(childOverrides, args);\n }));\n };\n renderContainerOverride = function() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.renderContainer.apply(childOverrides, args);\n }));\n };\n showOverride = function() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.show.apply(childOverrides, args);\n }));\n };\n hideOverride = function() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.hide.apply(childOverrides, args);\n }));\n };\n watchForUnloadOverride = function() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) args[_key5] = arguments[_key5];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.watchForUnload.apply(childOverrides, args);\n }));\n };\n if (context === CONTEXT.IFRAME) {\n getProxyWindowOverride = function() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) args[_key6] = arguments[_key6];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyWindow.apply(childOverrides, args);\n }));\n };\n openFrameOverride = function() {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) args[_key7] = arguments[_key7];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openFrame.apply(childOverrides, args);\n }));\n };\n openPrerenderFrameOverride = function() {\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) args[_key8] = arguments[_key8];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerenderFrame.apply(childOverrides, args);\n }));\n };\n prerenderOverride = function() {\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) args[_key9] = arguments[_key9];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.prerender.apply(childOverrides, args);\n }));\n };\n openOverride = function() {\n for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) args[_key10] = arguments[_key10];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.open.apply(childOverrides, args);\n }));\n };\n openPrerenderOverride = function() {\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) args[_key11] = arguments[_key11];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerender.apply(childOverrides, args);\n }));\n };\n } else context === CONTEXT.POPUP && (setProxyWinOverride = function() {\n for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) args[_key12] = arguments[_key12];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.setProxyWin.apply(childOverrides, args);\n }));\n });\n return childOverridesPromise;\n }(context, target);\n }));\n var windowProp = props.window;\n var watchForUnloadPromise = watchForUnload();\n var buildBodyPromise = serializeProps(propsDef, props, \"post\");\n var onRenderPromise = event.trigger(EVENT.RENDER);\n var getProxyContainerPromise = getProxyContainer(container);\n var getProxyWindowPromise = getProxyWindow();\n var finalSetPropsPromise = getProxyContainerPromise.then((function() {\n return setProps();\n }));\n var buildUrlPromise = finalSetPropsPromise.then((function() {\n return serializeProps(propsDef, props, \"get\").then((function(query) {\n return function(url, options) {\n var query = options.query || {};\n var hash = options.hash || {};\n var originalUrl;\n var originalHash;\n var _url$split = url.split(\"#\");\n originalHash = _url$split[1];\n var _originalUrl$split = (originalUrl = _url$split[0]).split(\"?\");\n originalUrl = _originalUrl$split[0];\n var queryString = extendQuery(_originalUrl$split[1], query);\n var hashString = extendQuery(originalHash, hash);\n queryString && (originalUrl = originalUrl + \"?\" + queryString);\n hashString && (originalUrl = originalUrl + \"#\" + hashString);\n return originalUrl;\n }(normalizeMockUrl(getUrl()), {\n query: query\n });\n }));\n }));\n var buildWindowNamePromise = getProxyWindowPromise.then((function(proxyWin) {\n return function(_temp2) {\n var _ref6 = void 0 === _temp2 ? {} : _temp2, proxyWin = _ref6.proxyWin, initialChildDomain = _ref6.initialChildDomain, childDomainMatch = _ref6.childDomainMatch, _ref6$target = _ref6.target, target = void 0 === _ref6$target ? window : _ref6$target, context = _ref6.context;\n return function(_temp) {\n var _ref5 = void 0 === _temp ? {} : _temp, proxyWin = _ref5.proxyWin, childDomainMatch = _ref5.childDomainMatch, context = _ref5.context;\n return getPropsForChild(_ref5.initialChildDomain).then((function(childProps) {\n return {\n uid: uid,\n context: context,\n tag: tag,\n childDomainMatch: childDomainMatch,\n version: \"9_0_86\",\n props: childProps,\n exports: (win = proxyWin, {\n init: function(childExports) {\n return initChild(this.origin, childExports);\n },\n close: close,\n checkClose: function() {\n return checkWindowClose(win);\n },\n resize: resize,\n onError: onError,\n show: show,\n hide: hide,\n export: xport\n })\n };\n var win;\n }));\n }({\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n context: context\n }).then((function(childPayload) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: childPayload,\n metaData: {\n windowRef: getWindowRef(target, initialChildDomain, context, proxyWin)\n },\n sender: {\n domain: getDomain(window)\n },\n receiver: {\n win: proxyWin,\n domain: childDomainMatch\n },\n passByReference: initialChildDomain === getDomain()\n }), serializedData = _crossDomainSerialize.serializedData;\n clean.register(_crossDomainSerialize.cleanReference);\n return serializedData;\n }));\n }({\n proxyWin: (_ref7 = {\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n target: target,\n context: context\n }).proxyWin,\n initialChildDomain: _ref7.initialChildDomain,\n childDomainMatch: _ref7.childDomainMatch,\n target: _ref7.target,\n context: _ref7.context\n }).then((function(serializedPayload) {\n return buildChildWindowName({\n name: name,\n serializedPayload: serializedPayload\n });\n }));\n var _ref7;\n }));\n var openFramePromise = buildWindowNamePromise.then((function(windowName) {\n return openFrame(context, {\n windowName: windowName\n });\n }));\n var openPrerenderFramePromise = openPrerenderFrame(context);\n var renderContainerPromise = promise_ZalgoPromise.hash({\n proxyContainer: getProxyContainerPromise,\n proxyFrame: openFramePromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref15) {\n return renderContainer(_ref15.proxyContainer, {\n context: context,\n proxyFrame: _ref15.proxyFrame,\n proxyPrerenderFrame: _ref15.proxyPrerenderFrame,\n rerender: rerender\n });\n })).then((function(proxyContainer) {\n return proxyContainer;\n }));\n var openPromise = promise_ZalgoPromise.hash({\n windowName: buildWindowNamePromise,\n proxyFrame: openFramePromise,\n proxyWin: getProxyWindowPromise\n }).then((function(_ref16) {\n var proxyWin = _ref16.proxyWin;\n return windowProp ? proxyWin : open(context, {\n windowName: _ref16.windowName,\n proxyWin: proxyWin,\n proxyFrame: _ref16.proxyFrame\n });\n }));\n var openPrerenderPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref17) {\n return openPrerender(context, _ref17.proxyWin, _ref17.proxyPrerenderFrame);\n }));\n var setStatePromise = openPromise.then((function(proxyWin) {\n currentProxyWin = proxyWin;\n return setProxyWin(proxyWin);\n }));\n var prerenderPromise = promise_ZalgoPromise.hash({\n proxyPrerenderWin: openPrerenderPromise,\n state: setStatePromise\n }).then((function(_ref18) {\n return prerender(_ref18.proxyPrerenderWin, {\n context: context\n });\n }));\n var setWindowNamePromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowName: buildWindowNamePromise\n }).then((function(_ref19) {\n if (windowProp) return _ref19.proxyWin.setName(_ref19.windowName);\n }));\n var getMethodPromise = promise_ZalgoPromise.hash({\n body: buildBodyPromise\n }).then((function(_ref20) {\n return options.method ? options.method : Object.keys(_ref20.body).length ? \"post\" : \"get\";\n }));\n var loadUrlPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowUrl: buildUrlPromise,\n body: buildBodyPromise,\n method: getMethodPromise,\n windowName: setWindowNamePromise,\n prerender: prerenderPromise\n }).then((function(_ref21) {\n return _ref21.proxyWin.setLocation(_ref21.windowUrl, {\n method: _ref21.method,\n body: _ref21.body\n });\n }));\n var watchForClosePromise = openPromise.then((function(proxyWin) {\n !function watchForClose(proxyWin, context) {\n var cancelled = !1;\n clean.register((function() {\n cancelled = !0;\n }));\n return promise_ZalgoPromise.delay(2e3).then((function() {\n return proxyWin.isClosed();\n })).then((function(isClosed) {\n if (!cancelled) return isClosed ? close(new Error(\"Detected \" + context + \" close\")) : watchForClose(proxyWin, context);\n }));\n }(proxyWin, context);\n }));\n var onDisplayPromise = promise_ZalgoPromise.hash({\n container: renderContainerPromise,\n prerender: prerenderPromise\n }).then((function() {\n return event.trigger(EVENT.DISPLAY);\n }));\n var openBridgePromise = openPromise.then((function(proxyWin) {\n return function(proxyWin, initialChildDomain, context) {\n return promise_ZalgoPromise.try((function() {\n return proxyWin.awaitWindow();\n })).then((function(win) {\n if (src_bridge && src_bridge.needsBridge({\n win: win,\n domain: initialChildDomain\n }) && !src_bridge.hasBridge(initialChildDomain, initialChildDomain)) {\n var bridgeUrl = \"function\" == typeof options.bridgeUrl ? options.bridgeUrl({\n props: props\n }) : options.bridgeUrl;\n if (!bridgeUrl) throw new Error(\"Bridge needed to render \" + context);\n var bridgeDomain = getDomainFromUrl(bridgeUrl);\n src_bridge.linkUrl(win, initialChildDomain);\n return src_bridge.openBridge(normalizeMockUrl(bridgeUrl), bridgeDomain);\n }\n }));\n }(proxyWin, initialChildDomain, context);\n }));\n var runTimeoutPromise = loadUrlPromise.then((function() {\n return promise_ZalgoPromise.try((function() {\n var timeout = props.timeout;\n if (timeout) return initPromise.timeout(timeout, new Error(\"Loading component timed out after \" + timeout + \" milliseconds\"));\n }));\n }));\n var onRenderedPromise = initPromise.then((function() {\n return event.trigger(EVENT.RENDERED);\n }));\n return promise_ZalgoPromise.hash({\n initPromise: initPromise,\n buildUrlPromise: buildUrlPromise,\n onRenderPromise: onRenderPromise,\n getProxyContainerPromise: getProxyContainerPromise,\n openFramePromise: openFramePromise,\n openPrerenderFramePromise: openPrerenderFramePromise,\n renderContainerPromise: renderContainerPromise,\n openPromise: openPromise,\n openPrerenderPromise: openPrerenderPromise,\n setStatePromise: setStatePromise,\n prerenderPromise: prerenderPromise,\n loadUrlPromise: loadUrlPromise,\n buildWindowNamePromise: buildWindowNamePromise,\n setWindowNamePromise: setWindowNamePromise,\n watchForClosePromise: watchForClosePromise,\n onDisplayPromise: onDisplayPromise,\n openBridgePromise: openBridgePromise,\n runTimeoutPromise: runTimeoutPromise,\n onRenderedPromise: onRenderedPromise,\n delegatePromise: delegatePromise,\n watchForUnloadPromise: watchForUnloadPromise,\n finalSetPropsPromise: finalSetPropsPromise\n });\n })).catch((function(err) {\n return promise_ZalgoPromise.all([ onError(err), destroy(err) ]).then((function() {\n throw err;\n }), (function() {\n throw err;\n }));\n })).then(src_util_noop);\n },\n destroy: destroy,\n getProps: function() {\n return props;\n },\n setProps: setProps,\n export: xport,\n getHelpers: getHelpers,\n getDelegateOverrides: function() {\n return promise_ZalgoPromise.try((function() {\n return {\n getProxyContainer: getProxyContainer,\n show: show,\n hide: hide,\n renderContainer: renderContainer,\n getProxyWindow: getProxyWindow,\n watchForUnload: watchForUnload,\n openFrame: openFrame,\n openPrerenderFrame: openPrerenderFrame,\n prerender: prerender,\n open: open,\n openPrerender: openPrerender,\n setProxyWin: setProxyWin\n };\n }));\n },\n getExports: function() {\n return xports({\n getExports: function() {\n return exportsPromise;\n }\n });\n }\n };\n }\n function defaultContainerTemplate(_ref) {\n var uid = _ref.uid, frame = _ref.frame, prerenderFrame = _ref.prerenderFrame, doc = _ref.doc, props = _ref.props, event = _ref.event, dimensions = _ref.dimensions;\n var width = dimensions.width, height = dimensions.height;\n if (frame && prerenderFrame) {\n var div = doc.createElement(\"div\");\n div.setAttribute(\"id\", uid);\n var style = doc.createElement(\"style\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n style.appendChild(doc.createTextNode(\"\\n #\" + uid + \" {\\n display: inline-block;\\n position: relative;\\n width: \" + width + \";\\n height: \" + height + \";\\n }\\n\\n #\" + uid + \" > iframe {\\n display: inline-block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n top: 0;\\n left: 0;\\n transition: opacity .2s ease-in-out;\\n }\\n\\n #\" + uid + \" > iframe.zoid-invisible {\\n opacity: 0;\\n }\\n\\n #\" + uid + \" > iframe.zoid-visible {\\n opacity: 1;\\n }\\n \"));\n div.appendChild(frame);\n div.appendChild(prerenderFrame);\n div.appendChild(style);\n prerenderFrame.classList.add(\"zoid-visible\");\n frame.classList.add(\"zoid-invisible\");\n event.on(EVENT.RENDERED, (function() {\n prerenderFrame.classList.remove(\"zoid-visible\");\n prerenderFrame.classList.add(\"zoid-invisible\");\n frame.classList.remove(\"zoid-invisible\");\n frame.classList.add(\"zoid-visible\");\n setTimeout((function() {\n destroyElement(prerenderFrame);\n }), 1);\n }));\n event.on(EVENT.RESIZE, (function(_ref2) {\n var newWidth = _ref2.width, newHeight = _ref2.height;\n \"number\" == typeof newWidth && (div.style.width = toCSS(newWidth));\n \"number\" == typeof newHeight && (div.style.height = toCSS(newHeight));\n }));\n return div;\n }\n }\n function defaultPrerenderTemplate(_ref) {\n var doc = _ref.doc, props = _ref.props;\n var html = doc.createElement(\"html\");\n var body = doc.createElement(\"body\");\n var style = doc.createElement(\"style\");\n var spinner = doc.createElement(\"div\");\n spinner.classList.add(\"spinner\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n html.appendChild(body);\n body.appendChild(spinner);\n body.appendChild(style);\n style.appendChild(doc.createTextNode(\"\\n html, body {\\n width: 100%;\\n height: 100%;\\n }\\n\\n .spinner {\\n position: fixed;\\n max-height: 60vmin;\\n max-width: 60vmin;\\n height: 40px;\\n width: 40px;\\n top: 50%;\\n left: 50%;\\n box-sizing: border-box;\\n border: 3px solid rgba(0, 0, 0, .2);\\n border-top-color: rgba(33, 128, 192, 0.8);\\n border-radius: 100%;\\n animation: rotation .7s infinite linear;\\n }\\n\\n @keyframes rotation {\\n from {\\n transform: translateX(-50%) translateY(-50%) rotate(0deg);\\n }\\n to {\\n transform: translateX(-50%) translateY(-50%) rotate(359deg);\\n }\\n }\\n \"));\n return html;\n }\n var cleanInstances = cleanup();\n var cleanZoid = cleanup();\n function component(opts) {\n var options = function(options) {\n var tag = options.tag, url = options.url, domain = options.domain, bridgeUrl = options.bridgeUrl, _options$props = options.props, props = void 0 === _options$props ? {} : _options$props, _options$dimensions = options.dimensions, dimensions = void 0 === _options$dimensions ? {} : _options$dimensions, _options$autoResize = options.autoResize, autoResize = void 0 === _options$autoResize ? {} : _options$autoResize, _options$allowedParen = options.allowedParentDomains, allowedParentDomains = void 0 === _options$allowedParen ? \"*\" : _options$allowedParen, _options$attributes = options.attributes, attributes = void 0 === _options$attributes ? {} : _options$attributes, _options$defaultConte = options.defaultContext, defaultContext = void 0 === _options$defaultConte ? CONTEXT.IFRAME : _options$defaultConte, _options$containerTem = options.containerTemplate, containerTemplate = void 0 === _options$containerTem ? defaultContainerTemplate : _options$containerTem, _options$prerenderTem = options.prerenderTemplate, prerenderTemplate = void 0 === _options$prerenderTem ? defaultPrerenderTemplate : _options$prerenderTem, validate = options.validate, _options$eligible = options.eligible, eligible = void 0 === _options$eligible ? function() {\n return {\n eligible: !0\n };\n } : _options$eligible, _options$logger = options.logger, logger = void 0 === _options$logger ? {\n info: src_util_noop\n } : _options$logger, _options$exports = options.exports, xportsDefinition = void 0 === _options$exports ? src_util_noop : _options$exports, method = options.method, _options$children = options.children, children = void 0 === _options$children ? function() {\n return {};\n } : _options$children;\n var name = tag.replace(/-/g, \"_\");\n var propsDef = _extends({}, {\n window: {\n type: PROP_TYPE.OBJECT,\n sendToChild: !1,\n required: !1,\n allowDelegate: !0,\n validate: function(_ref2) {\n var value = _ref2.value;\n if (!isWindow(value) && !window_ProxyWindow.isProxyWindow(value)) throw new Error(\"Expected Window or ProxyWindow\");\n if (isWindow(value)) {\n if (isWindowClosed(value)) throw new Error(\"Window is closed\");\n if (!isSameDomain(value)) throw new Error(\"Window is not same domain\");\n }\n },\n decorate: function(_ref3) {\n return setup_toProxyWindow(_ref3.value);\n }\n },\n timeout: {\n type: PROP_TYPE.NUMBER,\n required: !1,\n sendToChild: !1\n },\n cspNonce: {\n type: PROP_TYPE.STRING,\n required: !1\n },\n onDisplay: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRendered: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRender: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onClose: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onDestroy: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onResize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n onFocus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n close: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref4) {\n return _ref4.close;\n }\n },\n focus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref5) {\n return _ref5.focus;\n }\n },\n resize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref6) {\n return _ref6.resize;\n }\n },\n uid: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref7) {\n return _ref7.uid;\n }\n },\n tag: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref8) {\n return _ref8.tag;\n }\n },\n getParent: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref9) {\n return _ref9.getParent;\n }\n },\n getParentDomain: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref10) {\n return _ref10.getParentDomain;\n }\n },\n show: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref11) {\n return _ref11.show;\n }\n },\n hide: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref12) {\n return _ref12.hide;\n }\n },\n export: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref13) {\n return _ref13.export;\n }\n },\n onError: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref14) {\n return _ref14.onError;\n }\n },\n onProps: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref15) {\n return _ref15.onProps;\n }\n },\n getSiblings: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref16) {\n return _ref16.getSiblings;\n }\n }\n }, props);\n if (!containerTemplate) throw new Error(\"Container template required\");\n return {\n name: name,\n tag: tag,\n url: url,\n domain: domain,\n bridgeUrl: bridgeUrl,\n method: method,\n propsDef: propsDef,\n dimensions: dimensions,\n autoResize: autoResize,\n allowedParentDomains: allowedParentDomains,\n attributes: attributes,\n defaultContext: defaultContext,\n containerTemplate: containerTemplate,\n prerenderTemplate: prerenderTemplate,\n validate: validate,\n logger: logger,\n eligible: eligible,\n children: children,\n exports: \"function\" == typeof xportsDefinition ? xportsDefinition : function(_ref) {\n var getExports = _ref.getExports;\n var result = {};\n var _loop = function(_i2, _Object$keys2) {\n var key = _Object$keys2[_i2];\n var type = xportsDefinition[key].type;\n var valuePromise = getExports().then((function(res) {\n return res[key];\n }));\n result[key] = type === PROP_TYPE.FUNCTION ? function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return valuePromise.then((function(value) {\n return value.apply(void 0, args);\n }));\n } : valuePromise;\n };\n for (var _i2 = 0, _Object$keys2 = Object.keys(xportsDefinition); _i2 < _Object$keys2.length; _i2++) _loop(_i2, _Object$keys2);\n return result;\n }\n };\n }(opts);\n var name = options.name, tag = options.tag, defaultContext = options.defaultContext, eligible = options.eligible, children = options.children;\n var global = lib_global_getGlobal(window);\n var instances = [];\n var isChild = function() {\n if (function(name) {\n try {\n return parseWindowName(window.name).name === name;\n } catch (err) {}\n return !1;\n }(name)) {\n var _payload = getInitialParentPayload().payload;\n if (_payload.tag === tag && matchDomain(_payload.childDomainMatch, getDomain())) return !0;\n }\n return !1;\n };\n var registerChild = memoize((function() {\n if (isChild()) {\n if (window.xprops) {\n delete global.components[tag];\n throw new Error(\"Can not register \" + name + \" as child - child already registered\");\n }\n var child = function(options) {\n var tag = options.tag, propsDef = options.propsDef, autoResize = options.autoResize, allowedParentDomains = options.allowedParentDomains;\n var onPropHandlers = [];\n var _getInitialParentPayl = getInitialParentPayload(), parent = _getInitialParentPayl.parent, payload = _getInitialParentPayl.payload;\n var parentComponentWindow = parent.win, parentDomain = parent.domain;\n var props;\n var exportsPromise = new promise_ZalgoPromise;\n var version = payload.version, uid = payload.uid, parentExports = payload.exports, context = payload.context, initialProps = payload.props;\n if (\"9_0_86\" !== version) throw new Error(\"Parent window has zoid version \" + version + \", child window has version 9_0_86\");\n var show = parentExports.show, hide = parentExports.hide, close = parentExports.close, onError = parentExports.onError, checkClose = parentExports.checkClose, parentExport = parentExports.export, parentResize = parentExports.resize, parentInit = parentExports.init;\n var getParent = function() {\n return parentComponentWindow;\n };\n var getParentDomain = function() {\n return parentDomain;\n };\n var onProps = function(handler) {\n onPropHandlers.push(handler);\n return {\n cancel: function() {\n onPropHandlers.splice(onPropHandlers.indexOf(handler), 1);\n }\n };\n };\n var resize = function(_ref) {\n return parentResize.fireAndForget({\n width: _ref.width,\n height: _ref.height\n });\n };\n var xport = function(xports) {\n exportsPromise.resolve(xports);\n return parentExport(xports);\n };\n var getSiblings = function(_temp) {\n var anyParent = (void 0 === _temp ? {} : _temp).anyParent;\n var result = [];\n var currentParent = props.parent;\n void 0 === anyParent && (anyParent = !currentParent);\n if (!anyParent && !currentParent) throw new Error(\"No parent found for \" + tag + \" child\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(window); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var win = _getAllFramesInWindow2[_i2];\n if (isSameDomain(win)) {\n var xprops = assertSameDomain(win).xprops;\n if (xprops && getParent() === xprops.getParent()) {\n var winParent = xprops.parent;\n if (anyParent || !currentParent || winParent && winParent.uid === currentParent.uid) {\n var xports = tryGlobal(win, (function(global) {\n return global.exports;\n }));\n result.push({\n props: xprops,\n exports: xports\n });\n }\n }\n }\n }\n return result;\n };\n var setProps = function(newProps, origin, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var normalizedProps = function(parentComponentWindow, propsDef, props, origin, helpers, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n if (!prop || !prop.sameDomain || origin === getDomain(window) && isSameDomain(parentComponentWindow)) {\n var value = normalizeChildProp(propsDef, 0, key, props[key], helpers);\n result[key] = value;\n prop && prop.alias && !result[prop.alias] && (result[prop.alias] = value);\n }\n }\n if (!isUpdate) for (var _i4 = 0, _Object$keys4 = Object.keys(propsDef); _i4 < _Object$keys4.length; _i4++) {\n var _key = _Object$keys4[_i4];\n props.hasOwnProperty(_key) || (result[_key] = normalizeChildProp(propsDef, 0, _key, void 0, helpers));\n }\n return result;\n }(parentComponentWindow, propsDef, newProps, origin, {\n tag: tag,\n show: show,\n hide: hide,\n close: close,\n focus: child_focus,\n onError: onError,\n resize: resize,\n getSiblings: getSiblings,\n onProps: onProps,\n getParent: getParent,\n getParentDomain: getParentDomain,\n uid: uid,\n export: xport\n }, isUpdate);\n props ? extend(props, normalizedProps) : props = normalizedProps;\n for (var _i4 = 0; _i4 < onPropHandlers.length; _i4++) (0, onPropHandlers[_i4])(props);\n };\n var updateProps = function(newProps) {\n return promise_ZalgoPromise.try((function() {\n return setProps(newProps, parentDomain, !0);\n }));\n };\n return {\n init: function() {\n return promise_ZalgoPromise.try((function() {\n isSameDomain(parentComponentWindow) && function(_ref3) {\n var componentName = _ref3.componentName, parentComponentWindow = _ref3.parentComponentWindow;\n var _crossDomainDeseriali2 = crossDomainDeserialize({\n data: parseWindowName(window.name).serializedInitialPayload,\n sender: {\n win: parentComponentWindow\n },\n basic: !0\n }), sender = _crossDomainDeseriali2.sender;\n if (\"uid\" === _crossDomainDeseriali2.reference.type || \"global\" === _crossDomainDeseriali2.metaData.windowRef.type) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: _crossDomainDeseriali2.data,\n metaData: {\n windowRef: window_getWindowRef(parentComponentWindow)\n },\n sender: {\n domain: sender.domain\n },\n receiver: {\n win: window,\n domain: getDomain()\n },\n basic: !0\n });\n window.name = buildChildWindowName({\n name: componentName,\n serializedPayload: _crossDomainSerialize.serializedData\n });\n }\n }({\n componentName: options.name,\n parentComponentWindow: parentComponentWindow\n });\n lib_global_getGlobal(window).exports = options.exports({\n getExports: function() {\n return exportsPromise;\n }\n });\n !function(allowedParentDomains, domain) {\n if (!matchDomain(allowedParentDomains, domain)) throw new Error(\"Can not be rendered by domain: \" + domain);\n }(allowedParentDomains, parentDomain);\n markWindowKnown(parentComponentWindow);\n !function() {\n window.addEventListener(\"beforeunload\", (function() {\n checkClose.fireAndForget();\n }));\n window.addEventListener(\"unload\", (function() {\n checkClose.fireAndForget();\n }));\n onCloseWindow(parentComponentWindow, (function() {\n child_destroy();\n }));\n }();\n return parentInit({\n updateProps: updateProps,\n close: child_destroy\n });\n })).then((function() {\n return (_autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, \n _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, \n _autoResize$element = autoResize.element, elementReady(void 0 === _autoResize$element ? \"body\" : _autoResize$element).catch(src_util_noop).then((function(element) {\n return {\n width: width,\n height: height,\n element: element\n };\n }))).then((function(_ref3) {\n var width = _ref3.width, height = _ref3.height, element = _ref3.element;\n element && (width || height) && context !== CONTEXT.POPUP && onResize(element, (function(_ref4) {\n resize({\n width: width ? _ref4.width : void 0,\n height: height ? _ref4.height : void 0\n });\n }), {\n width: width,\n height: height\n });\n }));\n var _autoResize$width, width, _autoResize$height, height, _autoResize$element;\n })).catch((function(err) {\n onError(err);\n }));\n },\n getProps: function() {\n if (props) return props;\n setProps(initialProps, parentDomain);\n return props;\n }\n };\n }(options);\n child.init();\n return child;\n }\n }));\n registerChild();\n !function() {\n var allowDelegateListener = on_on(\"zoid_allow_delegate_\" + name, (function() {\n return !0;\n }));\n var delegateListener = on_on(\"zoid_delegate_\" + name, (function(_ref2) {\n var _ref2$data = _ref2.data;\n return {\n parent: parentComponent({\n uid: _ref2$data.uid,\n options: options,\n overrides: _ref2$data.overrides,\n parentWin: _ref2.source\n })\n };\n }));\n cleanZoid.register(allowDelegateListener.cancel);\n cleanZoid.register(delegateListener.cancel);\n }();\n global.components = global.components || {};\n if (global.components[tag]) throw new Error(\"Can not register multiple components with the same tag: \" + tag);\n global.components[tag] = !0;\n return {\n init: function init(inputProps) {\n var instance;\n var uid = \"zoid-\" + tag + \"-\" + uniqueID();\n var props = inputProps || {};\n var _eligible = eligible({\n props: props\n }), eligibility = _eligible.eligible, reason = _eligible.reason;\n var onDestroy = props.onDestroy;\n props.onDestroy = function() {\n instance && eligibility && instances.splice(instances.indexOf(instance), 1);\n if (onDestroy) return onDestroy.apply(void 0, arguments);\n };\n var parent = parentComponent({\n uid: uid,\n options: options\n });\n parent.init();\n eligibility ? parent.setProps(props) : props.onDestroy && props.onDestroy();\n cleanInstances.register((function(err) {\n return parent.destroy(err || new Error(\"zoid destroyed all components\"));\n }));\n var clone = function(_temp) {\n var _ref4$decorate = (void 0 === _temp ? {} : _temp).decorate;\n return init((void 0 === _ref4$decorate ? identity : _ref4$decorate)(props));\n };\n var _render = function(target, container, context) {\n return promise_ZalgoPromise.try((function() {\n if (!eligibility) {\n var err = new Error(reason || name + \" component is not eligible\");\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }\n if (!isWindow(target)) throw new Error(\"Must pass window to renderTo\");\n return function(props, context) {\n return promise_ZalgoPromise.try((function() {\n if (props.window) return setup_toProxyWindow(props.window).getType();\n if (context) {\n if (context !== CONTEXT.IFRAME && context !== CONTEXT.POPUP) throw new Error(\"Unrecognized context: \" + context);\n return context;\n }\n return defaultContext;\n }));\n }(props, context);\n })).then((function(finalContext) {\n container = function(context, container) {\n if (container) {\n if (\"string\" != typeof container && !isElement(container)) throw new TypeError(\"Expected string or element selector to be passed\");\n return container;\n }\n if (context === CONTEXT.POPUP) return \"body\";\n throw new Error(\"Expected element to be passed to render iframe\");\n }(finalContext, container);\n if (target !== window && \"string\" != typeof container) throw new Error(\"Must pass string element when rendering to another window\");\n return parent.render({\n target: target,\n container: container,\n context: finalContext,\n rerender: function() {\n var newInstance = clone();\n extend(instance, newInstance);\n return newInstance.renderTo(target, container, context);\n }\n });\n })).catch((function(err) {\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }));\n };\n instance = _extends({}, parent.getExports(), parent.getHelpers(), function() {\n var childComponents = children();\n var result = {};\n var _loop2 = function(_i4, _Object$keys4) {\n var childName = _Object$keys4[_i4];\n var Child = childComponents[childName];\n result[childName] = function(childInputProps) {\n var parentProps = parent.getProps();\n var childProps = _extends({}, childInputProps, {\n parent: {\n uid: uid,\n props: parentProps,\n export: parent.export\n }\n });\n return Child(childProps);\n };\n };\n for (var _i4 = 0, _Object$keys4 = Object.keys(childComponents); _i4 < _Object$keys4.length; _i4++) _loop2(_i4, _Object$keys4);\n return result;\n }(), {\n isEligible: function() {\n return eligibility;\n },\n clone: clone,\n render: function(container, context) {\n return _render(window, container, context);\n },\n renderTo: function(target, container, context) {\n return _render(target, container, context);\n }\n });\n eligibility && instances.push(instance);\n return instance;\n },\n instances: instances,\n driver: function(driverName, dep) {\n throw new Error(\"Driver support not enabled\");\n },\n isChild: isChild,\n canRenderTo: function(win) {\n return send_send(win, \"zoid_allow_delegate_\" + name).then((function(_ref3) {\n return _ref3.data;\n })).catch((function() {\n return !1;\n }));\n },\n registerChild: registerChild\n };\n }\n var component_create = function(options) {\n !function() {\n if (!global_getGlobal().initialized) {\n global_getGlobal().initialized = !0;\n on = (_ref3 = {\n on: on_on,\n send: send_send\n }).on, send = _ref3.send, (global = global_getGlobal()).receiveMessage = global.receiveMessage || function(message) {\n return receive_receiveMessage(message, {\n on: on,\n send: send\n });\n };\n !function(_ref5) {\n var on = _ref5.on, send = _ref5.send;\n globalStore().getOrSet(\"postMessageListener\", (function() {\n return addEventListener(window, \"message\", (function(event) {\n !function(event, _ref4) {\n var on = _ref4.on, send = _ref4.send;\n promise_ZalgoPromise.try((function() {\n var source = event.source || event.sourceElement;\n var origin = event.origin || event.originalEvent && event.originalEvent.origin;\n var data = event.data;\n \"null\" === origin && (origin = \"file://\");\n if (source) {\n if (!origin) throw new Error(\"Post message did not have origin domain\");\n receive_receiveMessage({\n source: source,\n origin: origin,\n data: data\n }, {\n on: on,\n send: send\n });\n }\n }));\n }(event, {\n on: on,\n send: send\n });\n }));\n }));\n }({\n on: on_on,\n send: send_send\n });\n setupBridge({\n on: on_on,\n send: send_send,\n receiveMessage: receive_receiveMessage\n });\n !function(_ref8) {\n var on = _ref8.on, send = _ref8.send;\n globalStore(\"builtinListeners\").getOrSet(\"helloListener\", (function() {\n var listener = on(\"postrobot_hello\", {\n domain: \"*\"\n }, (function(_ref3) {\n resolveHelloPromise(_ref3.source, {\n domain: _ref3.origin\n });\n return {\n instanceID: getInstanceID()\n };\n }));\n var parent = getAncestor();\n parent && sayHello(parent, {\n send: send\n }).catch((function(err) {}));\n return listener;\n }));\n }({\n on: on_on,\n send: send_send\n });\n }\n var _ref3, on, send, global;\n }();\n var comp = component(options);\n var init = function(props) {\n return comp.init(props);\n };\n init.driver = function(name, dep) {\n return comp.driver(name, dep);\n };\n init.isChild = function() {\n return comp.isChild();\n };\n init.canRenderTo = function(win) {\n return comp.canRenderTo(win);\n };\n init.instances = comp.instances;\n var child = comp.registerChild();\n child && (window.xprops = init.xprops = child.getProps());\n return init;\n };\n function destroyComponents(err) {\n src_bridge && src_bridge.destroyBridges();\n var destroyPromise = cleanInstances.all(err);\n cleanInstances = cleanup();\n return destroyPromise;\n }\n var destroyAll = destroyComponents;\n function component_destroy(err) {\n destroyAll();\n delete window.__zoid_9_0_86__;\n !function() {\n !function() {\n var responseListeners = globalStore(\"responseListeners\");\n for (var _i2 = 0, _responseListeners$ke2 = responseListeners.keys(); _i2 < _responseListeners$ke2.length; _i2++) {\n var hash = _responseListeners$ke2[_i2];\n var listener = responseListeners.get(hash);\n listener && (listener.cancelled = !0);\n responseListeners.del(hash);\n }\n }();\n (listener = globalStore().get(\"postMessageListener\")) && listener.cancel();\n var listener;\n delete window.__post_robot_10_0_44__;\n }();\n return cleanZoid.all(err);\n }\n } ]);\n}));","/* @flow */\n/* eslint import/no-commonjs: 0 */\n\n// eslint-disable-next-line no-process-env\nif (process && process.env && process.env.ZOID_FRAME_ONLY) {\n // $FlowFixMe\n module.exports = require('./dist/zoid.frame');\n // $FlowFixMe\n module.exports.default = module.exports;\n} else {\n // $FlowFixMe\n module.exports = require('./dist/zoid');\n // $FlowFixMe\n module.exports.default = module.exports;\n}\n","export let createNanoEvents = () => ({\n emit(event, ...args) {\n let callbacks = this.events[event] || []\n for (let i = 0, length = callbacks.length; i < length; i++) {\n callbacks[i](...args)\n }\n },\n events: {},\n on(event, cb) {\n this.events[event]?.push(cb) || (this.events[event] = [cb])\n return () => {\n this.events[event] = this.events[event]?.filter(i => cb !== i)\n }\n }\n})\n",null,null,null,null,null,null],"names":["__classPrivateFieldGet","receiver","state","kind","f","TypeError","has","call","value","get","__classPrivateFieldSet","set","SuppressedError","global$1","global","self","window","defaultSetTimout","Error","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","fun","setTimeout","e","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","length","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","prototype","apply","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","performance","performanceNow","now","mozNow","msNow","oNow","webkitNow","Date","getTime","startTime","process","nextTick","args","Array","arguments","i","push","title","browser","env","argv","version","versions","binding","name","cwd","chdir","dir","umask","hrtime","previousTimestamp","clocktime","seconds","Math","floor","nanoseconds","platform","release","config","uptime","assert","condition","msg","trim","err","isString","isObject","isArray","isEnvBrowser","document","isMobile","width","height","matchMedia","matches","createElement","type","getAttribute","el","setAttribute","attr","replace","g","toLowerCase","removeAttribute","isInDocument","contains","root","getRootNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","undefined","host","isInShadowDom","h","attrs","children","child","flat","append","nextFrame","async","Promise","resolve","requestAnimationFrame","transitionEnd","getComputedStyle","transition","done","removeEventListener","addEventListener","window$1","body","lookup","revLookup","Arr","Uint8Array","inited","init","code","charCodeAt","encodeChunk","uint8","start","end","tmp","num","output","join","fromByteArray","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","m","eLen","eMax","eBias","nBits","d","s","NaN","Infinity","pow","write","c","rt","abs","isNaN","log","LN2","toString","arr","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","__proto__","arg","encodingOrOffset","allocUnsafe","from","ArrayBuffer","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","slice","fromString","obj","internalIsBuffer","checked","copy","val","data","fromObject","assertSize","size","b","_isBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","bidirectionalIndexOf","arrayIndexOf","indexOf","lastIndexOf","indexSize","arrLength","valLength","String","buf","readUInt16BE","foundIndex","found","j","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","base64.fromByteArray","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","poolSize","_augment","Symbol","species","alloc","fill","allocUnsafeSlow","isBuffer","isFastBuffer","readFloatLE","isSlowBuffer","compare","a","x","y","list","pos","swap16","swap32","swap64","equals","inspect","match","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754.write","writeDouble","newBuf","subarray","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","ieee754.read","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","b64","l","placeHolders","L","base64.toByteArray","stringtrim","base64clean","src","dst","constructor","exports","modules","installedModules","__webpack_require__","moduleId","module","getter","o","Object","defineProperty","enumerable","r","toStringTag","t","mode","__esModule","ns","create","key","bind","default","object","property","hasOwnProperty","p","__webpack_exports__","_setPrototypeOf","setPrototypeOf","_inheritsLoose","subClass","superClass","_extends","assign","source","utils_isPromise","item","Window","_toString","then","dom_PopupOpenError","component_create","component_destroy","destroyComponents","destroyAll","PROP_TYPE","PROP_SERIALIZATION","CONTEXT","EVENT","flushPromise","dispatchedErrors","possiblyUnhandledPromiseHandlers","activeCount","flushActive","promise","startActive","endActive","promise_ZalgoPromise","ZalgoPromise","handler","_this","resolved","rejected","errorHandled","error","handlers","dispatching","stack","_result","_error","isAsync","reject","_proto","result","dispatch","_this2","_err","asyncReject","chain","firstPromise","secondPromise","_handlers$i","onSuccess","onError","_result2","promiseResult","catch","finally","onFinally","try","time","_this3","toPromise","lazy","all","promises","count","results","prom","hash","awaitPromises","_loop","map","items","method","onPossiblyUnhandledException","cancel","splice","context","delay","_delay","isPromise","flush","Zalgo","isRegex","WINDOW_TYPE","IFRAME","POPUP","IE_WIN_ACCESS_ERROR","getActualProtocol","win","location","protocol","getProtocol","mockDomain","split","isAboutProtocol","utils_getParent","parent","getOpener","opener","canReadFromWindow","getActualDomain","getDomain","domain","isSameDomain","desc","getOwnPropertyDescriptor","assertSameDomain","isAncestorParent","childParent","getFrames","frames","frame","_i","_frame","getAllChildFrames","_i3","_getFrames2","_i5","_getAllChildFrames2","getTop","top","_i7","_getAllChildFrames4","getAllFramesInWindow","iframeWindows","iframeFrames","isWindowClosed","allowMock","closed","message","mockclosed","iframeIndex","collection","contentWindow","parentNode","doc","ownerDocument","documentElement","getFrameByName","winFrames","_i9","childFrame","getAncestor","anyMatch","collection1","collection2","_i17","item1","_i19","getDistanceFromTop","distance","isSameTopWindow","win1","win2","top1","top2","allFrames1","allFrames2","opener1","opener2","matchDomain","pattern","origin","Boolean","JSON","stringify","some","subpattern","getDomainFromUrl","url","onCloseWindow","callback","maxtime","check","isWindow","__cross_domain_utils_window_check__","getFrameForWindow","frameElement","_i21","_document$querySelect2","querySelectorAll","closeWindow","parentElement","removeChild","close","util_safeIndexOf","objectIDs","weakmap_CrossDomainSafeWeakMap","CrossDomainSafeWeakMap","weakmap","keys","values","random","WeakMap","freeze","testWeakMap","testKey","_cleanupClosedWindows","delete","isSafeToReadWrite","entry","writable","index","getOrSet","_getPrototypeOf","getPrototypeOf","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","construct_construct","Parent","Class","instance","Function","wrapNativeSuper_wrapNativeSuper","_cache","Map","fn","Wrapper","configurable","getFunctionName","__name__","displayName","setFunctionName","base64encode","btoa","encodeURIComponent","p1","uniqueID","chars","charAt","toISOString","serializeArgs","subkey","uid","getEmptyObject","memoizeGlobalIndex","memoizeGlobalIndexValidFrom","memoize","options","simpleCache","thisCache","_options$thisNamespac","thisNamespace","cacheTime","memoizeIndex","memoizedFunction","_len","_key","cache","cacheKey","cacheResult","reset","memoizePromise","memoizedPromiseFunction","_arguments","_len2","_key2","src_util_noop","called","stringifyError","level","newErr","extend","identity","safeInterval","loop","arrayFrom","isDefined","util_isRegex","util_getOrSet","cleanup","cleanErr","tasks","cleaned","cleaner","register","task","shift","assertExists","thing","clear","util_ExtendableError","_Error","ExtendableError","_this6","captureStackTrace","ReferenceError","getBody","isDocumentReady","readyState","isDocumentInteractive","urlEncode","parseQuery","queryString","logic","__inline_memoize_cache__","params","_i2","_queryString$split2","pair","decodeURIComponent","extendQuery","originalQuery","props","filter","appendChild","container","isElement","element","Element","style","getElementSafe","id","querySelector","elementReady","interval","setInterval","clearInterval","awaitFrameLoadPromises","_ExtendableError","PopupOpenError","awaitFrameLoad","_promise","awaitFrameWindow","loadedFrame","dom_iframe","tag","styleText","class","className","attributes","_i10","_Object$keys2","styleSheet","cssText","createTextNode","html","innerHTML","allowTransparency","backgroundColor","border","isIE","navigator","userAgent","hasAttribute","event","showElement","setProperty","hideElement","destroyElement","isElementClosed","onResize","_temp","_ref2","_ref2$width","_ref2$height","_ref2$interval","_ref2$win","currentWidth","offsetWidth","currentHeight","offsetHeight","canceled","observer","getClientRects","newWidth","newHeight","ResizeObserver","observe","MutationObserver","childList","subtree","characterData","disconnect","isShadowElement","currentScript","getCurrentScript","stackDetails","exec","scriptLocation","_i22","_Array$prototype$slic2","getElementsByTagName","reverse","script","currentUID","toPx","toCSS","test","global_getGlobal","globalKey","hashedString","total","dataset","getObj","globalStore","defStore","store","storeKey","defVal","del","_SERIALIZER","WildCard","getWildcard","WINDOW_WILDCARD","windowStore","winStore","getStore","getInstanceID","resolveHelloPromise","_ref","helloPromises","existingPromise","newPromise","sayHello","_ref4","send","instanceID","_ref5","getWindowInstanceID","_ref6","_ref7","markWindowKnown","isSerializedType","__type__","determineType","serializeType","__val__","_DESERIALIZER","SERIALIZER","function","regex","date","number","boolean","null","defaultSerializers","DESERIALIZER","RegExp","defaultDeserializers","cleanupProxyWindows","idToProxyWindow","_idToProxyWindow$keys2","shouldClean","getSerializedWindow","winPromise","_ref$id","windowNamePromise","windowTypePromise","getName","getType","focus","isClosed","setLocation","href","opts","_opts$method","_ref3","_ref3$method","form","display","_i24","_Object$keys4","_body$key","input","submit","setName","sameDomain","window_ProxyWindow","ProxyWindow","serializedWindow","isProxyWindow","actualWindow","actualWindowPromise","getID","setWindow","isPopup","_this4","isPopupPromise","getNamePromise","reopenPromise","open","focusPromise","getWindow","awaitWindow","matchWindow","_this5","proxyInstanceID","knownWindowInstanceID","unwrap","serialize","toProxyWindow","deserialize","_ref8","_ref9","addMethod","methodStore","proxyWindowMethods","lookupMethod","function_serializeFunction","destination","meth","methodSource","__id__","serializeMessage","_serialize","serializers","serializer","deserializeMessage","_deserialize","deserializers","parse","deserializer","cross_domain_zalgo_promise","serializedPromise","cross_domain_function","serializedFunction","getDeserializedFunction","crossDomainFunctionWrapper","_args","fireAndForget","__origin__","__source__","cross_domain_window","SEND_MESSAGE_STRATEGIES","send_sendMessage","domainBuffer","serializedMessage","__post_robot_10_0_44__","strategies","errors","strategyName","getResponseListener","deleteResponseListener","isResponseListenerErrored","getRequestListener","requestListeners","_i4","winQualifier","nameListeners","domainListeners","__domain_regex__","_i6","_domainListeners$__DO2","_domainListeners$__DO3","listener","handleRequest","logName","sendResponse","ack","pathname","handleError","handleAck","handleResponse","receive_receiveMessage","receivedMessages","messages","parsedMessage","parseMessages","on_on","requestListener","addRequestListener","listenersCollection","_i8","_win2","_listenersCollection","_i12","_domain2","_i14","existingListener","regexListeners","regexListener","strDomain","errorHandler","postrobot_post_message","postMessage","postrobot_global","mockUserAgent","foreignGlobal","receiveMessage","send_send","domainMatcher","responseTimeout","childTimeout","actualParent","_i15","_getFrames8","targetDomain","actualDomain","normalizedDomain","responseListener","reqPromises","totalAckTimeout","totalResTimeout","ackTimeout","resTimeout","cancelled","setup_toProxyWindow","lib_global_getGlobal","__zoid_9_0_86__","tryGlobal","getProxyObject","basicSerialize","getUIDRefStore","references","crossDomainSerialize","metaData","sender","_ref$passByReference","passByReference","_ref$basic","basic","proxyWin","reference","serializedData","cleanReference","ref","crossDomainDeserialize","_ref2$basic","atob","STRING","OBJECT","FUNCTION","BOOLEAN","NUMBER","ARRAY","DOTIFY","BASE64","RENDER","RENDERED","DISPLAY","ERROR","CLOSE","DESTROY","PROPS","RESIZE","FOCUS","buildChildWindowName","serializedPayload","parseWindowName","windowName","_windowName$split","zoidcomp","serializedInitialPayload","parseInitialParentPayload","_crossDomainDeseriali","windowRef","_ret","ancestor","_getAllFramesInWindow2","windows","v","findChildFrameByName","_i11","_getFrames4","namedFrame","payload","getInitialParentPayload","window_getWindowRef","targetWindow","currentWindow","normalizeChildProp","propsDef","helpers","prop","childDecorate","onProps","resize","getParent","getParentDomain","show","hide","export","getSiblings","child_focus","child_destroy","props_defaultNoop","props_decorateOnce","eachProp","serializeProps","propDef","_METHOD$GET$METHOD$PO","_METHOD$GET$METHOD$PO2","getParam","queryParam","post","bodyParam","getValue","queryValue","bodyValue","finalParam","finalValue","serialization","dotify","prefix","newobj","every","dotkey","parentComponent","triggered","emitter","currentProxyWin","currentProxyContainer","childComponent","currentChildDomain","currentContainer","_ref$overrides","overrides","_ref$parentWin","parentWin","containerTemplate","prerenderTemplate","dimensions","autoResize","domainMatch","xports","initPromise","handledErrors","clean","inputProps","internalState","visible","eventName","handlerList","trigger","_len3","_key3","triggerOnce","_len4","_key4","onErrorOverride","getProxyContainerOverride","getProxyContainer","showOverride","hideOverride","closeOverride","renderContainerOverride","renderContainer","getProxyWindowOverride","getProxyWindow","setProxyWinOverride","setProxyWin","openFrameOverride","openFrame","openPrerenderFrameOverride","openPrerenderFrame","prerenderOverride","prerender","openOverride","openPrerenderOverride","openPrerender","watchForUnloadOverride","watchForUnload","getInternalStateOverride","getInternalState","setInternalStateOverride","setInternalState","resolveInitPromise","rejectInitPromise","getPropsForChild","initialChildDomain","sendToChild","newInternalState","windowProp","_proxyWin","setState","getUrl","getAttributes","getInitialChildDomain","iframe","proxyPrerenderFrame","prerenderFrame","prerenderFrameWindow","getCurrentWindowReferenceUID","getWindowRef","actualComponentWindow","initChild","childDomain","childExports","destroy","proxyFrame","_requestPromises$get2","unloadWindowListener","closeParentWindowListener","checkWindowClose","secondIsClosed","exportsPromise","xport","actualExports","renderTemplate","renderer","proxyPrerenderWin","prerenderWindow","tagName","_arrayFrom2","_arrayFrom4","_autoResize$width","_autoResize$height","_autoResize$element","prerenderResizeListener","_ref10","proxyContainer","_ref11","rerender","_ref12","innerContainer","containerWatcher","sacrificialFrame","sacrificialFrameWin","mutationObservers","_i18","elementClosed","mutationElement","mutationObserver","frameWin","removeError","getHelpers","updateProps","setProps","newInputProps","existingProps","valueDetermined","alias","required","decorate","newProps","childProps","containerElement","insertShadowSlot","shadowHost","shadowRoot","slotName","slot","slotProvider","onRender","onDisplay","onRendered","onClose","onDestroy","onFocus","render","_ref14","childDomainMatch","delegatePromise","delegateProps","propName","allowDelegate","childOverridesPromise","_ref13","parentComp","getDelegateOverrides","childOverrides","_len5","_key5","_len6","_key6","_len7","_key7","_len8","_key8","_len9","_key9","_len10","_key10","_len11","_key11","watchForUnloadPromise","buildBodyPromise","onRenderPromise","getProxyContainerPromise","getProxyWindowPromise","finalSetPropsPromise","buildUrlPromise","query","originalUrl","originalHash","_url$split","_originalUrl$split","hashString","buildWindowNamePromise","_temp2","_ref6$target","checkClose","childPayload","_crossDomainSerialize","openFramePromise","openPrerenderFramePromise","renderContainerPromise","_ref15","openPromise","_ref16","openPrerenderPromise","_ref17","setStatePromise","prerenderPromise","_ref18","setWindowNamePromise","_ref19","getMethodPromise","_ref20","loadUrlPromise","windowUrl","_ref21","watchForClosePromise","watchForClose","onDisplayPromise","openBridgePromise","runTimeoutPromise","onRenderedPromise","getProps","getExports","defaultContainerTemplate","div","cspNonce","classList","add","remove","cleanInstances","cleanZoid","component","allowDelegateListener","delegateListener","bridgeUrl","_options$props","_options$dimensions","_options$autoResize","_options$allowedParen","allowedParentDomains","_options$attributes","_options$defaultConte","defaultContext","_options$containerTem","_options$prerenderTem","validate","_options$eligible","eligible","_options$logger","logger","info","_options$exports","xportsDefinition","_options$children","valuePromise","instances","isChild","_payload","registerChild","xprops","components","onPropHandlers","_getInitialParentPayl","parentComponentWindow","parentDomain","parentExports","initialProps","parentExport","parentResize","parentInit","anyParent","currentParent","winParent","isUpdate","normalizedProps","componentName","_crossDomainDeseriali2","_ref2$data","_eligible","eligibility","reason","clone","_ref4$decorate","_render","finalContext","newInstance","renderTo","childComponents","_loop2","childName","Child","childInputProps","parentProps","isEligible","driver","driverName","dep","canRenderTo","initialized","sourceElement","originalEvent","comp","destroyPromise","responseListeners","_responseListeners$ke2","utils_getUserAgent","isOpener","normalizeMockUrl","isPerc","toNum","normalizeDimension","dim","awaitWindowHello","needsBridgeForBrowser","needsBridgeForWin","needsBridgeForDomain","needsBridge","getBridgeName","isBridge","documentBodyReady","registerRemoteWindow","findRemoteWindow","remoteWinPromise","registerRemoteSendMessage","sendMessage","remoteWin","remoteDomain","rejectRemoteSendMessage","linkWindow","popupWindowsByName","popupWindowsByWin","_popupWindowsByName$k2","winName","_details","details","setupBridge","windowOpen","last","bridgePromise","bridge","getWindowDetails","openTunnelToParent","canary","tunnelWindows","parentWindow","_tunnelWindows$keys2","tunnelWindow","postrobot_bridge","messagingChild","messagingParent","src_bridge","cleanUpWindow","openBridge","bridges","bridgeFrames","linkUrl","hasBridge","destroyBridges","_bridgeFrames$keys2","getDimensions","_getDimensions","_getDimensions$width","_getDimensions$height","outerWidth","_options$closeOnUnloa","closeOnUnload","_options$name","left","round","screenX","screen","outerHeight","screenY","status","toolbar","menubar","resizable","scrollbars","popup","_len12","_key12","bridgeDomain","defaultPrerenderTemplate","spinner","ZOID_FRAME_ONLY","require$$0","require$$1","createNanoEvents","callbacks","events","cb","Lightbox","stylesheet","holder","role","spinnerRender","nonce","adoptNode","DEFAULT_WIDTH","DEFAULT_HEIGHT","THEME_NAMES","COLOR_NAMES","EVENT_NAMES","Checkout","ident","locale","theme","colors","endpoint","popupOnMobile","isOpen","lightbox","zoid","_Checkout_didRender","_Checkout_onRender","color","launch","_Checkout_instances","_Checkout_renderComponent","_Checkout_showLightbox","renderFinished","_Checkout_buildComponent","allow","URL","onOpenWindow","onClosePopup","onPaymentComplete","onPaymentError","isApplePayAvailable","ApplePaySession","canMakePayments","isEmbedded","referrer","hostname","path","OPEN","PAYMENT_COMPLETE","PAYMENT_ERROR","TebexCheckout","HTMLElement","checkout","_open","_height","observedAttributes","super","_root","_slot","_shadow","_mode","_didInit","_didConnect","_TebexCheckout_attachClickHandlers","assignedElements","console","warn","oldElements","clickHandler","updateHandlers","newElements","attachShadow","connectedCallback","dispatchEvent","CustomEvent","detail","_TebexCheckout_instances","_TebexCheckout_init","disconnectedCallback","attributeChangedCallback","oldVal","newVal","_TebexCheckout_updatePopupState","_TebexCheckout_updateSize","customElements","define","legacy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;mCAoRO,SAASA,EAAuBC,EAAUC,EAAOC,EAAMC,GAC1D,GAAa,MAATD,IAAiBC,EAAG,MAAM,IAAIC,UAAU,iDAC5C,GAAqB,mBAAVH,EAAuBD,IAAaC,IAAUE,GAAKF,EAAMI,IAAIL,GAAW,MAAM,IAAII,UAAU,4EACvG,MAAgB,MAATF,EAAeC,EAAa,MAATD,EAAeC,EAAEG,KAAKN,GAAYG,EAAIA,EAAEI,MAAQN,EAAMO,IAAIR,EACxF,CAEO,SAASS,EAAuBT,EAAUC,EAAOM,EAAOL,EAAMC,GACjE,GAAa,MAATD,EAAc,MAAM,IAAIE,UAAU,kCACtC,GAAa,MAATF,IAAiBC,EAAG,MAAM,IAAIC,UAAU,iDAC5C,GAAqB,mBAAVH,EAAuBD,IAAaC,IAAUE,GAAKF,EAAMI,IAAIL,GAAW,MAAM,IAAII,UAAU,2EACvG,MAAiB,MAATF,EAAeC,EAAEG,KAAKN,EAAUO,GAASJ,EAAIA,EAAEI,MAAQA,EAAQN,EAAMS,IAAIV,EAAUO,GAASA,CACxG,CA4BkD,mBAApBI,iBAAiCA,gBC3T/D,IAAAC,EAAkC,oBAAXC,OAAyBA,OACpB,oBAATC,KAAuBA,KACZ,oBAAXC,OAAyBA,OAAS,CAAE,ECCvD,SAASC,IACL,MAAM,IAAIC,MAAM,kCACnB,CACD,SAASC,IACL,MAAM,IAAID,MAAM,oCACnB,CACD,IAAIE,EAAmBH,EACnBI,EAAqBF,EAQzB,SAASG,EAAWC,GAChB,GAAIH,IAAqBI,WAErB,OAAOA,WAAWD,EAAK,GAG3B,IAAKH,IAAqBH,IAAqBG,IAAqBI,WAEhE,OADAJ,EAAmBI,WACZA,WAAWD,EAAK,GAE3B,IA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aAAa,wBAAyB,CAC3C,MAAMlL,EAAMljB,KAAKoF,aAAa,wBAC9B8Y,SAASgX,KAAOhS,CACnB,KAGL5kB,EAAA0B,KAAI+/C,GAAA,KAAJlhD,KAAAmB,KACJ,EAACkhD,GAAA,WA+BsB,YAAflhD,KAAK4/C,OAIJ5/C,KAAK8/C,aAIL9/C,KAAK6/C,WAGN7/C,KAAKq/C,QAAUr/C,KAAKo/C,SAAS9B,QAC7Bt9C,KAAKo/C,SAASxB,UAEb59C,KAAKq/C,OAASr/C,KAAKo/C,SAAS9B,QAC7Bt9C,KAAKo/C,SAASn7B,QACtB,EAACk9B,GAAA,WAIG,GAAmB,WAAfnhD,KAAK4/C,MACL,OAGJ,MAAMpC,EAAOx9C,KAAKo/C,SAAS5B,KACtBA,GAGLA,EAAKjb,OAAO,CAAEx9B,OAAQ/E,KAAKs/C,SAC/B,EAGA36C,KACAy8C,eAAeC,OAAO,iBAAkBnC,ICxN/B,MAAAl8C,GAAU,QAKVo8C,GAAW,IAAIrC,GAQb,IAAA53B,GAAA,CACXniB,WACAo8C,eACGkC","x_google_ignoreList":[0,1,2,9,10,11,12,13,14,15,16]} \ No newline at end of file +{"version":3,"file":"tebex.min.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/rollup-plugin-node-globals/src/global.js","../node_modules/process-es6/browser.js","../src/utils/err.ts","../src/utils/is.ts","../src/utils/detect.ts","../src/utils/dom.ts","../src/utils/css.ts","../src/stubs/window.ts","../node_modules/buffer-es6/base64.js","../node_modules/buffer-es6/ieee754.js","../node_modules/buffer-es6/isArray.js","../node_modules/buffer-es6/index.js","../node_modules/zoid/dist/zoid.frame.js","../node_modules/zoid/dist/zoid.js","../node_modules/zoid/index.js","../node_modules/nanoevents/index.js","../src/lightbox.tsx","../src/spinner.tsx","../src/checkout.ts","../src/legacy/events.ts","../src/webComponents/TebexCheckout.ts","../src/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nexport default {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n};\n",null,null,null,null,null,null,"\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n return true;\n // rollup issues\n // try {\n // var arr = new Uint8Array(1)\n // arr.__proto__ = {\n // __proto__: Uint8Array.prototype,\n // foo: function () { return 42 }\n // }\n // return arr.foo() === 42 && // typed array instances can be augmented\n // typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n // arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n // } catch (e) {\n // return false\n // }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nexport function SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","!function(root, factory) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = factory() : \"function\" == typeof define && define.amd ? define(\"zoid\", [], factory) : \"object\" == typeof exports ? exports.zoid = factory() : root.zoid = factory();\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function(modules) {\n var installedModules = {};\n function __webpack_require__(moduleId) {\n if (installedModules[moduleId]) return installedModules[moduleId].exports;\n var module = installedModules[moduleId] = {\n i: moduleId,\n l: !1,\n exports: {}\n };\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n module.l = !0;\n return module.exports;\n }\n __webpack_require__.m = modules;\n __webpack_require__.c = installedModules;\n __webpack_require__.d = function(exports, name, getter) {\n __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {\n enumerable: !0,\n get: getter\n });\n };\n __webpack_require__.r = function(exports) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {\n value: \"Module\"\n });\n Object.defineProperty(exports, \"__esModule\", {\n value: !0\n });\n };\n __webpack_require__.t = function(value, mode) {\n 1 & mode && (value = __webpack_require__(value));\n if (8 & mode) return value;\n if (4 & mode && \"object\" == typeof value && value && value.__esModule) return value;\n var ns = Object.create(null);\n __webpack_require__.r(ns);\n Object.defineProperty(ns, \"default\", {\n enumerable: !0,\n value: value\n });\n if (2 & mode && \"string\" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {\n return value[key];\n }.bind(null, key));\n return ns;\n };\n __webpack_require__.n = function(module) {\n var getter = module && module.__esModule ? function() {\n return module.default;\n } : function() {\n return module;\n };\n __webpack_require__.d(getter, \"a\", getter);\n return getter;\n };\n __webpack_require__.o = function(object, property) {\n return {}.hasOwnProperty.call(object, property);\n };\n __webpack_require__.p = \"\";\n return __webpack_require__(__webpack_require__.s = 0);\n }([ function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_require__.r(__webpack_exports__);\n __webpack_require__.d(__webpack_exports__, \"PopupOpenError\", (function() {\n return dom_PopupOpenError;\n }));\n __webpack_require__.d(__webpack_exports__, \"create\", (function() {\n return component_create;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroy\", (function() {\n return component_destroy;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyComponents\", (function() {\n return destroyComponents;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyAll\", (function() {\n return destroyAll;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_TYPE\", (function() {\n return PROP_TYPE;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_SERIALIZATION\", (function() {\n return PROP_SERIALIZATION;\n }));\n __webpack_require__.d(__webpack_exports__, \"CONTEXT\", (function() {\n return CONTEXT;\n }));\n __webpack_require__.d(__webpack_exports__, \"EVENT\", (function() {\n return EVENT;\n }));\n function _setPrototypeOf(o, p) {\n return (_setPrototypeOf = Object.setPrototypeOf || function(o, p) {\n o.__proto__ = p;\n return o;\n })(o, p);\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _extends() {\n return (_extends = Object.assign || function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) ({}).hasOwnProperty.call(source, key) && (target[key] = source[key]);\n }\n return target;\n }).apply(this, arguments);\n }\n function utils_isPromise(item) {\n try {\n if (!item) return !1;\n if (\"undefined\" != typeof Promise && item instanceof Promise) return !0;\n if (\"undefined\" != typeof window && \"function\" == typeof window.Window && item instanceof window.Window) return !1;\n if (\"undefined\" != typeof window && \"function\" == typeof window.constructor && item instanceof window.constructor) return !1;\n var _toString = {}.toString;\n if (_toString) {\n var name = _toString.call(item);\n if (\"[object Window]\" === name || \"[object global]\" === name || \"[object DOMWindow]\" === name) return !1;\n }\n if (\"function\" == typeof item.then) return !0;\n } catch (err) {\n return !1;\n }\n return !1;\n }\n var dispatchedErrors = [];\n var possiblyUnhandledPromiseHandlers = [];\n var activeCount = 0;\n var flushPromise;\n function flushActive() {\n if (!activeCount && flushPromise) {\n var promise = flushPromise;\n flushPromise = null;\n promise.resolve();\n }\n }\n function startActive() {\n activeCount += 1;\n }\n function endActive() {\n activeCount -= 1;\n flushActive();\n }\n var promise_ZalgoPromise = function() {\n function ZalgoPromise(handler) {\n var _this = this;\n this.resolved = void 0;\n this.rejected = void 0;\n this.errorHandled = void 0;\n this.value = void 0;\n this.error = void 0;\n this.handlers = void 0;\n this.dispatching = void 0;\n this.stack = void 0;\n this.resolved = !1;\n this.rejected = !1;\n this.errorHandled = !1;\n this.handlers = [];\n if (handler) {\n var _result;\n var _error;\n var resolved = !1;\n var rejected = !1;\n var isAsync = !1;\n startActive();\n try {\n handler((function(res) {\n if (isAsync) _this.resolve(res); else {\n resolved = !0;\n _result = res;\n }\n }), (function(err) {\n if (isAsync) _this.reject(err); else {\n rejected = !0;\n _error = err;\n }\n }));\n } catch (err) {\n endActive();\n this.reject(err);\n return;\n }\n endActive();\n isAsync = !0;\n resolved ? this.resolve(_result) : rejected && this.reject(_error);\n }\n }\n var _proto = ZalgoPromise.prototype;\n _proto.resolve = function(result) {\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(result)) throw new Error(\"Can not resolve promise with another promise\");\n this.resolved = !0;\n this.value = result;\n this.dispatch();\n return this;\n };\n _proto.reject = function(error) {\n var _this2 = this;\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(error)) throw new Error(\"Can not reject promise with another promise\");\n if (!error) {\n var _err = error && \"function\" == typeof error.toString ? error.toString() : {}.toString.call(error);\n error = new Error(\"Expected reject to be called with Error, got \" + _err);\n }\n this.rejected = !0;\n this.error = error;\n this.errorHandled || setTimeout((function() {\n _this2.errorHandled || function(err, promise) {\n if (-1 === dispatchedErrors.indexOf(err)) {\n dispatchedErrors.push(err);\n setTimeout((function() {\n throw err;\n }), 1);\n for (var j = 0; j < possiblyUnhandledPromiseHandlers.length; j++) possiblyUnhandledPromiseHandlers[j](err, promise);\n }\n }(error, _this2);\n }), 1);\n this.dispatch();\n return this;\n };\n _proto.asyncReject = function(error) {\n this.errorHandled = !0;\n this.reject(error);\n return this;\n };\n _proto.dispatch = function() {\n var resolved = this.resolved, rejected = this.rejected, handlers = this.handlers;\n if (!this.dispatching && (resolved || rejected)) {\n this.dispatching = !0;\n startActive();\n var chain = function(firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n secondPromise.resolve(res);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < handlers.length; i++) {\n var _handlers$i = handlers[i], onSuccess = _handlers$i.onSuccess, onError = _handlers$i.onError, promise = _handlers$i.promise;\n var _result2 = void 0;\n if (resolved) try {\n _result2 = onSuccess ? onSuccess(this.value) : this.value;\n } catch (err) {\n promise.reject(err);\n continue;\n } else if (rejected) {\n if (!onError) {\n promise.reject(this.error);\n continue;\n }\n try {\n _result2 = onError(this.error);\n } catch (err) {\n promise.reject(err);\n continue;\n }\n }\n if (_result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected)) {\n var promiseResult = _result2;\n promiseResult.resolved ? promise.resolve(promiseResult.value) : promise.reject(promiseResult.error);\n promiseResult.errorHandled = !0;\n } else utils_isPromise(_result2) ? _result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected) ? _result2.resolved ? promise.resolve(_result2.value) : promise.reject(_result2.error) : chain(_result2, promise) : promise.resolve(_result2);\n }\n handlers.length = 0;\n this.dispatching = !1;\n endActive();\n }\n };\n _proto.then = function(onSuccess, onError) {\n if (onSuccess && \"function\" != typeof onSuccess && !onSuccess.call) throw new Error(\"Promise.then expected a function for success handler\");\n if (onError && \"function\" != typeof onError && !onError.call) throw new Error(\"Promise.then expected a function for error handler\");\n var promise = new ZalgoPromise;\n this.handlers.push({\n promise: promise,\n onSuccess: onSuccess,\n onError: onError\n });\n this.errorHandled = !0;\n this.dispatch();\n return promise;\n };\n _proto.catch = function(onError) {\n return this.then(void 0, onError);\n };\n _proto.finally = function(onFinally) {\n if (onFinally && \"function\" != typeof onFinally && !onFinally.call) throw new Error(\"Promise.finally expected a function\");\n return this.then((function(result) {\n return ZalgoPromise.try(onFinally).then((function() {\n return result;\n }));\n }), (function(err) {\n return ZalgoPromise.try(onFinally).then((function() {\n throw err;\n }));\n }));\n };\n _proto.timeout = function(time, err) {\n var _this3 = this;\n if (this.resolved || this.rejected) return this;\n var timeout = setTimeout((function() {\n _this3.resolved || _this3.rejected || _this3.reject(err || new Error(\"Promise timed out after \" + time + \"ms\"));\n }), time);\n return this.then((function(result) {\n clearTimeout(timeout);\n return result;\n }));\n };\n _proto.toPromise = function() {\n if (\"undefined\" == typeof Promise) throw new TypeError(\"Could not find Promise\");\n return Promise.resolve(this);\n };\n _proto.lazy = function() {\n this.errorHandled = !0;\n return this;\n };\n ZalgoPromise.resolve = function(value) {\n return value instanceof ZalgoPromise ? value : utils_isPromise(value) ? new ZalgoPromise((function(resolve, reject) {\n return value.then(resolve, reject);\n })) : (new ZalgoPromise).resolve(value);\n };\n ZalgoPromise.reject = function(error) {\n return (new ZalgoPromise).reject(error);\n };\n ZalgoPromise.asyncReject = function(error) {\n return (new ZalgoPromise).asyncReject(error);\n };\n ZalgoPromise.all = function(promises) {\n var promise = new ZalgoPromise;\n var count = promises.length;\n var results = [].slice();\n if (!count) {\n promise.resolve(results);\n return promise;\n }\n var chain = function(i, firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n results[i] = res;\n 0 == (count -= 1) && promise.resolve(results);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < promises.length; i++) {\n var prom = promises[i];\n if (prom instanceof ZalgoPromise) {\n if (prom.resolved) {\n results[i] = prom.value;\n count -= 1;\n continue;\n }\n } else if (!utils_isPromise(prom)) {\n results[i] = prom;\n count -= 1;\n continue;\n }\n chain(i, ZalgoPromise.resolve(prom), promise);\n }\n 0 === count && promise.resolve(results);\n return promise;\n };\n ZalgoPromise.hash = function(promises) {\n var result = {};\n var awaitPromises = [];\n var _loop = function(key) {\n if (promises.hasOwnProperty(key)) {\n var value = promises[key];\n utils_isPromise(value) ? awaitPromises.push(value.then((function(res) {\n result[key] = res;\n }))) : result[key] = value;\n }\n };\n for (var key in promises) _loop(key);\n return ZalgoPromise.all(awaitPromises).then((function() {\n return result;\n }));\n };\n ZalgoPromise.map = function(items, method) {\n return ZalgoPromise.all(items.map(method));\n };\n ZalgoPromise.onPossiblyUnhandledException = function(handler) {\n return function(handler) {\n possiblyUnhandledPromiseHandlers.push(handler);\n return {\n cancel: function() {\n possiblyUnhandledPromiseHandlers.splice(possiblyUnhandledPromiseHandlers.indexOf(handler), 1);\n }\n };\n }(handler);\n };\n ZalgoPromise.try = function(method, context, args) {\n if (method && \"function\" != typeof method && !method.call) throw new Error(\"Promise.try expected a function\");\n var result;\n startActive();\n try {\n result = method.apply(context, args || []);\n } catch (err) {\n endActive();\n return ZalgoPromise.reject(err);\n }\n endActive();\n return ZalgoPromise.resolve(result);\n };\n ZalgoPromise.delay = function(_delay) {\n return new ZalgoPromise((function(resolve) {\n setTimeout(resolve, _delay);\n }));\n };\n ZalgoPromise.isPromise = function(value) {\n return !!(value && value instanceof ZalgoPromise) || utils_isPromise(value);\n };\n ZalgoPromise.flush = function() {\n return function(Zalgo) {\n var promise = flushPromise = flushPromise || new Zalgo;\n flushActive();\n return promise;\n }(ZalgoPromise);\n };\n return ZalgoPromise;\n }();\n function isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n var WINDOW_TYPE = {\n IFRAME: \"iframe\",\n POPUP: \"popup\"\n };\n var IE_WIN_ACCESS_ERROR = \"Call was rejected by callee.\\r\\n\";\n function getActualProtocol(win) {\n void 0 === win && (win = window);\n return win.location.protocol;\n }\n function getProtocol(win) {\n void 0 === win && (win = window);\n if (win.mockDomain) {\n var protocol = win.mockDomain.split(\"//\")[0];\n if (protocol) return protocol;\n }\n return getActualProtocol(win);\n }\n function isAboutProtocol(win) {\n void 0 === win && (win = window);\n return \"about:\" === getProtocol(win);\n }\n function utils_getParent(win) {\n void 0 === win && (win = window);\n if (win) try {\n if (win.parent && win.parent !== win) return win.parent;\n } catch (err) {}\n }\n function getOpener(win) {\n void 0 === win && (win = window);\n if (win && !utils_getParent(win)) try {\n return win.opener;\n } catch (err) {}\n }\n function canReadFromWindow(win) {\n try {\n return !0;\n } catch (err) {}\n return !1;\n }\n function getActualDomain(win) {\n void 0 === win && (win = window);\n var location = win.location;\n if (!location) throw new Error(\"Can not read window location\");\n var protocol = getActualProtocol(win);\n if (!protocol) throw new Error(\"Can not read window protocol\");\n if (\"file:\" === protocol) return \"file://\";\n if (\"about:\" === protocol) {\n var parent = utils_getParent(win);\n return parent && canReadFromWindow() ? getActualDomain(parent) : \"about://\";\n }\n var host = location.host;\n if (!host) throw new Error(\"Can not read window host\");\n return protocol + \"//\" + host;\n }\n function getDomain(win) {\n void 0 === win && (win = window);\n var domain = getActualDomain(win);\n return domain && win.mockDomain && 0 === win.mockDomain.indexOf(\"mock:\") ? win.mockDomain : domain;\n }\n function isSameDomain(win) {\n if (!function(win) {\n try {\n if (win === window) return !0;\n } catch (err) {}\n try {\n var desc = Object.getOwnPropertyDescriptor(win, \"location\");\n if (desc && !1 === desc.enumerable) return !1;\n } catch (err) {}\n try {\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (function(win) {\n void 0 === win && (win = window);\n return \"mock:\" === getProtocol(win);\n }(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (getActualDomain(win) === getActualDomain(window)) return !0;\n } catch (err) {}\n return !1;\n }(win)) return !1;\n try {\n if (win === window) return !0;\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n if (getDomain(window) === getDomain(win)) return !0;\n } catch (err) {}\n return !1;\n }\n function assertSameDomain(win) {\n if (!isSameDomain(win)) throw new Error(\"Expected window to be same domain\");\n return win;\n }\n function isAncestorParent(parent, child) {\n if (!parent || !child) return !1;\n var childParent = utils_getParent(child);\n return childParent ? childParent === parent : -1 !== function(win) {\n var result = [];\n try {\n for (;win.parent !== win; ) {\n result.push(win.parent);\n win = win.parent;\n }\n } catch (err) {}\n return result;\n }(child).indexOf(parent);\n }\n function getFrames(win) {\n var result = [];\n var frames;\n try {\n frames = win.frames;\n } catch (err) {\n frames = win;\n }\n var len;\n try {\n len = frames.length;\n } catch (err) {}\n if (0 === len) return result;\n if (len) {\n for (var i = 0; i < len; i++) {\n var frame = void 0;\n try {\n frame = frames[i];\n } catch (err) {\n continue;\n }\n result.push(frame);\n }\n return result;\n }\n for (var _i = 0; _i < 100; _i++) {\n var _frame = void 0;\n try {\n _frame = frames[_i];\n } catch (err) {\n return result;\n }\n if (!_frame) return result;\n result.push(_frame);\n }\n return result;\n }\n function getAllChildFrames(win) {\n var result = [];\n for (var _i3 = 0, _getFrames2 = getFrames(win); _i3 < _getFrames2.length; _i3++) {\n var frame = _getFrames2[_i3];\n result.push(frame);\n for (var _i5 = 0, _getAllChildFrames2 = getAllChildFrames(frame); _i5 < _getAllChildFrames2.length; _i5++) result.push(_getAllChildFrames2[_i5]);\n }\n return result;\n }\n function getTop(win) {\n void 0 === win && (win = window);\n try {\n if (win.top) return win.top;\n } catch (err) {}\n if (utils_getParent(win) === win) return win;\n try {\n if (isAncestorParent(window, win) && window.top) return window.top;\n } catch (err) {}\n try {\n if (isAncestorParent(win, window) && window.top) return window.top;\n } catch (err) {}\n for (var _i7 = 0, _getAllChildFrames4 = getAllChildFrames(win); _i7 < _getAllChildFrames4.length; _i7++) {\n var frame = _getAllChildFrames4[_i7];\n try {\n if (frame.top) return frame.top;\n } catch (err) {}\n if (utils_getParent(frame) === frame) return frame;\n }\n }\n function getAllFramesInWindow(win) {\n var top = getTop(win);\n if (!top) throw new Error(\"Can not determine top window\");\n var result = [].concat(getAllChildFrames(top), [ top ]);\n -1 === result.indexOf(win) && (result = [].concat(result, [ win ], getAllChildFrames(win)));\n return result;\n }\n var iframeWindows = [];\n var iframeFrames = [];\n function isWindowClosed(win, allowMock) {\n void 0 === allowMock && (allowMock = !0);\n try {\n if (win === window) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (!win) return !0;\n } catch (err) {\n return !0;\n }\n try {\n if (win.closed) return !0;\n } catch (err) {\n return !err || err.message !== IE_WIN_ACCESS_ERROR;\n }\n if (allowMock && isSameDomain(win)) try {\n if (win.mockclosed) return !0;\n } catch (err) {}\n try {\n if (!win.parent || !win.top) return !0;\n } catch (err) {}\n var iframeIndex = function(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }(iframeWindows, win);\n if (-1 !== iframeIndex) {\n var frame = iframeFrames[iframeIndex];\n if (frame && function(frame) {\n if (!frame.contentWindow) return !0;\n if (!frame.parentNode) return !0;\n var doc = frame.ownerDocument;\n if (doc && doc.documentElement && !doc.documentElement.contains(frame)) {\n var parent = frame;\n for (;parent.parentNode && parent.parentNode !== parent; ) parent = parent.parentNode;\n if (!parent.host || !doc.documentElement.contains(parent.host)) return !0;\n }\n return !1;\n }(frame)) return !0;\n }\n return !1;\n }\n function getFrameByName(win, name) {\n var winFrames = getFrames(win);\n for (var _i9 = 0; _i9 < winFrames.length; _i9++) {\n var childFrame = winFrames[_i9];\n try {\n if (isSameDomain(childFrame) && childFrame.name === name && -1 !== winFrames.indexOf(childFrame)) return childFrame;\n } catch (err) {}\n }\n try {\n if (-1 !== winFrames.indexOf(win.frames[name])) return win.frames[name];\n } catch (err) {}\n try {\n if (-1 !== winFrames.indexOf(win[name])) return win[name];\n } catch (err) {}\n }\n function getAncestor(win) {\n void 0 === win && (win = window);\n return getOpener(win = win || window) || utils_getParent(win) || void 0;\n }\n function anyMatch(collection1, collection2) {\n for (var _i17 = 0; _i17 < collection1.length; _i17++) {\n var item1 = collection1[_i17];\n for (var _i19 = 0; _i19 < collection2.length; _i19++) if (item1 === collection2[_i19]) return !0;\n }\n return !1;\n }\n function getDistanceFromTop(win) {\n void 0 === win && (win = window);\n var distance = 0;\n var parent = win;\n for (;parent; ) (parent = utils_getParent(parent)) && (distance += 1);\n return distance;\n }\n function isSameTopWindow(win1, win2) {\n var top1 = getTop(win1) || win1;\n var top2 = getTop(win2) || win2;\n try {\n if (top1 && top2) return top1 === top2;\n } catch (err) {}\n var allFrames1 = getAllFramesInWindow(win1);\n var allFrames2 = getAllFramesInWindow(win2);\n if (anyMatch(allFrames1, allFrames2)) return !0;\n var opener1 = getOpener(top1);\n var opener2 = getOpener(top2);\n return opener1 && anyMatch(getAllFramesInWindow(opener1), allFrames2) || opener2 && anyMatch(getAllFramesInWindow(opener2), allFrames1), \n !1;\n }\n function matchDomain(pattern, origin) {\n if (\"string\" == typeof pattern) {\n if (\"string\" == typeof origin) return \"*\" === pattern || origin === pattern;\n if (isRegex(origin)) return !1;\n if (Array.isArray(origin)) return !1;\n }\n return isRegex(pattern) ? isRegex(origin) ? pattern.toString() === origin.toString() : !Array.isArray(origin) && Boolean(origin.match(pattern)) : !!Array.isArray(pattern) && (Array.isArray(origin) ? JSON.stringify(pattern) === JSON.stringify(origin) : !isRegex(origin) && pattern.some((function(subpattern) {\n return matchDomain(subpattern, origin);\n })));\n }\n function getDomainFromUrl(url) {\n return url.match(/^(https?|mock|file):\\/\\//) ? url.split(\"/\").slice(0, 3).join(\"/\") : getDomain();\n }\n function onCloseWindow(win, callback, delay, maxtime) {\n void 0 === delay && (delay = 1e3);\n void 0 === maxtime && (maxtime = 1 / 0);\n var timeout;\n !function check() {\n if (isWindowClosed(win)) {\n timeout && clearTimeout(timeout);\n return callback();\n }\n if (maxtime <= 0) clearTimeout(timeout); else {\n maxtime -= delay;\n timeout = setTimeout(check, delay);\n }\n }();\n return {\n cancel: function() {\n timeout && clearTimeout(timeout);\n }\n };\n }\n function isWindow(obj) {\n try {\n if (obj === window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (\"[object Window]\" === {}.toString.call(obj)) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (window.Window && obj instanceof window.Window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.self === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.parent === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.top === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && \"__unlikely_value__\" === obj.__cross_domain_utils_window_check__) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (\"postMessage\" in obj && \"self\" in obj && \"location\" in obj) return !0;\n } catch (err) {}\n return !1;\n }\n function getFrameForWindow(win) {\n if (isSameDomain(win)) return assertSameDomain(win).frameElement;\n for (var _i21 = 0, _document$querySelect2 = document.querySelectorAll(\"iframe\"); _i21 < _document$querySelect2.length; _i21++) {\n var frame = _document$querySelect2[_i21];\n if (frame && frame.contentWindow && frame.contentWindow === win) return frame;\n }\n }\n function closeWindow(win) {\n if (function(win) {\n void 0 === win && (win = window);\n return Boolean(utils_getParent(win));\n }(win)) {\n var frame = getFrameForWindow(win);\n if (frame && frame.parentElement) {\n frame.parentElement.removeChild(frame);\n return;\n }\n }\n try {\n win.close();\n } catch (err) {}\n }\n function util_safeIndexOf(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }\n var weakmap_CrossDomainSafeWeakMap = function() {\n function CrossDomainSafeWeakMap() {\n this.name = void 0;\n this.weakmap = void 0;\n this.keys = void 0;\n this.values = void 0;\n this.name = \"__weakmap_\" + (1e9 * Math.random() >>> 0) + \"__\";\n if (function() {\n if (\"undefined\" == typeof WeakMap) return !1;\n if (void 0 === Object.freeze) return !1;\n try {\n var testWeakMap = new WeakMap;\n var testKey = {};\n Object.freeze(testKey);\n testWeakMap.set(testKey, \"__testvalue__\");\n return \"__testvalue__\" === testWeakMap.get(testKey);\n } catch (err) {\n return !1;\n }\n }()) try {\n this.weakmap = new WeakMap;\n } catch (err) {}\n this.keys = [];\n this.values = [];\n }\n var _proto = CrossDomainSafeWeakMap.prototype;\n _proto._cleanupClosedWindows = function() {\n var weakmap = this.weakmap;\n var keys = this.keys;\n for (var i = 0; i < keys.length; i++) {\n var value = keys[i];\n if (isWindow(value) && isWindowClosed(value)) {\n if (weakmap) try {\n weakmap.delete(value);\n } catch (err) {}\n keys.splice(i, 1);\n this.values.splice(i, 1);\n i -= 1;\n }\n }\n };\n _proto.isSafeToReadWrite = function(key) {\n return !isWindow(key);\n };\n _proto.set = function(key, value) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.set(key, value);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var name = this.name;\n var entry = key[name];\n entry && entry[0] === key ? entry[1] = value : Object.defineProperty(key, name, {\n value: [ key, value ],\n writable: !0\n });\n return;\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var values = this.values;\n var index = util_safeIndexOf(keys, key);\n if (-1 === index) {\n keys.push(key);\n values.push(value);\n } else values[index] = value;\n };\n _proto.get = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return weakmap.get(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return entry && entry[0] === key ? entry[1] : void 0;\n } catch (err) {}\n this._cleanupClosedWindows();\n var index = util_safeIndexOf(this.keys, key);\n if (-1 !== index) return this.values[index];\n };\n _proto.delete = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.delete(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n entry && entry[0] === key && (entry[0] = entry[1] = void 0);\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var index = util_safeIndexOf(keys, key);\n if (-1 !== index) {\n keys.splice(index, 1);\n this.values.splice(index, 1);\n }\n };\n _proto.has = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return !0;\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return !(!entry || entry[0] !== key);\n } catch (err) {}\n this._cleanupClosedWindows();\n return -1 !== util_safeIndexOf(this.keys, key);\n };\n _proto.getOrSet = function(key, getter) {\n if (this.has(key)) return this.get(key);\n var value = getter();\n this.set(key, value);\n return value;\n };\n return CrossDomainSafeWeakMap;\n }();\n function _getPrototypeOf(o) {\n return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n })(o);\n }\n function _isNativeReflectConstruct() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));\n return !0;\n } catch (e) {\n return !1;\n }\n }\n function construct_construct(Parent, args, Class) {\n return (construct_construct = _isNativeReflectConstruct() ? Reflect.construct : function(Parent, args, Class) {\n var a = [ null ];\n a.push.apply(a, args);\n var instance = new (Function.bind.apply(Parent, a));\n Class && _setPrototypeOf(instance, Class.prototype);\n return instance;\n }).apply(null, arguments);\n }\n function wrapNativeSuper_wrapNativeSuper(Class) {\n var _cache = \"function\" == typeof Map ? new Map : void 0;\n return (wrapNativeSuper_wrapNativeSuper = function(Class) {\n if (null === Class || !(fn = Class, -1 !== Function.toString.call(fn).indexOf(\"[native code]\"))) return Class;\n var fn;\n if (\"function\" != typeof Class) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== _cache) {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct_construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n })(Class);\n }\n function getFunctionName(fn) {\n return fn.name || fn.__name__ || fn.displayName || \"anonymous\";\n }\n function setFunctionName(fn, name) {\n try {\n delete fn.name;\n fn.name = name;\n } catch (err) {}\n fn.__name__ = fn.displayName = name;\n return fn;\n }\n function base64encode(str) {\n if (\"function\" == typeof btoa) return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (function(m, p1) {\n return String.fromCharCode(parseInt(p1, 16));\n }))).replace(/[=]/g, \"\");\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"utf8\").toString(\"base64\").replace(/[=]/g, \"\");\n throw new Error(\"Can not find window.btoa or Buffer\");\n }\n function uniqueID() {\n var chars = \"0123456789abcdef\";\n return \"uid_\" + \"xxxxxxxxxx\".replace(/./g, (function() {\n return chars.charAt(Math.floor(Math.random() * chars.length));\n })) + \"_\" + base64encode((new Date).toISOString().slice(11, 19).replace(\"T\", \".\")).replace(/[^a-zA-Z0-9]/g, \"\").toLowerCase();\n }\n var objectIDs;\n function serializeArgs(args) {\n try {\n return JSON.stringify([].slice.call(args), (function(subkey, val) {\n return \"function\" == typeof val ? \"memoize[\" + function(obj) {\n objectIDs = objectIDs || new weakmap_CrossDomainSafeWeakMap;\n if (null == obj || \"object\" != typeof obj && \"function\" != typeof obj) throw new Error(\"Invalid object\");\n var uid = objectIDs.get(obj);\n if (!uid) {\n uid = typeof obj + \":\" + uniqueID();\n objectIDs.set(obj, uid);\n }\n return uid;\n }(val) + \"]\" : val;\n }));\n } catch (err) {\n throw new Error(\"Arguments not serializable -- can not be used to memoize\");\n }\n }\n function getEmptyObject() {\n return {};\n }\n var memoizeGlobalIndex = 0;\n var memoizeGlobalIndexValidFrom = 0;\n function memoize(method, options) {\n void 0 === options && (options = {});\n var _options$thisNamespac = options.thisNamespace, thisNamespace = void 0 !== _options$thisNamespac && _options$thisNamespac, cacheTime = options.time;\n var simpleCache;\n var thisCache;\n var memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n var memoizedFunction = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n if (memoizeIndex < memoizeGlobalIndexValidFrom) {\n simpleCache = null;\n thisCache = null;\n memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n }\n var cache;\n cache = thisNamespace ? (thisCache = thisCache || new weakmap_CrossDomainSafeWeakMap).getOrSet(this, getEmptyObject) : simpleCache = simpleCache || {};\n var cacheKey = serializeArgs(args);\n var cacheResult = cache[cacheKey];\n if (cacheResult && cacheTime && Date.now() - cacheResult.time < cacheTime) {\n delete cache[cacheKey];\n cacheResult = null;\n }\n if (cacheResult) return cacheResult.value;\n var time = Date.now();\n var value = method.apply(this, arguments);\n cache[cacheKey] = {\n time: time,\n value: value\n };\n return value;\n };\n memoizedFunction.reset = function() {\n simpleCache = null;\n thisCache = null;\n };\n return setFunctionName(memoizedFunction, (options.name || getFunctionName(method)) + \"::memoized\");\n }\n memoize.clear = function() {\n memoizeGlobalIndexValidFrom = memoizeGlobalIndex;\n };\n function memoizePromise(method) {\n var cache = {};\n function memoizedPromiseFunction() {\n var _arguments = arguments, _this = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n var key = serializeArgs(args);\n if (cache.hasOwnProperty(key)) return cache[key];\n cache[key] = promise_ZalgoPromise.try((function() {\n return method.apply(_this, _arguments);\n })).finally((function() {\n delete cache[key];\n }));\n return cache[key];\n }\n memoizedPromiseFunction.reset = function() {\n cache = {};\n };\n return setFunctionName(memoizedPromiseFunction, getFunctionName(method) + \"::promiseMemoized\");\n }\n function src_util_noop() {}\n function once(method) {\n var called = !1;\n return setFunctionName((function() {\n if (!called) {\n called = !0;\n return method.apply(this, arguments);\n }\n }), getFunctionName(method) + \"::once\");\n }\n function stringifyError(err, level) {\n void 0 === level && (level = 1);\n if (level >= 3) return \"stringifyError stack overflow\";\n try {\n if (!err) return \"\";\n if (\"string\" == typeof err) return err;\n if (err instanceof Error) {\n var stack = err && err.stack;\n var message = err && err.message;\n if (stack && message) return -1 !== stack.indexOf(message) ? stack : message + \"\\n\" + stack;\n if (stack) return stack;\n if (message) return message;\n }\n return err && err.toString && \"function\" == typeof err.toString ? err.toString() : {}.toString.call(err);\n } catch (newErr) {\n return \"Error while stringifying error: \" + stringifyError(newErr, level + 1);\n }\n }\n function stringify(item) {\n return \"string\" == typeof item ? item : item && item.toString && \"function\" == typeof item.toString ? item.toString() : {}.toString.call(item);\n }\n function extend(obj, source) {\n if (!source) return obj;\n if (Object.assign) return Object.assign(obj, source);\n for (var key in source) source.hasOwnProperty(key) && (obj[key] = source[key]);\n return obj;\n }\n memoize((function(obj) {\n if (Object.values) return Object.values(obj);\n var result = [];\n for (var key in obj) obj.hasOwnProperty(key) && result.push(obj[key]);\n return result;\n }));\n function identity(item) {\n return item;\n }\n function safeInterval(method, time) {\n var timeout;\n !function loop() {\n timeout = setTimeout((function() {\n method();\n loop();\n }), time);\n }();\n return {\n cancel: function() {\n clearTimeout(timeout);\n }\n };\n }\n function arrayFrom(item) {\n return [].slice.call(item);\n }\n function isDefined(value) {\n return null != value;\n }\n function util_isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n function util_getOrSet(obj, key, getter) {\n if (obj.hasOwnProperty(key)) return obj[key];\n var val = getter();\n obj[key] = val;\n return val;\n }\n function cleanup(obj) {\n var tasks = [];\n var cleaned = !1;\n var cleanErr;\n var cleaner = {\n set: function(name, item) {\n if (!cleaned) {\n obj[name] = item;\n cleaner.register((function() {\n delete obj[name];\n }));\n }\n return item;\n },\n register: function(method) {\n var task = once((function() {\n return method(cleanErr);\n }));\n cleaned ? method(cleanErr) : tasks.push(task);\n return {\n cancel: function() {\n var index = tasks.indexOf(task);\n -1 !== index && tasks.splice(index, 1);\n }\n };\n },\n all: function(err) {\n cleanErr = err;\n var results = [];\n cleaned = !0;\n for (;tasks.length; ) {\n var task = tasks.shift();\n results.push(task());\n }\n return promise_ZalgoPromise.all(results).then(src_util_noop);\n }\n };\n return cleaner;\n }\n function assertExists(name, thing) {\n if (null == thing) throw new Error(\"Expected \" + name + \" to be present\");\n return thing;\n }\n var util_ExtendableError = function(_Error) {\n _inheritsLoose(ExtendableError, _Error);\n function ExtendableError(message) {\n var _this6;\n (_this6 = _Error.call(this, message) || this).name = _this6.constructor.name;\n \"function\" == typeof Error.captureStackTrace ? Error.captureStackTrace(function(self) {\n if (void 0 === self) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return self;\n }(_this6), _this6.constructor) : _this6.stack = new Error(message).stack;\n return _this6;\n }\n return ExtendableError;\n }(wrapNativeSuper_wrapNativeSuper(Error));\n function getBody() {\n var body = document.body;\n if (!body) throw new Error(\"Body element not found\");\n return body;\n }\n function isDocumentReady() {\n return Boolean(document.body) && \"complete\" === document.readyState;\n }\n function isDocumentInteractive() {\n return Boolean(document.body) && \"interactive\" === document.readyState;\n }\n function urlEncode(str) {\n return encodeURIComponent(str);\n }\n memoize((function() {\n return new promise_ZalgoPromise((function(resolve) {\n if (isDocumentReady() || isDocumentInteractive()) return resolve();\n var interval = setInterval((function() {\n if (isDocumentReady() || isDocumentInteractive()) {\n clearInterval(interval);\n return resolve();\n }\n }), 10);\n }));\n }));\n function parseQuery(queryString) {\n return function(method, logic, args) {\n void 0 === args && (args = []);\n var cache = method.__inline_memoize_cache__ = method.__inline_memoize_cache__ || {};\n var key = serializeArgs(args);\n return cache.hasOwnProperty(key) ? cache[key] : cache[key] = function() {\n var params = {};\n if (!queryString) return params;\n if (-1 === queryString.indexOf(\"=\")) return params;\n for (var _i2 = 0, _queryString$split2 = queryString.split(\"&\"); _i2 < _queryString$split2.length; _i2++) {\n var pair = _queryString$split2[_i2];\n (pair = pair.split(\"=\"))[0] && pair[1] && (params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]));\n }\n return params;\n }.apply(void 0, args);\n }(parseQuery, 0, [ queryString ]);\n }\n function extendQuery(originalQuery, props) {\n void 0 === props && (props = {});\n return props && Object.keys(props).length ? function(obj) {\n void 0 === obj && (obj = {});\n return Object.keys(obj).filter((function(key) {\n return \"string\" == typeof obj[key] || \"boolean\" == typeof obj[key];\n })).map((function(key) {\n var val = obj[key];\n if (\"string\" != typeof val && \"boolean\" != typeof val) throw new TypeError(\"Invalid type for query\");\n return urlEncode(key) + \"=\" + urlEncode(val.toString());\n })).join(\"&\");\n }(_extends({}, parseQuery(originalQuery), props)) : originalQuery;\n }\n function appendChild(container, child) {\n container.appendChild(child);\n }\n function isElement(element) {\n return element instanceof window.Element || null !== element && \"object\" == typeof element && 1 === element.nodeType && \"object\" == typeof element.style && \"object\" == typeof element.ownerDocument;\n }\n function getElementSafe(id, doc) {\n void 0 === doc && (doc = document);\n return isElement(id) ? id : \"string\" == typeof id ? doc.querySelector(id) : void 0;\n }\n function elementReady(id) {\n return new promise_ZalgoPromise((function(resolve, reject) {\n var name = stringify(id);\n var el = getElementSafe(id);\n if (el) return resolve(el);\n if (isDocumentReady()) return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n var interval = setInterval((function() {\n if (el = getElementSafe(id)) {\n resolve(el);\n clearInterval(interval);\n } else if (isDocumentReady()) {\n clearInterval(interval);\n return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n }\n }), 10);\n }));\n }\n var dom_PopupOpenError = function(_ExtendableError) {\n _inheritsLoose(PopupOpenError, _ExtendableError);\n function PopupOpenError() {\n return _ExtendableError.apply(this, arguments) || this;\n }\n return PopupOpenError;\n }(util_ExtendableError);\n var awaitFrameLoadPromises;\n function awaitFrameLoad(frame) {\n if ((awaitFrameLoadPromises = awaitFrameLoadPromises || new weakmap_CrossDomainSafeWeakMap).has(frame)) {\n var _promise = awaitFrameLoadPromises.get(frame);\n if (_promise) return _promise;\n }\n var promise = new promise_ZalgoPromise((function(resolve, reject) {\n frame.addEventListener(\"load\", (function() {\n !function(frame) {\n !function() {\n for (var i = 0; i < iframeWindows.length; i++) {\n var closed = !1;\n try {\n closed = iframeWindows[i].closed;\n } catch (err) {}\n if (closed) {\n iframeFrames.splice(i, 1);\n iframeWindows.splice(i, 1);\n }\n }\n }();\n if (frame && frame.contentWindow) try {\n iframeWindows.push(frame.contentWindow);\n iframeFrames.push(frame);\n } catch (err) {}\n }(frame);\n resolve(frame);\n }));\n frame.addEventListener(\"error\", (function(err) {\n frame.contentWindow ? resolve(frame) : reject(err);\n }));\n }));\n awaitFrameLoadPromises.set(frame, promise);\n return promise;\n }\n function awaitFrameWindow(frame) {\n return awaitFrameLoad(frame).then((function(loadedFrame) {\n if (!loadedFrame.contentWindow) throw new Error(\"Could not find window in iframe\");\n return loadedFrame.contentWindow;\n }));\n }\n function dom_iframe(options, container) {\n void 0 === options && (options = {});\n var style = options.style || {};\n var frame = function(tag, options, container) {\n void 0 === tag && (tag = \"div\");\n void 0 === options && (options = {});\n tag = tag.toLowerCase();\n var element = document.createElement(tag);\n options.style && extend(element.style, options.style);\n options.class && (element.className = options.class.join(\" \"));\n options.id && element.setAttribute(\"id\", options.id);\n if (options.attributes) for (var _i10 = 0, _Object$keys2 = Object.keys(options.attributes); _i10 < _Object$keys2.length; _i10++) {\n var key = _Object$keys2[_i10];\n element.setAttribute(key, options.attributes[key]);\n }\n options.styleSheet && function(el, styleText, doc) {\n void 0 === doc && (doc = window.document);\n el.styleSheet ? el.styleSheet.cssText = styleText : el.appendChild(doc.createTextNode(styleText));\n }(element, options.styleSheet);\n if (options.html) {\n if (\"iframe\" === tag) throw new Error(\"Iframe html can not be written unless container provided and iframe in DOM\");\n element.innerHTML = options.html;\n }\n return element;\n }(\"iframe\", {\n attributes: _extends({\n allowTransparency: \"true\"\n }, options.attributes || {}),\n style: _extends({\n backgroundColor: \"transparent\",\n border: \"none\"\n }, style),\n html: options.html,\n class: options.class\n });\n var isIE = window.navigator.userAgent.match(/MSIE|Edge/i);\n frame.hasAttribute(\"id\") || frame.setAttribute(\"id\", uniqueID());\n awaitFrameLoad(frame);\n container && function(id, doc) {\n void 0 === doc && (doc = document);\n var element = getElementSafe(id, doc);\n if (element) return element;\n throw new Error(\"Can not find element: \" + stringify(id));\n }(container).appendChild(frame);\n (options.url || isIE) && frame.setAttribute(\"src\", options.url || \"about:blank\");\n return frame;\n }\n function addEventListener(obj, event, handler) {\n obj.addEventListener(event, handler);\n return {\n cancel: function() {\n obj.removeEventListener(event, handler);\n }\n };\n }\n function showElement(element) {\n element.style.setProperty(\"display\", \"\");\n }\n function hideElement(element) {\n element.style.setProperty(\"display\", \"none\", \"important\");\n }\n function destroyElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n function isElementClosed(el) {\n return !(el && el.parentNode && el.ownerDocument && el.ownerDocument.documentElement && el.ownerDocument.documentElement.contains(el));\n }\n function onResize(el, handler, _temp) {\n var _ref2 = void 0 === _temp ? {} : _temp, _ref2$width = _ref2.width, width = void 0 === _ref2$width || _ref2$width, _ref2$height = _ref2.height, height = void 0 === _ref2$height || _ref2$height, _ref2$interval = _ref2.interval, interval = void 0 === _ref2$interval ? 100 : _ref2$interval, _ref2$win = _ref2.win, win = void 0 === _ref2$win ? window : _ref2$win;\n var currentWidth = el.offsetWidth;\n var currentHeight = el.offsetHeight;\n var canceled = !1;\n handler({\n width: currentWidth,\n height: currentHeight\n });\n var check = function() {\n if (!canceled && function(el) {\n return Boolean(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n }(el)) {\n var newWidth = el.offsetWidth;\n var newHeight = el.offsetHeight;\n (width && newWidth !== currentWidth || height && newHeight !== currentHeight) && handler({\n width: newWidth,\n height: newHeight\n });\n currentWidth = newWidth;\n currentHeight = newHeight;\n }\n };\n var observer;\n var timeout;\n win.addEventListener(\"resize\", check);\n if (void 0 !== win.ResizeObserver) {\n (observer = new win.ResizeObserver(check)).observe(el);\n timeout = safeInterval(check, 10 * interval);\n } else if (void 0 !== win.MutationObserver) {\n (observer = new win.MutationObserver(check)).observe(el, {\n attributes: !0,\n childList: !0,\n subtree: !0,\n characterData: !1\n });\n timeout = safeInterval(check, 10 * interval);\n } else timeout = safeInterval(check, interval);\n return {\n cancel: function() {\n canceled = !0;\n observer.disconnect();\n window.removeEventListener(\"resize\", check);\n timeout.cancel();\n }\n };\n }\n function isShadowElement(element) {\n for (;element.parentNode; ) element = element.parentNode;\n return \"[object ShadowRoot]\" === element.toString();\n }\n var currentScript = \"undefined\" != typeof document ? document.currentScript : null;\n var getCurrentScript = memoize((function() {\n if (currentScript) return currentScript;\n if (currentScript = function() {\n try {\n var stack = function() {\n try {\n throw new Error(\"_\");\n } catch (err) {\n return err.stack || \"\";\n }\n }();\n var stackDetails = /.*at [^(]*\\((.*):(.+):(.+)\\)$/gi.exec(stack);\n var scriptLocation = stackDetails && stackDetails[1];\n if (!scriptLocation) return;\n for (var _i22 = 0, _Array$prototype$slic2 = [].slice.call(document.getElementsByTagName(\"script\")).reverse(); _i22 < _Array$prototype$slic2.length; _i22++) {\n var script = _Array$prototype$slic2[_i22];\n if (script.src && script.src === scriptLocation) return script;\n }\n } catch (err) {}\n }()) return currentScript;\n throw new Error(\"Can not determine current script\");\n }));\n var currentUID = uniqueID();\n memoize((function() {\n var script;\n try {\n script = getCurrentScript();\n } catch (err) {\n return currentUID;\n }\n var uid = script.getAttribute(\"data-uid\");\n if (uid && \"string\" == typeof uid) return uid;\n if ((uid = script.getAttribute(\"data-uid-auto\")) && \"string\" == typeof uid) return uid;\n if (script.src) {\n var hashedString = function(str) {\n var hash = \"\";\n for (var i = 0; i < str.length; i++) {\n var total = str[i].charCodeAt(0) * i;\n str[i + 1] && (total += str[i + 1].charCodeAt(0) * (i - 1));\n hash += String.fromCharCode(97 + Math.abs(total) % 26);\n }\n return hash;\n }(JSON.stringify({\n src: script.src,\n dataset: script.dataset\n }));\n uid = \"uid_\" + hashedString.slice(hashedString.length - 30);\n } else uid = uniqueID();\n script.setAttribute(\"data-uid-auto\", uid);\n return uid;\n }));\n function toPx(val) {\n return function(val) {\n if (\"number\" == typeof val) return val;\n var match = val.match(/^([0-9]+)(px|%)$/);\n if (!match) throw new Error(\"Could not match css value from \" + val);\n return parseInt(match[1], 10);\n }(val) + \"px\";\n }\n function toCSS(val) {\n return \"number\" == typeof val ? toPx(val) : \"string\" == typeof (str = val) && /^[0-9]+%$/.test(str) ? val : toPx(val);\n var str;\n }\n function global_getGlobal(win) {\n void 0 === win && (win = window);\n var globalKey = \"__post_robot_10_0_44__\";\n return win !== window ? win[globalKey] : win[globalKey] = win[globalKey] || {};\n }\n var getObj = function() {\n return {};\n };\n function globalStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return util_getOrSet(global_getGlobal(), key, (function() {\n var store = defStore();\n return {\n has: function(storeKey) {\n return store.hasOwnProperty(storeKey);\n },\n get: function(storeKey, defVal) {\n return store.hasOwnProperty(storeKey) ? store[storeKey] : defVal;\n },\n set: function(storeKey, val) {\n store[storeKey] = val;\n return val;\n },\n del: function(storeKey) {\n delete store[storeKey];\n },\n getOrSet: function(storeKey, getter) {\n return util_getOrSet(store, storeKey, getter);\n },\n reset: function() {\n store = defStore();\n },\n keys: function() {\n return Object.keys(store);\n }\n };\n }));\n }\n var WildCard = function() {};\n function getWildcard() {\n var global = global_getGlobal();\n global.WINDOW_WILDCARD = global.WINDOW_WILDCARD || new WildCard;\n return global.WINDOW_WILDCARD;\n }\n function windowStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return globalStore(\"windowStore\").getOrSet(key, (function() {\n var winStore = new weakmap_CrossDomainSafeWeakMap;\n var getStore = function(win) {\n return winStore.getOrSet(win, defStore);\n };\n return {\n has: function(win) {\n return getStore(win).hasOwnProperty(key);\n },\n get: function(win, defVal) {\n var store = getStore(win);\n return store.hasOwnProperty(key) ? store[key] : defVal;\n },\n set: function(win, val) {\n getStore(win)[key] = val;\n return val;\n },\n del: function(win) {\n delete getStore(win)[key];\n },\n getOrSet: function(win, getter) {\n return util_getOrSet(getStore(win), key, getter);\n }\n };\n }));\n }\n function getInstanceID() {\n return globalStore(\"instance\").getOrSet(\"instanceID\", uniqueID);\n }\n function resolveHelloPromise(win, _ref) {\n var domain = _ref.domain;\n var helloPromises = windowStore(\"helloPromises\");\n var existingPromise = helloPromises.get(win);\n existingPromise && existingPromise.resolve({\n domain: domain\n });\n var newPromise = promise_ZalgoPromise.resolve({\n domain: domain\n });\n helloPromises.set(win, newPromise);\n return newPromise;\n }\n function sayHello(win, _ref4) {\n return (0, _ref4.send)(win, \"postrobot_hello\", {\n instanceID: getInstanceID()\n }, {\n domain: \"*\",\n timeout: -1\n }).then((function(_ref5) {\n var origin = _ref5.origin, instanceID = _ref5.data.instanceID;\n resolveHelloPromise(win, {\n domain: origin\n });\n return {\n win: win,\n domain: origin,\n instanceID: instanceID\n };\n }));\n }\n function getWindowInstanceID(win, _ref6) {\n var send = _ref6.send;\n return windowStore(\"windowInstanceIDPromises\").getOrSet(win, (function() {\n return sayHello(win, {\n send: send\n }).then((function(_ref7) {\n return _ref7.instanceID;\n }));\n }));\n }\n function markWindowKnown(win) {\n windowStore(\"knownWindows\").set(win, !0);\n }\n function isSerializedType(item) {\n return \"object\" == typeof item && null !== item && \"string\" == typeof item.__type__;\n }\n function determineType(val) {\n return void 0 === val ? \"undefined\" : null === val ? \"null\" : Array.isArray(val) ? \"array\" : \"function\" == typeof val ? \"function\" : \"object\" == typeof val ? val instanceof Error ? \"error\" : \"function\" == typeof val.then ? \"promise\" : \"[object RegExp]\" === {}.toString.call(val) ? \"regex\" : \"[object Date]\" === {}.toString.call(val) ? \"date\" : \"object\" : \"string\" == typeof val ? \"string\" : \"number\" == typeof val ? \"number\" : \"boolean\" == typeof val ? \"boolean\" : void 0;\n }\n function serializeType(type, val) {\n return {\n __type__: type,\n __val__: val\n };\n }\n var _SERIALIZER;\n var SERIALIZER = ((_SERIALIZER = {}).function = function() {}, _SERIALIZER.error = function(_ref) {\n return serializeType(\"error\", {\n message: _ref.message,\n stack: _ref.stack,\n code: _ref.code,\n data: _ref.data\n });\n }, _SERIALIZER.promise = function() {}, _SERIALIZER.regex = function(val) {\n return serializeType(\"regex\", val.source);\n }, _SERIALIZER.date = function(val) {\n return serializeType(\"date\", val.toJSON());\n }, _SERIALIZER.array = function(val) {\n return val;\n }, _SERIALIZER.object = function(val) {\n return val;\n }, _SERIALIZER.string = function(val) {\n return val;\n }, _SERIALIZER.number = function(val) {\n return val;\n }, _SERIALIZER.boolean = function(val) {\n return val;\n }, _SERIALIZER.null = function(val) {\n return val;\n }, _SERIALIZER[void 0] = function(val) {\n return serializeType(\"undefined\", val);\n }, _SERIALIZER);\n var defaultSerializers = {};\n var _DESERIALIZER;\n var DESERIALIZER = ((_DESERIALIZER = {}).function = function() {\n throw new Error(\"Function serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.error = function(_ref2) {\n var stack = _ref2.stack, code = _ref2.code, data = _ref2.data;\n var error = new Error(_ref2.message);\n error.code = code;\n data && (error.data = data);\n error.stack = stack + \"\\n\\n\" + error.stack;\n return error;\n }, _DESERIALIZER.promise = function() {\n throw new Error(\"Promise serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.regex = function(val) {\n return new RegExp(val);\n }, _DESERIALIZER.date = function(val) {\n return new Date(val);\n }, _DESERIALIZER.array = function(val) {\n return val;\n }, _DESERIALIZER.object = function(val) {\n return val;\n }, _DESERIALIZER.string = function(val) {\n return val;\n }, _DESERIALIZER.number = function(val) {\n return val;\n }, _DESERIALIZER.boolean = function(val) {\n return val;\n }, _DESERIALIZER.null = function(val) {\n return val;\n }, _DESERIALIZER[void 0] = function() {}, _DESERIALIZER);\n var defaultDeserializers = {};\n new promise_ZalgoPromise((function(resolve) {\n if (window.document && window.document.body) return resolve(window.document.body);\n var interval = setInterval((function() {\n if (window.document && window.document.body) {\n clearInterval(interval);\n return resolve(window.document.body);\n }\n }), 10);\n }));\n function cleanupProxyWindows() {\n var idToProxyWindow = globalStore(\"idToProxyWindow\");\n for (var _i2 = 0, _idToProxyWindow$keys2 = idToProxyWindow.keys(); _i2 < _idToProxyWindow$keys2.length; _i2++) {\n var id = _idToProxyWindow$keys2[_i2];\n idToProxyWindow.get(id).shouldClean() && idToProxyWindow.del(id);\n }\n }\n function getSerializedWindow(winPromise, _ref) {\n var send = _ref.send, _ref$id = _ref.id, id = void 0 === _ref$id ? uniqueID() : _ref$id;\n var windowNamePromise = winPromise.then((function(win) {\n if (isSameDomain(win)) return assertSameDomain(win).name;\n }));\n var windowTypePromise = winPromise.then((function(window) {\n if (isWindowClosed(window)) throw new Error(\"Window is closed, can not determine type\");\n return getOpener(window) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;\n }));\n windowNamePromise.catch(src_util_noop);\n windowTypePromise.catch(src_util_noop);\n var getName = function() {\n return winPromise.then((function(win) {\n if (!isWindowClosed(win)) return isSameDomain(win) ? assertSameDomain(win).name : windowNamePromise;\n }));\n };\n return {\n id: id,\n getType: function() {\n return windowTypePromise;\n },\n getInstanceID: memoizePromise((function() {\n return winPromise.then((function(win) {\n return getWindowInstanceID(win, {\n send: send\n });\n }));\n })),\n close: function() {\n return winPromise.then(closeWindow);\n },\n getName: getName,\n focus: function() {\n return winPromise.then((function(win) {\n win.focus();\n }));\n },\n isClosed: function() {\n return winPromise.then((function(win) {\n return isWindowClosed(win);\n }));\n },\n setLocation: function(href, opts) {\n void 0 === opts && (opts = {});\n return winPromise.then((function(win) {\n var domain = window.location.protocol + \"//\" + window.location.host;\n var _opts$method = opts.method, method = void 0 === _opts$method ? \"get\" : _opts$method, body = opts.body;\n if (0 === href.indexOf(\"/\")) href = \"\" + domain + href; else if (!href.match(/^https?:\\/\\//) && 0 !== href.indexOf(domain)) throw new Error(\"Expected url to be http or https url, or absolute path, got \" + JSON.stringify(href));\n if (\"post\" === method) return getName().then((function(name) {\n if (!name) throw new Error(\"Can not post to window without target name\");\n !function(_ref3) {\n var url = _ref3.url, target = _ref3.target, body = _ref3.body, _ref3$method = _ref3.method, method = void 0 === _ref3$method ? \"post\" : _ref3$method;\n var form = document.createElement(\"form\");\n form.setAttribute(\"target\", target);\n form.setAttribute(\"method\", method);\n form.setAttribute(\"action\", url);\n form.style.display = \"none\";\n if (body) for (var _i24 = 0, _Object$keys4 = Object.keys(body); _i24 < _Object$keys4.length; _i24++) {\n var _body$key;\n var key = _Object$keys4[_i24];\n var input = document.createElement(\"input\");\n input.setAttribute(\"name\", key);\n input.setAttribute(\"value\", null == (_body$key = body[key]) ? void 0 : _body$key.toString());\n form.appendChild(input);\n }\n getBody().appendChild(form);\n form.submit();\n getBody().removeChild(form);\n }({\n url: href,\n target: name,\n method: method,\n body: body\n });\n }));\n if (\"get\" !== method) throw new Error(\"Unsupported method: \" + method);\n if (isSameDomain(win)) try {\n if (win.location && \"function\" == typeof win.location.replace) {\n win.location.replace(href);\n return;\n }\n } catch (err) {}\n win.location = href;\n }));\n },\n setName: function(name) {\n return winPromise.then((function(win) {\n var sameDomain = isSameDomain(win);\n var frame = getFrameForWindow(win);\n if (!sameDomain) throw new Error(\"Can not set name for cross-domain window: \" + name);\n assertSameDomain(win).name = name;\n frame && frame.setAttribute(\"name\", name);\n windowNamePromise = promise_ZalgoPromise.resolve(name);\n }));\n }\n };\n }\n var window_ProxyWindow = function() {\n function ProxyWindow(_ref2) {\n var send = _ref2.send, win = _ref2.win, serializedWindow = _ref2.serializedWindow;\n this.id = void 0;\n this.isProxyWindow = !0;\n this.serializedWindow = void 0;\n this.actualWindow = void 0;\n this.actualWindowPromise = void 0;\n this.send = void 0;\n this.name = void 0;\n this.actualWindowPromise = new promise_ZalgoPromise;\n this.serializedWindow = serializedWindow || getSerializedWindow(this.actualWindowPromise, {\n send: send\n });\n globalStore(\"idToProxyWindow\").set(this.getID(), this);\n win && this.setWindow(win, {\n send: send\n });\n }\n var _proto = ProxyWindow.prototype;\n _proto.getID = function() {\n return this.serializedWindow.id;\n };\n _proto.getType = function() {\n return this.serializedWindow.getType();\n };\n _proto.isPopup = function() {\n return this.getType().then((function(type) {\n return type === WINDOW_TYPE.POPUP;\n }));\n };\n _proto.setLocation = function(href, opts) {\n var _this = this;\n return this.serializedWindow.setLocation(href, opts).then((function() {\n return _this;\n }));\n };\n _proto.getName = function() {\n return this.serializedWindow.getName();\n };\n _proto.setName = function(name) {\n var _this2 = this;\n return this.serializedWindow.setName(name).then((function() {\n return _this2;\n }));\n };\n _proto.close = function() {\n var _this3 = this;\n return this.serializedWindow.close().then((function() {\n return _this3;\n }));\n };\n _proto.focus = function() {\n var _this4 = this;\n var isPopupPromise = this.isPopup();\n var getNamePromise = this.getName();\n var reopenPromise = promise_ZalgoPromise.hash({\n isPopup: isPopupPromise,\n name: getNamePromise\n }).then((function(_ref3) {\n var name = _ref3.name;\n _ref3.isPopup && name && window.open(\"\", name);\n }));\n var focusPromise = this.serializedWindow.focus();\n return promise_ZalgoPromise.all([ reopenPromise, focusPromise ]).then((function() {\n return _this4;\n }));\n };\n _proto.isClosed = function() {\n return this.serializedWindow.isClosed();\n };\n _proto.getWindow = function() {\n return this.actualWindow;\n };\n _proto.setWindow = function(win, _ref4) {\n var send = _ref4.send;\n this.actualWindow = win;\n this.actualWindowPromise.resolve(this.actualWindow);\n this.serializedWindow = getSerializedWindow(this.actualWindowPromise, {\n send: send,\n id: this.getID()\n });\n windowStore(\"winToProxyWindow\").set(win, this);\n };\n _proto.awaitWindow = function() {\n return this.actualWindowPromise;\n };\n _proto.matchWindow = function(win, _ref5) {\n var _this5 = this;\n var send = _ref5.send;\n return promise_ZalgoPromise.try((function() {\n return _this5.actualWindow ? win === _this5.actualWindow : promise_ZalgoPromise.hash({\n proxyInstanceID: _this5.getInstanceID(),\n knownWindowInstanceID: getWindowInstanceID(win, {\n send: send\n })\n }).then((function(_ref6) {\n var match = _ref6.proxyInstanceID === _ref6.knownWindowInstanceID;\n match && _this5.setWindow(win, {\n send: send\n });\n return match;\n }));\n }));\n };\n _proto.unwrap = function() {\n return this.actualWindow || this;\n };\n _proto.getInstanceID = function() {\n return this.serializedWindow.getInstanceID();\n };\n _proto.shouldClean = function() {\n return Boolean(this.actualWindow && isWindowClosed(this.actualWindow));\n };\n _proto.serialize = function() {\n return this.serializedWindow;\n };\n ProxyWindow.unwrap = function(win) {\n return ProxyWindow.isProxyWindow(win) ? win.unwrap() : win;\n };\n ProxyWindow.serialize = function(win, _ref7) {\n var send = _ref7.send;\n cleanupProxyWindows();\n return ProxyWindow.toProxyWindow(win, {\n send: send\n }).serialize();\n };\n ProxyWindow.deserialize = function(serializedWindow, _ref8) {\n var send = _ref8.send;\n cleanupProxyWindows();\n return globalStore(\"idToProxyWindow\").get(serializedWindow.id) || new ProxyWindow({\n serializedWindow: serializedWindow,\n send: send\n });\n };\n ProxyWindow.isProxyWindow = function(obj) {\n return Boolean(obj && !isWindow(obj) && obj.isProxyWindow);\n };\n ProxyWindow.toProxyWindow = function(win, _ref9) {\n var send = _ref9.send;\n cleanupProxyWindows();\n if (ProxyWindow.isProxyWindow(win)) return win;\n var actualWindow = win;\n return windowStore(\"winToProxyWindow\").get(actualWindow) || new ProxyWindow({\n win: actualWindow,\n send: send\n });\n };\n return ProxyWindow;\n }();\n function addMethod(id, val, name, source, domain) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n if (window_ProxyWindow.isProxyWindow(source)) proxyWindowMethods.set(id, {\n val: val,\n name: name,\n domain: domain,\n source: source\n }); else {\n proxyWindowMethods.del(id);\n methodStore.getOrSet(source, (function() {\n return {};\n }))[id] = {\n domain: domain,\n name: name,\n val: val,\n source: source\n };\n }\n }\n function lookupMethod(source, id) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n return methodStore.getOrSet(source, (function() {\n return {};\n }))[id] || proxyWindowMethods.get(id);\n }\n function function_serializeFunction(destination, domain, val, key, _ref3) {\n on = (_ref = {\n on: _ref3.on,\n send: _ref3.send\n }).on, send = _ref.send, globalStore(\"builtinListeners\").getOrSet(\"functionCalls\", (function() {\n return on(\"postrobot_method\", {\n domain: \"*\"\n }, (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var id = data.id, name = data.name;\n var meth = lookupMethod(source, id);\n if (!meth) throw new Error(\"Could not find method '\" + name + \"' with id: \" + data.id + \" in \" + getDomain(window));\n var methodSource = meth.source, domain = meth.domain, val = meth.val;\n return promise_ZalgoPromise.try((function() {\n if (!matchDomain(domain, origin)) throw new Error(\"Method '\" + data.name + \"' domain \" + JSON.stringify(util_isRegex(meth.domain) ? meth.domain.source : meth.domain) + \" does not match origin \" + origin + \" in \" + getDomain(window));\n if (window_ProxyWindow.isProxyWindow(methodSource)) return methodSource.matchWindow(source, {\n send: send\n }).then((function(match) {\n if (!match) throw new Error(\"Method call '\" + data.name + \"' failed - proxy window does not match source in \" + getDomain(window));\n }));\n })).then((function() {\n return val.apply({\n source: source,\n origin: origin\n }, data.args);\n }), (function(err) {\n return promise_ZalgoPromise.try((function() {\n if (val.onError) return val.onError(err);\n })).then((function() {\n err.stack && (err.stack = \"Remote call to \" + name + \"(\" + function(args) {\n void 0 === args && (args = []);\n return arrayFrom(args).map((function(arg) {\n return \"string\" == typeof arg ? \"'\" + arg + \"'\" : void 0 === arg ? \"undefined\" : null === arg ? \"null\" : \"boolean\" == typeof arg ? arg.toString() : Array.isArray(arg) ? \"[ ... ]\" : \"object\" == typeof arg ? \"{ ... }\" : \"function\" == typeof arg ? \"() => { ... }\" : \"<\" + typeof arg + \">\";\n })).join(\", \");\n }(data.args) + \") failed\\n\\n\" + err.stack);\n throw err;\n }));\n })).then((function(result) {\n return {\n result: result,\n id: id,\n name: name\n };\n }));\n }));\n }));\n var _ref, on, send;\n var id = val.__id__ || uniqueID();\n destination = window_ProxyWindow.unwrap(destination);\n var name = val.__name__ || val.name || key;\n \"string\" == typeof name && \"function\" == typeof name.indexOf && 0 === name.indexOf(\"anonymous::\") && (name = name.replace(\"anonymous::\", key + \"::\"));\n if (window_ProxyWindow.isProxyWindow(destination)) {\n addMethod(id, val, name, destination, domain);\n destination.awaitWindow().then((function(win) {\n addMethod(id, val, name, win, domain);\n }));\n } else addMethod(id, val, name, destination, domain);\n return serializeType(\"cross_domain_function\", {\n id: id,\n name: name\n });\n }\n function serializeMessage(destination, domain, obj, _ref) {\n var _serialize;\n var on = _ref.on, send = _ref.send;\n return function(obj, serializers) {\n void 0 === serializers && (serializers = defaultSerializers);\n var result = JSON.stringify(obj, (function(key) {\n var val = this[key];\n if (isSerializedType(this)) return val;\n var type = determineType(val);\n if (!type) return val;\n var serializer = serializers[type] || SERIALIZER[type];\n return serializer ? serializer(val, key) : val;\n }));\n return void 0 === result ? \"undefined\" : result;\n }(obj, ((_serialize = {}).promise = function(val, key) {\n return function(destination, domain, val, key, _ref) {\n return serializeType(\"cross_domain_zalgo_promise\", {\n then: function_serializeFunction(destination, domain, (function(resolve, reject) {\n return val.then(resolve, reject);\n }), key, {\n on: _ref.on,\n send: _ref.send\n })\n });\n }(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.function = function(val, key) {\n return function_serializeFunction(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.object = function(val) {\n return isWindow(val) || window_ProxyWindow.isProxyWindow(val) ? serializeType(\"cross_domain_window\", window_ProxyWindow.serialize(val, {\n send: send\n })) : val;\n }, _serialize));\n }\n function deserializeMessage(source, origin, message, _ref2) {\n var _deserialize;\n var send = _ref2.send;\n return function(str, deserializers) {\n void 0 === deserializers && (deserializers = defaultDeserializers);\n if (\"undefined\" !== str) return JSON.parse(str, (function(key, val) {\n if (isSerializedType(this)) return val;\n var type;\n var value;\n if (isSerializedType(val)) {\n type = val.__type__;\n value = val.__val__;\n } else {\n type = determineType(val);\n value = val;\n }\n if (!type) return value;\n var deserializer = deserializers[type] || DESERIALIZER[type];\n return deserializer ? deserializer(value, key) : value;\n }));\n }(message, ((_deserialize = {}).cross_domain_zalgo_promise = function(serializedPromise) {\n return function(source, origin, _ref2) {\n return new promise_ZalgoPromise(_ref2.then);\n }(0, 0, serializedPromise);\n }, _deserialize.cross_domain_function = function(serializedFunction) {\n return function(source, origin, _ref4, _ref5) {\n var id = _ref4.id, name = _ref4.name;\n var send = _ref5.send;\n var getDeserializedFunction = function(opts) {\n void 0 === opts && (opts = {});\n function crossDomainFunctionWrapper() {\n var _arguments = arguments;\n return window_ProxyWindow.toProxyWindow(source, {\n send: send\n }).awaitWindow().then((function(win) {\n var meth = lookupMethod(win, id);\n if (meth && meth.val !== crossDomainFunctionWrapper) return meth.val.apply({\n source: window,\n origin: getDomain()\n }, _arguments);\n var _args = [].slice.call(_arguments);\n return opts.fireAndForget ? send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !0\n }) : send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !1\n }).then((function(res) {\n return res.data.result;\n }));\n })).catch((function(err) {\n throw err;\n }));\n }\n crossDomainFunctionWrapper.__name__ = name;\n crossDomainFunctionWrapper.__origin__ = origin;\n crossDomainFunctionWrapper.__source__ = source;\n crossDomainFunctionWrapper.__id__ = id;\n crossDomainFunctionWrapper.origin = origin;\n return crossDomainFunctionWrapper;\n };\n var crossDomainFunctionWrapper = getDeserializedFunction();\n crossDomainFunctionWrapper.fireAndForget = getDeserializedFunction({\n fireAndForget: !0\n });\n return crossDomainFunctionWrapper;\n }(source, origin, serializedFunction, {\n send: send\n });\n }, _deserialize.cross_domain_window = function(serializedWindow) {\n return window_ProxyWindow.deserialize(serializedWindow, {\n send: send\n });\n }, _deserialize));\n }\n var SEND_MESSAGE_STRATEGIES = {};\n SEND_MESSAGE_STRATEGIES.postrobot_post_message = function(win, serializedMessage, domain) {\n 0 === domain.indexOf(\"file:\") && (domain = \"*\");\n win.postMessage(serializedMessage, domain);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_global = function(win, serializedMessage) {\n if (!function(win) {\n return (win = win || window).navigator.mockUserAgent || win.navigator.userAgent;\n }(window).match(/MSIE|rv:11|trident|edge\\/12|edge\\/13/i)) throw new Error(\"Global messaging not needed for browser\");\n if (!isSameDomain(win)) throw new Error(\"Post message through global disabled between different domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use global to communicate between two different windows, not between frames\");\n var foreignGlobal = global_getGlobal(win);\n if (!foreignGlobal) throw new Error(\"Can not find postRobot global on foreign window\");\n foreignGlobal.receiveMessage({\n source: window,\n origin: getDomain(),\n data: serializedMessage\n });\n };\n function send_sendMessage(win, domain, message, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n return promise_ZalgoPromise.try((function() {\n var domainBuffer = windowStore().getOrSet(win, (function() {\n return {};\n }));\n domainBuffer.buffer = domainBuffer.buffer || [];\n domainBuffer.buffer.push(message);\n domainBuffer.flush = domainBuffer.flush || promise_ZalgoPromise.flush().then((function() {\n if (isWindowClosed(win)) throw new Error(\"Window is closed\");\n var serializedMessage = serializeMessage(win, domain, ((_ref = {}).__post_robot_10_0_44__ = domainBuffer.buffer || [], \n _ref), {\n on: on,\n send: send\n });\n var _ref;\n delete domainBuffer.buffer;\n var strategies = Object.keys(SEND_MESSAGE_STRATEGIES);\n var errors = [];\n for (var _i2 = 0; _i2 < strategies.length; _i2++) {\n var strategyName = strategies[_i2];\n try {\n SEND_MESSAGE_STRATEGIES[strategyName](win, serializedMessage, domain);\n } catch (err) {\n errors.push(err);\n }\n }\n if (errors.length === strategies.length) throw new Error(\"All post-robot messaging strategies failed:\\n\\n\" + errors.map((function(err, i) {\n return i + \". \" + stringifyError(err);\n })).join(\"\\n\\n\"));\n }));\n return domainBuffer.flush.then((function() {\n delete domainBuffer.flush;\n }));\n })).then(src_util_noop);\n }\n function getResponseListener(hash) {\n return globalStore(\"responseListeners\").get(hash);\n }\n function deleteResponseListener(hash) {\n globalStore(\"responseListeners\").del(hash);\n }\n function isResponseListenerErrored(hash) {\n return globalStore(\"erroredResponseListeners\").has(hash);\n }\n function getRequestListener(_ref) {\n var name = _ref.name, win = _ref.win, domain = _ref.domain;\n var requestListeners = windowStore(\"requestListeners\");\n \"*\" === win && (win = null);\n \"*\" === domain && (domain = null);\n if (!name) throw new Error(\"Name required to get request listener\");\n for (var _i4 = 0, _ref3 = [ win, getWildcard() ]; _i4 < _ref3.length; _i4++) {\n var winQualifier = _ref3[_i4];\n if (winQualifier) {\n var nameListeners = requestListeners.get(winQualifier);\n if (nameListeners) {\n var domainListeners = nameListeners[name];\n if (domainListeners) {\n if (domain && \"string\" == typeof domain) {\n if (domainListeners[domain]) return domainListeners[domain];\n if (domainListeners.__domain_regex__) for (var _i6 = 0, _domainListeners$__DO2 = domainListeners.__domain_regex__; _i6 < _domainListeners$__DO2.length; _i6++) {\n var _domainListeners$__DO3 = _domainListeners$__DO2[_i6], listener = _domainListeners$__DO3.listener;\n if (matchDomain(_domainListeners$__DO3.regex, domain)) return listener;\n }\n }\n if (domainListeners[\"*\"]) return domainListeners[\"*\"];\n }\n }\n }\n }\n }\n function handleRequest(source, origin, message, _ref) {\n var on = _ref.on, send = _ref.send;\n var options = getRequestListener({\n name: message.name,\n win: source,\n domain: origin\n });\n var logName = \"postrobot_method\" === message.name && message.data && \"string\" == typeof message.data.name ? message.data.name + \"()\" : message.name;\n function sendResponse(ack, data, error) {\n return promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_response\",\n hash: message.hash,\n name: message.name,\n ack: ack,\n data: data,\n error: error\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send response message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n }));\n }\n return promise_ZalgoPromise.all([ promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_ack\",\n hash: message.hash,\n name: message.name\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send ack message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n })), promise_ZalgoPromise.try((function() {\n if (!options) throw new Error(\"No handler found for post message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Request origin \" + origin + \" does not match domain \" + options.domain.toString());\n return options.handler({\n source: source,\n origin: origin,\n data: message.data\n });\n })).then((function(data) {\n return sendResponse(\"success\", data);\n }), (function(error) {\n return sendResponse(\"error\", null, error);\n })) ]).then(src_util_noop).catch((function(err) {\n if (options && options.handleError) return options.handleError(err);\n throw err;\n }));\n }\n function handleAck(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message ack for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n try {\n if (!matchDomain(options.domain, origin)) throw new Error(\"Ack origin \" + origin + \" does not match domain \" + options.domain.toString());\n if (source !== options.win) throw new Error(\"Ack source does not match registered window\");\n } catch (err) {\n options.promise.reject(err);\n }\n options.ack = !0;\n }\n }\n function handleResponse(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message response for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Response origin \" + origin + \" does not match domain \" + (pattern = options.domain, \n Array.isArray(pattern) ? \"(\" + pattern.join(\" | \") + \")\" : isRegex(pattern) ? \"RegExp(\" + pattern.toString() + \")\" : pattern.toString()));\n var pattern;\n if (source !== options.win) throw new Error(\"Response source does not match registered window\");\n deleteResponseListener(message.hash);\n \"error\" === message.ack ? options.promise.reject(message.error) : \"success\" === message.ack && options.promise.resolve({\n source: source,\n origin: origin,\n data: message.data\n });\n }\n }\n function receive_receiveMessage(event, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n var receivedMessages = globalStore(\"receivedMessages\");\n try {\n if (!window || window.closed || !event.source) return;\n } catch (err) {\n return;\n }\n var source = event.source, origin = event.origin;\n var messages = function(message, source, origin, _ref) {\n var on = _ref.on, send = _ref.send;\n var parsedMessage;\n try {\n parsedMessage = deserializeMessage(source, origin, message, {\n on: on,\n send: send\n });\n } catch (err) {\n return;\n }\n if (parsedMessage && \"object\" == typeof parsedMessage && null !== parsedMessage) {\n var parseMessages = parsedMessage.__post_robot_10_0_44__;\n if (Array.isArray(parseMessages)) return parseMessages;\n }\n }(event.data, source, origin, {\n on: on,\n send: send\n });\n if (messages) {\n markWindowKnown(source);\n for (var _i2 = 0; _i2 < messages.length; _i2++) {\n var message = messages[_i2];\n if (receivedMessages.has(message.id)) return;\n receivedMessages.set(message.id, !0);\n if (isWindowClosed(source) && !message.fireAndForget) return;\n 0 === message.origin.indexOf(\"file:\") && (origin = \"file://\");\n try {\n \"postrobot_message_request\" === message.type ? handleRequest(source, origin, message, {\n on: on,\n send: send\n }) : \"postrobot_message_response\" === message.type ? handleResponse(source, origin, message) : \"postrobot_message_ack\" === message.type && handleAck(source, origin, message);\n } catch (err) {\n setTimeout((function() {\n throw err;\n }), 0);\n }\n }\n }\n }\n function on_on(name, options, handler) {\n if (!name) throw new Error(\"Expected name\");\n if (\"function\" == typeof (options = options || {})) {\n handler = options;\n options = {};\n }\n if (!handler) throw new Error(\"Expected handler\");\n (options = options || {}).name = name;\n options.handler = handler || options.handler;\n var win = options.window;\n var domain = options.domain;\n var requestListener = function addRequestListener(_ref4, listener) {\n var name = _ref4.name, win = _ref4.win, domain = _ref4.domain;\n var requestListeners = windowStore(\"requestListeners\");\n if (!name || \"string\" != typeof name) throw new Error(\"Name required to add request listener\");\n if (Array.isArray(win)) {\n var listenersCollection = [];\n for (var _i8 = 0, _win2 = win; _i8 < _win2.length; _i8++) listenersCollection.push(addRequestListener({\n name: name,\n domain: domain,\n win: _win2[_i8]\n }, listener));\n return {\n cancel: function() {\n for (var _i10 = 0; _i10 < listenersCollection.length; _i10++) listenersCollection[_i10].cancel();\n }\n };\n }\n if (Array.isArray(domain)) {\n var _listenersCollection = [];\n for (var _i12 = 0, _domain2 = domain; _i12 < _domain2.length; _i12++) _listenersCollection.push(addRequestListener({\n name: name,\n win: win,\n domain: _domain2[_i12]\n }, listener));\n return {\n cancel: function() {\n for (var _i14 = 0; _i14 < _listenersCollection.length; _i14++) _listenersCollection[_i14].cancel();\n }\n };\n }\n var existingListener = getRequestListener({\n name: name,\n win: win,\n domain: domain\n });\n win && \"*\" !== win || (win = getWildcard());\n domain = domain || \"*\";\n if (existingListener) throw win && domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString() + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : win ? new Error(\"Request listener already exists for \" + name + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString()) : new Error(\"Request listener already exists for \" + name);\n var nameListeners = requestListeners.getOrSet(win, (function() {\n return {};\n }));\n var domainListeners = util_getOrSet(nameListeners, name, (function() {\n return {};\n }));\n var strDomain = domain.toString();\n var regexListeners;\n var regexListener;\n util_isRegex(domain) ? (regexListeners = util_getOrSet(domainListeners, \"__domain_regex__\", (function() {\n return [];\n }))).push(regexListener = {\n regex: domain,\n listener: listener\n }) : domainListeners[strDomain] = listener;\n return {\n cancel: function() {\n delete domainListeners[strDomain];\n if (regexListener) {\n regexListeners.splice(regexListeners.indexOf(regexListener, 1));\n regexListeners.length || delete domainListeners.__domain_regex__;\n }\n Object.keys(domainListeners).length || delete nameListeners[name];\n win && !Object.keys(nameListeners).length && requestListeners.del(win);\n }\n };\n }({\n name: name,\n win: win,\n domain: domain\n }, {\n handler: options.handler,\n handleError: options.errorHandler || function(err) {\n throw err;\n },\n window: win,\n domain: domain || \"*\",\n name: name\n });\n return {\n cancel: function() {\n requestListener.cancel();\n }\n };\n }\n var send_send = function send(win, name, data, options) {\n var domainMatcher = (options = options || {}).domain || \"*\";\n var responseTimeout = options.timeout || -1;\n var childTimeout = options.timeout || 5e3;\n var fireAndForget = options.fireAndForget || !1;\n return promise_ZalgoPromise.try((function() {\n !function(name, win, domain) {\n if (!name) throw new Error(\"Expected name\");\n if (domain && \"string\" != typeof domain && !Array.isArray(domain) && !util_isRegex(domain)) throw new TypeError(\"Can not send \" + name + \". Expected domain \" + JSON.stringify(domain) + \" to be a string, array, or regex\");\n if (isWindowClosed(win)) throw new Error(\"Can not send \" + name + \". Target window is closed\");\n }(name, win, domainMatcher);\n if (function(parent, child) {\n var actualParent = getAncestor(child);\n if (actualParent) return actualParent === parent;\n if (child === parent) return !1;\n if (getTop(child) === child) return !1;\n for (var _i15 = 0, _getFrames8 = getFrames(parent); _i15 < _getFrames8.length; _i15++) if (_getFrames8[_i15] === child) return !0;\n return !1;\n }(window, win)) return function(win, timeout, name) {\n void 0 === timeout && (timeout = 5e3);\n void 0 === name && (name = \"Window\");\n var promise = function(win) {\n return windowStore(\"helloPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }(win);\n -1 !== timeout && (promise = promise.timeout(timeout, new Error(name + \" did not load after \" + timeout + \"ms\")));\n return promise;\n }(win, childTimeout);\n })).then((function(_temp) {\n return function(win, targetDomain, actualDomain, _ref) {\n var send = _ref.send;\n return promise_ZalgoPromise.try((function() {\n return \"string\" == typeof targetDomain ? targetDomain : promise_ZalgoPromise.try((function() {\n return actualDomain || sayHello(win, {\n send: send\n }).then((function(_ref2) {\n return _ref2.domain;\n }));\n })).then((function(normalizedDomain) {\n if (!matchDomain(targetDomain, targetDomain)) throw new Error(\"Domain \" + stringify(targetDomain) + \" does not match \" + stringify(targetDomain));\n return normalizedDomain;\n }));\n }));\n }(win, domainMatcher, (void 0 === _temp ? {} : _temp).domain, {\n send: send\n });\n })).then((function(targetDomain) {\n var domain = targetDomain;\n var logName = \"postrobot_method\" === name && data && \"string\" == typeof data.name ? data.name + \"()\" : name;\n var promise = new promise_ZalgoPromise;\n var hash = name + \"_\" + uniqueID();\n if (!fireAndForget) {\n var responseListener = {\n name: name,\n win: win,\n domain: domain,\n promise: promise\n };\n !function(hash, listener) {\n globalStore(\"responseListeners\").set(hash, listener);\n }(hash, responseListener);\n var reqPromises = windowStore(\"requestPromises\").getOrSet(win, (function() {\n return [];\n }));\n reqPromises.push(promise);\n promise.catch((function() {\n !function(hash) {\n globalStore(\"erroredResponseListeners\").set(hash, !0);\n }(hash);\n deleteResponseListener(hash);\n }));\n var totalAckTimeout = function(win) {\n return windowStore(\"knownWindows\").get(win, !1);\n }(win) ? 1e4 : 2e3;\n var totalResTimeout = responseTimeout;\n var ackTimeout = totalAckTimeout;\n var resTimeout = totalResTimeout;\n var interval = safeInterval((function() {\n if (isWindowClosed(win)) return promise.reject(new Error(\"Window closed for \" + name + \" before \" + (responseListener.ack ? \"response\" : \"ack\")));\n if (responseListener.cancelled) return promise.reject(new Error(\"Response listener was cancelled for \" + name));\n ackTimeout = Math.max(ackTimeout - 500, 0);\n -1 !== resTimeout && (resTimeout = Math.max(resTimeout - 500, 0));\n return responseListener.ack || 0 !== ackTimeout ? 0 === resTimeout ? promise.reject(new Error(\"No response for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalResTimeout + \"ms\")) : void 0 : promise.reject(new Error(\"No ack for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalAckTimeout + \"ms\"));\n }), 500);\n promise.finally((function() {\n interval.cancel();\n reqPromises.splice(reqPromises.indexOf(promise, 1));\n })).catch(src_util_noop);\n }\n return send_sendMessage(win, domain, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_request\",\n hash: hash,\n name: name,\n data: data,\n fireAndForget: fireAndForget\n }, {\n on: on_on,\n send: send\n }).then((function() {\n return fireAndForget ? promise.resolve() : promise;\n }), (function(err) {\n throw new Error(\"Send request message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }));\n }));\n };\n function setup_toProxyWindow(win) {\n return window_ProxyWindow.toProxyWindow(win, {\n send: send_send\n });\n }\n function lib_global_getGlobal(win) {\n if (!isSameDomain(win)) throw new Error(\"Can not get global for window on different domain\");\n win.__zoid_9_0_86__ || (win.__zoid_9_0_86__ = {});\n return win.__zoid_9_0_86__;\n }\n function tryGlobal(win, handler) {\n try {\n return handler(lib_global_getGlobal(win));\n } catch (err) {}\n }\n function getProxyObject(obj) {\n return {\n get: function() {\n var _this = this;\n return promise_ZalgoPromise.try((function() {\n if (_this.source && _this.source !== window) throw new Error(\"Can not call get on proxy object from a remote window\");\n return obj;\n }));\n }\n };\n }\n function basicSerialize(data) {\n return base64encode(JSON.stringify(data));\n }\n function getUIDRefStore(win) {\n var global = lib_global_getGlobal(win);\n global.references = global.references || {};\n return global.references;\n }\n function crossDomainSerialize(_ref) {\n var data = _ref.data, metaData = _ref.metaData, sender = _ref.sender, receiver = _ref.receiver, _ref$passByReference = _ref.passByReference, passByReference = void 0 !== _ref$passByReference && _ref$passByReference, _ref$basic = _ref.basic, basic = void 0 !== _ref$basic && _ref$basic;\n var proxyWin = setup_toProxyWindow(receiver.win);\n var serializedMessage = basic ? JSON.stringify(data) : serializeMessage(proxyWin, receiver.domain, data, {\n on: on_on,\n send: send_send\n });\n var reference = passByReference ? function(val) {\n var uid = uniqueID();\n getUIDRefStore(window)[uid] = val;\n return {\n type: \"uid\",\n uid: uid\n };\n }(serializedMessage) : {\n type: \"raw\",\n val: serializedMessage\n };\n return {\n serializedData: basicSerialize({\n sender: {\n domain: sender.domain\n },\n metaData: metaData,\n reference: reference\n }),\n cleanReference: function() {\n win = window, \"uid\" === (ref = reference).type && delete getUIDRefStore(win)[ref.uid];\n var win, ref;\n }\n };\n }\n function crossDomainDeserialize(_ref2) {\n var sender = _ref2.sender, _ref2$basic = _ref2.basic, basic = void 0 !== _ref2$basic && _ref2$basic;\n var message = function(serializedData) {\n return JSON.parse(function(str) {\n if (\"function\" == typeof atob) return decodeURIComponent([].map.call(atob(str), (function(c) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })).join(\"\"));\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"base64\").toString(\"utf8\");\n throw new Error(\"Can not find window.atob or Buffer\");\n }(serializedData));\n }(_ref2.data);\n var reference = message.reference, metaData = message.metaData;\n var win;\n win = \"function\" == typeof sender.win ? sender.win({\n metaData: metaData\n }) : sender.win;\n var domain;\n domain = \"function\" == typeof sender.domain ? sender.domain({\n metaData: metaData\n }) : \"string\" == typeof sender.domain ? sender.domain : message.sender.domain;\n var serializedData = function(win, ref) {\n if (\"raw\" === ref.type) return ref.val;\n if (\"uid\" === ref.type) return getUIDRefStore(win)[ref.uid];\n throw new Error(\"Unsupported ref type: \" + ref.type);\n }(win, reference);\n return {\n data: basic ? JSON.parse(serializedData) : function(source, origin, message) {\n return deserializeMessage(source, origin, message, {\n on: on_on,\n send: send_send\n });\n }(win, domain, serializedData),\n metaData: metaData,\n sender: {\n win: win,\n domain: domain\n },\n reference: reference\n };\n }\n var PROP_TYPE = {\n STRING: \"string\",\n OBJECT: \"object\",\n FUNCTION: \"function\",\n BOOLEAN: \"boolean\",\n NUMBER: \"number\",\n ARRAY: \"array\"\n };\n var PROP_SERIALIZATION = {\n JSON: \"json\",\n DOTIFY: \"dotify\",\n BASE64: \"base64\"\n };\n var CONTEXT = WINDOW_TYPE;\n var EVENT = {\n RENDER: \"zoid-render\",\n RENDERED: \"zoid-rendered\",\n DISPLAY: \"zoid-display\",\n ERROR: \"zoid-error\",\n CLOSE: \"zoid-close\",\n DESTROY: \"zoid-destroy\",\n PROPS: \"zoid-props\",\n RESIZE: \"zoid-resize\",\n FOCUS: \"zoid-focus\"\n };\n function buildChildWindowName(_ref) {\n return \"__zoid__\" + _ref.name + \"__\" + _ref.serializedPayload + \"__\";\n }\n function parseWindowName(windowName) {\n if (!windowName) throw new Error(\"No window name\");\n var _windowName$split = windowName.split(\"__\"), zoidcomp = _windowName$split[1], name = _windowName$split[2], serializedInitialPayload = _windowName$split[3];\n if (\"zoid\" !== zoidcomp) throw new Error(\"Window not rendered by zoid - got \" + zoidcomp);\n if (!name) throw new Error(\"Expected component name\");\n if (!serializedInitialPayload) throw new Error(\"Expected serialized payload ref\");\n return {\n name: name,\n serializedInitialPayload: serializedInitialPayload\n };\n }\n var parseInitialParentPayload = memoize((function(windowName) {\n var _crossDomainDeseriali = crossDomainDeserialize({\n data: parseWindowName(windowName).serializedInitialPayload,\n sender: {\n win: function(_ref2) {\n return function(windowRef) {\n if (\"opener\" === windowRef.type) return assertExists(\"opener\", getOpener(window));\n if (\"parent\" === windowRef.type && \"number\" == typeof windowRef.distance) return assertExists(\"parent\", function(win, n) {\n void 0 === n && (n = 1);\n return function(win, n) {\n void 0 === n && (n = 1);\n var parent = win;\n for (var i = 0; i < n; i++) {\n if (!parent) return;\n parent = utils_getParent(parent);\n }\n return parent;\n }(win, getDistanceFromTop(win) - n);\n }(window, windowRef.distance));\n if (\"global\" === windowRef.type && windowRef.uid && \"string\" == typeof windowRef.uid) {\n var _ret = function() {\n var uid = windowRef.uid;\n var ancestor = getAncestor(window);\n if (!ancestor) throw new Error(\"Can not find ancestor window\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(ancestor); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var frame = _getAllFramesInWindow2[_i2];\n if (isSameDomain(frame)) {\n var win = tryGlobal(frame, (function(global) {\n return global.windows && global.windows[uid];\n }));\n if (win) return {\n v: win\n };\n }\n }\n }();\n if (\"object\" == typeof _ret) return _ret.v;\n } else if (\"name\" === windowRef.type) {\n var name = windowRef.name;\n return assertExists(\"namedWindow\", function(win, name) {\n return getFrameByName(win, name) || function findChildFrameByName(win, name) {\n var frame = getFrameByName(win, name);\n if (frame) return frame;\n for (var _i11 = 0, _getFrames4 = getFrames(win); _i11 < _getFrames4.length; _i11++) {\n var namedFrame = findChildFrameByName(_getFrames4[_i11], name);\n if (namedFrame) return namedFrame;\n }\n }(getTop(win) || win, name);\n }(assertExists(\"ancestor\", getAncestor(window)), name));\n }\n throw new Error(\"Unable to find \" + windowRef.type + \" parent component window\");\n }(_ref2.metaData.windowRef);\n }\n }\n });\n return {\n parent: _crossDomainDeseriali.sender,\n payload: _crossDomainDeseriali.data,\n reference: _crossDomainDeseriali.reference\n };\n }));\n function getInitialParentPayload() {\n return parseInitialParentPayload(window.name);\n }\n function window_getWindowRef(targetWindow, currentWindow) {\n void 0 === currentWindow && (currentWindow = window);\n if (targetWindow === utils_getParent(currentWindow)) return {\n type: \"parent\",\n distance: getDistanceFromTop(targetWindow)\n };\n if (targetWindow === getOpener(currentWindow)) return {\n type: \"opener\"\n };\n if (isSameDomain(targetWindow) && !(win = targetWindow, win === getTop(win))) {\n var windowName = assertSameDomain(targetWindow).name;\n if (windowName) return {\n type: \"name\",\n name: windowName\n };\n }\n var win;\n }\n function normalizeChildProp(propsDef, props, key, value, helpers) {\n if (!propsDef.hasOwnProperty(key)) return value;\n var prop = propsDef[key];\n return \"function\" == typeof prop.childDecorate ? prop.childDecorate({\n value: value,\n uid: helpers.uid,\n tag: helpers.tag,\n close: helpers.close,\n focus: helpers.focus,\n onError: helpers.onError,\n onProps: helpers.onProps,\n resize: helpers.resize,\n getParent: helpers.getParent,\n getParentDomain: helpers.getParentDomain,\n show: helpers.show,\n hide: helpers.hide,\n export: helpers.export,\n getSiblings: helpers.getSiblings\n }) : value;\n }\n function child_focus() {\n return promise_ZalgoPromise.try((function() {\n window.focus();\n }));\n }\n function child_destroy() {\n return promise_ZalgoPromise.try((function() {\n window.close();\n }));\n }\n var props_defaultNoop = function() {\n return src_util_noop;\n };\n var props_decorateOnce = function(_ref) {\n return once(_ref.value);\n };\n function eachProp(props, propsDef, handler) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(_extends({}, props, propsDef)); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n handler(key, propsDef[key], props[key]);\n }\n }\n function serializeProps(propsDef, props, method) {\n var params = {};\n return promise_ZalgoPromise.all(function(props, propsDef, handler) {\n var results = [];\n eachProp(props, propsDef, (function(key, propDef, value) {\n var result = function(key, propDef, value) {\n return promise_ZalgoPromise.resolve().then((function() {\n var _METHOD$GET$METHOD$PO, _METHOD$GET$METHOD$PO2;\n if (null != value && propDef) {\n var getParam = (_METHOD$GET$METHOD$PO = {}, _METHOD$GET$METHOD$PO.get = propDef.queryParam, \n _METHOD$GET$METHOD$PO.post = propDef.bodyParam, _METHOD$GET$METHOD$PO)[method];\n var getValue = (_METHOD$GET$METHOD$PO2 = {}, _METHOD$GET$METHOD$PO2.get = propDef.queryValue, \n _METHOD$GET$METHOD$PO2.post = propDef.bodyValue, _METHOD$GET$METHOD$PO2)[method];\n if (getParam) return promise_ZalgoPromise.hash({\n finalParam: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getParam ? getParam({\n value: value\n }) : \"string\" == typeof getParam ? getParam : key;\n })),\n finalValue: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getValue && isDefined(value) ? getValue({\n value: value\n }) : value;\n }))\n }).then((function(_ref) {\n var finalParam = _ref.finalParam, finalValue = _ref.finalValue;\n var result;\n if (\"boolean\" == typeof finalValue) result = finalValue.toString(); else if (\"string\" == typeof finalValue) result = finalValue.toString(); else if (\"object\" == typeof finalValue && null !== finalValue) {\n if (propDef.serialization === PROP_SERIALIZATION.JSON) result = JSON.stringify(finalValue); else if (propDef.serialization === PROP_SERIALIZATION.BASE64) result = base64encode(JSON.stringify(finalValue)); else if (propDef.serialization === PROP_SERIALIZATION.DOTIFY || !propDef.serialization) {\n result = function dotify(obj, prefix, newobj) {\n void 0 === prefix && (prefix = \"\");\n void 0 === newobj && (newobj = {});\n prefix = prefix ? prefix + \".\" : prefix;\n for (var key in obj) obj.hasOwnProperty(key) && null != obj[key] && \"function\" != typeof obj[key] && (obj[key] && Array.isArray(obj[key]) && obj[key].length && obj[key].every((function(val) {\n return \"object\" != typeof val;\n })) ? newobj[\"\" + prefix + key + \"[]\"] = obj[key].join(\",\") : obj[key] && \"object\" == typeof obj[key] ? newobj = dotify(obj[key], \"\" + prefix + key, newobj) : newobj[\"\" + prefix + key] = obj[key].toString());\n return newobj;\n }(finalValue, key);\n for (var _i2 = 0, _Object$keys2 = Object.keys(result); _i2 < _Object$keys2.length; _i2++) {\n var dotkey = _Object$keys2[_i2];\n params[dotkey] = result[dotkey];\n }\n return;\n }\n } else \"number\" == typeof finalValue && (result = finalValue.toString());\n params[finalParam] = result;\n }));\n }\n }));\n }(key, propDef, value);\n results.push(result);\n }));\n return results;\n }(props, propsDef)).then((function() {\n return params;\n }));\n }\n function parentComponent(_ref) {\n var uid = _ref.uid, options = _ref.options, _ref$overrides = _ref.overrides, overrides = void 0 === _ref$overrides ? {} : _ref$overrides, _ref$parentWin = _ref.parentWin, parentWin = void 0 === _ref$parentWin ? window : _ref$parentWin;\n var propsDef = options.propsDef, containerTemplate = options.containerTemplate, prerenderTemplate = options.prerenderTemplate, tag = options.tag, name = options.name, attributes = options.attributes, dimensions = options.dimensions, autoResize = options.autoResize, url = options.url, domainMatch = options.domain, xports = options.exports;\n var initPromise = new promise_ZalgoPromise;\n var handledErrors = [];\n var clean = cleanup();\n var state = {};\n var inputProps = {};\n var internalState = {\n visible: !0\n };\n var event = overrides.event ? overrides.event : (triggered = {}, handlers = {}, \n emitter = {\n on: function(eventName, handler) {\n var handlerList = handlers[eventName] = handlers[eventName] || [];\n handlerList.push(handler);\n var cancelled = !1;\n return {\n cancel: function() {\n if (!cancelled) {\n cancelled = !0;\n handlerList.splice(handlerList.indexOf(handler), 1);\n }\n }\n };\n },\n once: function(eventName, handler) {\n var listener = emitter.on(eventName, (function() {\n listener.cancel();\n handler();\n }));\n return listener;\n },\n trigger: function(eventName) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n var handlerList = handlers[eventName];\n var promises = [];\n if (handlerList) {\n var _loop = function(_i2) {\n var handler = handlerList[_i2];\n promises.push(promise_ZalgoPromise.try((function() {\n return handler.apply(void 0, args);\n })));\n };\n for (var _i2 = 0; _i2 < handlerList.length; _i2++) _loop(_i2);\n }\n return promise_ZalgoPromise.all(promises).then(src_util_noop);\n },\n triggerOnce: function(eventName) {\n if (triggered[eventName]) return promise_ZalgoPromise.resolve();\n triggered[eventName] = !0;\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) args[_key4 - 1] = arguments[_key4];\n return emitter.trigger.apply(emitter, [ eventName ].concat(args));\n },\n reset: function() {\n handlers = {};\n }\n });\n var triggered, handlers, emitter;\n var props = overrides.props ? overrides.props : {};\n var currentProxyWin;\n var currentProxyContainer;\n var childComponent;\n var currentChildDomain;\n var currentContainer;\n var onErrorOverride = overrides.onError;\n var getProxyContainerOverride = overrides.getProxyContainer;\n var showOverride = overrides.show;\n var hideOverride = overrides.hide;\n var closeOverride = overrides.close;\n var renderContainerOverride = overrides.renderContainer;\n var getProxyWindowOverride = overrides.getProxyWindow;\n var setProxyWinOverride = overrides.setProxyWin;\n var openFrameOverride = overrides.openFrame;\n var openPrerenderFrameOverride = overrides.openPrerenderFrame;\n var prerenderOverride = overrides.prerender;\n var openOverride = overrides.open;\n var openPrerenderOverride = overrides.openPrerender;\n var watchForUnloadOverride = overrides.watchForUnload;\n var getInternalStateOverride = overrides.getInternalState;\n var setInternalStateOverride = overrides.setInternalState;\n var resolveInitPromise = function() {\n return promise_ZalgoPromise.try((function() {\n return overrides.resolveInitPromise ? overrides.resolveInitPromise() : initPromise.resolve();\n }));\n };\n var rejectInitPromise = function(err) {\n return promise_ZalgoPromise.try((function() {\n return overrides.rejectInitPromise ? overrides.rejectInitPromise(err) : initPromise.reject(err);\n }));\n };\n var getPropsForChild = function(initialChildDomain) {\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n prop && !1 === prop.sendToChild || prop && prop.sameDomain && !matchDomain(initialChildDomain, getDomain(window)) || (result[key] = props[key]);\n }\n return promise_ZalgoPromise.hash(result);\n };\n var getInternalState = function() {\n return promise_ZalgoPromise.try((function() {\n return getInternalStateOverride ? getInternalStateOverride() : internalState;\n }));\n };\n var setInternalState = function(newInternalState) {\n return promise_ZalgoPromise.try((function() {\n return setInternalStateOverride ? setInternalStateOverride(newInternalState) : internalState = _extends({}, internalState, newInternalState);\n }));\n };\n var getProxyWindow = function() {\n return getProxyWindowOverride ? getProxyWindowOverride() : promise_ZalgoPromise.try((function() {\n var windowProp = props.window;\n if (windowProp) {\n var _proxyWin = setup_toProxyWindow(windowProp);\n clean.register((function() {\n return windowProp.close();\n }));\n return _proxyWin;\n }\n return new window_ProxyWindow({\n send: send_send\n });\n }));\n };\n var setProxyWin = function(proxyWin) {\n return setProxyWinOverride ? setProxyWinOverride(proxyWin) : promise_ZalgoPromise.try((function() {\n currentProxyWin = proxyWin;\n }));\n };\n var show = function() {\n return showOverride ? showOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !0\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(showElement) : null\n }).then(src_util_noop);\n };\n var hide = function() {\n return hideOverride ? hideOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !1\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(hideElement) : null\n }).then(src_util_noop);\n };\n var getUrl = function() {\n return \"function\" == typeof url ? url({\n props: props\n }) : url;\n };\n var getAttributes = function() {\n return \"function\" == typeof attributes ? attributes({\n props: props\n }) : attributes;\n };\n var getInitialChildDomain = function() {\n return getDomainFromUrl(getUrl());\n };\n var openFrame = function(context, _ref2) {\n var windowName = _ref2.windowName;\n return openFrameOverride ? openFrameOverride(context, {\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: windowName,\n title: name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerenderFrame = function(context) {\n return openPrerenderFrameOverride ? openPrerenderFrameOverride(context) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: \"__zoid_prerender_frame__\" + name + \"_\" + uniqueID() + \"__\",\n title: \"prerender__\" + name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerender = function(context, proxyWin, proxyPrerenderFrame) {\n return openPrerenderOverride ? openPrerenderOverride(context, proxyWin, proxyPrerenderFrame) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyPrerenderFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyPrerenderFrame.get().then((function(prerenderFrame) {\n clean.register((function() {\n return destroyElement(prerenderFrame);\n }));\n return awaitFrameWindow(prerenderFrame).then((function(prerenderFrameWindow) {\n return assertSameDomain(prerenderFrameWindow);\n })).then((function(win) {\n return setup_toProxyWindow(win);\n }));\n }));\n }\n throw new Error(\"No render context available for \" + context);\n }));\n };\n var focus = function() {\n return promise_ZalgoPromise.try((function() {\n if (currentProxyWin) return promise_ZalgoPromise.all([ event.trigger(EVENT.FOCUS), currentProxyWin.focus() ]).then(src_util_noop);\n }));\n };\n var getCurrentWindowReferenceUID = function() {\n var global = lib_global_getGlobal(window);\n global.windows = global.windows || {};\n global.windows[uid] = window;\n clean.register((function() {\n delete global.windows[uid];\n }));\n return uid;\n };\n var getWindowRef = function(target, initialChildDomain, context, proxyWin) {\n if (initialChildDomain === getDomain(window)) return {\n type: \"global\",\n uid: getCurrentWindowReferenceUID()\n };\n if (target !== window) throw new Error(\"Can not construct cross-domain window reference for different target window\");\n if (props.window) {\n var actualComponentWindow = proxyWin.getWindow();\n if (!actualComponentWindow) throw new Error(\"Can not construct cross-domain window reference for lazy window prop\");\n if (getAncestor(actualComponentWindow) !== window) throw new Error(\"Can not construct cross-domain window reference for window prop with different ancestor\");\n }\n if (context === CONTEXT.POPUP) return {\n type: \"opener\"\n };\n if (context === CONTEXT.IFRAME) return {\n type: \"parent\",\n distance: getDistanceFromTop(window)\n };\n throw new Error(\"Can not construct window reference for child\");\n };\n var initChild = function(childDomain, childExports) {\n return promise_ZalgoPromise.try((function() {\n currentChildDomain = childDomain;\n childComponent = childExports;\n resolveInitPromise();\n clean.register((function() {\n return childExports.close.fireAndForget().catch(src_util_noop);\n }));\n }));\n };\n var resize = function(_ref3) {\n var width = _ref3.width, height = _ref3.height;\n return promise_ZalgoPromise.try((function() {\n event.trigger(EVENT.RESIZE, {\n width: width,\n height: height\n });\n }));\n };\n var destroy = function(err) {\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.DESTROY);\n })).catch(src_util_noop).then((function() {\n return clean.all(err);\n })).then((function() {\n initPromise.asyncReject(err || new Error(\"Component destroyed\"));\n }));\n };\n var close = memoize((function(err) {\n return promise_ZalgoPromise.try((function() {\n if (closeOverride) {\n if (isWindowClosed(closeOverride.__source__)) return;\n return closeOverride();\n }\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.CLOSE);\n })).then((function() {\n return destroy(err || new Error(\"Component closed\"));\n }));\n }));\n }));\n var open = function(context, _ref4) {\n var proxyWin = _ref4.proxyWin, proxyFrame = _ref4.proxyFrame, windowName = _ref4.windowName;\n return openOverride ? openOverride(context, {\n proxyWin: proxyWin,\n proxyFrame: proxyFrame,\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyFrame.get().then((function(frame) {\n return awaitFrameWindow(frame).then((function(win) {\n clean.register((function() {\n return destroyElement(frame);\n }));\n clean.register((function() {\n return function(win) {\n for (var _i2 = 0, _requestPromises$get2 = windowStore(\"requestPromises\").get(win, []); _i2 < _requestPromises$get2.length; _i2++) _requestPromises$get2[_i2].reject(new Error(\"Window \" + (isWindowClosed(win) ? \"closed\" : \"cleaned up\") + \" before response\")).catch(src_util_noop);\n }(win);\n }));\n return win;\n }));\n }));\n }\n throw new Error(\"No render context available for \" + context);\n })).then((function(win) {\n proxyWin.setWindow(win, {\n send: send_send\n });\n return proxyWin.setName(windowName).then((function() {\n return proxyWin;\n }));\n }));\n };\n var watchForUnload = function() {\n return promise_ZalgoPromise.try((function() {\n var unloadWindowListener = addEventListener(window, \"unload\", once((function() {\n destroy(new Error(\"Window navigated away\"));\n })));\n var closeParentWindowListener = onCloseWindow(parentWin, destroy, 3e3);\n clean.register(closeParentWindowListener.cancel);\n clean.register(unloadWindowListener.cancel);\n if (watchForUnloadOverride) return watchForUnloadOverride();\n }));\n };\n var checkWindowClose = function(proxyWin) {\n var closed = !1;\n return proxyWin.isClosed().then((function(isClosed) {\n if (isClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n return promise_ZalgoPromise.delay(200).then((function() {\n return proxyWin.isClosed();\n })).then((function(secondIsClosed) {\n if (secondIsClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n }));\n })).then((function() {\n return closed;\n }));\n };\n var onError = function(err) {\n return onErrorOverride ? onErrorOverride(err) : promise_ZalgoPromise.try((function() {\n if (-1 === handledErrors.indexOf(err)) {\n handledErrors.push(err);\n initPromise.asyncReject(err);\n return event.trigger(EVENT.ERROR, err);\n }\n }));\n };\n var exportsPromise = new promise_ZalgoPromise;\n var xport = function(actualExports) {\n return promise_ZalgoPromise.try((function() {\n exportsPromise.resolve(actualExports);\n }));\n };\n initChild.onError = onError;\n var renderTemplate = function(renderer, _ref8) {\n return renderer({\n uid: uid,\n container: _ref8.container,\n context: _ref8.context,\n doc: _ref8.doc,\n frame: _ref8.frame,\n prerenderFrame: _ref8.prerenderFrame,\n focus: focus,\n close: close,\n state: state,\n props: props,\n tag: tag,\n dimensions: \"function\" == typeof dimensions ? dimensions({\n props: props\n }) : dimensions,\n event: event\n });\n };\n var prerender = function(proxyPrerenderWin, _ref9) {\n var context = _ref9.context;\n return prerenderOverride ? prerenderOverride(proxyPrerenderWin, {\n context: context\n }) : promise_ZalgoPromise.try((function() {\n if (prerenderTemplate) {\n var prerenderWindow = proxyPrerenderWin.getWindow();\n if (prerenderWindow && isSameDomain(prerenderWindow) && function(win) {\n try {\n if (!win.location.href) return !0;\n if (\"about:blank\" === win.location.href) return !0;\n } catch (err) {}\n return !1;\n }(prerenderWindow)) {\n var doc = (prerenderWindow = assertSameDomain(prerenderWindow)).document;\n var el = renderTemplate(prerenderTemplate, {\n context: context,\n doc: doc\n });\n if (el) {\n if (el.ownerDocument !== doc) throw new Error(\"Expected prerender template to have been created with document from child window\");\n !function(win, el) {\n var tag = el.tagName.toLowerCase();\n if (\"html\" !== tag) throw new Error(\"Expected element to be html, got \" + tag);\n var documentElement = win.document.documentElement;\n for (var _i6 = 0, _arrayFrom2 = arrayFrom(documentElement.children); _i6 < _arrayFrom2.length; _i6++) documentElement.removeChild(_arrayFrom2[_i6]);\n for (var _i8 = 0, _arrayFrom4 = arrayFrom(el.children); _i8 < _arrayFrom4.length; _i8++) documentElement.appendChild(_arrayFrom4[_i8]);\n }(prerenderWindow, el);\n var _autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, _autoResize$element = autoResize.element, element = void 0 === _autoResize$element ? \"body\" : _autoResize$element;\n if ((element = getElementSafe(element, doc)) && (width || height)) {\n var prerenderResizeListener = onResize(element, (function(_ref10) {\n resize({\n width: width ? _ref10.width : void 0,\n height: height ? _ref10.height : void 0\n });\n }), {\n width: width,\n height: height,\n win: prerenderWindow\n });\n event.on(EVENT.RENDERED, prerenderResizeListener.cancel);\n }\n }\n }\n }\n }));\n };\n var renderContainer = function(proxyContainer, _ref11) {\n var proxyFrame = _ref11.proxyFrame, proxyPrerenderFrame = _ref11.proxyPrerenderFrame, context = _ref11.context, rerender = _ref11.rerender;\n return renderContainerOverride ? renderContainerOverride(proxyContainer, {\n proxyFrame: proxyFrame,\n proxyPrerenderFrame: proxyPrerenderFrame,\n context: context,\n rerender: rerender\n }) : promise_ZalgoPromise.hash({\n container: proxyContainer.get(),\n frame: proxyFrame ? proxyFrame.get() : null,\n prerenderFrame: proxyPrerenderFrame ? proxyPrerenderFrame.get() : null,\n internalState: getInternalState()\n }).then((function(_ref12) {\n var container = _ref12.container, visible = _ref12.internalState.visible;\n var innerContainer = renderTemplate(containerTemplate, {\n context: context,\n container: container,\n frame: _ref12.frame,\n prerenderFrame: _ref12.prerenderFrame,\n doc: document\n });\n if (innerContainer) {\n visible || hideElement(innerContainer);\n appendChild(container, innerContainer);\n var containerWatcher = function(element, handler) {\n handler = once(handler);\n var cancelled = !1;\n var mutationObservers = [];\n var interval;\n var sacrificialFrame;\n var sacrificialFrameWin;\n var cancel = function() {\n cancelled = !0;\n for (var _i18 = 0; _i18 < mutationObservers.length; _i18++) mutationObservers[_i18].disconnect();\n interval && interval.cancel();\n sacrificialFrameWin && sacrificialFrameWin.removeEventListener(\"unload\", elementClosed);\n sacrificialFrame && destroyElement(sacrificialFrame);\n };\n var elementClosed = function() {\n if (!cancelled) {\n handler();\n cancel();\n }\n };\n if (isElementClosed(element)) {\n elementClosed();\n return {\n cancel: cancel\n };\n }\n if (window.MutationObserver) {\n var mutationElement = element.parentElement;\n for (;mutationElement; ) {\n var mutationObserver = new window.MutationObserver((function() {\n isElementClosed(element) && elementClosed();\n }));\n mutationObserver.observe(mutationElement, {\n childList: !0\n });\n mutationObservers.push(mutationObserver);\n mutationElement = mutationElement.parentElement;\n }\n }\n (sacrificialFrame = document.createElement(\"iframe\")).setAttribute(\"name\", \"__detect_close_\" + uniqueID() + \"__\");\n sacrificialFrame.style.display = \"none\";\n awaitFrameWindow(sacrificialFrame).then((function(frameWin) {\n (sacrificialFrameWin = assertSameDomain(frameWin)).addEventListener(\"unload\", elementClosed);\n }));\n element.appendChild(sacrificialFrame);\n interval = safeInterval((function() {\n isElementClosed(element) && elementClosed();\n }), 1e3);\n return {\n cancel: cancel\n };\n }(innerContainer, (function() {\n var removeError = new Error(\"Detected container element removed from DOM\");\n return promise_ZalgoPromise.delay(1).then((function() {\n if (!isElementClosed(innerContainer)) {\n clean.all(removeError);\n return rerender().then(resolveInitPromise, rejectInitPromise);\n }\n close(removeError);\n }));\n }));\n clean.register((function() {\n return containerWatcher.cancel();\n }));\n clean.register((function() {\n return destroyElement(innerContainer);\n }));\n return currentProxyContainer = getProxyObject(innerContainer);\n }\n }));\n };\n var getHelpers = function() {\n return {\n state: state,\n event: event,\n close: close,\n focus: focus,\n resize: resize,\n onError: onError,\n updateProps: updateProps,\n show: show,\n hide: hide\n };\n };\n var setProps = function(newInputProps) {\n void 0 === newInputProps && (newInputProps = {});\n var container = currentContainer;\n var helpers = getHelpers();\n extend(inputProps, newInputProps);\n !function(propsDef, existingProps, inputProps, helpers, container) {\n var state = helpers.state, close = helpers.close, focus = helpers.focus, event = helpers.event, onError = helpers.onError;\n eachProp(inputProps, propsDef, (function(key, propDef, val) {\n var valueDetermined = !1;\n var value = val;\n Object.defineProperty(existingProps, key, {\n configurable: !0,\n enumerable: !0,\n get: function() {\n if (valueDetermined) return value;\n valueDetermined = !0;\n return function() {\n if (!propDef) return value;\n var alias = propDef.alias;\n alias && !isDefined(val) && isDefined(inputProps[alias]) && (value = inputProps[alias]);\n propDef.value && (value = propDef.value({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n !propDef.default || isDefined(value) || isDefined(inputProps[key]) || (value = propDef.default({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n if (isDefined(value)) {\n if (propDef.type === PROP_TYPE.ARRAY ? !Array.isArray(value) : typeof value !== propDef.type) throw new TypeError(\"Prop is not of type \" + propDef.type + \": \" + key);\n } else if (!1 !== propDef.required && !isDefined(inputProps[key])) throw new Error('Expected prop \"' + key + '\" to be defined');\n isDefined(value) && propDef.decorate && (value = propDef.decorate({\n value: value,\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n return value;\n }();\n }\n });\n }));\n eachProp(existingProps, propsDef, src_util_noop);\n }(propsDef, props, inputProps, helpers, container);\n };\n var updateProps = function(newProps) {\n setProps(newProps);\n return initPromise.then((function() {\n var child = childComponent;\n var proxyWin = currentProxyWin;\n if (child && proxyWin && currentChildDomain) return getPropsForChild(currentChildDomain).then((function(childProps) {\n return child.updateProps(childProps).catch((function(err) {\n return checkWindowClose(proxyWin).then((function(closed) {\n if (!closed) throw err;\n }));\n }));\n }));\n }));\n };\n var getProxyContainer = function(container) {\n return getProxyContainerOverride ? getProxyContainerOverride(container) : promise_ZalgoPromise.try((function() {\n return elementReady(container);\n })).then((function(containerElement) {\n isShadowElement(containerElement) && (containerElement = function insertShadowSlot(element) {\n var shadowHost = function(element) {\n var shadowRoot = function(element) {\n for (;element.parentNode; ) element = element.parentNode;\n if (isShadowElement(element)) return element;\n }(element);\n if (shadowRoot && shadowRoot.host) return shadowRoot.host;\n }(element);\n if (!shadowHost) throw new Error(\"Element is not in shadow dom\");\n var slotName = \"shadow-slot-\" + uniqueID();\n var slot = document.createElement(\"slot\");\n slot.setAttribute(\"name\", slotName);\n element.appendChild(slot);\n var slotProvider = document.createElement(\"div\");\n slotProvider.setAttribute(\"slot\", slotName);\n shadowHost.appendChild(slotProvider);\n return isShadowElement(shadowHost) ? insertShadowSlot(slotProvider) : slotProvider;\n }(containerElement));\n currentContainer = containerElement;\n return getProxyObject(containerElement);\n }));\n };\n return {\n init: function() {\n !function() {\n event.on(EVENT.RENDER, (function() {\n return props.onRender();\n }));\n event.on(EVENT.DISPLAY, (function() {\n return props.onDisplay();\n }));\n event.on(EVENT.RENDERED, (function() {\n return props.onRendered();\n }));\n event.on(EVENT.CLOSE, (function() {\n return props.onClose();\n }));\n event.on(EVENT.DESTROY, (function() {\n return props.onDestroy();\n }));\n event.on(EVENT.RESIZE, (function() {\n return props.onResize();\n }));\n event.on(EVENT.FOCUS, (function() {\n return props.onFocus();\n }));\n event.on(EVENT.PROPS, (function(newProps) {\n return props.onProps(newProps);\n }));\n event.on(EVENT.ERROR, (function(err) {\n return props && props.onError ? props.onError(err) : rejectInitPromise(err).then((function() {\n setTimeout((function() {\n throw err;\n }), 1);\n }));\n }));\n clean.register(event.reset);\n }();\n },\n render: function(_ref14) {\n var target = _ref14.target, container = _ref14.container, context = _ref14.context, rerender = _ref14.rerender;\n return promise_ZalgoPromise.try((function() {\n var initialChildDomain = getInitialChildDomain();\n var childDomainMatch = domainMatch || getInitialChildDomain();\n !function(target, childDomainMatch, container) {\n if (target !== window) {\n if (!isSameTopWindow(window, target)) throw new Error(\"Can only renderTo an adjacent frame\");\n var origin = getDomain();\n if (!matchDomain(childDomainMatch, origin) && !isSameDomain(target)) throw new Error(\"Can not render remotely to \" + childDomainMatch.toString() + \" - can only render to \" + origin);\n if (container && \"string\" != typeof container) throw new Error(\"Container passed to renderTo must be a string selector, got \" + typeof container + \" }\");\n }\n }(target, childDomainMatch, container);\n var delegatePromise = promise_ZalgoPromise.try((function() {\n if (target !== window) return function(context, target) {\n var delegateProps = {};\n for (var _i4 = 0, _Object$keys4 = Object.keys(props); _i4 < _Object$keys4.length; _i4++) {\n var propName = _Object$keys4[_i4];\n var propDef = propsDef[propName];\n propDef && propDef.allowDelegate && (delegateProps[propName] = props[propName]);\n }\n var childOverridesPromise = send_send(target, \"zoid_delegate_\" + name, {\n uid: uid,\n overrides: {\n props: delegateProps,\n event: event,\n close: close,\n onError: onError,\n getInternalState: getInternalState,\n setInternalState: setInternalState,\n resolveInitPromise: resolveInitPromise,\n rejectInitPromise: rejectInitPromise\n }\n }).then((function(_ref13) {\n var parentComp = _ref13.data.parent;\n clean.register((function(err) {\n if (!isWindowClosed(target)) return parentComp.destroy(err);\n }));\n return parentComp.getDelegateOverrides();\n })).catch((function(err) {\n throw new Error(\"Unable to delegate rendering. Possibly the component is not loaded in the target window.\\n\\n\" + stringifyError(err));\n }));\n getProxyContainerOverride = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyContainer.apply(childOverrides, args);\n }));\n };\n renderContainerOverride = function() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.renderContainer.apply(childOverrides, args);\n }));\n };\n showOverride = function() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.show.apply(childOverrides, args);\n }));\n };\n hideOverride = function() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.hide.apply(childOverrides, args);\n }));\n };\n watchForUnloadOverride = function() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) args[_key5] = arguments[_key5];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.watchForUnload.apply(childOverrides, args);\n }));\n };\n if (context === CONTEXT.IFRAME) {\n getProxyWindowOverride = function() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) args[_key6] = arguments[_key6];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyWindow.apply(childOverrides, args);\n }));\n };\n openFrameOverride = function() {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) args[_key7] = arguments[_key7];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openFrame.apply(childOverrides, args);\n }));\n };\n openPrerenderFrameOverride = function() {\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) args[_key8] = arguments[_key8];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerenderFrame.apply(childOverrides, args);\n }));\n };\n prerenderOverride = function() {\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) args[_key9] = arguments[_key9];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.prerender.apply(childOverrides, args);\n }));\n };\n openOverride = function() {\n for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) args[_key10] = arguments[_key10];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.open.apply(childOverrides, args);\n }));\n };\n openPrerenderOverride = function() {\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) args[_key11] = arguments[_key11];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerender.apply(childOverrides, args);\n }));\n };\n }\n return childOverridesPromise;\n }(context, target);\n }));\n var windowProp = props.window;\n var watchForUnloadPromise = watchForUnload();\n var buildBodyPromise = serializeProps(propsDef, props, \"post\");\n var onRenderPromise = event.trigger(EVENT.RENDER);\n var getProxyContainerPromise = getProxyContainer(container);\n var getProxyWindowPromise = getProxyWindow();\n var finalSetPropsPromise = getProxyContainerPromise.then((function() {\n return setProps();\n }));\n var buildUrlPromise = finalSetPropsPromise.then((function() {\n return serializeProps(propsDef, props, \"get\").then((function(query) {\n return function(url, options) {\n var query = options.query || {};\n var hash = options.hash || {};\n var originalUrl;\n var originalHash;\n var _url$split = url.split(\"#\");\n originalHash = _url$split[1];\n var _originalUrl$split = (originalUrl = _url$split[0]).split(\"?\");\n originalUrl = _originalUrl$split[0];\n var queryString = extendQuery(_originalUrl$split[1], query);\n var hashString = extendQuery(originalHash, hash);\n queryString && (originalUrl = originalUrl + \"?\" + queryString);\n hashString && (originalUrl = originalUrl + \"#\" + hashString);\n return originalUrl;\n }(function(url) {\n if (!(domain = getDomainFromUrl(url), 0 === domain.indexOf(\"mock:\"))) return url;\n var domain;\n throw new Error(\"Mock urls not supported out of test mode\");\n }(getUrl()), {\n query: query\n });\n }));\n }));\n var buildWindowNamePromise = getProxyWindowPromise.then((function(proxyWin) {\n return function(_temp2) {\n var _ref6 = void 0 === _temp2 ? {} : _temp2, proxyWin = _ref6.proxyWin, initialChildDomain = _ref6.initialChildDomain, childDomainMatch = _ref6.childDomainMatch, _ref6$target = _ref6.target, target = void 0 === _ref6$target ? window : _ref6$target, context = _ref6.context;\n return function(_temp) {\n var _ref5 = void 0 === _temp ? {} : _temp, proxyWin = _ref5.proxyWin, childDomainMatch = _ref5.childDomainMatch, context = _ref5.context;\n return getPropsForChild(_ref5.initialChildDomain).then((function(childProps) {\n return {\n uid: uid,\n context: context,\n tag: tag,\n childDomainMatch: childDomainMatch,\n version: \"9_0_86\",\n props: childProps,\n exports: (win = proxyWin, {\n init: function(childExports) {\n return initChild(this.origin, childExports);\n },\n close: close,\n checkClose: function() {\n return checkWindowClose(win);\n },\n resize: resize,\n onError: onError,\n show: show,\n hide: hide,\n export: xport\n })\n };\n var win;\n }));\n }({\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n context: context\n }).then((function(childPayload) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: childPayload,\n metaData: {\n windowRef: getWindowRef(target, initialChildDomain, context, proxyWin)\n },\n sender: {\n domain: getDomain(window)\n },\n receiver: {\n win: proxyWin,\n domain: childDomainMatch\n },\n passByReference: initialChildDomain === getDomain()\n }), serializedData = _crossDomainSerialize.serializedData;\n clean.register(_crossDomainSerialize.cleanReference);\n return serializedData;\n }));\n }({\n proxyWin: (_ref7 = {\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n target: target,\n context: context\n }).proxyWin,\n initialChildDomain: _ref7.initialChildDomain,\n childDomainMatch: _ref7.childDomainMatch,\n target: _ref7.target,\n context: _ref7.context\n }).then((function(serializedPayload) {\n return buildChildWindowName({\n name: name,\n serializedPayload: serializedPayload\n });\n }));\n var _ref7;\n }));\n var openFramePromise = buildWindowNamePromise.then((function(windowName) {\n return openFrame(context, {\n windowName: windowName\n });\n }));\n var openPrerenderFramePromise = openPrerenderFrame(context);\n var renderContainerPromise = promise_ZalgoPromise.hash({\n proxyContainer: getProxyContainerPromise,\n proxyFrame: openFramePromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref15) {\n return renderContainer(_ref15.proxyContainer, {\n context: context,\n proxyFrame: _ref15.proxyFrame,\n proxyPrerenderFrame: _ref15.proxyPrerenderFrame,\n rerender: rerender\n });\n })).then((function(proxyContainer) {\n return proxyContainer;\n }));\n var openPromise = promise_ZalgoPromise.hash({\n windowName: buildWindowNamePromise,\n proxyFrame: openFramePromise,\n proxyWin: getProxyWindowPromise\n }).then((function(_ref16) {\n var proxyWin = _ref16.proxyWin;\n return windowProp ? proxyWin : open(context, {\n windowName: _ref16.windowName,\n proxyWin: proxyWin,\n proxyFrame: _ref16.proxyFrame\n });\n }));\n var openPrerenderPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref17) {\n return openPrerender(context, _ref17.proxyWin, _ref17.proxyPrerenderFrame);\n }));\n var setStatePromise = openPromise.then((function(proxyWin) {\n currentProxyWin = proxyWin;\n return setProxyWin(proxyWin);\n }));\n var prerenderPromise = promise_ZalgoPromise.hash({\n proxyPrerenderWin: openPrerenderPromise,\n state: setStatePromise\n }).then((function(_ref18) {\n return prerender(_ref18.proxyPrerenderWin, {\n context: context\n });\n }));\n var setWindowNamePromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowName: buildWindowNamePromise\n }).then((function(_ref19) {\n if (windowProp) return _ref19.proxyWin.setName(_ref19.windowName);\n }));\n var getMethodPromise = promise_ZalgoPromise.hash({\n body: buildBodyPromise\n }).then((function(_ref20) {\n return options.method ? options.method : Object.keys(_ref20.body).length ? \"post\" : \"get\";\n }));\n var loadUrlPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowUrl: buildUrlPromise,\n body: buildBodyPromise,\n method: getMethodPromise,\n windowName: setWindowNamePromise,\n prerender: prerenderPromise\n }).then((function(_ref21) {\n return _ref21.proxyWin.setLocation(_ref21.windowUrl, {\n method: _ref21.method,\n body: _ref21.body\n });\n }));\n var watchForClosePromise = openPromise.then((function(proxyWin) {\n !function watchForClose(proxyWin, context) {\n var cancelled = !1;\n clean.register((function() {\n cancelled = !0;\n }));\n return promise_ZalgoPromise.delay(2e3).then((function() {\n return proxyWin.isClosed();\n })).then((function(isClosed) {\n if (!cancelled) return isClosed ? close(new Error(\"Detected \" + context + \" close\")) : watchForClose(proxyWin, context);\n }));\n }(proxyWin, context);\n }));\n var onDisplayPromise = promise_ZalgoPromise.hash({\n container: renderContainerPromise,\n prerender: prerenderPromise\n }).then((function() {\n return event.trigger(EVENT.DISPLAY);\n }));\n var openBridgePromise = openPromise.then((function(proxyWin) {}));\n var runTimeoutPromise = loadUrlPromise.then((function() {\n return promise_ZalgoPromise.try((function() {\n var timeout = props.timeout;\n if (timeout) return initPromise.timeout(timeout, new Error(\"Loading component timed out after \" + timeout + \" milliseconds\"));\n }));\n }));\n var onRenderedPromise = initPromise.then((function() {\n return event.trigger(EVENT.RENDERED);\n }));\n return promise_ZalgoPromise.hash({\n initPromise: initPromise,\n buildUrlPromise: buildUrlPromise,\n onRenderPromise: onRenderPromise,\n getProxyContainerPromise: getProxyContainerPromise,\n openFramePromise: openFramePromise,\n openPrerenderFramePromise: openPrerenderFramePromise,\n renderContainerPromise: renderContainerPromise,\n openPromise: openPromise,\n openPrerenderPromise: openPrerenderPromise,\n setStatePromise: setStatePromise,\n prerenderPromise: prerenderPromise,\n loadUrlPromise: loadUrlPromise,\n buildWindowNamePromise: buildWindowNamePromise,\n setWindowNamePromise: setWindowNamePromise,\n watchForClosePromise: watchForClosePromise,\n onDisplayPromise: onDisplayPromise,\n openBridgePromise: openBridgePromise,\n runTimeoutPromise: runTimeoutPromise,\n onRenderedPromise: onRenderedPromise,\n delegatePromise: delegatePromise,\n watchForUnloadPromise: watchForUnloadPromise,\n finalSetPropsPromise: finalSetPropsPromise\n });\n })).catch((function(err) {\n return promise_ZalgoPromise.all([ onError(err), destroy(err) ]).then((function() {\n throw err;\n }), (function() {\n throw err;\n }));\n })).then(src_util_noop);\n },\n destroy: destroy,\n getProps: function() {\n return props;\n },\n setProps: setProps,\n export: xport,\n getHelpers: getHelpers,\n getDelegateOverrides: function() {\n return promise_ZalgoPromise.try((function() {\n return {\n getProxyContainer: getProxyContainer,\n show: show,\n hide: hide,\n renderContainer: renderContainer,\n getProxyWindow: getProxyWindow,\n watchForUnload: watchForUnload,\n openFrame: openFrame,\n openPrerenderFrame: openPrerenderFrame,\n prerender: prerender,\n open: open,\n openPrerender: openPrerender,\n setProxyWin: setProxyWin\n };\n }));\n },\n getExports: function() {\n return xports({\n getExports: function() {\n return exportsPromise;\n }\n });\n }\n };\n }\n function defaultContainerTemplate(_ref) {\n var uid = _ref.uid, frame = _ref.frame, prerenderFrame = _ref.prerenderFrame, doc = _ref.doc, props = _ref.props, event = _ref.event, dimensions = _ref.dimensions;\n var width = dimensions.width, height = dimensions.height;\n if (frame && prerenderFrame) {\n var div = doc.createElement(\"div\");\n div.setAttribute(\"id\", uid);\n var style = doc.createElement(\"style\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n style.appendChild(doc.createTextNode(\"\\n #\" + uid + \" {\\n display: inline-block;\\n position: relative;\\n width: \" + width + \";\\n height: \" + height + \";\\n }\\n\\n #\" + uid + \" > iframe {\\n display: inline-block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n top: 0;\\n left: 0;\\n transition: opacity .2s ease-in-out;\\n }\\n\\n #\" + uid + \" > iframe.zoid-invisible {\\n opacity: 0;\\n }\\n\\n #\" + uid + \" > iframe.zoid-visible {\\n opacity: 1;\\n }\\n \"));\n div.appendChild(frame);\n div.appendChild(prerenderFrame);\n div.appendChild(style);\n prerenderFrame.classList.add(\"zoid-visible\");\n frame.classList.add(\"zoid-invisible\");\n event.on(EVENT.RENDERED, (function() {\n prerenderFrame.classList.remove(\"zoid-visible\");\n prerenderFrame.classList.add(\"zoid-invisible\");\n frame.classList.remove(\"zoid-invisible\");\n frame.classList.add(\"zoid-visible\");\n setTimeout((function() {\n destroyElement(prerenderFrame);\n }), 1);\n }));\n event.on(EVENT.RESIZE, (function(_ref2) {\n var newWidth = _ref2.width, newHeight = _ref2.height;\n \"number\" == typeof newWidth && (div.style.width = toCSS(newWidth));\n \"number\" == typeof newHeight && (div.style.height = toCSS(newHeight));\n }));\n return div;\n }\n }\n var cleanInstances = cleanup();\n var cleanZoid = cleanup();\n function component(opts) {\n var options = function(options) {\n var tag = options.tag, url = options.url, domain = options.domain, bridgeUrl = options.bridgeUrl, _options$props = options.props, props = void 0 === _options$props ? {} : _options$props, _options$dimensions = options.dimensions, dimensions = void 0 === _options$dimensions ? {} : _options$dimensions, _options$autoResize = options.autoResize, autoResize = void 0 === _options$autoResize ? {} : _options$autoResize, _options$allowedParen = options.allowedParentDomains, allowedParentDomains = void 0 === _options$allowedParen ? \"*\" : _options$allowedParen, _options$attributes = options.attributes, attributes = void 0 === _options$attributes ? {} : _options$attributes, _options$defaultConte = options.defaultContext, defaultContext = void 0 === _options$defaultConte ? CONTEXT.IFRAME : _options$defaultConte, _options$containerTem = options.containerTemplate, containerTemplate = void 0 === _options$containerTem ? defaultContainerTemplate : _options$containerTem, _options$prerenderTem = options.prerenderTemplate, prerenderTemplate = void 0 === _options$prerenderTem ? null : _options$prerenderTem, validate = options.validate, _options$eligible = options.eligible, eligible = void 0 === _options$eligible ? function() {\n return {\n eligible: !0\n };\n } : _options$eligible, _options$logger = options.logger, logger = void 0 === _options$logger ? {\n info: src_util_noop\n } : _options$logger, _options$exports = options.exports, xportsDefinition = void 0 === _options$exports ? src_util_noop : _options$exports, method = options.method, _options$children = options.children, children = void 0 === _options$children ? function() {\n return {};\n } : _options$children;\n var name = tag.replace(/-/g, \"_\");\n var propsDef = _extends({}, {\n window: {\n type: PROP_TYPE.OBJECT,\n sendToChild: !1,\n required: !1,\n allowDelegate: !0,\n validate: function(_ref2) {\n var value = _ref2.value;\n if (!isWindow(value) && !window_ProxyWindow.isProxyWindow(value)) throw new Error(\"Expected Window or ProxyWindow\");\n if (isWindow(value)) {\n if (isWindowClosed(value)) throw new Error(\"Window is closed\");\n if (!isSameDomain(value)) throw new Error(\"Window is not same domain\");\n }\n },\n decorate: function(_ref3) {\n return setup_toProxyWindow(_ref3.value);\n }\n },\n timeout: {\n type: PROP_TYPE.NUMBER,\n required: !1,\n sendToChild: !1\n },\n cspNonce: {\n type: PROP_TYPE.STRING,\n required: !1\n },\n onDisplay: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRendered: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRender: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onClose: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onDestroy: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onResize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n onFocus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n close: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref4) {\n return _ref4.close;\n }\n },\n focus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref5) {\n return _ref5.focus;\n }\n },\n resize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref6) {\n return _ref6.resize;\n }\n },\n uid: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref7) {\n return _ref7.uid;\n }\n },\n tag: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref8) {\n return _ref8.tag;\n }\n },\n getParent: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref9) {\n return _ref9.getParent;\n }\n },\n getParentDomain: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref10) {\n return _ref10.getParentDomain;\n }\n },\n show: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref11) {\n return _ref11.show;\n }\n },\n hide: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref12) {\n return _ref12.hide;\n }\n },\n export: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref13) {\n return _ref13.export;\n }\n },\n onError: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref14) {\n return _ref14.onError;\n }\n },\n onProps: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref15) {\n return _ref15.onProps;\n }\n },\n getSiblings: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref16) {\n return _ref16.getSiblings;\n }\n }\n }, props);\n if (!containerTemplate) throw new Error(\"Container template required\");\n return {\n name: name,\n tag: tag,\n url: url,\n domain: domain,\n bridgeUrl: bridgeUrl,\n method: method,\n propsDef: propsDef,\n dimensions: dimensions,\n autoResize: autoResize,\n allowedParentDomains: allowedParentDomains,\n attributes: attributes,\n defaultContext: defaultContext,\n containerTemplate: containerTemplate,\n prerenderTemplate: prerenderTemplate,\n validate: validate,\n logger: logger,\n eligible: eligible,\n children: children,\n exports: \"function\" == typeof xportsDefinition ? xportsDefinition : function(_ref) {\n var getExports = _ref.getExports;\n var result = {};\n var _loop = function(_i2, _Object$keys2) {\n var key = _Object$keys2[_i2];\n var type = xportsDefinition[key].type;\n var valuePromise = getExports().then((function(res) {\n return res[key];\n }));\n result[key] = type === PROP_TYPE.FUNCTION ? function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return valuePromise.then((function(value) {\n return value.apply(void 0, args);\n }));\n } : valuePromise;\n };\n for (var _i2 = 0, _Object$keys2 = Object.keys(xportsDefinition); _i2 < _Object$keys2.length; _i2++) _loop(_i2, _Object$keys2);\n return result;\n }\n };\n }(opts);\n var name = options.name, tag = options.tag, defaultContext = options.defaultContext, eligible = options.eligible, children = options.children;\n var global = lib_global_getGlobal(window);\n var instances = [];\n var isChild = function() {\n if (function(name) {\n try {\n return parseWindowName(window.name).name === name;\n } catch (err) {}\n return !1;\n }(name)) {\n var _payload = getInitialParentPayload().payload;\n if (_payload.tag === tag && matchDomain(_payload.childDomainMatch, getDomain())) return !0;\n }\n return !1;\n };\n var registerChild = memoize((function() {\n if (isChild()) {\n if (window.xprops) {\n delete global.components[tag];\n throw new Error(\"Can not register \" + name + \" as child - child already registered\");\n }\n var child = function(options) {\n var tag = options.tag, propsDef = options.propsDef, autoResize = options.autoResize, allowedParentDomains = options.allowedParentDomains;\n var onPropHandlers = [];\n var _getInitialParentPayl = getInitialParentPayload(), parent = _getInitialParentPayl.parent, payload = _getInitialParentPayl.payload;\n var parentComponentWindow = parent.win, parentDomain = parent.domain;\n var props;\n var exportsPromise = new promise_ZalgoPromise;\n var version = payload.version, uid = payload.uid, parentExports = payload.exports, context = payload.context, initialProps = payload.props;\n if (\"9_0_86\" !== version) throw new Error(\"Parent window has zoid version \" + version + \", child window has version 9_0_86\");\n var show = parentExports.show, hide = parentExports.hide, close = parentExports.close, onError = parentExports.onError, checkClose = parentExports.checkClose, parentExport = parentExports.export, parentResize = parentExports.resize, parentInit = parentExports.init;\n var getParent = function() {\n return parentComponentWindow;\n };\n var getParentDomain = function() {\n return parentDomain;\n };\n var onProps = function(handler) {\n onPropHandlers.push(handler);\n return {\n cancel: function() {\n onPropHandlers.splice(onPropHandlers.indexOf(handler), 1);\n }\n };\n };\n var resize = function(_ref) {\n return parentResize.fireAndForget({\n width: _ref.width,\n height: _ref.height\n });\n };\n var xport = function(xports) {\n exportsPromise.resolve(xports);\n return parentExport(xports);\n };\n var getSiblings = function(_temp) {\n var anyParent = (void 0 === _temp ? {} : _temp).anyParent;\n var result = [];\n var currentParent = props.parent;\n void 0 === anyParent && (anyParent = !currentParent);\n if (!anyParent && !currentParent) throw new Error(\"No parent found for \" + tag + \" child\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(window); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var win = _getAllFramesInWindow2[_i2];\n if (isSameDomain(win)) {\n var xprops = assertSameDomain(win).xprops;\n if (xprops && getParent() === xprops.getParent()) {\n var winParent = xprops.parent;\n if (anyParent || !currentParent || winParent && winParent.uid === currentParent.uid) {\n var xports = tryGlobal(win, (function(global) {\n return global.exports;\n }));\n result.push({\n props: xprops,\n exports: xports\n });\n }\n }\n }\n }\n return result;\n };\n var setProps = function(newProps, origin, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var normalizedProps = function(parentComponentWindow, propsDef, props, origin, helpers, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n if (!prop || !prop.sameDomain || origin === getDomain(window) && isSameDomain(parentComponentWindow)) {\n var value = normalizeChildProp(propsDef, 0, key, props[key], helpers);\n result[key] = value;\n prop && prop.alias && !result[prop.alias] && (result[prop.alias] = value);\n }\n }\n if (!isUpdate) for (var _i4 = 0, _Object$keys4 = Object.keys(propsDef); _i4 < _Object$keys4.length; _i4++) {\n var _key = _Object$keys4[_i4];\n props.hasOwnProperty(_key) || (result[_key] = normalizeChildProp(propsDef, 0, _key, void 0, helpers));\n }\n return result;\n }(parentComponentWindow, propsDef, newProps, origin, {\n tag: tag,\n show: show,\n hide: hide,\n close: close,\n focus: child_focus,\n onError: onError,\n resize: resize,\n getSiblings: getSiblings,\n onProps: onProps,\n getParent: getParent,\n getParentDomain: getParentDomain,\n uid: uid,\n export: xport\n }, isUpdate);\n props ? extend(props, normalizedProps) : props = normalizedProps;\n for (var _i4 = 0; _i4 < onPropHandlers.length; _i4++) (0, onPropHandlers[_i4])(props);\n };\n var updateProps = function(newProps) {\n return promise_ZalgoPromise.try((function() {\n return setProps(newProps, parentDomain, !0);\n }));\n };\n return {\n init: function() {\n return promise_ZalgoPromise.try((function() {\n isSameDomain(parentComponentWindow) && function(_ref3) {\n var componentName = _ref3.componentName, parentComponentWindow = _ref3.parentComponentWindow;\n var _crossDomainDeseriali2 = crossDomainDeserialize({\n data: parseWindowName(window.name).serializedInitialPayload,\n sender: {\n win: parentComponentWindow\n },\n basic: !0\n }), sender = _crossDomainDeseriali2.sender;\n if (\"uid\" === _crossDomainDeseriali2.reference.type || \"global\" === _crossDomainDeseriali2.metaData.windowRef.type) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: _crossDomainDeseriali2.data,\n metaData: {\n windowRef: window_getWindowRef(parentComponentWindow)\n },\n sender: {\n domain: sender.domain\n },\n receiver: {\n win: window,\n domain: getDomain()\n },\n basic: !0\n });\n window.name = buildChildWindowName({\n name: componentName,\n serializedPayload: _crossDomainSerialize.serializedData\n });\n }\n }({\n componentName: options.name,\n parentComponentWindow: parentComponentWindow\n });\n lib_global_getGlobal(window).exports = options.exports({\n getExports: function() {\n return exportsPromise;\n }\n });\n !function(allowedParentDomains, domain) {\n if (!matchDomain(allowedParentDomains, domain)) throw new Error(\"Can not be rendered by domain: \" + domain);\n }(allowedParentDomains, parentDomain);\n markWindowKnown(parentComponentWindow);\n !function() {\n window.addEventListener(\"beforeunload\", (function() {\n checkClose.fireAndForget();\n }));\n window.addEventListener(\"unload\", (function() {\n checkClose.fireAndForget();\n }));\n onCloseWindow(parentComponentWindow, (function() {\n child_destroy();\n }));\n }();\n return parentInit({\n updateProps: updateProps,\n close: child_destroy\n });\n })).then((function() {\n return (_autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, \n _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, \n _autoResize$element = autoResize.element, elementReady(void 0 === _autoResize$element ? \"body\" : _autoResize$element).catch(src_util_noop).then((function(element) {\n return {\n width: width,\n height: height,\n element: element\n };\n }))).then((function(_ref3) {\n var width = _ref3.width, height = _ref3.height, element = _ref3.element;\n element && (width || height) && context !== CONTEXT.POPUP && onResize(element, (function(_ref4) {\n resize({\n width: width ? _ref4.width : void 0,\n height: height ? _ref4.height : void 0\n });\n }), {\n width: width,\n height: height\n });\n }));\n var _autoResize$width, width, _autoResize$height, height, _autoResize$element;\n })).catch((function(err) {\n onError(err);\n }));\n },\n getProps: function() {\n if (props) return props;\n setProps(initialProps, parentDomain);\n return props;\n }\n };\n }(options);\n child.init();\n return child;\n }\n }));\n registerChild();\n !function() {\n var allowDelegateListener = on_on(\"zoid_allow_delegate_\" + name, (function() {\n return !0;\n }));\n var delegateListener = on_on(\"zoid_delegate_\" + name, (function(_ref2) {\n var _ref2$data = _ref2.data;\n return {\n parent: parentComponent({\n uid: _ref2$data.uid,\n options: options,\n overrides: _ref2$data.overrides,\n parentWin: _ref2.source\n })\n };\n }));\n cleanZoid.register(allowDelegateListener.cancel);\n cleanZoid.register(delegateListener.cancel);\n }();\n global.components = global.components || {};\n if (global.components[tag]) throw new Error(\"Can not register multiple components with the same tag: \" + tag);\n global.components[tag] = !0;\n return {\n init: function init(inputProps) {\n var instance;\n var uid = \"zoid-\" + tag + \"-\" + uniqueID();\n var props = inputProps || {};\n var _eligible = eligible({\n props: props\n }), eligibility = _eligible.eligible, reason = _eligible.reason;\n var onDestroy = props.onDestroy;\n props.onDestroy = function() {\n instance && eligibility && instances.splice(instances.indexOf(instance), 1);\n if (onDestroy) return onDestroy.apply(void 0, arguments);\n };\n var parent = parentComponent({\n uid: uid,\n options: options\n });\n parent.init();\n eligibility ? parent.setProps(props) : props.onDestroy && props.onDestroy();\n cleanInstances.register((function(err) {\n return parent.destroy(err || new Error(\"zoid destroyed all components\"));\n }));\n var clone = function(_temp) {\n var _ref4$decorate = (void 0 === _temp ? {} : _temp).decorate;\n return init((void 0 === _ref4$decorate ? identity : _ref4$decorate)(props));\n };\n var _render = function(target, container, context) {\n return promise_ZalgoPromise.try((function() {\n if (!eligibility) {\n var err = new Error(reason || name + \" component is not eligible\");\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }\n if (!isWindow(target)) throw new Error(\"Must pass window to renderTo\");\n return function(props, context) {\n return promise_ZalgoPromise.try((function() {\n if (props.window) return setup_toProxyWindow(props.window).getType();\n if (context) {\n if (context !== CONTEXT.IFRAME && context !== CONTEXT.POPUP) throw new Error(\"Unrecognized context: \" + context);\n return context;\n }\n return defaultContext;\n }));\n }(props, context);\n })).then((function(finalContext) {\n container = function(context, container) {\n if (container) {\n if (\"string\" != typeof container && !isElement(container)) throw new TypeError(\"Expected string or element selector to be passed\");\n return container;\n }\n if (context === CONTEXT.POPUP) return \"body\";\n throw new Error(\"Expected element to be passed to render iframe\");\n }(finalContext, container);\n if (target !== window && \"string\" != typeof container) throw new Error(\"Must pass string element when rendering to another window\");\n return parent.render({\n target: target,\n container: container,\n context: finalContext,\n rerender: function() {\n var newInstance = clone();\n extend(instance, newInstance);\n return newInstance.renderTo(target, container, context);\n }\n });\n })).catch((function(err) {\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }));\n };\n instance = _extends({}, parent.getExports(), parent.getHelpers(), function() {\n var childComponents = children();\n var result = {};\n var _loop2 = function(_i4, _Object$keys4) {\n var childName = _Object$keys4[_i4];\n var Child = childComponents[childName];\n result[childName] = function(childInputProps) {\n var parentProps = parent.getProps();\n var childProps = _extends({}, childInputProps, {\n parent: {\n uid: uid,\n props: parentProps,\n export: parent.export\n }\n });\n return Child(childProps);\n };\n };\n for (var _i4 = 0, _Object$keys4 = Object.keys(childComponents); _i4 < _Object$keys4.length; _i4++) _loop2(_i4, _Object$keys4);\n return result;\n }(), {\n isEligible: function() {\n return eligibility;\n },\n clone: clone,\n render: function(container, context) {\n return _render(window, container, context);\n },\n renderTo: function(target, container, context) {\n return _render(target, container, context);\n }\n });\n eligibility && instances.push(instance);\n return instance;\n },\n instances: instances,\n driver: function(driverName, dep) {\n throw new Error(\"Driver support not enabled\");\n },\n isChild: isChild,\n canRenderTo: function(win) {\n return send_send(win, \"zoid_allow_delegate_\" + name).then((function(_ref3) {\n return _ref3.data;\n })).catch((function() {\n return !1;\n }));\n },\n registerChild: registerChild\n };\n }\n var component_create = function(options) {\n !function() {\n if (!global_getGlobal().initialized) {\n global_getGlobal().initialized = !0;\n on = (_ref3 = {\n on: on_on,\n send: send_send\n }).on, send = _ref3.send, (global = global_getGlobal()).receiveMessage = global.receiveMessage || function(message) {\n return receive_receiveMessage(message, {\n on: on,\n send: send\n });\n };\n !function(_ref5) {\n var on = _ref5.on, send = _ref5.send;\n globalStore().getOrSet(\"postMessageListener\", (function() {\n return addEventListener(window, \"message\", (function(event) {\n !function(event, _ref4) {\n var on = _ref4.on, send = _ref4.send;\n promise_ZalgoPromise.try((function() {\n var source = event.source || event.sourceElement;\n var origin = event.origin || event.originalEvent && event.originalEvent.origin;\n var data = event.data;\n \"null\" === origin && (origin = \"file://\");\n if (source) {\n if (!origin) throw new Error(\"Post message did not have origin domain\");\n receive_receiveMessage({\n source: source,\n origin: origin,\n data: data\n }, {\n on: on,\n send: send\n });\n }\n }));\n }(event, {\n on: on,\n send: send\n });\n }));\n }));\n }({\n on: on_on,\n send: send_send\n });\n !function(_ref8) {\n var on = _ref8.on, send = _ref8.send;\n globalStore(\"builtinListeners\").getOrSet(\"helloListener\", (function() {\n var listener = on(\"postrobot_hello\", {\n domain: \"*\"\n }, (function(_ref3) {\n resolveHelloPromise(_ref3.source, {\n domain: _ref3.origin\n });\n return {\n instanceID: getInstanceID()\n };\n }));\n var parent = getAncestor();\n parent && sayHello(parent, {\n send: send\n }).catch((function(err) {}));\n return listener;\n }));\n }({\n on: on_on,\n send: send_send\n });\n }\n var _ref3, on, send, global;\n }();\n var comp = component(options);\n var init = function(props) {\n return comp.init(props);\n };\n init.driver = function(name, dep) {\n return comp.driver(name, dep);\n };\n init.isChild = function() {\n return comp.isChild();\n };\n init.canRenderTo = function(win) {\n return comp.canRenderTo(win);\n };\n init.instances = comp.instances;\n var child = comp.registerChild();\n child && (window.xprops = init.xprops = child.getProps());\n return init;\n };\n function destroyComponents(err) {\n var destroyPromise = cleanInstances.all(err);\n cleanInstances = cleanup();\n return destroyPromise;\n }\n var destroyAll = destroyComponents;\n function component_destroy(err) {\n destroyAll();\n delete window.__zoid_9_0_86__;\n !function() {\n !function() {\n var responseListeners = globalStore(\"responseListeners\");\n for (var _i2 = 0, _responseListeners$ke2 = responseListeners.keys(); _i2 < _responseListeners$ke2.length; _i2++) {\n var hash = _responseListeners$ke2[_i2];\n var listener = responseListeners.get(hash);\n listener && (listener.cancelled = !0);\n responseListeners.del(hash);\n }\n }();\n (listener = globalStore().get(\"postMessageListener\")) && listener.cancel();\n var listener;\n delete window.__post_robot_10_0_44__;\n }();\n return cleanZoid.all(err);\n }\n } ]);\n}));","!function(root, factory) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = factory() : \"function\" == typeof define && define.amd ? define(\"zoid\", [], factory) : \"object\" == typeof exports ? exports.zoid = factory() : root.zoid = factory();\n}(\"undefined\" != typeof self ? self : this, (function() {\n return function(modules) {\n var installedModules = {};\n function __webpack_require__(moduleId) {\n if (installedModules[moduleId]) return installedModules[moduleId].exports;\n var module = installedModules[moduleId] = {\n i: moduleId,\n l: !1,\n exports: {}\n };\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n module.l = !0;\n return module.exports;\n }\n __webpack_require__.m = modules;\n __webpack_require__.c = installedModules;\n __webpack_require__.d = function(exports, name, getter) {\n __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {\n enumerable: !0,\n get: getter\n });\n };\n __webpack_require__.r = function(exports) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {\n value: \"Module\"\n });\n Object.defineProperty(exports, \"__esModule\", {\n value: !0\n });\n };\n __webpack_require__.t = function(value, mode) {\n 1 & mode && (value = __webpack_require__(value));\n if (8 & mode) return value;\n if (4 & mode && \"object\" == typeof value && value && value.__esModule) return value;\n var ns = Object.create(null);\n __webpack_require__.r(ns);\n Object.defineProperty(ns, \"default\", {\n enumerable: !0,\n value: value\n });\n if (2 & mode && \"string\" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {\n return value[key];\n }.bind(null, key));\n return ns;\n };\n __webpack_require__.n = function(module) {\n var getter = module && module.__esModule ? function() {\n return module.default;\n } : function() {\n return module;\n };\n __webpack_require__.d(getter, \"a\", getter);\n return getter;\n };\n __webpack_require__.o = function(object, property) {\n return {}.hasOwnProperty.call(object, property);\n };\n __webpack_require__.p = \"\";\n return __webpack_require__(__webpack_require__.s = 0);\n }([ function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_require__.r(__webpack_exports__);\n __webpack_require__.d(__webpack_exports__, \"PopupOpenError\", (function() {\n return dom_PopupOpenError;\n }));\n __webpack_require__.d(__webpack_exports__, \"create\", (function() {\n return component_create;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroy\", (function() {\n return component_destroy;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyComponents\", (function() {\n return destroyComponents;\n }));\n __webpack_require__.d(__webpack_exports__, \"destroyAll\", (function() {\n return destroyAll;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_TYPE\", (function() {\n return PROP_TYPE;\n }));\n __webpack_require__.d(__webpack_exports__, \"PROP_SERIALIZATION\", (function() {\n return PROP_SERIALIZATION;\n }));\n __webpack_require__.d(__webpack_exports__, \"CONTEXT\", (function() {\n return CONTEXT;\n }));\n __webpack_require__.d(__webpack_exports__, \"EVENT\", (function() {\n return EVENT;\n }));\n function _setPrototypeOf(o, p) {\n return (_setPrototypeOf = Object.setPrototypeOf || function(o, p) {\n o.__proto__ = p;\n return o;\n })(o, p);\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _extends() {\n return (_extends = Object.assign || function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) ({}).hasOwnProperty.call(source, key) && (target[key] = source[key]);\n }\n return target;\n }).apply(this, arguments);\n }\n function utils_isPromise(item) {\n try {\n if (!item) return !1;\n if (\"undefined\" != typeof Promise && item instanceof Promise) return !0;\n if (\"undefined\" != typeof window && \"function\" == typeof window.Window && item instanceof window.Window) return !1;\n if (\"undefined\" != typeof window && \"function\" == typeof window.constructor && item instanceof window.constructor) return !1;\n var _toString = {}.toString;\n if (_toString) {\n var name = _toString.call(item);\n if (\"[object Window]\" === name || \"[object global]\" === name || \"[object DOMWindow]\" === name) return !1;\n }\n if (\"function\" == typeof item.then) return !0;\n } catch (err) {\n return !1;\n }\n return !1;\n }\n var dispatchedErrors = [];\n var possiblyUnhandledPromiseHandlers = [];\n var activeCount = 0;\n var flushPromise;\n function flushActive() {\n if (!activeCount && flushPromise) {\n var promise = flushPromise;\n flushPromise = null;\n promise.resolve();\n }\n }\n function startActive() {\n activeCount += 1;\n }\n function endActive() {\n activeCount -= 1;\n flushActive();\n }\n var promise_ZalgoPromise = function() {\n function ZalgoPromise(handler) {\n var _this = this;\n this.resolved = void 0;\n this.rejected = void 0;\n this.errorHandled = void 0;\n this.value = void 0;\n this.error = void 0;\n this.handlers = void 0;\n this.dispatching = void 0;\n this.stack = void 0;\n this.resolved = !1;\n this.rejected = !1;\n this.errorHandled = !1;\n this.handlers = [];\n if (handler) {\n var _result;\n var _error;\n var resolved = !1;\n var rejected = !1;\n var isAsync = !1;\n startActive();\n try {\n handler((function(res) {\n if (isAsync) _this.resolve(res); else {\n resolved = !0;\n _result = res;\n }\n }), (function(err) {\n if (isAsync) _this.reject(err); else {\n rejected = !0;\n _error = err;\n }\n }));\n } catch (err) {\n endActive();\n this.reject(err);\n return;\n }\n endActive();\n isAsync = !0;\n resolved ? this.resolve(_result) : rejected && this.reject(_error);\n }\n }\n var _proto = ZalgoPromise.prototype;\n _proto.resolve = function(result) {\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(result)) throw new Error(\"Can not resolve promise with another promise\");\n this.resolved = !0;\n this.value = result;\n this.dispatch();\n return this;\n };\n _proto.reject = function(error) {\n var _this2 = this;\n if (this.resolved || this.rejected) return this;\n if (utils_isPromise(error)) throw new Error(\"Can not reject promise with another promise\");\n if (!error) {\n var _err = error && \"function\" == typeof error.toString ? error.toString() : {}.toString.call(error);\n error = new Error(\"Expected reject to be called with Error, got \" + _err);\n }\n this.rejected = !0;\n this.error = error;\n this.errorHandled || setTimeout((function() {\n _this2.errorHandled || function(err, promise) {\n if (-1 === dispatchedErrors.indexOf(err)) {\n dispatchedErrors.push(err);\n setTimeout((function() {\n throw err;\n }), 1);\n for (var j = 0; j < possiblyUnhandledPromiseHandlers.length; j++) possiblyUnhandledPromiseHandlers[j](err, promise);\n }\n }(error, _this2);\n }), 1);\n this.dispatch();\n return this;\n };\n _proto.asyncReject = function(error) {\n this.errorHandled = !0;\n this.reject(error);\n return this;\n };\n _proto.dispatch = function() {\n var resolved = this.resolved, rejected = this.rejected, handlers = this.handlers;\n if (!this.dispatching && (resolved || rejected)) {\n this.dispatching = !0;\n startActive();\n var chain = function(firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n secondPromise.resolve(res);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < handlers.length; i++) {\n var _handlers$i = handlers[i], onSuccess = _handlers$i.onSuccess, onError = _handlers$i.onError, promise = _handlers$i.promise;\n var _result2 = void 0;\n if (resolved) try {\n _result2 = onSuccess ? onSuccess(this.value) : this.value;\n } catch (err) {\n promise.reject(err);\n continue;\n } else if (rejected) {\n if (!onError) {\n promise.reject(this.error);\n continue;\n }\n try {\n _result2 = onError(this.error);\n } catch (err) {\n promise.reject(err);\n continue;\n }\n }\n if (_result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected)) {\n var promiseResult = _result2;\n promiseResult.resolved ? promise.resolve(promiseResult.value) : promise.reject(promiseResult.error);\n promiseResult.errorHandled = !0;\n } else utils_isPromise(_result2) ? _result2 instanceof ZalgoPromise && (_result2.resolved || _result2.rejected) ? _result2.resolved ? promise.resolve(_result2.value) : promise.reject(_result2.error) : chain(_result2, promise) : promise.resolve(_result2);\n }\n handlers.length = 0;\n this.dispatching = !1;\n endActive();\n }\n };\n _proto.then = function(onSuccess, onError) {\n if (onSuccess && \"function\" != typeof onSuccess && !onSuccess.call) throw new Error(\"Promise.then expected a function for success handler\");\n if (onError && \"function\" != typeof onError && !onError.call) throw new Error(\"Promise.then expected a function for error handler\");\n var promise = new ZalgoPromise;\n this.handlers.push({\n promise: promise,\n onSuccess: onSuccess,\n onError: onError\n });\n this.errorHandled = !0;\n this.dispatch();\n return promise;\n };\n _proto.catch = function(onError) {\n return this.then(void 0, onError);\n };\n _proto.finally = function(onFinally) {\n if (onFinally && \"function\" != typeof onFinally && !onFinally.call) throw new Error(\"Promise.finally expected a function\");\n return this.then((function(result) {\n return ZalgoPromise.try(onFinally).then((function() {\n return result;\n }));\n }), (function(err) {\n return ZalgoPromise.try(onFinally).then((function() {\n throw err;\n }));\n }));\n };\n _proto.timeout = function(time, err) {\n var _this3 = this;\n if (this.resolved || this.rejected) return this;\n var timeout = setTimeout((function() {\n _this3.resolved || _this3.rejected || _this3.reject(err || new Error(\"Promise timed out after \" + time + \"ms\"));\n }), time);\n return this.then((function(result) {\n clearTimeout(timeout);\n return result;\n }));\n };\n _proto.toPromise = function() {\n if (\"undefined\" == typeof Promise) throw new TypeError(\"Could not find Promise\");\n return Promise.resolve(this);\n };\n _proto.lazy = function() {\n this.errorHandled = !0;\n return this;\n };\n ZalgoPromise.resolve = function(value) {\n return value instanceof ZalgoPromise ? value : utils_isPromise(value) ? new ZalgoPromise((function(resolve, reject) {\n return value.then(resolve, reject);\n })) : (new ZalgoPromise).resolve(value);\n };\n ZalgoPromise.reject = function(error) {\n return (new ZalgoPromise).reject(error);\n };\n ZalgoPromise.asyncReject = function(error) {\n return (new ZalgoPromise).asyncReject(error);\n };\n ZalgoPromise.all = function(promises) {\n var promise = new ZalgoPromise;\n var count = promises.length;\n var results = [].slice();\n if (!count) {\n promise.resolve(results);\n return promise;\n }\n var chain = function(i, firstPromise, secondPromise) {\n return firstPromise.then((function(res) {\n results[i] = res;\n 0 == (count -= 1) && promise.resolve(results);\n }), (function(err) {\n secondPromise.reject(err);\n }));\n };\n for (var i = 0; i < promises.length; i++) {\n var prom = promises[i];\n if (prom instanceof ZalgoPromise) {\n if (prom.resolved) {\n results[i] = prom.value;\n count -= 1;\n continue;\n }\n } else if (!utils_isPromise(prom)) {\n results[i] = prom;\n count -= 1;\n continue;\n }\n chain(i, ZalgoPromise.resolve(prom), promise);\n }\n 0 === count && promise.resolve(results);\n return promise;\n };\n ZalgoPromise.hash = function(promises) {\n var result = {};\n var awaitPromises = [];\n var _loop = function(key) {\n if (promises.hasOwnProperty(key)) {\n var value = promises[key];\n utils_isPromise(value) ? awaitPromises.push(value.then((function(res) {\n result[key] = res;\n }))) : result[key] = value;\n }\n };\n for (var key in promises) _loop(key);\n return ZalgoPromise.all(awaitPromises).then((function() {\n return result;\n }));\n };\n ZalgoPromise.map = function(items, method) {\n return ZalgoPromise.all(items.map(method));\n };\n ZalgoPromise.onPossiblyUnhandledException = function(handler) {\n return function(handler) {\n possiblyUnhandledPromiseHandlers.push(handler);\n return {\n cancel: function() {\n possiblyUnhandledPromiseHandlers.splice(possiblyUnhandledPromiseHandlers.indexOf(handler), 1);\n }\n };\n }(handler);\n };\n ZalgoPromise.try = function(method, context, args) {\n if (method && \"function\" != typeof method && !method.call) throw new Error(\"Promise.try expected a function\");\n var result;\n startActive();\n try {\n result = method.apply(context, args || []);\n } catch (err) {\n endActive();\n return ZalgoPromise.reject(err);\n }\n endActive();\n return ZalgoPromise.resolve(result);\n };\n ZalgoPromise.delay = function(_delay) {\n return new ZalgoPromise((function(resolve) {\n setTimeout(resolve, _delay);\n }));\n };\n ZalgoPromise.isPromise = function(value) {\n return !!(value && value instanceof ZalgoPromise) || utils_isPromise(value);\n };\n ZalgoPromise.flush = function() {\n return function(Zalgo) {\n var promise = flushPromise = flushPromise || new Zalgo;\n flushActive();\n return promise;\n }(ZalgoPromise);\n };\n return ZalgoPromise;\n }();\n function isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n var WINDOW_TYPE = {\n IFRAME: \"iframe\",\n POPUP: \"popup\"\n };\n var IE_WIN_ACCESS_ERROR = \"Call was rejected by callee.\\r\\n\";\n function getActualProtocol(win) {\n void 0 === win && (win = window);\n return win.location.protocol;\n }\n function getProtocol(win) {\n void 0 === win && (win = window);\n if (win.mockDomain) {\n var protocol = win.mockDomain.split(\"//\")[0];\n if (protocol) return protocol;\n }\n return getActualProtocol(win);\n }\n function isAboutProtocol(win) {\n void 0 === win && (win = window);\n return \"about:\" === getProtocol(win);\n }\n function utils_getParent(win) {\n void 0 === win && (win = window);\n if (win) try {\n if (win.parent && win.parent !== win) return win.parent;\n } catch (err) {}\n }\n function getOpener(win) {\n void 0 === win && (win = window);\n if (win && !utils_getParent(win)) try {\n return win.opener;\n } catch (err) {}\n }\n function canReadFromWindow(win) {\n try {\n return !0;\n } catch (err) {}\n return !1;\n }\n function getActualDomain(win) {\n void 0 === win && (win = window);\n var location = win.location;\n if (!location) throw new Error(\"Can not read window location\");\n var protocol = getActualProtocol(win);\n if (!protocol) throw new Error(\"Can not read window protocol\");\n if (\"file:\" === protocol) return \"file://\";\n if (\"about:\" === protocol) {\n var parent = utils_getParent(win);\n return parent && canReadFromWindow() ? getActualDomain(parent) : \"about://\";\n }\n var host = location.host;\n if (!host) throw new Error(\"Can not read window host\");\n return protocol + \"//\" + host;\n }\n function getDomain(win) {\n void 0 === win && (win = window);\n var domain = getActualDomain(win);\n return domain && win.mockDomain && 0 === win.mockDomain.indexOf(\"mock:\") ? win.mockDomain : domain;\n }\n function isSameDomain(win) {\n if (!function(win) {\n try {\n if (win === window) return !0;\n } catch (err) {}\n try {\n var desc = Object.getOwnPropertyDescriptor(win, \"location\");\n if (desc && !1 === desc.enumerable) return !1;\n } catch (err) {}\n try {\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (function(win) {\n void 0 === win && (win = window);\n return \"mock:\" === getProtocol(win);\n }(win) && canReadFromWindow()) return !0;\n } catch (err) {}\n try {\n if (getActualDomain(win) === getActualDomain(window)) return !0;\n } catch (err) {}\n return !1;\n }(win)) return !1;\n try {\n if (win === window) return !0;\n if (isAboutProtocol(win) && canReadFromWindow()) return !0;\n if (getDomain(window) === getDomain(win)) return !0;\n } catch (err) {}\n return !1;\n }\n function assertSameDomain(win) {\n if (!isSameDomain(win)) throw new Error(\"Expected window to be same domain\");\n return win;\n }\n function isAncestorParent(parent, child) {\n if (!parent || !child) return !1;\n var childParent = utils_getParent(child);\n return childParent ? childParent === parent : -1 !== function(win) {\n var result = [];\n try {\n for (;win.parent !== win; ) {\n result.push(win.parent);\n win = win.parent;\n }\n } catch (err) {}\n return result;\n }(child).indexOf(parent);\n }\n function getFrames(win) {\n var result = [];\n var frames;\n try {\n frames = win.frames;\n } catch (err) {\n frames = win;\n }\n var len;\n try {\n len = frames.length;\n } catch (err) {}\n if (0 === len) return result;\n if (len) {\n for (var i = 0; i < len; i++) {\n var frame = void 0;\n try {\n frame = frames[i];\n } catch (err) {\n continue;\n }\n result.push(frame);\n }\n return result;\n }\n for (var _i = 0; _i < 100; _i++) {\n var _frame = void 0;\n try {\n _frame = frames[_i];\n } catch (err) {\n return result;\n }\n if (!_frame) return result;\n result.push(_frame);\n }\n return result;\n }\n function getAllChildFrames(win) {\n var result = [];\n for (var _i3 = 0, _getFrames2 = getFrames(win); _i3 < _getFrames2.length; _i3++) {\n var frame = _getFrames2[_i3];\n result.push(frame);\n for (var _i5 = 0, _getAllChildFrames2 = getAllChildFrames(frame); _i5 < _getAllChildFrames2.length; _i5++) result.push(_getAllChildFrames2[_i5]);\n }\n return result;\n }\n function getTop(win) {\n void 0 === win && (win = window);\n try {\n if (win.top) return win.top;\n } catch (err) {}\n if (utils_getParent(win) === win) return win;\n try {\n if (isAncestorParent(window, win) && window.top) return window.top;\n } catch (err) {}\n try {\n if (isAncestorParent(win, window) && window.top) return window.top;\n } catch (err) {}\n for (var _i7 = 0, _getAllChildFrames4 = getAllChildFrames(win); _i7 < _getAllChildFrames4.length; _i7++) {\n var frame = _getAllChildFrames4[_i7];\n try {\n if (frame.top) return frame.top;\n } catch (err) {}\n if (utils_getParent(frame) === frame) return frame;\n }\n }\n function getAllFramesInWindow(win) {\n var top = getTop(win);\n if (!top) throw new Error(\"Can not determine top window\");\n var result = [].concat(getAllChildFrames(top), [ top ]);\n -1 === result.indexOf(win) && (result = [].concat(result, [ win ], getAllChildFrames(win)));\n return result;\n }\n var iframeWindows = [];\n var iframeFrames = [];\n function isWindowClosed(win, allowMock) {\n void 0 === allowMock && (allowMock = !0);\n try {\n if (win === window) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (!win) return !0;\n } catch (err) {\n return !0;\n }\n try {\n if (win.closed) return !0;\n } catch (err) {\n return !err || err.message !== IE_WIN_ACCESS_ERROR;\n }\n if (allowMock && isSameDomain(win)) try {\n if (win.mockclosed) return !0;\n } catch (err) {}\n try {\n if (!win.parent || !win.top) return !0;\n } catch (err) {}\n var iframeIndex = function(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }(iframeWindows, win);\n if (-1 !== iframeIndex) {\n var frame = iframeFrames[iframeIndex];\n if (frame && function(frame) {\n if (!frame.contentWindow) return !0;\n if (!frame.parentNode) return !0;\n var doc = frame.ownerDocument;\n if (doc && doc.documentElement && !doc.documentElement.contains(frame)) {\n var parent = frame;\n for (;parent.parentNode && parent.parentNode !== parent; ) parent = parent.parentNode;\n if (!parent.host || !doc.documentElement.contains(parent.host)) return !0;\n }\n return !1;\n }(frame)) return !0;\n }\n return !1;\n }\n function utils_getUserAgent(win) {\n return (win = win || window).navigator.mockUserAgent || win.navigator.userAgent;\n }\n function getFrameByName(win, name) {\n var winFrames = getFrames(win);\n for (var _i9 = 0; _i9 < winFrames.length; _i9++) {\n var childFrame = winFrames[_i9];\n try {\n if (isSameDomain(childFrame) && childFrame.name === name && -1 !== winFrames.indexOf(childFrame)) return childFrame;\n } catch (err) {}\n }\n try {\n if (-1 !== winFrames.indexOf(win.frames[name])) return win.frames[name];\n } catch (err) {}\n try {\n if (-1 !== winFrames.indexOf(win[name])) return win[name];\n } catch (err) {}\n }\n function isOpener(parent, child) {\n return parent === getOpener(child);\n }\n function getAncestor(win) {\n void 0 === win && (win = window);\n return getOpener(win = win || window) || utils_getParent(win) || void 0;\n }\n function anyMatch(collection1, collection2) {\n for (var _i17 = 0; _i17 < collection1.length; _i17++) {\n var item1 = collection1[_i17];\n for (var _i19 = 0; _i19 < collection2.length; _i19++) if (item1 === collection2[_i19]) return !0;\n }\n return !1;\n }\n function getDistanceFromTop(win) {\n void 0 === win && (win = window);\n var distance = 0;\n var parent = win;\n for (;parent; ) (parent = utils_getParent(parent)) && (distance += 1);\n return distance;\n }\n function isSameTopWindow(win1, win2) {\n var top1 = getTop(win1) || win1;\n var top2 = getTop(win2) || win2;\n try {\n if (top1 && top2) return top1 === top2;\n } catch (err) {}\n var allFrames1 = getAllFramesInWindow(win1);\n var allFrames2 = getAllFramesInWindow(win2);\n if (anyMatch(allFrames1, allFrames2)) return !0;\n var opener1 = getOpener(top1);\n var opener2 = getOpener(top2);\n return opener1 && anyMatch(getAllFramesInWindow(opener1), allFrames2) || opener2 && anyMatch(getAllFramesInWindow(opener2), allFrames1), \n !1;\n }\n function matchDomain(pattern, origin) {\n if (\"string\" == typeof pattern) {\n if (\"string\" == typeof origin) return \"*\" === pattern || origin === pattern;\n if (isRegex(origin)) return !1;\n if (Array.isArray(origin)) return !1;\n }\n return isRegex(pattern) ? isRegex(origin) ? pattern.toString() === origin.toString() : !Array.isArray(origin) && Boolean(origin.match(pattern)) : !!Array.isArray(pattern) && (Array.isArray(origin) ? JSON.stringify(pattern) === JSON.stringify(origin) : !isRegex(origin) && pattern.some((function(subpattern) {\n return matchDomain(subpattern, origin);\n })));\n }\n function getDomainFromUrl(url) {\n return url.match(/^(https?|mock|file):\\/\\//) ? url.split(\"/\").slice(0, 3).join(\"/\") : getDomain();\n }\n function onCloseWindow(win, callback, delay, maxtime) {\n void 0 === delay && (delay = 1e3);\n void 0 === maxtime && (maxtime = 1 / 0);\n var timeout;\n !function check() {\n if (isWindowClosed(win)) {\n timeout && clearTimeout(timeout);\n return callback();\n }\n if (maxtime <= 0) clearTimeout(timeout); else {\n maxtime -= delay;\n timeout = setTimeout(check, delay);\n }\n }();\n return {\n cancel: function() {\n timeout && clearTimeout(timeout);\n }\n };\n }\n function isWindow(obj) {\n try {\n if (obj === window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (\"[object Window]\" === {}.toString.call(obj)) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (window.Window && obj instanceof window.Window) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.self === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.parent === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && obj.top === obj) return !0;\n } catch (err) {\n if (err && err.message === IE_WIN_ACCESS_ERROR) return !0;\n }\n try {\n if (obj && \"__unlikely_value__\" === obj.__cross_domain_utils_window_check__) return !1;\n } catch (err) {\n return !0;\n }\n try {\n if (\"postMessage\" in obj && \"self\" in obj && \"location\" in obj) return !0;\n } catch (err) {}\n return !1;\n }\n function normalizeMockUrl(url) {\n if (!(domain = getDomainFromUrl(url), 0 === domain.indexOf(\"mock:\"))) return url;\n var domain;\n throw new Error(\"Mock urls not supported out of test mode\");\n }\n function getFrameForWindow(win) {\n if (isSameDomain(win)) return assertSameDomain(win).frameElement;\n for (var _i21 = 0, _document$querySelect2 = document.querySelectorAll(\"iframe\"); _i21 < _document$querySelect2.length; _i21++) {\n var frame = _document$querySelect2[_i21];\n if (frame && frame.contentWindow && frame.contentWindow === win) return frame;\n }\n }\n function closeWindow(win) {\n if (function(win) {\n void 0 === win && (win = window);\n return Boolean(utils_getParent(win));\n }(win)) {\n var frame = getFrameForWindow(win);\n if (frame && frame.parentElement) {\n frame.parentElement.removeChild(frame);\n return;\n }\n }\n try {\n win.close();\n } catch (err) {}\n }\n function util_safeIndexOf(collection, item) {\n for (var i = 0; i < collection.length; i++) try {\n if (collection[i] === item) return i;\n } catch (err) {}\n return -1;\n }\n var weakmap_CrossDomainSafeWeakMap = function() {\n function CrossDomainSafeWeakMap() {\n this.name = void 0;\n this.weakmap = void 0;\n this.keys = void 0;\n this.values = void 0;\n this.name = \"__weakmap_\" + (1e9 * Math.random() >>> 0) + \"__\";\n if (function() {\n if (\"undefined\" == typeof WeakMap) return !1;\n if (void 0 === Object.freeze) return !1;\n try {\n var testWeakMap = new WeakMap;\n var testKey = {};\n Object.freeze(testKey);\n testWeakMap.set(testKey, \"__testvalue__\");\n return \"__testvalue__\" === testWeakMap.get(testKey);\n } catch (err) {\n return !1;\n }\n }()) try {\n this.weakmap = new WeakMap;\n } catch (err) {}\n this.keys = [];\n this.values = [];\n }\n var _proto = CrossDomainSafeWeakMap.prototype;\n _proto._cleanupClosedWindows = function() {\n var weakmap = this.weakmap;\n var keys = this.keys;\n for (var i = 0; i < keys.length; i++) {\n var value = keys[i];\n if (isWindow(value) && isWindowClosed(value)) {\n if (weakmap) try {\n weakmap.delete(value);\n } catch (err) {}\n keys.splice(i, 1);\n this.values.splice(i, 1);\n i -= 1;\n }\n }\n };\n _proto.isSafeToReadWrite = function(key) {\n return !isWindow(key);\n };\n _proto.set = function(key, value) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.set(key, value);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var name = this.name;\n var entry = key[name];\n entry && entry[0] === key ? entry[1] = value : Object.defineProperty(key, name, {\n value: [ key, value ],\n writable: !0\n });\n return;\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var values = this.values;\n var index = util_safeIndexOf(keys, key);\n if (-1 === index) {\n keys.push(key);\n values.push(value);\n } else values[index] = value;\n };\n _proto.get = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return weakmap.get(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return entry && entry[0] === key ? entry[1] : void 0;\n } catch (err) {}\n this._cleanupClosedWindows();\n var index = util_safeIndexOf(this.keys, key);\n if (-1 !== index) return this.values[index];\n };\n _proto.delete = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n weakmap.delete(key);\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n entry && entry[0] === key && (entry[0] = entry[1] = void 0);\n } catch (err) {}\n this._cleanupClosedWindows();\n var keys = this.keys;\n var index = util_safeIndexOf(keys, key);\n if (-1 !== index) {\n keys.splice(index, 1);\n this.values.splice(index, 1);\n }\n };\n _proto.has = function(key) {\n if (!key) throw new Error(\"WeakMap expected key\");\n var weakmap = this.weakmap;\n if (weakmap) try {\n if (weakmap.has(key)) return !0;\n } catch (err) {\n delete this.weakmap;\n }\n if (this.isSafeToReadWrite(key)) try {\n var entry = key[this.name];\n return !(!entry || entry[0] !== key);\n } catch (err) {}\n this._cleanupClosedWindows();\n return -1 !== util_safeIndexOf(this.keys, key);\n };\n _proto.getOrSet = function(key, getter) {\n if (this.has(key)) return this.get(key);\n var value = getter();\n this.set(key, value);\n return value;\n };\n return CrossDomainSafeWeakMap;\n }();\n function _getPrototypeOf(o) {\n return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n })(o);\n }\n function _isNativeReflectConstruct() {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));\n return !0;\n } catch (e) {\n return !1;\n }\n }\n function construct_construct(Parent, args, Class) {\n return (construct_construct = _isNativeReflectConstruct() ? Reflect.construct : function(Parent, args, Class) {\n var a = [ null ];\n a.push.apply(a, args);\n var instance = new (Function.bind.apply(Parent, a));\n Class && _setPrototypeOf(instance, Class.prototype);\n return instance;\n }).apply(null, arguments);\n }\n function wrapNativeSuper_wrapNativeSuper(Class) {\n var _cache = \"function\" == typeof Map ? new Map : void 0;\n return (wrapNativeSuper_wrapNativeSuper = function(Class) {\n if (null === Class || !(fn = Class, -1 !== Function.toString.call(fn).indexOf(\"[native code]\"))) return Class;\n var fn;\n if (\"function\" != typeof Class) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== _cache) {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct_construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n })(Class);\n }\n function getFunctionName(fn) {\n return fn.name || fn.__name__ || fn.displayName || \"anonymous\";\n }\n function setFunctionName(fn, name) {\n try {\n delete fn.name;\n fn.name = name;\n } catch (err) {}\n fn.__name__ = fn.displayName = name;\n return fn;\n }\n function base64encode(str) {\n if (\"function\" == typeof btoa) return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (function(m, p1) {\n return String.fromCharCode(parseInt(p1, 16));\n }))).replace(/[=]/g, \"\");\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"utf8\").toString(\"base64\").replace(/[=]/g, \"\");\n throw new Error(\"Can not find window.btoa or Buffer\");\n }\n function uniqueID() {\n var chars = \"0123456789abcdef\";\n return \"uid_\" + \"xxxxxxxxxx\".replace(/./g, (function() {\n return chars.charAt(Math.floor(Math.random() * chars.length));\n })) + \"_\" + base64encode((new Date).toISOString().slice(11, 19).replace(\"T\", \".\")).replace(/[^a-zA-Z0-9]/g, \"\").toLowerCase();\n }\n var objectIDs;\n function serializeArgs(args) {\n try {\n return JSON.stringify([].slice.call(args), (function(subkey, val) {\n return \"function\" == typeof val ? \"memoize[\" + function(obj) {\n objectIDs = objectIDs || new weakmap_CrossDomainSafeWeakMap;\n if (null == obj || \"object\" != typeof obj && \"function\" != typeof obj) throw new Error(\"Invalid object\");\n var uid = objectIDs.get(obj);\n if (!uid) {\n uid = typeof obj + \":\" + uniqueID();\n objectIDs.set(obj, uid);\n }\n return uid;\n }(val) + \"]\" : val;\n }));\n } catch (err) {\n throw new Error(\"Arguments not serializable -- can not be used to memoize\");\n }\n }\n function getEmptyObject() {\n return {};\n }\n var memoizeGlobalIndex = 0;\n var memoizeGlobalIndexValidFrom = 0;\n function memoize(method, options) {\n void 0 === options && (options = {});\n var _options$thisNamespac = options.thisNamespace, thisNamespace = void 0 !== _options$thisNamespac && _options$thisNamespac, cacheTime = options.time;\n var simpleCache;\n var thisCache;\n var memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n var memoizedFunction = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n if (memoizeIndex < memoizeGlobalIndexValidFrom) {\n simpleCache = null;\n thisCache = null;\n memoizeIndex = memoizeGlobalIndex;\n memoizeGlobalIndex += 1;\n }\n var cache;\n cache = thisNamespace ? (thisCache = thisCache || new weakmap_CrossDomainSafeWeakMap).getOrSet(this, getEmptyObject) : simpleCache = simpleCache || {};\n var cacheKey = serializeArgs(args);\n var cacheResult = cache[cacheKey];\n if (cacheResult && cacheTime && Date.now() - cacheResult.time < cacheTime) {\n delete cache[cacheKey];\n cacheResult = null;\n }\n if (cacheResult) return cacheResult.value;\n var time = Date.now();\n var value = method.apply(this, arguments);\n cache[cacheKey] = {\n time: time,\n value: value\n };\n return value;\n };\n memoizedFunction.reset = function() {\n simpleCache = null;\n thisCache = null;\n };\n return setFunctionName(memoizedFunction, (options.name || getFunctionName(method)) + \"::memoized\");\n }\n memoize.clear = function() {\n memoizeGlobalIndexValidFrom = memoizeGlobalIndex;\n };\n function memoizePromise(method) {\n var cache = {};\n function memoizedPromiseFunction() {\n var _arguments = arguments, _this = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n var key = serializeArgs(args);\n if (cache.hasOwnProperty(key)) return cache[key];\n cache[key] = promise_ZalgoPromise.try((function() {\n return method.apply(_this, _arguments);\n })).finally((function() {\n delete cache[key];\n }));\n return cache[key];\n }\n memoizedPromiseFunction.reset = function() {\n cache = {};\n };\n return setFunctionName(memoizedPromiseFunction, getFunctionName(method) + \"::promiseMemoized\");\n }\n function src_util_noop() {}\n function once(method) {\n var called = !1;\n return setFunctionName((function() {\n if (!called) {\n called = !0;\n return method.apply(this, arguments);\n }\n }), getFunctionName(method) + \"::once\");\n }\n function stringifyError(err, level) {\n void 0 === level && (level = 1);\n if (level >= 3) return \"stringifyError stack overflow\";\n try {\n if (!err) return \"\";\n if (\"string\" == typeof err) return err;\n if (err instanceof Error) {\n var stack = err && err.stack;\n var message = err && err.message;\n if (stack && message) return -1 !== stack.indexOf(message) ? stack : message + \"\\n\" + stack;\n if (stack) return stack;\n if (message) return message;\n }\n return err && err.toString && \"function\" == typeof err.toString ? err.toString() : {}.toString.call(err);\n } catch (newErr) {\n return \"Error while stringifying error: \" + stringifyError(newErr, level + 1);\n }\n }\n function stringify(item) {\n return \"string\" == typeof item ? item : item && item.toString && \"function\" == typeof item.toString ? item.toString() : {}.toString.call(item);\n }\n function extend(obj, source) {\n if (!source) return obj;\n if (Object.assign) return Object.assign(obj, source);\n for (var key in source) source.hasOwnProperty(key) && (obj[key] = source[key]);\n return obj;\n }\n memoize((function(obj) {\n if (Object.values) return Object.values(obj);\n var result = [];\n for (var key in obj) obj.hasOwnProperty(key) && result.push(obj[key]);\n return result;\n }));\n function identity(item) {\n return item;\n }\n function safeInterval(method, time) {\n var timeout;\n !function loop() {\n timeout = setTimeout((function() {\n method();\n loop();\n }), time);\n }();\n return {\n cancel: function() {\n clearTimeout(timeout);\n }\n };\n }\n function arrayFrom(item) {\n return [].slice.call(item);\n }\n function isDefined(value) {\n return null != value;\n }\n function util_isRegex(item) {\n return \"[object RegExp]\" === {}.toString.call(item);\n }\n function util_getOrSet(obj, key, getter) {\n if (obj.hasOwnProperty(key)) return obj[key];\n var val = getter();\n obj[key] = val;\n return val;\n }\n function cleanup(obj) {\n var tasks = [];\n var cleaned = !1;\n var cleanErr;\n var cleaner = {\n set: function(name, item) {\n if (!cleaned) {\n obj[name] = item;\n cleaner.register((function() {\n delete obj[name];\n }));\n }\n return item;\n },\n register: function(method) {\n var task = once((function() {\n return method(cleanErr);\n }));\n cleaned ? method(cleanErr) : tasks.push(task);\n return {\n cancel: function() {\n var index = tasks.indexOf(task);\n -1 !== index && tasks.splice(index, 1);\n }\n };\n },\n all: function(err) {\n cleanErr = err;\n var results = [];\n cleaned = !0;\n for (;tasks.length; ) {\n var task = tasks.shift();\n results.push(task());\n }\n return promise_ZalgoPromise.all(results).then(src_util_noop);\n }\n };\n return cleaner;\n }\n function assertExists(name, thing) {\n if (null == thing) throw new Error(\"Expected \" + name + \" to be present\");\n return thing;\n }\n var util_ExtendableError = function(_Error) {\n _inheritsLoose(ExtendableError, _Error);\n function ExtendableError(message) {\n var _this6;\n (_this6 = _Error.call(this, message) || this).name = _this6.constructor.name;\n \"function\" == typeof Error.captureStackTrace ? Error.captureStackTrace(function(self) {\n if (void 0 === self) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return self;\n }(_this6), _this6.constructor) : _this6.stack = new Error(message).stack;\n return _this6;\n }\n return ExtendableError;\n }(wrapNativeSuper_wrapNativeSuper(Error));\n function getBody() {\n var body = document.body;\n if (!body) throw new Error(\"Body element not found\");\n return body;\n }\n function isDocumentReady() {\n return Boolean(document.body) && \"complete\" === document.readyState;\n }\n function isDocumentInteractive() {\n return Boolean(document.body) && \"interactive\" === document.readyState;\n }\n function urlEncode(str) {\n return encodeURIComponent(str);\n }\n memoize((function() {\n return new promise_ZalgoPromise((function(resolve) {\n if (isDocumentReady() || isDocumentInteractive()) return resolve();\n var interval = setInterval((function() {\n if (isDocumentReady() || isDocumentInteractive()) {\n clearInterval(interval);\n return resolve();\n }\n }), 10);\n }));\n }));\n function parseQuery(queryString) {\n return function(method, logic, args) {\n void 0 === args && (args = []);\n var cache = method.__inline_memoize_cache__ = method.__inline_memoize_cache__ || {};\n var key = serializeArgs(args);\n return cache.hasOwnProperty(key) ? cache[key] : cache[key] = function() {\n var params = {};\n if (!queryString) return params;\n if (-1 === queryString.indexOf(\"=\")) return params;\n for (var _i2 = 0, _queryString$split2 = queryString.split(\"&\"); _i2 < _queryString$split2.length; _i2++) {\n var pair = _queryString$split2[_i2];\n (pair = pair.split(\"=\"))[0] && pair[1] && (params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]));\n }\n return params;\n }.apply(void 0, args);\n }(parseQuery, 0, [ queryString ]);\n }\n function extendQuery(originalQuery, props) {\n void 0 === props && (props = {});\n return props && Object.keys(props).length ? function(obj) {\n void 0 === obj && (obj = {});\n return Object.keys(obj).filter((function(key) {\n return \"string\" == typeof obj[key] || \"boolean\" == typeof obj[key];\n })).map((function(key) {\n var val = obj[key];\n if (\"string\" != typeof val && \"boolean\" != typeof val) throw new TypeError(\"Invalid type for query\");\n return urlEncode(key) + \"=\" + urlEncode(val.toString());\n })).join(\"&\");\n }(_extends({}, parseQuery(originalQuery), props)) : originalQuery;\n }\n function appendChild(container, child) {\n container.appendChild(child);\n }\n function isElement(element) {\n return element instanceof window.Element || null !== element && \"object\" == typeof element && 1 === element.nodeType && \"object\" == typeof element.style && \"object\" == typeof element.ownerDocument;\n }\n function getElementSafe(id, doc) {\n void 0 === doc && (doc = document);\n return isElement(id) ? id : \"string\" == typeof id ? doc.querySelector(id) : void 0;\n }\n function elementReady(id) {\n return new promise_ZalgoPromise((function(resolve, reject) {\n var name = stringify(id);\n var el = getElementSafe(id);\n if (el) return resolve(el);\n if (isDocumentReady()) return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n var interval = setInterval((function() {\n if (el = getElementSafe(id)) {\n resolve(el);\n clearInterval(interval);\n } else if (isDocumentReady()) {\n clearInterval(interval);\n return reject(new Error(\"Document is ready and element \" + name + \" does not exist\"));\n }\n }), 10);\n }));\n }\n var dom_PopupOpenError = function(_ExtendableError) {\n _inheritsLoose(PopupOpenError, _ExtendableError);\n function PopupOpenError() {\n return _ExtendableError.apply(this, arguments) || this;\n }\n return PopupOpenError;\n }(util_ExtendableError);\n var awaitFrameLoadPromises;\n function awaitFrameLoad(frame) {\n if ((awaitFrameLoadPromises = awaitFrameLoadPromises || new weakmap_CrossDomainSafeWeakMap).has(frame)) {\n var _promise = awaitFrameLoadPromises.get(frame);\n if (_promise) return _promise;\n }\n var promise = new promise_ZalgoPromise((function(resolve, reject) {\n frame.addEventListener(\"load\", (function() {\n !function(frame) {\n !function() {\n for (var i = 0; i < iframeWindows.length; i++) {\n var closed = !1;\n try {\n closed = iframeWindows[i].closed;\n } catch (err) {}\n if (closed) {\n iframeFrames.splice(i, 1);\n iframeWindows.splice(i, 1);\n }\n }\n }();\n if (frame && frame.contentWindow) try {\n iframeWindows.push(frame.contentWindow);\n iframeFrames.push(frame);\n } catch (err) {}\n }(frame);\n resolve(frame);\n }));\n frame.addEventListener(\"error\", (function(err) {\n frame.contentWindow ? resolve(frame) : reject(err);\n }));\n }));\n awaitFrameLoadPromises.set(frame, promise);\n return promise;\n }\n function awaitFrameWindow(frame) {\n return awaitFrameLoad(frame).then((function(loadedFrame) {\n if (!loadedFrame.contentWindow) throw new Error(\"Could not find window in iframe\");\n return loadedFrame.contentWindow;\n }));\n }\n function dom_iframe(options, container) {\n void 0 === options && (options = {});\n var style = options.style || {};\n var frame = function(tag, options, container) {\n void 0 === tag && (tag = \"div\");\n void 0 === options && (options = {});\n tag = tag.toLowerCase();\n var element = document.createElement(tag);\n options.style && extend(element.style, options.style);\n options.class && (element.className = options.class.join(\" \"));\n options.id && element.setAttribute(\"id\", options.id);\n if (options.attributes) for (var _i10 = 0, _Object$keys2 = Object.keys(options.attributes); _i10 < _Object$keys2.length; _i10++) {\n var key = _Object$keys2[_i10];\n element.setAttribute(key, options.attributes[key]);\n }\n options.styleSheet && function(el, styleText, doc) {\n void 0 === doc && (doc = window.document);\n el.styleSheet ? el.styleSheet.cssText = styleText : el.appendChild(doc.createTextNode(styleText));\n }(element, options.styleSheet);\n if (options.html) {\n if (\"iframe\" === tag) throw new Error(\"Iframe html can not be written unless container provided and iframe in DOM\");\n element.innerHTML = options.html;\n }\n return element;\n }(\"iframe\", {\n attributes: _extends({\n allowTransparency: \"true\"\n }, options.attributes || {}),\n style: _extends({\n backgroundColor: \"transparent\",\n border: \"none\"\n }, style),\n html: options.html,\n class: options.class\n });\n var isIE = window.navigator.userAgent.match(/MSIE|Edge/i);\n frame.hasAttribute(\"id\") || frame.setAttribute(\"id\", uniqueID());\n awaitFrameLoad(frame);\n container && function(id, doc) {\n void 0 === doc && (doc = document);\n var element = getElementSafe(id, doc);\n if (element) return element;\n throw new Error(\"Can not find element: \" + stringify(id));\n }(container).appendChild(frame);\n (options.url || isIE) && frame.setAttribute(\"src\", options.url || \"about:blank\");\n return frame;\n }\n function addEventListener(obj, event, handler) {\n obj.addEventListener(event, handler);\n return {\n cancel: function() {\n obj.removeEventListener(event, handler);\n }\n };\n }\n function showElement(element) {\n element.style.setProperty(\"display\", \"\");\n }\n function hideElement(element) {\n element.style.setProperty(\"display\", \"none\", \"important\");\n }\n function destroyElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n function isElementClosed(el) {\n return !(el && el.parentNode && el.ownerDocument && el.ownerDocument.documentElement && el.ownerDocument.documentElement.contains(el));\n }\n function onResize(el, handler, _temp) {\n var _ref2 = void 0 === _temp ? {} : _temp, _ref2$width = _ref2.width, width = void 0 === _ref2$width || _ref2$width, _ref2$height = _ref2.height, height = void 0 === _ref2$height || _ref2$height, _ref2$interval = _ref2.interval, interval = void 0 === _ref2$interval ? 100 : _ref2$interval, _ref2$win = _ref2.win, win = void 0 === _ref2$win ? window : _ref2$win;\n var currentWidth = el.offsetWidth;\n var currentHeight = el.offsetHeight;\n var canceled = !1;\n handler({\n width: currentWidth,\n height: currentHeight\n });\n var check = function() {\n if (!canceled && function(el) {\n return Boolean(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n }(el)) {\n var newWidth = el.offsetWidth;\n var newHeight = el.offsetHeight;\n (width && newWidth !== currentWidth || height && newHeight !== currentHeight) && handler({\n width: newWidth,\n height: newHeight\n });\n currentWidth = newWidth;\n currentHeight = newHeight;\n }\n };\n var observer;\n var timeout;\n win.addEventListener(\"resize\", check);\n if (void 0 !== win.ResizeObserver) {\n (observer = new win.ResizeObserver(check)).observe(el);\n timeout = safeInterval(check, 10 * interval);\n } else if (void 0 !== win.MutationObserver) {\n (observer = new win.MutationObserver(check)).observe(el, {\n attributes: !0,\n childList: !0,\n subtree: !0,\n characterData: !1\n });\n timeout = safeInterval(check, 10 * interval);\n } else timeout = safeInterval(check, interval);\n return {\n cancel: function() {\n canceled = !0;\n observer.disconnect();\n window.removeEventListener(\"resize\", check);\n timeout.cancel();\n }\n };\n }\n function isShadowElement(element) {\n for (;element.parentNode; ) element = element.parentNode;\n return \"[object ShadowRoot]\" === element.toString();\n }\n var currentScript = \"undefined\" != typeof document ? document.currentScript : null;\n var getCurrentScript = memoize((function() {\n if (currentScript) return currentScript;\n if (currentScript = function() {\n try {\n var stack = function() {\n try {\n throw new Error(\"_\");\n } catch (err) {\n return err.stack || \"\";\n }\n }();\n var stackDetails = /.*at [^(]*\\((.*):(.+):(.+)\\)$/gi.exec(stack);\n var scriptLocation = stackDetails && stackDetails[1];\n if (!scriptLocation) return;\n for (var _i22 = 0, _Array$prototype$slic2 = [].slice.call(document.getElementsByTagName(\"script\")).reverse(); _i22 < _Array$prototype$slic2.length; _i22++) {\n var script = _Array$prototype$slic2[_i22];\n if (script.src && script.src === scriptLocation) return script;\n }\n } catch (err) {}\n }()) return currentScript;\n throw new Error(\"Can not determine current script\");\n }));\n var currentUID = uniqueID();\n memoize((function() {\n var script;\n try {\n script = getCurrentScript();\n } catch (err) {\n return currentUID;\n }\n var uid = script.getAttribute(\"data-uid\");\n if (uid && \"string\" == typeof uid) return uid;\n if ((uid = script.getAttribute(\"data-uid-auto\")) && \"string\" == typeof uid) return uid;\n if (script.src) {\n var hashedString = function(str) {\n var hash = \"\";\n for (var i = 0; i < str.length; i++) {\n var total = str[i].charCodeAt(0) * i;\n str[i + 1] && (total += str[i + 1].charCodeAt(0) * (i - 1));\n hash += String.fromCharCode(97 + Math.abs(total) % 26);\n }\n return hash;\n }(JSON.stringify({\n src: script.src,\n dataset: script.dataset\n }));\n uid = \"uid_\" + hashedString.slice(hashedString.length - 30);\n } else uid = uniqueID();\n script.setAttribute(\"data-uid-auto\", uid);\n return uid;\n }));\n function isPerc(str) {\n return \"string\" == typeof str && /^[0-9]+%$/.test(str);\n }\n function toNum(val) {\n if (\"number\" == typeof val) return val;\n var match = val.match(/^([0-9]+)(px|%)$/);\n if (!match) throw new Error(\"Could not match css value from \" + val);\n return parseInt(match[1], 10);\n }\n function toPx(val) {\n return toNum(val) + \"px\";\n }\n function toCSS(val) {\n return \"number\" == typeof val ? toPx(val) : isPerc(val) ? val : toPx(val);\n }\n function normalizeDimension(dim, max) {\n if (\"number\" == typeof dim) return dim;\n if (isPerc(dim)) return parseInt(max * toNum(dim) / 100, 10);\n if (\"string\" == typeof (str = dim) && /^[0-9]+px$/.test(str)) return toNum(dim);\n var str;\n throw new Error(\"Can not normalize dimension: \" + dim);\n }\n function global_getGlobal(win) {\n void 0 === win && (win = window);\n var globalKey = \"__post_robot_10_0_44__\";\n return win !== window ? win[globalKey] : win[globalKey] = win[globalKey] || {};\n }\n var getObj = function() {\n return {};\n };\n function globalStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return util_getOrSet(global_getGlobal(), key, (function() {\n var store = defStore();\n return {\n has: function(storeKey) {\n return store.hasOwnProperty(storeKey);\n },\n get: function(storeKey, defVal) {\n return store.hasOwnProperty(storeKey) ? store[storeKey] : defVal;\n },\n set: function(storeKey, val) {\n store[storeKey] = val;\n return val;\n },\n del: function(storeKey) {\n delete store[storeKey];\n },\n getOrSet: function(storeKey, getter) {\n return util_getOrSet(store, storeKey, getter);\n },\n reset: function() {\n store = defStore();\n },\n keys: function() {\n return Object.keys(store);\n }\n };\n }));\n }\n var WildCard = function() {};\n function getWildcard() {\n var global = global_getGlobal();\n global.WINDOW_WILDCARD = global.WINDOW_WILDCARD || new WildCard;\n return global.WINDOW_WILDCARD;\n }\n function windowStore(key, defStore) {\n void 0 === key && (key = \"store\");\n void 0 === defStore && (defStore = getObj);\n return globalStore(\"windowStore\").getOrSet(key, (function() {\n var winStore = new weakmap_CrossDomainSafeWeakMap;\n var getStore = function(win) {\n return winStore.getOrSet(win, defStore);\n };\n return {\n has: function(win) {\n return getStore(win).hasOwnProperty(key);\n },\n get: function(win, defVal) {\n var store = getStore(win);\n return store.hasOwnProperty(key) ? store[key] : defVal;\n },\n set: function(win, val) {\n getStore(win)[key] = val;\n return val;\n },\n del: function(win) {\n delete getStore(win)[key];\n },\n getOrSet: function(win, getter) {\n return util_getOrSet(getStore(win), key, getter);\n }\n };\n }));\n }\n function getInstanceID() {\n return globalStore(\"instance\").getOrSet(\"instanceID\", uniqueID);\n }\n function resolveHelloPromise(win, _ref) {\n var domain = _ref.domain;\n var helloPromises = windowStore(\"helloPromises\");\n var existingPromise = helloPromises.get(win);\n existingPromise && existingPromise.resolve({\n domain: domain\n });\n var newPromise = promise_ZalgoPromise.resolve({\n domain: domain\n });\n helloPromises.set(win, newPromise);\n return newPromise;\n }\n function sayHello(win, _ref4) {\n return (0, _ref4.send)(win, \"postrobot_hello\", {\n instanceID: getInstanceID()\n }, {\n domain: \"*\",\n timeout: -1\n }).then((function(_ref5) {\n var origin = _ref5.origin, instanceID = _ref5.data.instanceID;\n resolveHelloPromise(win, {\n domain: origin\n });\n return {\n win: win,\n domain: origin,\n instanceID: instanceID\n };\n }));\n }\n function getWindowInstanceID(win, _ref6) {\n var send = _ref6.send;\n return windowStore(\"windowInstanceIDPromises\").getOrSet(win, (function() {\n return sayHello(win, {\n send: send\n }).then((function(_ref7) {\n return _ref7.instanceID;\n }));\n }));\n }\n function awaitWindowHello(win, timeout, name) {\n void 0 === timeout && (timeout = 5e3);\n void 0 === name && (name = \"Window\");\n var promise = function(win) {\n return windowStore(\"helloPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }(win);\n -1 !== timeout && (promise = promise.timeout(timeout, new Error(name + \" did not load after \" + timeout + \"ms\")));\n return promise;\n }\n function markWindowKnown(win) {\n windowStore(\"knownWindows\").set(win, !0);\n }\n function isSerializedType(item) {\n return \"object\" == typeof item && null !== item && \"string\" == typeof item.__type__;\n }\n function determineType(val) {\n return void 0 === val ? \"undefined\" : null === val ? \"null\" : Array.isArray(val) ? \"array\" : \"function\" == typeof val ? \"function\" : \"object\" == typeof val ? val instanceof Error ? \"error\" : \"function\" == typeof val.then ? \"promise\" : \"[object RegExp]\" === {}.toString.call(val) ? \"regex\" : \"[object Date]\" === {}.toString.call(val) ? \"date\" : \"object\" : \"string\" == typeof val ? \"string\" : \"number\" == typeof val ? \"number\" : \"boolean\" == typeof val ? \"boolean\" : void 0;\n }\n function serializeType(type, val) {\n return {\n __type__: type,\n __val__: val\n };\n }\n var _SERIALIZER;\n var SERIALIZER = ((_SERIALIZER = {}).function = function() {}, _SERIALIZER.error = function(_ref) {\n return serializeType(\"error\", {\n message: _ref.message,\n stack: _ref.stack,\n code: _ref.code,\n data: _ref.data\n });\n }, _SERIALIZER.promise = function() {}, _SERIALIZER.regex = function(val) {\n return serializeType(\"regex\", val.source);\n }, _SERIALIZER.date = function(val) {\n return serializeType(\"date\", val.toJSON());\n }, _SERIALIZER.array = function(val) {\n return val;\n }, _SERIALIZER.object = function(val) {\n return val;\n }, _SERIALIZER.string = function(val) {\n return val;\n }, _SERIALIZER.number = function(val) {\n return val;\n }, _SERIALIZER.boolean = function(val) {\n return val;\n }, _SERIALIZER.null = function(val) {\n return val;\n }, _SERIALIZER[void 0] = function(val) {\n return serializeType(\"undefined\", val);\n }, _SERIALIZER);\n var defaultSerializers = {};\n var _DESERIALIZER;\n var DESERIALIZER = ((_DESERIALIZER = {}).function = function() {\n throw new Error(\"Function serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.error = function(_ref2) {\n var stack = _ref2.stack, code = _ref2.code, data = _ref2.data;\n var error = new Error(_ref2.message);\n error.code = code;\n data && (error.data = data);\n error.stack = stack + \"\\n\\n\" + error.stack;\n return error;\n }, _DESERIALIZER.promise = function() {\n throw new Error(\"Promise serialization is not implemented; nothing to deserialize\");\n }, _DESERIALIZER.regex = function(val) {\n return new RegExp(val);\n }, _DESERIALIZER.date = function(val) {\n return new Date(val);\n }, _DESERIALIZER.array = function(val) {\n return val;\n }, _DESERIALIZER.object = function(val) {\n return val;\n }, _DESERIALIZER.string = function(val) {\n return val;\n }, _DESERIALIZER.number = function(val) {\n return val;\n }, _DESERIALIZER.boolean = function(val) {\n return val;\n }, _DESERIALIZER.null = function(val) {\n return val;\n }, _DESERIALIZER[void 0] = function() {}, _DESERIALIZER);\n var defaultDeserializers = {};\n function needsBridgeForBrowser() {\n return !!utils_getUserAgent(window).match(/MSIE|trident|edge\\/12|edge\\/13/i);\n }\n function needsBridgeForWin(win) {\n return !isSameTopWindow(window, win);\n }\n function needsBridgeForDomain(domain, win) {\n if (domain) {\n if (getDomain() !== getDomainFromUrl(domain)) return !0;\n } else if (win && !isSameDomain(win)) return !0;\n return !1;\n }\n function needsBridge(_ref) {\n var win = _ref.win, domain = _ref.domain;\n return !(!needsBridgeForBrowser() || domain && !needsBridgeForDomain(domain, win) || win && !needsBridgeForWin(win));\n }\n function getBridgeName(domain) {\n return \"__postrobot_bridge___\" + (domain = domain || getDomainFromUrl(domain)).replace(/[^a-zA-Z0-9]+/g, \"_\");\n }\n function isBridge() {\n return Boolean(window.name && window.name === getBridgeName(getDomain()));\n }\n var documentBodyReady = new promise_ZalgoPromise((function(resolve) {\n if (window.document && window.document.body) return resolve(window.document.body);\n var interval = setInterval((function() {\n if (window.document && window.document.body) {\n clearInterval(interval);\n return resolve(window.document.body);\n }\n }), 10);\n }));\n function registerRemoteWindow(win) {\n windowStore(\"remoteWindowPromises\").getOrSet(win, (function() {\n return new promise_ZalgoPromise;\n }));\n }\n function findRemoteWindow(win) {\n var remoteWinPromise = windowStore(\"remoteWindowPromises\").get(win);\n if (!remoteWinPromise) throw new Error(\"Remote window promise not found\");\n return remoteWinPromise;\n }\n function registerRemoteSendMessage(win, domain, sendMessage) {\n findRemoteWindow(win).resolve((function(remoteWin, remoteDomain, message) {\n if (remoteWin !== win) throw new Error(\"Remote window does not match window\");\n if (!matchDomain(remoteDomain, domain)) throw new Error(\"Remote domain \" + remoteDomain + \" does not match domain \" + domain);\n sendMessage.fireAndForget(message);\n }));\n }\n function rejectRemoteSendMessage(win, err) {\n findRemoteWindow(win).reject(err).catch(src_util_noop);\n }\n function linkWindow(_ref3) {\n var win = _ref3.win, name = _ref3.name, domain = _ref3.domain;\n var popupWindowsByName = globalStore(\"popupWindowsByName\");\n var popupWindowsByWin = windowStore(\"popupWindowsByWin\");\n for (var _i2 = 0, _popupWindowsByName$k2 = popupWindowsByName.keys(); _i2 < _popupWindowsByName$k2.length; _i2++) {\n var winName = _popupWindowsByName$k2[_i2];\n var _details = popupWindowsByName.get(winName);\n _details && !isWindowClosed(_details.win) || popupWindowsByName.del(winName);\n }\n if (isWindowClosed(win)) return {\n win: win,\n name: name,\n domain: domain\n };\n var details = popupWindowsByWin.getOrSet(win, (function() {\n return name ? popupWindowsByName.getOrSet(name, (function() {\n return {\n win: win,\n name: name\n };\n })) : {\n win: win\n };\n }));\n if (details.win && details.win !== win) throw new Error(\"Different window already linked for window: \" + (name || \"undefined\"));\n if (name) {\n details.name = name;\n popupWindowsByName.set(name, details);\n }\n if (domain) {\n details.domain = domain;\n registerRemoteWindow(win);\n }\n popupWindowsByWin.set(win, details);\n return details;\n }\n function setupBridge(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n windowOpen = window.open, window.open = function(url, name, options, last) {\n var win = windowOpen.call(this, normalizeMockUrl(url), name, options, last);\n if (!win) return win;\n linkWindow({\n win: win,\n name: name,\n domain: url ? getDomainFromUrl(url) : null\n });\n return win;\n };\n var windowOpen;\n !function(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n var popupWindowsByName = globalStore(\"popupWindowsByName\");\n on(\"postrobot_open_tunnel\", (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var bridgePromise = globalStore(\"bridges\").get(origin);\n if (!bridgePromise) throw new Error(\"Can not find bridge promise for domain \" + origin);\n return bridgePromise.then((function(bridge) {\n if (source !== bridge) throw new Error(\"Message source does not matched registered bridge for domain \" + origin);\n if (!data.name) throw new Error(\"Register window expected to be passed window name\");\n if (!data.sendMessage) throw new Error(\"Register window expected to be passed sendMessage method\");\n if (!popupWindowsByName.has(data.name)) throw new Error(\"Window with name \" + data.name + \" does not exist, or was not opened by this window\");\n var getWindowDetails = function() {\n return popupWindowsByName.get(data.name);\n };\n if (!getWindowDetails().domain) throw new Error(\"We do not have a registered domain for window \" + data.name);\n if (getWindowDetails().domain !== origin) throw new Error(\"Message origin \" + origin + \" does not matched registered window origin \" + (getWindowDetails().domain || \"unknown\"));\n registerRemoteSendMessage(getWindowDetails().win, origin, data.sendMessage);\n return {\n sendMessage: function(message) {\n if (window && !window.closed && getWindowDetails()) {\n var domain = getWindowDetails().domain;\n if (domain) try {\n receiveMessage({\n data: message,\n origin: domain,\n source: getWindowDetails().win\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n promise_ZalgoPromise.reject(err);\n }\n }\n }\n };\n }));\n }));\n }({\n on: on,\n send: send,\n receiveMessage: receiveMessage\n });\n !function(_ref2) {\n var send = _ref2.send;\n global_getGlobal(window).openTunnelToParent = function(_ref3) {\n var name = _ref3.name, source = _ref3.source, canary = _ref3.canary, sendMessage = _ref3.sendMessage;\n var tunnelWindows = globalStore(\"tunnelWindows\");\n var parentWindow = utils_getParent(window);\n if (!parentWindow) throw new Error(\"No parent window found to open tunnel to\");\n var id = function(_ref) {\n var name = _ref.name, source = _ref.source, canary = _ref.canary, sendMessage = _ref.sendMessage;\n !function() {\n var tunnelWindows = globalStore(\"tunnelWindows\");\n for (var _i2 = 0, _tunnelWindows$keys2 = tunnelWindows.keys(); _i2 < _tunnelWindows$keys2.length; _i2++) {\n var key = _tunnelWindows$keys2[_i2];\n isWindowClosed(tunnelWindows[key].source) && tunnelWindows.del(key);\n }\n }();\n var id = uniqueID();\n globalStore(\"tunnelWindows\").set(id, {\n name: name,\n source: source,\n canary: canary,\n sendMessage: sendMessage\n });\n return id;\n }({\n name: name,\n source: source,\n canary: canary,\n sendMessage: sendMessage\n });\n return send(parentWindow, \"postrobot_open_tunnel\", {\n name: name,\n sendMessage: function() {\n var tunnelWindow = tunnelWindows.get(id);\n if (tunnelWindow && tunnelWindow.source && !isWindowClosed(tunnelWindow.source)) {\n try {\n tunnelWindow.canary();\n } catch (err) {\n return;\n }\n tunnelWindow.sendMessage.apply(this, arguments);\n }\n }\n }, {\n domain: \"*\"\n });\n };\n }({\n send: send\n });\n !function(_ref) {\n var on = _ref.on, send = _ref.send, receiveMessage = _ref.receiveMessage;\n promise_ZalgoPromise.try((function() {\n var opener = getOpener(window);\n if (opener && needsBridge({\n win: opener\n })) {\n registerRemoteWindow(opener);\n return (win = opener, windowStore(\"remoteBridgeAwaiters\").getOrSet(win, (function() {\n return promise_ZalgoPromise.try((function() {\n var frame = getFrameByName(win, getBridgeName(getDomain()));\n if (frame) return isSameDomain(frame) && global_getGlobal(assertSameDomain(frame)) ? frame : new promise_ZalgoPromise((function(resolve) {\n var interval;\n var timeout;\n interval = setInterval((function() {\n if (frame && isSameDomain(frame) && global_getGlobal(assertSameDomain(frame))) {\n clearInterval(interval);\n clearTimeout(timeout);\n return resolve(frame);\n }\n }), 100);\n timeout = setTimeout((function() {\n clearInterval(interval);\n return resolve();\n }), 2e3);\n }));\n }));\n }))).then((function(bridge) {\n return bridge ? window.name ? global_getGlobal(assertSameDomain(bridge)).openTunnelToParent({\n name: window.name,\n source: window,\n canary: function() {},\n sendMessage: function(message) {\n try {\n window;\n } catch (err) {\n return;\n }\n if (window && !window.closed) try {\n receiveMessage({\n data: message,\n origin: this.origin,\n source: this.source\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n promise_ZalgoPromise.reject(err);\n }\n }\n }).then((function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n if (source !== opener) throw new Error(\"Source does not match opener\");\n registerRemoteSendMessage(source, origin, data.sendMessage);\n })).catch((function(err) {\n rejectRemoteSendMessage(opener, err);\n throw err;\n })) : rejectRemoteSendMessage(opener, new Error(\"Can not register with opener: window does not have a name\")) : rejectRemoteSendMessage(opener, new Error(\"Can not register with opener: no bridge found in opener\"));\n }));\n var win;\n }\n }));\n }({\n on: on,\n send: send,\n receiveMessage: receiveMessage\n });\n }\n function cleanupProxyWindows() {\n var idToProxyWindow = globalStore(\"idToProxyWindow\");\n for (var _i2 = 0, _idToProxyWindow$keys2 = idToProxyWindow.keys(); _i2 < _idToProxyWindow$keys2.length; _i2++) {\n var id = _idToProxyWindow$keys2[_i2];\n idToProxyWindow.get(id).shouldClean() && idToProxyWindow.del(id);\n }\n }\n function getSerializedWindow(winPromise, _ref) {\n var send = _ref.send, _ref$id = _ref.id, id = void 0 === _ref$id ? uniqueID() : _ref$id;\n var windowNamePromise = winPromise.then((function(win) {\n if (isSameDomain(win)) return assertSameDomain(win).name;\n }));\n var windowTypePromise = winPromise.then((function(window) {\n if (isWindowClosed(window)) throw new Error(\"Window is closed, can not determine type\");\n return getOpener(window) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;\n }));\n windowNamePromise.catch(src_util_noop);\n windowTypePromise.catch(src_util_noop);\n var getName = function() {\n return winPromise.then((function(win) {\n if (!isWindowClosed(win)) return isSameDomain(win) ? assertSameDomain(win).name : windowNamePromise;\n }));\n };\n return {\n id: id,\n getType: function() {\n return windowTypePromise;\n },\n getInstanceID: memoizePromise((function() {\n return winPromise.then((function(win) {\n return getWindowInstanceID(win, {\n send: send\n });\n }));\n })),\n close: function() {\n return winPromise.then(closeWindow);\n },\n getName: getName,\n focus: function() {\n return winPromise.then((function(win) {\n win.focus();\n }));\n },\n isClosed: function() {\n return winPromise.then((function(win) {\n return isWindowClosed(win);\n }));\n },\n setLocation: function(href, opts) {\n void 0 === opts && (opts = {});\n return winPromise.then((function(win) {\n var domain = window.location.protocol + \"//\" + window.location.host;\n var _opts$method = opts.method, method = void 0 === _opts$method ? \"get\" : _opts$method, body = opts.body;\n if (0 === href.indexOf(\"/\")) href = \"\" + domain + href; else if (!href.match(/^https?:\\/\\//) && 0 !== href.indexOf(domain)) throw new Error(\"Expected url to be http or https url, or absolute path, got \" + JSON.stringify(href));\n if (\"post\" === method) return getName().then((function(name) {\n if (!name) throw new Error(\"Can not post to window without target name\");\n !function(_ref3) {\n var url = _ref3.url, target = _ref3.target, body = _ref3.body, _ref3$method = _ref3.method, method = void 0 === _ref3$method ? \"post\" : _ref3$method;\n var form = document.createElement(\"form\");\n form.setAttribute(\"target\", target);\n form.setAttribute(\"method\", method);\n form.setAttribute(\"action\", url);\n form.style.display = \"none\";\n if (body) for (var _i24 = 0, _Object$keys4 = Object.keys(body); _i24 < _Object$keys4.length; _i24++) {\n var _body$key;\n var key = _Object$keys4[_i24];\n var input = document.createElement(\"input\");\n input.setAttribute(\"name\", key);\n input.setAttribute(\"value\", null == (_body$key = body[key]) ? void 0 : _body$key.toString());\n form.appendChild(input);\n }\n getBody().appendChild(form);\n form.submit();\n getBody().removeChild(form);\n }({\n url: href,\n target: name,\n method: method,\n body: body\n });\n }));\n if (\"get\" !== method) throw new Error(\"Unsupported method: \" + method);\n if (isSameDomain(win)) try {\n if (win.location && \"function\" == typeof win.location.replace) {\n win.location.replace(href);\n return;\n }\n } catch (err) {}\n win.location = href;\n }));\n },\n setName: function(name) {\n return winPromise.then((function(win) {\n linkWindow({\n win: win,\n name: name\n });\n var sameDomain = isSameDomain(win);\n var frame = getFrameForWindow(win);\n if (!sameDomain) throw new Error(\"Can not set name for cross-domain window: \" + name);\n assertSameDomain(win).name = name;\n frame && frame.setAttribute(\"name\", name);\n windowNamePromise = promise_ZalgoPromise.resolve(name);\n }));\n }\n };\n }\n var window_ProxyWindow = function() {\n function ProxyWindow(_ref2) {\n var send = _ref2.send, win = _ref2.win, serializedWindow = _ref2.serializedWindow;\n this.id = void 0;\n this.isProxyWindow = !0;\n this.serializedWindow = void 0;\n this.actualWindow = void 0;\n this.actualWindowPromise = void 0;\n this.send = void 0;\n this.name = void 0;\n this.actualWindowPromise = new promise_ZalgoPromise;\n this.serializedWindow = serializedWindow || getSerializedWindow(this.actualWindowPromise, {\n send: send\n });\n globalStore(\"idToProxyWindow\").set(this.getID(), this);\n win && this.setWindow(win, {\n send: send\n });\n }\n var _proto = ProxyWindow.prototype;\n _proto.getID = function() {\n return this.serializedWindow.id;\n };\n _proto.getType = function() {\n return this.serializedWindow.getType();\n };\n _proto.isPopup = function() {\n return this.getType().then((function(type) {\n return type === WINDOW_TYPE.POPUP;\n }));\n };\n _proto.setLocation = function(href, opts) {\n var _this = this;\n return this.serializedWindow.setLocation(href, opts).then((function() {\n return _this;\n }));\n };\n _proto.getName = function() {\n return this.serializedWindow.getName();\n };\n _proto.setName = function(name) {\n var _this2 = this;\n return this.serializedWindow.setName(name).then((function() {\n return _this2;\n }));\n };\n _proto.close = function() {\n var _this3 = this;\n return this.serializedWindow.close().then((function() {\n return _this3;\n }));\n };\n _proto.focus = function() {\n var _this4 = this;\n var isPopupPromise = this.isPopup();\n var getNamePromise = this.getName();\n var reopenPromise = promise_ZalgoPromise.hash({\n isPopup: isPopupPromise,\n name: getNamePromise\n }).then((function(_ref3) {\n var name = _ref3.name;\n _ref3.isPopup && name && window.open(\"\", name);\n }));\n var focusPromise = this.serializedWindow.focus();\n return promise_ZalgoPromise.all([ reopenPromise, focusPromise ]).then((function() {\n return _this4;\n }));\n };\n _proto.isClosed = function() {\n return this.serializedWindow.isClosed();\n };\n _proto.getWindow = function() {\n return this.actualWindow;\n };\n _proto.setWindow = function(win, _ref4) {\n var send = _ref4.send;\n this.actualWindow = win;\n this.actualWindowPromise.resolve(this.actualWindow);\n this.serializedWindow = getSerializedWindow(this.actualWindowPromise, {\n send: send,\n id: this.getID()\n });\n windowStore(\"winToProxyWindow\").set(win, this);\n };\n _proto.awaitWindow = function() {\n return this.actualWindowPromise;\n };\n _proto.matchWindow = function(win, _ref5) {\n var _this5 = this;\n var send = _ref5.send;\n return promise_ZalgoPromise.try((function() {\n return _this5.actualWindow ? win === _this5.actualWindow : promise_ZalgoPromise.hash({\n proxyInstanceID: _this5.getInstanceID(),\n knownWindowInstanceID: getWindowInstanceID(win, {\n send: send\n })\n }).then((function(_ref6) {\n var match = _ref6.proxyInstanceID === _ref6.knownWindowInstanceID;\n match && _this5.setWindow(win, {\n send: send\n });\n return match;\n }));\n }));\n };\n _proto.unwrap = function() {\n return this.actualWindow || this;\n };\n _proto.getInstanceID = function() {\n return this.serializedWindow.getInstanceID();\n };\n _proto.shouldClean = function() {\n return Boolean(this.actualWindow && isWindowClosed(this.actualWindow));\n };\n _proto.serialize = function() {\n return this.serializedWindow;\n };\n ProxyWindow.unwrap = function(win) {\n return ProxyWindow.isProxyWindow(win) ? win.unwrap() : win;\n };\n ProxyWindow.serialize = function(win, _ref7) {\n var send = _ref7.send;\n cleanupProxyWindows();\n return ProxyWindow.toProxyWindow(win, {\n send: send\n }).serialize();\n };\n ProxyWindow.deserialize = function(serializedWindow, _ref8) {\n var send = _ref8.send;\n cleanupProxyWindows();\n return globalStore(\"idToProxyWindow\").get(serializedWindow.id) || new ProxyWindow({\n serializedWindow: serializedWindow,\n send: send\n });\n };\n ProxyWindow.isProxyWindow = function(obj) {\n return Boolean(obj && !isWindow(obj) && obj.isProxyWindow);\n };\n ProxyWindow.toProxyWindow = function(win, _ref9) {\n var send = _ref9.send;\n cleanupProxyWindows();\n if (ProxyWindow.isProxyWindow(win)) return win;\n var actualWindow = win;\n return windowStore(\"winToProxyWindow\").get(actualWindow) || new ProxyWindow({\n win: actualWindow,\n send: send\n });\n };\n return ProxyWindow;\n }();\n function addMethod(id, val, name, source, domain) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n if (window_ProxyWindow.isProxyWindow(source)) proxyWindowMethods.set(id, {\n val: val,\n name: name,\n domain: domain,\n source: source\n }); else {\n proxyWindowMethods.del(id);\n methodStore.getOrSet(source, (function() {\n return {};\n }))[id] = {\n domain: domain,\n name: name,\n val: val,\n source: source\n };\n }\n }\n function lookupMethod(source, id) {\n var methodStore = windowStore(\"methodStore\");\n var proxyWindowMethods = globalStore(\"proxyWindowMethods\");\n return methodStore.getOrSet(source, (function() {\n return {};\n }))[id] || proxyWindowMethods.get(id);\n }\n function function_serializeFunction(destination, domain, val, key, _ref3) {\n on = (_ref = {\n on: _ref3.on,\n send: _ref3.send\n }).on, send = _ref.send, globalStore(\"builtinListeners\").getOrSet(\"functionCalls\", (function() {\n return on(\"postrobot_method\", {\n domain: \"*\"\n }, (function(_ref2) {\n var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;\n var id = data.id, name = data.name;\n var meth = lookupMethod(source, id);\n if (!meth) throw new Error(\"Could not find method '\" + name + \"' with id: \" + data.id + \" in \" + getDomain(window));\n var methodSource = meth.source, domain = meth.domain, val = meth.val;\n return promise_ZalgoPromise.try((function() {\n if (!matchDomain(domain, origin)) throw new Error(\"Method '\" + data.name + \"' domain \" + JSON.stringify(util_isRegex(meth.domain) ? meth.domain.source : meth.domain) + \" does not match origin \" + origin + \" in \" + getDomain(window));\n if (window_ProxyWindow.isProxyWindow(methodSource)) return methodSource.matchWindow(source, {\n send: send\n }).then((function(match) {\n if (!match) throw new Error(\"Method call '\" + data.name + \"' failed - proxy window does not match source in \" + getDomain(window));\n }));\n })).then((function() {\n return val.apply({\n source: source,\n origin: origin\n }, data.args);\n }), (function(err) {\n return promise_ZalgoPromise.try((function() {\n if (val.onError) return val.onError(err);\n })).then((function() {\n err.stack && (err.stack = \"Remote call to \" + name + \"(\" + function(args) {\n void 0 === args && (args = []);\n return arrayFrom(args).map((function(arg) {\n return \"string\" == typeof arg ? \"'\" + arg + \"'\" : void 0 === arg ? \"undefined\" : null === arg ? \"null\" : \"boolean\" == typeof arg ? arg.toString() : Array.isArray(arg) ? \"[ ... ]\" : \"object\" == typeof arg ? \"{ ... }\" : \"function\" == typeof arg ? \"() => { ... }\" : \"<\" + typeof arg + \">\";\n })).join(\", \");\n }(data.args) + \") failed\\n\\n\" + err.stack);\n throw err;\n }));\n })).then((function(result) {\n return {\n result: result,\n id: id,\n name: name\n };\n }));\n }));\n }));\n var _ref, on, send;\n var id = val.__id__ || uniqueID();\n destination = window_ProxyWindow.unwrap(destination);\n var name = val.__name__ || val.name || key;\n \"string\" == typeof name && \"function\" == typeof name.indexOf && 0 === name.indexOf(\"anonymous::\") && (name = name.replace(\"anonymous::\", key + \"::\"));\n if (window_ProxyWindow.isProxyWindow(destination)) {\n addMethod(id, val, name, destination, domain);\n destination.awaitWindow().then((function(win) {\n addMethod(id, val, name, win, domain);\n }));\n } else addMethod(id, val, name, destination, domain);\n return serializeType(\"cross_domain_function\", {\n id: id,\n name: name\n });\n }\n function serializeMessage(destination, domain, obj, _ref) {\n var _serialize;\n var on = _ref.on, send = _ref.send;\n return function(obj, serializers) {\n void 0 === serializers && (serializers = defaultSerializers);\n var result = JSON.stringify(obj, (function(key) {\n var val = this[key];\n if (isSerializedType(this)) return val;\n var type = determineType(val);\n if (!type) return val;\n var serializer = serializers[type] || SERIALIZER[type];\n return serializer ? serializer(val, key) : val;\n }));\n return void 0 === result ? \"undefined\" : result;\n }(obj, ((_serialize = {}).promise = function(val, key) {\n return function(destination, domain, val, key, _ref) {\n return serializeType(\"cross_domain_zalgo_promise\", {\n then: function_serializeFunction(destination, domain, (function(resolve, reject) {\n return val.then(resolve, reject);\n }), key, {\n on: _ref.on,\n send: _ref.send\n })\n });\n }(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.function = function(val, key) {\n return function_serializeFunction(destination, domain, val, key, {\n on: on,\n send: send\n });\n }, _serialize.object = function(val) {\n return isWindow(val) || window_ProxyWindow.isProxyWindow(val) ? serializeType(\"cross_domain_window\", window_ProxyWindow.serialize(val, {\n send: send\n })) : val;\n }, _serialize));\n }\n function deserializeMessage(source, origin, message, _ref2) {\n var _deserialize;\n var send = _ref2.send;\n return function(str, deserializers) {\n void 0 === deserializers && (deserializers = defaultDeserializers);\n if (\"undefined\" !== str) return JSON.parse(str, (function(key, val) {\n if (isSerializedType(this)) return val;\n var type;\n var value;\n if (isSerializedType(val)) {\n type = val.__type__;\n value = val.__val__;\n } else {\n type = determineType(val);\n value = val;\n }\n if (!type) return value;\n var deserializer = deserializers[type] || DESERIALIZER[type];\n return deserializer ? deserializer(value, key) : value;\n }));\n }(message, ((_deserialize = {}).cross_domain_zalgo_promise = function(serializedPromise) {\n return function(source, origin, _ref2) {\n return new promise_ZalgoPromise(_ref2.then);\n }(0, 0, serializedPromise);\n }, _deserialize.cross_domain_function = function(serializedFunction) {\n return function(source, origin, _ref4, _ref5) {\n var id = _ref4.id, name = _ref4.name;\n var send = _ref5.send;\n var getDeserializedFunction = function(opts) {\n void 0 === opts && (opts = {});\n function crossDomainFunctionWrapper() {\n var _arguments = arguments;\n return window_ProxyWindow.toProxyWindow(source, {\n send: send\n }).awaitWindow().then((function(win) {\n var meth = lookupMethod(win, id);\n if (meth && meth.val !== crossDomainFunctionWrapper) return meth.val.apply({\n source: window,\n origin: getDomain()\n }, _arguments);\n var _args = [].slice.call(_arguments);\n return opts.fireAndForget ? send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !0\n }) : send(win, \"postrobot_method\", {\n id: id,\n name: name,\n args: _args\n }, {\n domain: origin,\n fireAndForget: !1\n }).then((function(res) {\n return res.data.result;\n }));\n })).catch((function(err) {\n throw err;\n }));\n }\n crossDomainFunctionWrapper.__name__ = name;\n crossDomainFunctionWrapper.__origin__ = origin;\n crossDomainFunctionWrapper.__source__ = source;\n crossDomainFunctionWrapper.__id__ = id;\n crossDomainFunctionWrapper.origin = origin;\n return crossDomainFunctionWrapper;\n };\n var crossDomainFunctionWrapper = getDeserializedFunction();\n crossDomainFunctionWrapper.fireAndForget = getDeserializedFunction({\n fireAndForget: !0\n });\n return crossDomainFunctionWrapper;\n }(source, origin, serializedFunction, {\n send: send\n });\n }, _deserialize.cross_domain_window = function(serializedWindow) {\n return window_ProxyWindow.deserialize(serializedWindow, {\n send: send\n });\n }, _deserialize));\n }\n var SEND_MESSAGE_STRATEGIES = {};\n SEND_MESSAGE_STRATEGIES.postrobot_post_message = function(win, serializedMessage, domain) {\n 0 === domain.indexOf(\"file:\") && (domain = \"*\");\n win.postMessage(serializedMessage, domain);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_bridge = function(win, serializedMessage, domain) {\n if (!needsBridgeForBrowser() && !isBridge()) throw new Error(\"Bridge not needed for browser\");\n if (isSameDomain(win)) throw new Error(\"Post message through bridge disabled between same domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use bridge to communicate between two different windows, not between frames\");\n !function(win, domain, message) {\n var messagingChild = isOpener(window, win);\n var messagingParent = isOpener(win, window);\n if (!messagingChild && !messagingParent) throw new Error(\"Can only send messages to and from parent and popup windows\");\n findRemoteWindow(win).then((function(sendMessage) {\n return sendMessage(win, domain, message);\n }));\n }(win, domain, serializedMessage);\n };\n SEND_MESSAGE_STRATEGIES.postrobot_global = function(win, serializedMessage) {\n if (!utils_getUserAgent(window).match(/MSIE|rv:11|trident|edge\\/12|edge\\/13/i)) throw new Error(\"Global messaging not needed for browser\");\n if (!isSameDomain(win)) throw new Error(\"Post message through global disabled between different domain windows\");\n if (!1 !== isSameTopWindow(window, win)) throw new Error(\"Can only use global to communicate between two different windows, not between frames\");\n var foreignGlobal = global_getGlobal(win);\n if (!foreignGlobal) throw new Error(\"Can not find postRobot global on foreign window\");\n foreignGlobal.receiveMessage({\n source: window,\n origin: getDomain(),\n data: serializedMessage\n });\n };\n function send_sendMessage(win, domain, message, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n return promise_ZalgoPromise.try((function() {\n var domainBuffer = windowStore().getOrSet(win, (function() {\n return {};\n }));\n domainBuffer.buffer = domainBuffer.buffer || [];\n domainBuffer.buffer.push(message);\n domainBuffer.flush = domainBuffer.flush || promise_ZalgoPromise.flush().then((function() {\n if (isWindowClosed(win)) throw new Error(\"Window is closed\");\n var serializedMessage = serializeMessage(win, domain, ((_ref = {}).__post_robot_10_0_44__ = domainBuffer.buffer || [], \n _ref), {\n on: on,\n send: send\n });\n var _ref;\n delete domainBuffer.buffer;\n var strategies = Object.keys(SEND_MESSAGE_STRATEGIES);\n var errors = [];\n for (var _i2 = 0; _i2 < strategies.length; _i2++) {\n var strategyName = strategies[_i2];\n try {\n SEND_MESSAGE_STRATEGIES[strategyName](win, serializedMessage, domain);\n } catch (err) {\n errors.push(err);\n }\n }\n if (errors.length === strategies.length) throw new Error(\"All post-robot messaging strategies failed:\\n\\n\" + errors.map((function(err, i) {\n return i + \". \" + stringifyError(err);\n })).join(\"\\n\\n\"));\n }));\n return domainBuffer.flush.then((function() {\n delete domainBuffer.flush;\n }));\n })).then(src_util_noop);\n }\n function getResponseListener(hash) {\n return globalStore(\"responseListeners\").get(hash);\n }\n function deleteResponseListener(hash) {\n globalStore(\"responseListeners\").del(hash);\n }\n function isResponseListenerErrored(hash) {\n return globalStore(\"erroredResponseListeners\").has(hash);\n }\n function getRequestListener(_ref) {\n var name = _ref.name, win = _ref.win, domain = _ref.domain;\n var requestListeners = windowStore(\"requestListeners\");\n \"*\" === win && (win = null);\n \"*\" === domain && (domain = null);\n if (!name) throw new Error(\"Name required to get request listener\");\n for (var _i4 = 0, _ref3 = [ win, getWildcard() ]; _i4 < _ref3.length; _i4++) {\n var winQualifier = _ref3[_i4];\n if (winQualifier) {\n var nameListeners = requestListeners.get(winQualifier);\n if (nameListeners) {\n var domainListeners = nameListeners[name];\n if (domainListeners) {\n if (domain && \"string\" == typeof domain) {\n if (domainListeners[domain]) return domainListeners[domain];\n if (domainListeners.__domain_regex__) for (var _i6 = 0, _domainListeners$__DO2 = domainListeners.__domain_regex__; _i6 < _domainListeners$__DO2.length; _i6++) {\n var _domainListeners$__DO3 = _domainListeners$__DO2[_i6], listener = _domainListeners$__DO3.listener;\n if (matchDomain(_domainListeners$__DO3.regex, domain)) return listener;\n }\n }\n if (domainListeners[\"*\"]) return domainListeners[\"*\"];\n }\n }\n }\n }\n }\n function handleRequest(source, origin, message, _ref) {\n var on = _ref.on, send = _ref.send;\n var options = getRequestListener({\n name: message.name,\n win: source,\n domain: origin\n });\n var logName = \"postrobot_method\" === message.name && message.data && \"string\" == typeof message.data.name ? message.data.name + \"()\" : message.name;\n function sendResponse(ack, data, error) {\n return promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_response\",\n hash: message.hash,\n name: message.name,\n ack: ack,\n data: data,\n error: error\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send response message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n }));\n }\n return promise_ZalgoPromise.all([ promise_ZalgoPromise.flush().then((function() {\n if (!message.fireAndForget && !isWindowClosed(source)) try {\n return send_sendMessage(source, origin, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_ack\",\n hash: message.hash,\n name: message.name\n }, {\n on: on,\n send: send\n });\n } catch (err) {\n throw new Error(\"Send ack message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }\n })), promise_ZalgoPromise.try((function() {\n if (!options) throw new Error(\"No handler found for post message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Request origin \" + origin + \" does not match domain \" + options.domain.toString());\n return options.handler({\n source: source,\n origin: origin,\n data: message.data\n });\n })).then((function(data) {\n return sendResponse(\"success\", data);\n }), (function(error) {\n return sendResponse(\"error\", null, error);\n })) ]).then(src_util_noop).catch((function(err) {\n if (options && options.handleError) return options.handleError(err);\n throw err;\n }));\n }\n function handleAck(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message ack for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n try {\n if (!matchDomain(options.domain, origin)) throw new Error(\"Ack origin \" + origin + \" does not match domain \" + options.domain.toString());\n if (source !== options.win) throw new Error(\"Ack source does not match registered window\");\n } catch (err) {\n options.promise.reject(err);\n }\n options.ack = !0;\n }\n }\n function handleResponse(source, origin, message) {\n if (!isResponseListenerErrored(message.hash)) {\n var options = getResponseListener(message.hash);\n if (!options) throw new Error(\"No handler found for post message response for message: \" + message.name + \" from \" + origin + \" in \" + window.location.protocol + \"//\" + window.location.host + window.location.pathname);\n if (!matchDomain(options.domain, origin)) throw new Error(\"Response origin \" + origin + \" does not match domain \" + (pattern = options.domain, \n Array.isArray(pattern) ? \"(\" + pattern.join(\" | \") + \")\" : isRegex(pattern) ? \"RegExp(\" + pattern.toString() + \")\" : pattern.toString()));\n var pattern;\n if (source !== options.win) throw new Error(\"Response source does not match registered window\");\n deleteResponseListener(message.hash);\n \"error\" === message.ack ? options.promise.reject(message.error) : \"success\" === message.ack && options.promise.resolve({\n source: source,\n origin: origin,\n data: message.data\n });\n }\n }\n function receive_receiveMessage(event, _ref2) {\n var on = _ref2.on, send = _ref2.send;\n var receivedMessages = globalStore(\"receivedMessages\");\n try {\n if (!window || window.closed || !event.source) return;\n } catch (err) {\n return;\n }\n var source = event.source, origin = event.origin;\n var messages = function(message, source, origin, _ref) {\n var on = _ref.on, send = _ref.send;\n var parsedMessage;\n try {\n parsedMessage = deserializeMessage(source, origin, message, {\n on: on,\n send: send\n });\n } catch (err) {\n return;\n }\n if (parsedMessage && \"object\" == typeof parsedMessage && null !== parsedMessage) {\n var parseMessages = parsedMessage.__post_robot_10_0_44__;\n if (Array.isArray(parseMessages)) return parseMessages;\n }\n }(event.data, source, origin, {\n on: on,\n send: send\n });\n if (messages) {\n markWindowKnown(source);\n for (var _i2 = 0; _i2 < messages.length; _i2++) {\n var message = messages[_i2];\n if (receivedMessages.has(message.id)) return;\n receivedMessages.set(message.id, !0);\n if (isWindowClosed(source) && !message.fireAndForget) return;\n 0 === message.origin.indexOf(\"file:\") && (origin = \"file://\");\n try {\n \"postrobot_message_request\" === message.type ? handleRequest(source, origin, message, {\n on: on,\n send: send\n }) : \"postrobot_message_response\" === message.type ? handleResponse(source, origin, message) : \"postrobot_message_ack\" === message.type && handleAck(source, origin, message);\n } catch (err) {\n setTimeout((function() {\n throw err;\n }), 0);\n }\n }\n }\n }\n function on_on(name, options, handler) {\n if (!name) throw new Error(\"Expected name\");\n if (\"function\" == typeof (options = options || {})) {\n handler = options;\n options = {};\n }\n if (!handler) throw new Error(\"Expected handler\");\n (options = options || {}).name = name;\n options.handler = handler || options.handler;\n var win = options.window;\n var domain = options.domain;\n var requestListener = function addRequestListener(_ref4, listener) {\n var name = _ref4.name, win = _ref4.win, domain = _ref4.domain;\n var requestListeners = windowStore(\"requestListeners\");\n if (!name || \"string\" != typeof name) throw new Error(\"Name required to add request listener\");\n if (Array.isArray(win)) {\n var listenersCollection = [];\n for (var _i8 = 0, _win2 = win; _i8 < _win2.length; _i8++) listenersCollection.push(addRequestListener({\n name: name,\n domain: domain,\n win: _win2[_i8]\n }, listener));\n return {\n cancel: function() {\n for (var _i10 = 0; _i10 < listenersCollection.length; _i10++) listenersCollection[_i10].cancel();\n }\n };\n }\n if (Array.isArray(domain)) {\n var _listenersCollection = [];\n for (var _i12 = 0, _domain2 = domain; _i12 < _domain2.length; _i12++) _listenersCollection.push(addRequestListener({\n name: name,\n win: win,\n domain: _domain2[_i12]\n }, listener));\n return {\n cancel: function() {\n for (var _i14 = 0; _i14 < _listenersCollection.length; _i14++) _listenersCollection[_i14].cancel();\n }\n };\n }\n var existingListener = getRequestListener({\n name: name,\n win: win,\n domain: domain\n });\n win && \"*\" !== win || (win = getWildcard());\n domain = domain || \"*\";\n if (existingListener) throw win && domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString() + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : win ? new Error(\"Request listener already exists for \" + name + \" for \" + (win === getWildcard() ? \"wildcard\" : \"specified\") + \" window\") : domain ? new Error(\"Request listener already exists for \" + name + \" on domain \" + domain.toString()) : new Error(\"Request listener already exists for \" + name);\n var nameListeners = requestListeners.getOrSet(win, (function() {\n return {};\n }));\n var domainListeners = util_getOrSet(nameListeners, name, (function() {\n return {};\n }));\n var strDomain = domain.toString();\n var regexListeners;\n var regexListener;\n util_isRegex(domain) ? (regexListeners = util_getOrSet(domainListeners, \"__domain_regex__\", (function() {\n return [];\n }))).push(regexListener = {\n regex: domain,\n listener: listener\n }) : domainListeners[strDomain] = listener;\n return {\n cancel: function() {\n delete domainListeners[strDomain];\n if (regexListener) {\n regexListeners.splice(regexListeners.indexOf(regexListener, 1));\n regexListeners.length || delete domainListeners.__domain_regex__;\n }\n Object.keys(domainListeners).length || delete nameListeners[name];\n win && !Object.keys(nameListeners).length && requestListeners.del(win);\n }\n };\n }({\n name: name,\n win: win,\n domain: domain\n }, {\n handler: options.handler,\n handleError: options.errorHandler || function(err) {\n throw err;\n },\n window: win,\n domain: domain || \"*\",\n name: name\n });\n return {\n cancel: function() {\n requestListener.cancel();\n }\n };\n }\n var send_send = function send(win, name, data, options) {\n var domainMatcher = (options = options || {}).domain || \"*\";\n var responseTimeout = options.timeout || -1;\n var childTimeout = options.timeout || 5e3;\n var fireAndForget = options.fireAndForget || !1;\n return promise_ZalgoPromise.try((function() {\n !function(name, win, domain) {\n if (!name) throw new Error(\"Expected name\");\n if (domain && \"string\" != typeof domain && !Array.isArray(domain) && !util_isRegex(domain)) throw new TypeError(\"Can not send \" + name + \". Expected domain \" + JSON.stringify(domain) + \" to be a string, array, or regex\");\n if (isWindowClosed(win)) throw new Error(\"Can not send \" + name + \". Target window is closed\");\n }(name, win, domainMatcher);\n if (function(parent, child) {\n var actualParent = getAncestor(child);\n if (actualParent) return actualParent === parent;\n if (child === parent) return !1;\n if (getTop(child) === child) return !1;\n for (var _i15 = 0, _getFrames8 = getFrames(parent); _i15 < _getFrames8.length; _i15++) if (_getFrames8[_i15] === child) return !0;\n return !1;\n }(window, win)) return awaitWindowHello(win, childTimeout);\n })).then((function(_temp) {\n return function(win, targetDomain, actualDomain, _ref) {\n var send = _ref.send;\n return promise_ZalgoPromise.try((function() {\n return \"string\" == typeof targetDomain ? targetDomain : promise_ZalgoPromise.try((function() {\n return actualDomain || sayHello(win, {\n send: send\n }).then((function(_ref2) {\n return _ref2.domain;\n }));\n })).then((function(normalizedDomain) {\n if (!matchDomain(targetDomain, targetDomain)) throw new Error(\"Domain \" + stringify(targetDomain) + \" does not match \" + stringify(targetDomain));\n return normalizedDomain;\n }));\n }));\n }(win, domainMatcher, (void 0 === _temp ? {} : _temp).domain, {\n send: send\n });\n })).then((function(targetDomain) {\n var domain = targetDomain;\n var logName = \"postrobot_method\" === name && data && \"string\" == typeof data.name ? data.name + \"()\" : name;\n var promise = new promise_ZalgoPromise;\n var hash = name + \"_\" + uniqueID();\n if (!fireAndForget) {\n var responseListener = {\n name: name,\n win: win,\n domain: domain,\n promise: promise\n };\n !function(hash, listener) {\n globalStore(\"responseListeners\").set(hash, listener);\n }(hash, responseListener);\n var reqPromises = windowStore(\"requestPromises\").getOrSet(win, (function() {\n return [];\n }));\n reqPromises.push(promise);\n promise.catch((function() {\n !function(hash) {\n globalStore(\"erroredResponseListeners\").set(hash, !0);\n }(hash);\n deleteResponseListener(hash);\n }));\n var totalAckTimeout = function(win) {\n return windowStore(\"knownWindows\").get(win, !1);\n }(win) ? 1e4 : 2e3;\n var totalResTimeout = responseTimeout;\n var ackTimeout = totalAckTimeout;\n var resTimeout = totalResTimeout;\n var interval = safeInterval((function() {\n if (isWindowClosed(win)) return promise.reject(new Error(\"Window closed for \" + name + \" before \" + (responseListener.ack ? \"response\" : \"ack\")));\n if (responseListener.cancelled) return promise.reject(new Error(\"Response listener was cancelled for \" + name));\n ackTimeout = Math.max(ackTimeout - 500, 0);\n -1 !== resTimeout && (resTimeout = Math.max(resTimeout - 500, 0));\n return responseListener.ack || 0 !== ackTimeout ? 0 === resTimeout ? promise.reject(new Error(\"No response for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalResTimeout + \"ms\")) : void 0 : promise.reject(new Error(\"No ack for postMessage \" + logName + \" in \" + getDomain() + \" in \" + totalAckTimeout + \"ms\"));\n }), 500);\n promise.finally((function() {\n interval.cancel();\n reqPromises.splice(reqPromises.indexOf(promise, 1));\n })).catch(src_util_noop);\n }\n return send_sendMessage(win, domain, {\n id: uniqueID(),\n origin: getDomain(window),\n type: \"postrobot_message_request\",\n hash: hash,\n name: name,\n data: data,\n fireAndForget: fireAndForget\n }, {\n on: on_on,\n send: send\n }).then((function() {\n return fireAndForget ? promise.resolve() : promise;\n }), (function(err) {\n throw new Error(\"Send request message failed for \" + logName + \" in \" + getDomain() + \"\\n\\n\" + stringifyError(err));\n }));\n }));\n };\n function setup_toProxyWindow(win) {\n return window_ProxyWindow.toProxyWindow(win, {\n send: send_send\n });\n }\n function cleanUpWindow(win) {\n for (var _i2 = 0, _requestPromises$get2 = windowStore(\"requestPromises\").get(win, []); _i2 < _requestPromises$get2.length; _i2++) _requestPromises$get2[_i2].reject(new Error(\"Window \" + (isWindowClosed(win) ? \"closed\" : \"cleaned up\") + \" before response\")).catch(src_util_noop);\n }\n var src_bridge;\n src_bridge = {\n setupBridge: setupBridge,\n openBridge: function(url, domain) {\n var bridges = globalStore(\"bridges\");\n var bridgeFrames = globalStore(\"bridgeFrames\");\n domain = domain || getDomainFromUrl(url);\n return bridges.getOrSet(domain, (function() {\n return promise_ZalgoPromise.try((function() {\n if (getDomain() === domain) throw new Error(\"Can not open bridge on the same domain as current domain: \" + domain);\n var name = getBridgeName(domain);\n if (getFrameByName(window, name)) throw new Error(\"Frame with name \" + name + \" already exists on page\");\n var iframe = function(name, url) {\n var iframe = document.createElement(\"iframe\");\n iframe.setAttribute(\"name\", name);\n iframe.setAttribute(\"id\", name);\n iframe.setAttribute(\"style\", \"display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;\");\n iframe.setAttribute(\"frameborder\", \"0\");\n iframe.setAttribute(\"border\", \"0\");\n iframe.setAttribute(\"scrolling\", \"no\");\n iframe.setAttribute(\"allowTransparency\", \"true\");\n iframe.setAttribute(\"tabindex\", \"-1\");\n iframe.setAttribute(\"hidden\", \"true\");\n iframe.setAttribute(\"title\", \"\");\n iframe.setAttribute(\"role\", \"presentation\");\n iframe.src = url;\n return iframe;\n }(name, url);\n bridgeFrames.set(domain, iframe);\n return documentBodyReady.then((function(body) {\n body.appendChild(iframe);\n var bridge = iframe.contentWindow;\n return new promise_ZalgoPromise((function(resolve, reject) {\n iframe.addEventListener(\"load\", resolve);\n iframe.addEventListener(\"error\", reject);\n })).then((function() {\n return awaitWindowHello(bridge, 5e3, \"Bridge \" + url);\n })).then((function() {\n return bridge;\n }));\n }));\n }));\n }));\n },\n linkWindow: linkWindow,\n linkUrl: function(win, url) {\n linkWindow({\n win: win,\n domain: getDomainFromUrl(url)\n });\n },\n isBridge: isBridge,\n needsBridge: needsBridge,\n needsBridgeForBrowser: needsBridgeForBrowser,\n hasBridge: function(url, domain) {\n return globalStore(\"bridges\").has(domain || getDomainFromUrl(url));\n },\n needsBridgeForWin: needsBridgeForWin,\n needsBridgeForDomain: needsBridgeForDomain,\n destroyBridges: function() {\n var bridges = globalStore(\"bridges\");\n var bridgeFrames = globalStore(\"bridgeFrames\");\n for (var _i4 = 0, _bridgeFrames$keys2 = bridgeFrames.keys(); _i4 < _bridgeFrames$keys2.length; _i4++) {\n var frame = bridgeFrames.get(_bridgeFrames$keys2[_i4]);\n frame && frame.parentNode && frame.parentNode.removeChild(frame);\n }\n bridgeFrames.reset();\n bridges.reset();\n }\n };\n function lib_global_getGlobal(win) {\n if (!isSameDomain(win)) throw new Error(\"Can not get global for window on different domain\");\n win.__zoid_9_0_86__ || (win.__zoid_9_0_86__ = {});\n return win.__zoid_9_0_86__;\n }\n function tryGlobal(win, handler) {\n try {\n return handler(lib_global_getGlobal(win));\n } catch (err) {}\n }\n function getProxyObject(obj) {\n return {\n get: function() {\n var _this = this;\n return promise_ZalgoPromise.try((function() {\n if (_this.source && _this.source !== window) throw new Error(\"Can not call get on proxy object from a remote window\");\n return obj;\n }));\n }\n };\n }\n function basicSerialize(data) {\n return base64encode(JSON.stringify(data));\n }\n function getUIDRefStore(win) {\n var global = lib_global_getGlobal(win);\n global.references = global.references || {};\n return global.references;\n }\n function crossDomainSerialize(_ref) {\n var data = _ref.data, metaData = _ref.metaData, sender = _ref.sender, receiver = _ref.receiver, _ref$passByReference = _ref.passByReference, passByReference = void 0 !== _ref$passByReference && _ref$passByReference, _ref$basic = _ref.basic, basic = void 0 !== _ref$basic && _ref$basic;\n var proxyWin = setup_toProxyWindow(receiver.win);\n var serializedMessage = basic ? JSON.stringify(data) : serializeMessage(proxyWin, receiver.domain, data, {\n on: on_on,\n send: send_send\n });\n var reference = passByReference ? function(val) {\n var uid = uniqueID();\n getUIDRefStore(window)[uid] = val;\n return {\n type: \"uid\",\n uid: uid\n };\n }(serializedMessage) : {\n type: \"raw\",\n val: serializedMessage\n };\n return {\n serializedData: basicSerialize({\n sender: {\n domain: sender.domain\n },\n metaData: metaData,\n reference: reference\n }),\n cleanReference: function() {\n win = window, \"uid\" === (ref = reference).type && delete getUIDRefStore(win)[ref.uid];\n var win, ref;\n }\n };\n }\n function crossDomainDeserialize(_ref2) {\n var sender = _ref2.sender, _ref2$basic = _ref2.basic, basic = void 0 !== _ref2$basic && _ref2$basic;\n var message = function(serializedData) {\n return JSON.parse(function(str) {\n if (\"function\" == typeof atob) return decodeURIComponent([].map.call(atob(str), (function(c) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })).join(\"\"));\n if (\"undefined\" != typeof Buffer) return Buffer.from(str, \"base64\").toString(\"utf8\");\n throw new Error(\"Can not find window.atob or Buffer\");\n }(serializedData));\n }(_ref2.data);\n var reference = message.reference, metaData = message.metaData;\n var win;\n win = \"function\" == typeof sender.win ? sender.win({\n metaData: metaData\n }) : sender.win;\n var domain;\n domain = \"function\" == typeof sender.domain ? sender.domain({\n metaData: metaData\n }) : \"string\" == typeof sender.domain ? sender.domain : message.sender.domain;\n var serializedData = function(win, ref) {\n if (\"raw\" === ref.type) return ref.val;\n if (\"uid\" === ref.type) return getUIDRefStore(win)[ref.uid];\n throw new Error(\"Unsupported ref type: \" + ref.type);\n }(win, reference);\n return {\n data: basic ? JSON.parse(serializedData) : function(source, origin, message) {\n return deserializeMessage(source, origin, message, {\n on: on_on,\n send: send_send\n });\n }(win, domain, serializedData),\n metaData: metaData,\n sender: {\n win: win,\n domain: domain\n },\n reference: reference\n };\n }\n var PROP_TYPE = {\n STRING: \"string\",\n OBJECT: \"object\",\n FUNCTION: \"function\",\n BOOLEAN: \"boolean\",\n NUMBER: \"number\",\n ARRAY: \"array\"\n };\n var PROP_SERIALIZATION = {\n JSON: \"json\",\n DOTIFY: \"dotify\",\n BASE64: \"base64\"\n };\n var CONTEXT = WINDOW_TYPE;\n var EVENT = {\n RENDER: \"zoid-render\",\n RENDERED: \"zoid-rendered\",\n DISPLAY: \"zoid-display\",\n ERROR: \"zoid-error\",\n CLOSE: \"zoid-close\",\n DESTROY: \"zoid-destroy\",\n PROPS: \"zoid-props\",\n RESIZE: \"zoid-resize\",\n FOCUS: \"zoid-focus\"\n };\n function buildChildWindowName(_ref) {\n return \"__zoid__\" + _ref.name + \"__\" + _ref.serializedPayload + \"__\";\n }\n function parseWindowName(windowName) {\n if (!windowName) throw new Error(\"No window name\");\n var _windowName$split = windowName.split(\"__\"), zoidcomp = _windowName$split[1], name = _windowName$split[2], serializedInitialPayload = _windowName$split[3];\n if (\"zoid\" !== zoidcomp) throw new Error(\"Window not rendered by zoid - got \" + zoidcomp);\n if (!name) throw new Error(\"Expected component name\");\n if (!serializedInitialPayload) throw new Error(\"Expected serialized payload ref\");\n return {\n name: name,\n serializedInitialPayload: serializedInitialPayload\n };\n }\n var parseInitialParentPayload = memoize((function(windowName) {\n var _crossDomainDeseriali = crossDomainDeserialize({\n data: parseWindowName(windowName).serializedInitialPayload,\n sender: {\n win: function(_ref2) {\n return function(windowRef) {\n if (\"opener\" === windowRef.type) return assertExists(\"opener\", getOpener(window));\n if (\"parent\" === windowRef.type && \"number\" == typeof windowRef.distance) return assertExists(\"parent\", function(win, n) {\n void 0 === n && (n = 1);\n return function(win, n) {\n void 0 === n && (n = 1);\n var parent = win;\n for (var i = 0; i < n; i++) {\n if (!parent) return;\n parent = utils_getParent(parent);\n }\n return parent;\n }(win, getDistanceFromTop(win) - n);\n }(window, windowRef.distance));\n if (\"global\" === windowRef.type && windowRef.uid && \"string\" == typeof windowRef.uid) {\n var _ret = function() {\n var uid = windowRef.uid;\n var ancestor = getAncestor(window);\n if (!ancestor) throw new Error(\"Can not find ancestor window\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(ancestor); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var frame = _getAllFramesInWindow2[_i2];\n if (isSameDomain(frame)) {\n var win = tryGlobal(frame, (function(global) {\n return global.windows && global.windows[uid];\n }));\n if (win) return {\n v: win\n };\n }\n }\n }();\n if (\"object\" == typeof _ret) return _ret.v;\n } else if (\"name\" === windowRef.type) {\n var name = windowRef.name;\n return assertExists(\"namedWindow\", function(win, name) {\n return getFrameByName(win, name) || function findChildFrameByName(win, name) {\n var frame = getFrameByName(win, name);\n if (frame) return frame;\n for (var _i11 = 0, _getFrames4 = getFrames(win); _i11 < _getFrames4.length; _i11++) {\n var namedFrame = findChildFrameByName(_getFrames4[_i11], name);\n if (namedFrame) return namedFrame;\n }\n }(getTop(win) || win, name);\n }(assertExists(\"ancestor\", getAncestor(window)), name));\n }\n throw new Error(\"Unable to find \" + windowRef.type + \" parent component window\");\n }(_ref2.metaData.windowRef);\n }\n }\n });\n return {\n parent: _crossDomainDeseriali.sender,\n payload: _crossDomainDeseriali.data,\n reference: _crossDomainDeseriali.reference\n };\n }));\n function getInitialParentPayload() {\n return parseInitialParentPayload(window.name);\n }\n function window_getWindowRef(targetWindow, currentWindow) {\n void 0 === currentWindow && (currentWindow = window);\n if (targetWindow === utils_getParent(currentWindow)) return {\n type: \"parent\",\n distance: getDistanceFromTop(targetWindow)\n };\n if (targetWindow === getOpener(currentWindow)) return {\n type: \"opener\"\n };\n if (isSameDomain(targetWindow) && !(win = targetWindow, win === getTop(win))) {\n var windowName = assertSameDomain(targetWindow).name;\n if (windowName) return {\n type: \"name\",\n name: windowName\n };\n }\n var win;\n }\n function normalizeChildProp(propsDef, props, key, value, helpers) {\n if (!propsDef.hasOwnProperty(key)) return value;\n var prop = propsDef[key];\n return \"function\" == typeof prop.childDecorate ? prop.childDecorate({\n value: value,\n uid: helpers.uid,\n tag: helpers.tag,\n close: helpers.close,\n focus: helpers.focus,\n onError: helpers.onError,\n onProps: helpers.onProps,\n resize: helpers.resize,\n getParent: helpers.getParent,\n getParentDomain: helpers.getParentDomain,\n show: helpers.show,\n hide: helpers.hide,\n export: helpers.export,\n getSiblings: helpers.getSiblings\n }) : value;\n }\n function child_focus() {\n return promise_ZalgoPromise.try((function() {\n window.focus();\n }));\n }\n function child_destroy() {\n return promise_ZalgoPromise.try((function() {\n window.close();\n }));\n }\n var props_defaultNoop = function() {\n return src_util_noop;\n };\n var props_decorateOnce = function(_ref) {\n return once(_ref.value);\n };\n function eachProp(props, propsDef, handler) {\n for (var _i2 = 0, _Object$keys2 = Object.keys(_extends({}, props, propsDef)); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n handler(key, propsDef[key], props[key]);\n }\n }\n function serializeProps(propsDef, props, method) {\n var params = {};\n return promise_ZalgoPromise.all(function(props, propsDef, handler) {\n var results = [];\n eachProp(props, propsDef, (function(key, propDef, value) {\n var result = function(key, propDef, value) {\n return promise_ZalgoPromise.resolve().then((function() {\n var _METHOD$GET$METHOD$PO, _METHOD$GET$METHOD$PO2;\n if (null != value && propDef) {\n var getParam = (_METHOD$GET$METHOD$PO = {}, _METHOD$GET$METHOD$PO.get = propDef.queryParam, \n _METHOD$GET$METHOD$PO.post = propDef.bodyParam, _METHOD$GET$METHOD$PO)[method];\n var getValue = (_METHOD$GET$METHOD$PO2 = {}, _METHOD$GET$METHOD$PO2.get = propDef.queryValue, \n _METHOD$GET$METHOD$PO2.post = propDef.bodyValue, _METHOD$GET$METHOD$PO2)[method];\n if (getParam) return promise_ZalgoPromise.hash({\n finalParam: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getParam ? getParam({\n value: value\n }) : \"string\" == typeof getParam ? getParam : key;\n })),\n finalValue: promise_ZalgoPromise.try((function() {\n return \"function\" == typeof getValue && isDefined(value) ? getValue({\n value: value\n }) : value;\n }))\n }).then((function(_ref) {\n var finalParam = _ref.finalParam, finalValue = _ref.finalValue;\n var result;\n if (\"boolean\" == typeof finalValue) result = finalValue.toString(); else if (\"string\" == typeof finalValue) result = finalValue.toString(); else if (\"object\" == typeof finalValue && null !== finalValue) {\n if (propDef.serialization === PROP_SERIALIZATION.JSON) result = JSON.stringify(finalValue); else if (propDef.serialization === PROP_SERIALIZATION.BASE64) result = base64encode(JSON.stringify(finalValue)); else if (propDef.serialization === PROP_SERIALIZATION.DOTIFY || !propDef.serialization) {\n result = function dotify(obj, prefix, newobj) {\n void 0 === prefix && (prefix = \"\");\n void 0 === newobj && (newobj = {});\n prefix = prefix ? prefix + \".\" : prefix;\n for (var key in obj) obj.hasOwnProperty(key) && null != obj[key] && \"function\" != typeof obj[key] && (obj[key] && Array.isArray(obj[key]) && obj[key].length && obj[key].every((function(val) {\n return \"object\" != typeof val;\n })) ? newobj[\"\" + prefix + key + \"[]\"] = obj[key].join(\",\") : obj[key] && \"object\" == typeof obj[key] ? newobj = dotify(obj[key], \"\" + prefix + key, newobj) : newobj[\"\" + prefix + key] = obj[key].toString());\n return newobj;\n }(finalValue, key);\n for (var _i2 = 0, _Object$keys2 = Object.keys(result); _i2 < _Object$keys2.length; _i2++) {\n var dotkey = _Object$keys2[_i2];\n params[dotkey] = result[dotkey];\n }\n return;\n }\n } else \"number\" == typeof finalValue && (result = finalValue.toString());\n params[finalParam] = result;\n }));\n }\n }));\n }(key, propDef, value);\n results.push(result);\n }));\n return results;\n }(props, propsDef)).then((function() {\n return params;\n }));\n }\n function parentComponent(_ref) {\n var uid = _ref.uid, options = _ref.options, _ref$overrides = _ref.overrides, overrides = void 0 === _ref$overrides ? {} : _ref$overrides, _ref$parentWin = _ref.parentWin, parentWin = void 0 === _ref$parentWin ? window : _ref$parentWin;\n var propsDef = options.propsDef, containerTemplate = options.containerTemplate, prerenderTemplate = options.prerenderTemplate, tag = options.tag, name = options.name, attributes = options.attributes, dimensions = options.dimensions, autoResize = options.autoResize, url = options.url, domainMatch = options.domain, xports = options.exports;\n var initPromise = new promise_ZalgoPromise;\n var handledErrors = [];\n var clean = cleanup();\n var state = {};\n var inputProps = {};\n var internalState = {\n visible: !0\n };\n var event = overrides.event ? overrides.event : (triggered = {}, handlers = {}, \n emitter = {\n on: function(eventName, handler) {\n var handlerList = handlers[eventName] = handlers[eventName] || [];\n handlerList.push(handler);\n var cancelled = !1;\n return {\n cancel: function() {\n if (!cancelled) {\n cancelled = !0;\n handlerList.splice(handlerList.indexOf(handler), 1);\n }\n }\n };\n },\n once: function(eventName, handler) {\n var listener = emitter.on(eventName, (function() {\n listener.cancel();\n handler();\n }));\n return listener;\n },\n trigger: function(eventName) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n var handlerList = handlers[eventName];\n var promises = [];\n if (handlerList) {\n var _loop = function(_i2) {\n var handler = handlerList[_i2];\n promises.push(promise_ZalgoPromise.try((function() {\n return handler.apply(void 0, args);\n })));\n };\n for (var _i2 = 0; _i2 < handlerList.length; _i2++) _loop(_i2);\n }\n return promise_ZalgoPromise.all(promises).then(src_util_noop);\n },\n triggerOnce: function(eventName) {\n if (triggered[eventName]) return promise_ZalgoPromise.resolve();\n triggered[eventName] = !0;\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) args[_key4 - 1] = arguments[_key4];\n return emitter.trigger.apply(emitter, [ eventName ].concat(args));\n },\n reset: function() {\n handlers = {};\n }\n });\n var triggered, handlers, emitter;\n var props = overrides.props ? overrides.props : {};\n var currentProxyWin;\n var currentProxyContainer;\n var childComponent;\n var currentChildDomain;\n var currentContainer;\n var onErrorOverride = overrides.onError;\n var getProxyContainerOverride = overrides.getProxyContainer;\n var showOverride = overrides.show;\n var hideOverride = overrides.hide;\n var closeOverride = overrides.close;\n var renderContainerOverride = overrides.renderContainer;\n var getProxyWindowOverride = overrides.getProxyWindow;\n var setProxyWinOverride = overrides.setProxyWin;\n var openFrameOverride = overrides.openFrame;\n var openPrerenderFrameOverride = overrides.openPrerenderFrame;\n var prerenderOverride = overrides.prerender;\n var openOverride = overrides.open;\n var openPrerenderOverride = overrides.openPrerender;\n var watchForUnloadOverride = overrides.watchForUnload;\n var getInternalStateOverride = overrides.getInternalState;\n var setInternalStateOverride = overrides.setInternalState;\n var getDimensions = function() {\n return \"function\" == typeof dimensions ? dimensions({\n props: props\n }) : dimensions;\n };\n var resolveInitPromise = function() {\n return promise_ZalgoPromise.try((function() {\n return overrides.resolveInitPromise ? overrides.resolveInitPromise() : initPromise.resolve();\n }));\n };\n var rejectInitPromise = function(err) {\n return promise_ZalgoPromise.try((function() {\n return overrides.rejectInitPromise ? overrides.rejectInitPromise(err) : initPromise.reject(err);\n }));\n };\n var getPropsForChild = function(initialChildDomain) {\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n prop && !1 === prop.sendToChild || prop && prop.sameDomain && !matchDomain(initialChildDomain, getDomain(window)) || (result[key] = props[key]);\n }\n return promise_ZalgoPromise.hash(result);\n };\n var getInternalState = function() {\n return promise_ZalgoPromise.try((function() {\n return getInternalStateOverride ? getInternalStateOverride() : internalState;\n }));\n };\n var setInternalState = function(newInternalState) {\n return promise_ZalgoPromise.try((function() {\n return setInternalStateOverride ? setInternalStateOverride(newInternalState) : internalState = _extends({}, internalState, newInternalState);\n }));\n };\n var getProxyWindow = function() {\n return getProxyWindowOverride ? getProxyWindowOverride() : promise_ZalgoPromise.try((function() {\n var windowProp = props.window;\n if (windowProp) {\n var _proxyWin = setup_toProxyWindow(windowProp);\n clean.register((function() {\n return windowProp.close();\n }));\n return _proxyWin;\n }\n return new window_ProxyWindow({\n send: send_send\n });\n }));\n };\n var setProxyWin = function(proxyWin) {\n return setProxyWinOverride ? setProxyWinOverride(proxyWin) : promise_ZalgoPromise.try((function() {\n currentProxyWin = proxyWin;\n }));\n };\n var show = function() {\n return showOverride ? showOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !0\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(showElement) : null\n }).then(src_util_noop);\n };\n var hide = function() {\n return hideOverride ? hideOverride() : promise_ZalgoPromise.hash({\n setState: setInternalState({\n visible: !1\n }),\n showElement: currentProxyContainer ? currentProxyContainer.get().then(hideElement) : null\n }).then(src_util_noop);\n };\n var getUrl = function() {\n return \"function\" == typeof url ? url({\n props: props\n }) : url;\n };\n var getAttributes = function() {\n return \"function\" == typeof attributes ? attributes({\n props: props\n }) : attributes;\n };\n var getInitialChildDomain = function() {\n return getDomainFromUrl(getUrl());\n };\n var openFrame = function(context, _ref2) {\n var windowName = _ref2.windowName;\n return openFrameOverride ? openFrameOverride(context, {\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: windowName,\n title: name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerenderFrame = function(context) {\n return openPrerenderFrameOverride ? openPrerenderFrameOverride(context) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) return getProxyObject(dom_iframe({\n attributes: _extends({\n name: \"__zoid_prerender_frame__\" + name + \"_\" + uniqueID() + \"__\",\n title: \"prerender__\" + name\n }, getAttributes().iframe)\n }));\n }));\n };\n var openPrerender = function(context, proxyWin, proxyPrerenderFrame) {\n return openPrerenderOverride ? openPrerenderOverride(context, proxyWin, proxyPrerenderFrame) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyPrerenderFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyPrerenderFrame.get().then((function(prerenderFrame) {\n clean.register((function() {\n return destroyElement(prerenderFrame);\n }));\n return awaitFrameWindow(prerenderFrame).then((function(prerenderFrameWindow) {\n return assertSameDomain(prerenderFrameWindow);\n })).then((function(win) {\n return setup_toProxyWindow(win);\n }));\n }));\n }\n if (context === CONTEXT.POPUP) return proxyWin;\n throw new Error(\"No render context available for \" + context);\n }));\n };\n var focus = function() {\n return promise_ZalgoPromise.try((function() {\n if (currentProxyWin) return promise_ZalgoPromise.all([ event.trigger(EVENT.FOCUS), currentProxyWin.focus() ]).then(src_util_noop);\n }));\n };\n var getCurrentWindowReferenceUID = function() {\n var global = lib_global_getGlobal(window);\n global.windows = global.windows || {};\n global.windows[uid] = window;\n clean.register((function() {\n delete global.windows[uid];\n }));\n return uid;\n };\n var getWindowRef = function(target, initialChildDomain, context, proxyWin) {\n if (initialChildDomain === getDomain(window)) return {\n type: \"global\",\n uid: getCurrentWindowReferenceUID()\n };\n if (target !== window) throw new Error(\"Can not construct cross-domain window reference for different target window\");\n if (props.window) {\n var actualComponentWindow = proxyWin.getWindow();\n if (!actualComponentWindow) throw new Error(\"Can not construct cross-domain window reference for lazy window prop\");\n if (getAncestor(actualComponentWindow) !== window) throw new Error(\"Can not construct cross-domain window reference for window prop with different ancestor\");\n }\n if (context === CONTEXT.POPUP) return {\n type: \"opener\"\n };\n if (context === CONTEXT.IFRAME) return {\n type: \"parent\",\n distance: getDistanceFromTop(window)\n };\n throw new Error(\"Can not construct window reference for child\");\n };\n var initChild = function(childDomain, childExports) {\n return promise_ZalgoPromise.try((function() {\n currentChildDomain = childDomain;\n childComponent = childExports;\n resolveInitPromise();\n clean.register((function() {\n return childExports.close.fireAndForget().catch(src_util_noop);\n }));\n }));\n };\n var resize = function(_ref3) {\n var width = _ref3.width, height = _ref3.height;\n return promise_ZalgoPromise.try((function() {\n event.trigger(EVENT.RESIZE, {\n width: width,\n height: height\n });\n }));\n };\n var destroy = function(err) {\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.DESTROY);\n })).catch(src_util_noop).then((function() {\n return clean.all(err);\n })).then((function() {\n initPromise.asyncReject(err || new Error(\"Component destroyed\"));\n }));\n };\n var close = memoize((function(err) {\n return promise_ZalgoPromise.try((function() {\n if (closeOverride) {\n if (isWindowClosed(closeOverride.__source__)) return;\n return closeOverride();\n }\n return promise_ZalgoPromise.try((function() {\n return event.trigger(EVENT.CLOSE);\n })).then((function() {\n return destroy(err || new Error(\"Component closed\"));\n }));\n }));\n }));\n var open = function(context, _ref4) {\n var proxyWin = _ref4.proxyWin, proxyFrame = _ref4.proxyFrame, windowName = _ref4.windowName;\n return openOverride ? openOverride(context, {\n proxyWin: proxyWin,\n proxyFrame: proxyFrame,\n windowName: windowName\n }) : promise_ZalgoPromise.try((function() {\n if (context === CONTEXT.IFRAME) {\n if (!proxyFrame) throw new Error(\"Expected proxy frame to be passed\");\n return proxyFrame.get().then((function(frame) {\n return awaitFrameWindow(frame).then((function(win) {\n clean.register((function() {\n return destroyElement(frame);\n }));\n clean.register((function() {\n return cleanUpWindow(win);\n }));\n return win;\n }));\n }));\n }\n if (context === CONTEXT.POPUP) {\n var _getDimensions = getDimensions(), _getDimensions$width = _getDimensions.width, width = void 0 === _getDimensions$width ? \"300px\" : _getDimensions$width, _getDimensions$height = _getDimensions.height, height = void 0 === _getDimensions$height ? \"150px\" : _getDimensions$height;\n width = normalizeDimension(width, window.outerWidth);\n height = normalizeDimension(height, window.outerWidth);\n var win = function(url, options) {\n var _options$closeOnUnloa = (options = options || {}).closeOnUnload, closeOnUnload = void 0 === _options$closeOnUnloa ? 1 : _options$closeOnUnloa, _options$name = options.name, name = void 0 === _options$name ? \"\" : _options$name, width = options.width, height = options.height;\n var top = 0;\n var left = 0;\n width && (window.outerWidth ? left = Math.round((window.outerWidth - width) / 2) + window.screenX : window.screen.width && (left = Math.round((window.screen.width - width) / 2)));\n height && (window.outerHeight ? top = Math.round((window.outerHeight - height) / 2) + window.screenY : window.screen.height && (top = Math.round((window.screen.height - height) / 2)));\n delete options.closeOnUnload;\n delete options.name;\n width && height && (options = _extends({\n top: top,\n left: left,\n width: width,\n height: height,\n status: 1,\n toolbar: 0,\n menubar: 0,\n resizable: 1,\n scrollbars: 1\n }, options));\n var params = Object.keys(options).map((function(key) {\n if (null != options[key]) return key + \"=\" + stringify(options[key]);\n })).filter(Boolean).join(\",\");\n var win;\n try {\n win = window.open(\"\", name, params);\n } catch (err) {\n throw new dom_PopupOpenError(\"Can not open popup window - \" + (err.stack || err.message));\n }\n if (isWindowClosed(win)) {\n var err;\n throw new dom_PopupOpenError(\"Can not open popup window - blocked\");\n }\n closeOnUnload && window.addEventListener(\"unload\", (function() {\n return win.close();\n }));\n return win;\n }(0, _extends({\n name: windowName,\n width: width,\n height: height\n }, getAttributes().popup));\n clean.register((function() {\n return closeWindow(win);\n }));\n clean.register((function() {\n return cleanUpWindow(win);\n }));\n return win;\n }\n throw new Error(\"No render context available for \" + context);\n })).then((function(win) {\n proxyWin.setWindow(win, {\n send: send_send\n });\n return proxyWin.setName(windowName).then((function() {\n return proxyWin;\n }));\n }));\n };\n var watchForUnload = function() {\n return promise_ZalgoPromise.try((function() {\n var unloadWindowListener = addEventListener(window, \"unload\", once((function() {\n destroy(new Error(\"Window navigated away\"));\n })));\n var closeParentWindowListener = onCloseWindow(parentWin, destroy, 3e3);\n clean.register(closeParentWindowListener.cancel);\n clean.register(unloadWindowListener.cancel);\n if (watchForUnloadOverride) return watchForUnloadOverride();\n }));\n };\n var checkWindowClose = function(proxyWin) {\n var closed = !1;\n return proxyWin.isClosed().then((function(isClosed) {\n if (isClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n return promise_ZalgoPromise.delay(200).then((function() {\n return proxyWin.isClosed();\n })).then((function(secondIsClosed) {\n if (secondIsClosed) {\n closed = !0;\n return close(new Error(\"Detected component window close\"));\n }\n }));\n })).then((function() {\n return closed;\n }));\n };\n var onError = function(err) {\n return onErrorOverride ? onErrorOverride(err) : promise_ZalgoPromise.try((function() {\n if (-1 === handledErrors.indexOf(err)) {\n handledErrors.push(err);\n initPromise.asyncReject(err);\n return event.trigger(EVENT.ERROR, err);\n }\n }));\n };\n var exportsPromise = new promise_ZalgoPromise;\n var xport = function(actualExports) {\n return promise_ZalgoPromise.try((function() {\n exportsPromise.resolve(actualExports);\n }));\n };\n initChild.onError = onError;\n var renderTemplate = function(renderer, _ref8) {\n return renderer({\n uid: uid,\n container: _ref8.container,\n context: _ref8.context,\n doc: _ref8.doc,\n frame: _ref8.frame,\n prerenderFrame: _ref8.prerenderFrame,\n focus: focus,\n close: close,\n state: state,\n props: props,\n tag: tag,\n dimensions: getDimensions(),\n event: event\n });\n };\n var prerender = function(proxyPrerenderWin, _ref9) {\n var context = _ref9.context;\n return prerenderOverride ? prerenderOverride(proxyPrerenderWin, {\n context: context\n }) : promise_ZalgoPromise.try((function() {\n if (prerenderTemplate) {\n var prerenderWindow = proxyPrerenderWin.getWindow();\n if (prerenderWindow && isSameDomain(prerenderWindow) && function(win) {\n try {\n if (!win.location.href) return !0;\n if (\"about:blank\" === win.location.href) return !0;\n } catch (err) {}\n return !1;\n }(prerenderWindow)) {\n var doc = (prerenderWindow = assertSameDomain(prerenderWindow)).document;\n var el = renderTemplate(prerenderTemplate, {\n context: context,\n doc: doc\n });\n if (el) {\n if (el.ownerDocument !== doc) throw new Error(\"Expected prerender template to have been created with document from child window\");\n !function(win, el) {\n var tag = el.tagName.toLowerCase();\n if (\"html\" !== tag) throw new Error(\"Expected element to be html, got \" + tag);\n var documentElement = win.document.documentElement;\n for (var _i6 = 0, _arrayFrom2 = arrayFrom(documentElement.children); _i6 < _arrayFrom2.length; _i6++) documentElement.removeChild(_arrayFrom2[_i6]);\n for (var _i8 = 0, _arrayFrom4 = arrayFrom(el.children); _i8 < _arrayFrom4.length; _i8++) documentElement.appendChild(_arrayFrom4[_i8]);\n }(prerenderWindow, el);\n var _autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, _autoResize$element = autoResize.element, element = void 0 === _autoResize$element ? \"body\" : _autoResize$element;\n if ((element = getElementSafe(element, doc)) && (width || height)) {\n var prerenderResizeListener = onResize(element, (function(_ref10) {\n resize({\n width: width ? _ref10.width : void 0,\n height: height ? _ref10.height : void 0\n });\n }), {\n width: width,\n height: height,\n win: prerenderWindow\n });\n event.on(EVENT.RENDERED, prerenderResizeListener.cancel);\n }\n }\n }\n }\n }));\n };\n var renderContainer = function(proxyContainer, _ref11) {\n var proxyFrame = _ref11.proxyFrame, proxyPrerenderFrame = _ref11.proxyPrerenderFrame, context = _ref11.context, rerender = _ref11.rerender;\n return renderContainerOverride ? renderContainerOverride(proxyContainer, {\n proxyFrame: proxyFrame,\n proxyPrerenderFrame: proxyPrerenderFrame,\n context: context,\n rerender: rerender\n }) : promise_ZalgoPromise.hash({\n container: proxyContainer.get(),\n frame: proxyFrame ? proxyFrame.get() : null,\n prerenderFrame: proxyPrerenderFrame ? proxyPrerenderFrame.get() : null,\n internalState: getInternalState()\n }).then((function(_ref12) {\n var container = _ref12.container, visible = _ref12.internalState.visible;\n var innerContainer = renderTemplate(containerTemplate, {\n context: context,\n container: container,\n frame: _ref12.frame,\n prerenderFrame: _ref12.prerenderFrame,\n doc: document\n });\n if (innerContainer) {\n visible || hideElement(innerContainer);\n appendChild(container, innerContainer);\n var containerWatcher = function(element, handler) {\n handler = once(handler);\n var cancelled = !1;\n var mutationObservers = [];\n var interval;\n var sacrificialFrame;\n var sacrificialFrameWin;\n var cancel = function() {\n cancelled = !0;\n for (var _i18 = 0; _i18 < mutationObservers.length; _i18++) mutationObservers[_i18].disconnect();\n interval && interval.cancel();\n sacrificialFrameWin && sacrificialFrameWin.removeEventListener(\"unload\", elementClosed);\n sacrificialFrame && destroyElement(sacrificialFrame);\n };\n var elementClosed = function() {\n if (!cancelled) {\n handler();\n cancel();\n }\n };\n if (isElementClosed(element)) {\n elementClosed();\n return {\n cancel: cancel\n };\n }\n if (window.MutationObserver) {\n var mutationElement = element.parentElement;\n for (;mutationElement; ) {\n var mutationObserver = new window.MutationObserver((function() {\n isElementClosed(element) && elementClosed();\n }));\n mutationObserver.observe(mutationElement, {\n childList: !0\n });\n mutationObservers.push(mutationObserver);\n mutationElement = mutationElement.parentElement;\n }\n }\n (sacrificialFrame = document.createElement(\"iframe\")).setAttribute(\"name\", \"__detect_close_\" + uniqueID() + \"__\");\n sacrificialFrame.style.display = \"none\";\n awaitFrameWindow(sacrificialFrame).then((function(frameWin) {\n (sacrificialFrameWin = assertSameDomain(frameWin)).addEventListener(\"unload\", elementClosed);\n }));\n element.appendChild(sacrificialFrame);\n interval = safeInterval((function() {\n isElementClosed(element) && elementClosed();\n }), 1e3);\n return {\n cancel: cancel\n };\n }(innerContainer, (function() {\n var removeError = new Error(\"Detected container element removed from DOM\");\n return promise_ZalgoPromise.delay(1).then((function() {\n if (!isElementClosed(innerContainer)) {\n clean.all(removeError);\n return rerender().then(resolveInitPromise, rejectInitPromise);\n }\n close(removeError);\n }));\n }));\n clean.register((function() {\n return containerWatcher.cancel();\n }));\n clean.register((function() {\n return destroyElement(innerContainer);\n }));\n return currentProxyContainer = getProxyObject(innerContainer);\n }\n }));\n };\n var getHelpers = function() {\n return {\n state: state,\n event: event,\n close: close,\n focus: focus,\n resize: resize,\n onError: onError,\n updateProps: updateProps,\n show: show,\n hide: hide\n };\n };\n var setProps = function(newInputProps) {\n void 0 === newInputProps && (newInputProps = {});\n var container = currentContainer;\n var helpers = getHelpers();\n extend(inputProps, newInputProps);\n !function(propsDef, existingProps, inputProps, helpers, container) {\n var state = helpers.state, close = helpers.close, focus = helpers.focus, event = helpers.event, onError = helpers.onError;\n eachProp(inputProps, propsDef, (function(key, propDef, val) {\n var valueDetermined = !1;\n var value = val;\n Object.defineProperty(existingProps, key, {\n configurable: !0,\n enumerable: !0,\n get: function() {\n if (valueDetermined) return value;\n valueDetermined = !0;\n return function() {\n if (!propDef) return value;\n var alias = propDef.alias;\n alias && !isDefined(val) && isDefined(inputProps[alias]) && (value = inputProps[alias]);\n propDef.value && (value = propDef.value({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n !propDef.default || isDefined(value) || isDefined(inputProps[key]) || (value = propDef.default({\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n if (isDefined(value)) {\n if (propDef.type === PROP_TYPE.ARRAY ? !Array.isArray(value) : typeof value !== propDef.type) throw new TypeError(\"Prop is not of type \" + propDef.type + \": \" + key);\n } else if (!1 !== propDef.required && !isDefined(inputProps[key])) throw new Error('Expected prop \"' + key + '\" to be defined');\n isDefined(value) && propDef.decorate && (value = propDef.decorate({\n value: value,\n props: existingProps,\n state: state,\n close: close,\n focus: focus,\n event: event,\n onError: onError,\n container: container\n }));\n return value;\n }();\n }\n });\n }));\n eachProp(existingProps, propsDef, src_util_noop);\n }(propsDef, props, inputProps, helpers, container);\n };\n var updateProps = function(newProps) {\n setProps(newProps);\n return initPromise.then((function() {\n var child = childComponent;\n var proxyWin = currentProxyWin;\n if (child && proxyWin && currentChildDomain) return getPropsForChild(currentChildDomain).then((function(childProps) {\n return child.updateProps(childProps).catch((function(err) {\n return checkWindowClose(proxyWin).then((function(closed) {\n if (!closed) throw err;\n }));\n }));\n }));\n }));\n };\n var getProxyContainer = function(container) {\n return getProxyContainerOverride ? getProxyContainerOverride(container) : promise_ZalgoPromise.try((function() {\n return elementReady(container);\n })).then((function(containerElement) {\n isShadowElement(containerElement) && (containerElement = function insertShadowSlot(element) {\n var shadowHost = function(element) {\n var shadowRoot = function(element) {\n for (;element.parentNode; ) element = element.parentNode;\n if (isShadowElement(element)) return element;\n }(element);\n if (shadowRoot && shadowRoot.host) return shadowRoot.host;\n }(element);\n if (!shadowHost) throw new Error(\"Element is not in shadow dom\");\n var slotName = \"shadow-slot-\" + uniqueID();\n var slot = document.createElement(\"slot\");\n slot.setAttribute(\"name\", slotName);\n element.appendChild(slot);\n var slotProvider = document.createElement(\"div\");\n slotProvider.setAttribute(\"slot\", slotName);\n shadowHost.appendChild(slotProvider);\n return isShadowElement(shadowHost) ? insertShadowSlot(slotProvider) : slotProvider;\n }(containerElement));\n currentContainer = containerElement;\n return getProxyObject(containerElement);\n }));\n };\n return {\n init: function() {\n !function() {\n event.on(EVENT.RENDER, (function() {\n return props.onRender();\n }));\n event.on(EVENT.DISPLAY, (function() {\n return props.onDisplay();\n }));\n event.on(EVENT.RENDERED, (function() {\n return props.onRendered();\n }));\n event.on(EVENT.CLOSE, (function() {\n return props.onClose();\n }));\n event.on(EVENT.DESTROY, (function() {\n return props.onDestroy();\n }));\n event.on(EVENT.RESIZE, (function() {\n return props.onResize();\n }));\n event.on(EVENT.FOCUS, (function() {\n return props.onFocus();\n }));\n event.on(EVENT.PROPS, (function(newProps) {\n return props.onProps(newProps);\n }));\n event.on(EVENT.ERROR, (function(err) {\n return props && props.onError ? props.onError(err) : rejectInitPromise(err).then((function() {\n setTimeout((function() {\n throw err;\n }), 1);\n }));\n }));\n clean.register(event.reset);\n }();\n },\n render: function(_ref14) {\n var target = _ref14.target, container = _ref14.container, context = _ref14.context, rerender = _ref14.rerender;\n return promise_ZalgoPromise.try((function() {\n var initialChildDomain = getInitialChildDomain();\n var childDomainMatch = domainMatch || getInitialChildDomain();\n !function(target, childDomainMatch, container) {\n if (target !== window) {\n if (!isSameTopWindow(window, target)) throw new Error(\"Can only renderTo an adjacent frame\");\n var origin = getDomain();\n if (!matchDomain(childDomainMatch, origin) && !isSameDomain(target)) throw new Error(\"Can not render remotely to \" + childDomainMatch.toString() + \" - can only render to \" + origin);\n if (container && \"string\" != typeof container) throw new Error(\"Container passed to renderTo must be a string selector, got \" + typeof container + \" }\");\n }\n }(target, childDomainMatch, container);\n var delegatePromise = promise_ZalgoPromise.try((function() {\n if (target !== window) return function(context, target) {\n var delegateProps = {};\n for (var _i4 = 0, _Object$keys4 = Object.keys(props); _i4 < _Object$keys4.length; _i4++) {\n var propName = _Object$keys4[_i4];\n var propDef = propsDef[propName];\n propDef && propDef.allowDelegate && (delegateProps[propName] = props[propName]);\n }\n var childOverridesPromise = send_send(target, \"zoid_delegate_\" + name, {\n uid: uid,\n overrides: {\n props: delegateProps,\n event: event,\n close: close,\n onError: onError,\n getInternalState: getInternalState,\n setInternalState: setInternalState,\n resolveInitPromise: resolveInitPromise,\n rejectInitPromise: rejectInitPromise\n }\n }).then((function(_ref13) {\n var parentComp = _ref13.data.parent;\n clean.register((function(err) {\n if (!isWindowClosed(target)) return parentComp.destroy(err);\n }));\n return parentComp.getDelegateOverrides();\n })).catch((function(err) {\n throw new Error(\"Unable to delegate rendering. Possibly the component is not loaded in the target window.\\n\\n\" + stringifyError(err));\n }));\n getProxyContainerOverride = function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyContainer.apply(childOverrides, args);\n }));\n };\n renderContainerOverride = function() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.renderContainer.apply(childOverrides, args);\n }));\n };\n showOverride = function() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.show.apply(childOverrides, args);\n }));\n };\n hideOverride = function() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.hide.apply(childOverrides, args);\n }));\n };\n watchForUnloadOverride = function() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) args[_key5] = arguments[_key5];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.watchForUnload.apply(childOverrides, args);\n }));\n };\n if (context === CONTEXT.IFRAME) {\n getProxyWindowOverride = function() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) args[_key6] = arguments[_key6];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.getProxyWindow.apply(childOverrides, args);\n }));\n };\n openFrameOverride = function() {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) args[_key7] = arguments[_key7];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openFrame.apply(childOverrides, args);\n }));\n };\n openPrerenderFrameOverride = function() {\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) args[_key8] = arguments[_key8];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerenderFrame.apply(childOverrides, args);\n }));\n };\n prerenderOverride = function() {\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) args[_key9] = arguments[_key9];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.prerender.apply(childOverrides, args);\n }));\n };\n openOverride = function() {\n for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) args[_key10] = arguments[_key10];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.open.apply(childOverrides, args);\n }));\n };\n openPrerenderOverride = function() {\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) args[_key11] = arguments[_key11];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.openPrerender.apply(childOverrides, args);\n }));\n };\n } else context === CONTEXT.POPUP && (setProxyWinOverride = function() {\n for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) args[_key12] = arguments[_key12];\n return childOverridesPromise.then((function(childOverrides) {\n return childOverrides.setProxyWin.apply(childOverrides, args);\n }));\n });\n return childOverridesPromise;\n }(context, target);\n }));\n var windowProp = props.window;\n var watchForUnloadPromise = watchForUnload();\n var buildBodyPromise = serializeProps(propsDef, props, \"post\");\n var onRenderPromise = event.trigger(EVENT.RENDER);\n var getProxyContainerPromise = getProxyContainer(container);\n var getProxyWindowPromise = getProxyWindow();\n var finalSetPropsPromise = getProxyContainerPromise.then((function() {\n return setProps();\n }));\n var buildUrlPromise = finalSetPropsPromise.then((function() {\n return serializeProps(propsDef, props, \"get\").then((function(query) {\n return function(url, options) {\n var query = options.query || {};\n var hash = options.hash || {};\n var originalUrl;\n var originalHash;\n var _url$split = url.split(\"#\");\n originalHash = _url$split[1];\n var _originalUrl$split = (originalUrl = _url$split[0]).split(\"?\");\n originalUrl = _originalUrl$split[0];\n var queryString = extendQuery(_originalUrl$split[1], query);\n var hashString = extendQuery(originalHash, hash);\n queryString && (originalUrl = originalUrl + \"?\" + queryString);\n hashString && (originalUrl = originalUrl + \"#\" + hashString);\n return originalUrl;\n }(normalizeMockUrl(getUrl()), {\n query: query\n });\n }));\n }));\n var buildWindowNamePromise = getProxyWindowPromise.then((function(proxyWin) {\n return function(_temp2) {\n var _ref6 = void 0 === _temp2 ? {} : _temp2, proxyWin = _ref6.proxyWin, initialChildDomain = _ref6.initialChildDomain, childDomainMatch = _ref6.childDomainMatch, _ref6$target = _ref6.target, target = void 0 === _ref6$target ? window : _ref6$target, context = _ref6.context;\n return function(_temp) {\n var _ref5 = void 0 === _temp ? {} : _temp, proxyWin = _ref5.proxyWin, childDomainMatch = _ref5.childDomainMatch, context = _ref5.context;\n return getPropsForChild(_ref5.initialChildDomain).then((function(childProps) {\n return {\n uid: uid,\n context: context,\n tag: tag,\n childDomainMatch: childDomainMatch,\n version: \"9_0_86\",\n props: childProps,\n exports: (win = proxyWin, {\n init: function(childExports) {\n return initChild(this.origin, childExports);\n },\n close: close,\n checkClose: function() {\n return checkWindowClose(win);\n },\n resize: resize,\n onError: onError,\n show: show,\n hide: hide,\n export: xport\n })\n };\n var win;\n }));\n }({\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n context: context\n }).then((function(childPayload) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: childPayload,\n metaData: {\n windowRef: getWindowRef(target, initialChildDomain, context, proxyWin)\n },\n sender: {\n domain: getDomain(window)\n },\n receiver: {\n win: proxyWin,\n domain: childDomainMatch\n },\n passByReference: initialChildDomain === getDomain()\n }), serializedData = _crossDomainSerialize.serializedData;\n clean.register(_crossDomainSerialize.cleanReference);\n return serializedData;\n }));\n }({\n proxyWin: (_ref7 = {\n proxyWin: proxyWin,\n initialChildDomain: initialChildDomain,\n childDomainMatch: childDomainMatch,\n target: target,\n context: context\n }).proxyWin,\n initialChildDomain: _ref7.initialChildDomain,\n childDomainMatch: _ref7.childDomainMatch,\n target: _ref7.target,\n context: _ref7.context\n }).then((function(serializedPayload) {\n return buildChildWindowName({\n name: name,\n serializedPayload: serializedPayload\n });\n }));\n var _ref7;\n }));\n var openFramePromise = buildWindowNamePromise.then((function(windowName) {\n return openFrame(context, {\n windowName: windowName\n });\n }));\n var openPrerenderFramePromise = openPrerenderFrame(context);\n var renderContainerPromise = promise_ZalgoPromise.hash({\n proxyContainer: getProxyContainerPromise,\n proxyFrame: openFramePromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref15) {\n return renderContainer(_ref15.proxyContainer, {\n context: context,\n proxyFrame: _ref15.proxyFrame,\n proxyPrerenderFrame: _ref15.proxyPrerenderFrame,\n rerender: rerender\n });\n })).then((function(proxyContainer) {\n return proxyContainer;\n }));\n var openPromise = promise_ZalgoPromise.hash({\n windowName: buildWindowNamePromise,\n proxyFrame: openFramePromise,\n proxyWin: getProxyWindowPromise\n }).then((function(_ref16) {\n var proxyWin = _ref16.proxyWin;\n return windowProp ? proxyWin : open(context, {\n windowName: _ref16.windowName,\n proxyWin: proxyWin,\n proxyFrame: _ref16.proxyFrame\n });\n }));\n var openPrerenderPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n proxyPrerenderFrame: openPrerenderFramePromise\n }).then((function(_ref17) {\n return openPrerender(context, _ref17.proxyWin, _ref17.proxyPrerenderFrame);\n }));\n var setStatePromise = openPromise.then((function(proxyWin) {\n currentProxyWin = proxyWin;\n return setProxyWin(proxyWin);\n }));\n var prerenderPromise = promise_ZalgoPromise.hash({\n proxyPrerenderWin: openPrerenderPromise,\n state: setStatePromise\n }).then((function(_ref18) {\n return prerender(_ref18.proxyPrerenderWin, {\n context: context\n });\n }));\n var setWindowNamePromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowName: buildWindowNamePromise\n }).then((function(_ref19) {\n if (windowProp) return _ref19.proxyWin.setName(_ref19.windowName);\n }));\n var getMethodPromise = promise_ZalgoPromise.hash({\n body: buildBodyPromise\n }).then((function(_ref20) {\n return options.method ? options.method : Object.keys(_ref20.body).length ? \"post\" : \"get\";\n }));\n var loadUrlPromise = promise_ZalgoPromise.hash({\n proxyWin: openPromise,\n windowUrl: buildUrlPromise,\n body: buildBodyPromise,\n method: getMethodPromise,\n windowName: setWindowNamePromise,\n prerender: prerenderPromise\n }).then((function(_ref21) {\n return _ref21.proxyWin.setLocation(_ref21.windowUrl, {\n method: _ref21.method,\n body: _ref21.body\n });\n }));\n var watchForClosePromise = openPromise.then((function(proxyWin) {\n !function watchForClose(proxyWin, context) {\n var cancelled = !1;\n clean.register((function() {\n cancelled = !0;\n }));\n return promise_ZalgoPromise.delay(2e3).then((function() {\n return proxyWin.isClosed();\n })).then((function(isClosed) {\n if (!cancelled) return isClosed ? close(new Error(\"Detected \" + context + \" close\")) : watchForClose(proxyWin, context);\n }));\n }(proxyWin, context);\n }));\n var onDisplayPromise = promise_ZalgoPromise.hash({\n container: renderContainerPromise,\n prerender: prerenderPromise\n }).then((function() {\n return event.trigger(EVENT.DISPLAY);\n }));\n var openBridgePromise = openPromise.then((function(proxyWin) {\n return function(proxyWin, initialChildDomain, context) {\n return promise_ZalgoPromise.try((function() {\n return proxyWin.awaitWindow();\n })).then((function(win) {\n if (src_bridge && src_bridge.needsBridge({\n win: win,\n domain: initialChildDomain\n }) && !src_bridge.hasBridge(initialChildDomain, initialChildDomain)) {\n var bridgeUrl = \"function\" == typeof options.bridgeUrl ? options.bridgeUrl({\n props: props\n }) : options.bridgeUrl;\n if (!bridgeUrl) throw new Error(\"Bridge needed to render \" + context);\n var bridgeDomain = getDomainFromUrl(bridgeUrl);\n src_bridge.linkUrl(win, initialChildDomain);\n return src_bridge.openBridge(normalizeMockUrl(bridgeUrl), bridgeDomain);\n }\n }));\n }(proxyWin, initialChildDomain, context);\n }));\n var runTimeoutPromise = loadUrlPromise.then((function() {\n return promise_ZalgoPromise.try((function() {\n var timeout = props.timeout;\n if (timeout) return initPromise.timeout(timeout, new Error(\"Loading component timed out after \" + timeout + \" milliseconds\"));\n }));\n }));\n var onRenderedPromise = initPromise.then((function() {\n return event.trigger(EVENT.RENDERED);\n }));\n return promise_ZalgoPromise.hash({\n initPromise: initPromise,\n buildUrlPromise: buildUrlPromise,\n onRenderPromise: onRenderPromise,\n getProxyContainerPromise: getProxyContainerPromise,\n openFramePromise: openFramePromise,\n openPrerenderFramePromise: openPrerenderFramePromise,\n renderContainerPromise: renderContainerPromise,\n openPromise: openPromise,\n openPrerenderPromise: openPrerenderPromise,\n setStatePromise: setStatePromise,\n prerenderPromise: prerenderPromise,\n loadUrlPromise: loadUrlPromise,\n buildWindowNamePromise: buildWindowNamePromise,\n setWindowNamePromise: setWindowNamePromise,\n watchForClosePromise: watchForClosePromise,\n onDisplayPromise: onDisplayPromise,\n openBridgePromise: openBridgePromise,\n runTimeoutPromise: runTimeoutPromise,\n onRenderedPromise: onRenderedPromise,\n delegatePromise: delegatePromise,\n watchForUnloadPromise: watchForUnloadPromise,\n finalSetPropsPromise: finalSetPropsPromise\n });\n })).catch((function(err) {\n return promise_ZalgoPromise.all([ onError(err), destroy(err) ]).then((function() {\n throw err;\n }), (function() {\n throw err;\n }));\n })).then(src_util_noop);\n },\n destroy: destroy,\n getProps: function() {\n return props;\n },\n setProps: setProps,\n export: xport,\n getHelpers: getHelpers,\n getDelegateOverrides: function() {\n return promise_ZalgoPromise.try((function() {\n return {\n getProxyContainer: getProxyContainer,\n show: show,\n hide: hide,\n renderContainer: renderContainer,\n getProxyWindow: getProxyWindow,\n watchForUnload: watchForUnload,\n openFrame: openFrame,\n openPrerenderFrame: openPrerenderFrame,\n prerender: prerender,\n open: open,\n openPrerender: openPrerender,\n setProxyWin: setProxyWin\n };\n }));\n },\n getExports: function() {\n return xports({\n getExports: function() {\n return exportsPromise;\n }\n });\n }\n };\n }\n function defaultContainerTemplate(_ref) {\n var uid = _ref.uid, frame = _ref.frame, prerenderFrame = _ref.prerenderFrame, doc = _ref.doc, props = _ref.props, event = _ref.event, dimensions = _ref.dimensions;\n var width = dimensions.width, height = dimensions.height;\n if (frame && prerenderFrame) {\n var div = doc.createElement(\"div\");\n div.setAttribute(\"id\", uid);\n var style = doc.createElement(\"style\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n style.appendChild(doc.createTextNode(\"\\n #\" + uid + \" {\\n display: inline-block;\\n position: relative;\\n width: \" + width + \";\\n height: \" + height + \";\\n }\\n\\n #\" + uid + \" > iframe {\\n display: inline-block;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n top: 0;\\n left: 0;\\n transition: opacity .2s ease-in-out;\\n }\\n\\n #\" + uid + \" > iframe.zoid-invisible {\\n opacity: 0;\\n }\\n\\n #\" + uid + \" > iframe.zoid-visible {\\n opacity: 1;\\n }\\n \"));\n div.appendChild(frame);\n div.appendChild(prerenderFrame);\n div.appendChild(style);\n prerenderFrame.classList.add(\"zoid-visible\");\n frame.classList.add(\"zoid-invisible\");\n event.on(EVENT.RENDERED, (function() {\n prerenderFrame.classList.remove(\"zoid-visible\");\n prerenderFrame.classList.add(\"zoid-invisible\");\n frame.classList.remove(\"zoid-invisible\");\n frame.classList.add(\"zoid-visible\");\n setTimeout((function() {\n destroyElement(prerenderFrame);\n }), 1);\n }));\n event.on(EVENT.RESIZE, (function(_ref2) {\n var newWidth = _ref2.width, newHeight = _ref2.height;\n \"number\" == typeof newWidth && (div.style.width = toCSS(newWidth));\n \"number\" == typeof newHeight && (div.style.height = toCSS(newHeight));\n }));\n return div;\n }\n }\n function defaultPrerenderTemplate(_ref) {\n var doc = _ref.doc, props = _ref.props;\n var html = doc.createElement(\"html\");\n var body = doc.createElement(\"body\");\n var style = doc.createElement(\"style\");\n var spinner = doc.createElement(\"div\");\n spinner.classList.add(\"spinner\");\n props.cspNonce && style.setAttribute(\"nonce\", props.cspNonce);\n html.appendChild(body);\n body.appendChild(spinner);\n body.appendChild(style);\n style.appendChild(doc.createTextNode(\"\\n html, body {\\n width: 100%;\\n height: 100%;\\n }\\n\\n .spinner {\\n position: fixed;\\n max-height: 60vmin;\\n max-width: 60vmin;\\n height: 40px;\\n width: 40px;\\n top: 50%;\\n left: 50%;\\n box-sizing: border-box;\\n border: 3px solid rgba(0, 0, 0, .2);\\n border-top-color: rgba(33, 128, 192, 0.8);\\n border-radius: 100%;\\n animation: rotation .7s infinite linear;\\n }\\n\\n @keyframes rotation {\\n from {\\n transform: translateX(-50%) translateY(-50%) rotate(0deg);\\n }\\n to {\\n transform: translateX(-50%) translateY(-50%) rotate(359deg);\\n }\\n }\\n \"));\n return html;\n }\n var cleanInstances = cleanup();\n var cleanZoid = cleanup();\n function component(opts) {\n var options = function(options) {\n var tag = options.tag, url = options.url, domain = options.domain, bridgeUrl = options.bridgeUrl, _options$props = options.props, props = void 0 === _options$props ? {} : _options$props, _options$dimensions = options.dimensions, dimensions = void 0 === _options$dimensions ? {} : _options$dimensions, _options$autoResize = options.autoResize, autoResize = void 0 === _options$autoResize ? {} : _options$autoResize, _options$allowedParen = options.allowedParentDomains, allowedParentDomains = void 0 === _options$allowedParen ? \"*\" : _options$allowedParen, _options$attributes = options.attributes, attributes = void 0 === _options$attributes ? {} : _options$attributes, _options$defaultConte = options.defaultContext, defaultContext = void 0 === _options$defaultConte ? CONTEXT.IFRAME : _options$defaultConte, _options$containerTem = options.containerTemplate, containerTemplate = void 0 === _options$containerTem ? defaultContainerTemplate : _options$containerTem, _options$prerenderTem = options.prerenderTemplate, prerenderTemplate = void 0 === _options$prerenderTem ? defaultPrerenderTemplate : _options$prerenderTem, validate = options.validate, _options$eligible = options.eligible, eligible = void 0 === _options$eligible ? function() {\n return {\n eligible: !0\n };\n } : _options$eligible, _options$logger = options.logger, logger = void 0 === _options$logger ? {\n info: src_util_noop\n } : _options$logger, _options$exports = options.exports, xportsDefinition = void 0 === _options$exports ? src_util_noop : _options$exports, method = options.method, _options$children = options.children, children = void 0 === _options$children ? function() {\n return {};\n } : _options$children;\n var name = tag.replace(/-/g, \"_\");\n var propsDef = _extends({}, {\n window: {\n type: PROP_TYPE.OBJECT,\n sendToChild: !1,\n required: !1,\n allowDelegate: !0,\n validate: function(_ref2) {\n var value = _ref2.value;\n if (!isWindow(value) && !window_ProxyWindow.isProxyWindow(value)) throw new Error(\"Expected Window or ProxyWindow\");\n if (isWindow(value)) {\n if (isWindowClosed(value)) throw new Error(\"Window is closed\");\n if (!isSameDomain(value)) throw new Error(\"Window is not same domain\");\n }\n },\n decorate: function(_ref3) {\n return setup_toProxyWindow(_ref3.value);\n }\n },\n timeout: {\n type: PROP_TYPE.NUMBER,\n required: !1,\n sendToChild: !1\n },\n cspNonce: {\n type: PROP_TYPE.STRING,\n required: !1\n },\n onDisplay: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRendered: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onRender: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onClose: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onDestroy: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop,\n decorate: props_decorateOnce\n },\n onResize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n onFocus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n allowDelegate: !0,\n default: props_defaultNoop\n },\n close: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref4) {\n return _ref4.close;\n }\n },\n focus: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref5) {\n return _ref5.focus;\n }\n },\n resize: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref6) {\n return _ref6.resize;\n }\n },\n uid: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref7) {\n return _ref7.uid;\n }\n },\n tag: {\n type: PROP_TYPE.STRING,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref8) {\n return _ref8.tag;\n }\n },\n getParent: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref9) {\n return _ref9.getParent;\n }\n },\n getParentDomain: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref10) {\n return _ref10.getParentDomain;\n }\n },\n show: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref11) {\n return _ref11.show;\n }\n },\n hide: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref12) {\n return _ref12.hide;\n }\n },\n export: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref13) {\n return _ref13.export;\n }\n },\n onError: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref14) {\n return _ref14.onError;\n }\n },\n onProps: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref15) {\n return _ref15.onProps;\n }\n },\n getSiblings: {\n type: PROP_TYPE.FUNCTION,\n required: !1,\n sendToChild: !1,\n childDecorate: function(_ref16) {\n return _ref16.getSiblings;\n }\n }\n }, props);\n if (!containerTemplate) throw new Error(\"Container template required\");\n return {\n name: name,\n tag: tag,\n url: url,\n domain: domain,\n bridgeUrl: bridgeUrl,\n method: method,\n propsDef: propsDef,\n dimensions: dimensions,\n autoResize: autoResize,\n allowedParentDomains: allowedParentDomains,\n attributes: attributes,\n defaultContext: defaultContext,\n containerTemplate: containerTemplate,\n prerenderTemplate: prerenderTemplate,\n validate: validate,\n logger: logger,\n eligible: eligible,\n children: children,\n exports: \"function\" == typeof xportsDefinition ? xportsDefinition : function(_ref) {\n var getExports = _ref.getExports;\n var result = {};\n var _loop = function(_i2, _Object$keys2) {\n var key = _Object$keys2[_i2];\n var type = xportsDefinition[key].type;\n var valuePromise = getExports().then((function(res) {\n return res[key];\n }));\n result[key] = type === PROP_TYPE.FUNCTION ? function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n return valuePromise.then((function(value) {\n return value.apply(void 0, args);\n }));\n } : valuePromise;\n };\n for (var _i2 = 0, _Object$keys2 = Object.keys(xportsDefinition); _i2 < _Object$keys2.length; _i2++) _loop(_i2, _Object$keys2);\n return result;\n }\n };\n }(opts);\n var name = options.name, tag = options.tag, defaultContext = options.defaultContext, eligible = options.eligible, children = options.children;\n var global = lib_global_getGlobal(window);\n var instances = [];\n var isChild = function() {\n if (function(name) {\n try {\n return parseWindowName(window.name).name === name;\n } catch (err) {}\n return !1;\n }(name)) {\n var _payload = getInitialParentPayload().payload;\n if (_payload.tag === tag && matchDomain(_payload.childDomainMatch, getDomain())) return !0;\n }\n return !1;\n };\n var registerChild = memoize((function() {\n if (isChild()) {\n if (window.xprops) {\n delete global.components[tag];\n throw new Error(\"Can not register \" + name + \" as child - child already registered\");\n }\n var child = function(options) {\n var tag = options.tag, propsDef = options.propsDef, autoResize = options.autoResize, allowedParentDomains = options.allowedParentDomains;\n var onPropHandlers = [];\n var _getInitialParentPayl = getInitialParentPayload(), parent = _getInitialParentPayl.parent, payload = _getInitialParentPayl.payload;\n var parentComponentWindow = parent.win, parentDomain = parent.domain;\n var props;\n var exportsPromise = new promise_ZalgoPromise;\n var version = payload.version, uid = payload.uid, parentExports = payload.exports, context = payload.context, initialProps = payload.props;\n if (\"9_0_86\" !== version) throw new Error(\"Parent window has zoid version \" + version + \", child window has version 9_0_86\");\n var show = parentExports.show, hide = parentExports.hide, close = parentExports.close, onError = parentExports.onError, checkClose = parentExports.checkClose, parentExport = parentExports.export, parentResize = parentExports.resize, parentInit = parentExports.init;\n var getParent = function() {\n return parentComponentWindow;\n };\n var getParentDomain = function() {\n return parentDomain;\n };\n var onProps = function(handler) {\n onPropHandlers.push(handler);\n return {\n cancel: function() {\n onPropHandlers.splice(onPropHandlers.indexOf(handler), 1);\n }\n };\n };\n var resize = function(_ref) {\n return parentResize.fireAndForget({\n width: _ref.width,\n height: _ref.height\n });\n };\n var xport = function(xports) {\n exportsPromise.resolve(xports);\n return parentExport(xports);\n };\n var getSiblings = function(_temp) {\n var anyParent = (void 0 === _temp ? {} : _temp).anyParent;\n var result = [];\n var currentParent = props.parent;\n void 0 === anyParent && (anyParent = !currentParent);\n if (!anyParent && !currentParent) throw new Error(\"No parent found for \" + tag + \" child\");\n for (var _i2 = 0, _getAllFramesInWindow2 = getAllFramesInWindow(window); _i2 < _getAllFramesInWindow2.length; _i2++) {\n var win = _getAllFramesInWindow2[_i2];\n if (isSameDomain(win)) {\n var xprops = assertSameDomain(win).xprops;\n if (xprops && getParent() === xprops.getParent()) {\n var winParent = xprops.parent;\n if (anyParent || !currentParent || winParent && winParent.uid === currentParent.uid) {\n var xports = tryGlobal(win, (function(global) {\n return global.exports;\n }));\n result.push({\n props: xprops,\n exports: xports\n });\n }\n }\n }\n }\n return result;\n };\n var setProps = function(newProps, origin, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var normalizedProps = function(parentComponentWindow, propsDef, props, origin, helpers, isUpdate) {\n void 0 === isUpdate && (isUpdate = !1);\n var result = {};\n for (var _i2 = 0, _Object$keys2 = Object.keys(props); _i2 < _Object$keys2.length; _i2++) {\n var key = _Object$keys2[_i2];\n var prop = propsDef[key];\n if (!prop || !prop.sameDomain || origin === getDomain(window) && isSameDomain(parentComponentWindow)) {\n var value = normalizeChildProp(propsDef, 0, key, props[key], helpers);\n result[key] = value;\n prop && prop.alias && !result[prop.alias] && (result[prop.alias] = value);\n }\n }\n if (!isUpdate) for (var _i4 = 0, _Object$keys4 = Object.keys(propsDef); _i4 < _Object$keys4.length; _i4++) {\n var _key = _Object$keys4[_i4];\n props.hasOwnProperty(_key) || (result[_key] = normalizeChildProp(propsDef, 0, _key, void 0, helpers));\n }\n return result;\n }(parentComponentWindow, propsDef, newProps, origin, {\n tag: tag,\n show: show,\n hide: hide,\n close: close,\n focus: child_focus,\n onError: onError,\n resize: resize,\n getSiblings: getSiblings,\n onProps: onProps,\n getParent: getParent,\n getParentDomain: getParentDomain,\n uid: uid,\n export: xport\n }, isUpdate);\n props ? extend(props, normalizedProps) : props = normalizedProps;\n for (var _i4 = 0; _i4 < onPropHandlers.length; _i4++) (0, onPropHandlers[_i4])(props);\n };\n var updateProps = function(newProps) {\n return promise_ZalgoPromise.try((function() {\n return setProps(newProps, parentDomain, !0);\n }));\n };\n return {\n init: function() {\n return promise_ZalgoPromise.try((function() {\n isSameDomain(parentComponentWindow) && function(_ref3) {\n var componentName = _ref3.componentName, parentComponentWindow = _ref3.parentComponentWindow;\n var _crossDomainDeseriali2 = crossDomainDeserialize({\n data: parseWindowName(window.name).serializedInitialPayload,\n sender: {\n win: parentComponentWindow\n },\n basic: !0\n }), sender = _crossDomainDeseriali2.sender;\n if (\"uid\" === _crossDomainDeseriali2.reference.type || \"global\" === _crossDomainDeseriali2.metaData.windowRef.type) {\n var _crossDomainSerialize = crossDomainSerialize({\n data: _crossDomainDeseriali2.data,\n metaData: {\n windowRef: window_getWindowRef(parentComponentWindow)\n },\n sender: {\n domain: sender.domain\n },\n receiver: {\n win: window,\n domain: getDomain()\n },\n basic: !0\n });\n window.name = buildChildWindowName({\n name: componentName,\n serializedPayload: _crossDomainSerialize.serializedData\n });\n }\n }({\n componentName: options.name,\n parentComponentWindow: parentComponentWindow\n });\n lib_global_getGlobal(window).exports = options.exports({\n getExports: function() {\n return exportsPromise;\n }\n });\n !function(allowedParentDomains, domain) {\n if (!matchDomain(allowedParentDomains, domain)) throw new Error(\"Can not be rendered by domain: \" + domain);\n }(allowedParentDomains, parentDomain);\n markWindowKnown(parentComponentWindow);\n !function() {\n window.addEventListener(\"beforeunload\", (function() {\n checkClose.fireAndForget();\n }));\n window.addEventListener(\"unload\", (function() {\n checkClose.fireAndForget();\n }));\n onCloseWindow(parentComponentWindow, (function() {\n child_destroy();\n }));\n }();\n return parentInit({\n updateProps: updateProps,\n close: child_destroy\n });\n })).then((function() {\n return (_autoResize$width = autoResize.width, width = void 0 !== _autoResize$width && _autoResize$width, \n _autoResize$height = autoResize.height, height = void 0 !== _autoResize$height && _autoResize$height, \n _autoResize$element = autoResize.element, elementReady(void 0 === _autoResize$element ? \"body\" : _autoResize$element).catch(src_util_noop).then((function(element) {\n return {\n width: width,\n height: height,\n element: element\n };\n }))).then((function(_ref3) {\n var width = _ref3.width, height = _ref3.height, element = _ref3.element;\n element && (width || height) && context !== CONTEXT.POPUP && onResize(element, (function(_ref4) {\n resize({\n width: width ? _ref4.width : void 0,\n height: height ? _ref4.height : void 0\n });\n }), {\n width: width,\n height: height\n });\n }));\n var _autoResize$width, width, _autoResize$height, height, _autoResize$element;\n })).catch((function(err) {\n onError(err);\n }));\n },\n getProps: function() {\n if (props) return props;\n setProps(initialProps, parentDomain);\n return props;\n }\n };\n }(options);\n child.init();\n return child;\n }\n }));\n registerChild();\n !function() {\n var allowDelegateListener = on_on(\"zoid_allow_delegate_\" + name, (function() {\n return !0;\n }));\n var delegateListener = on_on(\"zoid_delegate_\" + name, (function(_ref2) {\n var _ref2$data = _ref2.data;\n return {\n parent: parentComponent({\n uid: _ref2$data.uid,\n options: options,\n overrides: _ref2$data.overrides,\n parentWin: _ref2.source\n })\n };\n }));\n cleanZoid.register(allowDelegateListener.cancel);\n cleanZoid.register(delegateListener.cancel);\n }();\n global.components = global.components || {};\n if (global.components[tag]) throw new Error(\"Can not register multiple components with the same tag: \" + tag);\n global.components[tag] = !0;\n return {\n init: function init(inputProps) {\n var instance;\n var uid = \"zoid-\" + tag + \"-\" + uniqueID();\n var props = inputProps || {};\n var _eligible = eligible({\n props: props\n }), eligibility = _eligible.eligible, reason = _eligible.reason;\n var onDestroy = props.onDestroy;\n props.onDestroy = function() {\n instance && eligibility && instances.splice(instances.indexOf(instance), 1);\n if (onDestroy) return onDestroy.apply(void 0, arguments);\n };\n var parent = parentComponent({\n uid: uid,\n options: options\n });\n parent.init();\n eligibility ? parent.setProps(props) : props.onDestroy && props.onDestroy();\n cleanInstances.register((function(err) {\n return parent.destroy(err || new Error(\"zoid destroyed all components\"));\n }));\n var clone = function(_temp) {\n var _ref4$decorate = (void 0 === _temp ? {} : _temp).decorate;\n return init((void 0 === _ref4$decorate ? identity : _ref4$decorate)(props));\n };\n var _render = function(target, container, context) {\n return promise_ZalgoPromise.try((function() {\n if (!eligibility) {\n var err = new Error(reason || name + \" component is not eligible\");\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }\n if (!isWindow(target)) throw new Error(\"Must pass window to renderTo\");\n return function(props, context) {\n return promise_ZalgoPromise.try((function() {\n if (props.window) return setup_toProxyWindow(props.window).getType();\n if (context) {\n if (context !== CONTEXT.IFRAME && context !== CONTEXT.POPUP) throw new Error(\"Unrecognized context: \" + context);\n return context;\n }\n return defaultContext;\n }));\n }(props, context);\n })).then((function(finalContext) {\n container = function(context, container) {\n if (container) {\n if (\"string\" != typeof container && !isElement(container)) throw new TypeError(\"Expected string or element selector to be passed\");\n return container;\n }\n if (context === CONTEXT.POPUP) return \"body\";\n throw new Error(\"Expected element to be passed to render iframe\");\n }(finalContext, container);\n if (target !== window && \"string\" != typeof container) throw new Error(\"Must pass string element when rendering to another window\");\n return parent.render({\n target: target,\n container: container,\n context: finalContext,\n rerender: function() {\n var newInstance = clone();\n extend(instance, newInstance);\n return newInstance.renderTo(target, container, context);\n }\n });\n })).catch((function(err) {\n return parent.destroy(err).then((function() {\n throw err;\n }));\n }));\n };\n instance = _extends({}, parent.getExports(), parent.getHelpers(), function() {\n var childComponents = children();\n var result = {};\n var _loop2 = function(_i4, _Object$keys4) {\n var childName = _Object$keys4[_i4];\n var Child = childComponents[childName];\n result[childName] = function(childInputProps) {\n var parentProps = parent.getProps();\n var childProps = _extends({}, childInputProps, {\n parent: {\n uid: uid,\n props: parentProps,\n export: parent.export\n }\n });\n return Child(childProps);\n };\n };\n for (var _i4 = 0, _Object$keys4 = Object.keys(childComponents); _i4 < _Object$keys4.length; _i4++) _loop2(_i4, _Object$keys4);\n return result;\n }(), {\n isEligible: function() {\n return eligibility;\n },\n clone: clone,\n render: function(container, context) {\n return _render(window, container, context);\n },\n renderTo: function(target, container, context) {\n return _render(target, container, context);\n }\n });\n eligibility && instances.push(instance);\n return instance;\n },\n instances: instances,\n driver: function(driverName, dep) {\n throw new Error(\"Driver support not enabled\");\n },\n isChild: isChild,\n canRenderTo: function(win) {\n return send_send(win, \"zoid_allow_delegate_\" + name).then((function(_ref3) {\n return _ref3.data;\n })).catch((function() {\n return !1;\n }));\n },\n registerChild: registerChild\n };\n }\n var component_create = function(options) {\n !function() {\n if (!global_getGlobal().initialized) {\n global_getGlobal().initialized = !0;\n on = (_ref3 = {\n on: on_on,\n send: send_send\n }).on, send = _ref3.send, (global = global_getGlobal()).receiveMessage = global.receiveMessage || function(message) {\n return receive_receiveMessage(message, {\n on: on,\n send: send\n });\n };\n !function(_ref5) {\n var on = _ref5.on, send = _ref5.send;\n globalStore().getOrSet(\"postMessageListener\", (function() {\n return addEventListener(window, \"message\", (function(event) {\n !function(event, _ref4) {\n var on = _ref4.on, send = _ref4.send;\n promise_ZalgoPromise.try((function() {\n var source = event.source || event.sourceElement;\n var origin = event.origin || event.originalEvent && event.originalEvent.origin;\n var data = event.data;\n \"null\" === origin && (origin = \"file://\");\n if (source) {\n if (!origin) throw new Error(\"Post message did not have origin domain\");\n receive_receiveMessage({\n source: source,\n origin: origin,\n data: data\n }, {\n on: on,\n send: send\n });\n }\n }));\n }(event, {\n on: on,\n send: send\n });\n }));\n }));\n }({\n on: on_on,\n send: send_send\n });\n setupBridge({\n on: on_on,\n send: send_send,\n receiveMessage: receive_receiveMessage\n });\n !function(_ref8) {\n var on = _ref8.on, send = _ref8.send;\n globalStore(\"builtinListeners\").getOrSet(\"helloListener\", (function() {\n var listener = on(\"postrobot_hello\", {\n domain: \"*\"\n }, (function(_ref3) {\n resolveHelloPromise(_ref3.source, {\n domain: _ref3.origin\n });\n return {\n instanceID: getInstanceID()\n };\n }));\n var parent = getAncestor();\n parent && sayHello(parent, {\n send: send\n }).catch((function(err) {}));\n return listener;\n }));\n }({\n on: on_on,\n send: send_send\n });\n }\n var _ref3, on, send, global;\n }();\n var comp = component(options);\n var init = function(props) {\n return comp.init(props);\n };\n init.driver = function(name, dep) {\n return comp.driver(name, dep);\n };\n init.isChild = function() {\n return comp.isChild();\n };\n init.canRenderTo = function(win) {\n return comp.canRenderTo(win);\n };\n init.instances = comp.instances;\n var child = comp.registerChild();\n child && (window.xprops = init.xprops = child.getProps());\n return init;\n };\n function destroyComponents(err) {\n src_bridge && src_bridge.destroyBridges();\n var destroyPromise = cleanInstances.all(err);\n cleanInstances = cleanup();\n return destroyPromise;\n }\n var destroyAll = destroyComponents;\n function component_destroy(err) {\n destroyAll();\n delete window.__zoid_9_0_86__;\n !function() {\n !function() {\n var responseListeners = globalStore(\"responseListeners\");\n for (var _i2 = 0, _responseListeners$ke2 = responseListeners.keys(); _i2 < _responseListeners$ke2.length; _i2++) {\n var hash = _responseListeners$ke2[_i2];\n var listener = responseListeners.get(hash);\n listener && (listener.cancelled = !0);\n responseListeners.del(hash);\n }\n }();\n (listener = globalStore().get(\"postMessageListener\")) && listener.cancel();\n var listener;\n delete window.__post_robot_10_0_44__;\n }();\n return cleanZoid.all(err);\n }\n } ]);\n}));","/* @flow */\n/* eslint import/no-commonjs: 0 */\n\n// eslint-disable-next-line no-process-env\nif (process && process.env && process.env.ZOID_FRAME_ONLY) {\n // $FlowFixMe\n module.exports = require('./dist/zoid.frame');\n // $FlowFixMe\n module.exports.default = module.exports;\n} else {\n // $FlowFixMe\n module.exports = require('./dist/zoid');\n // $FlowFixMe\n module.exports.default = module.exports;\n}\n","export let createNanoEvents = () => ({\n emit(event, ...args) {\n let callbacks = this.events[event] || []\n for (let i = 0, length = callbacks.length; i < length; i++) {\n callbacks[i](...args)\n }\n },\n events: {},\n on(event, cb) {\n this.events[event]?.push(cb) || (this.events[event] = [cb])\n return () => {\n this.events[event] = this.events[event]?.filter(i => cb !== i)\n }\n }\n})\n",null,null,null,null,null,null],"names":["__classPrivateFieldGet","receiver","state","kind","f","TypeError","has","call","value","get","__classPrivateFieldSet","set","SuppressedError","global$1","global","self","window","defaultSetTimout","Error","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","fun","setTimeout","e","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","length","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","prototype","apply","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","performance","performanceNow","now","mozNow","msNow","oNow","webkitNow","Date","getTime","startTime","process","nextTick","args","Array","arguments","i","push","title","browser","env","argv","version","versions","binding","name","cwd","chdir","dir","umask","hrtime","previousTimestamp","clocktime","seconds","Math","floor","nanoseconds","platform","release","config","uptime","assert","condition","msg","trim","err","isString","isObject","isArray","isEnvBrowser","document","isMobile","width","height","matchMedia","matches","createElement","type","getAttribute","el","setAttribute","attr","replace","g","toLowerCase","removeAttribute","isInDocument","contains","root","getRootNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","undefined","host","isInShadowDom","h","attrs","children","child","flat","append","nextFrame","async","Promise","resolve","requestAnimationFrame","transitionEnd","getComputedStyle","transition","done","removeEventListener","addEventListener","window$1","body","lookup","revLookup","Arr","Uint8Array","inited","init","code","charCodeAt","encodeChunk","uint8","start","end","tmp","num","output","join","fromByteArray","extraBytes","parts","maxChunkLength","len2","read","buffer","offset","isLE","mLen","nBytes","m","eLen","eMax","eBias","nBits","d","s","NaN","Infinity","pow","write","c","rt","abs","isNaN","log","LN2","toString","arr","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","__proto__","arg","encodingOrOffset","allocUnsafe","from","ArrayBuffer","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","slice","fromString","obj","internalIsBuffer","checked","copy","val","data","fromObject","assertSize","size","b","_isBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","bidirectionalIndexOf","arrayIndexOf","indexOf","lastIndexOf","indexSize","arrLength","valLength","String","buf","readUInt16BE","foundIndex","found","j","hexWrite","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","base64.fromByteArray","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","poolSize","_augment","Symbol","species","alloc","fill","allocUnsafeSlow","isBuffer","isFastBuffer","readFloatLE","isSlowBuffer","compare","a","x","y","list","pos","swap16","swap32","swap64","equals","inspect","match","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754.write","writeDouble","newBuf","subarray","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","ieee754.read","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","b64","l","placeHolders","L","base64.toByteArray","stringtrim","base64clean","src","dst","constructor","exports","modules","installedModules","__webpack_require__","moduleId","module","getter","o","Object","defineProperty","enumerable","r","toStringTag","t","mode","__esModule","ns","create","key","bind","default","object","property","hasOwnProperty","p","__webpack_exports__","_setPrototypeOf","setPrototypeOf","_inheritsLoose","subClass","superClass","_extends","assign","source","utils_isPromise","item","Window","_toString","then","dom_PopupOpenError","component_create","component_destroy","destroyComponents","destroyAll","PROP_TYPE","PROP_SERIALIZATION","CONTEXT","EVENT","flushPromise","dispatchedErrors","possiblyUnhandledPromiseHandlers","activeCount","flushActive","promise","startActive","endActive","promise_ZalgoPromise","ZalgoPromise","handler","_this","resolved","rejected","errorHandled","error","handlers","dispatching","stack","_result","_error","isAsync","reject","_proto","result","dispatch","_this2","_err","asyncReject","chain","firstPromise","secondPromise","_handlers$i","onSuccess","onError","_result2","promiseResult","catch","finally","onFinally","try","time","_this3","toPromise","lazy","all","promises","count","results","prom","hash","awaitPromises","_loop","map","items","method","onPossiblyUnhandledException","cancel","splice","context","delay","_delay","isPromise","flush","Zalgo","isRegex","WINDOW_TYPE","IFRAME","POPUP","IE_WIN_ACCESS_ERROR","getActualProtocol","win","location","protocol","getProtocol","mockDomain","split","isAboutProtocol","utils_getParent","parent","getOpener","opener","canReadFromWindow","getActualDomain","getDomain","domain","isSameDomain","desc","getOwnPropertyDescriptor","assertSameDomain","isAncestorParent","childParent","getFrames","frames","frame","_i","_frame","getAllChildFrames","_i3","_getFrames2","_i5","_getAllChildFrames2","getTop","top","_i7","_getAllChildFrames4","getAllFramesInWindow","iframeWindows","iframeFrames","isWindowClosed","allowMock","closed","message","mockclosed","iframeIndex","collection","contentWindow","parentNode","doc","ownerDocument","documentElement","getFrameByName","winFrames","_i9","childFrame","getAncestor","anyMatch","collection1","collection2","_i17","item1","_i19","getDistanceFromTop","distance","isSameTopWindow","win1","win2","top1","top2","allFrames1","allFrames2","opener1","opener2","matchDomain","pattern","origin","Boolean","JSON","stringify","some","subpattern","getDomainFromUrl","url","onCloseWindow","callback","maxtime","check","isWindow","__cross_domain_utils_window_check__","getFrameForWindow","frameElement","_i21","_document$querySelect2","querySelectorAll","closeWindow","parentElement","removeChild","close","util_safeIndexOf","objectIDs","weakmap_CrossDomainSafeWeakMap","CrossDomainSafeWeakMap","weakmap","keys","values","random","WeakMap","freeze","testWeakMap","testKey","_cleanupClosedWindows","delete","isSafeToReadWrite","entry","writable","index","getOrSet","_getPrototypeOf","getPrototypeOf","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","construct_construct","Parent","Class","instance","Function","wrapNativeSuper_wrapNativeSuper","_cache","Map","fn","Wrapper","configurable","getFunctionName","__name__","displayName","setFunctionName","base64encode","btoa","encodeURIComponent","p1","uniqueID","chars","charAt","toISOString","serializeArgs","subkey","uid","getEmptyObject","memoizeGlobalIndex","memoizeGlobalIndexValidFrom","memoize","options","simpleCache","thisCache","_options$thisNamespac","thisNamespace","cacheTime","memoizeIndex","memoizedFunction","_len","_key","cache","cacheKey","cacheResult","reset","memoizePromise","memoizedPromiseFunction","_arguments","_len2","_key2","src_util_noop","called","stringifyError","level","newErr","extend","identity","safeInterval","loop","arrayFrom","isDefined","util_isRegex","util_getOrSet","cleanup","cleanErr","tasks","cleaned","cleaner","register","task","shift","assertExists","thing","clear","util_ExtendableError","_Error","ExtendableError","_this6","captureStackTrace","ReferenceError","getBody","isDocumentReady","readyState","isDocumentInteractive","urlEncode","parseQuery","queryString","logic","__inline_memoize_cache__","params","_i2","_queryString$split2","pair","decodeURIComponent","extendQuery","originalQuery","props","filter","appendChild","container","isElement","element","Element","style","getElementSafe","id","querySelector","elementReady","interval","setInterval","clearInterval","awaitFrameLoadPromises","_ExtendableError","PopupOpenError","awaitFrameLoad","_promise","awaitFrameWindow","loadedFrame","dom_iframe","tag","styleText","class","className","attributes","_i10","_Object$keys2","styleSheet","cssText","createTextNode","html","innerHTML","allowTransparency","backgroundColor","border","isIE","navigator","userAgent","hasAttribute","event","showElement","setProperty","hideElement","destroyElement","isElementClosed","onResize","_temp","_ref2","_ref2$width","_ref2$height","_ref2$interval","_ref2$win","currentWidth","offsetWidth","currentHeight","offsetHeight","canceled","observer","getClientRects","newWidth","newHeight","ResizeObserver","observe","MutationObserver","childList","subtree","characterData","disconnect","isShadowElement","currentScript","getCurrentScript","stackDetails","exec","scriptLocation","_i22","_Array$prototype$slic2","getElementsByTagName","reverse","script","currentUID","toPx","toCSS","test","global_getGlobal","globalKey","hashedString","total","dataset","getObj","globalStore","defStore","store","storeKey","defVal","del","_SERIALIZER","WildCard","getWildcard","WINDOW_WILDCARD","windowStore","winStore","getStore","getInstanceID","resolveHelloPromise","_ref","helloPromises","existingPromise","newPromise","sayHello","_ref4","send","instanceID","_ref5","getWindowInstanceID","_ref6","_ref7","markWindowKnown","isSerializedType","__type__","determineType","serializeType","__val__","_DESERIALIZER","SERIALIZER","function","regex","date","number","boolean","null","defaultSerializers","DESERIALIZER","RegExp","defaultDeserializers","cleanupProxyWindows","idToProxyWindow","_idToProxyWindow$keys2","shouldClean","getSerializedWindow","winPromise","_ref$id","windowNamePromise","windowTypePromise","getName","getType","focus","isClosed","setLocation","href","opts","_opts$method","_ref3","_ref3$method","form","display","_i24","_Object$keys4","_body$key","input","submit","setName","sameDomain","window_ProxyWindow","ProxyWindow","serializedWindow","isProxyWindow","actualWindow","actualWindowPromise","getID","setWindow","isPopup","_this4","isPopupPromise","getNamePromise","reopenPromise","open","focusPromise","getWindow","awaitWindow","matchWindow","_this5","proxyInstanceID","knownWindowInstanceID","unwrap","serialize","toProxyWindow","deserialize","_ref8","_ref9","addMethod","methodStore","proxyWindowMethods","lookupMethod","function_serializeFunction","destination","meth","methodSource","__id__","serializeMessage","_serialize","serializers","serializer","deserializeMessage","_deserialize","deserializers","parse","deserializer","cross_domain_zalgo_promise","serializedPromise","cross_domain_function","serializedFunction","getDeserializedFunction","crossDomainFunctionWrapper","_args","fireAndForget","__origin__","__source__","cross_domain_window","SEND_MESSAGE_STRATEGIES","send_sendMessage","domainBuffer","serializedMessage","__post_robot_10_0_44__","strategies","errors","strategyName","getResponseListener","deleteResponseListener","isResponseListenerErrored","getRequestListener","requestListeners","_i4","winQualifier","nameListeners","domainListeners","__domain_regex__","_i6","_domainListeners$__DO2","_domainListeners$__DO3","listener","handleRequest","logName","sendResponse","ack","pathname","handleError","handleAck","handleResponse","receive_receiveMessage","receivedMessages","messages","parsedMessage","parseMessages","on_on","requestListener","addRequestListener","listenersCollection","_i8","_win2","_listenersCollection","_i12","_domain2","_i14","existingListener","regexListeners","regexListener","strDomain","errorHandler","postrobot_post_message","postMessage","postrobot_global","mockUserAgent","foreignGlobal","receiveMessage","send_send","domainMatcher","responseTimeout","childTimeout","actualParent","_i15","_getFrames8","targetDomain","actualDomain","normalizedDomain","responseListener","reqPromises","totalAckTimeout","totalResTimeout","ackTimeout","resTimeout","cancelled","setup_toProxyWindow","lib_global_getGlobal","__zoid_9_0_86__","tryGlobal","getProxyObject","basicSerialize","getUIDRefStore","references","crossDomainSerialize","metaData","sender","_ref$passByReference","passByReference","_ref$basic","basic","proxyWin","reference","serializedData","cleanReference","ref","crossDomainDeserialize","_ref2$basic","atob","STRING","OBJECT","FUNCTION","BOOLEAN","NUMBER","ARRAY","DOTIFY","BASE64","RENDER","RENDERED","DISPLAY","ERROR","CLOSE","DESTROY","PROPS","RESIZE","FOCUS","buildChildWindowName","serializedPayload","parseWindowName","windowName","_windowName$split","zoidcomp","serializedInitialPayload","parseInitialParentPayload","_crossDomainDeseriali","windowRef","_ret","ancestor","_getAllFramesInWindow2","windows","v","findChildFrameByName","_i11","_getFrames4","namedFrame","payload","getInitialParentPayload","window_getWindowRef","targetWindow","currentWindow","normalizeChildProp","propsDef","helpers","prop","childDecorate","onProps","resize","getParent","getParentDomain","show","hide","export","getSiblings","child_focus","child_destroy","props_defaultNoop","props_decorateOnce","eachProp","serializeProps","propDef","_METHOD$GET$METHOD$PO","_METHOD$GET$METHOD$PO2","getParam","queryParam","post","bodyParam","getValue","queryValue","bodyValue","finalParam","finalValue","serialization","dotify","prefix","newobj","every","dotkey","parentComponent","triggered","emitter","currentProxyWin","currentProxyContainer","childComponent","currentChildDomain","currentContainer","_ref$overrides","overrides","_ref$parentWin","parentWin","containerTemplate","prerenderTemplate","dimensions","autoResize","domainMatch","xports","initPromise","handledErrors","clean","inputProps","internalState","visible","eventName","handlerList","trigger","_len3","_key3","triggerOnce","_len4","_key4","onErrorOverride","getProxyContainerOverride","getProxyContainer","showOverride","hideOverride","closeOverride","renderContainerOverride","renderContainer","getProxyWindowOverride","getProxyWindow","setProxyWinOverride","setProxyWin","openFrameOverride","openFrame","openPrerenderFrameOverride","openPrerenderFrame","prerenderOverride","prerender","openOverride","openPrerenderOverride","openPrerender","watchForUnloadOverride","watchForUnload","getInternalStateOverride","getInternalState","setInternalStateOverride","setInternalState","resolveInitPromise","rejectInitPromise","getPropsForChild","initialChildDomain","sendToChild","newInternalState","windowProp","_proxyWin","setState","getUrl","getAttributes","getInitialChildDomain","iframe","proxyPrerenderFrame","prerenderFrame","prerenderFrameWindow","getCurrentWindowReferenceUID","getWindowRef","actualComponentWindow","initChild","childDomain","childExports","destroy","proxyFrame","_requestPromises$get2","unloadWindowListener","closeParentWindowListener","checkWindowClose","secondIsClosed","exportsPromise","xport","actualExports","renderTemplate","renderer","proxyPrerenderWin","prerenderWindow","tagName","_arrayFrom2","_arrayFrom4","_autoResize$width","_autoResize$height","_autoResize$element","prerenderResizeListener","_ref10","proxyContainer","_ref11","rerender","_ref12","innerContainer","containerWatcher","sacrificialFrame","sacrificialFrameWin","mutationObservers","_i18","elementClosed","mutationElement","mutationObserver","frameWin","removeError","getHelpers","updateProps","setProps","newInputProps","existingProps","valueDetermined","alias","required","decorate","newProps","childProps","containerElement","insertShadowSlot","shadowHost","shadowRoot","slotName","slot","slotProvider","onRender","onDisplay","onRendered","onClose","onDestroy","onFocus","render","_ref14","childDomainMatch","delegatePromise","delegateProps","propName","allowDelegate","childOverridesPromise","_ref13","parentComp","getDelegateOverrides","childOverrides","_len5","_key5","_len6","_key6","_len7","_key7","_len8","_key8","_len9","_key9","_len10","_key10","_len11","_key11","watchForUnloadPromise","buildBodyPromise","onRenderPromise","getProxyContainerPromise","getProxyWindowPromise","finalSetPropsPromise","buildUrlPromise","query","originalUrl","originalHash","_url$split","_originalUrl$split","hashString","buildWindowNamePromise","_temp2","_ref6$target","checkClose","childPayload","_crossDomainSerialize","openFramePromise","openPrerenderFramePromise","renderContainerPromise","_ref15","openPromise","_ref16","openPrerenderPromise","_ref17","setStatePromise","prerenderPromise","_ref18","setWindowNamePromise","_ref19","getMethodPromise","_ref20","loadUrlPromise","windowUrl","_ref21","watchForClosePromise","watchForClose","onDisplayPromise","openBridgePromise","runTimeoutPromise","onRenderedPromise","getProps","getExports","defaultContainerTemplate","div","cspNonce","classList","add","remove","cleanInstances","cleanZoid","component","allowDelegateListener","delegateListener","bridgeUrl","_options$props","_options$dimensions","_options$autoResize","_options$allowedParen","allowedParentDomains","_options$attributes","_options$defaultConte","defaultContext","_options$containerTem","_options$prerenderTem","validate","_options$eligible","eligible","_options$logger","logger","info","_options$exports","xportsDefinition","_options$children","valuePromise","instances","isChild","_payload","registerChild","xprops","components","onPropHandlers","_getInitialParentPayl","parentComponentWindow","parentDomain","parentExports","initialProps","parentExport","parentResize","parentInit","anyParent","currentParent","winParent","isUpdate","normalizedProps","componentName","_crossDomainDeseriali2","_ref2$data","_eligible","eligibility","reason","clone","_ref4$decorate","_render","finalContext","newInstance","renderTo","childComponents","_loop2","childName","Child","childInputProps","parentProps","isEligible","driver","driverName","dep","canRenderTo","initialized","sourceElement","originalEvent","comp","destroyPromise","responseListeners","_responseListeners$ke2","utils_getUserAgent","isOpener","normalizeMockUrl","isPerc","toNum","normalizeDimension","dim","awaitWindowHello","needsBridgeForBrowser","needsBridgeForWin","needsBridgeForDomain","needsBridge","getBridgeName","isBridge","documentBodyReady","registerRemoteWindow","findRemoteWindow","remoteWinPromise","registerRemoteSendMessage","sendMessage","remoteWin","remoteDomain","rejectRemoteSendMessage","linkWindow","popupWindowsByName","popupWindowsByWin","_popupWindowsByName$k2","winName","_details","details","setupBridge","windowOpen","last","bridgePromise","bridge","getWindowDetails","openTunnelToParent","canary","tunnelWindows","parentWindow","_tunnelWindows$keys2","tunnelWindow","postrobot_bridge","messagingChild","messagingParent","src_bridge","cleanUpWindow","openBridge","bridges","bridgeFrames","linkUrl","hasBridge","destroyBridges","_bridgeFrames$keys2","getDimensions","_getDimensions","_getDimensions$width","_getDimensions$height","outerWidth","_options$closeOnUnloa","closeOnUnload","_options$name","left","round","screenX","screen","outerHeight","screenY","status","toolbar","menubar","resizable","scrollbars","popup","_len12","_key12","bridgeDomain","defaultPrerenderTemplate","spinner","ZOID_FRAME_ONLY","require$$0","require$$1","createNanoEvents","callbacks","events","cb","Lightbox","stylesheet","holder","role","spinnerRender","nonce","adoptNode","DEFAULT_WIDTH","DEFAULT_HEIGHT","THEME_NAMES","COLOR_NAMES","EVENT_NAMES","Checkout","ident","locale","theme","colors","endpoint","popupOnMobile","isOpen","lightbox","zoid","_Checkout_didRender","_Checkout_onRender","color","launch","_Checkout_instances","_Checkout_renderComponent","_Checkout_showLightbox","renderFinished","_Checkout_buildComponent","allow","URL","onOpenWindow","onClosePopup","onPaymentComplete","onPaymentError","isApplePayAvailable","ApplePaySession","canMakePayments","isEmbedded","referrer","hostname","path","search","OPEN","PAYMENT_COMPLETE","PAYMENT_ERROR","TebexCheckout","HTMLElement","checkout","_open","_height","observedAttributes","super","_root","_slot","_shadow","_mode","_didInit","_didConnect","_TebexCheckout_attachClickHandlers","assignedElements","console","warn","oldElements","clickHandler","updateHandlers","newElements","attachShadow","connectedCallback","dispatchEvent","CustomEvent","detail","_TebexCheckout_instances","_TebexCheckout_init","disconnectedCallback","attributeChangedCallback","oldVal","newVal","_TebexCheckout_updatePopupState","_TebexCheckout_updateSize","customElements","define","legacy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;mCAoRO,SAASA,EAAuBC,EAAUC,EAAOC,EAAMC,GAC1D,GAAa,MAATD,IAAiBC,EAAG,MAAM,IAAIC,UAAU,iDAC5C,GAAqB,mBAAVH,EAAuBD,IAAaC,IAAUE,GAAKF,EAAMI,IAAIL,GAAW,MAAM,IAAII,UAAU,4EACvG,MAAgB,MAATF,EAAeC,EAAa,MAATD,EAAeC,EAAEG,KAAKN,GAAYG,EAAIA,EAAEI,MAAQN,EAAMO,IAAIR,EACxF,CAEO,SAASS,EAAuBT,EAAUC,EAAOM,EAAOL,EAAMC,GACjE,GAAa,MAATD,EAAc,MAAM,IAAIE,UAAU,kCACtC,GAAa,MAATF,IAAiBC,EAAG,MAAM,IAAIC,UAAU,iDAC5C,GAAqB,mBAAVH,EAAuBD,IAAaC,IAAUE,GAAKF,EAAMI,IAAIL,GAAW,MAAM,IAAII,UAAU,2EACvG,MAAiB,MAATF,EAAeC,EAAEG,KAAKN,EAAUO,GAASJ,EAAIA,EAAEI,MAAQA,EAAQN,EAAMS,I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ebex.mjs b/dist/tebex.mjs index 59531e2..5d272bd 100644 --- a/dist/tebex.mjs +++ b/dist/tebex.mjs @@ -12468,10 +12468,10 @@ var _Checkout_instances, _Checkout_didRender, _Checkout_onRender, _Checkout_show const DEFAULT_WIDTH = "800px"; const DEFAULT_HEIGHT = "760px"; const THEME_NAMES = [ + "auto", "default", "light", - "dark", - // "auto", TODO: detect user's preference for light/dark theme + "dark" ]; const COLOR_NAMES = [ "primary", @@ -12650,8 +12650,10 @@ _Checkout_didRender = new WeakMap(), _Checkout_onRender = new WeakMap(), _Checko isApplePayAvailable: isApplePayAvailable(), isEmbedded: !popup, referrer: url.hostname, + origin: url.origin, path: url.pathname, - version: "1.3.0" + params: url.search, + version: "1.4.0", }); await this.zoid.renderTo(window, container, popup ? "popup" : "iframe"); __classPrivateFieldSet(this, _Checkout_didRender, true, "f"); @@ -12854,7 +12856,7 @@ if (isEnvBrowser()) /** * Current Tebex.js package version */ -const version = "1.3.0"; +const version = "1.4.0"; /** * Tebex checkout API */ diff --git a/dist/types/checkout.d.ts b/dist/types/checkout.d.ts index 0ce166c..774554e 100644 --- a/dist/types/checkout.d.ts +++ b/dist/types/checkout.d.ts @@ -1,6 +1,6 @@ import { Lightbox } from "./lightbox"; import { type CssDimension, type Implements } from "./utils"; -export declare const THEME_NAMES: readonly ["default", "light", "dark"]; +export declare const THEME_NAMES: readonly ["auto", "default", "light", "dark"]; export declare const COLOR_NAMES: readonly ["primary", "secondary"]; export declare const EVENT_NAMES: readonly ["open", "close", "payment:complete", "payment:error"]; /** diff --git a/example/index.html b/example/index.html index 5d75fbf..b61ab10 100644 --- a/example/index.html +++ b/example/index.html @@ -34,6 +34,7 @@

No hidden fees, 3-day payouts & chargeback insurance.

Theme diff --git a/package-lock.json b/package-lock.json index 2341265..bcc1a23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tebexio/tebex.js", - "version": "1.3.0", + "version": "1.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tebexio/tebex.js", - "version": "1.3.0", + "version": "1.4.0", "license": "MIT", "dependencies": { "nanoevents": "^8.0.0", diff --git a/package.json b/package.json index 3997533..f69b898 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tebexio/tebex.js", - "version": "1.3.0", + "version": "1.4.0", "description": "Integrate Tebex Checkout directly into your own website or game using our embedded checkout experience.", "type": "module", "main": "dist/tebex.cjs", diff --git a/src/checkout.ts b/src/checkout.ts index d013a43..1b7f10e 100644 --- a/src/checkout.ts +++ b/src/checkout.ts @@ -19,10 +19,10 @@ const DEFAULT_WIDTH = "800px"; const DEFAULT_HEIGHT = "760px"; export const THEME_NAMES = [ + "auto", "default", "light", - "dark", - // "auto", TODO: detect user's preference for light/dark theme + "dark" ] as const; export const COLOR_NAMES = [ @@ -293,8 +293,10 @@ export default class Checkout { isApplePayAvailable: isApplePayAvailable(), isEmbedded: !popup, referrer: url.hostname, + origin: url.origin, path: url.pathname, - version: __VERSION__ + params: url.search, + version: __VERSION__, }); await this.zoid.renderTo(window, container, popup ? "popup" : "iframe"); diff --git a/tests/index.test-d.ts b/tests/index.test-d.ts index ec783af..71d88d5 100644 --- a/tests/index.test-d.ts +++ b/tests/index.test-d.ts @@ -51,7 +51,7 @@ describe("Typechecks", () => { expectTypeOf(tebex.checkout.init).returns.toMatchTypeOf(); expectTypeOf(tebex.checkout.init).parameter(0).toMatchTypeOf<{ ident: string; - theme?: "light" | "dark" | "default"; + theme?: "light" | "dark" | "default" | "auto"; colors?: { name: "primary" | "secondary", color: string