UNPKG

zoid

Version:
1 lines 133 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zoid",[],t):"object"==typeof exports?exports.zoid=t():e.zoid=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";var r=n(16);n.d(t,"assertSameDomain",function(){return r.a}),n.d(t,"getActualDomain",function(){return r.b}),n.d(t,"getAllFramesInWindow",function(){return r.c}),n.d(t,"getAncestor",function(){return r.d}),n.d(t,"getDistanceFromTop",function(){return r.e}),n.d(t,"getDomain",function(){return r.f}),n.d(t,"getDomainFromUrl",function(){return r.g}),n.d(t,"getFrameByName",function(){return r.h}),n.d(t,"getNthParentFromTop",function(){return r.i}),n.d(t,"getOpener",function(){return r.j}),n.d(t,"getParent",function(){return r.k}),n.d(t,"getTop",function(){return r.l}),n.d(t,"getUserAgent",function(){return r.m}),n.d(t,"isActuallySameDomain",function(){return r.n}),n.d(t,"isAncestor",function(){return r.o}),n.d(t,"isBlankDomain",function(){return r.p}),n.d(t,"isOpener",function(){return r.q}),n.d(t,"isSameDomain",function(){return r.r}),n.d(t,"isSameTopWindow",function(){return r.s}),n.d(t,"isTop",function(){return r.t}),n.d(t,"isWindow",function(){return r.u}),n.d(t,"isWindowClosed",function(){return r.v}),n.d(t,"linkFrameWindow",function(){return r.w}),n.d(t,"matchDomain",function(){return r.x}),n.d(t,"normalizeMockUrl",function(){return r.y}),n.d(t,"onCloseWindow",function(){return r.z}),n.d(t,"stringifyDomainPattern",function(){return r.A});var o=n(17);n.n(o),n(9)},function(e,t,n){"use strict";n(10);var r=n(11);n.d(t,"PopupOpenError",function(){return r.a}),n.d(t,"addClass",function(){return r.b}),n.d(t,"addEventListener",function(){return r.c}),n.d(t,"animateAndHide",function(){return r.d}),n.d(t,"appendChild",function(){return r.e}),n.d(t,"awaitFrameLoad",function(){return r.f}),n.d(t,"awaitFrameWindow",function(){return r.g}),n.d(t,"destroyElement",function(){return r.h}),n.d(t,"elementReady",function(){return r.i}),n.d(t,"extendUrl",function(){return r.j}),n.d(t,"getElement",function(){return r.k}),n.d(t,"hideElement",function(){return r.l}),n.d(t,"iframe",function(){return r.m}),n.d(t,"onResize",function(){return r.o}),n.d(t,"removeClass",function(){return r.p}),n.d(t,"showAndAnimate",function(){return r.q}),n.d(t,"showElement",function(){return r.r}),n.d(t,"waitForDocumentBody",function(){return r.s}),n.d(t,"watchElementForClose",function(){return r.t}),n.d(t,"writeElementToWindow",function(){return r.u}),n(18),n(19),n(12);var o=n(7);n.d(t,"base64decode",function(){return o.a}),n.d(t,"base64encode",function(){return o.b}),n.d(t,"dasherizeToCamel",function(){return o.d}),n.d(t,"dotify",function(){return o.f}),n.d(t,"eventEmitter",function(){return o.g}),n.d(t,"extend",function(){return o.h}),n.d(t,"getOrSet",function(){return o.j}),n.d(t,"isDefined",function(){return o.l}),n.d(t,"isRegex",function(){return o.m}),n.d(t,"memoize",function(){return o.n}),n.d(t,"memoizePromise",function(){return o.o}),n.d(t,"noop",function(){return o.p}),n.d(t,"once",function(){return o.q}),n.d(t,"promisify",function(){return o.r}),n.d(t,"replaceObject",function(){return o.s}),n.d(t,"safeInterval",function(){return o.t}),n.d(t,"stringify",function(){return o.u}),n.d(t,"stringifyError",function(){return o.v}),n.d(t,"uniqueID",function(){return o.w}),n.d(t,"weakMapMemoize",function(){return o.x}),n.d(t,"weakMapMemoizePromise",function(){return o.y}),n(20);var i=n(21);n.n(i),n.o(i,"isPerc")&&n.d(t,"isPerc",function(){return i.isPerc}),n.o(i,"isPx")&&n.d(t,"isPx",function(){return i.isPx}),n.o(i,"memoized")&&n.d(t,"memoized",function(){return i.memoized}),n.o(i,"toCSS")&&n.d(t,"toCSS",function(){return i.toCSS});var a=n(22);n.d(t,"memoized",function(){return a.a});var u=n(23);n.d(t,"isPerc",function(){return u.a}),n.d(t,"isPx",function(){return u.b}),n.d(t,"toCSS",function(){return u.c}),n(24)},function(e,t,n){"use strict";function r(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var n=t.call(e);if("[object Window]"===n||"[object global]"===n||"[object DOMWindow]"===n)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}function o(){var e=void 0;if("undefined"!=typeof window)e=window;else{if("undefined"==typeof window)throw new TypeError("Can not find global");e=window}var t=e.__zalgopromise__=e.__zalgopromise__||{};return t.flushPromises=t.flushPromises||[],t.activeCount=t.activeCount||0,t.possiblyUnhandledPromiseHandlers=t.possiblyUnhandledPromiseHandlers||[],t.dispatchedErrors=t.dispatchedErrors||[],t}var i=function(){function e(t){var n=this;if(function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],t){var r=void 0,o=void 0,i=!1,a=!1,u=!1;try{t(function(e){u?n.resolve(e):(i=!0,r=e)},function(e){u?n.reject(e):(a=!0,o=e)})}catch(e){return void this.reject(e)}u=!0,i?this.resolve(r):a&&this.reject(o)}}return e.prototype.resolve=function(e){if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},e.prototype.reject=function(e){var t=this;if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not reject promise with another promise");if(!e){var n=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+n)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||function(e,t){if(-1===o().dispatchedErrors.indexOf(e)){o().dispatchedErrors.push(e),setTimeout(function(){throw e},1);for(var n=0;n<o().possiblyUnhandledPromiseHandlers.length;n++)o().possiblyUnhandledPromiseHandlers[n](e,t)}}(e,t)},1),this.dispatch(),this},e.prototype.asyncReject=function(e){this.errorHandled=!0,this.reject(e)},e.prototype.dispatch=function(){var t=this,n=this.dispatching,i=this.resolved,a=this.rejected,u=this.handlers;if(!n&&(i||a)){this.dispatching=!0,o().activeCount+=1;for(var c=function(n){var o=u[n],c=o.onSuccess,s=o.onError,d=o.promise,f=void 0;if(i)try{f=c?c(t.value):t.value}catch(e){return d.reject(e),"continue"}else if(a){if(!s)return d.reject(t.error),"continue";try{f=s(t.error)}catch(e){return d.reject(e),"continue"}}f instanceof e&&(f.resolved||f.rejected)?(f.resolved?d.resolve(f.value):d.reject(f.error),f.errorHandled=!0):r(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):f.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(f)},s=0;s<u.length;s++)c(s);u.length=0,this.dispatching=!1,o().activeCount-=1,0===o().activeCount&&e.flushQueue()}},e.prototype.then=function(t,n){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for success handler");if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:t,onError:n}),this.errorHandled=!0,this.dispatch(),r},e.prototype.catch=function(e){return this.then(void 0,e)},e.prototype.finally=function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(n){return e.try(t).then(function(){return n})},function(n){return e.try(t).then(function(){throw n})})},e.prototype.timeout=function(e,t){var n=this;if(this.resolved||this.rejected)return this;var r=setTimeout(function(){n.resolved||n.rejected||n.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(r),e})},e.prototype.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(t){return t instanceof e?t:r(t)?new e(function(e,n){return t.then(e,n)}):(new e).resolve(t)},e.reject=function(t){return(new e).reject(t)},e.all=function(t){var n=new e,o=t.length,i=[];if(!o)return n.resolve(i),n;for(var a=function(a){var u=t[a];if(u instanceof e){if(u.resolved)return i[a]=u.value,o-=1,"continue"}else if(!r(u))return i[a]=u,o-=1,"continue";e.resolve(u).then(function(e){i[a]=e,0==(o-=1)&&n.resolve(i)},function(e){n.reject(e)})},u=0;u<t.length;u++)a(u);return 0===o&&n.resolve(i),n},e.hash=function(t){var n={};return e.all(Object.keys(t).map(function(r){return e.resolve(t[r]).then(function(e){n[r]=e})})).then(function(){return n})},e.map=function(t,n){return e.all(t.map(n))},e.onPossiblyUnhandledException=function(e){return function(e){return o().possiblyUnhandledPromiseHandlers.push(e),{cancel:function(){o().possiblyUnhandledPromiseHandlers.splice(o().possiblyUnhandledPromiseHandlers.indexOf(e),1)}}}(e)},e.try=function(t,n,r){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.try expected a function");var o=void 0;try{o=t.apply(n,r||[])}catch(t){return e.reject(t)}return e.resolve(o)},e.delay=function(t){return new e(function(e){setTimeout(e,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||r(t)},e.flush=function(){var t=new e;return o().flushPromises.push(t),0===o().activeCount&&e.flushQueue(),t},e.flushQueue=function(){var e=o().flushPromises;o().flushPromises=[];for(var t=0,n=null==e?0:e.length;t<n;t++)e[t].resolve()},e}();n.d(t,"a",function(){return i})},function(e,t,n){"use strict";var r,o={REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},i={SUCCESS:"success",ERROR:"error"},a={METHOD:"postrobot_method",HELLO:"postrobot_hello",OPEN_TUNNEL:"postrobot_open_tunnel"},u={POSTROBOT:"__postRobot__"},c={POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},s={MOCK:"mock:",FILE:"file:"},d={CROSS_DOMAIN_ZALGO_PROMISE:"cross_domain_zalgo_promise",CROSS_DOMAIN_FUNCTION:"cross_domain_function",CROSS_DOMAIN_WINDOW:"cross_domain_window"},f={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,BRIDGE_TIMEOUT:5e3,CHILD_WINDOW_TIMEOUT:5e3,ACK_TIMEOUT:2e3,ACK_TIMEOUT_KNOWN:1e4,RES_TIMEOUT:-1,ALLOWED_POST_MESSAGE_METHODS:(r={},r[c.POST_MESSAGE]=!0,r[c.BRIDGE]=!0,r[c.GLOBAL]=!0,r)};0===window.location.href.indexOf(s.FILE)&&(f.ALLOW_POSTMESSAGE_POPUP=!0),n.d(t,"b",function(){return f}),n.d(t,"e",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return a}),n.d(t,"j",function(){return u}),n.d(t,"g",function(){return c}),n.d(t,"f",function(){return s}),n.d(t,"a",function(){return"__postrobot_bridge__"}),n.d(t,!1,function(){return"__postrobot_proxy__"}),n.d(t,"i",function(){return"*"}),n.d(t,"h",function(){return d})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ZOID",function(){return r}),n.d(t,"__ZOID__",function(){return o}),n.d(t,"POST_MESSAGE",function(){return i}),n.d(t,"PROP_TYPES",function(){return a}),n.d(t,"INITIAL_PROPS",function(){return u}),n.d(t,"WINDOW_REFERENCES",function(){return c}),n.d(t,"PROP_SERIALIZATION",function(){return s}),n.d(t,"PROP_TYPES_LIST",function(){return d}),n.d(t,"CONTEXT",function(){return f}),n.d(t,"CLASS_NAMES",function(){return l}),n.d(t,"EVENTS",function(){return p}),n.d(t,"ATTRIBUTES",function(){return h}),n.d(t,"ANIMATION_NAMES",function(){return w}),n.d(t,"EVENT_NAMES",function(){return m}),n.d(t,"CLOSE_REASONS",function(){return y}),n.d(t,"CONTEXT_LIST",function(){return v}),n.d(t,"DELEGATE",function(){return g}),n.d(t,"WILDCARD",function(){return E}),n.d(t,"DEFAULT_DIMENSIONS",function(){return O});var r="zoid",o="__"+r+"__",i={DELEGATE:r+"_delegate",ALLOW_DELEGATE:r+"_allow_delegate"},a={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},u={RAW:"raw",UID:"uid"},c={OPENER:"opener",TOP:"top",PARENT:"parent",GLOBAL:"global"},s={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},d=Object.keys(a).map(function(e){return a[e]}),f={IFRAME:"iframe",POPUP:"popup"},l={ZOID:""+r,OUTLET:r+"-outlet",COMPONENT_FRAME:r+"-component-frame",PRERENDER_FRAME:r+"-prerender-frame",VISIBLE:r+"-visible",INVISIBLE:r+"-invisible"},p={CLOSE:r+"-close"},h={IFRAME_PLACEHOLDER:"data-zoid-"+r+"-placeholder"},w={SHOW_CONTAINER:r+"-show-container",SHOW_COMPONENT:r+"-show-component",HIDE_CONTAINER:r+"-hide-container",HIDE_COMPONENT:r+"-hide-component"},m={CLICK:"click"},y={PARENT_CALL:"parent_call",CHILD_CALL:"child_call",CLOSE_DETECTED:"close_detected",USER_CLOSED:"user_closed",PARENT_CLOSE_DETECTED:"parent_close_detected"},v=Object.keys(f).map(function(e){return f[e]}),g={CALL_ORIGINAL:"call_original",CALL_DELEGATE:"call_delegate"},E="*",O={WIDTH:"300px",HEIGHT:"150px"}},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),t.c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;function n(e){return u.getOrSet(e,t)}return{has:function(t){return n(t).hasOwnProperty(e)},get:function(t,r){var o=n(t);return o.hasOwnProperty(e)?o[e]:r},set:function(t,r){return n(t)[e]=r,r},del:function(t){delete n(t)[e]},getOrSet:function(t,r){var o=n(t);if(o.hasOwnProperty(e))return o[e];var i=r();return o[e]=i,i}}},t.b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,n=Object(o.getOrSet)(a,e,t);return{has:function(e){return n.hasOwnProperty(e)},get:function(e,t){return n.hasOwnProperty(e)?n[e]:t},set:function(e,t){return n[e]=t,t},del:function(e){delete n[e]},getOrSet:function(e,t){if(n.hasOwnProperty(e))return n[e];var r=t();return n[e]=r,r},reset:function(){n=t()},keys:function(){return Object.keys(n)}}},n(0);var r=n(8),o=n(1),i=n(3),a=window[i.j.POSTROBOT]=window[i.j.POSTROBOT]||{},u=a.windowStore=a.windowStore||new r.a,c=function(){return{}}},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(1),a=n(3),u=n(5);u.a.instanceID=u.a.instanceID||Object(i.uniqueID)();var c=Object(u.c)("helloPromises");function s(e){return c.getOrSet(e,function(){return new o.a})}var d=Object(i.once)(function(){u.a.on(a.d.HELLO,{domain:a.i},function(e){var t=e.source,n=e.origin;return s(t).resolve({win:t,domain:n}),{instanceID:u.a.instanceID}})});function f(e){return u.a.send(e,a.d.HELLO,{instanceID:u.a.instanceID},{domain:a.i,timeout:-1}).then(function(t){var n=t.origin,r=t.data.instanceID;return s(e).resolve({win:e,domain:n}),{win:e,domain:n,instanceID:r}})}var l=Object(i.weakMapMemoizePromise)(function(e){return f(e).then(function(e){return e.instanceID})});function p(){d();var e=Object(r.getAncestor)();e&&f(e).catch(i.noop)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",r=s(e);return-1!==t&&(r=r.timeout(t,new Error(n+" did not load after "+t+"ms"))),r}function w(){return!!Object(r.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}var m=Object(u.c)("knownWindows");function y(e){m.set(e,!0)}function v(e){return m.get(e,!1)}n.d(t,"g",function(){return f}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"f",function(){return w}),n.d(t,"e",function(){return y}),n.d(t,"d",function(){return v})},function(e,t,n){"use strict";t.b=a,t.a=function(e){if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")},t.w=u,t.i=function(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("No global found")},t.n=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new o.a;function i(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=r.getOrSet(n.thisNamespace?this:e,function(){return{}}),u=s(o),c=n.time;if(a[u]&&c&&Date.now()-a[u].time<c&&delete a[u],a[u])return a[u].value;var d=Date.now(),f=e.apply(this,arguments);return a[u]={time:d,value:f},a[u].value}return i.reset=function(){r.delete(n.thisNamespace?t:e)},n.name&&(i.displayName=n.name+":memoized"),i},t.o=function(e){var t={};function n(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=s(r);return t.hasOwnProperty(i)?t[i]:(t[i]=e.apply(this,arguments).finally(function(){delete t[i]}),t[i])}return n.reset=function(){t={}},n},t.r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function n(){return r.a.try(e,this,arguments)}return t.name&&(n.displayName=t.name+":promisified"),n},t.k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=s(n);return r.hasOwnProperty(o)?r[o]:r[o]=t.apply(void 0,n)},t.p=function(){},t.q=function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},t.v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n>=3)return"stringifyError stack overflow";try{if(!t)return"<unknown error: "+Object.prototype.toString.call(t)+">";if("string"==typeof t)return t;if(t instanceof Error){var r=t&&t.stack,o=t&&t.message;if(r&&o)return-1!==r.indexOf(o)?r:o+"\n"+r;if(r)return r;if(o)return o}return"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}catch(t){return"Error while stringifying error: "+e(t,n+1)}},t.u=function(e){return"string"==typeof e?e:e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)},t.h=function(e,t){if(!t)return e;if(Object.assign)return Object.assign(e,t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.t=function(e,t){var n=void 0;return function r(){n=setTimeout(function(){e(),r()},t)}(),{cancel:function(){clearTimeout(n)}}},t.f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var o in n=n?n+".":n,t)t.hasOwnProperty(o)&&void 0!==t[o]&&null!==t[o]&&"function"!=typeof t[o]&&(t[o]&&Array.isArray(t[o])&&t[o].length&&t[o].every(function(e){return"object"!==(void 0===e?"undefined":i(e))})?r[""+n+o+"[]"]=t[o].join(","):t[o]&&"object"===i(t[o])?r=e(t[o],""+n+o,r):r[""+n+o]=t[o].toString());return r},t.g=function(){var e={},t={};return{on:function(e,n){var r=t[e]=t[e]||[];r.push(n);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(n),1))}}},once:function(e,t){var n=this.on(e,function(){n.cancel(),t()});return n},trigger:function(e){var n=t[e];if(n)for(var r=0,o=null==n?0:n.length;r<o;r++)(0,n[r])()},triggerOnce:function(t){e[t]||(e[t]=!0,this.trigger(t))}}},t.d=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},t.c=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},t.s=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Array.isArray(t)){for(var o=t.length,i=[],a=function(o){d(i,o,function(){var i=r?r+"."+o:""+o,a=t[o],u=n(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,n,i)),u})},u=0;u<o;u++)a(u);return i}if(l(t)){var c={},s=function(o){if(!t.hasOwnProperty(o))return"continue";d(c,o,function(){var i=r?r+"."+o:""+o,a=t[o],u=n(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,n,i)),u})};for(var f in t)s(f);return c}throw new Error("Pass an object or array")},t.l=function(e){return null!==e&&void 0!==e},t.e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=void 0;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,o)},t)}},t.m=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},n.d(t,"x",function(){return p}),n.d(t,"y",function(){return h}),t.j=function(e,t,n){if(e.hasOwnProperty(t))return e[t];var r=n();return e[t]=r,r};var r=n(2),o=n(8),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(e){if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function u(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+a((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var c=void 0;function s(e){try{return JSON.stringify(Array.prototype.slice.call(e),function(e,t){return"function"==typeof t?"memoize["+function(e){if(c=c||new o.a,null===e||void 0===e||"object"!==(void 0===e?"undefined":i(e))&&"function"!=typeof e)throw new Error("Invalid object");var t=c.get(e);return t||(t=(void 0===e?"undefined":i(e))+":"+u(),c.set(e,t)),t}(t)+"]":t})}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function d(e,t,n){if(Array.isArray(e)){if("number"!=typeof t)throw new TypeError("Array key must be number")}else if("object"===(void 0===e?"undefined":i(e))&&null!==e&&"string"!=typeof t)throw new TypeError("Object key must be string");Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){delete e[t];var r=n();return e[t]=r,r},set:function(n){delete e[t],e[t]=n}})}function f(e){return"object"===(void 0===(t=e)?"undefined":i(t))&&null!==t&&"[object Object]"===Object.prototype.toString.call(e);var t}function l(e){if(!f(e))return!1;var t=e.constructor;if("function"!=typeof t)return!1;var n=t.prototype;return!!f(n)&&!!n.hasOwnProperty("isPrototypeOf")}var p=function(e){var t=new o.a;return function(n){var r=this;return t.getOrSet(n,function(){return e.call(r,n)})}},h=function(e){var t=new o.a;return function(n){var r=this;return t.getOrSet(n,function(){return e.call(r,n).finally(function(){t.delete(n)})})}}},function(e,t,n){"use strict";n.d({},"WeakMap",function(){return u});var r=n(0);function o(e,t){for(var n=0;n<e.length;n++)try{if(e[n]===t)return n}catch(e){}return-1}var i=Object.defineProperty,a=Date.now()%1e9,u=function(){function e(){if(function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),a+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+a,function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,t={};return Object.freeze(t),e.set(t,"__testvalue__"),"__testvalue__"===e.get(t)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}return e.prototype._cleanupClosedWindows=function(){for(var e=this.weakmap,t=this.keys,n=0;n<t.length;n++){var o=t[n];if(Object(r.isWindow)(o)&&Object(r.isWindowClosed)(o)){if(e)try{e.delete(o)}catch(e){}t.splice(n,1),this.values.splice(n,1),n-=1}}},e.prototype.isSafeToReadWrite=function(e){if(Object(r.isWindow)(e))return!1;try{e&&e.self,e&&e[this.name]}catch(e){return!1}return!0},e.prototype.set=function(e,t){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.set(e,t)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var r=this.name,a=e[r];a&&a[0]===e?a[1]=t:i(e,r,{value:[e,t],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,c=this.values,s=o(u,e);-1===s?(u.push(e),c.push(t)):c[s]=t}},e.prototype.get=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return t.get(e)}catch(e){delete this.weakmap}if(!this.isSafeToReadWrite(e)){this._cleanupClosedWindows();var n=o(this.keys,e);if(-1===n)return;return this.values[n]}var r=e[this.name];if(r&&r[0]===e)return r[1]},e.prototype.delete=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var n=e[this.name];n&&n[0]===e&&(n[0]=n[1]=void 0)}else{this._cleanupClosedWindows();var r=this.keys,i=o(r,e);-1!==i&&(r.splice(i,1),this.values.splice(i,1))}},e.prototype.has=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var n=e[this.name];return!(!n||n[0]!==e)}return this._cleanupClosedWindows(),-1!==o(this.keys,e)},e.prototype.getOrSet=function(e,t){if(this.has(e))return this.get(e);var n=t();return this.set(e,n),n},e}();n.d(t,"a",function(){return u})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r={MOCK:"mock:",FILE:"file:",ABOUT:"about:"},o="*"},function(e,t,n){"use strict";t.a=function(){return!!(window.navigator.mockUserAgent||window.navigator.userAgent).match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}},function(e,t,n){"use strict";var r=n(2),o=n(0),i=n(8),a=n(7);n(10),t.s=function(){return f().then(function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")})},t.j=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.query||{},o=n.hash||{},i=void 0,a=e.split("#");i=a[0],t=a[1];var u=i.split("?");i=u[0];var c=p(u[1],r),s=p(t,o);return c&&(i=i+"?"+c),s&&(i=i+"#"+s),i},t.n=function e(){return Object(a.k)(e,function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var t=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===t)return!0}}catch(e){}return!1})},t.e=h,t.k=m,t.i=function(e){return new r.a(function(t,n){var r=Object(a.u)(e),o=w(e);if(o)return t(o);if(s())return n(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval(function(){return(o=w(e))?(clearInterval(i),t(o)):s()?(clearInterval(i),n(new Error("Document is ready and element "+r+" does not exist"))):void 0},10)})},t.a=y,t.u=function(e,t){var n=t.tagName.toLowerCase();if("html"!==n)throw new Error("Expected element to be html, got "+n);for(var r=e.document.documentElement;r.children&&r.children.length;)r.removeChild(r.children[0]);for(;t.children.length;)r.appendChild(t.children[0])},t.f=g,t.g=function(e){return e.contentWindow?r.a.resolve(e.contentWindow):g(e).then(function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow})},t.m=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=m(n),i=t.attributes||{},u=t.style||{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];e=e.toLowerCase();var r=document.createElement(e);if(t.style&&Object(a.h)(r.style,t.style),t.class&&(r.className=t.class.join(" ")),t.attributes)for(var o=0,i=Object.keys(t.attributes),u=null==i?0:i.length;o<u;o++){var c=i[o];r.setAttribute(c,t.attributes[c])}if(t.styleSheet&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.document;e.styleSheet?e.styleSheet.cssText=t:e.appendChild(n.createTextNode(t))}(r,t.styleSheet),n&&h(n,r),t.html)if("iframe"===e){if(!n||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");!function(e,t){try{e.document.open(),e.document.write(t),e.document.close()}catch(n){try{e.location="javascript: document.open(); document.write("+JSON.stringify(t)+"); document.close();"}catch(e){}}}(r.contentWindow,t.html)}else r.innerHTML=t.html;return r}("iframe",{attributes:c({frameBorder:"0",allowTransparency:"true"},i),style:c({backgroundColor:"transparent"},u),html:t.html,class:t.class});g(s),o.appendChild(s);var d=s.contentWindow;if(d)try{Object(a.p)(d.name)}catch(i){if(o.removeChild(s),!r)throw new Error("Frame is cross-domain: "+i.stack);return e(t,n,r-1)}return(t.url||window.navigator.userAgent.match(/MSIE|Edge/i))&&s.setAttribute("src",t.url||"about:blank"),s},t.c=function(e,t,n){return e.addEventListener(t,n),{cancel:function(){e.removeEventListener(t,n)}}},t.r=_,t.l=A,t.h=function(e){e.parentNode&&e.parentNode.removeChild(e)},t.q=function(e,t,n){var r=T(e,t,n);return _(e),r},t.d=function(e,t,n){return T(e,t,n).then(function(){A(e)})},t.b=function(e,t){e.classList?e.classList.add(t):-1===e.className.split(/\s+/).indexOf(t)&&(e.className+=" "+t)},t.p=function(e,t){e.classList?e.classList.remove(t):-1!==e.className.split(/\s+/).indexOf(t)&&(e.className=e.className.replace(t,""))},t.t=function(e,t){t=Object(a.q)(t);var n=void 0;return P(e)?t():n=Object(a.t)(function(){P(e)&&(n.cancel(),t())},50),{cancel:function(){n&&n.cancel()}}},t.o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.width,o=void 0===r||r,i=n.height,a=void 0===i||i,u=n.interval,c=void 0===u?100:u,s=n.win,d=void 0===s?window:s,f=e.offsetWidth,l=e.offsetHeight;t({width:f,height:l});var p=function(){var n=e.offsetWidth,r=e.offsetHeight;(o&&n!==f||a&&r!==l)&&t({width:n,height:r}),f=n,l=r},h=void 0,w=void 0;return void 0!==d.ResizeObserver?(h=new d.ResizeObserver(p)).observe(e):void 0!==d.MutationObserver?((h=new d.MutationObserver(p)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),d.addEventListener("resize",p)):function e(){p(),w=setTimeout(e,c)}(),{cancel:function(){h.disconnect(),window.removeEventListener("resize",p),clearTimeout(w)}}};var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function s(){return Boolean(document.body)&&"complete"===document.readyState}function d(e){return e.replace(/\?/g,"%3F").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\+/g,"%2B")}function f(){return Object(a.k)(f,function(){return new r.a(function(e){if(s())return e();var t=setInterval(function(){if(s())return clearInterval(t),e()},10)})})}function l(e){return Object(a.k)(l,function(){var t={};if(!e)return t;if(-1===e.indexOf("="))return t;for(var n=0,r=e.split("&"),o=null==r?0:r.length;n<o;n++){var i=r[n];(i=i.split("="))[0]&&i[1]&&(t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}return t},[e])}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t&&Object.keys(t).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).filter(function(t){return"string"==typeof e[t]}).map(function(t){return d(t)+"="+d(e[t])}).join("&")}(c({},l(e),t)):e}function h(e,t){e.appendChild(t)}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return(t=e)instanceof window.Element||null!==t&&"object"===(void 0===t?"undefined":u(t))&&1===t.nodeType&&"object"===u(t.style)&&"object"===u(t.ownerDocument)?e:"string"==typeof e?n.querySelector(e):void 0}function m(e){var t=w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:document);if(t)return t;throw new Error("Can not find element: "+Object(a.u)(e))}function y(e){this.message=e}y.prototype=Object.create(Error.prototype);var v=void 0;function g(e){if((v=v||new i.a).has(e)){var t=v.get(e);if(t)return t}var n=new r.a(function(t,n){e.addEventListener("load",function(){Object(o.linkFrameWindow)(e),t(e)}),e.addEventListener("error",function(r){e.contentWindow?t(e):n(r)})});return v.set(e,n),n}function E(e,t,n){n=Object(a.q)(n);for(var r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];e.addEventListener(i,n)}return{cancel:Object(a.q)(function(){for(var r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];e.removeEventListener(i,n)}})}}var O=["webkit","moz","ms","o"];function b(e,t,n){e.style[t]=n;for(var r=Object(a.c)(t),o=0,i=null==O?0:O.length;o<i;o++){var u=O[o];e.style[""+u+r]=n}}var S=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],C=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function T(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return new r.a(function(r,i){var a=m(e);if(!a||!function(e,t){var n=window.CSSRule,r=n.KEYFRAMES_RULE||n.WEBKIT_KEYFRAMES_RULE||n.MOZ_KEYFRAMES_RULE||n.O_KEYFRAMES_RULE||n.MS_KEYFRAMES_RULE,o=e.ownerDocument.styleSheets;try{for(var i=0;i<o.length;i++){var a=o[i].cssRules;if(a)for(var u=0;u<a.length;u++){var c=a[u];if(c&&c.type===r&&c.name===t)return!0}}}catch(e){return!1}return!1}(a,t))return r();var u=!1,c=void 0,s=void 0,d=void 0,f=void 0;function l(){b(a,"animationName",""),clearTimeout(c),clearTimeout(s),d.cancel(),f.cancel()}d=E(a,S,function(e){e.target===a&&e.animationName===t&&(clearTimeout(c),e.stopPropagation(),d.cancel(),u=!0,s=setTimeout(function(){l(),r()},o))}),f=E(a,C,function(e){if(e.target===a&&e.animationName===t)return l(),"string"==typeof e.animationName&&e.animationName!==t?i("Expected animation name to be "+t+", found "+e.animationName):r()}),b(a,"animationName",t),c=setTimeout(function(){if(!u)return l(),r()},200),n&&n(l)})}var j={DISPLAY:{NONE:"none",BLOCK:"block"},VISIBILITY:{VISIBLE:"visible",HIDDEN:"hidden"},IMPORTANT:"important"};function _(e){e.style.setProperty("display","")}function A(e){e.style.setProperty("display",j.DISPLAY.NONE,j.IMPORTANT)}function P(e){return!e||!e.parentNode}},function(e,t,n){"use strict";t.a=function e(t){var n=t.name,i=t.version,a=void 0===i?"latest":i,u=t.lifetime,c=void 0===u?3e5:u;return Object(r.k)(e,function(){var e="__"+n+"_"+a+"_storage__",t=void 0;function i(n){var i=Object(o.n)(),a=void 0;if(t&&(a=t),!a&&i){var u=window.localStorage.getItem(e);u&&(a=JSON.parse(u))}a||(a=Object(r.i)()[e]),a||(a={id:Object(r.w)()}),a.id||(a.id=Object(r.w)()),t=a;var c=n(a);return i?window.localStorage.setItem(e,JSON.stringify(a)):Object(r.i)()[e]=a,t=null,c}function u(e){return i(function(t){var n=t.__session__,o=Date.now();return n&&o-n.created>c&&(n=null),n||(n={guid:Object(r.w)(),created:o}),t.__session__=n,e(n)})}return{getState:i,getID:function(){return i(function(e){return e.id})},getSessionState:function(e){return u(function(t){return t.state=t.state||{},e(t.state)})},getSessionID:function(){return u(function(e){return e.guid})}}},[{name:n,version:a,lifetime:c}])};var r=n(7),o=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3);function i(e,t){if(!o.b.ALLOW_POSTMESSAGE_POPUP&&!1===Object(r.isSameTopWindow)(e,t))throw new Error("Can not send and receive post messages between two different windows (disabled to emulate IE)")}n.d(t,"emulateIERestrictions",function(){return i})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),i=n(1),a=n(3),u=n(5),c=Object(u.b)("tunnelWindows");function s(){return!!Object(o.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}function d(e){return!Object(o.isSameTopWindow)(window,e)}function f(e,t){if(e){if(Object(o.getDomain)()!==Object(o.getDomainFromUrl)(e))return!0}else if(t&&!Object(o.isSameDomain)(t))return!0;return!1}function l(e){var t=e.win,n=e.domain;return!(!s()||n&&!f(n,t)||t&&!d(t))}function p(e){var t=(e=e||Object(o.getDomainFromUrl)(e)).replace(/[^a-zA-Z0-9]+/g,"_");return a.a+"_"+t}function h(){return Boolean(window.name&&window.name===p(Object(o.getDomain)()))}u.a.openTunnelToParent=function(e){var t=e.name,n=e.source,r=e.canary,s=e.sendMessage,d=Object(o.getParent)(window);if(!d)throw new Error("No parent window found to open tunnel to");var f=function(e){var t=e.name,n=e.source,r=e.canary,a=e.sendMessage;!function(){for(var e=0,t=c.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e],a=c[r];try{Object(i.noop)(a.source)}catch(e){c.del(r);continue}Object(o.isWindowClosed)(a.source)&&c.del(r)}}();var u=Object(i.uniqueID)();return c.set(u,{name:t,source:n,canary:r,sendMessage:a}),u}({name:t,source:n,canary:r,sendMessage:s});return u.a.send(d,a.d.OPEN_TUNNEL,{name:t,sendMessage:function(){var e=c.get(f);try{Object(i.noop)(e&&e.source)}catch(e){return void c.del(f)}if(e&&e.source&&!Object(o.isWindowClosed)(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:a.i})};var w=new r.a(function(e){if(window.document&&window.document.body)return e(window.document.body);var t=setInterval(function(){if(window.document&&window.document.body)return clearInterval(t),e(window.document.body)},10)}),m=Object(u.c)("remoteWindows");function y(e){m.getOrSet(e,function(){return new r.a})}function v(e){var t=m.get(e);if(!t)throw new Error("Remote window not found");return t}function g(e,t,n){v(e).resolve(function(r,i,a){if(r!==e)throw new Error("Remote window does not match window");if(!Object(o.matchDomain)(i,t))throw new Error("Remote domain "+i+" does not match domain "+t);n(a)})}function E(e,t){v(e).reject(t).catch(i.noop)}function O(e,t,n){var r=Object(o.isOpener)(window,e),i=Object(o.isOpener)(e,window);if(!r&&!i)throw new Error("Can only send messages to and from parent and popup windows");return v(e).then(function(r){return r(e,t,n)})}var b=Object(i.weakMapMemoize)(function(e){return r.a.try(function(){try{var t=Object(o.getFrameByName)(e,p(Object(o.getDomain)()));if(!t)return;return Object(o.isSameDomain)(t)&&t[a.j.POSTROBOT]?t:new r.a(function(e){var n=void 0,r=void 0;n=setInterval(function(){if(t&&Object(o.isSameDomain)(t)&&t[a.j.POSTROBOT])return clearInterval(n),clearTimeout(r),e(t)},100),r=setTimeout(function(){return clearInterval(n),e()},2e3)})}catch(e){}})});function S(){return r.a.try(function(){var e=Object(o.getOpener)(window);if(e&&l({win:e}))return y(e),b(e).then(function(t){return t?window.name?t[a.j.POSTROBOT].openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{Object(i.noop)(window)}catch(e){return}if(window&&!window.closed)try{u.a.receiveMessage({data:e,origin:this.origin,source:this.source})}catch(e){r.a.reject(e)}}}).then(function(t){var n=t.source,r=t.origin,o=t.data;if(n!==e)throw new Error("Source does not match opener");g(n,r,o.sendMessage)}).catch(function(t){throw E(e,t),t}):E(e,new Error("Can not register with opener: window does not have a name")):E(e,new Error("Can not register with opener: no bridge found in opener"))})})}var C=n(6),T=Object(u.b)("bridges"),j=Object(u.b)("bridgeFrames"),_=Object(u.b)("popupWindowsByName"),A=Object(u.c)("popupWindowsByWin");function P(e,t){return T.has(t||Object(o.getDomainFromUrl)(e))}function D(e,t){return t=t||Object(o.getDomainFromUrl)(e),T.getOrSet(t,function(){return r.a.try(function(){if(Object(o.getDomain)()===t)throw new Error("Can not open bridge on the same domain as current domain: "+t);var n=p(t);if(Object(o.getFrameByName)(window,n))throw new Error("Frame with name "+n+" already exists on page");var i=function(e,t){var n=document.createElement("iframe");return n.setAttribute("name",e),n.setAttribute("id",e),n.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),n.setAttribute("frameborder","0"),n.setAttribute("border","0"),n.setAttribute("scrolling","no"),n.setAttribute("allowTransparency","true"),n.setAttribute("tabindex","-1"),n.setAttribute("hidden","true"),n.setAttribute("title",""),n.setAttribute("role","presentation"),n.src=t,n}(n,e);return j.set(t,i),w.then(function(n){n.appendChild(i);var o=i.contentWindow;return function(e,t){u.a.on(a.d.OPEN_TUNNEL,{window:e,domain:t},function(e){var n=e.origin,o=e.data;if(n!==t)throw new Error("Domain "+t+" does not match origin "+n);if(!o.name)throw new Error("Register window expected to be passed window name");if(!o.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!_.has(o.name))throw new Error("Window with name "+o.name+" does not exist, or was not opened by this window");if(!_.get(o.name).domain)throw new Error("We do not have a registered domain for window "+o.name);if(_.get(o.name).domain!==n)throw new Error("Message origin "+n+" does not matched registered window origin "+_.get(o.name).domain);return g(_.get(o.name).win,t,o.sendMessage),{sendMessage:function(e){if(window&&!window.closed){var t=_.get(o.name);if(t)try{u.a.receiveMessage({data:e,origin:t.domain,source:t.win})}catch(e){r.a.reject(e)}}}}})}(o,t),new r.a(function(e,t){i.onload=e,i.onerror=t}).then(function(){return Object(C.a)(o,a.b.BRIDGE_TIMEOUT,"Bridge "+e)}).then(function(){return o})})})})}var N=window.open;function I(e,t){A.has(e)&&(A.get(e).domain=Object(o.getDomainFromUrl)(t),y(e))}function R(){for(var e=0,t=j.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e],o=j.get(r);o&&o.parentNode&&o.parentNode.removeChild(o)}j.reset(),T.reset()}window.open=function(e,t,n,r){var i=e;if(e&&0===e.indexOf(a.f.MOCK)){var u=e.split("|");i=u[0],e=u[1]}i&&(i=Object(o.getDomainFromUrl)(i));var c=N.call(this,e,t,n,r);if(!c)return c;e&&y(c);for(var s=0,d=_.keys(),f=null==d?0:d.length;s<f;s++){var l=d[s];Object(o.isWindowClosed)(_.get(l).win)&&_.del(l)}if(t&&c){var p=A.getOrSet(c,function(){return{}});p.name=p.name||t,p.win=p.win||c,p.domain=p.domain||i,A.set(c,p),_.set(t,p)}return c},n.d(t,"openTunnelToOpener",function(){return S}),n.d(t,"needsBridgeForBrowser",function(){return s}),n.d(t,"needsBridgeForWin",function(){return d}),n.d(t,"needsBridgeForDomain",function(){return f}),n.d(t,"needsBridge",function(){return l}),n.d(t,"getBridgeName",function(){return p}),n.d(t,"isBridge",function(){return h}),n.d(t,"documentBodyReady",function(){return w}),n.d(t,"registerRemoteWindow",function(){return y}),n.d(t,"findRemoteWindow",function(){return v}),n.d(t,"registerRemoteSendMessage",function(){return g}),n.d(t,"rejectRemoteSendMessage",function(){return E}),n.d(t,"sendBridgeMessage",function(){return O}),n.d(t,"hasBridge",function(){return P}),n.d(t,"openBridge",function(){return D}),n.d(t,"linkUrl",function(){return I}),n.d(t,"destroyBridges",function(){return R})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={};n.d(r,"markWindowKnown",function(){return c.e}),n.d(r,"serializeMessage",function(){return I}),n.d(r,"deserializeMessage",function(){return R}),n.d(r,"ProxyWindow",function(){return j}),n.d(r,"cleanUpWindow",function(){return he}),n.d(r,"Promise",function(){return u.a}),n.d(r,"bridge",function(){return we}),n.d(r,"parent",function(){return pe}),n.d(r,"send",function(){return oe}),n.d(r,"requestPromises",function(){return ne}),n.d(r,"request",function(){return re}),n.d(r,"sendToParent",function(){return ie}),n.d(r,"client",function(){return ae}),n.d(r,"on",function(){return se}),n.d(r,"listen",function(){return ce}),n.d(r,"once",function(){return de}),n.d(r,"listener",function(){return fe}),n.d(r,"CONFIG",function(){return f.b}),n.d(r,"disable",function(){return le});var o={};n.d(o,"default",function(){return me}),n.d(o,"markWindowKnown",function(){return c.e}),n.d(o,"serializeMessage",function(){return I}),n.d(o,"deserializeMessage",function(){return R}),n.d(o,"ProxyWindow",function(){return j}),n.d(o,"cleanUpWindow",function(){return he}),n.d(o,"Promise",function(){return u.a}),n.d(o,"bridge",function(){return we}),n.d(o,"parent",function(){return pe}),n.d(o,"send",function(){return oe}),n.d(o,"requestPromises",function(){return ne}),n.d(o,"request",function(){return re}),n.d(o,"sendToParent",function(){return ie}),n.d(o,"client",function(){return ae}),n.d(o,"on",function(){return se}),n.d(o,"listen",function(){return ce}),n.d(o,"once",function(){return de}),n.d(o,"listener",function(){return fe}),n.d(o,"CONFIG",function(){return f.b}),n.d(o,"disable",function(){return le});var i={};n.d(i,"PopupOpenError",function(){return d.PopupOpenError}),n.d(i,"create",function(){return St}),n.d(i,"getByTag",function(){return Ct}),n.d(i,"getCurrentScriptDir",function(){return Be}),n.d(i,"useLogger",function(){return qe}),n.d(i,"destroyAll",function(){return Tt}),n.d(i,"postRobot",function(){return jt}),n.d(i,"CONSTANTS",function(){return _t});var a,u=n(2),c=n(6),s=n(0),d=n(1),f=n(3),l={FUNCTION:"function",ERROR:"error",PROMISE:"promise",REGEX:"regex",DATE:"date",ARRAY:"array",OBJECT:"object",STRING:"string",NUMBER:"number",BOOLEAN:"boolean",NULL:"null",UNDEFINED:"undefined"},p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function h(e){return"object"===(void 0===e?"undefined":p(e))&&null!==e&&"string"==typeof e.__type__}function w(e){return void 0===e?l.UNDEFINED:null===e?l.NULL:Array.isArray(e)?l.ARRAY:"function"==typeof e?l.FUNCTION:"object"===(void 0===e?"undefined":p(e))?e instanceof Error?l.ERROR:"function"==typeof e.then?l.PROMISE:"[object RegExp]"===Object.prototype.toString.call(e)?l.REGEX:"[object Date]"===Object.prototype.toString.call(e)?l.DATE:l.OBJECT:"string"==typeof e?l.STRING:"number"==typeof e?l.NUMBER:"boolean"==typeof e?l.BOOLEAN:void 0}function m(e,t){return{__type__:e,__val__:t}}var y,v=((a={})[l.FUNCTION]=function(){},a[l.ERROR]=function(e){var t=e.message,n=e.stack,r=e.code;return m(l.ERROR,{message:t,stack:n,code:r})},a[l.PROMISE]=function(){},a[l.REGEX]=function(e){return m(l.REGEX,e.source)},a[l.DATE]=function(e){return m(l.DATE,e.toJSON())},a[l.ARRAY]=function(e){return e},a[l.OBJECT]=function(e){return e},a[l.STRING]=function(e){return e},a[l.NUMBER]=function(e){return e},a[l.BOOLEAN]=function(e){return e},a[l.NULL]=function(e){return e},a),g={},E=((y={})[l.FUNCTION]=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},y[l.ERROR]=function(e){var t=e.message,n=e.stack,r=e.code,o=new Error(t);return o.code=r,o.stack=n+"\n\n"+o.stack,o},y[l.PROMISE]=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},y[l.REGEX]=function(e){return new RegExp(e)},y[l.DATE]=function(e){return new Date(e)},y[l.ARRAY]=function(e){return e},y[l.OBJECT]=function(e){return e},y[l.STRING]=function(e){return e},y[l.NUMBER]=function(e){return e},y[l.BOOLEAN]=function(e){return e},y[l.NULL]=function(e){return e},y),O={},b=n(5),S=Object(b.c)("winToProxyWindow"),C=Object(b.b)("idToProxyWindow");function T(){for(var e=0,t=C.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e];C.get(r).shouldClean()&&C.del(r)}}var j=function(){function e(t,n){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.serializedWindow=t,this.actualWindowPromise=new u.a,n&&this.setWindow(n),this.serializedWindow.getInstanceID=Object(d.memoizePromise)(this.serializedWindow.getInstanceID)}return e.prototype.setLocation=function(e){var t=this;return u.a.try(function(){if(!t.actualWindow)return t.serializedWindow.setLocation(e);t.actualWindow.location=e}).then(function(){return t})},e.prototype.setName=function(e){var t=this;return u.a.try(function(){if(!t.actualWindow)return t.serializedWindow.setName(e);if(!Object(s.isSameDomain)(t.actualWindow))throw new Error("Can not set name for window on different domain");t.actualWindow.name=e,t.actualWindow.frameElement&&t.actualWindow.frameElement.setAttribute("name",e)}).then(function(){return t})},e.prototype.close=function(){var e=this;return u.a.try(function(){if(!e.actualWindow)return e.serializedWindow.close();e.actualWindow.close()}).then(function(){return e})},e.prototype.focus=function(){var e=this;return u.a.try(function(){return e.actualWindow&&e.actualWindow.focus(),e.serializedWindow.focus()}).then(function(){return e})},e.prototype.isClosed=function(){var e=this;return u.a.try(function(){return e.actualWindow?Object(s.isWindowClosed)(e.actualWindow):e.serializedWindow.isClosed()})},e.prototype.setWindow=function(e){this.actualWindow=e,this.actualWindowPromise.resolve(e)},e.prototype.matchWindow=function(e){var t=this;return u.a.try(function(){return t.actualWindow?e===t.actualWindow:u.a.all([t.getInstanceID(),Object(c.b)(e)]).then(function(n){var r=n[0]===n[1];return r&&t.setWindow(e),r})})},e.prototype.unwrap=function(){return this.actualWindow||this},e.prototype.awaitWindow=function(){return this.actualWindowPromise},e.prototype.getInstanceID=function(){return this.actualWindow?Object(c.b)(this.actualWindow):this.serializedWindow.getInstanceID()},e.prototype.serialize=function(){return this.serializedWindow},e.prototype.shouldClean=function(){return this.actualWindow&&Object(s.isWindowClosed)(this.actualWindow)},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t){return T(),e.toProxyWindow(t).serialize()},e.deserialize=function(t){return T(),C.getOrSet(t.id,function(){return new e(t)})},e.isProxyWindow=function(t){return t instanceof e},e.toProxyWindow=function(t){return T(),e.isProxyWindow(t)?t:S.getOrSet(t,function(){var n=Object(d.uniqueID)();return C.set(n,new e({id:n,getInstanceID:function(){return Object(c.b)(t)},close:function(){return u.a.try(function(){t.close()})},focus:function(){return u.a.try(function(){t.focus()})},isClosed:function(){return u.a.try(function(){return Object(s.isWindowClosed)(t)})},setLocation:function(e){return u.a.try(function(){if(Object(s.isSameDomain)(t))try{if(t.location&&"function"==typeof t.location.replace)return void t.location.replace(e)}catch(e