@monei-js/components 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";function e(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=n.apply(t,r);function a(n){e(u,o,i,a,c,"next",n)}function c(n){e(u,o,i,a,c,"throw",n)}a(void 0)}))}}function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function r(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function u(e,n){return e(n={exports:{}},n.exports),n.exports}function a(e){return e&&e.default||e}var c,s=u((function(e){var n=function(e){var n=Object.prototype,t=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function a(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{a({},"")}catch(e){a=function(e,n,t){return e[n]=t}}function c(e,n,t,r){var o=Object.create((n&&n.prototype instanceof f?n:f).prototype),i=new _(r||[]);return o._invoke=function(e,n,t){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(t.method=o,t.arg=i;;){var u=t.delegate;if(u){var a=E(u,t);if(a){if(a===d)continue;return a}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var c=s(e,n,t);if("normal"===c.type){if(r=t.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(r="completed",t.method="throw",t.arg=c.arg)}}}(e,t,i),o}function s(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function l(){}function h(){}var p={};p[o]=function(){return this};var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==n&&t.call(v,o)&&(p=v);var m=h.prototype=f.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(n){a(e,n,(function(e){return this._invoke(n,e)}))}))}function g(e,n){var r;this._invoke=function(o,i){function u(){return new n((function(r,u){!function r(o,i,u,a){var c=s(e[o],e,i);if("throw"!==c.type){var d=c.arg,f=d.value;return f&&"object"==typeof f&&t.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,u,a)}),(function(e){r("throw",e,u,a)})):n.resolve(f).then((function(e){d.value=e,u(d)}),(function(e){return r("throw",e,u,a)}))}a(c.arg)}(o,i,r,u)}))}return r=r?r.then(u,u):u()}}function E(e,n){var t=e.iterator[n.method];if(void 0===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,E(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(t,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function P(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function b(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(t.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return l.prototype=m.constructor=h,h.constructor=l,l.displayName=a(h,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===l||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a(e,u,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(n,t,r,o,i){void 0===i&&(i=Promise);var u=new g(c(n,t,r,o),i);return e.isGeneratorFunction(t)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},y(m),a(m,u,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var n in this)"t"===n.charAt(0)&&t.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t,r){return u.type="throw",u.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=t.call(i,"catchLoc"),c=t.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&t.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),d},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),b(t),d}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;b(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:O(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}})),d=function(e){return Object.keys(e).reduce((function(n,t){return n[t]="string"==typeof e[t]?e[t]:e[t]+"px",n}),{})},f=function(e,n,t){return new Promise((function(r,o){-1!==Array.from(document.scripts).findIndex((function(n){return n.src===e}))&&r();var i=document.createElement("script");i.src=e,i.onload=function(){return r()},i.onerror=function(e){return o(e)},n&&i.setAttribute("nonce",n),t&&Object.keys(t).forEach((function(e){t[e]&&(i.dataset[e]=t[e])})),document.head.appendChild(i)}))},l=function(e){return Object.keys(e).reduce((function(n,t){return void 0!==e[t]&&n.push(t+"="+e[t]),n}),[]).join("&")},h=function(){var e,n;try{e=window.localStorage}catch(r){var t=(n=new Map,{getItem:function(e){return n.get(e)},setItem:function(e,t){n.set(e,t)},clear:function(){n=new Map},removeItem:function(e){n.delete(e)}});Object.defineProperty(window,"localStorage",{value:t}),e=t}return e},p=function(){var e,n=h();try{e=n.getItem("i18nextLng")}catch(e){}return e?e.split("-")[0]:""},w=function(){var e=[window.screen.colorDepth,window.screen.height,window.screen.width,(new Date).getTimezoneOffset(),p()].join("|");return window.btoa(e)},v=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=void 0,e.next=4,n;case 4:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 8:return e.prev=8,e.t2=e.catch(0),e.abrupt("return",[e.t2,void 0]);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(n){return e.apply(this,arguments)}}(),m=function(e){if(!(e.paymentId||e.accountId&&e.amount&&e.currency))throw new Error("You need to provide paymentId or accountId amount and currency")},y={__proto__:null,transformStyle:d,loadScript:f,stringify:l,fixLocalstorage:h,getClientEnv:w,withError:v,isMethodSupported:function(e,n){return e.paymentMethods&&e.paymentMethods.includes(n)},validateComponentProps:m},g="https://js.monei.com",E=t({},{domain:g,version:"v1",stage:"prod",isProduction:!0,paymentPageUrl:g+"/v1/payment-page/",posPaymentPageUrl:g+"/v1/pos-payment-page/",cardInputUrl:g+"/v1/inner-card-input/",paymentModalUrl:g+"/v1/inner-payment-modal/",paypalUrl:g+"/v1/inner-paypal/",bizumUrl:g+"/v1/inner-bizum/",bizumButtonUrl:g+"/v1/inner-bizum-button/",cofidisUrl:g+"/v1/inner-cofidis/",cofidisButtonUrl:g+"/v1/inner-cofidis-button/",cofidisWidgetUrl:g+"/v1/inner-cofidis-widget/",cofidisLoanUrl:g+"/v1/inner-cofidis-loan/",cofidisLoanButtonUrl:g+"/v1/inner-cofidis-loan-button/",cofidisLoanWidgetUrl:g+"/v1/inner-cofidis-loan-widget/",googlePayUrl:g+"/v1/inner-google-pay/",paymentRequestUrl:g+"/v1/inner-payment-request/",click2PayUrl:g+"/v1/inner-click2pay/",click2PayButtonUrl:g+"/v1/inner-click2pay-button/"},{apiUrl:"https://api.monei.com/v1",secureDomain:"https://secure.monei.com"}),P=function(){var e=n(s.mark((function e(n,r){var o,i,u,a,c,d,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(o=void 0===r?{}:r).headers,c=o.body,"POST"===(u=void 0===(i=o.method)?"GET":i)&&(a=t({"Content-Type":"application/json"},a)),e.next=4,fetch(""+E.apiUrl+n,{method:u,headers:a,body:c?JSON.stringify(c):void 0});case 4:return d=e.sent,e.next=7,v(d.json());case 7:if(f=e.sent[1],d.ok){e.next=11;break}throw f||new Error(d.statusText);case 11:return e.abrupt("return",f);case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),b={},_=function(){var e=n(s.mark((function e(n){var t,r,o,i,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.accountId,!(r=n.paymentId)){e.next=5;break}o={paymentId:r},e.next=10;break;case 5:if(!t){e.next=9;break}o={accountId:t},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:if(i=l(o),!b[i]){e.next=13;break}return e.abrupt("return",b[i]);case 13:return u=P("/payment-methods?"+i),b[i]=u,e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=n(s.mark((function e(n){var t,r,o,i,u,a,c;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.paymentMethod,o=n.sessionId,i=n.amount,u=n.currency,a=n.accountId,!(r=n.paymentId)){e.next=5;break}c={paymentId:r,paymentMethod:t},e.next=10;break;case 5:if(!a){e.next=9;break}c={accountId:a,paymentMethod:t,sessionId:o,amount:i,currency:u},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:return e.abrupt("return",P("/tokens",{method:"POST",headers:{"Client-Env":w()},body:c}));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n+"/client-get"));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.paymentId,o=r(n,["paymentId"]),e.abrupt("return",P("/payments/"+t+"/client-confirm",{method:"POST",headers:{"Client-Env":w()},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.signature,o=r(n,["signature"]),e.abrupt("return",P("/client-payments",{method:"POST",headers:{"Client-Env":w(),"Client-Signature":t},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n.paymentId+"/client-receipt",{method:"POST",body:{customerEmail:n.customerEmail,signature:n.signature,language:n.language}}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/apple-pay/sessions",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C={__proto__:null,getPaymentMethods:_,createToken:O,getPayment:S,confirmPayment:T,createPayment:x,sendPaymentReceipt:I,createApplePaySession:R,calculateFinancing:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/cofidis/calculate-financing",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),validateBizumPhone:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/bizum/validate-phone",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},N=u((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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){return"[object RegExp]"==={}.toString.call(e)}t.r(n),t.d(n,"Promise",(function(){return C})),t.d(n,"TYPES",(function(){return Ge})),t.d(n,"ProxyWindow",(function(){return Pe})),t.d(n,"setup",(function(){return Ye})),t.d(n,"destroy",(function(){return He})),t.d(n,"serializeMessage",(function(){return ze})),t.d(n,"deserializeMessage",(function(){return Fe})),t.d(n,"createProxyWindow",(function(){return Be})),t.d(n,"toProxyWindow",(function(){return Ue})),t.d(n,"on",(function(){return Me})),t.d(n,"once",(function(){return qe})),t.d(n,"send",(function(){return De})),t.d(n,"markWindowKnown",(function(){return de})),t.d(n,"cleanUpWindow",(function(){return Ve})),t.d(n,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function u(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function a(e){if(void 0===e&&(e=window),e&&!u(e))try{return e.opener}catch(e){}}function c(e){try{return!0}catch(e){}return!1}function s(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=u(e);return r&&c()?s(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function d(e){void 0===e&&(e=window);var n=s(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function f(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e)&&c())return!0}catch(e){}try{if(s(e)===s(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(i(e)&&c())return!0;if(d(window)===d(e))return!0}catch(e){}return!1}function l(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function h(e,n){if(!e||!n)return!1;var t=u(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function p(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var u=0;u<100;u++){var a=void 0;try{a=n[u]}catch(e){return r}if(!a)return r;r.push(a)}return r}var w=[],v=[];function m(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==o}if(n&&f(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(w,e);if(-1!==t){var r=v[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function y(e){return void 0===e&&(e=window),a(e=e||window)||u(e)||void 0}function g(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(r(n))return!1;if(Array.isArray(n))return!1}return r(e)?r(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!r(n)&&e.some((function(e){return g(e,n)})))}function E(e){try{if(e===window)return!0}catch(e){if(e&&e.message===o)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===o)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function P(e){try{e.close()}catch(e){}}function b(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var _,O=[],S=[],T=0;function x(){if(!T&&_){var e=_;_=null,e.resolve()}}function I(){T+=1}function R(){T-=1,x()}var C=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,u=!1;I();try{e((function(e){u?n.resolve(e):(o=!0,t=e)}),(function(e){u?n.reject(e):(i=!0,r=e)}))}catch(e){return R(),void this.reject(e)}R(),u=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===O.indexOf(e)){O.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<S.length;t++)S[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,I();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var u=r[i],a=u.onSuccess,c=u.onError,s=u.promise,d=void 0;if(n)try{d=a?a(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):b(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,R()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:b(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var a=n[u];if(a instanceof e){if(a.resolved){o[u]=a.value,r-=1;continue}}else if(!b(a)){o[u]=a,r-=1;continue}i(u,e.resolve(a),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];b(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return S.push(e),{cancel:function(){S.splice(S.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;I();try{o=n.apply(t,r||[])}catch(n){return R(),e.reject(n)}return R(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||b(n)},e.flush=function(){return n=_=_||new e,x(),n;var n},e}();function N(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var k,j=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(E(r)&&m(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!E(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,u=this.values,a=N(i,e);-1===a?(i.push(e),u.push(n)):u[a]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=N(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=N(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==N(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function W(e){return e.name||e.__name__||e.displayName||"anonymous"}function A(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function L(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function M(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(k=k||new j,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=k.get(e);return n||(n=typeof e+":"+L(),k.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function q(){return{}}var D=0,z=0;function F(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,u=n.time,a=D;D+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;a<z&&(t=null,r=null,a=D,D+=1),s=i?(r=r||new j).getOrSet(this,q):t=t||{};var d=M(o),f=s[d];if(f&&u&&Date.now()-f.time<u&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},A(c,(n.name||W(e))+"::memoized")}function B(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];var a=M(i);return n.hasOwnProperty(a)||(n[a]=C.try((function(){return e.apply(r,t)})).finally((function(){delete n[a]}))),n[a]}return t.reset=function(){n={}},A(t,W(e)+"::promiseMemoized")}function U(){}function Y(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+Y(e,n+1)}}function H(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function G(e){return"[object RegExp]"==={}.toString.call(e)}function V(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function J(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}F.clear=function(){z=D},F((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})),F((function(){return new C((function(e){if(J()||$())return e();var n=setInterval((function(){if(J()||$())return clearInterval(n),e()}),10)}))}));var Z="undefined"!=typeof document?document.currentScript:null,X=F((function(){if(Z)return Z;if(Z=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return Z;throw new Error("Can not determine current script")})),K=L();function Q(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}F((function(){var e;try{e=X()}catch(e){return K}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=L(),e.setAttribute("data-uid-auto",n)),n}));var ee=function(){return{}};function ne(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),V(Q(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return V(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var te,re=function(){};function oe(){var e=Q();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new re,e.WINDOW_WILDCARD}function ie(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),ne("windowStore").getOrSet(e,(function(){var t=new j,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return V(r(n),e,t)}}}))}function ue(){return ne("instance").getOrSet("instanceID",L)}function ae(e,n){var t=n.domain,r=ie("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=C.resolve({domain:t});return r.set(e,i),i}function ce(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ue()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return ae(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function se(e,n){var t=n.send;return ie("windowInstanceIDPromises").getOrSet(e,(function(){return ce(e,{send:t}).then((function(e){return e.instanceID}))}))}function de(e){ie("knownWindows").set(e,!0)}function fe(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function le(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function he(e,n){return{__type__:e,__val__:n}}var pe,we=((te={}).function=function(){},te.error=function(e){return he("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},te.promise=function(){},te.regex=function(e){return he("regex",e.source)},te.date=function(e){return he("date",e.toJSON())},te.array=function(e){return e},te.object=function(e){return e},te.string=function(e){return e},te.number=function(e){return e},te.boolean=function(e){return e},te.null=function(e){return e},te),ve={},me=((pe={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},pe.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+"\n\n"+o.stack,o},pe.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},pe.regex=function(e){return new RegExp(e)},pe.date=function(e){return new Date(e)},pe.array=function(e){return e},pe.object=function(e){return e},pe.string=function(e){return e},pe.number=function(e){return e},pe.boolean=function(e){return e},pe.null=function(e){return e},pe),ye={};function ge(){for(var e=ne("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Ee(e,n){var t=n.send,r=n.id,o=void 0===r?L():r,i=e.then((function(e){if(f(e))return l(e).name})),u=e.then((function(e){if(m(e))throw new Error("Window is closed, can not determine type");return a(e)?"popup":"iframe"}));return i.catch(U),u.catch(U),{id:o,getType:function(){return u},getInstanceID:B((function(){return e.then((function(e){return se(e,{send:t})}))})),close:function(){return e.then(P)},getName:function(){return e.then((function(e){if(!m(e))return f(e)?l(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return m(e)}))},setLocation:function(n){return e.then((function(e){var t=window.location.protocol+"//"+window.location.host;if(0===n.indexOf("/"))n=""+t+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(t))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){var t=f(e),r=function(e){if(f(e))return l(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);l(e).name=n,r&&r.setAttribute("name",n),i=C.resolve(n)}))}}}new C((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));var Pe=function(){function e(e){var n=e.send,t=e.win,r=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new C,this.serializedWindow=r||Ee(this.actualWindowPromise,{send:n}),ne("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then((function(e){return"popup"===e}))},n.setLocation=function(e){var n=this;return this.serializedWindow.setLocation(e).then((function(){return n}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=C.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return C.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Ee(this.actualWindowPromise,{send:t,id:this.getID()}),ie("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return C.try((function(){return t.actualWindow?e===t.actualWindow:C.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:se(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&m(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return ge(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return ge(),ne("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!E(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(ge(),e.isProxyWindow(n))return n;var o=n;return ie("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function be(e,n,t,r,o){var i=ie("methodStore"),u=ne("proxyWindowMethods");Pe.isProxyWindow(r)?u.set(e,{val:n,name:t,domain:o,source:r}):(u.del(e),i.getOrSet(r,(function(){return{}}))[e]={domain:o,name:t,val:n,source:r})}function _e(e,n){var t=ie("methodStore"),r=ne("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Oe(e,n,t,r,o){var i,u,a;u=(i={on:o.on,send:o.send}).on,a=i.send,ne("builtinListeners").getOrSet("functionCalls",(function(){return u("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,u=_e(n,o);if(!u)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+d(window));var c=u.source,s=u.domain,f=u.val;return C.try((function(){if(!g(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(G(u.domain)?u.domain.source:u.domain)+" does not match origin "+t+" in "+d(window));if(Pe.isProxyWindow(c))return c.matchWindow(n,{send:a}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+d(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return C.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n,t;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),(t=n,[].slice.call(t)).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||L();e=Pe.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),Pe.isProxyWindow(e)?(be(c,t,s,e,n),e.awaitWindow().then((function(e){be(c,t,s,e,n)}))):be(c,t,s,e,n),he("cross_domain_function",{id:c,name:s})}function Se(e,n,t,r){var o,i=r.on,u=r.send;return function(e,n){void 0===n&&(n=ve);var t=JSON.stringify(e,(function(e){var t=this[e];if(fe(this))return t;var r=le(t);if(!r)return t;var o=n[r]||we[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 he("cross_domain_zalgo_promise",{then:Oe(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:u})},o.function=function(t,r){return Oe(e,n,t,r,{on:i,send:u})},o.object=function(e){return E(e)||Pe.isProxyWindow(e)?he("cross_domain_window",Pe.serialize(e,{send:u})):e},o))}function Te(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=ye),"undefined"!==e)return JSON.parse(e,(function(e,t){if(fe(this))return t;var r,o;if(fe(t)?(r=t.__type__,o=t.__val__):(r=le(t),o=t),!r)return o;var i=n[r]||me[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new C(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,u=r.send,a=function(t){function r(){var a=arguments;return Pe.toProxyWindow(e,{send:u}).awaitWindow().then((function(e){var c=_e(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:d()},a);var s=[].slice.call(a);return t.fireAndForget?u(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):u(e,"postrobot_method",{id:o,name:i,args:s},{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},c=a();return c.fireAndForget=a({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Pe.deserialize(e,{send:i})},o))}var xe={};function Ie(e,n,t,r){var o=r.on,i=r.send;return C.try((function(){var r=ie().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||C.flush().then((function(){if(m(e))throw new Error("Window is closed");var t,u=Se(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var a=Object.keys(xe),c=[],s=0;s<a.length;s++){var d=a[s];try{xe[d](e,u,n)}catch(e){c.push(e)}}if(c.length===a.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+Y(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(U)}function Re(e){return ne("responseListeners").get(e)}function Ce(e){ne("responseListeners").del(e)}function Ne(e){return ne("erroredResponseListeners").has(e)}function ke(e){var n=e.name,t=e.win,r=e.domain,o=ie("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,u=[t,oe()];i<u.length;i++){var a=u[i];if(a){var c=o.get(a);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],h=l.listener;if(g(l.regex,r))return h}}if(s["*"])return s["*"]}}}}}function je(e,n,t,r){var o=r.on,i=r.send,u=ke({name:t.name,win:e,domain:n}),a="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,u,c){return C.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:u,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+a+" in "+d()+"\n\n"+Y(e))}}))}return C.all([C.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+a+" in "+d()+"\n\n"+Y(e))}})),C.try((function(){if(!u)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(u.domain,n))throw new Error("Request origin "+n+" does not match domain "+u.domain.toString());return u.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(U).catch((function(e){if(u&&u.handleError)return u.handleError(e);throw e}))}function We(e,n,t){if(!Ne(t.hash)){var r=Re(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}function Ae(e,n,t){if(!Ne(t.hash)){var o,i=Re(t.hash);if(!i)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,n))throw new Error("Response origin "+n+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":r(o)?"RegExp("+o.toString():o.toString()));if(e!==i.win)throw new Error("Response source does not match registered window");Ce(t.hash),"error"===t.ack?i.promise.reject(t.error):"success"===t.ack&&i.promise.resolve({source:e,origin:n,data:t.data})}}function Le(e,n){var t=n.on,r=n.send,o=ne("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,u=e.origin,a=function(e,n,t,r){var o,i=r.on,u=r.send;try{o=Te(n,t,e,{on:i,send:u})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var a=o.__post_robot_10_0_42__;if(Array.isArray(a))return a}}(e.data,i,u,{on:t,send:r});if(a){de(i);for(var c=0;c<a.length;c++){var s=a[c];if(o.has(s.id))return;if(o.set(s.id,!0),m(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(u="file://");try{"postrobot_message_request"===s.type?je(i,u,s,{on:t,send:r}):"postrobot_message_response"===s.type?Ae(i,u,s):"postrobot_message_ack"===s.type&&We(i,u,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function Me(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=t||n.handler;var r=n.window,o=n.domain,i=function e(n,t){var r=n.name,o=n.win,i=n.domain,u=ie("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],c=0,s=o;c<s.length;c++)a.push(e({name:r,domain:i,win:s[c]},t));return{cancel:function(){for(var e=0;e<a.length;e++)a[e].cancel()}}}if(Array.isArray(i)){for(var d=[],f=0,l=i;f<l.length;f++)d.push(e({name:r,win:o,domain:l[f]},t));return{cancel:function(){for(var e=0;e<d.length;e++)d[e].cancel()}}}var h=ke({name:r,win:o,domain:i});if(o&&"*"!==o||(o=oe()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===oe()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===oe()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var p,w,v=u.getOrSet(o,(function(){return{}})),m=V(v,r,(function(){return{}})),y=i.toString();return G(i)?(p=V(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[y]=t,{cancel:function(){delete m[y],w&&(p.splice(p.indexOf(w,1)),p.length||delete m.__domain_regex__),Object.keys(m).length||delete v[r],o&&!Object.keys(v).length&&u.del(o)}}}({name:e,win:r,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:r,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}function qe(e,n,t){"function"==typeof(n=n||{})&&(t=n,n={});var r,o=new C;return n.errorHandler=function(e){r.cancel(),o.reject(e)},r=Me(e,n,(function(e){if(r.cancel(),o.resolve(e),t)return t(e)})),o.cancel=r.cancel,o}xe.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)};var De=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,c=o.timeout||5e3,s=o.fireAndForget||!1;return C.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!G(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(m(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=y(n);if(t)return t===e;if(n===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(u(e)===e)return e;try{if(h(window,e)&&window.top)return window.top}catch(e){}try{if(h(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=function e(n){for(var t=[],r=0,o=p(n);r<o.length;r++){var i=o[r];t.push(i);for(var u=0,a=e(i);u<a.length;u++)t.push(a[u])}return t}(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(u(r)===r)return r}}(n)===n)return!1;for(var r=0,o=p(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return function(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return ie("helloPromises").getOrSet(e,(function(){return new C}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}(n,c)})).then((function(t){return function(e,n,t,r){var o=r.send;return C.try((function(){return"string"==typeof n?n:C.try((function(){return t||ce(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!g(n,n))throw new Error("Domain "+H(n)+" does not match "+H(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i,u=o,c="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,f=new C,l=t+"_"+L();if(!s){var h={name:t,win:n,domain:u,promise:f};!function(e,n){ne("responseListeners").set(e,n)}(l,h);var p=ie("requestPromises").getOrSet(n,(function(){return[]}));p.push(f),f.catch((function(){!function(e){ne("erroredResponseListeners").set(e,!0)}(l),Ce(l)}));var w=function(e){return ie("knownWindows").get(e,!1)}(n)?1e4:2e3,v=a,y=w,g=v,E=(function e(){i=setTimeout((function(){m(n)?f.reject(new Error("Window closed for "+t+" before "+(h.ack?"response":"ack"))):h.cancelled?f.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==g&&(g=Math.max(g-500,0)),h.ack||0!==y?0===g&&f.reject(new Error("No response for postMessage "+c+" in "+d()+" in "+v+"ms")):f.reject(new Error("No ack for postMessage "+c+" in "+d()+" in "+w+"ms"))),e()}),500)}(),{cancel:function(){clearTimeout(i)}});f.finally((function(){E.cancel(),p.splice(p.indexOf(f,1))})).catch(U)}return Ie(n,u,{id:L(),origin:d(window),type:"postrobot_message_request",hash:l,name:t,data:r,fireAndForget:s},{on:Me,send:e}).then((function(){return s?f.resolve():f}),(function(e){throw new Error("Send request message failed for "+c+" in "+d()+"\n\n"+Y(e))}))}))};function ze(e,n,t){return Se(e,n,t,{on:Me,send:De})}function Fe(e,n,t){return Te(e,n,t,{on:Me,send:De})}function Be(e){return new Pe({send:De,win:e})}function Ue(e){return Pe.toProxyWindow(e,{send:De})}function Ye(){var e,n,t,r;Q().initialized||(Q().initialized=!0,n=(e={on:Me,send:De}).on,t=e.send,(r=Q()).receiveMessage=r.receiveMessage||function(e){return Le(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;ne().getOrSet("postMessageListener",(function(){return(e=window).addEventListener("message",r=function(e){!function(e,n){var t=n.on,r=n.send;C.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");Le({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}),{cancel:function(){e.removeEventListener("message",r)}};var e,r}))}({on:Me,send:De}),function(e){var n=e.on,t=e.send;ne("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ae(e.source,{domain:e.origin}),{instanceID:ue()}})),r=y();return r&&ce(r,{send:t}).catch((function(e){})),e}))}({on:Me,send:De}))}function He(){var e;!function(){for(var e=ne("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(e=ne().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_42__}var Ge=!0;function Ve(e){for(var n=0,t=ie("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(m(e)?"closed":"cleaned up")+" before response")).catch(U)}Ye()}])},e.exports=t()})),k=i(N),j=a(Object.assign({__proto__:null,default:k,__moduleExports:N},k)),W=u((function(e){e.exports=j,e.exports.default=e.exports})),A=i(u((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}function o(){return(o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function i(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}t.r(n),t.d(n,"PopupOpenError",(function(){return qe})),t.d(n,"create",(function(){return jt})),t.d(n,"destroy",(function(){return Lt})),t.d(n,"destroyComponents",(function(){return Wt})),t.d(n,"destroyAll",(function(){return At})),t.d(n,"PROP_TYPE",(function(){return ft})),t.d(n,"PROP_SERIALIZATION",(function(){return lt})),t.d(n,"CONTEXT",(function(){return ht})),t.d(n,"EVENT",(function(){return pt}));var u,a=[],c=[],s=0;function d(){if(!s&&u){var e=u;u=null,e.resolve()}}function f(){s+=1}function l(){s-=1,d()}var h=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,u=!1;f();try{e((function(e){u?n.resolve(e):(o=!0,t=e)}),(function(e){u?n.reject(e):(i=!0,r=e)}))}catch(e){return l(),void this.reject(e)}l(),u=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(i(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(i(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===a.indexOf(e)){a.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<c.length;t++)c[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,f();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},u=0;u<r.length;u++){var a=r[u],c=a.onSuccess,s=a.onError,d=a.promise,h=void 0;if(n)try{h=c?c(this.value):this.value}catch(e){d.reject(e);continue}else if(t){if(!s){d.reject(this.error);continue}try{h=s(this.error)}catch(e){d.reject(e);continue}}h instanceof e&&(h.resolved||h.rejected)?(h.resolved?d.resolve(h.value):d.reject(h.error),h.errorHandled=!0):i(h)?h instanceof e&&(h.resolved||h.rejected)?h.resolved?d.resolve(h.value):d.reject(h.error):o(h,d):d.resolve(h)}r.length=0,this.dispatching=!1,l()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:i(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var u=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var c=n[a];if(c instanceof e){if(c.resolved){o[a]=c.value,r-=1;continue}}else if(!i(c)){o[a]=c,r-=1;continue}u(a,e.resolve(c),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];i(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var u in n)o(u);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return c.push(e),{cancel:function(){c.splice(c.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;f();try{o=n.apply(t,r||[])}catch(n){return l(),e.reject(n)}return l(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||i(n)},e.flush=function(){return n=u=u||new e,d(),n;var n},e}();function p(e){return"[object RegExp]"==={}.toString.call(e)}var w={IFRAME:"iframe",POPUP:"popup"},v="Call was rejected by callee.\r\n";function m(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function y(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function g(e){if(void 0===e&&(e=window),e&&!y(e))try{return e.opener}catch(e){}}function E(e){try{return!0}catch(e){}return!1}function P(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=y(e);return r&&E()?P(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function b(e){void 0===e&&(e=window);var n=P(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function _(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(m(e)&&E())return!0}catch(e){}try{if(P(e)===P(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(m(e)&&E())return!0;if(b(window)===b(e))return!0}catch(e){}return!1}function O(e){if(!_(e))throw new Error("Expected window to be same domain");return e}function S(e,n){if(!e||!n)return!1;var t=y(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function T(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var u=0;u<100;u++){var a=void 0;try{a=n[u]}catch(e){return r}if(!a)return r;r.push(a)}return r}function x(e){for(var n=[],t=0,r=T(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,u=x(o);i<u.length;i++)n.push(u[i])}return n}function I(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(y(e)===e)return e;try{if(S(window,e)&&window.top)return window.top}catch(e){}try{if(S(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=x(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(y(r)===r)return r}}function R(e){var n=I(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(x(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],x(e))),t}var C=[],N=[];function k(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==v}if(n&&_(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(C,e);if(-1!==t){var r=N[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function j(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function W(e,n){for(var t=T(e),r=0;r<t.length;r++){var o=t[r];try{if(_(o)&&o.name===n&&-1!==t.indexOf(o))return o}catch(e){}}try{if(-1!==t.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==t.indexOf(e[n]))return e[n]}catch(e){}}function A(e,n){return e===g(n)}function L(e){return void 0===e&&(e=window),g(e=e||window)||y(e)||void 0}function M(e,n){for(var t=0;t<e.length;t++)for(var r=e[t],o=0;o<n.length;o++)if(r===n[o])return!0;return!1}function q(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=y(t))&&(n+=1);return n}function D(e,n){var t=I(e)||e,r=I(n)||n;try{if(t&&r)return t===r}catch(e){}var o=R(e),i=R(n);if(M(o,i))return!0;var u=g(t),a=g(r);return u&&M(R(u),i)||a&&M(R(a),o),!1}function z(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(p(n))return!1;if(Array.isArray(n))return!1}return p(e)?p(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!p(n)&&e.some((function(e){return z(e,n)})))}function F(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):b()}function B(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(k(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function U(e){try{if(e===window)return!0}catch(e){if(e&&e.message===v)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===v)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function Y(e){if(0!==F(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function H(e){try{e.close()}catch(e){}}function G(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var V,J=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(U(r)&&k(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!U(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,u=this.values,a=G(i,e);-1===a?(i.push(e),u.push(n)):u[a]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=G(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=G(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==G(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,n){return(Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function X(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function K(e,n,t){return(K=X()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&Z(o,t.prototype),o}).apply(null,arguments)}function Q(e){var n="function"==typeof Map?new Map:void 0;return(Q=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return K(e,arguments,$(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Z(t,e)})(e)}function ee(e){return e.name||e.__name__||e.displayName||"anonymous"}function ne(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function te(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function re(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+te((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function oe(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(V=V||new J,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=V.get(e);return n||(n=typeof e+":"+re(),V.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function ie(){return{}}var ue=0,ae=0;function ce(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,u=n.time,a=ue;ue+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;a<ae&&(t=null,r=null,a=ue,ue+=1),s=i?(r=r||new J).getOrSet(this,ie):t=t||{};var d=oe(o),f=s[d];if(f&&u&&Date.now()-f.time<u&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},ne(c,(n.name||ee(e))+"::memoized")}function se(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];var a=oe(i);return n.hasOwnProperty(a)||(n[a]=h.try((function(){return e.apply(r,t)})).finally((function(){delete n[a]}))),n[a]}return t.reset=function(){n={}},ne(t,ee(e)+"::promiseMemoized")}function de(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=oe(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function fe(){}function le(e){var n=!1;return ne((function(){if(!n)return n=!0,e.apply(this,arguments)}),ee(e)+"::once")}function he(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+he(e,n+1)}}function pe(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function we(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 me(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function ye(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function ge(e){return[].slice.call(e)}function Ee(e){return"object"==typeof(n=e)&&null!==n&&"[object Object]"==={}.toString.call(e);var n}function Pe(e){if(!Ee(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!Ee(t)&&!!t.hasOwnProperty("isPrototypeOf")}function be(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){ye(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Pe(i)||Array.isArray(i))&&(i=be(i,n,o)),i}))},u=0;u<r;u++)i(u);return o}if(Pe(e)){var a={},c=function(r){if(!e.hasOwnProperty(r))return"continue";ye(a,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Pe(i)||Array.isArray(i))&&(i=be(i,n,o)),i}))};for(var s in e)c(s);return a}throw new Error("Pass an object or array")}function _e(e){return null!=e}function Oe(e){return"[object RegExp]"==={}.toString.call(e)}function Se(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Te(e){var n,t=[],r=!1;return{set:function(n,t){return r||(e[n]=t,this.register((function(){delete e[n]}))),t},register:function(e){r?e(n):t.push(le((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return h.all(o).then(fe)}}}function xe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}ce.clear=function(){ae=ue},ce((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 Ie=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 r(n,e),n}(Q(Error));function Re(){return Boolean(document.body)&&"complete"===document.readyState}function Ce(){return Boolean(document.body)&&"interactive"===document.readyState}function Ne(e){return e.replace(/\?/g,"%3F").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\+/g,"%2B")}function ke(e){return de(ke,(function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[e])}function je(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(t=o({},ke(e),n))&&(t={}),Object.keys(t).filter((function(e){return"string"==typeof t[e]})).map((function(e){return Ne(e)+"="+Ne(t[e])})).join("&")):e;var t}function We(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function Ae(e,n){return void 0===n&&(n=document),We(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Le(e){return new h((function(n,t){var r=pe(e),o=Ae(e);if(o)return n(o);if(Re())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=Ae(e))?(clearInterval(i),n(o)):Re()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}ce((function(){return new h((function(e){if(Re()||Ce())return e();var n=setInterval((function(){if(Re()||Ce())return clearInterval(n),e()}),10)}))}));var Me,qe=function(e){function n(){return e.apply(this,arguments)||this}return r(n,e),n}(Ie);function De(e){if((Me=Me||new J).has(e)){var n=Me.get(e);if(n)return n}var t=new h((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<C.length;e++){var n=!1;try{n=C[e].closed}catch(e){}n&&(N.splice(e,1),C.splice(e,1))}}(),e&&e.contentWindow)try{C.push(e.contentWindow),N.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return Me.set(e,t),t}function ze(e){return De(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function Fe(e,n){void 0===e&&(e={});var t=e.style||{},r=function(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r,o,i,u=document.createElement(e);if(n.style&&we(u.style,n.style),n.class&&(u.className=n.class.join(" ")),n.id&&u.setAttribute("id",n.id),n.attributes)for(var a=0,c=Object.keys(n.attributes);a<c.length;a++){var s=c[a];u.setAttribute(s,n.attributes[s])}if(n.styleSheet&&(r=u,o=n.styleSheet,void 0===i&&(i=window.document),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");u.innerHTML=n.html}return u}("iframe",{attributes:o({allowTransparency:"true"},e.attributes||{}),style:o({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),i=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",re()),De(r),n&&function(e,n){void 0===n&&(n=document);var t=Ae(e,n);if(t)return t;throw new Error("Can not find element: "+pe(e))}(n).appendChild(r),(e.url||i)&&r.setAttribute("src",e.url||"about:blank"),r}function Be(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Ue(e){e.style.setProperty("display","")}function Ye(e){e.style.setProperty("display","none","important")}function He(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ge(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Ve(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,u=r.height,a=void 0===u||u,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,v,m=function(){if(!p&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||a&&r!==h)&&n({width:t,height:r}),l=t,h=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=me(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=me(m,10*s)):v=me(m,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Je(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var $e="undefined"!=typeof document?document.currentScript:null,Ze=ce((function(){if($e)return $e;if($e=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return $e;throw new Error("Can not determine current script")})),Xe=re();function Ke(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function Qe(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function en(e){return Qe(e)+"px"}function nn(e){return"number"==typeof e?en(e):Ke(e)?e:en(e)}function tn(e,n){if("number"==typeof e)return e;if(Ke(e))return parseInt(n*Qe(e)/100,10);if("string"==typeof(t=e)&&/^[0-9]+px$/.test(t))return Qe(e);var t;throw new Error("Can not normalize dimension: "+e)}function rn(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}ce((function(){var e;try{e=Ze()}catch(e){return Xe}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=re(),e.setAttribute("data-uid-auto",n)),n}));var on=function(){return{}};function un(e,n){return void 0===e&&(e="store"),void 0===n&&(n=on),Se(rn(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return Se(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var an,cn=function(){};function sn(){var e=rn();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new cn,e.WINDOW_WILDCARD}function dn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=on),un("windowStore").getOrSet(e,(function(){var t=new J,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return Se(r(n),e,t)}}}))}function fn(){return un("instance").getOrSet("instanceID",re)}function ln(e,n){var t=n.domain,r=dn("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=h.resolve({domain:t});return r.set(e,i),i}function hn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:fn()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return ln(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function pn(e,n){var t=n.send;return dn("windowInstanceIDPromises").getOrSet(e,(function(){return hn(e,{send:t}).then((function(e){return e.instanceID}))}))}function wn(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return dn("helloPromises").getOrSet(e,(function(){return new h}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function vn(e){dn("knownWindows").set(e,!0)}function mn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function yn(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function gn(e,n){return{__type__:e,__val__:n}}var En,Pn=((an={}).function=function(){},an.error=function(e){return gn("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},an.promise=function(){},an.regex=function(e){return gn("regex",e.source)},an.date=function(e){return gn("date",e.toJSON())},an.array=function(e){return e},an.object=function(e){return e},an.string=function(e){return e},an.number=function(e){return e},an.boolean=function(e){return e},an.null=function(e){return e},an),bn={},_n=((En={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},En.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+"\n\n"+o.stack,o},En.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},En.regex=function(e){return new RegExp(e)},En.date=function(e){return new Date(e)},En.array=function(e){return e},En.object=function(e){return e},En.string=function(e){return e},En.number=function(e){return e},En.boolean=function(e){return e},En.null=function(e){return e},En),On={};function Sn(){return!!j(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Tn(e){return!D(window,e)}function xn(e,n){if(e){if(b()!==F(e))return!0}else if(n&&!_(n))return!0;return!1}function In(e){var n=e.win,t=e.domain;return!(!Sn()||t&&!xn(t,n)||n&&!Tn(n))}function Rn(e){return"__postrobot_bridge___"+(e=e||F(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Cn(){return Boolean(window.name&&window.name===Rn(b()))}var Nn=new h((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));function kn(e){dn("remoteWindowPromises").getOrSet(e,(function(){return new h}))}function jn(e){var n=dn("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function Wn(e,n,t){jn(e).resolve((function(r,o,i){if(r!==e)throw new Error("Remote window does not match window");if(!z(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);t.fireAndForget(i)}))}function An(e,n){jn(e).reject(n).catch(fe)}function Ln(e){for(var n=e.win,t=e.name,r=e.domain,o=un("popupWindowsByName"),i=dn("popupWindowsByWin"),u=0,a=o.keys();u<a.length;u++){var c=a[u],s=o.get(c);s&&!k(s.win)||o.del(c)}if(k(n))return{win:n,name:t,domain:r};var d=i.getOrSet(n,(function(){return t?o.getOrSet(t,(function(){return{win:n,name:t}})):{win:n}}));if(d.win&&d.win!==n)throw new Error("Different window already linked for window: "+(t||"undefined"));return t&&(d.name=t,o.set(t,d)),r&&(d.domain=r,kn(n)),i.set(n,d),d}function Mn(e){var n,t=e.on,r=e.send,o=e.receiveMessage;n=window.open,window.open=function(e,t,r,o){var i=n.call(this,Y(e),t,r,o);return i?(Ln({win:i,name:t,domain:e?F(e):null}),i):i},function(e){var n=e.on,t=e.send,r=e.receiveMessage,o=un("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,u=e.origin,a=e.data,c=un("bridges").get(u);if(!c)throw new Error("Can not find bridge promise for domain "+u);return c.then((function(e){if(i!==e)throw new Error("Message source does not matched registered bridge for domain "+u);if(!a.name)throw new Error("Register window expected to be passed window name");if(!a.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(a.name))throw new Error("Window with name "+a.name+" does not exist, or was not opened by this window");var c=function(){return o.get(a.name)};if(!c().domain)throw new Error("We do not have a registered domain for window "+a.name);if(c().domain!==u)throw new Error("Message origin "+u+" does not matched registered window origin "+(c().domain||"unknown"));return Wn(c().win,u,a.sendMessage),{sendMessage:function(e){if(window&&!window.closed&&c()){var o=c().domain;if(o)try{r({data:e,origin:o,source:c().win},{on:n,send:t})}catch(e){h.reject(e)}}}}}))}))}({on:t,send:r,receiveMessage:o}),function(e){var n=e.send;rn(window).openTunnelToParent=function(e){var t=e.name,r=e.source,o=e.canary,i=e.sendMessage,u=un("tunnelWindows"),a=y(window);if(!a)throw new Error("No parent window found to open tunnel to");var c=function(e){var n=e.name,t=e.source,r=e.canary,o=e.sendMessage;!function(){for(var e=un("tunnelWindows"),n=0,t=e.keys();n<t.length;n++){var r=t[n];k(e[r].source)&&e.del(r)}}();var i=re();return un("tunnelWindows").set(i,{name:n,source:t,canary:r,sendMessage:o}),i}({name:t,source:r,canary:o,sendMessage:i});return n(a,"postrobot_open_tunnel",{name:t,sendMessage:function(){var e=u.get(c);if(e&&e.source&&!k(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:r}),function(e){var n=e.on,t=e.send,r=e.receiveMessage;h.try((function(){var e,o=g(window);if(o&&In({win:o}))return kn(o),(e=o,dn("remoteBridgeAwaiters").getOrSet(e,(function(){return h.try((function(){var n=W(e,Rn(b()));if(n)return _(n)&&rn(O(n))?n:new h((function(e){var t,r;t=setInterval((function(){if(n&&_(n)&&rn(O(n)))return clearInterval(t),clearTimeout(r),e(n)}),100),r=setTimeout((function(){return clearInterval(t),e()}),2e3)}))}))}))).then((function(e){return e?window.name?rn(O(e)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{window}catch(e){return}if(window&&!window.closed)try{r({data:e,origin:this.origin,source:this.source},{on:n,send:t})}catch(e){h.reject(e)}}}).then((function(e){var n=e.source,t=e.origin,r=e.data;if(n!==o)throw new Error("Source does not match opener");Wn(n,t,r.sendMessage)})).catch((function(e){throw An(o,e),e})):An(o,new Error("Can not register with opener: window does not have a name")):An(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:t,send:r,receiveMessage:o})}function qn(){for(var e=un("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Dn(e,n){var t=n.send,r=n.id,o=void 0===r?re():r,i=e.then((function(e){if(_(e))return O(e).name})),u=e.then((function(e){if(k(e))throw new Error("Window is closed, can not determine type");return g(e)?w.POPUP:w.IFRAME}));return i.catch(fe),u.catch(fe),{id:o,getType:function(){return u},getInstanceID:se((function(){return e.then((function(e){return pn(e,{send:t})}))})),close:function(){return e.then(H)},getName:function(){return e.then((function(e){if(!k(e))return _(e)?O(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return k(e)}))},setLocation:function(n){return e.then((function(e){var t=window.location.protocol+"//"+window.location.host;if(0===n.indexOf("/"))n=""+t+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(t))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if(_(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){Ln({win:e,name:n});var t=_(e),r=function(e){if(_(e))return O(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);O(e).name=n,r&&r.setAttribute("name",n),i=h.resolve(n)}))}}}var zn=function(){function e(e){var n=e.send,t=e.win,r=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new h,this.serializedWindow=r||Dn(this.actualWindowPromise,{send:n}),un("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then((function(e){return e===w.POPUP}))},n.setLocation=function(e){var n=this;return this.serializedWindow.setLocation(e).then((function(){return n}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=h.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return h.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Dn(this.actualWindowPromise,{send:t,id:this.getID()}),dn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return h.try((function(){return t.actualWindow?e===t.actualWindow:h.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:pn(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&k(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return qn(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return qn(),un("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!U(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(qn(),e.isProxyWindow(n))return n;var o=n;return dn("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function Fn(e,n,t,r,o){var i=dn("methodStore"),u=un("proxyWindowMethods");zn.isProxyWindow(r)?u.set(e,{val:n,name:t,domain:o,source:r}):(u.del(e),i.getOrSet(r,(function(){return{}}))[e]={domain:o,name:t,val:n,source:r})}function Bn(e,n){var t=dn("methodStore"),r=un("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Un(e,n,t,r,o){var i,u,a;u=(i={on:o.on,send:o.send}).on,a=i.send,un("builtinListeners").getOrSet("functionCalls",(function(){return u("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,u=Bn(n,o);if(!u)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+b(window));var c=u.source,s=u.domain,d=u.val;return h.try((function(){if(!z(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(Oe(u.domain)?u.domain.source:u.domain)+" does not match origin "+t+" in "+b(window));if(zn.isProxyWindow(c))return c.matchWindow(n,{send:a}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+b(window))}))})).then((function(){return d.apply({source:n,origin:t},r.args)}),(function(e){return h.try((function(){if(d.onError)return d.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),ge(n).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||re();e=zn.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),zn.isProxyWindow(e)?(Fn(c,t,s,e,n),e.awaitWindow().then((function(e){Fn(c,t,s,e,n)}))):Fn(c,t,s,e,n),gn("cross_domain_function",{id:c,name:s})}function Yn(e,n,t,r){var o,i=r.on,u=r.send;return function(e,n){void 0===n&&(n=bn);var t=JSON.stringify(e,(function(e){var t=this[e];if(mn(this))return t;var r=yn(t);if(!r)return t;var o=n[r]||Pn[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 gn("cross_domain_zalgo_promise",{then:Un(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:u})},o.function=function(t,r){return Un(e,n,t,r,{on:i,send:u})},o.object=function(e){return U(e)||zn.isProxyWindow(e)?gn("cross_domain_window",zn.serialize(e,{send:u})):e},o))}function Hn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=On),"undefined"!==e)return JSON.parse(e,(function(e,t){if(mn(this))return t;var r,o;if(mn(t)?(r=t.__type__,o=t.__val__):(r=yn(t),o=t),!r)return o;var i=n[r]||_n[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new h(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,u=r.send,a=function(t){function r(){var a=arguments;return zn.toProxyWindow(e,{send:u}).awaitWindow().then((function(e){var c=Bn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:b()},a);var s=[].slice.call(a);return t.fireAndForget?u(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):u(e,"postrobot_method",{id:o,name:i,args:s},{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},c=a();return c.fireAndForget=a({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return zn.deserialize(e,{send:i})},o))}var Gn={};function Vn(e,n,t,r){var o=r.on,i=r.send;return h.try((function(){var r=dn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||h.flush().then((function(){if(k(e))throw new Error("Window is closed");var t,u=Yn(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var a=Object.keys(Gn),c=[],s=0;s<a.length;s++){var d=a[s];try{Gn[d](e,u,n)}catch(e){c.push(e)}}if(c.length===a.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+he(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(fe)}function Jn(e){return un("responseListeners").get(e)}function $n(e){un("responseListeners").del(e)}function Zn(e){return un("erroredResponseListeners").has(e)}function Xn(e){var n=e.name,t=e.win,r=e.domain,o=dn("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,u=[t,sn()];i<u.length;i++){var a=u[i];if(a){var c=o.get(a);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],h=l.listener;if(z(l.regex,r))return h}}if(s["*"])return s["*"]}}}}}function Kn(e,n,t,r){var o=r.on,i=r.send,u=Xn({name:t.name,win:e,domain:n}),a="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,u,c){return h.flush().then((function(){if(!t.fireAndForget&&!k(e))try{return Vn(e,n,{id:re(),origin:b(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:u,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+a+" in "+b()+"\n\n"+he(e))}}))}return h.all([h.flush().then((function(){if(!t.fireAndForget&&!k(e))try{return Vn(e,n,{id:re(),origin:b(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+a+" in "+b()+"\n\n"+he(e))}})),h.try((function(){if(!u)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!z(u.domain,n))throw new Error("Request origin "+n+" does not match domain "+u.domain.toString());return u.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(fe).catch((function(e){if(u&&u.handleError)return u.handleError(e);throw e}))}function Qn(e,n,t){if(!Zn(t.hash)){var r=Jn(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!z(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}function et(e,n,t){if(!Zn(t.hash)){var r,o=Jn(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!z(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(r=o.domain,Array.isArray(r)?"("+r.join(" | ")+")":p(r)?"RegExp("+r.toString():r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");$n(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}function nt(e,n){var t=n.on,r=n.send,o=un("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,u=e.origin,a=function(e,n,t,r){var o,i=r.on,u=r.send;try{o=Hn(n,t,e,{on:i,send:u})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var a=o.__post_robot_10_0_42__;if(Array.isArray(a))return a}}(e.data,i,u,{on:t,send:r});if(a){vn(i);for(var c=0;c<a.length;c++){var s=a[c];if(o.has(s.id))return;if(o.set(s.id,!0),k(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(u="file://");try{"postrobot_message_request"===s.type?Kn(i,u,s,{on:t,send:r}):"postrobot_message_response"===s.type?et(i,u,s):"postrobot_message_ack"===s.type&&Qn(i,u,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function tt(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=t||n.handler;var r=n.window,o=n.domain,i=function e(n,t){var r=n.name,o=n.win,i=n.domain,u=dn("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],c=0,s=o;c<s.length;c++)a.push(e({name:r,domain:i,win:s[c]},t));return{cancel:function(){for(var e=0;e<a.length;e++)a[e].cancel()}}}if(Array.isArray(i)){for(var d=[],f=0,l=i;f<l.length;f++)d.push(e({name:r,win:o,domain:l[f]},t));return{cancel:function(){for(var e=0;e<d.length;e++)d[e].cancel()}}}var h=Xn({name:r,win:o,domain:i});if(o&&"*"!==o||(o=sn()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===sn()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===sn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var p,w,v=u.getOrSet(o,(function(){return{}})),m=Se(v,r,(function(){return{}})),y=i.toString();return Oe(i)?(p=Se(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[y]=t,{cancel:function(){delete m[y],w&&(p.splice(p.indexOf(w,1)),p.length||delete m.__domain_regex__),Object.keys(m).length||delete v[r],o&&!Object.keys(v).length&&u.del(o)}}}({name:e,win:r,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:r,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}Gn.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},Gn.postrobot_bridge=function(e,n,t){if(!Sn()&&!Cn())throw new Error("Bridge not needed for browser");if(_(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==D(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(e,n,t){var r=A(window,e),o=A(e,window);if(!r&&!o)throw new Error("Can only send messages to and from parent and popup windows");jn(e).then((function(r){return r(e,n,t)}))}(e,t,n)},Gn.postrobot_global=function(e,n){if(!j(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!_(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==D(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=rn(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:b(),data:n})};var rt,ot=function e(n,t,r,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,a=o.timeout||5e3,c=o.fireAndForget||!1;return h.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!Oe(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(k(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=L(n);if(t)return t===e;if(n===e)return!1;if(I(n)===n)return!1;for(var r=0,o=T(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return wn(n,a)})).then((function(t){return function(e,n,t,r){var o=r.send;return h.try((function(){return"string"==typeof n?n:h.try((function(){return t||hn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!z(n,n))throw new Error("Domain "+pe(n)+" does not match "+pe(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i=o,a="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,s=new h,d=t+"_"+re();if(!c){var f={name:t,win:n,domain:i,promise:s};!function(e,n){un("responseListeners").set(e,n)}(d,f);var l=dn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){un("erroredResponseListeners").set(e,!0)}(d),$n(d)}));var p=function(e){return dn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=u,v=p,m=w,y=me((function(){return k(n)?s.reject(new Error("Window closed for "+t+" before "+(f.ack?"response":"ack"))):f.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(v=Math.max(v-500,0),-1!==m&&(m=Math.max(m-500,0)),f.ack||0!==v?0===m?s.reject(new Error("No response for postMessage "+a+" in "+b()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+a+" in "+b()+" in "+p+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(fe)}return Vn(n,i,{id:re(),origin:b(window),type:"postrobot_message_request",hash:d,name:t,data:r,fireAndForget:c},{on:tt,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+a+" in "+b()+"\n\n"+he(e))}))}))};function it(e,n,t){return Yn(e,n,t,{on:tt,send:ot})}function ut(e,n,t){return Hn(e,n,t,{on:tt,send:ot})}function at(e){return zn.toProxyWindow(e,{send:ot})}function ct(e){for(var n=0,t=dn("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(k(e)?"closed":"cleaned up")+" before response")).catch(fe)}function st(e){if(void 0===e&&(e=window),!_(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_63__||(e.__zoid_9_0_63__={}),e.__zoid_9_0_63__}function dt(e){return{get:function(){var n=this;return h.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}rt={setupBridge:Mn,openBridge:function(e,n){var t=un("bridges"),r=un("bridgeFrames");return n=n||F(e),t.getOrSet(n,(function(){return h.try((function(){if(b()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=Rn(n);if(W(window,t))throw new Error("Frame with name "+t+" already exists on page");var o=function(e,n){var t=document.createElement("iframe");return t.setAttribute("name",e),t.setAttribute("id",e),t.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),t.setAttribute("frameborder","0"),t.setAttribute("border","0"),t.setAttribute("scrolling","no"),t.setAttribute("allowTransparency","true"),t.setAttribute("tabindex","-1"),t.setAttribute("hidden","true"),t.setAttribute("title",""),t.setAttribute("role","presentation"),t.src=n,t}(t,e);return r.set(n,o),Nn.then((function(n){n.appendChild(o);var t=o.contentWindow;return new h((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return wn(t,5e3,"Bridge "+e)})).then((function(){return t}))}))}))}))},linkWindow:Ln,linkUrl:function(e,n){Ln({win:e,domain:F(n)})},isBridge:Cn,needsBridge:In,needsBridgeForBrowser:Sn,hasBridge:function(e,n){return un("bridges").has(n||F(e))},needsBridgeForWin:Tn,needsBridgeForDomain:xn,destroyBridges:function(){for(var e=un("bridges"),n=un("bridgeFrames"),t=0,r=n.keys();t<r.length;t++){var o=n.get(r[t]);o&&o.parentNode&&o.parentNode.removeChild(o)}n.reset(),e.reset()}};var ft={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},lt={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},ht=w,pt={RENDER:"zoid-render",RENDERED:"zoid-rendered",DISPLAY:"zoid-display",ERROR:"zoid-error",CLOSE:"zoid-close",DESTROY:"zoid-destroy",PROPS:"zoid-props",RESIZE:"zoid-resize",FOCUS:"zoid-focus"};function wt(e,n,t,r,o){if(!e.hasOwnProperty(t))return r;var i=e[t];return"function"==typeof i.childDecorate?i.childDecorate({value:r,uid:o.uid,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide}):r}function vt(e){return de(vt,(function(){if(!e)throw new Error("No window name");var n=e.split("__"),t=n[1],r=n[2],o=n[3];if("zoid"!==t)throw new Error("Window not rendered by zoid - got "+t);if(!r)throw new Error("Expected component name");if(!o)throw new Error("Expected encoded payload");try{return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(o))}catch(e){throw new Error("Can not decode window name payload: "+o+": "+he(e))}}),[e])}function mt(){try{return vt(window.name)}catch(e){}}function yt(){return h.try((function(){window.focus()}))}function gt(){return h.try((function(){window.close()}))}function Et(e,n,t){return h.try((function(){return"function"==typeof e.queryParam?e.queryParam({value:t}):"string"==typeof e.queryParam?e.queryParam:n}))}function Pt(e,n,t){return h.try((function(){return"function"==typeof e.queryValue&&_e(t)?e.queryValue({value:t}):t}))}function bt(e,n,t){void 0===n&&(n={}),void 0===t&&(t=window);var r,i,u,a,c,s=e.propsDef,d=e.containerTemplate,f=e.prerenderTemplate,l=e.tag,p=e.name,w=e.attributes,v=e.dimensions,m=e.autoResize,y=e.url,g=e.domain,E=new h,P=[],S=Te(),T={},x={visible:!0},I=n.event?n.event:(r={},i={},{on:function(e,n){var t=i[e]=i[e]||[];t.push(n);var r=!1;return{cancel:function(){r||(r=!0,t.splice(t.indexOf(n),1))}}},once:function(e,n){var t=this.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var o=i[e],u=[];if(o)for(var a=function(e){var n=o[e];u.push(h.try((function(){return n.apply(void 0,t)})))},c=0;c<o.length;c++)a(c);return h.all(u).then(fe)},triggerOnce:function(e){if(r[e])return h.resolve();r[e]=!0;for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];return this.trigger.apply(this,[e].concat(t))},reset:function(){i={}}}),R=n.props?n.props:{},C=n.onError,N=n.getProxyContainer,j=n.show,W=n.hide,A=n.close,L=n.renderContainer,M=n.getProxyWindow,U=n.setProxyWin,G=n.openFrame,V=n.openPrerenderFrame,J=n.prerender,$=n.open,Z=n.openPrerender,X=n.watchForUnload,K=n.getInternalState,Q=n.setInternalState,ee=function(e){for(var n={},t=0,r=Object.keys(R);t<r.length;t++){var o=r[t],i=s[o];i&&!1===i.sendToChild||i&&i.sameDomain&&!z(e,b(window))||(n[o]=R[o])}return h.hash(n)},ne=function(){return h.try((function(){return K?K():x}))},oe=function(e){return h.try((function(){return Q?Q(e):x=o({},x,e)}))},ie=function(){return M?M():h.try((function(){var e=R.window;if(e){var n=at(e);return S.register((function(){return e.close()})),n}return new zn({send:ot})}))},ue=function(e){return N?N(e):h.try((function(){return Le(e)})).then((function(e){return Je(e)&&(e=function(e){var n=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Je(e))return e}(e);if(n.host)return n.host}(e);if(!n)throw new Error("Element is not in shadow dom");if(Je(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+re(),r=document.createElement("slot");r.setAttribute("name",t),e.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",t),n.appendChild(o),o}(e)),dt(e)}))},ae=function(e){return U?U(e):h.try((function(){u=e}))},se=function(){return j?j():h.hash({setState:oe({visible:!0}),showElement:a?a.get().then(Ue):null}).then(fe)},de=function(){return W?W():h.hash({setState:oe({visible:!1}),showElement:a?a.get().then(Ye):null}).then(fe)},ve=function(){return"function"==typeof y?y({props:R}):y},ye=function(){return"function"==typeof w?w({props:R}):w},Ee=function(){return g&&"string"==typeof g?g:F(ve())},Pe=function(){return g&&Oe(g)?g:Ee()},be=function(e,n){var t=n.windowName;return G?G(e,{windowName:t}):h.try((function(){if(e===ht.IFRAME)return dt(Fe({attributes:o({name:t,title:p},ye().iframe)}))}))},Se=function(e){return V?V(e):h.try((function(){if(e===ht.IFRAME)return dt(Fe({attributes:o({name:"__zoid_prerender_frame__"+p+"_"+re()+"__",title:"prerender__"+p},ye().iframe)}))}))},xe=function(e,n,t){return Z?Z(e,n,t):h.try((function(){if(e===ht.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return S.register((function(){return He(e)})),ze(e).then((function(e){return O(e)})).then((function(e){return at(e)}))}))}if(e===ht.POPUP)return n;throw new Error("No render context available for "+e)}))},Ie=function(){return h.try((function(){if(u)return h.all([I.trigger(pt.FOCUS),u.focus()]).then(fe)}))},Re=function(e,n,t,r){if(n===b(window)){var o=st(window);return o.windows=o.windows||{},o.windows[t]=window,S.register((function(){delete o.windows[t]})),{type:"global",uid:t}}return r===ht.POPUP?{type:"opener"}:{type:"parent",distance:q(window)}},Ce=function(e){return h.try((function(){c=e,E.resolve(),S.register((function(){return e.close.fireAndForget().catch(fe)}))}))},Ne=function(e){var n=e.width,t=e.height;return h.try((function(){I.trigger(pt.RESIZE,{width:n,height:t})}))},ke=function(e){return h.try((function(){return I.trigger(pt.DESTROY)})).catch(fe).then((function(){return S.all(e)})).then((function(){E.asyncReject(e||new Error("Component destroyed"))}))},We=ce((function(e){return h.try((function(){if(A){if(k(A.__source__))return;return A()}return h.try((function(){return I.trigger(pt.CLOSE)})).then((function(){return ke(e||new Error("Component closed"))}))}))})),Me=function(e,n){var t=n.proxyWin,r=n.proxyFrame,i=n.windowName;return $?$(e,{proxyWin:t,proxyFrame:r,windowName:i}):h.try((function(){if(e===ht.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return ze(e).then((function(n){return S.register((function(){return He(e)})),S.register((function(){return ct(n)})),n}))}))}if(e===ht.POPUP){var n=v.width,t=v.height;n=tn(n,window.outerWidth),t=tn(t,window.outerWidth);var u=function(e,n){var t=(n=n||{}).width,r=n.height,i=0,u=0;t&&(window.outerWidth?u=Math.round((window.outerWidth-t)/2)+window.screenX:window.screen.width&&(u=Math.round((window.screen.width-t)/2))),r&&(window.outerHeight?i=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(i=Math.round((window.screen.height-r)/2))),t&&r&&(n=o({top:i,left:u,width:t,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var a=n.name||"";delete n.name;var c,s=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+pe(n[e])})).filter(Boolean).join(",");try{c=window.open("",a,s,!0)}catch(e){throw new qe("Can not open popup window - "+(e.stack||e.message))}if(k(c))throw new qe("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return c.close()})),c}(0,o({name:i,width:n,height:t},ye().popup));return S.register((function(){return H(u)})),S.register((function(){return ct(u)})),u}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:ot}),t}))},De=function(){return h.try((function(){var e=Be(window,"unload",le((function(){ke(new Error("Window navigated away"))}))),n=B(t,ke,3e3);if(S.register(n.cancel),S.register(e.cancel),X)return X()}))},$e=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,We(new Error("Detected component window close"))):h.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,We(new Error("Detected component window close"))}))})).then((function(){return n}))},Ze=function(e){return C?C(e):h.try((function(){if(-1===P.indexOf(e))return P.push(e),E.asyncReject(e),I.trigger(pt.ERROR,e)}))};Ce.onError=Ze;var Xe=function(e,n){return e({container:n.container,context:n.context,uid:n.uid,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:Ie,close:We,state:T,props:R,tag:l,dimensions:v,event:I})},Ke=function(e,n){var t=n.context,r=n.uid;return J?J(e,{context:t,uid:r}):h.try((function(){if(f){var n=e.getWindow();if(n&&_(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var o=(n=O(n)).document,i=Xe(f,{context:t,uid:r,doc:o});if(i){if(i.ownerDocument!==o)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=ge(r.children);o<i.length;o++)r.removeChild(i[o]);for(var u=0,a=ge(n.children);u<a.length;u++)r.appendChild(a[u])}(n,i);var u=m.width,a=void 0!==u&&u,c=m.height,s=void 0!==c&&c,d=m.element,l=void 0===d?"body":d;if((l=Ae(l,o))&&(a||s)){var h=Ve(l,(function(e){Ne({width:a?e.width:void 0,height:s?e.height:void 0})}),{width:a,height:s,win:n});I.on(pt.RENDERED,h.cancel)}}}}}))},Qe=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.uid;return L?L(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,uid:i}):h.hash({container:e.get(),frame:t?t.get():null,prerenderFrame:r?r.get():null,internalState:ne()}).then((function(e){var n=e.container,t=e.internalState.visible,r=Xe(d,{context:o,uid:i,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||Ye(r),function(e,n){e.appendChild(n)}(n,r);var u=function(e,n){n=le(n);var t,r,o,i=!1,u=[],a=function(){i=!0;for(var e=0;e<u.length;e++)u[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&He(r)},c=function(){i||(n(),a())};if(Ge(e))return c(),{cancel:a};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){Ge(e)&&c()}));d.observe(s,{childList:!0}),u.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+re()+"__"),r.style.display="none",ze(r).then((function(e){(o=O(e)).addEventListener("unload",c)})),e.appendChild(r),t=me((function(){Ge(e)&&c()}),1e3),{cancel:a}}(r,(function(){return We(new Error("Detected container element removed from DOM"))}));return S.register((function(){return u.cancel()})),S.register((function(){return He(r)})),a=dt(r)}}))},en=function(){return{state:T,event:I,close:We,focus:Ie,resize:Ne,onError:Ze,updateProps:rn,show:se,hide:de}},nn=function(e,n){void 0===n&&(n=!1);var t=en();!function(e,n,t,r,o){void 0===o&&(o=!1),we(n,t=t||{});for(var i=o?[]:[].concat(Object.keys(e)),u=0,a=Object.keys(t);u<a.length;u++){var c=a[u];-1===i.indexOf(c)&&i.push(c)}for(var s=[],d=r.state,f=r.close,l=r.focus,h=r.event,p=r.onError,w=0;w<i.length;w++){var v=i[w],m=e[v],y=t[v];if(m){var g=m.alias;if(g&&(!_e(y)&&_e(t[g])&&(y=t[g]),s.push(g)),m.value&&(y=m.value({props:n,state:d,close:f,focus:l,event:h,onError:p})),!_e(y)&&m.default&&(y=m.default({props:n,state:d,close:f,focus:l,event:h,onError:p})),_e(y)&&("array"===m.type?!Array.isArray(y):typeof y!==m.type))throw new TypeError("Prop is not of type "+m.type+": "+v);n[v]=y}}for(var E=0;E<s.length;E++)delete n[s[E]];for(var P=0,b=Object.keys(n);P<b.length;P++){var _=b[P],O=e[_],S=n[_];O&&_e(S)&&O.decorate&&(n[_]=O.decorate({value:S,props:n,state:d,close:f,focus:l,event:h,onError:p}))}for(var T=0,x=Object.keys(e);T<x.length;T++){var I=x[T];if(!1!==e[I].required&&!_e(n[I]))throw new Error('Expected prop "'+I+'" to be defined')}}(s,R,e,t,n)},rn=function(e){return nn(e,!0),E.then((function(){var e=c,n=u;if(e&&n)return ee(Pe()).then((function(t){return e.updateProps(t).catch((function(e){return $e(n).then((function(n){if(!n)throw e}))}))}))}))};return{init:function(){I.on(pt.RENDER,(function(){return R.onRender()})),I.on(pt.DISPLAY,(function(){return R.onDisplay()})),I.on(pt.RENDERED,(function(){return R.onRendered()})),I.on(pt.CLOSE,(function(){return R.onClose()})),I.on(pt.DESTROY,(function(){return R.onDestroy()})),I.on(pt.RESIZE,(function(){return R.onResize()})),I.on(pt.FOCUS,(function(){return R.onFocus()})),I.on(pt.PROPS,(function(e){return R.onProps(e)})),I.on(pt.ERROR,(function(e){return R&&R.onError?R.onError(e):E.reject(e).then((function(){setTimeout((function(){throw e}),1)}))})),S.register(I.reset)},render:function(n,t,r){return h.try((function(){var o="zoid-"+l+"-"+re(),i=Pe(),a=Ee();!function(e,n,t){if(e!==window){if(!D(window,e))throw new Error("Can only renderTo an adjacent frame");var r=b();if(!z(n,r)&&!_(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+r);if(t&&"string"!=typeof t)throw new Error("Container passed to renderTo must be a string selector, got "+typeof t+" }")}}(n,i,t);var c=h.try((function(){if(n!==window)return function(e,n){for(var t={},r=0,o=Object.keys(R);r<o.length;r++){var i=o[r],u=s[i];u&&u.allowDelegate&&(t[i]=R[i])}var a=ot(n,"zoid_delegate_"+p,{overrides:{props:t,event:I,close:We,onError:Ze,getInternalState:ne,setInternalState:oe}}).then((function(e){var t=e.data.parent;return S.register((function(e){if(!k(n))return t.destroy(e)})),t.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+he(e))}));return N=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.getProxyContainer.apply(e,n)}))},L=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.renderContainer.apply(e,n)}))},j=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.show.apply(e,n)}))},W=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.hide.apply(e,n)}))},X=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.watchForUnload.apply(e,n)}))},e===ht.IFRAME?(M=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.getProxyWindow.apply(e,n)}))},G=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.openFrame.apply(e,n)}))},V=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},J=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.prerender.apply(e,n)}))},$=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.open.apply(e,n)}))},Z=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.openPrerender.apply(e,n)}))}):e===ht.POPUP&&(U=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.setProxyWin.apply(e,n)}))}),a}(r,n)})),d=R.window,f=De(),w=function(e,n){var t={},r=Object.keys(n);return h.all(r.map((function(r){var o=e[r];if(o)return h.resolve().then((function(){var e=n[r];if(e&&o.queryParam)return e})).then((function(e){if(null!=e)return h.all([Et(o,r,e),Pt(o,0,e)]).then((function(e){var n,i=e[0],u=e[1];if("boolean"==typeof u)n=u.toString();else if("string"==typeof u)n=u.toString();else if("object"==typeof u&&null!==u){if(o.serialization===lt.JSON)n=JSON.stringify(u);else if(o.serialization===lt.BASE64)n=btoa(JSON.stringify(u));else if(o.serialization===lt.DOTIFY||!o.serialization){n=function e(n,t,r){for(var o in void 0===t&&(t=""),void 0===r&&(r={}),t=t?t+".":t,n)n.hasOwnProperty(o)&&null!=n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every((function(e){return"object"!=typeof e}))?r[""+t+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?r=e(n[o],""+t+o,r):r[""+t+o]=n[o].toString());return r}(u,r);for(var a=0,c=Object.keys(n);a<c.length;a++){var s=c[a];t[s]=n[s]}return}}else"number"==typeof u&&(n=u.toString());t[i]=n}))}))}))).then((function(){return t}))}(s,R).then((function(e){return function(e,n){var t,r,o=n.query||{},i=n.hash||{},u=e.split("#");r=u[1];var a=(t=u[0]).split("?");t=a[0];var c=je(a[1],o),s=je(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(Y(ve()),{query:e})})),v=I.trigger(pt.RENDER),m=ue(t),y=ie(),g=y.then((function(e){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomain,o=n.domain,i=n.context,u=n.uid;return function(e,n,t,r){return ee(t).then((function(o){var i=it(e,t,o),u=n===b()?{type:"uid",uid:r}:{type:"raw",value:i};if("uid"===u.type){var a=st(window);a.props=a.props||{},a.props[r]=i,S.register((function(){delete a.props[r]}))}return u}))}(t,r,o,u).then((function(e){return{uid:u,context:i,tag:l,version:"9_0_63",childDomain:r,parentDomain:b(window),parent:Re(0,r,u,i),props:e,exports:it(t,o,(n=t,{init:Ce,close:We,checkClose:function(){return $e(n)},resize:Ne,onError:Ze,show:se,hide:de}))};var n}))}({proxyWin:(t={proxyWin:e,childDomain:a,domain:i,target:n,context:r,uid:o}).proxyWin,childDomain:t.childDomain,domain:t.domain,target:t.target,context:t.context,uid:t.uid}).then((function(e){return"__zoid__"+p+"__"+te(JSON.stringify(e))+"__"}));var t})),P=g.then((function(e){return be(r,{windowName:e})})),O=Se(r),T=h.hash({proxyContainer:m,proxyFrame:P,proxyPrerenderFrame:O}).then((function(e){return Qe(e.proxyContainer,{context:r,uid:o,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame})})).then((function(e){return e})),x=h.hash({windowName:g,proxyFrame:P,proxyWin:y}).then((function(e){var n=e.proxyWin;return d?n:Me(r,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),C=h.hash({proxyWin:x,proxyPrerenderFrame:O}).then((function(e){return xe(r,e.proxyWin,e.proxyPrerenderFrame)})),A=x.then((function(e){return u=e,ae(e)})),q=h.hash({proxyPrerenderWin:C,state:A}).then((function(e){return Ke(e.proxyPrerenderWin,{context:r,uid:o})})),B=h.hash({proxyWin:x,windowName:g}).then((function(e){if(d)return e.proxyWin.setName(e.windowName)})),H=h.hash({proxyWin:x,builtUrl:w,windowName:B,prerender:q}).then((function(e){return e.proxyWin.setLocation(e.builtUrl)})),K=x.then((function(e){!function e(n,t){var r=!1;return S.register((function(){r=!0})),h.delay(2e3).then((function(){return n.isClosed()})).then((function(o){return o?We(new Error("Detected "+t+" close")):r?void 0:e(n,t)}))}(e,r)})),Q=h.hash({container:T,prerender:q}).then((function(){return I.trigger(pt.DISPLAY)})),ce=x.then((function(n){return function(n,t,r){return h.try((function(){return n.awaitWindow()})).then((function(n){if(rt&&rt.needsBridge({win:n,domain:t})&&!rt.hasBridge(t,t)){var o="function"==typeof e.bridgeUrl?e.bridgeUrl({props:R}):e.bridgeUrl;if(!o)throw new Error("Bridge needed to render "+r);var i=F(o);return rt.linkUrl(n,t),rt.openBridge(Y(o),i)}}))}(n,a,r)})),fe=H.then((function(){return h.try((function(){var e=R.timeout;if(e)return E.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),le=E.then((function(){return I.trigger(pt.RENDERED)}));return h.hash({initPromise:E,buildUrlPromise:w,onRenderPromise:v,getProxyContainerPromise:m,openFramePromise:P,openPrerenderFramePromise:O,renderContainerPromise:T,openPromise:x,openPrerenderPromise:C,setStatePromise:A,prerenderPromise:q,loadUrlPromise:H,buildWindowNamePromise:g,setWindowNamePromise:B,watchForClosePromise:K,onDisplayPromise:Q,openBridgePromise:ce,runTimeoutPromise:fe,onRenderedPromise:le,delegatePromise:c,watchForUnloadPromise:f})})).catch((function(e){return h.all([Ze(e),ke(e)]).then((function(){throw e}),(function(){throw e}))})).then(fe)},destroy:ke,setProps:nn,getHelpers:en,getDelegateOverrides:function(){return h.try((function(){return{getProxyContainer:ue,show:se,hide:de,renderContainer:Qe,getProxyWindow:ie,watchForUnload:De,openFrame:be,openPrerenderFrame:Se,prerender:Ke,open:Me,openPrerender:xe,setProxyWin:ae}}))}}}var _t={register:function(e,n,t,o){var i=o.React,u=o.ReactDOM;return function(e){function n(){return e.apply(this,arguments)||this}r(n,e);var o=n.prototype;return o.render=function(){return i.createElement("div",null)},o.componentDidMount=function(){var e=u.findDOMNode(this),n=t(we({},this.props));n.render(e,ht.IFRAME),this.setState({parent:n})},o.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(we({},this.props)).catch(fe)},n}(i.Component)}},Ot={register:function(e,n,t,r){return r.component(e,{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var e=this.$el;this.parent=t(o({},this.$attrs)),this.parent.render(e,ht.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(o({},this.$attrs)).catch(fe)},deep:!0}}})}},St={register:function(e,n,t,r){return r.module(e,[]).directive(e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()})),(function(){for(var e={},r=0,o=Object.keys(n);r<o.length;r++)e[o[r]]="=";return e.props="=",{scope:e,restrict:"E",controller:["$scope","$element",function(e,n){function r(){if("$apply"!==e.$root.$$phase&&"$digest"!==e.$root.$$phase)try{e.$apply()}catch(e){}}var o=function(){return be(e.props,(function(e){return"function"==typeof e?function(){var n=e.apply(this,arguments);return r(),n}:e}))},i=t(o());i.render(n[0],ht.IFRAME),e.$watch((function(){i.updateProps(o()).catch(fe)}))}]}}))}},Tt={register:function(e,n,t,r){var i=r.NgModule,u=r.ElementRef,a=r.NgZone,c=function(e){return be(o({},e.internalProps,e.props),(function(n){return"function"==typeof n?function(){var t=arguments,r=this;return e.zone.run((function(){return n.apply(r,t)}))}:n}))},s=(0,r.Component)({selector:e,template:"<div></div>",inputs:["props"]}).Class({constructor:[u,a,function(e,n){this._props={},this.elementRef=e,this.zone=n}],ngOnInit:function(){var e=this.elementRef.nativeElement;this.parent=t(c(this)),this.parent.render(e,ht.IFRAME)},ngDoCheck:function(){this.parent&&!function(e,n){var t={};for(var r in e)if(e.hasOwnProperty(r)&&(t[r]=!0,e[r]!==n[r]))return!1;for(var o in n)if(!t[o])return!1;return!0}(this._props,this.props)&&(this._props=o({},this.props),this.parent.updateProps(c(this)))}});return i({declarations:[s],exports:[s]}).Class({constructor:function(){}})}};function xt(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,u=e.event,a=e.dimensions,c=a.width,s=a.height;if(t&&r){var d=o.createElement("div");d.setAttribute("id",n);var f=o.createElement("style");return i.cspNonce&&f.setAttribute("nonce",i.cspNonce),f.appendChild(o.createTextNode("\n #"+n+" {\n display: inline-block;\n position: relative;\n width: "+c+";\n height: "+s+";\n }\n\n #"+n+" > 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 ")),d.appendChild(t),d.appendChild(r),d.appendChild(f),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),u.on(pt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){He(r)}),1)})),u.on(pt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(d.style.width=nn(n)),"number"==typeof t&&(d.style.height=nn(t))})),d}}function It(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body"),i=n.createElement("style"),u=n.createElement("div");return u.classList.add("spinner"),t.cspNonce&&i.setAttribute("nonce",t.cspNonce),r.appendChild(o),o.appendChild(u),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 Rt=function(){return fe},Ct=function(e){return le(e.value)},Nt=Te(),kt=Te();function jt(e){!function(){var e,n,t,r;rn().initialized||(rn().initialized=!0,n=(e={on:tt,send:ot}).on,t=e.send,(r=rn()).receiveMessage=r.receiveMessage||function(e){return nt(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;un().getOrSet("postMessageListener",(function(){return Be(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;h.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");nt({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:tt,send:ot}),Mn({on:tt,send:ot,receiveMessage:nt}),function(e){var n=e.on,t=e.send;un("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ln(e.source,{domain:e.origin}),{instanceID:fn()}})),r=L();return r&&hn(r,{send:t}).catch((function(e){})),e}))}({on:tt,send:ot}))}();var n=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,i=e.bridgeUrl,u=e.props,a=void 0===u?{}:u,c=e.dimensions,s=void 0===c?{}:c,d=e.autoResize,f=void 0===d?{}:d,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,v=e.defaultContext,m=void 0===v?ht.IFRAME:v,y=e.containerTemplate,g=void 0===y?xt:y,E=e.prerenderTemplate,P=void 0===E?It:E,b=e.validate,O=e.eligible,S=void 0===O?function(){return{eligible:!0}}:O,T=e.logger,x=void 0===T?{info:fe}:T,I=n.replace(/-/g,"_"),R=s.width,C=void 0===R?"300px":R,N=s.height,j=void 0===N?"150px":N;if(a=o({},{window:{type:"object",sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!U(n)&&!zn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(U(n)){if(k(n))throw new Error("Window is closed");if(!_(n))throw new Error("Window is not same domain")}},decorate:function(e){return at(e.value)}},timeout:{type:"number",required:!1,sendToChild:!1},close:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:"string",required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},cspNonce:{type:"string",required:!1},getParent:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},onDisplay:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Rt,decorate:Ct},onRendered:{type:"function",required:!1,sendToChild:!1,default:Rt,decorate:Ct},onRender:{type:"function",required:!1,sendToChild:!1,default:Rt,decorate:Ct},onClose:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Rt,decorate:Ct},onDestroy:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Rt,decorate:Ct},onResize:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Rt},onFocus:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Rt},onError:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:"function",required:!1,sendToChild:!1,default:Rt,childDecorate:function(e){return e.onProps}}},a),!g)throw new Error("Container template required");return{name:I,tag:n,url:t,domain:r,bridgeUrl:i,propsDef:a,dimensions:{width:C,height:j},autoResize:f,allowedParentDomains:h,attributes:w,defaultContext:m,containerTemplate:g,prerenderTemplate:P,validate:b,logger:x,eligible:S}}(e),i=r.name,u=r.tag,a=r.defaultContext,c=r.propsDef,s=r.eligible,d=st(),f={},l=[],p=function(){var e=mt();return Boolean(e&&e.tag===u&&e.childDomain===b())},w=ce((function(){if(p()){if(window.xprops)throw delete d.components[u],new Error("Can not register "+i+" as child - child already registered");var e=function(e){var n,t=e.propsDef,r=e.autoResize,o=e.allowedParentDomains,i=[],u=mt();if(!u)throw new Error("No child payload found");if("9_0_63"!==u.version)throw new Error("Parent window has zoid version "+u.version+", child window has version 9_0_63");var a=u.uid,c=u.parentDomain,s=u.exports,d=u.context,f=u.props,l=function(e){var n,t,r=e.type;if("opener"===r)return xe("opener",g(window));if("parent"===r&&"number"==typeof e.distance)return xe("parent",(n=window,void 0===(t=e.distance)&&(t=1),function(e,n){void 0===n&&(n=1);for(var t=e,r=0;r<n;r++){if(!t)return;t=y(t)}return t}(n,q(n)-t)));if("global"===r&&e.uid&&"string"==typeof e.uid){var o=e.uid,i=L(window);if(!i)throw new Error("Can not find ancestor window");for(var u=0,a=R(i);u<a.length;u++){var c=a[u];if(_(c)){var s=st(c);if(s&&s.windows&&s.windows[o])return s.windows[o]}}}throw new Error("Unable to find "+r+" parent component window")}(u.parent),p=ut(l,c,s),w=p.show,v=p.hide,m=p.close,E=function(){return l},P=function(){return c},O=function(e){i.push(e)},S=function(e){return h.try((function(){if(p&&p.onError)return p.onError(e);throw e}))},T=function(e){return p.resize.fireAndForget({width:e.width,height:e.height})},x=function(e,r,o){void 0===o&&(o=!1);var u=function(e,n,t,r,o,i){void 0===i&&(i=!1);for(var u={},a=0,c=Object.keys(t);a<c.length;a++){var s=c[a],d=n[s];if(!d||!d.sameDomain||r===b(window)&&_(e)){var f=wt(n,0,s,t[s],o);u[s]=f,d&&d.alias&&!u[d.alias]&&(u[d.alias]=f)}}if(!i)for(var l=0,h=Object.keys(n);l<h.length;l++){var p=h[l];t.hasOwnProperty(p)||(u[p]=wt(n,0,p,void 0,o))}return u}(l,t,e,r,{show:w,hide:v,close:m,focus:yt,onError:S,resize:T,onProps:O,getParent:E,getParentDomain:P,uid:a},o);n?we(n,u):n=u;for(var c=0;c<i.length;c++)(0,i[c])(n)},I=function(e){return h.try((function(){return x(e,c,!0)}))};return{init:function(){return h.try((function(){return function(e,n){if(!z(e,n))throw new Error("Can not be rendered by domain: "+n)}(o,c),vn(l),window.addEventListener("beforeunload",(function(){p.checkClose.fireAndForget()})),window.addEventListener("unload",(function(){p.checkClose.fireAndForget()})),B(l,(function(){gt()})),p.init({updateProps:I,close:gt})})).then((function(){return(e=r.width,n=void 0!==e&&e,t=r.height,o=void 0!==t&&t,i=r.element,Le(void 0===i?"body":i).catch(fe).then((function(e){return{width:n,height:o,element:e}}))).then((function(e){var n=e.width,t=e.height,r=e.element;r&&(n||t)&&d!==ht.POPUP&&Ve(r,(function(e){T({width:n?e.width:void 0,height:t?e.height:void 0})}),{width:n,height:t})}));var e,n,t,o,i})).catch((function(e){S(e)}))},getProps:function(){return n||(x(function(e,n,t){var r,o=t.type,i=t.uid;if("raw"===o)r=t.value;else if("uid"===o){if(!_(e))throw new Error("Parent component window is on a different domain - expected "+b()+" - can not retrieve props");var u=st(e);r=xe("props",u&&u.props[i])}if(!r)throw new Error("Could not find props");return ut(e,n,r)}(l,c,f),c),n)}}}(r);return e.init(),e}})),v=function e(n){var t,u=s({props:n=n||{}}),c=u.eligible,d=u.reason,f=n.onDestroy;n.onDestroy=function(){if(t&&c&&l.splice(l.indexOf(t),1),f)return f.apply(void 0,arguments)};var p=bt(r);p.init(),c?p.setProps(n):n.onDestroy&&n.onDestroy(),Nt.register((function(e){p.destroy(e||new Error("zoid destroyed all components"))}));var w=function(e,t,r){return h.try((function(){if(!c){var t=new Error(d||i+" component is not eligible");return p.destroy(t).then((function(){throw t}))}if(!U(e))throw new Error("Must pass window to renderTo");return function(e,n){return h.try((function(){if(e.window)return at(e.window).getType();if(n){if(n!==ht.IFRAME&&n!==ht.POPUP)throw new Error("Unrecognized context: "+n);return n}return a}))}(n,r)})).then((function(n){return t=function(e,n){if(n){if("string"!=typeof n&&!We(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===ht.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(n,t),p.render(e,t,n)})).catch((function(e){return p.destroy(e).then((function(){throw e}))}))};return t=o({},p.getHelpers(),{isEligible:function(){return c},clone:function(t){var r=(void 0===t?{}:t).decorate;return e((void 0===r?ve:r)(n))},render:function(e,n){return w(window,e,n)},renderTo:function(e,n,t){return w(e,n,t)}}),c&&l.push(t),t};if(w(),n=tt("zoid_allow_delegate_"+i,(function(){return!0})),t=tt("zoid_delegate_"+i,(function(e){return{parent:bt(r,e.data.overrides,e.source)}})),kt.register(n.cancel),kt.register(t.cancel),d.components=d.components||{},d.components[u])throw new Error("Can not register multiple components with the same tag: "+u);return d.components[u]=!0,{init:v,instances:l,driver:function(e,n){var t={react:_t,angular:St,vue:Ot,angular2:Tt};if(!t[e])throw new Error("Could not find driver for framework: "+e);return f[e]||(f[e]=t[e].register(u,c,v,n)),f[e]},isChild:p,canRenderTo:function(e){return ot(e,"zoid_allow_delegate_"+i).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:w}}(e),t=function(e){return n.init(e)};t.driver=function(e,t){return n.driver(e,t)},t.isChild=function(){return n.isChild()},t.canRenderTo=function(e){return n.canRenderTo(e)},t.instances=n.instances;var r=n.registerChild();return r&&(window.xprops=t.xprops=r.getProps()),t}function Wt(e){rt&&rt.destroyBridges();var n=Nt.all(e);return Nt=Te(),n}var At=Wt;function Lt(e){var n;return At(),delete window.__zoid_9_0_63__,function(){for(var e=un("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(n=un().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_42__,kt.all(e)}}])},e.exports=t()}))),L=u((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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){t.r(n),t.d(n,"getUserAgent",(function(){return i})),t.d(n,"isDevice",(function(){return u})),t.d(n,"isWebView",(function(){return a})),t.d(n,"isStandAlone",(function(){return c})),t.d(n,"isFacebookWebView",(function(){return s})),t.d(n,"isFirefoxIOS",(function(){return d})),t.d(n,"isEdgeIOS",(function(){return f})),t.d(n,"isOperaMini",(function(){return l})),t.d(n,"isAndroid",(function(){return h})),t.d(n,"isIos",(function(){return p})),t.d(n,"isGoogleSearchApp",(function(){return w})),t.d(n,"isQQBrowser",(function(){return v})),t.d(n,"isIosWebview",(function(){return m})),t.d(n,"isSFVC",(function(){return y})),t.d(n,"isSFVCorSafari",(function(){return g})),t.d(n,"isAndroidWebview",(function(){return E})),t.d(n,"isIE",(function(){return P})),t.d(n,"isIECompHeader",(function(){return b})),t.d(n,"isElectron",(function(){return _})),t.d(n,"isIEIntranet",(function(){return O})),t.d(n,"isMacOsCna",(function(){return S})),t.d(n,"supportsPopups",(function(){return T})),t.d(n,"isChrome",(function(){return x})),t.d(n,"isSafari",(function(){return I})),t.d(n,"isApplePaySupported",(function(){return R})),t.d(n,"isDocumentReady",(function(){return Nn})),t.d(n,"isDocumentInteractive",(function(){return kn})),t.d(n,"urlEncode",(function(){return jn})),t.d(n,"waitForWindowReady",(function(){return Wn})),t.d(n,"waitForDocumentReady",(function(){return An})),t.d(n,"waitForDocumentBody",(function(){return Ln})),t.d(n,"parseQuery",(function(){return Mn})),t.d(n,"getQueryParam",(function(){return qn})),t.d(n,"urlWillRedirectPage",(function(){return Dn})),t.d(n,"formatQuery",(function(){return zn})),t.d(n,"extendQuery",(function(){return Fn})),t.d(n,"extendUrl",(function(){return Bn})),t.d(n,"redirect",(function(){return Un})),t.d(n,"hasMetaViewPort",(function(){return Yn})),t.d(n,"isElementVisible",(function(){return Hn})),t.d(n,"getPerformance",(function(){return Gn})),t.d(n,"enablePerformance",(function(){return Vn})),t.d(n,"getPageRenderTime",(function(){return Jn})),t.d(n,"htmlEncode",(function(){return $n})),t.d(n,"isBrowser",(function(){return Zn})),t.d(n,"querySelectorAll",(function(){return Xn})),t.d(n,"onClick",(function(){return Kn})),t.d(n,"getScript",(function(){return Qn})),t.d(n,"isLocalStorageEnabled",(function(){return et})),t.d(n,"getBrowserLocales",(function(){return nt})),t.d(n,"appendChild",(function(){return tt})),t.d(n,"isElement",(function(){return rt})),t.d(n,"getElementSafe",(function(){return ot})),t.d(n,"getElement",(function(){return it})),t.d(n,"elementReady",(function(){return ut})),t.d(n,"PopupOpenError",(function(){return ct})),t.d(n,"popup",(function(){return st})),t.d(n,"writeToWindow",(function(){return dt})),t.d(n,"writeElementToWindow",(function(){return ft})),t.d(n,"setStyle",(function(){return lt})),t.d(n,"awaitFrameLoad",(function(){return ht})),t.d(n,"awaitFrameWindow",(function(){return pt})),t.d(n,"createElement",(function(){return wt})),t.d(n,"iframe",(function(){return vt})),t.d(n,"addEventListener",(function(){return mt})),t.d(n,"bindEvents",(function(){return yt})),t.d(n,"setVendorCSS",(function(){return Et})),t.d(n,"animate",(function(){return _t})),t.d(n,"makeElementVisible",(function(){return Ot})),t.d(n,"makeElementInvisible",(function(){return St})),t.d(n,"showElement",(function(){return Tt})),t.d(n,"hideElement",(function(){return xt})),t.d(n,"destroyElement",(function(){return It})),t.d(n,"showAndAnimate",(function(){return Rt})),t.d(n,"animateAndHide",(function(){return Ct})),t.d(n,"addClass",(function(){return Nt})),t.d(n,"removeClass",(function(){return kt})),t.d(n,"isElementClosed",(function(){return jt})),t.d(n,"watchElementForClose",(function(){return Wt})),t.d(n,"fixScripts",(function(){return At})),t.d(n,"onResize",(function(){return Lt})),t.d(n,"getResourceLoadTime",(function(){return Mt})),t.d(n,"isShadowElement",(function(){return qt})),t.d(n,"getShadowRoot",(function(){return Dt})),t.d(n,"getShadowHost",(function(){return zt})),t.d(n,"insertShadowSlot",(function(){return Ft})),t.d(n,"preventClickFocus",(function(){return Bt})),t.d(n,"getStackTrace",(function(){return Ut})),t.d(n,"getCurrentScript",(function(){return Ht})),t.d(n,"getCurrentScriptUID",(function(){return Vt})),t.d(n,"experiment",(function(){return Kt})),t.d(n,"getGlobalNameSpace",(function(){return Qt})),t.d(n,"getStorage",(function(){return Jt})),t.d(n,"getFunctionName",(function(){return ie})),t.d(n,"setFunctionName",(function(){return ue})),t.d(n,"base64encode",(function(){return ae})),t.d(n,"base64decode",(function(){return ce})),t.d(n,"uniqueID",(function(){return se})),t.d(n,"getGlobal",(function(){return de})),t.d(n,"getObjectID",(function(){return fe})),t.d(n,"getEmptyObject",(function(){return he})),t.d(n,"memoize",(function(){return ve})),t.d(n,"promiseIdentity",(function(){return me})),t.d(n,"memoizePromise",(function(){return ye})),t.d(n,"promisify",(function(){return ge})),t.d(n,"inlineMemoize",(function(){return Ee})),t.d(n,"noop",(function(){return Pe})),t.d(n,"once",(function(){return be})),t.d(n,"hashStr",(function(){return _e})),t.d(n,"strHashStr",(function(){return Oe})),t.d(n,"match",(function(){return Se})),t.d(n,"awaitKey",(function(){return Te})),t.d(n,"stringifyError",(function(){return xe})),t.d(n,"stringifyErrorMessage",(function(){return Ie})),t.d(n,"stringify",(function(){return Re})),t.d(n,"domainMatches",(function(){return Ce})),t.d(n,"patchMethod",(function(){return Ne})),t.d(n,"extend",(function(){return ke})),t.d(n,"values",(function(){return je})),t.d(n,"memoizedValues",(function(){return We})),t.d(n,"perc",(function(){return Ae})),t.d(n,"min",(function(){return Le})),t.d(n,"max",(function(){return Me})),t.d(n,"roundUp",(function(){return qe})),t.d(n,"regexMap",(function(){return De})),t.d(n,"svgToBase64",(function(){return ze})),t.d(n,"objFilter",(function(){return Fe})),t.d(n,"identity",(function(){return Be})),t.d(n,"regexTokenize",(function(){return Ue})),t.d(n,"promiseDebounce",(function(){return Ye})),t.d(n,"safeInterval",(function(){return He})),t.d(n,"isInteger",(function(){return Ge})),t.d(n,"isFloat",(function(){return Ve})),t.d(n,"serializePrimitive",(function(){return Je})),t.d(n,"deserializePrimitive",(function(){return $e})),t.d(n,"dotify",(function(){return Ze})),t.d(n,"undotify",(function(){return Xe})),t.d(n,"eventEmitter",(function(){return Ke})),t.d(n,"camelToDasherize",(function(){return Qe})),t.d(n,"dasherizeToCamel",(function(){return en})),t.d(n,"capitalizeFirstLetter",(function(){return nn})),t.d(n,"get",(function(){return tn})),t.d(n,"safeTimeout",(function(){return rn})),t.d(n,"defineLazyProp",(function(){return on})),t.d(n,"arrayFrom",(function(){return un})),t.d(n,"isObject",(function(){return an})),t.d(n,"isObjectObject",(function(){return cn})),t.d(n,"isPlainObject",(function(){return sn})),t.d(n,"replaceObject",(function(){return dn})),t.d(n,"copyProp",(function(){return fn})),t.d(n,"regex",(function(){return ln})),t.d(n,"regexAll",(function(){return hn})),t.d(n,"isDefined",(function(){return pn})),t.d(n,"cycle",(function(){return wn})),t.d(n,"debounce",(function(){return vn})),t.d(n,"isRegex",(function(){return mn})),t.d(n,"weakMapMemoize",(function(){return yn})),t.d(n,"weakMapMemoizePromise",(function(){return gn})),t.d(n,"getOrSet",(function(){return En})),t.d(n,"cleanup",(function(){return Pn})),t.d(n,"tryCatch",(function(){return bn})),t.d(n,"removeFromArray",(function(){return _n})),t.d(n,"assertExists",(function(){return On})),t.d(n,"unique",(function(){return Sn})),t.d(n,"constHas",(function(){return Tn})),t.d(n,"dedupeErrors",(function(){return xn})),t.d(n,"ExtendableError",(function(){return In})),t.d(n,"request",(function(){return nr})),t.d(n,"addHeaderBuilder",(function(){return tr})),t.d(n,"TYPES",(function(){return rr})),t.d(n,"memoized",(function(){return or})),t.d(n,"promise",(function(){return ir})),t.d(n,"isPerc",(function(){return ur})),t.d(n,"isPx",(function(){return ar})),t.d(n,"toNum",(function(){return cr})),t.d(n,"toPx",(function(){return sr})),t.d(n,"toCSS",(function(){return dr})),t.d(n,"percOf",(function(){return fr})),t.d(n,"normalizeDimension",(function(){return lr})),t.d(n,"wrapPromise",(function(){return hr})),t.d(n,"KEY_CODES",(function(){return Rn})),t.d(n,"ATTRIBUTES",(function(){return Cn})),t.d(n,"iPhoneScreenHeightMatrix",(function(){return r}));var r={926:{device:"iPhone 12 Pro Max",textSizeHeights:[752,748,744,738],zoomHeight:{1.15:[752,747,744,738],1.25:[753,748,744,738],1.5:[752,749,744,738],1.75:[753,747,744,739],2:[752,748,744],2.5:[753,748],3:[753,744]},maybeSafari:{2:[738],2.5:[745,738],3:[747,738]}},896:{device:"iPhone XS Max, iPhone 11 Pro Max, iPhone XR, iPhone 11",textSizeHeights:[721,717,713,707],zoomHeight:{1.15:[721,716,713,707],1.25:[721,718,713,708],1.5:[722,717,713],1.75:[721,718,712,707],2:[722,718,714,708],2.5:[720,718,713,708],3:[720,717,708]},maybeSafari:{1.5:[707],3:[714]}},844:{device:"iPhone 12, iPhone 12 Pro",textSizeHeights:[670,666,662,656],zoomHeight:{1.15:[670,666,662],1.25:[670,666,663,656],1.5:[671,666,662],1.75:[670,667,662,656],2:[670,666,662],2.5:[670,663],3:[669,666,663,657]},maybeSafari:{1.15:[656],1.5:[656],2:[656],2.5:[665,655],3:[663]}},812:{device:"iPhone X, iPhone XS, iPhone 11 Pro, iPhone 12 Mini",textSizeHeights:[641,637,633,627],zoomHeight:{1.15:[641,637,633,627],1.25:[641,638,633,628],1.5:[641,638,633,627],1.75:[641,637,634],2:[642,638,634,628],2.5:[640,638,633,628],3:[642,633]},maybeSafari:{1.75:[627],3:[636,627]}},736:{device:"iPhone 6 Plus, iPhone 6S Plus, iPhone 7 Plus, iPhone 8 Plus",textSizeHeights:[628,624,620,614],zoomHeight:{1.15:[628,624,620,614],1.25:[628,624,620,614],1.5:[629,624,620],1.75:[628,625,620,614],2:[628,624,620],2.5:[628,625,620,615],3:[627,624,615]},maybeSafari:{1.5:[614],2:[614],3:[621]}},667:{device:"iPhone 6, iPhone 6S, iPhone 7, iPhone 8, iPhone SE2",textSizeHeights:[559,555,551,545],zoomHeight:{1.15:[559,555,551,545],1.25:[559,555,551,545],1.5:[560,555,551],1.75:[558,555,551],2:[560,556,552,546],2.5:[560,555,550],3:[558,555,546]},maybeSafari:{1.5:[545],1.75:[544],2.5:[545],3:[552]}}};function i(){return window.navigator.mockUserAgent||window.navigator.userAgent}function u(e){return void 0===e&&(e=i()),!!e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function a(){var e=i();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)|.*WKWebView/i.test(e)||/\bwv\b/.test(e)||/Android.*Version\/(\d)\.(\d)/i.test(e)}function c(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function s(e){return void 0===e&&(e=i()),/FBAN/.test(e)||/FBAV/.test(e)}function d(e){return void 0===e&&(e=i()),/FxiOS/i.test(e)}function f(e){return void 0===e&&(e=i()),/EdgiOS/i.test(e)}function l(e){return void 0===e&&(e=i()),/Opera Mini/i.test(e)}function h(e){return void 0===e&&(e=i()),/Android/.test(e)}function p(e){return void 0===e&&(e=i()),/iPhone|iPod|iPad/.test(e)}function w(e){return void 0===e&&(e=i()),/\bGSA\b/.test(e)}function v(e){return void 0===e&&(e=i()),/QQBrowser/.test(e)}function m(e){return void 0===e&&(e=i()),!!p(e)&&(!!w(e)||/.+AppleWebKit(?!.*Safari)|.*WKWebView/.test(e))}function y(e){if(void 0===e&&(e=i()),p(e)){var n=r[window.outerHeight];if(!n)return!1;var t=window.innerHeight,o=Math.round(window.screen.width/window.innerWidth*100)/100,u=Math.round(t*o);return o>1&&n.zoomHeight[o]?-1!==n.zoomHeight[o].indexOf(u):-1!==n.textSizeHeights.indexOf(u)}return!1}function g(e){if(void 0===e&&(e=i()),p(e)){var n=y(e),t=r[window.outerHeight];if(!t)return!1;var o=window.innerHeight,u=Math.round(window.screen.width/window.innerWidth*100)/100,a=Math.round(o*u),c=t.maybeSafari,s=!1;return u>1&&c[u]&&-1!==c[u].indexOf(a)&&(s=!0),n||s}return!1}function E(e){return void 0===e&&(e=i()),!!h(e)&&/Version\/[\d.]+/.test(e)&&!l(e)}function P(){return!!window.document.documentMode||Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))}function b(){var e=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');return!(!e||!n)}function _(){return!("undefined"==typeof process||!process.versions||!process.versions.electron)}function O(){if(window.document.documentMode)try{var e=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=e,!0)}catch(e){return!1}return!1}function S(){var e=i();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}function T(e){return void 0===e&&(e=i()),!(m(e)||E(e)||l(e)||d(e)||f(e)||s(e)||v(e)||_()||S()||c())}function x(e){return void 0===e&&(e=i()),/Chrome|Chromium|CriOS/.test(e)}function I(e){return void 0===e&&(e=i()),/Safari/.test(e)&&!x(e)}function R(){try{if(window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments())return!0}catch(e){return!1}return!1}function C(e,n){return(C=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function N(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,C(e,n)}function k(){return(k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function j(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var W,A=[],L=[],M=0;function q(){if(!M&&W){var e=W;W=null,e.resolve()}}function D(){M+=1}function z(){M-=1,q()}var F=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,u=!1;D();try{e((function(e){u?n.resolve(e):(o=!0,t=e)}),(function(e){u?n.reject(e):(i=!0,r=e)}))}catch(e){return z(),void this.reject(e)}z(),u=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===A.indexOf(e)){A.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<L.length;t++)L[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,D();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var u=r[i],a=u.onSuccess,c=u.onError,s=u.promise,d=void 0;if(n)try{d=a?a(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):j(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,z()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:j(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var a=n[u];if(a instanceof e){if(a.resolved){o[u]=a.value,r-=1;continue}}else if(!j(a)){o[u]=a,r-=1;continue}i(u,e.resolve(a),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];j(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return L.push(e),{cancel:function(){L.splice(L.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;D();try{o=n.apply(t,r||[])}catch(n){return z(),e.reject(n)}return z(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||j(n)},e.flush=function(){return n=W=W||new e,q(),n;var n},e}(),B="Call was rejected by callee.\r\n";function U(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function Y(e){try{return!0}catch(e){}return!1}function H(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=function(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}(e);return r&&Y()?H(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function G(e){void 0===e&&(e=window);var n=H(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function V(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(U(e)&&Y())return!0}catch(e){}try{if(H(e)===H(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(U(e)&&Y())return!0;if(G(window)===G(e))return!0}catch(e){}return!1}var J=[],$=[];function Z(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==B}if(n&&V(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(J,e);if(-1!==t){var r=$[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function X(e){try{if(e===window)return!0}catch(e){if(e&&e.message===B)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===B)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function K(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var Q,ee=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(X(r)&&Z(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!X(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,u=this.values,a=K(i,e);-1===a?(i.push(e),u.push(n)):u[a]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=K(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=K(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==K(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function re(e,n,t){return(re=te()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&C(o,t.prototype),o}).apply(null,arguments)}function oe(e){var n="function"==typeof Map?new Map:void 0;return(oe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return re(e,arguments,ne(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),C(t,e)})(e)}function ie(e){return e.name||e.__name__||e.displayName||"anonymous"}function ue(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ae(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function ce(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function se(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ae((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function de(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if(void 0!==o)return o;throw new Error("No global found")}function fe(e){if(Q=Q||new ee,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=Q.get(e);return n||(n=typeof e+":"+se(),Q.set(e,n)),n}function le(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+fe(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function he(){return{}}var pe=0,we=0;function ve(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,u=n.time,a=pe;pe+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;a<we&&(t=null,r=null,a=pe,pe+=1),s=i?(r=r||new ee).getOrSet(this,he):t=t||{};var d=le(o),f=s[d];if(f&&u&&Date.now()-f.time<u&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},ue(c,(n.name||ie(e))+"::memoized")}function me(e){return F.resolve(e)}function ye(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];var a=le(i);return n.hasOwnProperty(a)||(n[a]=F.try((function(){return e.apply(r,t)})).finally((function(){delete n[a]}))),n[a]}return t.reset=function(){n={}},ue(t,ie(e)+"::promiseMemoized")}function ge(e,n){function t(){return F.try(e,this,arguments)}return void 0===n&&(n={}),n.name&&(t.displayName=n.name+":promisified"),ue(t,ie(e)+"::promisified")}function Ee(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=le(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function Pe(){}function be(e){var n=!1;return ue((function(){if(!n)return n=!0,e.apply(this,arguments)}),ie(e)+"::once")}function _e(e){for(var n=0,t=0;t<e.length;t++)n+=e[t].charCodeAt(0)*Math.pow(t%10+1,5);return Math.floor(Math.pow(Math.sqrt(n),5))}function Oe(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}function Se(e,n){var t=e.match(n);if(t)return t[1]}function Te(e,n){return new F((function(t){var r=e[n];if(r)return t(r);delete e[n],Object.defineProperty(e,n,{configurable:!0,set:function(e){(r=e)&&t(r)},get:function(){return r}})}))}function xe(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+xe(e,n+1)}}function Ie(e){var n="<unknown error: "+{}.toString.call(e)+">";return e?e instanceof Error?e.message||n:"string"==typeof e.message&&e.message||n:n}function Re(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Ce(e,n){var t=(e=e.split("://")[1]).indexOf(n);return-1!==t&&e.slice(t)===n}function Ne(e,n,t){var r=e[n];e[n]=function(){var e=arguments,n=this;return t({context:this,args:[].slice.call(arguments),original:r,callOriginal:function(){return r.apply(n,e)}})}}function ke(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}ve.clear=function(){we=pe};var je=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},We=ve(je);function Ae(e,n){return Math.round(e*n/100)}function Le(){return Math.min.apply(Math,arguments)}function Me(){return Math.max.apply(Math,arguments)}function qe(e,n){var t=e%n;return t?e-t+n:e}function De(e,n,t){var r=[];return e.replace(n,(function(e){r.push(t?t.apply(null,arguments):e)})),r}function ze(e){return"data:image/svg+xml;base64,"+ae(e)}function Fe(e,n){void 0===n&&(n=Boolean);var t={};for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)&&(t[r]=e[r]);return t}function Be(e){return e}function Ue(e,n){var t=[];return e.replace(n,(function(e){return t.push(e),""})),t}function Ye(e,n){var t,r;return void 0===n&&(n=50),ue((function(){r&&clearTimeout(r);var o=t=t||new F;return r=setTimeout((function(){t=null,r=null,F.try(e).then((function(e){o.resolve(e)}),(function(e){o.reject(e)}))}),n),o}),ie(e)+"::promiseDebounced")}function He(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Ge(e){return Boolean(e.match(/^[0-9]+$/))}function Ve(e){return Boolean(e.match(/^[0-9]+\.[0-9]+$/))}function Je(e){return e.toString()}function $e(e){return"true"===e||"false"!==e&&(Ge(e)?parseInt(e,10):Ve(e)?parseFloat(e):e)}function Ze(e,n,t){for(var r in void 0===n&&(n=""),void 0===t&&(t={}),n=n?n+".":n,e)e.hasOwnProperty(r)&&null!=e[r]&&"function"!=typeof e[r]&&(e[r]&&Array.isArray(e[r])&&e[r].length&&e[r].every((function(e){return"object"!=typeof e}))?t[""+n+r+"[]"]=e[r].join(","):e[r]&&"object"==typeof e[r]?t=Ze(e[r],""+n+r,t):t[""+n+r]=Je(e[r]));return t}function Xe(e){var n={};for(var t in e)if(e.hasOwnProperty(t)&&"string"==typeof e[t]){var r=e[t];t.match(/^.+\[\]$/)?(t=t.slice(0,-2),r=r.split(",").map($e)):r=$e(r);for(var o=n,i=t.split("."),u=0;u<i.length;u++){var a=i[u],c=u+1===i.length,s=!c&&Ge(i[u+1]);if("constructor"===a||"prototype"===a||"__proto__"===a)throw new Error("Disallowed key: "+a);c?o[a]=r:o=o[a]=o[a]||(s?[]:{})}}return n}function Ke(){var e={},n={};return{on:function(e,t){var r=n[e]=n[e]||[];r.push(t);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once:function(e,n){var t=this.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var i=n[e],u=[];if(i)for(var a=function(e){var n=i[e];u.push(F.try((function(){return n.apply(void 0,r)})))},c=0;c<i.length;c++)a(c);return F.all(u).then(Pe)},triggerOnce:function(n){if(e[n])return F.resolve();e[n]=!0;for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return this.trigger.apply(this,[n].concat(r))},reset:function(){n={}}}}function Qe(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}function en(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function nn(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function tn(e,n,t){if(!n)return t;for(var r=n.split("."),o=0;o<r.length;o++){if("object"!=typeof e||null===e)return t;e=e[r[o]]}return void 0===e?t:e}function rn(e,n){var t=He((function(){(n-=100)<=0&&(t.cancel(),e())}),100)}function on(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function un(e){return[].slice.call(e)}function an(e){return"object"==typeof e&&null!==e}function cn(e){return an(e)&&"[object Object]"==={}.toString.call(e)}function sn(e){if(!cn(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!cn(t)&&!!t.hasOwnProperty("isPrototypeOf")}function dn(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){on(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))},u=0;u<r;u++)i(u);return o}if(sn(e)){var a={},c=function(r){if(!e.hasOwnProperty(r))return"continue";on(a,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))};for(var s in e)c(s);return a}throw new Error("Pass an object or array")}function fn(e,n,t,r){if(e.hasOwnProperty(t)){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o)}else n[t]=r}function ln(e,n,t){void 0===t&&(t=0),"string"==typeof e&&(e=new RegExp(e));var r=n.slice(t).match(e);if(r){var o=r.index,i=r[0];return{text:i,groups:r.slice(1),start:t+o,end:t+o+i.length,length:i.length,replace:function(e){return i?""+i.slice(0,t+o)+e+i.slice(o+i.length):""}}}}function hn(e,n){for(var t=[],r=0;;){var o=ln(e,n,r);if(!o)break;t.push(o),r=Se.end}return t}function pn(e){return null!=e}function wn(e){return F.try(e).then((function(){return wn(e)}))}function vn(e,n){var t;return void 0===n&&(n=100),ue((function(){var r=arguments,o=this;clearTimeout(t),t=setTimeout((function(){return e.apply(o,r)}),n)}),ie(e)+"::debounced")}function mn(e){return"[object RegExp]"==={}.toString.call(e)}var yn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t)}))}},gn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t).finally((function(){n.delete(t)}))}))}};function En(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Pn(e){var n,t=[],r=!1;return{set:function(n,t){return r||(e[n]=t,this.register((function(){delete e[n]}))),t},register:function(e){r?e(n):t.push(be((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return F.all(o).then(Pe)}}}function bn(e){var n,t;try{n=e()}catch(e){t=e}return{result:n,error:t}}function _n(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}function On(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}function Sn(e){for(var n={},t=0;t<e.length;t++)n[e[t]]=!0;return Object.keys(n)}var Tn=function(e,n){return-1!==We(e).indexOf(n)};function xn(e){var n=[],t={};return function(r){if(-1===n.indexOf(r)){n.push(r);var o=xe(r);if(!t[o])return t[o]=!0,e(r)}}}var In=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 N(n,e),n}(oe(Error)),Rn={ENTER:13,SPACE:32},Cn={UID:"data-uid"};function Nn(){return Boolean(document.body)&&"complete"===document.readyState}function kn(){return Boolean(document.body)&&"interactive"===document.readyState}function jn(e){return encodeURIComponent(e)}function Wn(){return Ee(Wn,(function(){return new F((function(e){Nn()&&e(),window.addEventListener("load",(function(){return e()}))}))}))}var An=ve((function(){return new F((function(e){if(Nn()||kn())return e();var n=setInterval((function(){if(Nn()||kn())return clearInterval(n),e()}),10)}))}));function Ln(){return F.try((function(){return document.body?document.body:An().then((function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))}))}function Mn(e){return Ee(Mn,(function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[e])}function qn(e){return Mn(window.location.search.slice(1))[e]}function Dn(e){return-1===e.indexOf("#")||0!==e.indexOf("#")&&e.split("#")[0]!==window.location.href.split("#")[0]}function zn(e){return void 0===e&&(e={}),Object.keys(e).filter((function(n){return"string"==typeof e[n]||"boolean"==typeof e[n]})).map((function(n){var t=e[n];if("string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("Invalid type for query");return jn(n)+"="+jn(t.toString())})).join("&")}function Fn(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?zn(k({},Mn(e),n)):e}function Bn(e,n){var t,r,o=n.query||{},i=n.hash||{},u=e.split("#");r=u[1];var a=(t=u[0]).split("?");t=a[0];var c=Fn(a[1],o),s=Fn(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}function Un(e,n){return void 0===n&&(n=window),new F((function(t){n.location=e,Dn(e)||t()}))}function Yn(){var e=document.querySelector("meta[name=viewport]");return!(u()&&window.screen.width<660&&!e)}function Hn(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Gn(){return Ee(Gn,(function(){var e=window.performance;if(e&&e.now&&e.timing&&e.timing.connectEnd&&e.timing.navigationStart&&Math.abs(e.now()-Date.now())>1e3&&e.now()-(e.timing.connectEnd-e.timing.navigationStart)>0)return e}))}function Vn(){return Boolean(Gn())}function Jn(){return An().then((function(){var e=Gn();if(e){var n=e.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0}}))}function $n(e){return void 0===e&&(e=""),e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")}function Zn(){return"undefined"!=typeof window&&void 0!==window.location}function Xn(e,n){return void 0===n&&(n=window.document),[].slice.call(n.querySelectorAll(e))}function Kn(e,n){e.addEventListener("touchstart",Pe),e.addEventListener("click",n),e.addEventListener("keypress",(function(e){if(e.keyCode===Rn.ENTER||e.keyCode===Rn.SPACE)return n(e)}))}function Qn(e){var n=e.host,t=void 0===n?window.location.host:n,r=e.path,o=e.reverse,i=void 0!==o&&o;return Ee(Qn,(function(){var e=""+t+r,n=[].slice.call(document.getElementsByTagName("script"));i&&n.reverse();for(var o=0;o<n.length;o++){var u=n[o];if(u.src&&u.src.replace(/^https?:\/\//,"").split("?")[0]===e)return u}}),[r])}function et(){return Ee(et,(function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1}))}function nt(){var e=window.navigator,n=e.languages?[].concat(e.languages):[];return e.language&&n.push(e.language),e.userLanguage&&n.push(e.userLanguage),n.map((function(e){if(e&&e.match(/^[a-z]{2}[-_][A-Z]{2}$/)){var n=e.split(/[-_]/);return{country:n[1],lang:n[0]}}return e&&e.match(/^[a-z]{2}$/)?{lang:e}:null})).filter(Boolean)}function tt(e,n){e.appendChild(n)}function rt(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function ot(e,n){return void 0===n&&(n=document),rt(e)?e:"string"==typeof e?n.querySelector(e):void 0}function it(e,n){void 0===n&&(n=document);var t=ot(e,n);if(t)return t;throw new Error("Can not find element: "+Re(e))}function ut(e){return new F((function(n,t){var r=Re(e),o=ot(e);if(o)return n(o);if(Nn())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=ot(e))?(clearInterval(i),n(o)):Nn()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}var at,ct=function(e){function n(){return e.apply(this,arguments)||this}return N(n,e),n}(In);function st(e,n){var t=(n=n||{}).width,r=n.height,o=0,i=0;t&&(window.outerWidth?i=Math.round((window.outerWidth-t)/2)+window.screenX:window.screen.width&&(i=Math.round((window.screen.width-t)/2))),r&&(window.outerHeight?o=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(o=Math.round((window.screen.height-r)/2))),t&&r&&(n=k({top:o,left:i,width:t,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var u=n.name||"";delete n.name;var a,c=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+Re(n[e])})).filter(Boolean).join(",");try{a=window.open(e,u,c)}catch(e){throw new ct("Can not open popup window - "+(e.stack||e.message))}if(Z(a))throw new ct("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return a.close()})),a}function dt(e,n){try{e.document.open(),e.document.write(n),e.document.close()}catch(t){try{e.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(e){}}}function ft(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=un(r.children);o<i.length;o++)r.removeChild(i[o]);for(var u=0,a=un(n.children);u<a.length;u++)r.appendChild(a[u])}function lt(e,n,t){void 0===t&&(t=window.document),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}function ht(e){if((at=at||new ee).has(e)){var n=at.get(e);if(n)return n}var t=new F((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<J.length;e++){var n=!1;try{n=J[e].closed}catch(e){}n&&($.splice(e,1),J.splice(e,1))}}(),e&&e.contentWindow)try{J.push(e.contentWindow),$.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return at.set(e,t),t}function pt(e){return ht(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function wt(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r=document.createElement(e);if(n.style&&ke(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(var o=0,i=Object.keys(n.attributes);o<i.length;o++){var u=i[o];r.setAttribute(u,n.attributes[u])}if(n.styleSheet&&lt(r,n.styleSheet),t&&tt(t,r),n.html)if("iframe"===e){if(!t||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");dt(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function vt(e,n){void 0===e&&(e={});var t=e.style||{},r=wt("iframe",{attributes:k({allowTransparency:"true"},e.attributes||{}),style:k({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",se()),ht(r),n&&it(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function mt(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function yt(e,n,t){t=be(t);for(var r=0;r<n.length;r++)e.addEventListener(n[r],t);return{cancel:be((function(){for(var r=0;r<n.length;r++)e.removeEventListener(n[r],t)}))}}var gt=["webkit","moz","ms","o"];function Et(e,n,t){e.style[n]=t;for(var r=nn(n),o=0;o<gt.length;o++)e.style[""+gt[o]+r]=t}var Pt=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],bt=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function _t(e,n,t,r){return void 0===r&&(r=1e3),new F((function(o,i){var u=it(e);if(!u)return o();var a,c,s,d,f=!1;function l(){clearTimeout(a),clearTimeout(c),s.cancel(),d.cancel()}s=yt(u,Pt,(function(e){e.target===u&&e.animationName===n&&(clearTimeout(a),e.stopPropagation(),s.cancel(),f=!0,c=setTimeout((function(){l(),o()}),r))})),d=yt(u,bt,(function(e){if(e.target===u&&e.animationName===n)return l(),"string"==typeof e.animationName&&e.animationName!==n?i("Expected animation name to be "+n+", found "+e.animationName):o()})),Et(u,"animationName",n),a=setTimeout((function(){if(!f)return l(),o()}),200),t&&t(l)}))}function Ot(e){e.style.setProperty("visibility","")}function St(e){e.style.setProperty("visibility","hidden","important")}function Tt(e){e.style.setProperty("display","")}function xt(e){e.style.setProperty("display","none","important")}function It(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Rt(e,n,t){var r=_t(e,n,t);return Tt(e),r}function Ct(e,n,t){return _t(e,n,t).then((function(){xt(e)}))}function Nt(e,n){e.classList.add(n)}function kt(e,n){e.classList.remove(n)}function jt(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Wt(e,n){n=be(n);var t,r,o,i=!1,u=[],a=function(){i=!0;for(var e=0;e<u.length;e++)u[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&It(r)},c=function(){i||(n(),a())};if(jt(e))return c(),{cancel:a};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){jt(e)&&c()}));d.observe(s,{childList:!0}),u.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+se()+"__"),r.style.display="none",pt(r).then((function(e){(o=function(e){if(!V(e))throw new Error("Expected window to be same domain");return e}(e)).addEventListener("unload",c)})),e.appendChild(r),t=He((function(){jt(e)&&c()}),1e3),{cancel:a}}function At(e,n){void 0===n&&(n=window.document);for(var t=0,r=Xn("script",e);t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var u=n.createElement("script");u.text=o.textContent,i.replaceChild(u,o)}}}function Lt(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,u=r.height,a=void 0===u||u,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,v,m=function(){if(!p&&Hn(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||a&&r!==h)&&n({width:t,height:r}),l=t,h=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=He(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=He(m,10*s)):v=He(m,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Mt(e){var n=Gn();if(n&&"function"==typeof n.getEntries)for(var t=n.getEntries(),r=0;r<t.length;r++){var o=t[r];if(o&&o.name&&0===o.name.indexOf(e)&&"number"==typeof o.duration)return Math.floor(o.duration)}}function qt(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}function Dt(e){for(;e.parentNode;)e=e.parentNode;if(qt(e))return e}function zt(e){var n=Dt(e);if(n.host)return n.host}function Ft(e){var n=zt(e);if(!n)throw new Error("Element is not in shadow dom");if(qt(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+se(),r=document.createElement("slot");r.setAttribute("name",t),e.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",t),n.appendChild(o),o}function Bt(e){var n=function n(t){return e.removeEventListener("focus",n),t.preventDefault(),e.blur(),!1};e.addEventListener("mousedown",(function(){e.addEventListener("focus",n),setTimeout((function(){e.removeEventListener("focus",n)}),1)}))}function Ut(){try{throw new Error("_")}catch(e){return e.stack||""}}var Yt="undefined"!=typeof document?document.currentScript:null,Ht=ve((function(){if(Yt)return Yt;if(Yt=function(){try{var e=Ut(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return Yt;throw new Error("Can not determine current script")})),Gt=se(),Vt=ve((function(){var e;try{e=Ht()}catch(e){return Gt}var n=e.getAttribute(Cn.UID);return n&&"string"==typeof n||(n=e.getAttribute(Cn.UID+"-auto"))&&"string"==typeof n||(n=se(),e.setAttribute(Cn.UID+"-auto",n)),n}));function Jt(e){var n=e.name,t=e.lifetime,r=void 0===t?12e5:t;return Ee(Jt,(function(){var e,t="__"+n+"_storage__",o=se();function i(n){var r,i=et();if(e&&(r=e),!r&&i){var u=window.localStorage.getItem(t);u&&(r=JSON.parse(u))}r||(r=de()[t]),r||(r={id:o}),r.id||(r.id=o),e=r;var a=n(r);return i?window.localStorage.setItem(t,JSON.stringify(r)):de()[t]=r,e=null,a}function u(){return i((function(e){return e.id}))}function a(e){return i((function(n){var t=n.__session__,o=Date.now();return t&&o-t.created>r&&(t=null),t||(t={guid:se(),created:o}),n.__session__=t,e(t)}))}return{getState:i,getID:u,isStateFresh:function(){return u()===o},getSessionState:function(e){return a((function(n){return n.state=n.state||{},e(n.state)}))},getSessionID:function(){return a((function(e){return e.guid}))}}}),[{name:n,lifetime:r}])}function $t(){return Jt({name:"belter_experiment"})}function Zt(e){return $t().getSessionState((function(n){return n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(e)&&(n.loggedBeacons.push(e),!0)}))}function Xt(e){return Math.floor(Math.random()*e)}function Kt(e){var n,t=e.name,r=e.sample,o=void 0===r?50:r,i=e.logTreatment,u=void 0===i?Pe:i,a=e.logCheckpoint,c=void 0===a?Pe:a,s=e.sticky,d=void 0===s||s?function(e){return $t().getState((function(n){return n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[e]=n.throttlePercentiles[e]||Xt(100),n.throttlePercentiles[e]}))}(t):Xt(100),f=t+"_"+(n=d<o?"test":o>=50||o<=d&&d<2*o?"control":"throttle"),l=!1,h=!1;try{window.localStorage&&window.localStorage.getItem(t)&&(h=!0)}catch(e){}return{isEnabled:function(){return"test"===n||h},isDisabled:function(){return"test"!==n&&!h},getTreatment:function(){return f},log:function(e,n){return void 0===n&&(n={}),l?(Zt(f+"_"+JSON.stringify(n))&&u({name:t,treatment:f,payload:n,throttle:d}),Zt(f+"_"+e+"_"+JSON.stringify(n))&&c({name:t,treatment:f,checkpoint:e,payload:n,throttle:d}),this):this},logStart:function(e){return void 0===e&&(e={}),l=!0,this.log("start",e)},logComplete:function(e){return void 0===e&&(e={}),this.log("complete",e)}}}function Qt(e){var n=e.name,t=e.version,r=void 0===t?"latest":t,o=de(),i="__"+n+"__"+r+"_global__",u=o[i]=o[i]||{};return{get:function(e,n){return n=n||{},u[e]=u[e]||n}}}var er=[];function nr(e){var n=e.url,t=e.method,r=void 0===t?"get":t,o=e.headers,i=void 0===o?{}:o,u=e.json,a=e.data,c=e.body,s=e.win,d=void 0===s?window:s,f=e.timeout,l=void 0===f?0:f;return new F((function(e,t){if(u&&a||u&&c||a&&u)throw new Error("Only options.json or options.data or options.body should be passed");for(var o={},s=0,f=Object.keys(i);s<f.length;s++){var h=f[s];o[h.toLowerCase()]=i[h]}u?o["content-type"]=o["content-type"]||"application/json":(a||c)&&(o["content-type"]=o["content-type"]||"application/x-www-form-urlencoded; charset=utf-8"),o.accept=o.accept||"application/json";for(var p=0;p<er.length;p++)for(var w=(0,er[p])(),v=0,m=Object.keys(w);v<m.length;v++){var y=m[v];o[y.toLowerCase()]=w[y]}var g=new d.XMLHttpRequest;for(var E in g.addEventListener("load",(function(){var o=function(e){void 0===e&&(e="");for(var n={},t=0,r=e.trim().split("\n");t<r.length;t++){var o=r[t].split(":"),i=o[0],u=o.slice(1);n[i.toLowerCase()]=u.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: no response status code."));var i=o["content-type"],u=i&&(0===i.indexOf("application/json")||0===i.indexOf("text/json")),a=this.responseText;try{a=JSON.parse(a)}catch(e){if(u)return t(new Error("Invalid json: "+this.responseText+"."))}return e({status:this.status,headers:o,body:a})}),!1),g.addEventListener("error",(function(e){t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: "+e.toString()+"."))}),!1),g.open(r,n,!0),o)o.hasOwnProperty(E)&&g.setRequestHeader(E,o[E]);u?c=JSON.stringify(u):a&&(c=Object.keys(a).map((function(e){return encodeURIComponent(e)+"="+(a?encodeURIComponent(a[e]):"")})).join("&")),g.timeout=l,g.ontimeout=function(){t(new Error("Request to "+r.toLowerCase()+" "+n+" has timed out"))},g.send(c)}))}function tr(e){er.push(e)}var rr=!0;function or(e,n,t){t.value=ve(t.value,{name:n,thisNamespace:!0})}function ir(e,n,t){t.value=ge(t.value,{name:n})}function ur(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function ar(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function cr(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function sr(e){return cr(e)+"px"}function dr(e){return"number"==typeof e?sr(e):ur(e)?e:sr(e)}function fr(e,n){return parseInt(e*cr(n)/100,10)}function lr(e,n){if("number"==typeof e)return e;if(ur(e))return fr(n,e);if(ar(e))return cr(e);throw new Error("Can not normalize dimension: "+e)}function hr(e,n){var t=(void 0===n?{}:n).timeout,r=[],o=[],i=setTimeout((function(){r.length&&o.push(F.asyncReject(new Error("Expected "+r[0]+" to be called")))}),void 0===t?5e3:t),u=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(u))})),s=c.result,d=c.error;if(d)throw o.push(F.asyncReject(d)),d;return o.push(F.resolve(s)),s}},a=function(e,n){return void 0===n&&(n=Pe),function(){var t;o.push(F.asyncReject(new Error("Expected "+e+" to not be called")));for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return(t=n).call.apply(t,[this].concat(i))}},c=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(u))})),s=c.result,d=c.error;if(d)throw d;return o.push(F.resolve(s).then((function(){throw new Error("Expected "+e+" to throw an error")}),Pe)),s}},s=function e(){return F.try((function(){if(o.length)return o.pop()})).then((function(){return o.length?e():r.length?F.delay(10).then(e):void 0}))};return o.push(F.try((function(){return e({expect:u,avoid:a,expectError:c,error:a,wait:s})}))),s().then((function(){clearTimeout(i)}))}}])},e.exports=t()})),M=i(L),q=a(Object.assign({__proto__:null,default:M,__moduleExports:L},M));function D(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,u=e.event,a=e.dimensions,s=a.width,d=a.height;if(t&&r){var f=o.createElement("div");f.setAttribute("id",n);var l=o.createElement("style");return i.cspNonce&&l.setAttribute("nonce",i.cspNonce),l.appendChild(o.createTextNode("\n #"+n+" {\n display: block;\n position: relative;\n width: "+s+";\n height: "+d+";\n }\n #"+n+" > iframe {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),t.allowPaymentRequest="true",f.appendChild(t),f.appendChild(r),f.appendChild(l),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),u.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){q.destroyElement(r)}),1)})),u.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=q.toCSS(n)),"number"==typeof t&&(f.style.height=q.toCSS(t))})),f}}!function(e){e.VISIBLE="is-visible",e.INVISIBLE="is-invisible"}(c||(c={}));var z,F=function(e){var n,t,r,o,i,u;if(null!=(n=e.state)&&n.__createToken)return e.state.__createToken;if(null!=(t=e.parent)&&null!=(r=t.state)&&r.__createToken)return e.parent.state.__createToken;if(null!=(o=e.state)&&null!=(i=o.parent)&&null!=(u=i.state)&&u.__createToken)return e.state.parent.state.__createToken;throw new Error("Index is not registered")},B=function(){var e=n(s.mark((function e(n,t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F(n)(t);case 2:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),U=A.create({tag:"monei-card-input",url:E.cardInputUrl,dimensions:{width:"100%",height:"auto"},autoResize:{width:!1,height:!0},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1,alias:"orderId"},paymentId:{type:A.PROP_TYPE.STRING,required:!1},onBlur:{type:A.PROP_TYPE.FUNCTION,required:!1},onEnter:{type:A.PROP_TYPE.FUNCTION,required:!1},onChange:{type:A.PROP_TYPE.FUNCTION,required:!1},onFocus:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},placeholders:{type:A.PROP_TYPE.OBJECT,required:!1},errorMessages:{type:A.PROP_TYPE.OBJECT,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}},validate:m,containerTemplate:function(e){return e.state.__createToken=function(n){if(void 0===n&&(n={}),!e.frame)throw new Error("CardInput instance is not registered");return W.send(e.frame.contentWindow,"CREATE_TOKEN",n,{domain:E.domain})},D(e)},prerenderTemplate:function(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body");o.style.margin="0";var i=n.createElement("div");i.style.height="36px",i.style.boxSizing="border-box";var u=t.style||t.innerStyle;return null!=u&&u.base&&Object.assign(i.style,d(u.base)),null!=u&&u.loading&&Object.assign(i.style,d(u.loading)),o.appendChild(i),r.appendChild(o),r}}),Y=A.create({tag:"monei-payment-modal",url:E.paymentModalUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},containerTemplate:D,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!0},isOpen:{type:A.PROP_TYPE.BOOLEAN,required:!0},language:{type:A.PROP_TYPE.STRING,required:!1},generatePaymentToken:{type:A.PROP_TYPE.BOOLEAN,required:!1},fullscreen:{type:A.PROP_TYPE.BOOLEAN,required:!1},customer:{type:A.PROP_TYPE.OBJECT,required:!1},paymentMethod:{type:A.PROP_TYPE.OBJECT,required:!1},allowedPaymentMethods:{type:A.PROP_TYPE.ARRAY,required:!1},customDomain:{type:A.PROP_TYPE.STRING,required:!1},billingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},shippingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},onResult:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1}}}),H=function(){var e=n(s.mark((function e(r){var o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=document.createElement("div"),i=document.body.style.overflow,document.body.appendChild(o),e.abrupt("return",new Promise(function(){var e=n(s.mark((function e(n,u){var a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Y(t({},r,{isOpen:!0,onOpen:function(){Object.assign(document.body.style,{overflow:"hidden"}),Object.assign(o.style,{position:"fixed",overflow:"hidden",display:"block",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",zIndex:99999})},onResult:function(e){n(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)},onError:function(e){u(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)}})),e.next=3,a.render(o);case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=n(s.mark((function e(r,o,i){var u,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(i,r.cspNonce,{namespace:"monei-paypal",cspNonce:r.cspNonce});case 2:return u={layout:"horizontal",tagline:!1},null==r.onLoad||r.onLoad(!0),e.next=6,window["monei-paypal"].Buttons({createOrder:function(){var e=n(s.mark((function e(){var n,t;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O({paymentId:r.paymentId,accountId:r.accountId,sessionId:r.sessionId,amount:r.amount,currency:r.currency,paymentMethod:{paypal:{}}});case 3:return a=(t=e.sent).paymentToken,e.abrupt("return",null==(n=t.paypal)?void 0:n.orderId);case 8:return e.prev=8,e.t0=e.catch(0),null==r.onError||r.onError(e.t0),e.abrupt("return");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),onApprove:function(e){e.orderID?r.onSubmit({token:a}):null==r.onError||r.onError(e)},style:t({},u,r.style)}).render(o.__container);case 6:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),V=A.create({tag:"monei-paypal",url:E.paypalUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){if(e.state.__container=e.container,!e.props.accountId&&!e.props.paymentId)throw new Error("You need to provide paymentId or accountId");return D(e)},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},cspNonce:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onLoadPayPal:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return G.bind(null,e.props,e.state)}}}});!function(e){e.BEFORE_CLOSE="BEFORE_CLOSE"}(z||(z={}));var J,$=A.create({tag:"monei-bizum",url:E.bizumUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,u=e.event,a=e.dimensions,s=a.width,d=a.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),u.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){q.destroyElement(r)}),1)})),u.on(z.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),u.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=q.toCSS(n)),"number"==typeof t&&(f.style.height=q.toCSS(t))})),f}},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(z.BEFORE_CLOSE)}}}}}),Z=A.create({tag:"monei-bizum-button",url:E.bizumButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:D,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new $(t({amount:e.amount,currency:e.currency},n,{onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}});(J||(J={})).BEFORE_CLOSE="BEFORE_CLOSE";var X,K=A.create({tag:"monei-cofidis",url:E.cofidisUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,u=e.event,a=e.dimensions,s=a.width,d=a.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),u.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){q.destroyElement(r)}),1)})),u.on(J.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),u.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=q.toCSS(n)),"number"==typeof t&&(f.style.height=q.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(J.BEFORE_CLOSE)}}}}}),Q=A.create({tag:"monei-cofidis-widget",url:E.cofidisWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ee=A.create({tag:"monei-cofidis-button",url:E.cofidisButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:D,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new K(t({},n,{amount:e.amount,currency:e.currency,accountId:e.accountId,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}});(X||(X={})).BEFORE_CLOSE="BEFORE_CLOSE";var ne,te,re=A.create({tag:"monei-cofidis-loan",url:E.cofidisLoanUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,u=e.event,a=e.dimensions,s=a.width,d=a.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),u.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){q.destroyElement(r)}),1)})),u.on(X.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),u.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=q.toCSS(n)),"number"==typeof t&&(f.style.height=q.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(X.BEFORE_CLOSE)}}}}}),oe=re,ie=A.create({tag:"monei-cofidis-loan-widget",url:E.cofidisLoanWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ue=ie,ae=A.create({tag:"monei-cofidis-loan-button",url:E.cofidisLoanButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:D,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new re(t({},n,{amount:e.amount,currency:e.currency,accountId:e.accountId,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}}),ce=ae,se=A.create({tag:"monei-google-pay",url:E.googlePayUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:D,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}}}),de=function(){var e=n(s.mark((function e(r,o,i){var u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(u=new window.ApplePaySession(3,o)).onvalidatemerchant=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,R(t({},i,{validationUrl:n.validationURL}));case 3:u.completeMerchantValidation(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),u.abort();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),u.onpaymentauthorized=function(){var e=n(s.mark((function e(n){var t,o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=JSON.stringify(n.payment.token),o=window.btoa(t),e.prev=2,e.next=5,O({accountId:r.accountId,paymentId:r.paymentId,sessionId:r.sessionId,paymentMethod:{applePay:{token:o}}});case 5:r.onSubmit({token:(i=e.sent).paymentToken,error:i.error}),u.completePayment({status:window.ApplePaySession.STATUS_SUCCESS}),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),null==r.onError||r.onError(e.t0),u.completePayment({status:window.ApplePaySession.STATUS_FAILURE});case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(n){return e.apply(this,arguments)}}(),u.begin();case 4:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),fe=A.create({tag:"monei-payment-request",url:E.paymentRequestUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:D,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__isApplePaySupported:{type:A.PROP_TYPE.BOOLEAN,required:!1,value:function(){try{var e;return null==(e=window.ApplePaySession)?void 0:e.canMakePayments()}catch(e){return!1}}},__onApplePayButtonClicked:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return de.bind(null,e.props)}}}});(ne=exports.NextActionType||(exports.NextActionType={})).CONFIRM="CONFIRM",ne.FRICTIONLESS_CHALLENGE="FRICTIONLESS_CHALLENGE",ne.BIZUM_CHALLENGE="BIZUM_CHALLENGE",ne.CHALLENGE="CHALLENGE",ne.COMPLETE="COMPLETE",(te=exports.CardBrand||(exports.CardBrand={})).Visa="visa",te.Mastercard="mastercard",te.Amex="amex",te.Discover="discover",te.Diners="diners",te.JCB="jcb",te.Maestro="maestro",te.UnionPay="unionpay",te.Elo="elo",te.Hipercard="hipercard";var le=C,he=y;exports.Bizum=Z,exports.BizumModal=$,exports.CardInput=U,exports.Cofidis=ee,exports.CofidisLoan=ae,exports.CofidisLoanModal=re,exports.CofidisLoanWidget=ie,exports.CofidisModal=K,exports.CofidisPay=ce,exports.CofidisPayModal=oe,exports.CofidisPayWidget=ue,exports.CofidisWidget=Q,exports.GooglePay=se,exports.PayPal=V,exports.PaymentModal=Y,exports.PaymentRequest=fe,exports.api=le,exports.config=E,exports.confirmPayment=H,exports.createToken=B,exports.utils=he;
1
+ "use strict";function e(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=n.apply(t,r);function u(n){e(a,o,i,u,c,"next",n)}function c(n){e(a,o,i,u,c,"throw",n)}u(void 0)}))}}function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function r(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,n){return e(n={exports:{}},n.exports),n.exports}function u(e){return e&&e.default||e}var c,s=a((function(e){var n=function(e){var n=Object.prototype,t=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{u({},"")}catch(e){u=function(e,n,t){return e[n]=t}}function c(e,n,t,r){var o=Object.create((n&&n.prototype instanceof f?n:f).prototype),i=new _(r||[]);return o._invoke=function(e,n,t){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(t.method=o,t.arg=i;;){var a=t.delegate;if(a){var u=E(a,t);if(u){if(u===d)continue;return u}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var c=s(e,n,t);if("normal"===c.type){if(r=t.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(r="completed",t.method="throw",t.arg=c.arg)}}}(e,t,i),o}function s(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function l(){}function h(){}var p={};p[o]=function(){return this};var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==n&&t.call(v,o)&&(p=v);var m=h.prototype=f.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(n){u(e,n,(function(e){return this._invoke(n,e)}))}))}function g(e,n){var r;this._invoke=function(o,i){function a(){return new n((function(r,a){!function r(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var d=c.arg,f=d.value;return f&&"object"==typeof f&&t.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):n.resolve(f).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,n){var t=e.iterator[n.method];if(void 0===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,E(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(t,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function P(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function b(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(t.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=m.constructor=h,h.constructor=l,l.displayName=u(h,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===l||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(n,t,r,o,i){void 0===i&&(i=Promise);var a=new g(c(n,t,r,o),i);return e.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var n in this)"t"===n.charAt(0)&&t.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=t.call(i,"catchLoc"),c=t.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&t.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),d},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),b(t),d}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;b(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:O(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}})),d=function(e){return Object.keys(e).reduce((function(n,t){return n[t]="string"==typeof e[t]?e[t]:e[t]+"px",n}),{})},f=function(e,n,t){return new Promise((function(r,o){-1!==Array.from(document.scripts).findIndex((function(n){return n.src===e}))&&r();var i=document.createElement("script");i.src=e,i.onload=function(){return r()},i.onerror=function(e){return o(e)},n&&i.setAttribute("nonce",n),t&&Object.keys(t).forEach((function(e){t[e]&&(i.dataset[e]=t[e])})),document.head.appendChild(i)}))},l=function(e){return Object.keys(e).reduce((function(n,t){return void 0!==e[t]&&n.push(t+"="+e[t]),n}),[]).join("&")},h=function(){var e,n;try{e=window.localStorage}catch(r){var t=(n=new Map,{getItem:function(e){return n.get(e)},setItem:function(e,t){n.set(e,t)},clear:function(){n=new Map},removeItem:function(e){n.delete(e)}});Object.defineProperty(window,"localStorage",{value:t}),e=t}return e},p=function(){var e,n=h();try{e=n.getItem("i18nextLng")}catch(e){}return e?e.split("-")[0]:""},w=function(){var e=[window.screen.colorDepth,window.screen.height,window.screen.width,(new Date).getTimezoneOffset(),p()].join("|");return window.btoa(e)},v=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=void 0,e.next=4,n;case 4:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 8:return e.prev=8,e.t2=e.catch(0),e.abrupt("return",[e.t2,void 0]);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(n){return e.apply(this,arguments)}}(),m=function(e){if(!(e.paymentId||e.accountId&&e.amount&&e.currency))throw new Error("You need to provide paymentId or accountId amount and currency")},y={__proto__:null,transformStyle:d,loadScript:f,stringify:l,fixLocalstorage:h,getClientEnv:w,withError:v,isMethodSupported:function(e,n){return e.paymentMethods&&e.paymentMethods.includes(n)},validateComponentProps:m},g="https://js.monei.com",E=t({},{domain:g,version:"v1",stage:"prod",isProduction:!0,paymentPageUrl:g+"/v1/payment-page/",posPaymentPageUrl:g+"/v1/pos-payment-page/",cardInputUrl:g+"/v1/inner-card-input/",paymentModalUrl:g+"/v1/inner-payment-modal/",paypalUrl:g+"/v1/inner-paypal/",bizumUrl:g+"/v1/inner-bizum/",bizumButtonUrl:g+"/v1/inner-bizum-button/",cofidisUrl:g+"/v1/inner-cofidis/",cofidisButtonUrl:g+"/v1/inner-cofidis-button/",cofidisWidgetUrl:g+"/v1/inner-cofidis-widget/",cofidisLoanUrl:g+"/v1/inner-cofidis-loan/",cofidisLoanButtonUrl:g+"/v1/inner-cofidis-loan-button/",cofidisLoanWidgetUrl:g+"/v1/inner-cofidis-loan-widget/",googlePayUrl:g+"/v1/inner-google-pay/",paymentRequestUrl:g+"/v1/inner-payment-request/",click2PayUrl:g+"/v1/inner-click2pay/",click2PayButtonUrl:g+"/v1/inner-click2pay-button/"},{apiUrl:"https://api.monei.com/v1",secureDomain:"https://secure.monei.com"}),P=function(){var e=n(s.mark((function e(n,r){var o,i,a,u,c,d,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(o=void 0===r?{}:r).headers,c=o.body,"POST"===(a=void 0===(i=o.method)?"GET":i)&&(u=t({"Content-Type":"application/json"},u)),e.next=4,fetch(""+E.apiUrl+n,{method:a,headers:u,body:c?JSON.stringify(c):void 0});case 4:return d=e.sent,e.next=7,v(d.json());case 7:if(f=e.sent[1],d.ok){e.next=11;break}throw f||new Error(d.statusText);case 11:return e.abrupt("return",f);case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),b={},_=function(){var e=n(s.mark((function e(n){var t,r,o,i,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.accountId,!(r=n.paymentId)){e.next=5;break}o={paymentId:r},e.next=10;break;case 5:if(!t){e.next=9;break}o={accountId:t},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:if(i=l(o),!b[i]){e.next=13;break}return e.abrupt("return",b[i]);case 13:return a=P("/payment-methods?"+i),b[i]=a,e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=n(s.mark((function e(n){var t,r,o,i,a,u,c;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.paymentMethod,o=n.sessionId,i=n.amount,a=n.currency,u=n.accountId,!(r=n.paymentId)){e.next=5;break}c={paymentId:r,paymentMethod:t},e.next=10;break;case 5:if(!u){e.next=9;break}c={accountId:u,paymentMethod:t,sessionId:o,amount:i,currency:a},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:return e.abrupt("return",P("/tokens",{method:"POST",headers:{"Client-Env":w()},body:c}));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n+"/client-get"));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.paymentId,o=r(n,["paymentId"]),e.abrupt("return",P("/payments/"+t+"/client-confirm",{method:"POST",headers:{"Client-Env":w()},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.signature,o=r(n,["signature"]),e.abrupt("return",P("/client-payments",{method:"POST",headers:{"Client-Env":w(),"Client-Signature":t},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n.paymentId+"/client-receipt",{method:"POST",body:{customerEmail:n.customerEmail,signature:n.signature,language:n.language}}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/apple-pay/sessions",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N={__proto__:null,getPaymentMethods:_,createToken:O,getPayment:T,confirmPayment:S,createPayment:x,sendPaymentReceipt:I,createApplePaySession:R,calculateFinancing:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/cofidis/calculate-financing",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),validateBizumPhone:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/bizum/validate-phone",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},C=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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){return"[object RegExp]"==={}.toString.call(e)}t.r(n),t.d(n,"Promise",(function(){return N})),t.d(n,"TYPES",(function(){return Ge})),t.d(n,"ProxyWindow",(function(){return Pe})),t.d(n,"setup",(function(){return Ye})),t.d(n,"destroy",(function(){return He})),t.d(n,"serializeMessage",(function(){return Fe})),t.d(n,"deserializeMessage",(function(){return ze})),t.d(n,"createProxyWindow",(function(){return Ue})),t.d(n,"toProxyWindow",(function(){return Be})),t.d(n,"on",(function(){return De})),t.d(n,"once",(function(){return Me})),t.d(n,"send",(function(){return qe})),t.d(n,"markWindowKnown",(function(){return de})),t.d(n,"cleanUpWindow",(function(){return Ve})),t.d(n,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function a(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function u(e){if(void 0===e&&(e=window),e&&!a(e))try{return e.opener}catch(e){}}function c(e){try{return!0}catch(e){}return!1}function s(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=a(e);return r&&c()?s(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function d(e){void 0===e&&(e=window);var n=s(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function f(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e)&&c())return!0}catch(e){}try{if(s(e)===s(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(i(e)&&c())return!0;if(d(window)===d(e))return!0}catch(e){}return!1}function l(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function h(e,n){if(!e||!n)return!1;var t=a(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function p(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}var w=[],v=[];function m(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==o}if(n&&f(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(w,e);if(-1!==t){var r=v[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function y(e){return void 0===e&&(e=window),u(e=e||window)||a(e)||void 0}function g(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(r(n))return!1;if(Array.isArray(n))return!1}return r(e)?r(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!r(n)&&e.some((function(e){return g(e,n)})))}function E(e){try{if(e===window)return!0}catch(e){if(e&&e.message===o)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===o)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function P(e){try{e.close()}catch(e){}}function b(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var _,O=[],T=[],S=0;function x(){if(!S&&_){var e=_;_=null,e.resolve()}}function I(){S+=1}function R(){S-=1,x()}var N=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,a=!1;I();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return R(),void this.reject(e)}R(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===O.indexOf(e)){O.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<T.length;t++)T[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,I();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):b(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,R()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:b(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!b(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];b(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return T.push(e),{cancel:function(){T.splice(T.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;I();try{o=n.apply(t,r||[])}catch(n){return R(),e.reject(n)}return R(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||b(n)},e.flush=function(){return n=_=_||new e,x(),n;var n},e}();function C(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var k,j=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(E(r)&&m(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!E(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=C(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=C(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=C(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==C(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function W(e){return e.name||e.__name__||e.displayName||"anonymous"}function A(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function L(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function D(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(k=k||new j,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=k.get(e);return n||(n=typeof e+":"+L(),k.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function M(){return{}}var q=0,F=0;function z(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=q;q+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<F&&(t=null,r=null,u=q,q+=1),s=i?(r=r||new j).getOrSet(this,M):t=t||{};var d=D(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},A(c,(n.name||W(e))+"::memoized")}function U(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=D(i);return n.hasOwnProperty(u)||(n[u]=N.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},A(t,W(e)+"::promiseMemoized")}function B(){}function Y(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+Y(e,n+1)}}function H(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function G(e){return"[object RegExp]"==={}.toString.call(e)}function V(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function J(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}z.clear=function(){F=q},z((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})),z((function(){return new N((function(e){if(J()||$())return e();var n=setInterval((function(){if(J()||$())return clearInterval(n),e()}),10)}))}));var Z="undefined"!=typeof document?document.currentScript:null,X=z((function(){if(Z)return Z;if(Z=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return Z;throw new Error("Can not determine current script")})),K=L();function Q(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}z((function(){var e;try{e=X()}catch(e){return K}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=L(),e.setAttribute("data-uid-auto",n)),n}));var ee=function(){return{}};function ne(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),V(Q(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return V(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var te,re=function(){};function oe(){var e=Q();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new re,e.WINDOW_WILDCARD}function ie(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),ne("windowStore").getOrSet(e,(function(){var t=new j,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return V(r(n),e,t)}}}))}function ae(){return ne("instance").getOrSet("instanceID",L)}function ue(e,n){var t=n.domain,r=ie("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=N.resolve({domain:t});return r.set(e,i),i}function ce(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ae()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return ue(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function se(e,n){var t=n.send;return ie("windowInstanceIDPromises").getOrSet(e,(function(){return ce(e,{send:t}).then((function(e){return e.instanceID}))}))}function de(e){ie("knownWindows").set(e,!0)}function fe(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function le(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function he(e,n){return{__type__:e,__val__:n}}var pe,we=((te={}).function=function(){},te.error=function(e){return he("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},te.promise=function(){},te.regex=function(e){return he("regex",e.source)},te.date=function(e){return he("date",e.toJSON())},te.array=function(e){return e},te.object=function(e){return e},te.string=function(e){return e},te.number=function(e){return e},te.boolean=function(e){return e},te.null=function(e){return e},te),ve={},me=((pe={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},pe.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+"\n\n"+o.stack,o},pe.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},pe.regex=function(e){return new RegExp(e)},pe.date=function(e){return new Date(e)},pe.array=function(e){return e},pe.object=function(e){return e},pe.string=function(e){return e},pe.number=function(e){return e},pe.boolean=function(e){return e},pe.null=function(e){return e},pe),ye={};function ge(){for(var e=ne("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Ee(e,n){var t=n.send,r=n.id,o=void 0===r?L():r,i=e.then((function(e){if(f(e))return l(e).name})),a=e.then((function(e){if(m(e))throw new Error("Window is closed, can not determine type");return u(e)?"popup":"iframe"}));return i.catch(B),a.catch(B),{id:o,getType:function(){return a},getInstanceID:U((function(){return e.then((function(e){return se(e,{send:t})}))})),close:function(){return e.then(P)},getName:function(){return e.then((function(e){if(!m(e))return f(e)?l(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return m(e)}))},setLocation:function(n){return e.then((function(e){var t=window.location.protocol+"//"+window.location.host;if(0===n.indexOf("/"))n=""+t+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(t))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){var t=f(e),r=function(e){if(f(e))return l(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);l(e).name=n,r&&r.setAttribute("name",n),i=N.resolve(n)}))}}}new N((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));var Pe=function(){function e(e){var n=e.send,t=e.win,r=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new N,this.serializedWindow=r||Ee(this.actualWindowPromise,{send:n}),ne("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then((function(e){return"popup"===e}))},n.setLocation=function(e){var n=this;return this.serializedWindow.setLocation(e).then((function(){return n}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=N.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return N.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Ee(this.actualWindowPromise,{send:t,id:this.getID()}),ie("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return N.try((function(){return t.actualWindow?e===t.actualWindow:N.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:se(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&m(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return ge(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return ge(),ne("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!E(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(ge(),e.isProxyWindow(n))return n;var o=n;return ie("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function be(e,n,t,r,o){var i=ie("methodStore"),a=ne("proxyWindowMethods");Pe.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,(function(){return{}}))[e]={domain:o,name:t,val:n,source:r})}function _e(e,n){var t=ie("methodStore"),r=ne("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Oe(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,ne("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=_e(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+d(window));var c=a.source,s=a.domain,f=a.val;return N.try((function(){if(!g(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(G(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+d(window));if(Pe.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+d(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return N.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n,t;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),(t=n,[].slice.call(t)).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||L();e=Pe.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),Pe.isProxyWindow(e)?(be(c,t,s,e,n),e.awaitWindow().then((function(e){be(c,t,s,e,n)}))):be(c,t,s,e,n),he("cross_domain_function",{id:c,name:s})}function Te(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=ve);var t=JSON.stringify(e,(function(e){var t=this[e];if(fe(this))return t;var r=le(t);if(!r)return t;var o=n[r]||we[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 he("cross_domain_zalgo_promise",{then:Oe(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 Oe(e,n,t,r,{on:i,send:a})},o.object=function(e){return E(e)||Pe.isProxyWindow(e)?he("cross_domain_window",Pe.serialize(e,{send:a})):e},o))}function Se(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=ye),"undefined"!==e)return JSON.parse(e,(function(e,t){if(fe(this))return t;var r,o;if(fe(t)?(r=t.__type__,o=t.__val__):(r=le(t),o=t),!r)return o;var i=n[r]||me[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new N(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 Pe.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=_e(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:d()},u);var s=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:s},{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},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Pe.deserialize(e,{send:i})},o))}var xe={};function Ie(e,n,t,r){var o=r.on,i=r.send;return N.try((function(){var r=ie().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||N.flush().then((function(){if(m(e))throw new Error("Window is closed");var t,a=Te(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(xe),c=[],s=0;s<u.length;s++){var d=u[s];try{xe[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+Y(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(B)}function Re(e){return ne("responseListeners").get(e)}function Ne(e){ne("responseListeners").del(e)}function Ce(e){return ne("erroredResponseListeners").has(e)}function ke(e){var n=e.name,t=e.win,r=e.domain,o=ie("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,oe()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],h=l.listener;if(g(l.regex,r))return h}}if(s["*"])return s["*"]}}}}}function je(e,n,t,r){var o=r.on,i=r.send,a=ke({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return N.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+d()+"\n\n"+Y(e))}}))}return N.all([N.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+d()+"\n\n"+Y(e))}})),N.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(a.domain,n))throw new Error("Request origin "+n+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(B).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function We(e,n,t){if(!Ce(t.hash)){var r=Re(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}function Ae(e,n,t){if(!Ce(t.hash)){var o,i=Re(t.hash);if(!i)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,n))throw new Error("Response origin "+n+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":r(o)?"RegExp("+o.toString():o.toString()));if(e!==i.win)throw new Error("Response source does not match registered window");Ne(t.hash),"error"===t.ack?i.promise.reject(t.error):"success"===t.ack&&i.promise.resolve({source:e,origin:n,data:t.data})}}function Le(e,n){var t=n.on,r=n.send,o=ne("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=Se(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_10_0_42__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){de(i);for(var c=0;c<u.length;c++){var s=u[c];if(o.has(s.id))return;if(o.set(s.id,!0),m(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?je(i,a,s,{on:t,send:r}):"postrobot_message_response"===s.type?Ae(i,a,s):"postrobot_message_ack"===s.type&&We(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function De(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=t||n.handler;var r=n.window,o=n.domain,i=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=ie("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var u=[],c=0,s=o;c<s.length;c++)u.push(e({name:r,domain:i,win:s[c]},t));return{cancel:function(){for(var e=0;e<u.length;e++)u[e].cancel()}}}if(Array.isArray(i)){for(var d=[],f=0,l=i;f<l.length;f++)d.push(e({name:r,win:o,domain:l[f]},t));return{cancel:function(){for(var e=0;e<d.length;e++)d[e].cancel()}}}var h=ke({name:r,win:o,domain:i});if(o&&"*"!==o||(o=oe()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===oe()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===oe()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var p,w,v=a.getOrSet(o,(function(){return{}})),m=V(v,r,(function(){return{}})),y=i.toString();return G(i)?(p=V(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[y]=t,{cancel:function(){delete m[y],w&&(p.splice(p.indexOf(w,1)),p.length||delete m.__domain_regex__),Object.keys(m).length||delete v[r],o&&!Object.keys(v).length&&a.del(o)}}}({name:e,win:r,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:r,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}function Me(e,n,t){"function"==typeof(n=n||{})&&(t=n,n={});var r,o=new N;return n.errorHandler=function(e){r.cancel(),o.reject(e)},r=De(e,n,(function(e){if(r.cancel(),o.resolve(e),t)return t(e)})),o.cancel=r.cancel,o}xe.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)};var qe=function e(n,t,r,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,c=o.timeout||5e3,s=o.fireAndForget||!1;return N.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!G(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(m(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=y(n);if(t)return t===e;if(n===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(a(e)===e)return e;try{if(h(window,e)&&window.top)return window.top}catch(e){}try{if(h(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=function e(n){for(var t=[],r=0,o=p(n);r<o.length;r++){var i=o[r];t.push(i);for(var a=0,u=e(i);a<u.length;a++)t.push(u[a])}return t}(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(a(r)===r)return r}}(n)===n)return!1;for(var r=0,o=p(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return function(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return ie("helloPromises").getOrSet(e,(function(){return new N}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}(n,c)})).then((function(t){return function(e,n,t,r){var o=r.send;return N.try((function(){return"string"==typeof n?n:N.try((function(){return t||ce(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!g(n,n))throw new Error("Domain "+H(n)+" does not match "+H(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i,a=o,c="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,f=new N,l=t+"_"+L();if(!s){var h={name:t,win:n,domain:a,promise:f};!function(e,n){ne("responseListeners").set(e,n)}(l,h);var p=ie("requestPromises").getOrSet(n,(function(){return[]}));p.push(f),f.catch((function(){!function(e){ne("erroredResponseListeners").set(e,!0)}(l),Ne(l)}));var w=function(e){return ie("knownWindows").get(e,!1)}(n)?1e4:2e3,v=u,y=w,g=v,E=(function e(){i=setTimeout((function(){m(n)?f.reject(new Error("Window closed for "+t+" before "+(h.ack?"response":"ack"))):h.cancelled?f.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==g&&(g=Math.max(g-500,0)),h.ack||0!==y?0===g&&f.reject(new Error("No response for postMessage "+c+" in "+d()+" in "+v+"ms")):f.reject(new Error("No ack for postMessage "+c+" in "+d()+" in "+w+"ms"))),e()}),500)}(),{cancel:function(){clearTimeout(i)}});f.finally((function(){E.cancel(),p.splice(p.indexOf(f,1))})).catch(B)}return Ie(n,a,{id:L(),origin:d(window),type:"postrobot_message_request",hash:l,name:t,data:r,fireAndForget:s},{on:De,send:e}).then((function(){return s?f.resolve():f}),(function(e){throw new Error("Send request message failed for "+c+" in "+d()+"\n\n"+Y(e))}))}))};function Fe(e,n,t){return Te(e,n,t,{on:De,send:qe})}function ze(e,n,t){return Se(e,n,t,{on:De,send:qe})}function Ue(e){return new Pe({send:qe,win:e})}function Be(e){return Pe.toProxyWindow(e,{send:qe})}function Ye(){var e,n,t,r;Q().initialized||(Q().initialized=!0,n=(e={on:De,send:qe}).on,t=e.send,(r=Q()).receiveMessage=r.receiveMessage||function(e){return Le(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;ne().getOrSet("postMessageListener",(function(){return(e=window).addEventListener("message",r=function(e){!function(e,n){var t=n.on,r=n.send;N.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");Le({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}),{cancel:function(){e.removeEventListener("message",r)}};var e,r}))}({on:De,send:qe}),function(e){var n=e.on,t=e.send;ne("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ue(e.source,{domain:e.origin}),{instanceID:ae()}})),r=y();return r&&ce(r,{send:t}).catch((function(e){})),e}))}({on:De,send:qe}))}function He(){var e;!function(){for(var e=ne("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(e=ne().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_42__}var Ge=!0;function Ve(e){for(var n=0,t=ie("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(m(e)?"closed":"cleaned up")+" before response")).catch(B)}Ye()}])},e.exports=t()})),k=i(C),j=u(Object.assign({__proto__:null,default:k,__moduleExports:C},k)),W=a((function(e){e.exports=j,e.exports.default=e.exports})),A=i(a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function a(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}t.r(n),t.d(n,"PopupOpenError",(function(){return Ue})),t.d(n,"create",(function(){return zt})),t.d(n,"destroy",(function(){return Yt})),t.d(n,"destroyComponents",(function(){return Ut})),t.d(n,"destroyAll",(function(){return Bt})),t.d(n,"PROP_TYPE",(function(){return wt})),t.d(n,"PROP_SERIALIZATION",(function(){return vt})),t.d(n,"CONTEXT",(function(){return mt})),t.d(n,"EVENT",(function(){return yt}));var u,c=[],s=[],d=0;function f(){if(!d&&u){var e=u;u=null,e.resolve()}}function l(){d+=1}function h(){d-=1,f()}var p=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,a=!1;l();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return h(),void this.reject(e)}h(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===c.indexOf(e)){c.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<s.length;t++)s[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,l();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var u=r[i],c=u.onSuccess,s=u.onError,d=u.promise,f=void 0;if(n)try{f=c?c(this.value):this.value}catch(e){d.reject(e);continue}else if(t){if(!s){d.reject(this.error);continue}try{f=s(this.error)}catch(e){d.reject(e);continue}}if(f instanceof e&&(f.resolved||f.rejected)){var p=f;p.resolved?d.resolve(p.value):d.reject(p.error),p.errorHandled=!0}else a(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):o(f,d):d.resolve(f)}r.length=0,this.dispatching=!1,h()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:a(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[].slice();if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof e){if(c.resolved){o[u]=c.value,r-=1;continue}}else if(!a(c)){o[u]=c,r-=1;continue}i(u,e.resolve(c),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];a(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return s.push(e),{cancel:function(){s.splice(s.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;l();try{o=n.apply(t,r||[])}catch(n){return h(),e.reject(n)}return h(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||a(n)},e.flush=function(){return n=u=u||new e,f(),n;var n},e}();function w(e){return"[object RegExp]"==={}.toString.call(e)}var v={IFRAME:"iframe",POPUP:"popup"},m="Call was rejected by callee.\r\n";function y(e){return void 0===e&&(e=window),e.location.protocol}function g(e){if(void 0===e&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return y(e)}function E(e){return void 0===e&&(e=window),"about:"===g(e)}function P(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function b(e){if(void 0===e&&(e=window),e&&!P(e))try{return e.opener}catch(e){}}function _(e){try{return!0}catch(e){}return!1}function O(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=y(e);if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=P(e);return r&&_()?O(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function T(e){void 0===e&&(e=window);var n=O(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function S(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(E(e)&&_())return!0}catch(e){}try{if(function(e){return void 0===e&&(e=window),"mock:"===g(e)}(e)&&_())return!0}catch(e){}try{if(O(e)===O(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(E(e)&&_())return!0;if(T(window)===T(e))return!0}catch(e){}return!1}function x(e){if(!S(e))throw new Error("Expected window to be same domain");return e}function I(e,n){if(!e||!n)return!1;var t=P(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function R(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}function N(e){for(var n=[],t=0,r=R(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,a=N(o);i<a.length;i++)n.push(a[i])}return n}function C(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(P(e)===e)return e;try{if(I(window,e)&&window.top)return window.top}catch(e){}try{if(I(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=N(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(P(r)===r)return r}}function k(e){var n=C(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(N(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],N(e))),t}var j=[],W=[];function A(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==m}if(n&&S(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(j,e);if(-1!==t){var r=W[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function L(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function D(e,n){for(var t=R(e),r=0;r<t.length;r++){var o=t[r];try{if(S(o)&&o.name===n&&-1!==t.indexOf(o))return o}catch(e){}}try{if(-1!==t.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==t.indexOf(e[n]))return e[n]}catch(e){}}function M(e,n){return e===b(n)}function q(e){return void 0===e&&(e=window),b(e=e||window)||P(e)||void 0}function F(e,n){for(var t=0;t<e.length;t++)for(var r=e[t],o=0;o<n.length;o++)if(r===n[o])return!0;return!1}function z(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=P(t))&&(n+=1);return n}function U(e,n){var t=C(e)||e,r=C(n)||n;try{if(t&&r)return t===r}catch(e){}var o=k(e),i=k(n);if(F(o,i))return!0;var a=b(t),u=b(r);return a&&F(k(a),i)||u&&F(k(u),o),!1}function B(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(w(n))return!1;if(Array.isArray(n))return!1}return w(e)?w(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!w(n)&&e.some((function(e){return B(e,n)})))}function Y(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):T()}function H(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(A(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function G(e){try{if(e===window)return!0}catch(e){if(e&&e.message===m)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===m)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function V(e){if(0!==Y(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function J(e){if(S(e))return x(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}function $(e){if(function(e){return void 0===e&&(e=window),Boolean(P(e))}(e)){var n=J(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}}function Z(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var X,K=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(G(r)&&A(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!G(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=Z(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=Z(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=Z(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==Z(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ne(e,n,t){return(ne=ee()?Reflect.construct:function(e,n,t){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return t&&r(i,t.prototype),i}).apply(null,arguments)}function te(e){var n="function"==typeof Map?new Map:void 0;return(te=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return ne(e,arguments,Q(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r(t,e)})(e)}function re(e){var n=!1;try{(e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument)&&(n=!0)}catch(e){}return n}function oe(e){return e.name||e.__name__||e.displayName||"anonymous"}function ie(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ae(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))}))).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function ue(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ae((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ce(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(X=X||new K,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=X.get(e);return n||(n=typeof e+":"+ue(),X.set(e,n)),n}(n)+"]":re(n)?{}:n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function se(){return{}}var de=0,fe=0;function le(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=de;de+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s,d;u<fe&&(t=null,r=null,u=de,de+=1),s=i?(r=r||new K).getOrSet(this,se):t=t||{};try{d=ce(o)}catch(n){return e.apply(this,arguments)}var f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},ie(c,(n.name||oe(e))+"::memoized")}function he(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=ce(i);return n.hasOwnProperty(u)||(n[u]=p.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ie(t,oe(e)+"::promiseMemoized")}function pe(){}function we(e){var n=!1;return ie((function(){if(!n)return n=!0,e.apply(this,arguments)}),oe(e)+"::once")}function ve(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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 me(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function ye(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 ge(e){return e}function Ee(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Pe(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function be(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function _e(e){return[].slice.call(e)}function Oe(e){return"object"==typeof(n=e)&&null!==n&&"[object Object]"==={}.toString.call(e);var n}function Te(e){if(!Oe(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!Oe(t)&&!!t.hasOwnProperty("isPrototypeOf")}function Se(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){be(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(Te(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return"continue";be(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function xe(e){return null!=e}function Ie(e){return"[object RegExp]"==={}.toString.call(e)}function Re(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Ne(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=we((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(pe)}};return o}function Ce(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}le.clear=function(){fe=de},le((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 ke=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}(te(Error));function je(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function We(){return Boolean(document.body)&&"complete"===document.readyState}function Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Le(e){return encodeURIComponent(e)}function De(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<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}.apply(void 0,r)}(De,0,[e])}function Me(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(t=i({},De(e),n))&&(t={}),Object.keys(t).filter((function(e){return"string"==typeof t[e]||"boolean"==typeof t[e]})).map((function(e){var n=t[e];if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("Invalid type for query");return Le(e)+"="+Le(n.toString())})).join("&")):e;var t}function qe(e,n){return void 0===n&&(n=document),re(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Fe(e){return new p((function(n,t){var r=me(e),o=qe(e);if(o)return n(o);if(We())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){if(o=qe(e))n(o),clearInterval(i);else if(We())return clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))}),10)}))}le((function(){return new p((function(e){if(We()||Ae())return e();var n=setInterval((function(){if(We()||Ae())return clearInterval(n),e()}),10)}))}));var ze,Ue=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),n}(ke);function Be(e){if((ze=ze||new K).has(e)){var n=ze.get(e);if(n)return n}var t=new p((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<j.length;e++){var n=!1;try{n=j[e].closed}catch(e){}n&&(W.splice(e,1),j.splice(e,1))}}(),e&&e.contentWindow)try{j.push(e.contentWindow),W.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ze.set(e,t),t}function Ye(e){return Be(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function He(e,n){void 0===e&&(e={});var t=e.style||{},r=function(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r,o,i,a=document.createElement(e);if(n.style&&ye(a.style,n.style),n.class&&(a.className=n.class.join(" ")),n.id&&a.setAttribute("id",n.id),n.attributes)for(var u=0,c=Object.keys(n.attributes);u<c.length;u++){var s=c[u];a.setAttribute(s,n.attributes[s])}if(n.styleSheet&&(r=a,o=n.styleSheet,void 0===i&&(i=window.document),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");a.innerHTML=n.html}return a}("iframe",{attributes:i({allowTransparency:"true"},e.attributes||{}),style:i({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",ue()),Be(r),n&&function(e,n){void 0===n&&(n=document);var t=qe(e,n);if(t)return t;throw new Error("Can not find element: "+me(e))}(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function Ge(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Ve(e){e.style.setProperty("display","")}function Je(e){e.style.setProperty("display","none","important")}function $e(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ze(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Xe(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,v,m=function(){if(!p&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==h)&&n({width:t,height:r}),l=t,h=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=Ee(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=Ee(m,10*s)):v=Ee(m,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Ke(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Qe="undefined"!=typeof document?document.currentScript:null,en=le((function(){if(Qe)return Qe;if(Qe=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return Qe;throw new Error("Can not determine current script")})),nn=ue();function tn(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function rn(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function on(e){return rn(e)+"px"}function an(e){return"number"==typeof e?on(e):tn(e)?e:on(e)}function un(e,n){if("number"==typeof e)return e;if(tn(e))return parseInt(n*rn(e)/100,10);if("string"==typeof(t=e)&&/^[0-9]+px$/.test(t))return rn(e);var t;throw new Error("Can not normalize dimension: "+e)}function cn(e){void 0===e&&(e=window);var n="__post_robot_11_0_0__";return e!==window?e[n]:e[n]=e[n]||{}}le((function(){var e;try{e=en()}catch(e){return nn}var n=e.getAttribute("data-uid");if(n&&"string"==typeof n)return n;if((n=e.getAttribute("data-uid-auto"))&&"string"==typeof n)return n;if(e.src){var t=function(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=ue();return e.setAttribute("data-uid-auto",n),n}));var sn=function(){return{}};function dn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),Re(cn(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return Re(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var fn,ln=function(){};function hn(){var e=cn();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new ln,e.WINDOW_WILDCARD}function pn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),dn("windowStore").getOrSet(e,(function(){var t=new K,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return Re(r(n),e,t)}}}))}function wn(){return dn("instance").getOrSet("instanceID",ue)}function vn(e,n){var t=n.domain,r=pn("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=p.resolve({domain:t});return r.set(e,i),i}function mn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:wn()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return vn(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function yn(e,n){var t=n.send;return pn("windowInstanceIDPromises").getOrSet(e,(function(){return mn(e,{send:t}).then((function(e){return e.instanceID}))}))}function gn(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return pn("helloPromises").getOrSet(e,(function(){return new p}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function En(e){pn("knownWindows").set(e,!0)}function Pn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function bn(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function _n(e,n){return{__type__:e,__val__:n}}var On,Tn=((fn={}).function=function(){},fn.error=function(e){return _n("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},fn.promise=function(){},fn.regex=function(e){return _n("regex",e.source)},fn.date=function(e){return _n("date",e.toJSON())},fn.array=function(e){return e},fn.object=function(e){return e},fn.string=function(e){return e},fn.number=function(e){return e},fn.boolean=function(e){return e},fn.null=function(e){return e},fn[void 0]=function(e){return _n("undefined",e)},fn),Sn={},xn=((On={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},On.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+"\n\n"+o.stack,o},On.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},On.regex=function(e){return new RegExp(e)},On.date=function(e){return new Date(e)},On.array=function(e){return e},On.object=function(e){return e},On.string=function(e){return e},On.number=function(e){return e},On.boolean=function(e){return e},On.null=function(e){return e},On[void 0]=function(){},On),In={};function Rn(){return!!L(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Nn(e){return!U(window,e)}function Cn(e,n){if(e){if(T()!==Y(e))return!0}else if(n&&!S(n))return!0;return!1}function kn(e){var n=e.win,t=e.domain;return!(!Rn()||t&&!Cn(t,n)||n&&!Nn(n))}function jn(e){return"__postrobot_bridge___"+(e=e||Y(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Wn(){return Boolean(window.name&&window.name===jn(T()))}var An=new p((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));function Ln(e){pn("remoteWindowPromises").getOrSet(e,(function(){return new p}))}function Dn(e){var n=pn("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function Mn(e,n,t){Dn(e).resolve((function(r,o,i){if(r!==e)throw new Error("Remote window does not match window");if(!B(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);t.fireAndForget(i)}))}function qn(e,n){Dn(e).reject(n).catch(pe)}function Fn(e){for(var n=e.win,t=e.name,r=e.domain,o=dn("popupWindowsByName"),i=pn("popupWindowsByWin"),a=0,u=o.keys();a<u.length;a++){var c=u[a],s=o.get(c);s&&!A(s.win)||o.del(c)}if(A(n))return{win:n,name:t,domain:r};var d=i.getOrSet(n,(function(){return t?o.getOrSet(t,(function(){return{win:n,name:t}})):{win:n}}));if(d.win&&d.win!==n)throw new Error("Different window already linked for window: "+(t||"undefined"));return t&&(d.name=t,o.set(t,d)),r&&(d.domain=r,Ln(n)),i.set(n,d),d}function zn(e){var n,t=e.on,r=e.send,o=e.receiveMessage;n=window.open,window.open=function(e,t,r,o){var i=n.call(this,V(e),t,r,o);return i?(Fn({win:i,name:t,domain:e?Y(e):null}),i):i},function(e){var n=e.on,t=e.send,r=e.receiveMessage,o=dn("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,a=e.origin,u=e.data,c=dn("bridges").get(a);if(!c)throw new Error("Can not find bridge promise for domain "+a);return c.then((function(e){if(i!==e)throw new Error("Message source does not matched registered bridge for domain "+a);if(!u.name)throw new Error("Register window expected to be passed window name");if(!u.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(u.name))throw new Error("Window with name "+u.name+" does not exist, or was not opened by this window");var c=function(){return o.get(u.name)};if(!c().domain)throw new Error("We do not have a registered domain for window "+u.name);if(c().domain!==a)throw new Error("Message origin "+a+" does not matched registered window origin "+(c().domain||"unknown"));return Mn(c().win,a,u.sendMessage),{sendMessage:function(e){if(window&&!window.closed&&c()){var o=c().domain;if(o)try{r({data:e,origin:o,source:c().win},{on:n,send:t})}catch(e){p.reject(e)}}}}}))}))}({on:t,send:r,receiveMessage:o}),function(e){var n=e.send;cn(window).openTunnelToParent=function(e){var t=e.name,r=e.source,o=e.canary,i=e.sendMessage,a=dn("tunnelWindows"),u=P(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(e){var n=e.name,t=e.source,r=e.canary,o=e.sendMessage;!function(){for(var e=dn("tunnelWindows"),n=0,t=e.keys();n<t.length;n++){var r=t[n];A(e[r].source)&&e.del(r)}}();var i=ue();return dn("tunnelWindows").set(i,{name:n,source:t,canary:r,sendMessage:o}),i}({name:t,source:r,canary:o,sendMessage:i});return n(u,"postrobot_open_tunnel",{name:t,sendMessage:function(){var e=a.get(c);if(e&&e.source&&!A(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:r}),function(e){var n=e.on,t=e.send,r=e.receiveMessage;p.try((function(){var e,o=b(window);if(o&&kn({win:o}))return Ln(o),(e=o,pn("remoteBridgeAwaiters").getOrSet(e,(function(){return p.try((function(){var n=D(e,jn(T()));if(n)return S(n)&&cn(x(n))?n:new p((function(e){var t,r;t=setInterval((function(){if(n&&S(n)&&cn(x(n)))return clearInterval(t),clearTimeout(r),e(n)}),100),r=setTimeout((function(){return clearInterval(t),e()}),2e3)}))}))}))).then((function(e){return e?window.name?cn(x(e)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{window}catch(e){return}if(window&&!window.closed)try{r({data:e,origin:this.origin,source:this.source},{on:n,send:t})}catch(e){p.reject(e)}}}).then((function(e){var n=e.source,t=e.origin,r=e.data;if(n!==o)throw new Error("Source does not match opener");Mn(n,t,r.sendMessage)})).catch((function(e){throw qn(o,e),e})):qn(o,new Error("Can not register with opener: window does not have a name")):qn(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:t,send:r,receiveMessage:o})}function Un(){for(var e=dn("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Bn(e,n){var t=n.send,r=n.id,o=void 0===r?ue():r,i=e.then((function(e){if(S(e))return x(e).name})),a=e.then((function(e){if(A(e))throw new Error("Window is closed, can not determine type");return b(e)?v.POPUP:v.IFRAME}));i.catch(pe),a.catch(pe);var u=function(){return e.then((function(e){if(!A(e))return S(e)?x(e).name:i}))};return{id:o,getType:function(){return a},getInstanceID:he((function(){return e.then((function(e){return yn(e,{send:t})}))})),close:function(){return e.then($)},getName:u,focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return A(e)}))},setLocation:function(n,t){return void 0===t&&(t={}),e.then((function(e){var r=window.location.protocol+"//"+window.location.host,o=t.method,i=void 0===o?"get":o,a=t.body;if(0===n.indexOf("/"))n=""+r+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if("post"===i)return u().then((function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var n=e.url,t=e.target,r=e.body,o=e.method,i=void 0===o?"post":o,a=document.createElement("form");if(a.setAttribute("target",t),a.setAttribute("method",i),a.setAttribute("action",n),a.style.display="none",r)for(var u=0,c=Object.keys(r);u<c.length;u++){var s,d=c[u],f=document.createElement("input");f.setAttribute("name",d),f.setAttribute("value",null==(s=r[d])?void 0:s.toString()),a.appendChild(f)}je().appendChild(a),a.submit(),je().removeChild(a)}({url:n,target:e,method:i,body:a})}));if("get"!==i)throw new Error("Unsupported method: "+i);if(S(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){Fn({win:e,name:n});var t=S(e),r=J(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);x(e).name=n,r&&r.setAttribute("name",n),i=p.resolve(n)}))}}}var Yn=function(){function e(e){var n=e.send,t=e.win,r=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new p,this.serializedWindow=r||Bn(this.actualWindowPromise,{send:n}),dn("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then((function(e){return e===v.POPUP}))},n.setLocation=function(e,n){var t=this;return this.serializedWindow.setLocation(e,n).then((function(){return t}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=p.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n,"noopener")})),o=this.serializedWindow.focus();return p.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Bn(this.actualWindowPromise,{send:t,id:this.getID()}),pn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return p.try((function(){return t.actualWindow?e===t.actualWindow:p.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:yn(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&A(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return Un(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return Un(),dn("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!G(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(Un(),e.isProxyWindow(n))return n;var o=n;return pn("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function Hn(e,n,t,r,o){var i=pn("methodStore"),a=dn("proxyWindowMethods");Yn.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,(function(){return{}}))[e]={domain:o,name:t,val:n,source:r})}function Gn(e,n){var t=pn("methodStore"),r=dn("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Vn(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,dn("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=Gn(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+T(window));var c=a.source,s=a.domain,d=a.val;return p.try((function(){if(!B(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(Ie(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+T(window));if(Yn.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+T(window))}))})).then((function(){return d.apply({source:n,origin:t},r.args)}),(function(e){return p.try((function(){if(d.onError)return d.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),_e(n).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||ue();e=Yn.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),Yn.isProxyWindow(e)?(Hn(c,t,s,e,n),e.awaitWindow().then((function(e){Hn(c,t,s,e,n)}))):Hn(c,t,s,e,n),_n("cross_domain_function",{id:c,name:s})}function Jn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=Sn);var t=JSON.stringify(e,(function(e){var t=this[e];if(Pn(this))return t;var r=bn(t);if(!r)return t;var o=n[r]||Tn[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 _n("cross_domain_zalgo_promise",{then:Vn(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 Vn(e,n,t,r,{on:i,send:a})},o.object=function(e){return G(e)||Yn.isProxyWindow(e)?_n("cross_domain_window",Yn.serialize(e,{send:a})):e},o))}function $n(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=In),"undefined"!==e)return JSON.parse(e,(function(e,t){if(Pn(this))return t;var r,o;if(Pn(t)?(r=t.__type__,o=t.__val__):(r=bn(t),o=t),!r)return o;var i=n[r]||xn[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 Yn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=Gn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:T()},u);var s=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:s},{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},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Yn.deserialize(e,{send:i})},o))}var Zn={};function Xn(e,n,t,r){var o=r.on,i=r.send;return p.try((function(){var r=pn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||p.flush().then((function(){if(A(e))throw new Error("Window is closed");var t,a=Jn(e,n,((t={}).__post_robot_11_0_0__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(Zn),c=[],s=0;s<u.length;s++){var d=u[s];try{Zn[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+ve(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(pe)}function Kn(e){return dn("responseListeners").get(e)}function Qn(e){dn("responseListeners").del(e)}function et(e){return dn("erroredResponseListeners").has(e)}function nt(e){var n=e.name,t=e.win,r=e.domain,o=pn("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,hn()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],h=l.listener;if(B(l.regex,r))return h}}if(s["*"])return s["*"]}}}}}function tt(e,n){var t=n.on,r=n.send,o=dn("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=$n(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_11_0_0__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){En(i);for(var c=function(){var e=u[s];if(o.has(e.id))return{v:void 0};if(o.set(e.id,!0),A(i)&&!e.fireAndForget)return{v:void 0};0===e.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===e.type?function(e,n,t,r){var o=r.on,i=r.send,a=nt({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return p.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+T()+"\n\n"+ve(e))}}))}p.all([p.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+T()+"\n\n"+ve(e))}})),p.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(pe).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}(i,a,e,{on:t,send:r}):"postrobot_message_response"===e.type?function(e,n,t){if(!et(t.hash)){var r,o=Kn(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!B(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(r=o.domain,Array.isArray(r)?"("+r.join(" | ")+")":w(r)?"RegExp("+r.toString()+")":r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Qn(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}(i,a,e):"postrobot_message_ack"===e.type&&function(e,n,t){if(!et(t.hash)){var r=Kn(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!B(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}(i,a,e)}catch(e){setTimeout((function(){throw e}),0)}},s=0;s<u.length;s++){var d=c();if("object"==typeof d)return d.v}}}function rt(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");var r=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=pn("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(o&&"*"!==o&&Yn.isProxyWindow(o)){var u=o.awaitWindow().then((function(n){return e({name:r,win:n,domain:i},t)}));return{cancel:function(){u.then((function(e){return e.cancel()}),pe)}}}var c=o;if(Array.isArray(c)){for(var s=[],d=0,f=c;d<f.length;d++)s.push(e({name:r,domain:i,win:f[d]},t));return{cancel:function(){for(var e=0;e<s.length;e++)s[e].cancel()}}}if(Array.isArray(i)){for(var l=[],h=0,p=i;h<p.length;h++)l.push(e({name:r,win:c,domain:p[h]},t));return{cancel:function(){for(var e=0;e<l.length;e++)l[e].cancel()}}}var w=nt({name:r,win:c,domain:i});c&&"*"!==c||(c=hn());var v=(i=i||"*").toString();if(w)throw c&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(c===hn()?"wildcard":"specified")+" window"):c?new Error("Request listener already exists for "+r+" for "+(c===hn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var m,y,g=a.getOrSet(c,(function(){return{}})),E=Re(g,r,(function(){return{}}));return Ie(i)?(m=Re(E,"__domain_regex__",(function(){return[]}))).push(y={regex:i,listener:t}):E[v]=t,{cancel:function(){delete E[v],y&&(m.splice(m.indexOf(y,1)),m.length||delete E.__domain_regex__),Object.keys(E).length||delete g[r],c&&!Object.keys(g).length&&a.del(c)}}}({name:e,win:n.window,domain:n.domain||"*"},{handler:t||n.handler,handleError:n.errorHandler||function(e){throw e}});return{cancel:function(){r.cancel()}}}Zn.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},Zn.postrobot_bridge=function(e,n,t){if(!Rn()&&!Wn())throw new Error("Bridge not needed for browser");if(S(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==U(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(e,n,t){var r=M(window,e),o=M(e,window);if(!r&&!o)throw new Error("Can only send messages to and from parent and popup windows");Dn(e).then((function(r){return r(e,n,t)}))}(e,t,n)},Zn.postrobot_global=function(e,n){if(!L(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!S(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==U(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=cn(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:T(),data:n})};var ot,it=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return Yn.toProxyWindow(n,{send:e}).awaitWindow().then((function(n){return p.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!Ie(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(A(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=q(n);if(t)return t===e;if(n===e)return!1;if(C(n)===n)return!1;for(var r=0,o=R(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return gn(n,u)})).then((function(t){return function(e,n,t,r){var o=r.send;return p.try((function(){return"string"==typeof n?n:p.try((function(){return t||mn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!B(n,n))throw new Error("Domain "+me(n)+" does not match "+me(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i=o,u="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,s=new p,d=t+"_"+ue();if(!c){var f={name:t,win:n,domain:i,promise:s};!function(e,n){dn("responseListeners").set(e,n)}(d,f);var l=pn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){dn("erroredResponseListeners").set(e,!0)}(d),Qn(d)}));var h=function(e){return pn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=a,v=h,m=w,y=Ee((function(){return A(n)?s.reject(new Error("Window closed for "+t+" before "+(f.ack?"response":"ack"))):f.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(v=Math.max(v-500,0),-1!==m&&(m=Math.max(m-500,0)),f.ack||0!==v?0===m?s.reject(new Error("No response for postMessage "+u+" in "+T()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+T()+" in "+h+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(pe)}return Xn(n,i,{id:ue(),origin:T(window),type:"postrobot_message_request",hash:d,name:t,data:r,fireAndForget:c},{on:rt,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+T()+"\n\n"+ve(e))}))}))}))};function at(e){return Yn.toProxyWindow(e,{send:it})}function ut(e){for(var n=0,t=pn("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(A(e)?"closed":"cleaned up")+" before response")).catch(pe)}function ct(e){if(!S(e))throw new Error("Can not get global for window on different domain");return e.__zoid_10_3_1__||(e.__zoid_10_3_1__={}),e.__zoid_10_3_1__}function st(e,n){try{return n(ct(e))}catch(e){}}function dt(e){return{get:function(){var n=this;return p.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}function ft(e){return ae(JSON.stringify(e))}function lt(e){var n=ct(e);return n.references=n.references||{},n.references}function ht(e){var n,t,r=e.data,o=e.metaData,i=e.sender,a=e.receiver,u=e.passByReference,c=void 0!==u&&u,s=e.basic,d=void 0!==s&&s,f=at(a.win),l=d?JSON.stringify(r):Jn(f,a.domain,r,{on:rt,send:it}),h=c?(n=l,t=ue(),lt(window)[t]=n,{type:"uid",uid:t}):{type:"raw",val:l};return{serializedData:ft({sender:{domain:i.domain},metaData:o,reference:h}),cleanReference:function(){var e,n;e=window,"uid"===(n=h).type&&delete lt(e)[n.uid]}}}function pt(e){var n,t,r=e.sender,o=e.basic,i=void 0!==o&&o,a=function(e){return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(e))}(e.data),u=a.reference,c=a.metaData;n="function"==typeof r.win?r.win({metaData:c}):r.win,t="function"==typeof r.domain?r.domain({metaData:c}):"string"==typeof r.domain?r.domain:a.sender.domain;var s=function(e,n){if("raw"===n.type)return n.val;if("uid"===n.type)return lt(e)[n.uid];throw new Error("Unsupported ref type: "+n.type)}(n,u);return{data:i?JSON.parse(s):function(e,n,t){return $n(e,n,t,{on:rt,send:it})}(n,t,s),metaData:c,sender:{win:n,domain:t},reference:u}}ot={setupBridge:zn,openBridge:function(e,n){var t=dn("bridges"),r=dn("bridgeFrames");return n=n||Y(e),t.getOrSet(n,(function(){return p.try((function(){if(T()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=jn(n);if(D(window,t))throw new Error("Frame with name "+t+" already exists on page");var o=function(e,n){var t=document.createElement("iframe");return t.setAttribute("name",e),t.setAttribute("id",e),t.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),t.setAttribute("frameborder","0"),t.setAttribute("border","0"),t.setAttribute("scrolling","no"),t.setAttribute("allowTransparency","true"),t.setAttribute("tabindex","-1"),t.setAttribute("hidden","true"),t.setAttribute("title",""),t.setAttribute("role","presentation"),t.src=n,t}(t,e);return r.set(n,o),An.then((function(n){n.appendChild(o);var t=o.contentWindow;return new p((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return gn(t,5e3,"Bridge "+e)})).then((function(){return t}))}))}))}))},linkWindow:Fn,linkUrl:function(e,n){Fn({win:e,domain:Y(n)})},isBridge:Wn,needsBridge:kn,needsBridgeForBrowser:Rn,hasBridge:function(e,n){return dn("bridges").has(n||Y(e))},needsBridgeForWin:Nn,needsBridgeForDomain:Cn,destroyBridges:function(){for(var e=dn("bridges"),n=dn("bridgeFrames"),t=0,r=n.keys();t<r.length;t++){var o=n.get(r[t]);o&&o.parentNode&&o.parentNode.removeChild(o)}n.reset(),e.reset()}};var wt={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},vt={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},mt=v,yt={RENDER:"zoid-render",RENDERED:"zoid-rendered",PRERENDER:"zoid-prerender",PRERENDERED:"zoid-prerendered",DISPLAY:"zoid-display",ERROR:"zoid-error",CLOSE:"zoid-close",DESTROY:"zoid-destroy",PROPS:"zoid-props",RESIZE:"zoid-resize",FOCUS:"zoid-focus"};function gt(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function Et(e){if(!e)throw new Error("No window name");var n=e.split("__"),t=n[1],r=n[2],o=n[3];if("zoid"!==t)throw new Error("Window not rendered by zoid - got "+t);if(!r)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:r,serializedInitialPayload:o}}var Pt=le((function(e){var n=pt({data:Et(e).serializedInitialPayload,sender:{win:function(e){return function(e){if("opener"===e.type)return Ce("opener",b(window));if("parent"===e.type&&"number"==typeof e.distance)return Ce("parent",function(e,n){return void 0===n&&(n=1),function(e,n){void 0===n&&(n=1);for(var t=e,r=0;r<n;r++){if(!t)return;t=P(t)}return t}(e,z(e)-n)}(window,e.distance));if("global"===e.type&&e.uid&&"string"==typeof e.uid){var n=e.uid,t=q(window);if(!t)throw new Error("Can not find ancestor window");for(var r=0,o=k(t);r<o.length;r++){var i=o[r];if(S(i)){var a=st(i,(function(e){return e.windows&&e.windows[n]}));if(a)return a}}}else if("name"===e.type){var u=e.name;return Ce("namedWindow",function(e,n){return D(e,n)||function e(n,t){var r=D(n,t);if(r)return r;for(var o=0,i=R(n);o<i.length;o++){var a=e(i[o],t);if(a)return a}}(C(e)||e,n)}(Ce("ancestor",q(window)),u))}throw new Error("Unable to find "+e.type+" parent component window")}(e.metaData.windowRef)}}});return{parent:n.sender,payload:n.data,reference:n.reference}}));function bt(){return Pt(window.name)}function _t(e,n){if(void 0===n&&(n=window),e===P(n))return{type:"parent",distance:z(e)};if(e===b(n))return{type:"opener"};if(S(e)&&(r=e)!==C(r)){var t=x(e).name;if(t)return{type:"name",name:t}}var r}function Ot(e,n,t,r,o){if(!e.hasOwnProperty(t))return r;var i=e[t];return"function"==typeof i.childDecorate?i.childDecorate({value:r,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):r}function Tt(){return p.try((function(){window.focus()}))}function St(){return p.try((function(){window.close()}))}var xt=function(){return pe},It=function(e){return we(e.value)};function Rt(e,n,t){for(var r=0,o=Object.keys(i({},e,n));r<o.length;r++){var a=o[r];t(a,n[a],e[a])}}function Nt(e,n,t){var r={};return p.all(function(e,n,o){var i=[];return Rt(e,n,(function(e,n,o){var a=function(e,n,o){return p.resolve().then((function(){var i,a;if(null!=o&&n){var u=(i={},i.get=n.queryParam,i.post=n.bodyParam,i)[t],c=(a={},a.get=n.queryValue,a.post=n.bodyValue,a)[t];if(u)return p.hash({finalParam:p.try((function(){return"function"==typeof u?u({value:o}):"string"==typeof u?u:e})),finalValue:p.try((function(){return"function"==typeof c&&xe(o)?c({value:o}):o}))}).then((function(t){var o,i=t.finalParam,a=t.finalValue;if("boolean"==typeof a)o=a.toString();else if("string"==typeof a)o=a.toString();else if("object"==typeof a&&null!==a){if(n.serialization===vt.JSON)o=JSON.stringify(a);else if(n.serialization===vt.BASE64)o=ae(JSON.stringify(a));else if(n.serialization===vt.DOTIFY||!n.serialization){o=function e(n,t,r){for(var o in void 0===t&&(t=""),void 0===r&&(r={}),t=t?t+".":t,n)n.hasOwnProperty(o)&&null!=n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every((function(e){return"object"!=typeof e}))?r[""+t+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?r=e(n[o],""+t+o,r):r[""+t+o]=n[o].toString());return r}(a,e);for(var u=0,c=Object.keys(o);u<c.length;u++){var s=c[u];r[s]=o[s]}return}}else"number"==typeof a&&(o=a.toString());r[i]=o}))}}))}(e,n,o);i.push(a)})),i}(n,e)).then((function(){return r}))}function Ct(e){var n,t,r,o,a,u,c,s,d=e.uid,f=e.options,l=e.overrides,h=void 0===l?{}:l,w=e.parentWin,v=void 0===w?window:w,m=f.propsDef,y=f.containerTemplate,g=f.prerenderTemplate,E=f.tag,P=f.name,b=f.attributes,_=f.dimensions,O=f.autoResize,I=f.url,R=f.domain,N=f.exports,C=new p,k=[],j=Ne(),W={},L={},D={visible:!0},M=h.event?h.event:(n={},t={},r={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,n){var t=r.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=t[e],a=[];if(i)for(var u=function(){var e=i[c];a.push(p.try((function(){return e.apply(void 0,r)})))},c=0;c<i.length;c++)u();return p.all(a).then(pe)},triggerOnce:function(e){if(n[e])return p.resolve();n[e]=!0;for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return r.trigger.apply(r,[e].concat(o))},reset:function(){t={}}}),F=h.props?h.props:{},G=h.onError,J=h.getProxyContainer,Z=h.show,X=h.hide,K=h.close,Q=h.renderContainer,ee=h.getProxyWindow,ne=h.setProxyWin,te=h.openFrame,re=h.openPrerenderFrame,oe=h.prerender,ie=h.open,ae=h.openPrerender,ce=h.watchForUnload,se=h.getInternalState,de=h.setInternalState,fe=function(){return"function"==typeof _?_({props:F}):_},he=function(){return p.try((function(){return h.resolveInitPromise?h.resolveInitPromise():C.resolve()}))},ge=function(e){return p.try((function(){return h.rejectInitPromise?h.rejectInitPromise(e):C.reject(e)}))},Pe=function(e){for(var n={},t=0,r=Object.keys(F);t<r.length;t++){var o=r[t],i=m[o];if(!i||!1!==i.sendToChild){var a=i&&i.trustedDomains&&i.trustedDomains.length>0?i.trustedDomains.reduce((function(n,t){return n||B(t,e)}),!1):B(e,T(window));i&&i.sameDomain&&!a||i&&i.trustedDomains&&!a||(n[o]=F[o])}}return p.hash(n)},be=function(){return p.try((function(){return se?se():D}))},Oe=function(e){return p.try((function(){return de?de(e):D=i({},D,e)}))},Te=function(){return ee?ee():p.try((function(){var e=F.window;if(e){var n=at(e);return j.register((function(){return e.close()})),n}return new Yn({send:it})}))},Se=function(e){return ne?ne(e):p.try((function(){o=e}))},Ie=function(){return Z?Z():p.hash({setState:Oe({visible:!0}),showElement:a?a.get().then(Ve):null}).then(pe)},Re=function(){return X?X():p.hash({setState:Oe({visible:!1}),showElement:a?a.get().then(Je):null}).then(pe)},Ce=function(){return"function"==typeof I?I({props:F}):I},ke=function(){return"function"==typeof b?b({props:F}):b},je=function(){return Y(Ce())},We=function(e,n){var t=n.windowName;return te?te(e,{windowName:t}):p.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:t,title:P},ke().iframe)}))}))},Ae=function(e){return re?re(e):p.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:"__zoid_prerender_frame__"+P+"_"+ue()+"__",title:"prerender__"+P},ke().iframe)}))}))},Le=function(e,n,t){return ae?ae(e,n,t):p.try((function(){if(e===mt.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return j.register((function(){return $e(e)})),Ye(e).then((function(e){return x(e)})).then((function(e){return at(e)}))}))}if(e===mt.POPUP)return n;throw new Error("No render context available for "+e)}))},De=function(){return p.try((function(){if(o)return p.all([M.trigger(yt.FOCUS),o.focus()]).then(pe)}))},ze=function(){var e=ct(window);return e.windows=e.windows||{},e.windows[d]=window,j.register((function(){delete e.windows[d]})),d},Be=function(e,n,t,r){if(n===T(window))return{type:"global",uid:ze()};if(e!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(F.window){var o=r.getWindow();if(!o)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(q(o)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(t===mt.POPUP)return{type:"opener"};if(t===mt.IFRAME)return{type:"parent",distance:z(window)};throw new Error("Can not construct window reference for child")},Qe=function(e,n){return p.try((function(){c=e,u=n,he(),j.register((function(){return n.close.fireAndForget().catch(pe)}))}))},en=function(e){var n=e.width,t=e.height;return p.try((function(){M.trigger(yt.RESIZE,{width:n,height:t})}))},nn=function(e){return p.try((function(){return M.trigger(yt.DESTROY)})).catch(pe).then((function(){return j.all(e)})).then((function(){var n=e||new Error("Component destroyed");s&&Ze(s)||"Window navigated away"===n.message?C.resolve():C.asyncReject(n)}))},tn=le((function(e){return p.try((function(){if(K){if(A(K.__source__))return;return K()}return p.try((function(){return M.trigger(yt.CLOSE)})).then((function(){return nn(e||new Error("Component closed"))}))}))})),rn=function(e,n){var t=n.proxyWin,r=n.proxyFrame,o=n.windowName;return ie?ie(e,{proxyWin:t,proxyFrame:r,windowName:o}):p.try((function(){if(e===mt.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return Ye(e).then((function(n){return j.register((function(){return $e(e)})),j.register((function(){return ut(n)})),n}))}))}if(e===mt.POPUP){var n=fe(),t=n.width,a=void 0===t?"300px":t,u=n.height,c=void 0===u?"150px":u;a=un(a,window.outerWidth),c=un(c,window.outerWidth);var s=function(e,n){var t=(n=n||{}).closeOnUnload,r=void 0===t?1:t,o=n.name,a=void 0===o?"":o,u=n.width,c=n.height,s=0,d=0;u&&(window.outerWidth?d=Math.round((window.outerWidth-u)/2)+window.screenX:window.screen.width&&(d=Math.round((window.screen.width-u)/2))),c&&(window.outerHeight?s=Math.round((window.outerHeight-c)/2)+window.screenY:window.screen.height&&(s=Math.round((window.screen.height-c)/2))),delete n.closeOnUnload,delete n.name,u&&c&&(n=i({top:s,left:d,width:u,height:c,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var f,l=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+me(n[e])})).filter(Boolean).join(",");try{f=window.open("",a,l)}catch(e){throw new Ue("Can not open popup window - "+(e.stack||e.message))}if(A(f))throw new Ue("Can not open popup window - blocked");return r&&window.addEventListener("unload",(function(){return f.close()})),f}(0,i({name:o,width:a,height:c},ke().popup));return j.register((function(){return $(s)})),j.register((function(){return ut(s)})),s}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:it}),t.setName(o).then((function(){return t}))}))},on=function(){return p.try((function(){var e=Ge(window,"unload",we((function(){nn(new Error("Window navigated away"))}))),n=H(v,nn,3e3);if(j.register(n.cancel),j.register(e.cancel),ce)return ce()}))},an=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,tn(new Error("Detected component window close"))):p.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,tn(new Error("Detected component window close"))}))})).then((function(){return n}))},cn=function(e){return G?G(e):p.try((function(){if(-1===k.indexOf(e))return k.push(e),C.asyncReject(e),M.trigger(yt.ERROR,e)}))},sn=new p,dn=function(e){return p.try((function(){sn.resolve(e)}))};Qe.onError=cn;var fn=function(e,n){return e({uid:d,container:n.container,context:n.context,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:De,close:tn,state:W,props:F,tag:E,dimensions:fe(),event:M})},ln=function(e,n){var t=n.context;return oe?oe(e,{context:t}):p.try((function(){if(g){M.trigger(yt.PRERENDER);var n=e.getWindow();if(n&&S(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var r=(n=x(n)).document,o=fn(g,{context:t,doc:r});if(o){if(o.ownerDocument!==r)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=_e(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=_e(n.children);a<u.length;a++)r.appendChild(u[a])}(n,o);var i=O.width,a=void 0!==i&&i,u=O.height,c=void 0!==u&&u,s=O.element,d=void 0===s?"body":s;if((d=qe(d,r))&&(a||c)){var f=Xe(d,(function(e){en({width:a?e.width:void 0,height:c?e.height:void 0})}),{width:a,height:c,win:n});M.on(yt.RENDERED,f.cancel)}M.trigger(yt.PRERENDERED)}}}}))},hn=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.rerender;return Q?Q(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,rerender:i}):p.hash({container:e.get(),frame:t?t.get():null,prerenderFrame:r?r.get():null,internalState:be()}).then((function(e){var n=e.container,t=e.internalState.visible,r=fn(y,{context:o,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||Je(r),function(e,n){e.appendChild(n)}(n,r);var u=function(e,n){n=we(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&$e(r)},c=function(){i||(n(),u())};if(Ze(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){Ze(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+ue()+"__"),r.style.display="none",Ye(r).then((function(e){(o=x(e)).addEventListener("unload",c)})),e.appendChild(r),t=Ee((function(){Ze(e)&&c()}),1e3),{cancel:u}}(r,(function(){var e=new Error("Detected container element removed from DOM");return p.delay(1).then((function(){if(!Ze(r))return j.all(e),i().then(he,ge);tn(e)}))}));return j.register((function(){return u.cancel()})),j.register((function(){return $e(r)})),a=dt(r)}}))},pn=function(){return{state:W,event:M,close:tn,focus:De,resize:en,onError:cn,updateProps:vn,show:Ie,hide:Re}},wn=function(e){void 0===e&&(e={});var n=s,t=pn();ye(L,e),function(e,n,t,r,o){var i=r.state,a=r.close,u=r.focus,c=r.event,s=r.onError;Rt(t,e,(function(e,r,d){var f=!1,l=d;Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){return f?l:(f=!0,function(){if(!r)return l;var f=r.alias;if(f&&!xe(d)&&xe(t[f])&&(l=t[f]),r.value&&(l=r.value({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),!r.default||xe(l)||xe(t[e])||(l=r.default({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),xe(l)){if(r.type===wt.ARRAY?!Array.isArray(l):typeof l!==r.type)throw new TypeError("Prop is not of type "+r.type+": "+e)}else if(!1!==r.required&&!xe(t[e]))throw new Error('Expected prop "'+e+'" to be defined');return xe(l)&&r.decorate&&(l=r.decorate({value:l,props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),l}())}})})),Rt(n,e,pe)}(m,F,L,t,n)},vn=function(e){return wn(e),C.then((function(){var e=u,n=o;if(e&&n&&c)return Pe(c).then((function(t){return e.updateProps(t).catch((function(e){return an(n).then((function(n){if(!n)throw e}))}))}))}))},mn=function(e){return J?J(e):p.try((function(){return Fe(e)})).then((function(e){return Ke(e)&&(e=function e(n){var t=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Ke(e))return e}(e);if(n&&n.host)return n.host}(n);if(!t)throw new Error("Element is not in shadow dom");var r="shadow-slot-"+ue(),o=document.createElement("slot");o.setAttribute("name",r),n.appendChild(o);var i=document.createElement("div");return i.setAttribute("slot",r),t.appendChild(i),Ke(t)?e(i):i}(e)),s=e,dt(e)}))};return{init:function(){M.on(yt.RENDER,(function(){return F.onRender()})),M.on(yt.PRERENDER,(function(){return F.onPrerender()})),M.on(yt.DISPLAY,(function(){return F.onDisplay()})),M.on(yt.RENDERED,(function(){return F.onRendered()})),M.on(yt.PRERENDERED,(function(){return F.onPrerendered()})),M.on(yt.CLOSE,(function(){return F.onClose()})),M.on(yt.DESTROY,(function(){return F.onDestroy()})),M.on(yt.RESIZE,(function(){return F.onResize()})),M.on(yt.FOCUS,(function(){return F.onFocus()})),M.on(yt.PROPS,(function(e){return F.onProps(e)})),M.on(yt.ERROR,(function(e){return F&&F.onError?F.onError(e):ge(e).then((function(){setTimeout((function(){throw e}),1)}))})),j.register(M.reset)},render:function(e){var n=e.target,t=e.container,r=e.context,i=e.rerender;return p.try((function(){var e=je(),a=R||je();!function(e,n,t){if(e!==window){if(!U(window,e))throw new Error("Can only renderTo an adjacent frame");var r=T();if(!B(n,r)&&!S(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+r);if(t&&"string"!=typeof t)throw new Error("Container passed to renderTo must be a string selector, got "+typeof t+" }")}}(n,a,t);var u=p.try((function(){if(n!==window)return function(e,n){for(var t={},r=0,o=Object.keys(F);r<o.length;r++){var i=o[r],a=m[i];a&&a.allowDelegate&&(t[i]=F[i])}var u=it(n,"zoid_delegate_"+P,{uid:d,overrides:{props:t,event:M,close:tn,onError:cn,getInternalState:be,setInternalState:Oe,resolveInitPromise:he,rejectInitPromise:ge}}).then((function(e){var t=e.data.parent;return j.register((function(e){if(!A(n))return t.destroy(e)})),t.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+ve(e))}));return J=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyContainer.apply(e,n)}))},Q=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.renderContainer.apply(e,n)}))},Z=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.show.apply(e,n)}))},X=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.hide.apply(e,n)}))},ce=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.watchForUnload.apply(e,n)}))},e===mt.IFRAME?(ee=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyWindow.apply(e,n)}))},te=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openFrame.apply(e,n)}))},re=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},oe=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.prerender.apply(e,n)}))},ie=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.open.apply(e,n)}))},ae=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerender.apply(e,n)}))}):e===mt.POPUP&&(ne=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.setProxyWin.apply(e,n)}))}),u}(r,n)})),c=F.window,s=on(),l=Nt(m,F,"post"),h=M.trigger(yt.RENDER),w=mn(t),v=Te(),y=w.then((function(){return wn()})),g=y.then((function(){return Nt(m,F,"get").then((function(e){return function(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=Me(u[1],o),s=Me(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(V(Ce()),{query:e})}))})),b=v.then((function(t){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.initialChildDomain,o=n.childDomainMatch,i=n.target,a=void 0===i?window:i,u=n.context;return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomainMatch,o=n.context;return Pe(n.initialChildDomain).then((function(e){return{uid:d,context:o,tag:E,childDomainMatch:r,version:"10_3_1",props:e,exports:(n=t,{init:function(e){return Qe(this.origin,e)},close:tn,checkClose:function(){return an(n)},resize:en,onError:cn,show:Ie,hide:Re,export:dn})};var n}))}({proxyWin:t,initialChildDomain:r,childDomainMatch:o,context:u}).then((function(e){var n=ht({data:e,metaData:{windowRef:Be(a,r,u,t)},sender:{domain:T(window)},receiver:{win:t,domain:o},passByReference:r===T()}),i=n.serializedData;return j.register(n.cleanReference),i}))}({proxyWin:(o={proxyWin:t,initialChildDomain:e,childDomainMatch:a,target:n,context:r}).proxyWin,initialChildDomain:o.initialChildDomain,childDomainMatch:o.childDomainMatch,target:o.target,context:o.context}).then((function(e){return gt({name:P,serializedPayload:e})}));var o})),_=b.then((function(e){return We(r,{windowName:e})})),O=Ae(r),x=p.hash({proxyContainer:w,proxyFrame:_,proxyPrerenderFrame:O}).then((function(e){return hn(e.proxyContainer,{context:r,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame,rerender:i})})).then((function(e){return e})),I=p.hash({windowName:b,proxyFrame:_,proxyWin:v}).then((function(e){var n=e.proxyWin;return c?n:rn(r,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),N=p.hash({proxyWin:I,proxyPrerenderFrame:O}).then((function(e){return Le(r,e.proxyWin,e.proxyPrerenderFrame)})),k=I.then((function(e){return o=e,Se(e)})),W=p.hash({proxyPrerenderWin:N,state:k}).then((function(e){return ln(e.proxyPrerenderWin,{context:r})})),L=p.hash({proxyWin:I,windowName:b}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),D=p.hash({body:l}).then((function(e){return f.method?f.method:Object.keys(e.body).length?"post":"get"})),q=p.hash({proxyWin:I,windowUrl:g,body:l,method:D,windowName:L,prerender:W}).then((function(e){return e.proxyWin.setLocation(e.windowUrl,{method:e.method,body:e.body})})),z=I.then((function(e){!function e(n,t){var r=!1;return j.register((function(){r=!0})),p.delay(2e3).then((function(){return n.isClosed()})).then((function(o){if(!r)return o?tn(new Error("Detected "+t+" close")):e(n,t)}))}(e,r)})),H=p.hash({container:x,prerender:W}).then((function(){return M.trigger(yt.DISPLAY)})),G=I.then((function(n){return function(e,n,t){return p.try((function(){return e.awaitWindow()})).then((function(e){if(ot&&ot.needsBridge({win:e,domain:n})&&!ot.hasBridge(n,n)){var r="function"==typeof f.bridgeUrl?f.bridgeUrl({props:F}):f.bridgeUrl;if(!r)throw new Error("Bridge needed to render "+t);var o=Y(r);return ot.linkUrl(e,n),ot.openBridge(V(r),o)}}))}(n,e,r)})),$=q.then((function(){return p.try((function(){var e=F.timeout;if(e)return C.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),K=C.then((function(){return M.trigger(yt.RENDERED)}));return p.hash({initPromise:C,buildUrlPromise:g,onRenderPromise:h,getProxyContainerPromise:w,openFramePromise:_,openPrerenderFramePromise:O,renderContainerPromise:x,openPromise:I,openPrerenderPromise:N,setStatePromise:k,prerenderPromise:W,loadUrlPromise:q,buildWindowNamePromise:b,setWindowNamePromise:L,watchForClosePromise:z,onDisplayPromise:H,openBridgePromise:G,runTimeoutPromise:$,onRenderedPromise:K,delegatePromise:u,watchForUnloadPromise:s,finalSetPropsPromise:y})})).catch((function(e){return p.all([cn(e),nn(e)]).then((function(){throw e}),(function(){throw e}))})).then(pe)},destroy:nn,getProps:function(){return F},setProps:wn,export:dn,getHelpers:pn,getDelegateOverrides:function(){return p.try((function(){return{getProxyContainer:mn,show:Ie,hide:Re,renderContainer:hn,getProxyWindow:Te,watchForUnload:on,openFrame:We,openPrerenderFrame:Ae,prerender:ln,open:rn,openPrerender:Le,setProxyWin:Se}}))},getExports:function(){return N({getExports:function(){return sn}})}}}var kt={register:function(e,n,t,r){var i=r.React,a=r.ReactDOM;return function(e){function n(){return e.apply(this,arguments)||this}o(n,e);var r=n.prototype;return r.render=function(){return i.createElement("div",null)},r.componentDidMount=function(){var e=a.findDOMNode(this),n=t(ye({},this.props));n.render(e,mt.IFRAME),this.setState({parent:n})},r.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(ye({},this.props)).catch(pe)},n}(i.Component)}},jt={register:function(e,n,t,r){return r.component(e,{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(pe)},deep:!0}}})}},Wt={register:function(e,n,t){return{template:"<div></div>",inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(pe)},deep:!0}}}}},At={register:function(e,n,t,r){return r.module(e,[]).directive(Pe(e),(function(){for(var e={},r=0,o=Object.keys(n);r<o.length;r++)e[o[r]]="=";return e.props="=",{scope:e,restrict:"E",controller:["$scope","$element",function(e,n){function r(){if("$apply"!==e.$root.$$phase&&"$digest"!==e.$root.$$phase)try{e.$apply()}catch(e){}}var o=function(){return Se(e.props,(function(e){return"function"==typeof e?function(){var n=e.apply(this,arguments);return r(),n}:e}))},i=t(o());i.render(n[0],mt.IFRAME),e.$watch((function(){i.updateProps(o()).catch(pe)}))}]}}))}},Lt={register:function(e,n,t,r){var o=r.Component,a=r.NgModule,u=r.ElementRef,c=r.NgZone,s=r.Inject,d=function(){function e(e,n){this.elementRef=void 0,this.internalProps=void 0,this.parent=void 0,this.props=void 0,this.zone=void 0,this._props=void 0,this._props={},this.elementRef=e,this.zone=n}var n=e.prototype;return n.getProps=function(){var e=this;return Se(i({},this.internalProps,this.props),(function(n){if("function"==typeof n){var t=e.zone;return function(){var e=arguments,r=this;return t.run((function(){return n.apply(r,e)}))}}return n}))},n.ngOnInit=function(){var e=this.elementRef.nativeElement;this.parent=t(this.getProps()),this.parent.render(e,mt.IFRAME)},n.ngDoCheck=function(){this.parent&&!function(e,n){var t={};for(var r in e)if(e.hasOwnProperty(r)&&(t[r]=!0,e[r]!==n[r]))return!1;for(var o in n)if(!t[o])return!1;return!0}(this._props,this.props)&&(this._props=i({},this.props),this.parent.updateProps(this.getProps()))},e}();d.annotations=void 0,d.parameters=void 0,d.parameters=[[new s(u)],[new s(c)]],d.annotations=[new o({selector:e,template:"<div></div>",inputs:["props"]})];var f=function(){};return f.annotations=void 0,f.annotations=[new a({declarations:[d],exports:[d]})],f}};function Dt(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,c=u.width,s=u.height;if(t&&r){var d=o.createElement("div");d.setAttribute("id",n);var f=o.createElement("style");return i.cspNonce&&f.setAttribute("nonce",i.cspNonce),f.appendChild(o.createTextNode("\n #"+n+" {\n display: inline-block;\n position: relative;\n width: "+c+";\n height: "+s+";\n }\n\n #"+n+" > 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 ")),d.appendChild(t),d.appendChild(r),d.appendChild(f),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(yt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){$e(r)}),1)})),a.on(yt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(d.style.width=an(n)),"number"==typeof t&&(d.style.height=an(t))})),d}}function Mt(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 qt=Ne(),Ft=Ne(),zt=function(e){!function(){var e,n,t,r;cn().initialized||(cn().initialized=!0,n=(e={on:rt,send:it}).on,t=e.send,(r=cn()).receiveMessage=r.receiveMessage||function(e){return tt(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;dn().getOrSet("postMessageListener",(function(){return Ge(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;p.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");tt({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:rt,send:it}),zn({on:rt,send:it,receiveMessage:tt}),function(e){var n=e.on,t=e.send;dn("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return vn(e.source,{domain:e.origin}),{instanceID:wn()}})),r=q();return r&&mn(r,{send:t}).catch((function(e){})),e}))}({on:rt,send:it}))}();var n=function(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,c=e.dimensions,s=void 0===c?{}:c,d=e.autoResize,f=void 0===d?{}:d,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,v=e.defaultContext,m=void 0===v?mt.IFRAME:v,y=e.containerTemplate,g=void 0===y?Dt:y,E=e.prerenderTemplate,P=void 0===E?Mt:E,b=e.validate,_=e.eligible,O=void 0===_?function(){return{eligible:!0}}:_,T=e.logger,x=void 0===T?{info:pe}:T,I=e.exports,R=void 0===I?pe:I,N=e.method,C=e.children,k=void 0===C?function(){return{}}:C,j=n.replace(/-/g,"_"),W=i({},{window:{type:wt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!G(n)&&!Yn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(G(n)){if(A(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return at(e.value)}},timeout:{type:wt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:wt.STRING,required:!1},onDisplay:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onRendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onRender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onClose:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onDestroy:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onResize:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},onFocus:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},close:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:j,tag:n,url:t,domain:r,bridgeUrl:o,method:N,propsDef:W,dimensions:s,autoResize:f,allowedParentDomains:h,attributes:w,defaultContext:m,containerTemplate:g,prerenderTemplate:P,validate:b,logger:x,eligible:O,children:k,exports:"function"==typeof R?R:function(e){for(var n=e.getExports,t={},r=function(){var e=i[o],r=R[e].type,a=n().then((function(n){return n[e]}));t[e]=r===wt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.apply(void 0,n)}))}:a},o=0,i=Object.keys(R);o<i.length;o++)r();return t}}}(e),o=r.name,a=r.tag,u=r.defaultContext,c=r.propsDef,s=r.eligible,d=r.children,f=ct(window),l={},h=[],w=function(){if(function(e){try{return Et(window.name).name===e}catch(e){}return!1}(o)){var e=bt().payload;if(e.tag===a&&B(e.childDomainMatch,T()))return!0}return!1},v=le((function(){if(w()){if(window.xprops)throw delete f.components[a],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,t=e.tag,r=e.propsDef,o=e.autoResize,i=e.allowedParentDomains,a=[],u=bt(),c=u.parent,s=u.payload,d=c.win,f=c.domain,l=new p,h=s.version,w=s.uid,v=s.exports,m=s.context,y=s.props;if(!function(e,n){if(!/_/.test(e)||!/_/.test("10_3_1"))throw new Error("Versions are in an invalid format ("+e+", 10_3_1)");return e.split("_")[0]==="10_3_1".split("_")[0]}(h))throw new Error("Parent window has zoid version "+h+", child window has version 10_3_1");var g=v.show,E=v.hide,P=v.close,b=v.onError,_=v.checkClose,O=v.export,I=v.resize,R=v.init,N=function(){return d},C=function(){return f},j=function(e){return a.push(e),{cancel:function(){a.splice(a.indexOf(e),1)}}},W=function(e){return I.fireAndForget({width:e.width,height:e.height})},A=function(e){return l.resolve(e),O(e)},L=function(e){var r=(void 0===e?{}:e).anyParent,o=[],i=n.parent;if(void 0===r&&(r=!i),!r&&!i)throw new Error("No parent found for "+t+" child");for(var a=0,u=k(window);a<u.length;a++){var c=u[a];if(S(c)){var s=x(c).xprops;if(s&&N()===s.getParent()){var d=s.parent;if(r||!i||d&&d.uid===i.uid){var f=st(c,(function(e){return e.exports}));o.push({props:s,exports:f})}}}}return o},D=function(e,o,i){void 0===i&&(i=!1);var u=function(e,n,t,r,o,i){void 0===i&&(i=!1);for(var a={},u=0,c=Object.keys(t);u<c.length;u++){var s=c[u],d=n[s],f=d&&d.trustedDomains&&d.trustedDomains.length>0?d.trustedDomains.reduce((function(e,n){return e||B(n,T(window))}),!1):r===T(window)||S(e);if((!d||!d.sameDomain||f)&&(!d||!d.trustedDomains||f)){var l=Ot(n,0,s,t[s],o);a[s]=l,d&&d.alias&&!a[d.alias]&&(a[d.alias]=l)}}if(!i)for(var h=0,p=Object.keys(n);h<p.length;h++){var w=p[h];t.hasOwnProperty(w)||(a[w]=Ot(n,0,w,void 0,o))}return a}(d,r,e,o,{tag:t,show:g,hide:E,close:P,focus:Tt,onError:b,resize:W,getSiblings:L,onProps:j,getParent:N,getParentDomain:C,uid:w,export:A},i);n?ye(n,u):n=u;for(var c=0;c<a.length;c++)(0,a[c])(n)},M=function(e){return p.try((function(){return D(e,f,!0)}))};return{init:function(){return p.try((function(){return S(d)&&function(e){var n=e.componentName,t=e.parentComponentWindow,r=pt({data:Et(window.name).serializedInitialPayload,sender:{win:t},basic:!0}),o=r.sender;if("uid"===r.reference.type||"global"===r.metaData.windowRef.type){var i=ht({data:r.data,metaData:{windowRef:_t(t)},sender:{domain:o.domain},receiver:{win:window,domain:T()},basic:!0});window.name=gt({name:n,serializedPayload:i.serializedData})}}({componentName:e.name,parentComponentWindow:d}),ct(window).exports=e.exports({getExports:function(){return l}}),function(e,n){if(!B(e,n))throw new Error("Can not be rendered by domain: "+n)}(i,f),En(d),window.addEventListener("beforeunload",(function(){_.fireAndForget()})),window.addEventListener("unload",(function(){_.fireAndForget()})),H(d,(function(){St()})),R({updateProps:M,close:St})})).then((function(){return(e=o.width,n=void 0!==e&&e,t=o.height,r=void 0!==t&&t,i=o.element,Fe(void 0===i?"body":i).catch(pe).then((function(e){return{width:n,height:r,element:e}}))).then((function(e){var n=e.width,t=e.height,r=e.element;r&&(n||t)&&m!==mt.POPUP&&Xe(r,(function(e){W({width:n?e.width:void 0,height:t?e.height:void 0})}),{width:n,height:t})}));var e,n,t,r,i})).catch((function(e){b(e)}))},getProps:function(){return n||(D(y,f),n)}}}(r);return e.init(),e}})),m=function e(n){var t,c="zoid-"+a+"-"+ue(),f=n||{},l=s({props:f}),w=l.eligible,v=l.reason,m=f.onDestroy;f.onDestroy=function(){if(t&&w&&h.splice(h.indexOf(t),1),m)return m.apply(void 0,arguments)};var y=Ct({uid:c,options:r});y.init(),w?y.setProps(f):f.onDestroy&&f.onDestroy(),qt.register((function(e){return y.destroy(e||new Error("zoid destroyed all components"))}));var g=function(n){var t=(void 0===n?{}:n).decorate;return e((void 0===t?ge:t)(f))},E=function(e,n,r){return p.try((function(){if(!w){var n=new Error(v||o+" component is not eligible");return y.destroy(n).then((function(){throw n}))}if(!G(e))throw new Error("Must pass window to renderTo");return function(e,n){return p.try((function(){if(e.window)return at(e.window).getType();if(n){if(n!==mt.IFRAME&&n!==mt.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(f,r)})).then((function(o){if(n=function(e,n){if(n){if("string"!=typeof n&&!re(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===mt.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(o,n),e!==window&&"string"!=typeof n)throw new Error("Must pass string element when rendering to another window");return y.render({target:e,container:n,context:o,rerender:function(){var o=g();return ye(t,o),o.renderTo(e,n,r)}})})).catch((function(e){return y.destroy(e).then((function(){throw e}))}))};return t=i({},y.getExports(),y.getHelpers(),function(){for(var e=d(),n={},t=function(){var t=o[r],a=e[t];n[t]=function(e){var n=y.getProps(),t=i({},e,{parent:{uid:c,props:n,export:y.export}});return a(t)}},r=0,o=Object.keys(e);r<o.length;r++)t();return n}(),{isEligible:function(){return w},clone:g,render:function(e,n){return E(window,e,n)},renderTo:function(e,n,t){return E(e,n,t)}}),w&&h.push(t),t};if(v(),n=rt("zoid_allow_delegate_"+o,(function(){return!0})),t=rt("zoid_delegate_"+o,(function(e){var n=e.data;return{parent:Ct({uid:n.uid,options:r,overrides:n.overrides,parentWin:e.source})}})),Ft.register(n.cancel),Ft.register(t.cancel),f.components=f.components||{},f.components[a])throw new Error("Can not register multiple components with the same tag: "+a);return f.components[a]=!0,{init:m,instances:h,driver:function(e,n){var t={react:kt,angular:At,vue:jt,vue3:Wt,angular2:Lt};if(!t[e])throw new Error("Could not find driver for framework: "+e);return l[e]||(l[e]=t[e].register(a,c,m,n)),l[e]},isChild:w,canRenderTo:function(e){return it(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:v}}(e),t=function(e){return n.init(e)};t.driver=function(e,t){return n.driver(e,t)},t.isChild=function(){return n.isChild()},t.canRenderTo=function(e){return n.canRenderTo(e)},t.instances=n.instances;var r=n.registerChild();return r&&(window.xprops=t.xprops=r.getProps()),t};function Ut(e){ot&&ot.destroyBridges();var n=qt.all(e);return qt=Ne(),n}var Bt=Ut;function Yt(e){var n;return Bt(),delete window.__zoid_10_3_1__,function(){for(var e=dn("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(n=dn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_11_0_0__,Ft.all(e)}}])},e.exports=t()}))),L=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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){t.r(n),t.d(n,"getUserAgent",(function(){return i})),t.d(n,"isDevice",(function(){return a})),t.d(n,"isWebView",(function(){return u})),t.d(n,"isStandAlone",(function(){return c})),t.d(n,"isFacebookWebView",(function(){return s})),t.d(n,"isFirefoxIOS",(function(){return d})),t.d(n,"isEdgeIOS",(function(){return f})),t.d(n,"isOperaMini",(function(){return l})),t.d(n,"isAndroid",(function(){return h})),t.d(n,"isIos",(function(){return p})),t.d(n,"isGoogleSearchApp",(function(){return w})),t.d(n,"isQQBrowser",(function(){return v})),t.d(n,"isIosWebview",(function(){return m})),t.d(n,"isSFVC",(function(){return y})),t.d(n,"isSFVCorSafari",(function(){return g})),t.d(n,"isAndroidWebview",(function(){return E})),t.d(n,"isIE",(function(){return P})),t.d(n,"isIECompHeader",(function(){return b})),t.d(n,"isElectron",(function(){return _})),t.d(n,"isIEIntranet",(function(){return O})),t.d(n,"isMacOsCna",(function(){return T})),t.d(n,"supportsPopups",(function(){return S})),t.d(n,"isChrome",(function(){return x})),t.d(n,"isSafari",(function(){return I})),t.d(n,"isApplePaySupported",(function(){return R})),t.d(n,"isDocumentReady",(function(){return Cn})),t.d(n,"isDocumentInteractive",(function(){return kn})),t.d(n,"urlEncode",(function(){return jn})),t.d(n,"waitForWindowReady",(function(){return Wn})),t.d(n,"waitForDocumentReady",(function(){return An})),t.d(n,"waitForDocumentBody",(function(){return Ln})),t.d(n,"parseQuery",(function(){return Dn})),t.d(n,"getQueryParam",(function(){return Mn})),t.d(n,"urlWillRedirectPage",(function(){return qn})),t.d(n,"formatQuery",(function(){return Fn})),t.d(n,"extendQuery",(function(){return zn})),t.d(n,"extendUrl",(function(){return Un})),t.d(n,"redirect",(function(){return Bn})),t.d(n,"hasMetaViewPort",(function(){return Yn})),t.d(n,"isElementVisible",(function(){return Hn})),t.d(n,"getPerformance",(function(){return Gn})),t.d(n,"enablePerformance",(function(){return Vn})),t.d(n,"getPageRenderTime",(function(){return Jn})),t.d(n,"htmlEncode",(function(){return $n})),t.d(n,"isBrowser",(function(){return Zn})),t.d(n,"querySelectorAll",(function(){return Xn})),t.d(n,"onClick",(function(){return Kn})),t.d(n,"getScript",(function(){return Qn})),t.d(n,"isLocalStorageEnabled",(function(){return et})),t.d(n,"getBrowserLocales",(function(){return nt})),t.d(n,"appendChild",(function(){return tt})),t.d(n,"isElement",(function(){return rt})),t.d(n,"getElementSafe",(function(){return ot})),t.d(n,"getElement",(function(){return it})),t.d(n,"elementReady",(function(){return at})),t.d(n,"PopupOpenError",(function(){return ct})),t.d(n,"popup",(function(){return st})),t.d(n,"writeToWindow",(function(){return dt})),t.d(n,"writeElementToWindow",(function(){return ft})),t.d(n,"setStyle",(function(){return lt})),t.d(n,"awaitFrameLoad",(function(){return ht})),t.d(n,"awaitFrameWindow",(function(){return pt})),t.d(n,"createElement",(function(){return wt})),t.d(n,"iframe",(function(){return vt})),t.d(n,"addEventListener",(function(){return mt})),t.d(n,"bindEvents",(function(){return yt})),t.d(n,"setVendorCSS",(function(){return Et})),t.d(n,"animate",(function(){return _t})),t.d(n,"makeElementVisible",(function(){return Ot})),t.d(n,"makeElementInvisible",(function(){return Tt})),t.d(n,"showElement",(function(){return St})),t.d(n,"hideElement",(function(){return xt})),t.d(n,"destroyElement",(function(){return It})),t.d(n,"showAndAnimate",(function(){return Rt})),t.d(n,"animateAndHide",(function(){return Nt})),t.d(n,"addClass",(function(){return Ct})),t.d(n,"removeClass",(function(){return kt})),t.d(n,"isElementClosed",(function(){return jt})),t.d(n,"watchElementForClose",(function(){return Wt})),t.d(n,"fixScripts",(function(){return At})),t.d(n,"onResize",(function(){return Lt})),t.d(n,"getResourceLoadTime",(function(){return Dt})),t.d(n,"isShadowElement",(function(){return Mt})),t.d(n,"getShadowRoot",(function(){return qt})),t.d(n,"getShadowHost",(function(){return Ft})),t.d(n,"insertShadowSlot",(function(){return zt})),t.d(n,"preventClickFocus",(function(){return Ut})),t.d(n,"getStackTrace",(function(){return Bt})),t.d(n,"getCurrentScript",(function(){return Ht})),t.d(n,"getCurrentScriptUID",(function(){return Vt})),t.d(n,"experiment",(function(){return Kt})),t.d(n,"getGlobalNameSpace",(function(){return Qt})),t.d(n,"getStorage",(function(){return Jt})),t.d(n,"getFunctionName",(function(){return ie})),t.d(n,"setFunctionName",(function(){return ae})),t.d(n,"base64encode",(function(){return ue})),t.d(n,"base64decode",(function(){return ce})),t.d(n,"uniqueID",(function(){return se})),t.d(n,"getGlobal",(function(){return de})),t.d(n,"getObjectID",(function(){return fe})),t.d(n,"getEmptyObject",(function(){return he})),t.d(n,"memoize",(function(){return ve})),t.d(n,"promiseIdentity",(function(){return me})),t.d(n,"memoizePromise",(function(){return ye})),t.d(n,"promisify",(function(){return ge})),t.d(n,"inlineMemoize",(function(){return Ee})),t.d(n,"noop",(function(){return Pe})),t.d(n,"once",(function(){return be})),t.d(n,"hashStr",(function(){return _e})),t.d(n,"strHashStr",(function(){return Oe})),t.d(n,"match",(function(){return Te})),t.d(n,"awaitKey",(function(){return Se})),t.d(n,"stringifyError",(function(){return xe})),t.d(n,"stringifyErrorMessage",(function(){return Ie})),t.d(n,"stringify",(function(){return Re})),t.d(n,"domainMatches",(function(){return Ne})),t.d(n,"patchMethod",(function(){return Ce})),t.d(n,"extend",(function(){return ke})),t.d(n,"values",(function(){return je})),t.d(n,"memoizedValues",(function(){return We})),t.d(n,"perc",(function(){return Ae})),t.d(n,"min",(function(){return Le})),t.d(n,"max",(function(){return De})),t.d(n,"roundUp",(function(){return Me})),t.d(n,"regexMap",(function(){return qe})),t.d(n,"svgToBase64",(function(){return Fe})),t.d(n,"objFilter",(function(){return ze})),t.d(n,"identity",(function(){return Ue})),t.d(n,"regexTokenize",(function(){return Be})),t.d(n,"promiseDebounce",(function(){return Ye})),t.d(n,"safeInterval",(function(){return He})),t.d(n,"isInteger",(function(){return Ge})),t.d(n,"isFloat",(function(){return Ve})),t.d(n,"serializePrimitive",(function(){return Je})),t.d(n,"deserializePrimitive",(function(){return $e})),t.d(n,"dotify",(function(){return Ze})),t.d(n,"undotify",(function(){return Xe})),t.d(n,"eventEmitter",(function(){return Ke})),t.d(n,"camelToDasherize",(function(){return Qe})),t.d(n,"dasherizeToCamel",(function(){return en})),t.d(n,"capitalizeFirstLetter",(function(){return nn})),t.d(n,"get",(function(){return tn})),t.d(n,"safeTimeout",(function(){return rn})),t.d(n,"defineLazyProp",(function(){return on})),t.d(n,"arrayFrom",(function(){return an})),t.d(n,"isObject",(function(){return un})),t.d(n,"isObjectObject",(function(){return cn})),t.d(n,"isPlainObject",(function(){return sn})),t.d(n,"replaceObject",(function(){return dn})),t.d(n,"copyProp",(function(){return fn})),t.d(n,"regex",(function(){return ln})),t.d(n,"regexAll",(function(){return hn})),t.d(n,"isDefined",(function(){return pn})),t.d(n,"cycle",(function(){return wn})),t.d(n,"debounce",(function(){return vn})),t.d(n,"isRegex",(function(){return mn})),t.d(n,"weakMapMemoize",(function(){return yn})),t.d(n,"weakMapMemoizePromise",(function(){return gn})),t.d(n,"getOrSet",(function(){return En})),t.d(n,"cleanup",(function(){return Pn})),t.d(n,"tryCatch",(function(){return bn})),t.d(n,"removeFromArray",(function(){return _n})),t.d(n,"assertExists",(function(){return On})),t.d(n,"unique",(function(){return Tn})),t.d(n,"constHas",(function(){return Sn})),t.d(n,"dedupeErrors",(function(){return xn})),t.d(n,"ExtendableError",(function(){return In})),t.d(n,"request",(function(){return nr})),t.d(n,"addHeaderBuilder",(function(){return tr})),t.d(n,"TYPES",(function(){return rr})),t.d(n,"memoized",(function(){return or})),t.d(n,"promise",(function(){return ir})),t.d(n,"isPerc",(function(){return ar})),t.d(n,"isPx",(function(){return ur})),t.d(n,"toNum",(function(){return cr})),t.d(n,"toPx",(function(){return sr})),t.d(n,"toCSS",(function(){return dr})),t.d(n,"percOf",(function(){return fr})),t.d(n,"normalizeDimension",(function(){return lr})),t.d(n,"wrapPromise",(function(){return hr})),t.d(n,"KEY_CODES",(function(){return Rn})),t.d(n,"ATTRIBUTES",(function(){return Nn})),t.d(n,"iPhoneScreenHeightMatrix",(function(){return r}));var r={926:{device:"iPhone 12 Pro Max",textSizeHeights:[752,748,744,738],zoomHeight:{1.15:[752,747,744,738],1.25:[753,748,744,738],1.5:[752,749,744,738],1.75:[753,747,744,739],2:[752,748,744],2.5:[753,748],3:[753,744]},maybeSafari:{2:[738],2.5:[745,738],3:[747,738]}},896:{device:"iPhone XS Max, iPhone 11 Pro Max, iPhone XR, iPhone 11",textSizeHeights:[721,717,713,707],zoomHeight:{1.15:[721,716,713,707],1.25:[721,718,713,708],1.5:[722,717,713],1.75:[721,718,712,707],2:[722,718,714,708],2.5:[720,718,713,708],3:[720,717,708]},maybeSafari:{1.5:[707],3:[714]}},844:{device:"iPhone 12, iPhone 12 Pro",textSizeHeights:[670,666,662,656],zoomHeight:{1.15:[670,666,662],1.25:[670,666,663,656],1.5:[671,666,662],1.75:[670,667,662,656],2:[670,666,662],2.5:[670,663],3:[669,666,663,657]},maybeSafari:{1.15:[656],1.5:[656],2:[656],2.5:[665,655],3:[663]}},812:{device:"iPhone X, iPhone XS, iPhone 11 Pro, iPhone 12 Mini",textSizeHeights:[641,637,633,627],zoomHeight:{1.15:[641,637,633,627],1.25:[641,638,633,628],1.5:[641,638,633,627],1.75:[641,637,634],2:[642,638,634,628],2.5:[640,638,633,628],3:[642,633]},maybeSafari:{1.75:[627],3:[636,627]}},736:{device:"iPhone 6 Plus, iPhone 6S Plus, iPhone 7 Plus, iPhone 8 Plus",textSizeHeights:[628,624,620,614],zoomHeight:{1.15:[628,624,620,614],1.25:[628,624,620,614],1.5:[629,624,620],1.75:[628,625,620,614],2:[628,624,620],2.5:[628,625,620,615],3:[627,624,615]},maybeSafari:{1.5:[614],2:[614],3:[621]}},667:{device:"iPhone 6, iPhone 6S, iPhone 7, iPhone 8, iPhone SE2",textSizeHeights:[559,555,551,545],zoomHeight:{1.15:[559,555,551,545],1.25:[559,555,551,545],1.5:[560,555,551],1.75:[558,555,551],2:[560,556,552,546],2.5:[560,555,550],3:[558,555,546]},maybeSafari:{1.5:[545],1.75:[544],2.5:[545],3:[552]}}};function i(){return window.navigator.mockUserAgent||window.navigator.userAgent}function a(e){return void 0===e&&(e=i()),!!e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function u(){var e=i();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)|.*WKWebView/i.test(e)||/\bwv\b/.test(e)||/Android.*Version\/(\d)\.(\d)/i.test(e)}function c(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function s(e){return void 0===e&&(e=i()),/FBAN/.test(e)||/FBAV/.test(e)}function d(e){return void 0===e&&(e=i()),/FxiOS/i.test(e)}function f(e){return void 0===e&&(e=i()),/EdgiOS/i.test(e)}function l(e){return void 0===e&&(e=i()),/Opera Mini/i.test(e)}function h(e){return void 0===e&&(e=i()),/Android/.test(e)}function p(e){return void 0===e&&(e=i()),/iPhone|iPod|iPad/.test(e)}function w(e){return void 0===e&&(e=i()),/\bGSA\b/.test(e)}function v(e){return void 0===e&&(e=i()),/QQBrowser/.test(e)}function m(e){return void 0===e&&(e=i()),!!p(e)&&(!!w(e)||/.+AppleWebKit(?!.*Safari)|.*WKWebView/.test(e))}function y(e){if(void 0===e&&(e=i()),p(e)){var n=r[window.outerHeight];if(!n)return!1;var t=window.innerHeight,o=Math.round(window.screen.width/window.innerWidth*100)/100,a=Math.round(t*o);return o>1&&n.zoomHeight[o]?-1!==n.zoomHeight[o].indexOf(a):-1!==n.textSizeHeights.indexOf(a)}return!1}function g(e){if(void 0===e&&(e=i()),p(e)){var n=y(e),t=r[window.outerHeight];if(!t)return!1;var o=window.innerHeight,a=Math.round(window.screen.width/window.innerWidth*100)/100,u=Math.round(o*a),c=t.maybeSafari,s=!1;return a>1&&c[a]&&-1!==c[a].indexOf(u)&&(s=!0),n||s}return!1}function E(e){return void 0===e&&(e=i()),!!h(e)&&/Version\/[\d.]+/.test(e)&&!l(e)}function P(){return!!window.document.documentMode||Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))}function b(){var e=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');return!(!e||!n)}function _(){return!("undefined"==typeof process||!process.versions||!process.versions.electron)}function O(){if(window.document.documentMode)try{var e=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=e,!0)}catch(e){return!1}return!1}function T(){var e=i();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}function S(e){return void 0===e&&(e=i()),!(m(e)||E(e)||l(e)||d(e)||f(e)||s(e)||v(e)||_()||T()||c())}function x(e){return void 0===e&&(e=i()),/Chrome|Chromium|CriOS/.test(e)}function I(e){return void 0===e&&(e=i()),/Safari/.test(e)&&!x(e)}function R(){try{if(window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments())return!0}catch(e){return!1}return!1}function N(e,n){return(N=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function C(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,N(e,n)}function k(){return(k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function j(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var W,A=[],L=[],D=0;function M(){if(!D&&W){var e=W;W=null,e.resolve()}}function q(){D+=1}function F(){D-=1,M()}var z=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var t,r,o=!1,i=!1,a=!1;q();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return F(),void this.reject(e)}F(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===A.indexOf(e)){A.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<L.length;t++)L[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,q();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):j(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,F()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:j(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!j(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];j(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return L.push(e),{cancel:function(){L.splice(L.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;q();try{o=n.apply(t,r||[])}catch(n){return F(),e.reject(n)}return F(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||j(n)},e.flush=function(){return n=W=W||new e,M(),n;var n},e}(),U="Call was rejected by callee.\r\n";function B(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function Y(e){try{return!0}catch(e){}return!1}function H(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=function(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}(e);return r&&Y()?H(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function G(e){void 0===e&&(e=window);var n=H(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function V(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(B(e)&&Y())return!0}catch(e){}try{if(H(e)===H(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(B(e)&&Y())return!0;if(G(window)===G(e))return!0}catch(e){}return!1}var J=[],$=[];function Z(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==U}if(n&&V(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(J,e);if(-1!==t){var r=$[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function X(e){try{if(e===window)return!0}catch(e){if(e&&e.message===U)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===U)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===U)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===U)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===U)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===U)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function K(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var Q,ee=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>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<n.length;t++){var r=n[t];if(X(r)&&Z(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!X(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=K(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=K(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=K(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==K(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function re(e,n,t){return(re=te()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&N(o,t.prototype),o}).apply(null,arguments)}function oe(e){var n="function"==typeof Map?new Map:void 0;return(oe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return re(e,arguments,ne(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),N(t,e)})(e)}function ie(e){return e.name||e.__name__||e.displayName||"anonymous"}function ae(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ue(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function ce(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function se(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ue((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function de(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if(void 0!==o)return o;throw new Error("No global found")}function fe(e){if(Q=Q||new ee,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=Q.get(e);return n||(n=typeof e+":"+se(),Q.set(e,n)),n}function le(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+fe(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function he(){return{}}var pe=0,we=0;function ve(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=pe;pe+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<we&&(t=null,r=null,u=pe,pe+=1),s=i?(r=r||new ee).getOrSet(this,he):t=t||{};var d=le(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),h=e.apply(this,arguments);return s[d]={time:l,value:h},h};return c.reset=function(){t=null,r=null},ae(c,(n.name||ie(e))+"::memoized")}function me(e){return z.resolve(e)}function ye(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=le(i);return n.hasOwnProperty(u)||(n[u]=z.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ae(t,ie(e)+"::promiseMemoized")}function ge(e,n){function t(){return z.try(e,this,arguments)}return void 0===n&&(n={}),n.name&&(t.displayName=n.name+":promisified"),ae(t,ie(e)+"::promisified")}function Ee(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=le(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function Pe(){}function be(e){var n=!1;return ae((function(){if(!n)return n=!0,e.apply(this,arguments)}),ie(e)+"::once")}function _e(e){for(var n=0,t=0;t<e.length;t++)n+=e[t].charCodeAt(0)*Math.pow(t%10+1,5);return Math.floor(Math.pow(Math.sqrt(n),5))}function Oe(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}function Te(e,n){var t=e.match(n);if(t)return t[1]}function Se(e,n){return new z((function(t){var r=e[n];if(r)return t(r);delete e[n],Object.defineProperty(e,n,{configurable:!0,set:function(e){(r=e)&&t(r)},get:function(){return r}})}))}function xe(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+xe(e,n+1)}}function Ie(e){var n="<unknown error: "+{}.toString.call(e)+">";return e?e instanceof Error?e.message||n:"string"==typeof e.message&&e.message||n:n}function Re(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Ne(e,n){var t=(e=e.split("://")[1]).indexOf(n);return-1!==t&&e.slice(t)===n}function Ce(e,n,t){var r=e[n];e[n]=function(){var e=arguments,n=this;return t({context:this,args:[].slice.call(arguments),original:r,callOriginal:function(){return r.apply(n,e)}})}}function ke(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}ve.clear=function(){we=pe};var je=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},We=ve(je);function Ae(e,n){return Math.round(e*n/100)}function Le(){return Math.min.apply(Math,arguments)}function De(){return Math.max.apply(Math,arguments)}function Me(e,n){var t=e%n;return t?e-t+n:e}function qe(e,n,t){var r=[];return e.replace(n,(function(e){r.push(t?t.apply(null,arguments):e)})),r}function Fe(e){return"data:image/svg+xml;base64,"+ue(e)}function ze(e,n){void 0===n&&(n=Boolean);var t={};for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)&&(t[r]=e[r]);return t}function Ue(e){return e}function Be(e,n){var t=[];return e.replace(n,(function(e){return t.push(e),""})),t}function Ye(e,n){var t,r;return void 0===n&&(n=50),ae((function(){r&&clearTimeout(r);var o=t=t||new z;return r=setTimeout((function(){t=null,r=null,z.try(e).then((function(e){o.resolve(e)}),(function(e){o.reject(e)}))}),n),o}),ie(e)+"::promiseDebounced")}function He(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Ge(e){return Boolean(e.match(/^[0-9]+$/))}function Ve(e){return Boolean(e.match(/^[0-9]+\.[0-9]+$/))}function Je(e){return e.toString()}function $e(e){return"true"===e||"false"!==e&&(Ge(e)?parseInt(e,10):Ve(e)?parseFloat(e):e)}function Ze(e,n,t){for(var r in void 0===n&&(n=""),void 0===t&&(t={}),n=n?n+".":n,e)e.hasOwnProperty(r)&&null!=e[r]&&"function"!=typeof e[r]&&(e[r]&&Array.isArray(e[r])&&e[r].length&&e[r].every((function(e){return"object"!=typeof e}))?t[""+n+r+"[]"]=e[r].join(","):e[r]&&"object"==typeof e[r]?t=Ze(e[r],""+n+r,t):t[""+n+r]=Je(e[r]));return t}function Xe(e){var n={};for(var t in e)if(e.hasOwnProperty(t)&&"string"==typeof e[t]){var r=e[t];t.match(/^.+\[\]$/)?(t=t.slice(0,-2),r=r.split(",").map($e)):r=$e(r);for(var o=n,i=t.split("."),a=0;a<i.length;a++){var u=i[a],c=a+1===i.length,s=!c&&Ge(i[a+1]);if("constructor"===u||"prototype"===u||"__proto__"===u)throw new Error("Disallowed key: "+u);c?o[u]=r:o=o[u]=o[u]||(s?[]:{})}}return n}function Ke(){var e={},n={};return{on:function(e,t){var r=n[e]=n[e]||[];r.push(t);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once:function(e,n){var t=this.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var i=n[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(z.try((function(){return n.apply(void 0,r)})))},c=0;c<i.length;c++)u(c);return z.all(a).then(Pe)},triggerOnce:function(n){if(e[n])return z.resolve();e[n]=!0;for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return this.trigger.apply(this,[n].concat(r))},reset:function(){n={}}}}function Qe(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}function en(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function nn(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function tn(e,n,t){if(!n)return t;for(var r=n.split("."),o=0;o<r.length;o++){if("object"!=typeof e||null===e)return t;e=e[r[o]]}return void 0===e?t:e}function rn(e,n){var t=He((function(){(n-=100)<=0&&(t.cancel(),e())}),100)}function on(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function an(e){return[].slice.call(e)}function un(e){return"object"==typeof e&&null!==e}function cn(e){return un(e)&&"[object Object]"==={}.toString.call(e)}function sn(e){if(!cn(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!cn(t)&&!!t.hasOwnProperty("isPrototypeOf")}function dn(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){on(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(sn(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return"continue";on(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function fn(e,n,t,r){if(e.hasOwnProperty(t)){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o)}else n[t]=r}function ln(e,n,t){void 0===t&&(t=0),"string"==typeof e&&(e=new RegExp(e));var r=n.slice(t).match(e);if(r){var o=r.index,i=r[0];return{text:i,groups:r.slice(1),start:t+o,end:t+o+i.length,length:i.length,replace:function(e){return i?""+i.slice(0,t+o)+e+i.slice(o+i.length):""}}}}function hn(e,n){for(var t=[],r=0;;){var o=ln(e,n,r);if(!o)break;t.push(o),r=Te.end}return t}function pn(e){return null!=e}function wn(e){return z.try(e).then((function(){return wn(e)}))}function vn(e,n){var t;return void 0===n&&(n=100),ae((function(){var r=arguments,o=this;clearTimeout(t),t=setTimeout((function(){return e.apply(o,r)}),n)}),ie(e)+"::debounced")}function mn(e){return"[object RegExp]"==={}.toString.call(e)}var yn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t)}))}},gn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t).finally((function(){n.delete(t)}))}))}};function En(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Pn(e){var n,t=[],r=!1;return{set:function(n,t){return r||(e[n]=t,this.register((function(){delete e[n]}))),t},register:function(e){r?e(n):t.push(be((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return z.all(o).then(Pe)}}}function bn(e){var n,t;try{n=e()}catch(e){t=e}return{result:n,error:t}}function _n(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}function On(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}function Tn(e){for(var n={},t=0;t<e.length;t++)n[e[t]]=!0;return Object.keys(n)}var Sn=function(e,n){return-1!==We(e).indexOf(n)};function xn(e){var n=[],t={};return function(r){if(-1===n.indexOf(r)){n.push(r);var o=xe(r);if(!t[o])return t[o]=!0,e(r)}}}var In=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 C(n,e),n}(oe(Error)),Rn={ENTER:13,SPACE:32},Nn={UID:"data-uid"};function Cn(){return Boolean(document.body)&&"complete"===document.readyState}function kn(){return Boolean(document.body)&&"interactive"===document.readyState}function jn(e){return encodeURIComponent(e)}function Wn(){return Ee(Wn,(function(){return new z((function(e){Cn()&&e(),window.addEventListener("load",(function(){return e()}))}))}))}var An=ve((function(){return new z((function(e){if(Cn()||kn())return e();var n=setInterval((function(){if(Cn()||kn())return clearInterval(n),e()}),10)}))}));function Ln(){return z.try((function(){return document.body?document.body:An().then((function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))}))}function Dn(e){return Ee(Dn,(function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[e])}function Mn(e){return Dn(window.location.search.slice(1))[e]}function qn(e){return-1===e.indexOf("#")||0!==e.indexOf("#")&&e.split("#")[0]!==window.location.href.split("#")[0]}function Fn(e){return void 0===e&&(e={}),Object.keys(e).filter((function(n){return"string"==typeof e[n]||"boolean"==typeof e[n]})).map((function(n){var t=e[n];if("string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("Invalid type for query");return jn(n)+"="+jn(t.toString())})).join("&")}function zn(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?Fn(k({},Dn(e),n)):e}function Un(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=zn(u[1],o),s=zn(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}function Bn(e,n){return void 0===n&&(n=window),new z((function(t){n.location=e,qn(e)||t()}))}function Yn(){var e=document.querySelector("meta[name=viewport]");return!(a()&&window.screen.width<660&&!e)}function Hn(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Gn(){return Ee(Gn,(function(){var e=window.performance;if(e&&e.now&&e.timing&&e.timing.connectEnd&&e.timing.navigationStart&&Math.abs(e.now()-Date.now())>1e3&&e.now()-(e.timing.connectEnd-e.timing.navigationStart)>0)return e}))}function Vn(){return Boolean(Gn())}function Jn(){return An().then((function(){var e=Gn();if(e){var n=e.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0}}))}function $n(e){return void 0===e&&(e=""),e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")}function Zn(){return"undefined"!=typeof window&&void 0!==window.location}function Xn(e,n){return void 0===n&&(n=window.document),[].slice.call(n.querySelectorAll(e))}function Kn(e,n){e.addEventListener("touchstart",Pe),e.addEventListener("click",n),e.addEventListener("keypress",(function(e){if(e.keyCode===Rn.ENTER||e.keyCode===Rn.SPACE)return n(e)}))}function Qn(e){var n=e.host,t=void 0===n?window.location.host:n,r=e.path,o=e.reverse,i=void 0!==o&&o;return Ee(Qn,(function(){var e=""+t+r,n=[].slice.call(document.getElementsByTagName("script"));i&&n.reverse();for(var o=0;o<n.length;o++){var a=n[o];if(a.src&&a.src.replace(/^https?:\/\//,"").split("?")[0]===e)return a}}),[r])}function et(){return Ee(et,(function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1}))}function nt(){var e=window.navigator,n=e.languages?[].concat(e.languages):[];return e.language&&n.push(e.language),e.userLanguage&&n.push(e.userLanguage),n.map((function(e){if(e&&e.match(/^[a-z]{2}[-_][A-Z]{2}$/)){var n=e.split(/[-_]/);return{country:n[1],lang:n[0]}}return e&&e.match(/^[a-z]{2}$/)?{lang:e}:null})).filter(Boolean)}function tt(e,n){e.appendChild(n)}function rt(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function ot(e,n){return void 0===n&&(n=document),rt(e)?e:"string"==typeof e?n.querySelector(e):void 0}function it(e,n){void 0===n&&(n=document);var t=ot(e,n);if(t)return t;throw new Error("Can not find element: "+Re(e))}function at(e){return new z((function(n,t){var r=Re(e),o=ot(e);if(o)return n(o);if(Cn())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=ot(e))?(clearInterval(i),n(o)):Cn()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}var ut,ct=function(e){function n(){return e.apply(this,arguments)||this}return C(n,e),n}(In);function st(e,n){var t=(n=n||{}).width,r=n.height,o=0,i=0;t&&(window.outerWidth?i=Math.round((window.outerWidth-t)/2)+window.screenX:window.screen.width&&(i=Math.round((window.screen.width-t)/2))),r&&(window.outerHeight?o=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(o=Math.round((window.screen.height-r)/2))),t&&r&&(n=k({top:o,left:i,width:t,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var a=n.name||"";delete n.name;var u,c=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+Re(n[e])})).filter(Boolean).join(",");try{u=window.open(e,a,c)}catch(e){throw new ct("Can not open popup window - "+(e.stack||e.message))}if(Z(u))throw new ct("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return u.close()})),u}function dt(e,n){try{e.document.open(),e.document.write(n),e.document.close()}catch(t){try{e.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(e){}}}function ft(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=an(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=an(n.children);a<u.length;a++)r.appendChild(u[a])}function lt(e,n,t){void 0===t&&(t=window.document),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}function ht(e){if((ut=ut||new ee).has(e)){var n=ut.get(e);if(n)return n}var t=new z((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<J.length;e++){var n=!1;try{n=J[e].closed}catch(e){}n&&($.splice(e,1),J.splice(e,1))}}(),e&&e.contentWindow)try{J.push(e.contentWindow),$.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ut.set(e,t),t}function pt(e){return ht(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function wt(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r=document.createElement(e);if(n.style&&ke(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(var o=0,i=Object.keys(n.attributes);o<i.length;o++){var a=i[o];r.setAttribute(a,n.attributes[a])}if(n.styleSheet&&lt(r,n.styleSheet),t&&tt(t,r),n.html)if("iframe"===e){if(!t||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");dt(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function vt(e,n){void 0===e&&(e={});var t=e.style||{},r=wt("iframe",{attributes:k({allowTransparency:"true"},e.attributes||{}),style:k({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",se()),ht(r),n&&it(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function mt(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function yt(e,n,t){t=be(t);for(var r=0;r<n.length;r++)e.addEventListener(n[r],t);return{cancel:be((function(){for(var r=0;r<n.length;r++)e.removeEventListener(n[r],t)}))}}var gt=["webkit","moz","ms","o"];function Et(e,n,t){e.style[n]=t;for(var r=nn(n),o=0;o<gt.length;o++)e.style[""+gt[o]+r]=t}var Pt=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],bt=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function _t(e,n,t,r){return void 0===r&&(r=1e3),new z((function(o,i){var a=it(e);if(!a)return o();var u,c,s,d,f=!1;function l(){clearTimeout(u),clearTimeout(c),s.cancel(),d.cancel()}s=yt(a,Pt,(function(e){e.target===a&&e.animationName===n&&(clearTimeout(u),e.stopPropagation(),s.cancel(),f=!0,c=setTimeout((function(){l(),o()}),r))})),d=yt(a,bt,(function(e){if(e.target===a&&e.animationName===n)return l(),"string"==typeof e.animationName&&e.animationName!==n?i("Expected animation name to be "+n+", found "+e.animationName):o()})),Et(a,"animationName",n),u=setTimeout((function(){if(!f)return l(),o()}),200),t&&t(l)}))}function Ot(e){e.style.setProperty("visibility","")}function Tt(e){e.style.setProperty("visibility","hidden","important")}function St(e){e.style.setProperty("display","")}function xt(e){e.style.setProperty("display","none","important")}function It(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Rt(e,n,t){var r=_t(e,n,t);return St(e),r}function Nt(e,n,t){return _t(e,n,t).then((function(){xt(e)}))}function Ct(e,n){e.classList.add(n)}function kt(e,n){e.classList.remove(n)}function jt(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Wt(e,n){n=be(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&It(r)},c=function(){i||(n(),u())};if(jt(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){jt(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+se()+"__"),r.style.display="none",pt(r).then((function(e){(o=function(e){if(!V(e))throw new Error("Expected window to be same domain");return e}(e)).addEventListener("unload",c)})),e.appendChild(r),t=He((function(){jt(e)&&c()}),1e3),{cancel:u}}function At(e,n){void 0===n&&(n=window.document);for(var t=0,r=Xn("script",e);t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var a=n.createElement("script");a.text=o.textContent,i.replaceChild(a,o)}}}function Lt(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,v,m=function(){if(!p&&Hn(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==h)&&n({width:t,height:r}),l=t,h=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=He(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=He(m,10*s)):v=He(m,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Dt(e){var n=Gn();if(n&&"function"==typeof n.getEntries)for(var t=n.getEntries(),r=0;r<t.length;r++){var o=t[r];if(o&&o.name&&0===o.name.indexOf(e)&&"number"==typeof o.duration)return Math.floor(o.duration)}}function Mt(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}function qt(e){for(;e.parentNode;)e=e.parentNode;if(Mt(e))return e}function Ft(e){var n=qt(e);if(n.host)return n.host}function zt(e){var n=Ft(e);if(!n)throw new Error("Element is not in shadow dom");if(Mt(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+se(),r=document.createElement("slot");r.setAttribute("name",t),e.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",t),n.appendChild(o),o}function Ut(e){var n=function n(t){return e.removeEventListener("focus",n),t.preventDefault(),e.blur(),!1};e.addEventListener("mousedown",(function(){e.addEventListener("focus",n),setTimeout((function(){e.removeEventListener("focus",n)}),1)}))}function Bt(){try{throw new Error("_")}catch(e){return e.stack||""}}var Yt="undefined"!=typeof document?document.currentScript:null,Ht=ve((function(){if(Yt)return Yt;if(Yt=function(){try{var e=Bt(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch(e){}}())return Yt;throw new Error("Can not determine current script")})),Gt=se(),Vt=ve((function(){var e;try{e=Ht()}catch(e){return Gt}var n=e.getAttribute(Nn.UID);return n&&"string"==typeof n||(n=e.getAttribute(Nn.UID+"-auto"))&&"string"==typeof n||(n=se(),e.setAttribute(Nn.UID+"-auto",n)),n}));function Jt(e){var n=e.name,t=e.lifetime,r=void 0===t?12e5:t;return Ee(Jt,(function(){var e,t="__"+n+"_storage__",o=se();function i(n){var r,i=et();if(e&&(r=e),!r&&i){var a=window.localStorage.getItem(t);a&&(r=JSON.parse(a))}r||(r=de()[t]),r||(r={id:o}),r.id||(r.id=o),e=r;var u=n(r);return i?window.localStorage.setItem(t,JSON.stringify(r)):de()[t]=r,e=null,u}function a(){return i((function(e){return e.id}))}function u(e){return i((function(n){var t=n.__session__,o=Date.now();return t&&o-t.created>r&&(t=null),t||(t={guid:se(),created:o}),n.__session__=t,e(t)}))}return{getState:i,getID:a,isStateFresh:function(){return a()===o},getSessionState:function(e){return u((function(n){return n.state=n.state||{},e(n.state)}))},getSessionID:function(){return u((function(e){return e.guid}))}}}),[{name:n,lifetime:r}])}function $t(){return Jt({name:"belter_experiment"})}function Zt(e){return $t().getSessionState((function(n){return n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(e)&&(n.loggedBeacons.push(e),!0)}))}function Xt(e){return Math.floor(Math.random()*e)}function Kt(e){var n,t=e.name,r=e.sample,o=void 0===r?50:r,i=e.logTreatment,a=void 0===i?Pe:i,u=e.logCheckpoint,c=void 0===u?Pe:u,s=e.sticky,d=void 0===s||s?function(e){return $t().getState((function(n){return n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[e]=n.throttlePercentiles[e]||Xt(100),n.throttlePercentiles[e]}))}(t):Xt(100),f=t+"_"+(n=d<o?"test":o>=50||o<=d&&d<2*o?"control":"throttle"),l=!1,h=!1;try{window.localStorage&&window.localStorage.getItem(t)&&(h=!0)}catch(e){}return{isEnabled:function(){return"test"===n||h},isDisabled:function(){return"test"!==n&&!h},getTreatment:function(){return f},log:function(e,n){return void 0===n&&(n={}),l?(Zt(f+"_"+JSON.stringify(n))&&a({name:t,treatment:f,payload:n,throttle:d}),Zt(f+"_"+e+"_"+JSON.stringify(n))&&c({name:t,treatment:f,checkpoint:e,payload:n,throttle:d}),this):this},logStart:function(e){return void 0===e&&(e={}),l=!0,this.log("start",e)},logComplete:function(e){return void 0===e&&(e={}),this.log("complete",e)}}}function Qt(e){var n=e.name,t=e.version,r=void 0===t?"latest":t,o=de(),i="__"+n+"__"+r+"_global__",a=o[i]=o[i]||{};return{get:function(e,n){return n=n||{},a[e]=a[e]||n}}}var er=[];function nr(e){var n=e.url,t=e.method,r=void 0===t?"get":t,o=e.headers,i=void 0===o?{}:o,a=e.json,u=e.data,c=e.body,s=e.win,d=void 0===s?window:s,f=e.timeout,l=void 0===f?0:f;return new z((function(e,t){if(a&&u||a&&c||u&&a)throw new Error("Only options.json or options.data or options.body should be passed");for(var o={},s=0,f=Object.keys(i);s<f.length;s++){var h=f[s];o[h.toLowerCase()]=i[h]}a?o["content-type"]=o["content-type"]||"application/json":(u||c)&&(o["content-type"]=o["content-type"]||"application/x-www-form-urlencoded; charset=utf-8"),o.accept=o.accept||"application/json";for(var p=0;p<er.length;p++)for(var w=(0,er[p])(),v=0,m=Object.keys(w);v<m.length;v++){var y=m[v];o[y.toLowerCase()]=w[y]}var g=new d.XMLHttpRequest;for(var E in g.addEventListener("load",(function(){var o=function(e){void 0===e&&(e="");for(var n={},t=0,r=e.trim().split("\n");t<r.length;t++){var o=r[t].split(":"),i=o[0],a=o.slice(1);n[i.toLowerCase()]=a.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: no response status code."));var i=o["content-type"],a=i&&(0===i.indexOf("application/json")||0===i.indexOf("text/json")),u=this.responseText;try{u=JSON.parse(u)}catch(e){if(a)return t(new Error("Invalid json: "+this.responseText+"."))}return e({status:this.status,headers:o,body:u})}),!1),g.addEventListener("error",(function(e){t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: "+e.toString()+"."))}),!1),g.open(r,n,!0),o)o.hasOwnProperty(E)&&g.setRequestHeader(E,o[E]);a?c=JSON.stringify(a):u&&(c=Object.keys(u).map((function(e){return encodeURIComponent(e)+"="+(u?encodeURIComponent(u[e]):"")})).join("&")),g.timeout=l,g.ontimeout=function(){t(new Error("Request to "+r.toLowerCase()+" "+n+" has timed out"))},g.send(c)}))}function tr(e){er.push(e)}var rr=!0;function or(e,n,t){t.value=ve(t.value,{name:n,thisNamespace:!0})}function ir(e,n,t){t.value=ge(t.value,{name:n})}function ar(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function ur(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function cr(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function sr(e){return cr(e)+"px"}function dr(e){return"number"==typeof e?sr(e):ar(e)?e:sr(e)}function fr(e,n){return parseInt(e*cr(n)/100,10)}function lr(e,n){if("number"==typeof e)return e;if(ar(e))return fr(n,e);if(ur(e))return cr(e);throw new Error("Can not normalize dimension: "+e)}function hr(e,n){var t=(void 0===n?{}:n).timeout,r=[],o=[],i=setTimeout((function(){r.length&&o.push(z.asyncReject(new Error("Expected "+r[0]+" to be called")))}),void 0===t?5e3:t),a=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw o.push(z.asyncReject(d)),d;return o.push(z.resolve(s)),s}},u=function(e,n){return void 0===n&&(n=Pe),function(){var t;o.push(z.asyncReject(new Error("Expected "+e+" to not be called")));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(t=n).call.apply(t,[this].concat(i))}},c=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw d;return o.push(z.resolve(s).then((function(){throw new Error("Expected "+e+" to throw an error")}),Pe)),s}},s=function e(){return z.try((function(){if(o.length)return o.pop()})).then((function(){return o.length?e():r.length?z.delay(10).then(e):void 0}))};return o.push(z.try((function(){return e({expect:a,avoid:u,expectError:c,error:u,wait:s})}))),s().then((function(){clearTimeout(i)}))}}])},e.exports=t()})),D=i(L),M=u(Object.assign({__proto__:null,default:D,__moduleExports:L},D));function q(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div");f.setAttribute("id",n);var l=o.createElement("style");return i.cspNonce&&l.setAttribute("nonce",i.cspNonce),l.appendChild(o.createTextNode("\n #"+n+" {\n display: block;\n position: relative;\n width: "+s+";\n height: "+d+";\n }\n #"+n+" > iframe {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),t.allowPaymentRequest="true",f.appendChild(t),f.appendChild(r),f.appendChild(l),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}}!function(e){e.VISIBLE="is-visible",e.INVISIBLE="is-invisible"}(c||(c={}));var F,z=function(e){var n,t,r,o,i,a;if(null!=(n=e.state)&&n.__createToken)return e.state.__createToken;if(null!=(t=e.parent)&&null!=(r=t.state)&&r.__createToken)return e.parent.state.__createToken;if(null!=(o=e.state)&&null!=(i=o.parent)&&null!=(a=i.state)&&a.__createToken)return e.state.parent.state.__createToken;throw new Error("Index is not registered")},U=function(){var e=n(s.mark((function e(n,t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(n)(t);case 2:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),B=A.create({tag:"monei-card-input",url:E.cardInputUrl,dimensions:{width:"100%",height:"auto"},autoResize:{width:!1,height:!0},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1,alias:"orderId"},paymentId:{type:A.PROP_TYPE.STRING,required:!1},onBlur:{type:A.PROP_TYPE.FUNCTION,required:!1},onEnter:{type:A.PROP_TYPE.FUNCTION,required:!1},onChange:{type:A.PROP_TYPE.FUNCTION,required:!1},onFocus:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},placeholders:{type:A.PROP_TYPE.OBJECT,required:!1},errorMessages:{type:A.PROP_TYPE.OBJECT,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}},validate:m,containerTemplate:function(e){return e.state.__createToken=function(n){if(void 0===n&&(n={}),!e.frame)throw new Error("CardInput instance is not registered");return W.send(e.frame.contentWindow,"CREATE_TOKEN",n,{domain:E.domain})},q(e)},prerenderTemplate:function(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body");o.style.margin="0";var i=n.createElement("div");i.style.height="36px",i.style.boxSizing="border-box";var a=t.style||t.innerStyle;return null!=a&&a.base&&Object.assign(i.style,d(a.base)),null!=a&&a.loading&&Object.assign(i.style,d(a.loading)),o.appendChild(i),r.appendChild(o),r}}),Y=A.create({tag:"monei-payment-modal",url:E.paymentModalUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!0},isOpen:{type:A.PROP_TYPE.BOOLEAN,required:!0},language:{type:A.PROP_TYPE.STRING,required:!1},generatePaymentToken:{type:A.PROP_TYPE.BOOLEAN,required:!1},fullscreen:{type:A.PROP_TYPE.BOOLEAN,required:!1},customer:{type:A.PROP_TYPE.OBJECT,required:!1},paymentMethod:{type:A.PROP_TYPE.OBJECT,required:!1},allowedPaymentMethods:{type:A.PROP_TYPE.ARRAY,required:!1},customDomain:{type:A.PROP_TYPE.STRING,required:!1},billingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},shippingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},onResult:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1}}}),H=function(){var e=n(s.mark((function e(r){var o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=document.createElement("div"),i=document.body.style.overflow,document.body.appendChild(o),e.abrupt("return",new Promise(function(){var e=n(s.mark((function e(n,a){var u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=new Y(t({},r,{isOpen:!0,onOpen:function(){Object.assign(document.body.style,{overflow:"hidden"}),Object.assign(o.style,{position:"fixed",overflow:"hidden",display:"block",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",zIndex:99999})},onResult:function(e){n(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)},onError:function(e){a(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)}})),e.next=3,u.render(o);case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=n(s.mark((function e(r,o,i){var a,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(i,r.cspNonce,{namespace:"monei-paypal",cspNonce:r.cspNonce});case 2:return a={layout:"horizontal",tagline:!1},null==r.onLoad||r.onLoad(!0),e.next=6,window["monei-paypal"].Buttons({createOrder:function(){var e=n(s.mark((function e(){var n,t;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O({paymentId:r.paymentId,accountId:r.accountId,sessionId:r.sessionId,amount:r.amount,currency:r.currency,paymentMethod:{paypal:{}}});case 3:return u=(t=e.sent).paymentToken,e.abrupt("return",null==(n=t.paypal)?void 0:n.orderId);case 8:return e.prev=8,e.t0=e.catch(0),null==r.onError||r.onError(e.t0),e.abrupt("return");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),onApprove:function(e){e.orderID?r.onSubmit({token:u}):null==r.onError||r.onError(e)},style:t({},a,r.style)}).render(o.__container);case 6:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),V=A.create({tag:"monei-paypal",url:E.paypalUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){if(e.state.__container=e.container,!e.props.accountId&&!e.props.paymentId)throw new Error("You need to provide paymentId or accountId");return q(e)},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},cspNonce:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onLoadPayPal:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return G.bind(null,e.props,e.state)}}}});!function(e){e.BEFORE_CLOSE="BEFORE_CLOSE"}(F||(F={}));var J,$=A.create({tag:"monei-bizum",url:E.bizumUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(F.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(F.BEFORE_CLOSE)}}}}}),Z=A.create({tag:"monei-bizum-button",url:E.bizumButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new $(t({amount:e.amount,currency:e.currency},n,{onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}});(J||(J={})).BEFORE_CLOSE="BEFORE_CLOSE";var X,K=A.create({tag:"monei-cofidis",url:E.cofidisUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(J.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(J.BEFORE_CLOSE)}}}}}),Q=A.create({tag:"monei-cofidis-widget",url:E.cofidisWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ee=A.create({tag:"monei-cofidis-button",url:E.cofidisButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new K(t({},n,{amount:e.amount,currency:e.currency,accountId:e.accountId,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}});(X||(X={})).BEFORE_CLOSE="BEFORE_CLOSE";var ne,te,re,oe=A.create({tag:"monei-cofidis-loan",url:E.cofidisLoanUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var h=o.createElement("style");return i.cspNonce&&h.setAttribute("nonce",i.cspNonce),h.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(h),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(X.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(X.BEFORE_CLOSE)}}}}}),ie=oe,ae=A.create({tag:"monei-cofidis-loan-widget",url:E.cofidisLoanWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ue=ae,ce=A.create({tag:"monei-cofidis-loan-button",url:E.cofidisLoanButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=new oe(t({},n,{amount:e.amount,currency:e.currency,accountId:e.accountId,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return o.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),o.render(r)}}}}}),se=ce,de=A.create({tag:"monei-google-pay",url:E.googlePayUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}}}),fe=function(){var e=n(s.mark((function e(r,o,i){var a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(a=new window.ApplePaySession(3,o)).onvalidatemerchant=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,R(t({},i,{validationUrl:n.validationURL}));case 3:a.completeMerchantValidation(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a.abort();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),a.onpaymentauthorized=function(){var e=n(s.mark((function e(n){var t,o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=JSON.stringify(n.payment.token),o=window.btoa(t),e.prev=2,e.next=5,O({accountId:r.accountId,paymentId:r.paymentId,sessionId:r.sessionId,paymentMethod:{applePay:{token:o}}});case 5:r.onSubmit({token:(i=e.sent).paymentToken,error:i.error}),a.completePayment({status:window.ApplePaySession.STATUS_SUCCESS}),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),null==r.onError||r.onError(e.t0),a.completePayment({status:window.ApplePaySession.STATUS_FAILURE});case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(n){return e.apply(this,arguments)}}(),a.begin();case 4:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),le=A.create({tag:"monei-payment-request",url:E.paymentRequestUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__isApplePaySupported:{type:A.PROP_TYPE.BOOLEAN,required:!1,value:function(){try{var e;return null==(e=window.ApplePaySession)?void 0:e.canMakePayments()}catch(e){return!1}}},__onApplePayButtonClicked:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return fe.bind(null,e.props)}}}});(ne=exports.NextActionType||(exports.NextActionType={})).CONFIRM="CONFIRM",ne.FRICTIONLESS_CHALLENGE="FRICTIONLESS_CHALLENGE",ne.BIZUM_CHALLENGE="BIZUM_CHALLENGE",ne.CHALLENGE="CHALLENGE",ne.COMPLETE="COMPLETE",(te=exports.CardBrand||(exports.CardBrand={})).Visa="visa",te.Mastercard="mastercard",te.Amex="amex",te.Discover="discover",te.Diners="diners",te.JCB="jcb",te.Maestro="maestro",te.UnionPay="unionpay",te.Elo="elo",te.Hipercard="hipercard",(re=exports.TransactionType||(exports.TransactionType={})).AUTH="AUTH",re.SALE="SALE",re.PAYOUT="PAYOUT",re.VERIF="VERIF";var he=N,pe=y;exports.Bizum=Z,exports.BizumModal=$,exports.CardInput=B,exports.Cofidis=ee,exports.CofidisLoan=ce,exports.CofidisLoanModal=oe,exports.CofidisLoanWidget=ae,exports.CofidisModal=K,exports.CofidisPay=se,exports.CofidisPayModal=ie,exports.CofidisPayWidget=ue,exports.CofidisWidget=Q,exports.GooglePay=de,exports.PayPal=V,exports.PaymentModal=Y,exports.PaymentRequest=le,exports.api=he,exports.config=E,exports.confirmPayment=H,exports.createToken=U,exports.utils=pe;
2
2
  //# sourceMappingURL=components.cjs.production.min.js.map