!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.cryptopay=n():e.cryptopay=n()}(window,(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 Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=31)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAPIHost=function(){return"pay.crypto.com"},n.getApiProtocol=function(){return"https"},n.getEnv=o,n.getProtocol=function(){return"https"},n.getSDKHost=function(){return"js.crypto.com"},n.getSDKPath=function(){return r.SDK_PATHS.ROOT},n.getVersion=function(){return"1.7.3"},n.isProduction=function(){return"production"===r.ENV.PRODUCTION},n.isStaging=function(){return"production"===r.ENV.STAGING},n.isTest=function(){return!1};var r=t(4);function o(){return"production"}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ZalgoPromise",{enumerable:!0,get:function(){return r.ZalgoPromise}});var r=t(32)},function(e,n,t){"use strict";(function(e,r){Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendableError=void 0,n.arrayFrom=function(e){return Array.prototype.slice.call(e)},n.assertExists=function(e,n){if(null==n)throw new Error(`Expected ${e} to be present`);return n},n.awaitKey=function(e,n){return new o.ZalgoPromise(t=>{let r=e[n];if(r)return t(r);delete e[n],Object.defineProperty(e,n,{configurable:!0,set(e){r=e,r&&t(r)},get:()=>r})})},n.base64decode=function(n){if("function"==typeof atob)return decodeURIComponent(Array.prototype.map.call(atob(n),e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join(""));if(void 0!==e)return e.from(n,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")},n.base64encode=s,n.camelToDasherize=function(e){return e.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())},n.capitalizeFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},n.cleanup=function(e){const n=[];let t,r=!1;const i={set:(n,t)=>(r||(e[n]=t,i.register(()=>{delete e[n]})),t),register(e){const o=v(()=>e(t));return r?e(t):n.push(o),{cancel:()=>{const e=n.indexOf(o);-1!==e&&n.splice(e,1)}}},all(e){t=e;const i=[];for(r=!0;n.length;){const e=n.shift();i.push(e())}return o.ZalgoPromise.all(i).then(g)}};return i},n.constHas=void 0,n.copyProp=function(e,n,t,r){if(e.hasOwnProperty(t)){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r)}else n[t]=r},n.cycle=function e(n){return o.ZalgoPromise.try(n).then(()=>e(n))},n.dasherizeToCamel=function(e){return e.replace(/-([a-z])/g,e=>e[1].toUpperCase())},n.debounce=function(e,n=100){let t;return c((function(){clearTimeout(t),t=setTimeout(()=>e.apply(this,arguments),n)}),u(e)+"::debounced")},n.dedupeErrors=function(e){const n=[],t={};return r=>{if(-1!==n.indexOf(r))return;n.push(r);const o=E(r);return t[o]?void 0:(t[o]=!0,e(r))}},n.defineLazyProp=C,n.deserializePrimitive=A,n.domainMatches=function(e,n){const t=(e=e.split("://")[1]).indexOf(n);return-1!==t&&e.slice(t)===n},n.dotify=function e(n,t="",r={}){t=t?t+".":t;for(const o in n)n.hasOwnProperty(o)&&void 0!==n[o]&&null!==n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every(e=>"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}`]=T(n[o]));return r},n.eventEmitter=function(){const e={};let n={};const t={on(e,t){const r=n[e]=n[e]||[];r.push(t);let o=!1;return{cancel(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once(e,n){const r=t.on(e,()=>{r.cancel(),n()});return r},trigger(e,...t){const r=n[e],i=[];if(r)for(const e of r)i.push(o.ZalgoPromise.try(()=>e(...t)));return o.ZalgoPromise.all(i).then(g)},triggerOnce:(n,...r)=>e[n]?o.ZalgoPromise.resolve():(e[n]=!0,t.trigger(n,...r)),reset(){n={}}};return t},n.extend=function(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e},n.get=function(e,n,t){if(!n)return t;const r=n.split(".");for(let n=0;n<r.length;n++){if("object"!=typeof e||null===e)return t;e=e[r[n]]}return void 0===e?t:e},n.getEmptyObject=h,n.getFunctionName=u,n.getGlobal=function(){if("undefined"!=typeof window)return window;if(void 0!==r)return r;if("undefined"!=typeof __GLOBAL__)return __GLOBAL__;throw new Error("No global found")},n.getObjectID=l,n.getOrSet=function(e,n,t){if(e.hasOwnProperty(n))return e[n];const r=t();return e[n]=r,r},n.hashStr=function(e){let n=0;for(let 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))},n.identity=function(e){return e},n.inlineMemoize=function(e,n,t=[]){const r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=p(t);if(r.hasOwnProperty(o))return r[o];return r[o]=n(...t)},n.isDefined=function(e){return null!=e},n.isElement=a,n.isFloat=x,n.isInteger=S,n.isObject=j,n.isObjectObject=R,n.isPlainObject=M,n.isRegex=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},n.match=b,n.max=function(...e){return Math.max(...e)},n.memoize=m,n.memoizePromise=function(e){let n={};function t(...t){const r=p(t);return n.hasOwnProperty(r)||(n[r]=o.ZalgoPromise.try(()=>e.apply(this,arguments)).finally(()=>{delete n[r]})),n[r]}return t.reset=()=>{n={}},c(t,u(e)+"::promiseMemoized")},n.memoizedValues=void 0,n.min=function(...e){return Math.min(...e)},n.noop=g,n.objFilter=function(e,n=Boolean){const t={};for(const r in e)e.hasOwnProperty(r)&&n(e[r],r)&&(t[r]=e[r]);return t},n.once=v,n.patchMethod=function(e,n,t){const r=e[n];e[n]=function(){return t({context:this,args:Array.prototype.slice.call(arguments),original:r,callOriginal:()=>r.apply(this,arguments)})}},n.perc=function(e,n){return Math.round(e*n/100)},n.promiseDebounce=function(e,n=50){let t,r;return c((function(){r&&clearTimeout(r);const i=t=t||new o.ZalgoPromise;return r=setTimeout(()=>{t=null,r=null,o.ZalgoPromise.try(e).then(e=>{i.resolve(e)},e=>{i.reject(e)})},n),i}),u(e)+"::promiseDebounced")},n.promiseIdentity=function(e){return o.ZalgoPromise.resolve(e)},n.promisify=function(e,n={}){function t(){return o.ZalgoPromise.try(e,this,arguments)}n.name&&(t.displayName=n.name+":promisified");return c(t,u(e)+"::promisified")},n.regex=I,n.regexAll=function(e,n){const t=[];let r=0;for(;;){const o=I(e,n,r);if(!o)break;t.push(o),r=b.end}return t},n.regexMap=function(e,n,t){const r=[];return e.replace(n,(function(e){r.push(t?t.apply(null,arguments):e)})),r},n.regexTokenize=function(e,n){const t=[];return e.replace(n,e=>(t.push(e),"")),t},n.removeFromArray=function(e,n){const t=e.indexOf(n);-1!==t&&e.splice(t,1)},n.replaceObject=function e(n,t,r=""){if(Array.isArray(n)){const o=n.length,i=[];for(let a=0;a<o;a++)C(i,a,()=>{const o=r?`${r}.${a}`:""+a,i=n[a];let u=t(i,a,o);return(M(u)||Array.isArray(u))&&(u=e(u,t,o)),u});return i}if(M(n)){const o={};for(const i in n)n.hasOwnProperty(i)&&C(o,i,()=>{const o=r?`${r}.${i}`:""+i,a=n[i];let u=t(a,i,o);return(M(u)||Array.isArray(u))&&(u=e(u,t,o)),u});return o}throw new Error("Pass an object or array")},n.roundUp=function(e,n){const t=e%n;return t?e-t+n:e},n.safeInterval=O,n.safeTimeout=function(e,n){const t=O(()=>{(n-=100)<=0&&(t.cancel(),e())},100)},n.serializePrimitive=T,n.setFunctionName=c,n.strHashStr=function(e){let n="";for(let t=0;t<e.length;t++){let 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},n.stringify=function(e){if("string"==typeof e)return e;if(e&&e.toString&&"function"==typeof e.toString)return e.toString();return Object.prototype.toString.call(e)},n.stringifyError=E,n.stringifyErrorMessage=function(e){const n=`<unknown error: ${Object.prototype.toString.call(e)}>`;if(!e)return n;if(e instanceof Error)return e.message||n;if("string"==typeof e.message)return e.message||n;return n},n.svgToBase64=function(e){return"data:image/svg+xml;base64,"+s(e)},n.tryCatch=function(e){let n,t;try{n=e()}catch(e){t=e}return{result:n,error:t}},n.undotify=function(e){const n={};for(let t in e){if(!e.hasOwnProperty(t)||"string"!=typeof e[t])continue;let r=e[t];t.match(/^.+\[\]$/)?(t=t.slice(0,-2),r=r.split(",").map(A)):r=A(r);let o=n;const i=t.split(".");for(let e=0;e<i.length;e++){const n=i[e],t=e+1===i.length,a=!t&&S(i[e+1]);if("constructor"===n||"prototype"===n||"__proto__"===n)throw new Error("Disallowed key: "+n);t?o[n]=r:o=o[n]=o[n]||(a?[]:{})}}return n},n.unique=function(e){const n={};for(const t of e)n[t]=!0;return Object.keys(n)},n.uniqueID=f,n.values=_,n.weakMapMemoizePromise=n.weakMapMemoize=void 0;var o=t(1),i=t(22);function a(e){let 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 u(e){return e.name||e.__name__||e.displayName||"anonymous"}function c(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function s(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))).replace(/[=]/g,"");if(void 0!==e)return e.from(n,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function f(){const e="0123456789abcdef";return`uid_${"xxxxxxxxxx".replace(/./g,()=>e.charAt(Math.floor(Math.random()*e.length)))}_${s((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}`}let d;function l(e){if(d=d||new i.WeakMap,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");let n=d.get(e);return n||(n=`${typeof e}:${f()}`,d.set(e,n)),n}function p(e){try{return JSON.stringify(Array.prototype.slice.call(e),(e,n)=>"function"==typeof n?`memoize[${l(n)}]`:a(n)?{}:n)}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function h(){return{}}let w=0,y=0;function m(e,n={}){const{thisNamespace:t=!1,time:r}=n;let o,a,s=w;w+=1;const f=function(...n){let u,c;s<y&&(o=null,a=null,s=w,w+=1),t?(a=a||new i.WeakMap,u=a.getOrSet(this,h)):u=o=o||{};try{c=p(n)}catch{return e.apply(this,arguments)}let f=u[c];if(f&&r&&Date.now()-f.time<r&&(delete u[c],f=null),f)return f.value;const d=Date.now(),l=e.apply(this,arguments);return u[c]={time:d,value:l},l};f.reset=()=>{o=null,a=null};return c(f,(n.name||u(e))+"::memoized")}m.clear=()=>{y=w};function g(...e){}function v(e){let n=!1;return c((function(){if(!n)return n=!0,e.apply(this,arguments)}),u(e)+"::once")}function b(e,n){const t=e.match(n);if(t)return t[1]}function E(e,n=1){if(n>=3)return"stringifyError stack overflow";try{if(!e)return`<unknown error: ${Object.prototype.toString.call(e)}>`;if("string"==typeof e)return e;if(e instanceof Error){const n=e&&e.stack,t=e&&e.message;if(n&&t)return-1!==n.indexOf(t)?n:`${t}\n${n}`;if(n)return n;if(t)return t}return e&&e.toString&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+E(e,n+1)}}function _(e){if(Object.values)return Object.values(e);const n=[];for(const t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n}const P=m(_);function O(e,n){let t;return function r(){t=setTimeout(()=>{e(),r()},n)}(),{cancel(){clearTimeout(t)}}}function S(e){return Boolean(e.match(/^[0-9]+$/))}function x(e){return Boolean(e.match(/^[0-9]+\.[0-9]+$/))}function T(e){return e.toString()}function A(e){return"true"===e||"false"!==e&&(S(e)?parseInt(e,10):x(e)?parseFloat(e):e)}function C(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:()=>{delete e[n];const r=t();return e[n]=r,r},set:t=>{delete e[n],e[n]=t}})}function j(e){return"object"==typeof e&&null!==e}function R(e){return j(e)&&"[object Object]"===Object.prototype.toString.call(e)}function M(e){if(!R(e))return!1;const n=e.constructor;if("function"!=typeof n)return!1;const t=n.prototype;return!!R(t)&&!!t.hasOwnProperty("isPrototypeOf")}function I(e,n,t=0){"string"==typeof e&&(e=new RegExp(e));const r=n.slice(t).match(e);if(!r)return;const 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:e=>i?`${i.slice(0,t+o)}${e}${i.slice(o+i.length)}`:""}}n.memoizedValues=P;n.weakMapMemoize=e=>{const n=new i.WeakMap;return function(t){return n.getOrSet(t,()=>e.call(this,t))}};n.weakMapMemoizePromise=e=>{const n=new i.WeakMap;return function(t){return n.getOrSet(t,()=>e.call(this,t).finally(()=>{n.delete(t)}))}};n.constHas=(e,n)=>-1!==P(e).indexOf(n);class D extends Error{constructor(e){super(e),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}n.ExtendableError=D}).call(this,t(15).Buffer,t(23))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPublishableKey=function(){const e=s(o.SDK_QUERY_KEYS.PUBLISHABLE_KEY);if(!e)throw new Error(`Expected ${o.SDK_QUERY_KEYS.PUBLISHABLE_KEY} parameter in sdk url`);return e},n.getSDKQueryParam=s,n.getSDKQueryParamBool=function(e,n){return s(e,n?n.toString():o.QUERY_BOOL.FALSE)===o.QUERY_BOOL.TRUE},n.getSDKQueryParams=c,n.getSDKScript=a,n.getSDKScriptUrl=u;var r=t(8),o=t(4),i=t(0);function a(){return(0,r.inlineMemoize)(a,()=>{const{host:e,path:n}={host:(0,i.getSDKHost)(),path:(0,i.getSDKPath)()},t=(0,r.getScript)({host:e,path:n});if(!t)throw new Error(`Crypto.com Pay SDK script not present on page! Excected to find <script src="${(0,i.getProtocol)()}://${e}${n}">`);return t})}function u(){const e=a().getAttribute("src");if(!e)throw new Error("Cannot find src for sdk script");return e}function c(){const e=u();return(0,r.parseQuery)(e.split("?")[1]||"")}function s(e,n){return c()[e]||n}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"API_HOSTS",{enumerable:!0,get:function(){return r.API_HOSTS}}),n.API_PATHS=void 0,Object.defineProperty(n,"API_PROTOCOLS",{enumerable:!0,get:function(){return r.API_PROTOCOLS}}),n.HTTP_STATUS_CODE=n.HTTP_HEADERS=n.HTTP_CONTENT_TYPE=n.ERROR_MESSAGE=n.ENV=n.DEFAULT_ERROR_MESSAGE_NAME=n.CUSTOMER_PROVIDED_EMAIL_INVOICE_KEY=n.CUSTOMER_PROVIDED_EMAIL_CHECKOUT_KEY=void 0,Object.defineProperty(n,"PROTOCOLS",{enumerable:!0,get:function(){return r.PROTOCOLS}}),n.QUERY_BOOL=void 0,Object.defineProperty(n,"SDK_FILE_NAME",{enumerable:!0,get:function(){return r.SDK_FILE_NAME}}),Object.defineProperty(n,"SDK_HOSTS",{enumerable:!0,get:function(){return r.SDK_HOSTS}}),n.WEBSOCKET_API_PATHS=n.SDK_QUERY_KEYS=n.SDK_PATHS=void 0,Object.defineProperty(n,"jsonifyPrimitives",{enumerable:!0,get:function(){return r.jsonifyPrimitives}});var r=t(62);let o=function(e){return e.DEV="development",e.TESTING="testing",e.TEST="test",e.PRODUCTION="production",e.STAGING="staging",e}({});n.ENV=o;n.SDK_PATHS={ROOT:"/sdk",LIBRARY:"/sdk/lib",BUTTON:"/button",CHECKOUT:"/checkout",DOWNLOAD:"/download",QRCODE:"/images/*",INVOICE:"/invoice",ONCHAIN_OUTBOUND:"/refund_outbound",SUBSCRIPTION:"/subscription",BANNER:"/banner"};let i=function(e){return e.PUBLISHABLE_KEY="publishable-key",e.STAGING="staging",e.DEBUG="debug",e}({});n.SDK_QUERY_KEYS=i;n.API_PATHS={CREATE_PAYMENT:"/api/payments",CREATE_SUBSCRIPTION:"/api/subscriptions",SHOW_PAYMENT:"/api/payments/:id",CURRENT_MERCHANT:"/api/current_merchant?publishableKey=:key",SHOW_SUBSCRIPTION:"/api/subscriptions/:id",CANCEL_PAYMENT:"/api/payments/:id/cancel",REFRESH_PAYMENT:"/api/payments/:id/refresh",REFRESH_SUBSCRIPTION:"/api/subscriptions/:id/refresh",SAVE_EMAIL:"/api/customers",CUSTOMER_PROVIDE_INFO:"/api/payments/:id/customer_provided_info",ENABLE_ON_CHAIN_PAYMENT:"/api/payments/:id/enable_onchain",COMMIT_ONCHAIN_REFUND_ADDRESS:"/api/conduct_address",CHECK_ONCHAIN_OUTBOUND_STATUS:"/api/onchain_outbound",SYSTEM_MAINTENANCE_TIME:"/sys/maintenance",WITHDRAW_CURRENCIES:"/api/withdraw_currencies",FUNDING_RESOURCES:"/api/funding_sources",GET_CASHBACK_RATE:"/api/cashback_rate",TRACKING:"/tracking/events",CHAINS:"/api/currency_configs/chains",BASE_TOKENS:"/api/currency_configs/base_tokens",BASE_TOKENS_BY_NETWORK:"/api/currency_configs/base_tokens_by_network",FIATS:"/api/currency_configs/fiats",CURRENCY_CONFIGS:"/api/currency_configs/index",SAVE_CARD_INFO:"/api/customer_cards",SAVE_BILLING_ADDRESS:"/api/customer_cards/:id",CREATE_PURCHASE:"/api/crypto_purchases",PURCHASE_PAY:"/api/crypto_purchases/:id/pay",GET_PURCHASE:"/api/crypto_purchases/:id",REFRESH_PURCHASE:"/api/crypto_purchases/:id/refresh",GET_PURCHASE_PUBLIC:"/api/crypto_purchases/:id/detail_info",SEND_OTP:"/api/crypto_purchases/send_otp",VALIDATE_OTP:"/api/crypto_purchases/validate_otp",TRANSACTION_LIMIT:"/api/crypto_purchases/:id/transaction_limit",UPDATE_PURCHASE_CUSTOMER:"/api/crypto_purchases/update_customer",GET_ASSETS:"/api/crypto_purchases/assets",DELETE_CARD:"/api/customer_cards/:id",GET_TRANSACTION_LIMIT_CONFIG:"/api/crypto_purchase_configs/transaction_limit",SAVE_SESSION_ID:"/api/crypto_purchases/:id/update_session_id",RETRY:"/api/crypto_purchases/:id/retry",UPDATE_NOTIFICATION_SETTING:"/api/customer_accounts/:id/notification_setting",CREATE_WORKD_FLOW_RUN:"/api/onfidos/workflow_run",CHECK_ONFIDO_RESULT:"/api/onfidos/check",GET_TOKEN_PRICE:"/api/crypto_purchases/:currency/rate",GET_COUNTRIES:"/api/support_countries",GET_APPLE_PAY_SESSION:"/api/crypto_purchases/apple_pay_session",REPORT_LOCATION:"/api/pay/v2/payment/location",PAYMENT_SEND_OTP:"/api/customer_accounts/send_otp",PAYMENT_VALIDATE_OTP:"/api/customer_accounts/validate_otp",GET_CUSTOMER_ACCOUNT:"/api/customer_accounts/:id",UPDATE_CUSTOMER_ACCOUNT:"/api/customer_accounts/:id",UPDATE_PAYMENT_EMAIL:"/api/payments/:id/update_customer_email"};n.WEBSOCKET_API_PATHS={PAYMENT:"/pusher/connection"};let a=function(e){return e.CONTENT_TYPE="Content-Type",e.AUTHORIZATION="Authorization",e.X_FRAME_OPTIONS="X-Frame-Options",e.TRACE_ID="X-Pay-Trace-Id",e}({});n.HTTP_HEADERS=a;let u=function(e){return e.TEXT="text/plain",e.HTML="text/html",e.JAVASCRIPT="application/javascript",e}({});n.HTTP_CONTENT_TYPE=u;let c=function(e){return e[e.SUCCESS=200]="SUCCESS",e[e.CLIENT_ERROR=400]="CLIENT_ERROR",e[e.SERVER_ERROR=500]="SERVER_ERROR",e}({});n.HTTP_STATUS_CODE=c;n.QUERY_BOOL={TRUE:"true",FALSE:"false"};n.CUSTOMER_PROVIDED_EMAIL_CHECKOUT_KEY="customer_provided_email_checkout";n.CUSTOMER_PROVIDED_EMAIL_INVOICE_KEY="customer_provided_email_invoice";n.DEFAULT_ERROR_MESSAGE_NAME="statusTip";n.ERROR_MESSAGE=[{code:"cannot_change_email_after_paid",errorName:"cannotChangeEmail"},{code:"daily_amount_limit",errorName:"dailyAmountLimit"},{code:"invalid_currency",errorName:"invalidCurrency"},{code:"api_key_invalid",errorName:"apiKeyInvalid"},{code:"annual_amount_limit",errorName:"annualAmountLimit"},{code:"invalid_amount",errorName:"notProvidedAmount"},{code:"invalid_expire_time",errorName:"invalidExpireTime"}]},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bannerUrl=function(){return a(r.SDK_PATHS.BANNER)},n.buildSDKUrl=a,n.buttonUrl=function(){return a(r.SDK_PATHS.BUTTON)},n.checkoutUrl=function(){return a(r.SDK_PATHS.CHECKOUT)},n.downloadUrl=function(){return a(r.SDK_PATHS.DOWNLOAD)},n.getSDKDomain=i,n.subscriptionUrl=function(){return a(r.SDK_PATHS.SUBSCRIPTION)};var r=t(4),o=t(0);function i(){return`${(0,o.getProtocol)()}://${(0,o.getSDKHost)()}`}function a(e){return`${i()}${e}`}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={BannerTheme:!0,BannerThemeOld:!0,BannerSize:!0,BannerFont:!0,BannerMessage:!0};n.BannerThemeOld=n.BannerTheme=n.BannerSize=n.BannerMessage=n.BannerFont=void 0;var o=t(74);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=t(75);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))}));let a=function(e){return e.WHITE="white-font-on-transparent",e.BLACK="black-font-on-transparent",e.BLACK_ON_GREY="black-font-on-grey",e.WHITE_ON_GREY="white-font-on-grey",e.BLACK_ON_WHITE="black-font-on-white",e}({});n.BannerTheme=a;let u=function(e){return e.DARK="dark",e.LIGHT="light",e}({});n.BannerThemeOld=u;let c=function(e){return e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e.FIT="fit-width",e}({});n.BannerSize=c;let s=function(e){return e.SF_PRO="sf pro text",e.ARIAL="arial",e.HELVETICA="helvetica",e.ROBOTO="roboto",e}({});n.BannerFont=s;let f=function(e){return e.SHOP_NOW="shop-now",e.EARN_REBATE="earn-rebate",e}({});n.BannerMessage=f},function(e,n,t){"use strict";(function(n){n&&n.env&&n.env.ZOID_FRAME_ONLY?(e.exports=t(66),e.exports.default=e.exports):(e.exports=t(67),e.exports.default=e.exports)}).call(this,t(9))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(17);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=t(19);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=t(45);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))}));var a=t(46);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))}));var u=t(25);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===u[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=t(2);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===c[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return c[e]}}))}));var s=t(47);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))}));var f=t(48);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===f[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=t(49);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===d[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return d[e]}}))}));var l=t(50);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===l[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return l[e]}}))}));var p=t(51);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===p[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return p[e]}}))}));var h=t(24);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===h[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return h[e]}}))}));var w=t(18);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===w[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return w[e]}}))}))},function(e,n,t){"use strict";var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(n){try{return r.call(null,e,0)}catch(n){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,f=[],d=!1,l=-1;function p(){d&&s&&(d=!1,s.length?f=s.concat(f):l=-1,f.length&&h())}function h(){if(!d){var e=c(p);d=!0;for(var n=f.length;n;){for(s=f,f=[];++l<n;)s&&s[l].run();l=-1,n=f.length}s=null,d=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(n){try{return o.call(null,e)}catch(n){return o.call(this,e)}}}(e)}}function w(e,n){this.fun=e,this.array=n}function y(){}i.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];f.push(new w(e,n)),1!==f.length||d||c(h)},w.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t(11))&&r.__esModule?r:{default:r};for(var i=[],a=0;a<256;++a)i.push((a+256).toString(16).substr(1));var u=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!(0,o.default)(t))throw TypeError("Stringified UUID is invalid");return t};n.default=u},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t(54))&&r.__esModule?r:{default:r};var i=function(e){return"string"==typeof e&&o.default.test(e)};n.default=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSDKMeta=function(){return(0,r.base64encode)(JSON.stringify({url:(0,o.getSDKScriptUrl)(),version:(0,i.getVersion)()}))};var r=t(8),o=t(3),i=t(0)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.trackingEvent=n.getCustomerFont=void 0;var r=t(6),o=t(16),i=t(3);n.trackingEvent=(e,n)=>{var t,r,a,u,c;let s;try{s=window.localStorage}catch{s=new o.MemoryStorage}const f=(0,o.getTraceId)(s);null===(t=window)||void 0===t||null===(r=t.cryptopay)||void 0===r||null===(a=r.API)||void 0===a||a.trackingEvent({originPageUrl:null===(u=window)||void 0===u||null===(c=u.location)||void 0===c?void 0:c.href,traceId:f,publishableKey:(0,i.getPublishableKey)(),eventType:e,extra:n})};n.getCustomerFont=e=>{switch(e){case r.BannerFont.SF_PRO:return'"SF pro text",';case r.BannerFont.ARIAL:return"Arial,";case r.BannerFont.HELVETICA:return"Helvetica,";case r.BannerFont.ROBOTO:return"Roboto,"}return""}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.API=void 0,n.buildAPIUrl=p,n.callAPI=l,Object.defineProperty(n,"setMerchantOrigin",{enumerable:!0,get:function(){return c.setMerchantOrigin}});var r=t(8),o=t(52),i=t(4),a=t(0),u=t(3),c=t(63);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){d(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l({url:e,method:n,json:t,data:a,token:s}){const d=(0,c.getMerchantOrigin)(),l=f({[i.HTTP_HEADERS.CONTENT_TYPE]:"application/json",[i.HTTP_HEADERS.AUTHORIZATION]:"Bearer "+(s||(0,u.getPublishableKey)()),[i.HTTP_HEADERS.TRACE_ID]:(0,o.v4)()},d&&{"X-Merchant-Origin":d});return(0,r.request)({url:e,method:n,headers:l,json:t,data:a}).then(({status:e,body:n})=>{if(e>=400){const t=n;throw t.error&&t.error.code?{status:e,error:t.error}:{status:e}}return n})}function p(e){return`${(0,a.getApiProtocol)()||(0,a.getProtocol)()}://${(0,a.getAPIHost)()}${e}`}function h(e){return p(i.API_PATHS.SHOW_SUBSCRIPTION.replace(":id",e))}function w(e){return p(i.API_PATHS.SHOW_PAYMENT.replace(":id",e))}function y(e){return p(i.API_PATHS.CANCEL_PAYMENT.replace(":id",e))}function m(e){return p(i.API_PATHS.REFRESH_PAYMENT.replace(":id",e))}function g(e){return p(i.API_PATHS.REFRESH_SUBSCRIPTION.replace(":id",e))}const v={refreshPayment:function(e){return l({method:"post",url:m(e)})},createPayment:function(e){return l({method:"post",url:p(i.API_PATHS.CREATE_PAYMENT),json:f(f({},e),(()=>{const e=(0,c.getMerchantOrigin)();return e?{merchant_origin:e}:{}})())}).then(e=>{const n=(0,c.getMerchantOrigin)();if(n&&e.payment_url)try{const t=new URL(e.payment_url);t.searchParams.set("merchantOrigin",n),e.payment_url=t.toString()}catch{}return e})},createSubscription:function(e){return l({method:"post",url:p(i.API_PATHS.CREATE_SUBSCRIPTION),json:e})},refreshSubscription:function(e){return l({method:"post",url:g(e)})},showSubscription:function(e){return l({method:"get",url:h(e)})},showPayment:function(e){return l({method:"get",url:w(e)})},cancelPayment:function(e){return l({method:"post",url:y(e)})},isStaging:function(){return window.location.hostname===i.SDK_HOSTS[i.ENV.STAGING]},isProduction:function(){return window.location.hostname===i.SDK_HOSTS[i.ENV.PRODUCTION]},getCashbackRate:function(){return l({method:"get",url:p(i.API_PATHS.GET_CASHBACK_RATE)})},trackingEvent:function({originPageUrl:e,traceId:n,publishableKey:t,eventType:r,extra:o}){return l({method:"post",url:p(i.API_PATHS.TRACKING),json:{origin_page_url:e,trace_id:n,publishable_key:t,event_type:r,extra:o}})}};n.API=v},function(e,n,t){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=t(42),o=t(43),i=t(44);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,n){if(a()<n)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=c.prototype:(null===e&&(e=new c(n)),e.length=n),e}function c(e,n,t){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,n,t);if("number"==typeof e){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return s(this,e,n,t)}function s(e,n,t,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer?function(e,n,t,r){if(n.byteLength,t<0||n.byteLength<t)throw new RangeError("'offset' is out of bounds");if(n.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");n=void 0===t&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,t):new Uint8Array(n,t,r);c.TYPED_ARRAY_SUPPORT?(e=n).__proto__=c.prototype:e=l(e,n);return e}(e,n,t,r):"string"==typeof n?function(e,n,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(n,t),o=(e=u(e,r)).write(n,t);o!==r&&(e=e.slice(0,o));return e}(e,n,t):function(e,n){if(c.isBuffer(n)){var t=0|p(n.length);return 0===(e=u(e,t)).length||n.copy(e,0,0,t),e}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(r=n.length)!=r?u(e,0):l(e,n);if("Buffer"===n.type&&i(n.data))return l(e,n.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,n)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,n){if(f(n),e=u(e,n<0?0:0|p(n)),!c.TYPED_ARRAY_SUPPORT)for(var t=0;t<n;++t)e[t]=0;return e}function l(e,n){var t=n.length<0?0:0|p(n.length);e=u(e,t);for(var r=0;r<t;r+=1)e[r]=255&n[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,n){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return U(e).length;default:if(r)return B(e).length;n=(""+n).toLowerCase(),r=!0}}function w(e,n,t){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,n,t);case"utf8":case"utf-8":return x(this,n,t);case"ascii":return T(this,n,t);case"latin1":case"binary":return A(this,n,t);case"base64":return S(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,n,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function m(e,n,t,r,o){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof n&&(n=c.from(n,r)),c.isBuffer(n))return 0===n.length?-1:g(e,n,t,r,o);if("number"==typeof n)return n&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,t):Uint8Array.prototype.lastIndexOf.call(e,n,t):g(e,[n],t,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,n,t,r,o){var i,a=1,u=e.length,c=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||n.length<2)return-1;a=2,u/=2,c/=2,t/=2}function s(e,n){return 1===a?e[n]:e.readUInt16BE(n*a)}if(o){var f=-1;for(i=t;i<u;i++)if(s(e,i)===s(n,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===c)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(t+c>u&&(t=u-c),i=t;i>=0;i--){for(var d=!0,l=0;l<c;l++)if(s(e,i+l)!==s(n,l)){d=!1;break}if(d)return i}return-1}function v(e,n,t,r){t=Number(t)||0;var o=e.length-t;r?(r=Number(r))>o&&(r=o):r=o;var i=n.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(n.substr(2*a,2),16);if(isNaN(u))return a;e[t+a]=u}return a}function b(e,n,t,r){return F(B(n,e.length-t),e,t,r)}function E(e,n,t,r){return F(function(e){for(var n=[],t=0;t<e.length;++t)n.push(255&e.charCodeAt(t));return n}(n),e,t,r)}function _(e,n,t,r){return E(e,n,t,r)}function P(e,n,t,r){return F(U(n),e,t,r)}function O(e,n,t,r){return F(function(e,n){for(var t,r,o,i=[],a=0;a<e.length&&!((n-=2)<0);++a)t=e.charCodeAt(a),r=t>>8,o=t%256,i.push(o),i.push(r);return i}(n,e.length-t),e,t,r)}function S(e,n,t){return 0===n&&t===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(n,t))}function x(e,n,t){t=Math.min(e.length,t);for(var r=[],o=n;o<t;){var i,a,u,c,s=e[o],f=null,d=s>239?4:s>223?3:s>191?2:1;if(o+d<=t)switch(d){case 1:s<128&&(f=s);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&s)<<6|63&i)>127&&(f=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&s)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(c=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(f=c)}null===f?(f=65533,d=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=d}return function(e){var n=e.length;if(n<=4096)return String.fromCharCode.apply(String,e);var t="",r=0;for(;r<n;)t+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return t}(r)}n.Buffer=c,n.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},n.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,n,t){return s(null,e,n,t)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,n,t){return function(e,n,t,r){return f(n),n<=0?u(e,n):void 0!==t?"string"==typeof r?u(e,n).fill(t,r):u(e,n).fill(t):u(e,n)}(null,e,n,t)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,n){if(!c.isBuffer(e)||!c.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var t=e.length,r=n.length,o=0,i=Math.min(t,r);o<i;++o)if(e[o]!==n[o]){t=e[o],r=n[o];break}return t<r?-1:r<t?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,n){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var t;if(void 0===n)for(n=0,t=0;t<e.length;++t)n+=e[t].length;var r=c.allocUnsafe(n),o=0;for(t=0;t<e.length;++t){var a=e[t];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<e;n+=2)y(this,n,n+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<e;n+=4)y(this,n,n+3),y(this,n+1,n+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<e;n+=8)y(this,n,n+7),y(this,n+1,n+6),y(this,n+2,n+5),y(this,n+3,n+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):w.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,n,t,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),n<0||t>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=t)return 0;if(r>=o)return-1;if(n>=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(t>>>=0)-(n>>>=0),u=Math.min(i,a),s=this.slice(r,o),f=e.slice(n,t),d=0;d<u;++d)if(s[d]!==f[d]){i=s[d],a=f[d];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,n,t){return-1!==this.indexOf(e,n,t)},c.prototype.indexOf=function(e,n,t){return m(this,e,n,t,!0)},c.prototype.lastIndexOf=function(e,n,t){return m(this,e,n,t,!1)},c.prototype.write=function(e,n,t,r){if(void 0===n)r="utf8",t=this.length,n=0;else if(void 0===t&&"string"==typeof n)r=n,t=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(t)?(t|=0,void 0===r&&(r="utf8")):(r=t,t=void 0)}var o=this.length-n;if((void 0===t||t>o)&&(t=o),e.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return v(this,e,n,t);case"utf8":case"utf-8":return b(this,e,n,t);case"ascii":return E(this,e,n,t);case"latin1":case"binary":return _(this,e,n,t);case"base64":return P(this,e,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,n,t){var r="";t=Math.min(e.length,t);for(var o=n;o<t;++o)r+=String.fromCharCode(127&e[o]);return r}function A(e,n,t){var r="";t=Math.min(e.length,t);for(var o=n;o<t;++o)r+=String.fromCharCode(e[o]);return r}function C(e,n,t){var r=e.length;(!n||n<0)&&(n=0),(!t||t<0||t>r)&&(t=r);for(var o="",i=n;i<t;++i)o+=z(e[i]);return o}function j(e,n,t){for(var r=e.slice(n,t),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function R(e,n,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+n>t)throw new RangeError("Trying to access beyond buffer length")}function M(e,n,t,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||n<i)throw new RangeError('"value" argument is out of bounds');if(t+r>e.length)throw new RangeError("Index out of range")}function I(e,n,t,r){n<0&&(n=65535+n+1);for(var o=0,i=Math.min(e.length-t,2);o<i;++o)e[t+o]=(n&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function D(e,n,t,r){n<0&&(n=4294967295+n+1);for(var o=0,i=Math.min(e.length-t,4);o<i;++o)e[t+o]=n>>>8*(r?o:3-o)&255}function k(e,n,t,r,o,i){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function N(e,n,t,r,i){return i||k(e,0,t,4),o.write(e,n,t,r,23,4),t+4}function W(e,n,t,r,i){return i||k(e,0,t,8),o.write(e,n,t,r,52,8),t+8}c.prototype.slice=function(e,n){var t,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<e&&(n=e),c.TYPED_ARRAY_SUPPORT)(t=this.subarray(e,n)).__proto__=c.prototype;else{var o=n-e;t=new c(o,void 0);for(var i=0;i<o;++i)t[i]=this[i+e]}return t},c.prototype.readUIntLE=function(e,n,t){e|=0,n|=0,t||R(e,n,this.length);for(var r=this[e],o=1,i=0;++i<n&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,n,t){e|=0,n|=0,t||R(e,n,this.length);for(var r=this[e+--n],o=1;n>0&&(o*=256);)r+=this[e+--n]*o;return r},c.prototype.readUInt8=function(e,n){return n||R(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,n){return n||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,n){return n||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,n){return n||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,n){return n||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,n,t){e|=0,n|=0,t||R(e,n,this.length);for(var r=this[e],o=1,i=0;++i<n&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*n)),r},c.prototype.readIntBE=function(e,n,t){e|=0,n|=0,t||R(e,n,this.length);for(var r=n,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*n)),i},c.prototype.readInt8=function(e,n){return n||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,n){n||R(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt16BE=function(e,n){n||R(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt32LE=function(e,n){return n||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,n){return n||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,n){return n||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,n){return n||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,n){return n||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,n){return n||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||M(this,e,n,t,Math.pow(2,8*t)-1,0);var o=1,i=0;for(this[n]=255&e;++i<t&&(o*=256);)this[n+i]=e/o&255;return n+t},c.prototype.writeUIntBE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||M(this,e,n,t,Math.pow(2,8*t)-1,0);var o=t-1,i=1;for(this[n+o]=255&e;--o>=0&&(i*=256);)this[n+o]=e/i&255;return n+t},c.prototype.writeUInt8=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},c.prototype.writeUInt16LE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):I(this,e,n,!0),n+2},c.prototype.writeUInt16BE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):I(this,e,n,!1),n+2},c.prototype.writeUInt32LE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):D(this,e,n,!0),n+4},c.prototype.writeUInt32BE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):D(this,e,n,!1),n+4},c.prototype.writeIntLE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);M(this,e,n,t,o-1,-o)}var i=0,a=1,u=0;for(this[n]=255&e;++i<t&&(a*=256);)e<0&&0===u&&0!==this[n+i-1]&&(u=1),this[n+i]=(e/a>>0)-u&255;return n+t},c.prototype.writeIntBE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);M(this,e,n,t,o-1,-o)}var i=t-1,a=1,u=0;for(this[n+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[n+i+1]&&(u=1),this[n+i]=(e/a>>0)-u&255;return n+t},c.prototype.writeInt8=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},c.prototype.writeInt16LE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):I(this,e,n,!0),n+2},c.prototype.writeInt16BE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):I(this,e,n,!1),n+2},c.prototype.writeInt32LE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):D(this,e,n,!0),n+4},c.prototype.writeInt32BE=function(e,n,t){return e=+e,n|=0,t||M(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):D(this,e,n,!1),n+4},c.prototype.writeFloatLE=function(e,n,t){return N(this,e,n,!0,t)},c.prototype.writeFloatBE=function(e,n,t){return N(this,e,n,!1,t)},c.prototype.writeDoubleLE=function(e,n,t){return W(this,e,n,!0,t)},c.prototype.writeDoubleBE=function(e,n,t){return W(this,e,n,!1,t)},c.prototype.copy=function(e,n,t,r){if(t||(t=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&r<t&&(r=t),r===t)return 0;if(0===e.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-n<r-t&&(r=e.length-n+t);var o,i=r-t;if(this===e&&t<n&&n<r)for(o=i-1;o>=0;--o)e[o+n]=this[o+t];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+n]=this[o+t];else Uint8Array.prototype.set.call(e,this.subarray(t,t+i),n);return i},c.prototype.fill=function(e,n,t,r){if("string"==typeof e){if("string"==typeof n?(r=n,n=0,t=this.length):"string"==typeof t&&(r=t,t=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(n<0||this.length<n||this.length<t)throw new RangeError("Out of range index");if(t<=n)return this;var i;if(n>>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(i=n;i<t;++i)this[i]=e;else{var a=c.isBuffer(e)?e:B(new c(e,r).toString()),u=a.length;for(i=0;i<t-n;++i)this[i+n]=a[i%u]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,n){var t;n=n||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((t=e.charCodeAt(a))>55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,n,t,r){for(var o=0;o<r&&!(o+t>=n.length||o>=e.length);++o)n[o+t]=e[o];return o}}).call(this,t(23))},function(e,n,t){"use strict";function r(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){const t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),r=[];let o;if(n=n||t.length,e)for(o=0;o<e;o++)r[o]=t[0|Math.random()*n];else{let e;for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",o=0;o<36;o++)r[o]||(e=0|16*Math.random(),r[o]=t[19==o?3&e|8:e])}return r.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryStorage=void 0,n.generateUUID=o,n.getTraceId=void 0;n.MemoryStorage=class{constructor(){r(this,"data",void 0),this.data={}}setItem(e,n){this.data[e]=n}getItem(e){return this.data[e]}removeItem(e){delete this.data[e]}contains(e){return e in this.data}clear(){this.data={}}};n.getTraceId=e=>{try{const n=null==e?void 0:e.getItem("trace_id");if(n)return n;const t=o(32,16);return e.setItem("trace_id",t),t}catch{return o(32,16)}}},function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.getUserAgent=o,n.isAndroid=d,n.isAndroidWebview=g,n.isApplePaySupported=function(){try{if(window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments())return!0}catch(e){return!1}return!1},n.isChrome=E,n.isDevice=function(e=o()){if(e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i))return!0;return!1},n.isEdgeIOS=s,n.isElectron=v,n.isFacebookWebView=u,n.isFirefox=function(e=o()){return/Firefox/i.test(e)},n.isFirefoxIOS=c,n.isGoogleSearchApp=h,n.isIE=function(){if(window.document.documentMode)return!0;return Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))},n.isIECompHeader=function(){const e=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');if(e&&n)return!0;return!1},n.isIEIntranet=function(){if(window.document.documentMode)try{const e=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=e,!0)}catch(e){return!1}return!1},n.isIOS14=p,n.isIos=l,n.isIosWebview=y,n.isMacOsCna=b,n.isOperaMini=f,n.isQQBrowser=w,n.isSFVC=m,n.isSFVCorSafari=function(e=o()){if(l(e)){const n=m(e),t=p(e)?r.sfvcScreens[window.outerHeight]:null;if(!t)return!1;const o=window.innerHeight,i=Math.round(window.screen.width/window.innerWidth*100)/100,a=Math.round(o*i),u=t.maybeSafari;let c=!1;return i>1&&u[i]&&-1!==u[i].indexOf(a)&&(c=!0),n||c}return!1},n.isSafari=function(e=o()){return/Safari/.test(e)&&!E(e)&&!/Silk|FxiOS|EdgiOS/.test(e)},n.isStandAlone=a,n.isTablet=function(e=o()){return i.test(e)},n.isWebView=function(){const e=o();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)|.*WKWebView/i.test(e)||/\bwv\b/.test(e)||/Android.*Version\/(\d)\.(\d)/i.test(e)},n.supportsPopups=function(e=o()){return!(y(e)||g(e)||f(e)||c(e)||s(e)||u(e)||w(e)||v()||b()||a())};var r=t(18);function o(){return window.navigator.mockUserAgent||window.navigator.userAgent}const i=/ip(a|ro)d|silk|xoom|playbook|tablet|kindle|Nexus 7|GT-P10|SC-01C|SHW-M180S|SM-T320|SGH-T849|SCH-I800|SHW-M180L|SPH-P100|SGH-I987|zt180|HTC( Flyer|_Flyer)|Sprint ATP51|ViewPad7|pandigital(sprnova|nova)|Ideos S7|Dell Streak 7|Advent Vega|A101IT|A70BHT|MID7015|Next2|nook|FOLIO|MB511.*RUTEM|Mac OS.*Silk/i;function a(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function u(e=o()){return/FBAN/.test(e)||/FBAV/.test(e)}function c(e=o()){return/FxiOS/i.test(e)}function s(e=o()){return/EdgiOS/i.test(e)}function f(e=o()){return/Opera Mini/i.test(e)}function d(e=o()){return/Android/.test(e)}function l(e=o()){return/iPhone|iPod|iPad/.test(e)}function p(e=o()){return/iPhone.*OS.*(1)?(?:(1)[0-4]| [0-9])_/.test(e)}function h(e=o()){return/\bGSA\b/.test(e)}function w(e=o()){return/QQBrowser/.test(e)}function y(e=o()){return!!l(e)&&(!!h(e)||/.+AppleWebKit(?!.*Safari)|.*WKWebView/.test(e))}function m(e=o()){if(l(e)){const n=window.innerHeight,t=Math.round(window.screen.width/window.innerWidth*100)/100,o=Math.round(n*t);let i=null;if(p(e))i=r.sfvcScreens[window.outerHeight];else{if(1!==t)return!0;i=r.sfvcScreens[window.outerHeight]}return!i||(t>1&&i.zoomHeight&&i.zoomHeight[t]?-1!==i.zoomHeight[t].indexOf(o):-1!==i.textSizeHeights.indexOf(o)||-1!==i.textSizeHeightsNoTabs.indexOf(o))}return!1}function g(e=o()){return!!d(e)&&(/Version\/[\d.]+/.test(e)&&!f(e))}function v(){return!(void 0===e||!e.versions||!e.versions.electron)}function b(){const e=o();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}function E(e=o()){return/Chrome|Chromium|CriOS/.test(e)&&!/SamsungBrowser|Silk|EdgA/.test(e)}}).call(this,t(9))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sfvcScreens=void 0;n.sfvcScreens={926:{device:"iPhone 12/13 Pro Max",textSizeHeights:[752,748,744,738],textSizeHeightsNoTabs:[860,858,856,854],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],textSizeHeightsNoTabs:[829,827,825,823],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],textSizeHeightsNoTabs:[778,776,774,772],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],textSizeHeightsNoTabs:[749,747,745,743],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],textSizeHeightsNoTabs:[736,734,732,730],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],textSizeHeightsNoTabs:[667,665,663,661],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(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PopupOpenError=void 0,n.addClass=function(e,n){e.classList.add(n)},n.addEventListener=function(e,n,t){return e.addEventListener(n,t),{cancel(){e.removeEventListener(n,t)}}},n.animate=z,n.animateAndHide=function(e,n,t){return z(e,n,t).then(()=>{U(e)})},n.appendChild=O,n.awaitFrameLoad=R,n.awaitFrameWindow=M,n.bindEvents=D,n.createElement=I,n.destroyElement=F,n.elementReady=function(e){return new r.ZalgoPromise((n,t)=>{const r=(0,a.stringify)(e);let o=S(e);if(o)return n(o);if(p())return t(new Error(`Document is ready and element ${r} does not exist`));const i=setInterval(()=>(o=S(e),o?(n(o),void clearInterval(i)):p()?(clearInterval(i),t(new Error(`Document is ready and element ${r} does not exist`))):void 0),10)})},n.enablePerformance=function(){return Boolean(_())},n.extendQuery=b,n.extendUrl=function(e,n){const t=n.query||{},r=n.hash||{};let o,i,a;[o,a]=e.split("#"),[o,i]=o.split("?");const u=b(i,t),c=b(a,r);u&&(o=`${o}?${u}`);c&&(o=`${o}#${c}`);return o},n.fixScripts=function(e,n=window.document){for(const t of P("script",e)){const e=t.parentNode;if(!e)continue;const r=n.createElement("script");r.text=t.textContent,e.replaceChild(r,t)}},n.formatQuery=v,n.getBody=l,n.getBrowserLocales=function(){const e=window.navigator,n=e.languages?[...e.languages]:[];e.language&&n.push(e.language);e.userLanguage&&n.push(e.userLanguage);return n.map(e=>{if(e&&e.match(/^[a-z]{2}[-_][A-Z]{2}$/)){const[n,t]=e.split(/[-_]/);return{country:t,lang:n}}return e&&e.match(/^[a-z]{2}$/)?{lang:e}:null}).filter(Boolean)},n.getCurrentScriptUID=n.getCurrentScript=void 0,n.getElement=x,n.getElementSafe=S,n.getPageRenderTime=function(){return y().then(()=>{const e=_();if(!e)return;const n=e.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0})},n.getPerformance=_,n.getQueryParam=function(e){return m(window.location.search.slice(1))[e]},n.getResourceLoadTime=function(e){const n=_();if(!n)return;if("function"!=typeof n.getEntries)return;const t=n.getEntries();for(let n=0;n<t.length;n++){const r=t[n];if(r&&r.name&&0===r.name.indexOf(e)&&"number"==typeof r.duration)return Math.floor(r.duration)}},n.getScript=function e({host:n=window.location.host,path:t,reverse:r=!1}){return(0,a.inlineMemoize)(e,()=>{const e=`${n}${t}`,o=Array.prototype.slice.call(document.getElementsByTagName("script"));r&&o.reverse();for(const n of o){if(!n.src)continue;if(n.src.replace(/^https?:\/\//,"").split("?")[0]===e)return n}},[t])},n.getShadowHost=Y,n.getShadowRoot=q,n.getStackTrace=K,n.hasMetaViewPort=function(){const e=document.querySelector("meta[name=viewport]");if((0,u.isDevice)()&&window.screen.width<660&&!e)return!1;return!0},n.hideElement=U,n.htmlEncode=function(e=""){return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")},n.iframe=function(e={},n){const t=e.attributes||{},r=e.style||{},o=f({allowTransparency:"true"},t),i=f({backgroundColor:"transparent",border:"none"},r),u=I("iframe",{attributes:o,style:i,html:e.html,class:e.class}),c=window.navigator.userAgent.match(/MSIE|Edge/i);u.hasAttribute("id")||u.setAttribute("id",(0,a.uniqueID)());if(R(u),n){x(n).appendChild(u)}(e.url||c)&&u.setAttribute("src",e.url||"about:blank");return u},n.insertShadowSlot=function e(n){const t=Y(n);if(!t)throw new Error("Element is not in shadow dom");const r="shadow-slot-"+(0,a.uniqueID)(),o=document.createElement("slot");o.setAttribute("name",r),n.appendChild(o);const i=document.createElement("div");if(i.setAttribute("slot",r),t.appendChild(i),$(t))return e(i);return i},n.isBrowser=function(){return"undefined"!=typeof window&&void 0!==window.location},n.isDocumentInteractive=h,n.isDocumentReady=p,n.isElementClosed=H,n.isElementVisible=E,n.isLocalStorageEnabled=function e(){return(0,a.inlineMemoize)(e,()=>{try{if("undefined"==typeof window)return!1;if(window.localStorage){const e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);const n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1})},n.isShadowElement=$,n.makeElementInvisible=function(e){e.style.setProperty("visibility","hidden","important")},n.makeElementVisible=function(e){e.style.setProperty("visibility","")},n.onClick=function(e,n){e.addEventListener("touchstart",a.noop),e.addEventListener("click",n),e.addEventListener("keypress",e=>{if(e.keyCode===c.KEY_CODES.ENTER||e.keyCode===c.KEY_CODES.SPACE)return n(e)})},n.onResize=function(e,n,{width:t=!0,height:r=!0,interval:o=100,win:i=window}={}){let u=e.offsetWidth,c=e.offsetHeight,s=!1;n({width:u,height:c});const f=()=>{if(s||!E(e))return;const o=e.offsetWidth,i=e.offsetHeight;(t&&o!==u||r&&i!==c)&&n({width:o,height:i}),u=o,c=i};let d,l;i.addEventListener("resize",f),void 0!==i.ResizeObserver?(d=new i.ResizeObserver(f),d.observe(e),l=(0,a.safeInterval)(f,10*o)):void 0!==i.MutationObserver?(d=new i.MutationObserver(f),d.observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),l=(0,a.safeInterval)(f,10*o)):l=(0,a.safeInterval)(f,o);return{cancel:()=>{s=!0,d.disconnect(),window.removeEventListener("resize",f),l.cancel()}}},n.parseQuery=m,n.popup=function(e,n){n=n||{};const{closeOnUnload:t=1,name:r="",width:i,height:u}=n;let c=0,s=0;i&&(window.outerWidth?s=Math.round((window.outerWidth-i)/2)+window.screenX:window.screen.width&&(s=Math.round((window.screen.width-i)/2)));u&&(window.outerHeight?c=Math.round((window.outerHeight-u)/2)+window.screenY:window.screen.height&&(c=Math.round((window.screen.height-u)/2)));delete n.closeOnUnload,delete n.name,i&&u&&(n=f({top:c,left:s,width:i,height:u,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));const d=Object.keys(n).map(e=>{if(null!==n[e]&&void 0!==n[e])return`${e}=${(0,a.stringify)(n[e])}`}).filter(Boolean).join(",");let l;try{l=window.open(e,r,d)}catch(e){throw new T("Can not open popup window - "+(e.stack||e.message))}if((0,o.isWindowClosed)(l)){throw new T("Can not open popup window - blocked")}t&&window.addEventListener("unload",()=>l.close());return l},n.preventClickFocus=function(e){const n=t=>(e.removeEventListener("focus",n),t.preventDefault(),e.blur(),!1);e.addEventListener("mousedown",()=>{e.addEventListener("focus",n),setTimeout(()=>{e.removeEventListener("focus",n)},1)})},n.querySelectorAll=P,n.redirect=function(e,n=window){return new r.ZalgoPromise(t=>{n.location=e,g(e)||t()})},n.removeClass=function(e,n){e.classList.remove(n)},n.setStyle=C,n.setVendorCSS=N,n.showAndAnimate=function(e,n,t){const r=z(e,n,t);return B(e),r},n.showElement=B,n.submitForm=function({url:e,target:n,body:t,method:r="post"}){const o=document.createElement("form");if(o.setAttribute("target",n),o.setAttribute("method",r),o.setAttribute("action",e),o.style.display="none",t)for(const e of Object.keys(t)){var i;const n=document.createElement("input");n.setAttribute("name",e),n.setAttribute("value",null===(i=t[e])||void 0===i?void 0:i.toString()),o.appendChild(n)}l().appendChild(o),o.submit(),l().removeChild(o)},n.urlEncode=w,n.urlWillRedirectPage=g,n.waitForDocumentBody=function(){return r.ZalgoPromise.try(()=>document.body?document.body:y().then(()=>{if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))},n.waitForDocumentReady=void 0,n.waitForWindowReady=function e(){return(0,a.inlineMemoize)(e,()=>new r.ZalgoPromise(e=>{p()&&e(),window.addEventListener("load",()=>e())}))},n.watchElementForClose=function(e,n){n=(0,a.once)(n);let t=!1;const r=[];let i,u,c;const s=()=>{t=!0;for(const e of r)e.disconnect();i&&i.cancel(),c&&c.removeEventListener("unload",f),u&&F(u)},f=()=>{t||(n(),s())};if(H(e))return f(),{cancel:s};if(window.MutationObserver){let n=e.parentElement;for(;n;){const t=new window.MutationObserver(()=>{H(e)&&f()});t.observe(n,{childList:!0}),r.push(t),n=n.parentElement}}u=document.createElement("iframe"),u.setAttribute("name",`__detect_close_${(0,a.uniqueID)()}__`),u.style.display="none",M(u).then(e=>{c=(0,o.assertSameDomain)(e),c.addEventListener("unload",f)}),e.appendChild(u);return i=(0,a.safeInterval)(()=>{H(e)&&f()},1e3),{cancel:s}},n.writeElementToWindow=function(e,n){const t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);const r=e.document.documentElement;for(const e of(0,a.arrayFrom)(r.children))r.removeChild(e);for(const e of(0,a.arrayFrom)(n.children))r.appendChild(e)},n.writeToWindow=A;var r=t(1),o=t(20),i=t(22),a=t(2),u=t(17),c=t(24);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){d(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(){const e=document.body;if(!e)throw new Error("Body element not found");return e}function p(){return Boolean(document.body)&&"complete"===document.readyState}function h(){return Boolean(document.body)&&"interactive"===document.readyState}function w(e){return encodeURIComponent(e)}const y=(0,a.memoize)(()=>new r.ZalgoPromise(e=>{if(p()||h())return e();const n=setInterval(()=>{if(p()||h())return clearInterval(n),e()},10)}));function m(e){return(0,a.inlineMemoize)(m,()=>{const n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(let t of e.split("&"))t=t.split("="),t[0]&&t[1]&&(n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]));return n},[e])}function g(e){return-1===e.indexOf("#")||0!==e.indexOf("#")&&e.split("#")[0]!==window.location.href.split("#")[0]}function v(e={}){return Object.keys(e).filter(n=>"string"==typeof e[n]||"boolean"==typeof e[n]).map(n=>{const t=e[n];if("string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("Invalid type for query");return`${w(n)}=${w(t.toString())}`}).join("&")}function b(e,n={}){return n&&Object.keys(n).length?v(f(f({},m(e)),n)):e}function E(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function _(){return(0,a.inlineMemoize)(_,()=>{const 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 P(e,n=window.document){return Array.prototype.slice.call(n.querySelectorAll(e))}function O(e,n){e.appendChild(n)}function S(e,n=document){return(0,a.isElement)(e)?e:"string"==typeof e?n.querySelector(e):void 0}function x(e,n=document){const t=S(e,n);if(t)return t;throw new Error("Can not find element: "+(0,a.stringify)(e))}n.waitForDocumentReady=y;class T extends a.ExtendableError{}function A(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 C(e,n,t=window.document){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}let j;function R(e){if(j=j||new i.WeakMap,j.has(e)){const n=j.get(e);if(n)return n}const n=new r.ZalgoPromise((n,t)=>{e.addEventListener("load",()=>{(0,o.linkFrameWindow)(e),n(e)}),e.addEventListener("error",r=>{e.contentWindow?n(e):t(r)})});return j.set(e,n),n}function M(e){return R(e).then(e=>{if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow})}n.PopupOpenError=T;function I(e="div",n={},t){e=e.toLowerCase();const r=document.createElement(e);if(n.style&&(0,a.extend)(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(const e of Object.keys(n.attributes))r.setAttribute(e,n.attributes[e]);if(n.styleSheet&&C(r,n.styleSheet),t&&O(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");A(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function D(e,n,t){t=(0,a.once)(t);for(const r of n)e.addEventListener(r,t);return{cancel:(0,a.once)(()=>{for(const r of n)e.removeEventListener(r,t)})}}const k=["webkit","moz","ms","o"];function N(e,n,t){e.style[n]=t;const r=(0,a.capitalizeFirstLetter)(n);for(const n of k)e.style[`${n}${r}`]=t}const W=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],L=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function z(e,n,t,o=1e3){return new r.ZalgoPromise((r,i)=>{const a=x(e);if(!a)return r();let u,c,s,f,d=!1;function l(){clearTimeout(u),clearTimeout(c),s.cancel(),f.cancel()}s=D(a,W,e=>{e.target===a&&e.animationName===n&&(clearTimeout(u),e.stopPropagation(),s.cancel(),d=!0,c=setTimeout(()=>{l(),r()},o))}),f=D(a,L,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}`):r()}),N(a,"animationName",n),u=setTimeout(()=>{if(!d)return l(),r()},200),t&&t(l)})}function B(e){e.style.setProperty("display","")}function U(e){e.style.setProperty("display","none","important")}function F(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function H(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function $(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}function q(e){for(;e.parentNode;)e=e.parentNode;if($(e))return e}function Y(e){const n=q(e);if(n&&n.host)return n.host}function K(){try{throw new Error("_")}catch(e){return e.stack||""}}let G="undefined"!=typeof document?document.currentScript:null;const V=(0,a.memoize)(()=>{if(G)return G;if(G=function(){try{const e=K(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(const e of Array.prototype.slice.call(document.getElementsByTagName("script")).reverse())if(e.src&&e.src===t)return e}catch(e){}}(),G)return G;throw new Error("Can not determine current script")});n.getCurrentScript=V;const Z=(0,a.uniqueID)(),J=(0,a.memoize)(()=>{let e;try{e=V()}catch(e){return Z}let n=e.getAttribute(c.ATTRIBUTES.UID);if(n&&"string"==typeof n)return n;if(n=e.getAttribute(c.ATTRIBUTES.UID+"-auto"),n&&"string"==typeof n)return n;if(e.src){const{src:t,dataset:r}=e,o=JSON.stringify({src:t,dataset:r}),i=(0,a.strHashStr)(o);n="uid_"+i.slice(i.length-c.UID_HASH_LENGTH)}else n=(0,a.uniqueID)();return e.setAttribute(c.ATTRIBUTES.UID+"-auto",n),n});n.getCurrentScriptUID=J},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(36);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}));var o=t(38);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===o[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=t(21);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===i[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WINDOW_TYPE=n.WILDCARD=n.PROTOCOL=void 0;n.PROTOCOL={MOCK:"mock:",FILE:"file:",ABOUT:"about:"};n.WILDCARD="*";n.WINDOW_TYPE={IFRAME:"iframe",POPUP:"popup"}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"WeakMap",{enumerable:!0,get:function(){return r.CrossDomainSafeWeakMap}});var r=t(39)},function(e,n,t){"use strict";var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UID_HASH_LENGTH=n.KEY_CODES=n.ATTRIBUTES=void 0;n.KEY_CODES={ENTER:13,SPACE:32};n.ATTRIBUTES={UID:"data-uid"};n.UID_HASH_LENGTH=30},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getStorage=function e({name:n,lifetime:t=12e5}){return(0,r.inlineMemoize)(e,()=>{const e=`__${n}_storage__`,i=(0,r.uniqueID)();let a;function u(n){const t=(0,o.isLocalStorageEnabled)();let u;if(a&&(u=a),!u&&t){const n=window.localStorage.getItem(e);n&&(u=JSON.parse(n))}u||(u=(0,r.getGlobal)()[e]),u||(u={id:i}),u.id||(u.id=i),a=u;const c=n(u);return t?window.localStorage.setItem(e,JSON.stringify(u)):(0,r.getGlobal)()[e]=u,a=null,c}function c(){return u(e=>e.id)}function s(e){return u(n=>{let o=n.__session__;const i=Date.now();return o&&i-o.created>t&&(o=null),o||(o={guid:(0,r.uniqueID)(),created:i}),n.__session__=o,e(o)})}return{getState:u,getID:c,isStateFresh:function(){return c()===i},getSessionState:function(e){return s(n=>(n.state=n.state||{},e(n.state)))},getSessionID:function(){return s(e=>e.guid)}}},[{name:n,lifetime:t}])};var r=t(2),o=t(19)},function(e,n,t){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)};var o=new Uint8Array(16)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.URL=n.DNS=void 0,n.default=function(e,n,t){function i(e,i,a,u){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var n=[],t=0;t<e.length;++t)n.push(e.charCodeAt(t));return n}(e)),"string"==typeof i&&(i=(0,o.default)(i)),16!==i.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+e.length);if(c.set(i),c.set(e,i.length),(c=t(c))[6]=15&c[6]|n,c[8]=63&c[8]|128,a){u=u||0;for(var s=0;s<16;++s)a[u+s]=c[s];return a}return(0,r.default)(c)}try{i.name=e}catch(e){}return i.DNS=a,i.URL=u,i};var r=i(t(10)),o=i(t(28));function i(e){return e&&e.__esModule?e:{default:e}}var a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";n.DNS=a;var u="6ba7b811-9dad-11d1-80b4-00c04fd430c8";n.URL=u},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t(11))&&r.__esModule?r:{default:r};var i=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");var n,t=new Uint8Array(16);return t[0]=(n=parseInt(e.slice(0,8),16))>>>24,t[1]=n>>>16&255,t[2]=n>>>8&255,t[3]=255&n,t[4]=(n=parseInt(e.slice(9,13),16))>>>8,t[5]=255&n,t[6]=(n=parseInt(e.slice(14,18),16))>>>8,t[7]=255&n,t[8]=(n=parseInt(e.slice(19,23),16))>>>8,t[9]=255&n,t[10]=(n=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=n/4294967296&255,t[12]=n>>>24&255,t[13]=n>>>16&255,t[14]=n>>>8&255,t[15]=255&n,t};n.default=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorHandler=n.DEFAULT_SUPPORT_EMAIL=void 0;var r=t(4);n.DEFAULT_SUPPORT_EMAIL="support@crypto.com";n.errorHandler=e=>{var n;const t=r.ERROR_MESSAGE.find(({code:n})=>!!e.error&&n===e.error.code);return JSON.stringify({errorName:t?t.errorName:r.DEFAULT_ERROR_MESSAGE_NAME,errorStatusCode:e.status||500,arguments:(null===(n=e.error)||void 0===n?void 0:n.arguments)||{merchant_support_email:"support@crypto.com"}})}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){return function({uid:e,close:n,focus:t,doc:c,event:s,frame:f,prerenderFrame:d}){const l=e=>n=>{s.on(o.EVENT.DISPLAY,()=>{(0,r.animate)(n,"show-"+e,r.noop)}),s.on(o.EVENT.CLOSE,()=>{(0,r.animate)(n,"hide-"+e,r.noop)}),s.on(o.EVENT.CLOSE,()=>{const e=n.querySelector("iFrame");if(e&&e.contentDocument){const n=e.contentDocument.querySelector(".crypto-pay-overlay-content");n&&(0,r.addClass)(n,"crypto-pay-loading")}})};let p;return f&&d&&(d.classList.add("visible"),f.classList.add("invisible"),s.on(o.EVENT.RENDERED,()=>{d.classList.remove("visible"),d.classList.add("invisible"),f.classList.remove("invisible"),d.classList.add("visible"),setTimeout(()=>{(0,r.destroyElement)(d)},1)}),p=(0,i.node)("div",{class:"outlet",onRender:l("component")},(0,i.node)("node",{el:f}),(0,i.node)("node",{el:d}))),(0,i.node)("div",{id:e,onRender:l("container"),class:"crypto-pay-overlay-sandbox"},(0,i.node)("style",null,(0,u.getSandboxStyle)({uid:e})),(0,i.node)("iframe",{title:"Crypto.com Pay Overlay",name:`__crypto__com__pay__overlay__${e}__`,scrolling:"no",class:"crypto-pay-overlay-sandbox-iframe"},(0,i.node)("html",null,(0,i.node)("body",null,(0,i.node)("div",{id:e,onClick:e=>{e.preventDefault(),e.stopPropagation(),t()}},(0,i.node)("a",{href:"#",onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},class:"crypto-pay-overlay-close","aria-label":"close",role:"button"}),(0,i.node)("div",{class:"crypto-pay-overlay-content"},(0,i.node)("div",{class:"crypto-pay-overlay-message"},"Click anywhere to continue"),(0,i.node)("div",{class:"crypto-pay-spinner-container"},(0,i.node)("div",{class:"crypto-pay-spinner"}))),(0,i.node)("div",{class:"crypto-pay-iframe-container"},p),(0,i.node)("style",null,(0,a.getOverlayStyle)({uid:e}))))))).render((0,i.dom)({doc:c}))}};var r=t(8),o=t(7),i=t(86),a=t(88),u=t(89)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"API",{enumerable:!0,get:function(){return r.API}}),Object.defineProperty(n,"BannerHelper",{enumerable:!0,get:function(){return i.BannerHelper}}),Object.defineProperty(n,"Button",{enumerable:!0,get:function(){return o.Button}}),Object.defineProperty(n,"Checkout",{enumerable:!0,get:function(){return a.Checkout}}),Object.defineProperty(n,"Download",{enumerable:!0,get:function(){return u.Download}}),Object.defineProperty(n,"Subscription",{enumerable:!0,get:function(){return c.Subscription}});var r=t(14),o=t(64),i=t(69),a=t(82),u=t(90),c=t(92)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ZalgoPromise=void 0;var r=t(33),o=t(34),i=t(35);function a(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class u{constructor(e){if(a(this,"resolved",void 0),a(this,"rejected",void 0),a(this,"errorHandled",void 0),a(this,"value",void 0),a(this,"error",void 0),a(this,"handlers",void 0),a(this,"dispatching",void 0),a(this,"stack",void 0),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){let n,t,r=!1,o=!1,a=!1;(0,i.startActive)();try{e(e=>{a?this.resolve(e):(r=!0,n=e)},e=>{a?this.reject(e):(o=!0,t=e)})}catch(e){return(0,i.endActive)(),void this.reject(e)}(0,i.endActive)(),a=!0,r?this.resolve(n):o&&this.reject(t)}}resolve(e){if(this.resolved||this.rejected)return this;if((0,r.isPromise)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}reject(e){if(this.resolved||this.rejected)return this;if((0,r.isPromise)(e))throw new Error("Can not reject promise with another promise");if(!e){const n=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+n)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(()=>{this.errorHandled||(0,o.dispatchPossiblyUnhandledError)(e,this)},1),this.dispatch(),this}asyncReject(e){return this.errorHandled=!0,this.reject(e),this}dispatch(){const{dispatching:e,resolved:n,rejected:t,handlers:o}=this;if(e)return;if(!n&&!t)return;this.dispatching=!0,(0,i.startActive)();const a=(e,n)=>e.then(e=>{n.resolve(e)},e=>{n.reject(e)});for(let e=0;e<o.length;e++){const{onSuccess:i,onError:c,promise:s}=o[e];let f;if(n)try{f=i?i(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{f=c(this.error)}catch(e){s.reject(e);continue}}if(f instanceof u&&(f.resolved||f.rejected)){const e=f;e.resolved?s.resolve(e.value):s.reject(e.error),e.errorHandled=!0}else(0,r.isPromise)(f)?f instanceof u&&(f.resolved||f.rejected)?f.resolved?s.resolve(f.value):s.reject(f.error):a(f,s):s.resolve(f)}o.length=0,this.dispatching=!1,(0,i.endActive)()}then(e,n){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for error handler");const t=new u;return this.handlers.push({promise:t,onSuccess:e,onError:n}),this.errorHandled=!0,this.dispatch(),t}catch(e){return this.then(void 0,e)}finally(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then(n=>u.try(e).then(()=>n),n=>u.try(e).then(()=>{throw n}))}timeout(e,n){if(this.resolved||this.rejected)return this;const t=setTimeout(()=>{this.resolved||this.rejected||this.reject(n||new Error(`Promise timed out after ${e}ms`))},e);return this.then(e=>(clearTimeout(t),e))}toPromise(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)}lazy(){return this.errorHandled=!0,this}static resolve(e){if(e instanceof u){return e}return(0,r.isPromise)(e)?new u((n,t)=>e.then(n,t)):(new u).resolve(e)}static reject(e){return(new u).reject(e)}static asyncReject(e){return(new u).asyncReject(e)}static all(e){const n=new u;let t=e.length;const o=[].slice();if(!t)return n.resolve(o),n;const i=(e,r,i)=>r.then(r=>{o[e]=r,t-=1,0===t&&n.resolve(o)},e=>{i.reject(e)});for(let a=0;a<e.length;a++){const c=e[a];if(c instanceof u){if(c.resolved){o[a]=c.value,t-=1;continue}}else if(!(0,r.isPromise)(c)){o[a]=c,t-=1;continue}i(a,u.resolve(c),n)}return 0===t&&n.resolve(o),n}static hash(e){const n={},t=[];for(const o in e)if(e.hasOwnProperty(o)){const i=e[o];(0,r.isPromise)(i)?t.push(i.then(e=>{n[o]=e})):n[o]=i}return u.all(t).then(()=>n)}static map(e,n){return u.all(e.map(n))}static onPossiblyUnhandledException(e){return(0,o.onPossiblyUnhandledException)(e)}static try(e,n,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");let r;(0,i.startActive)();try{r=e.apply(n,t||[])}catch(e){return(0,i.endActive)(),u.reject(e)}(0,i.endActive)();return u.resolve(r)}static delay(e){return new u(n=>{setTimeout(n,e)})}static isPromise(e){return!!(e&&e instanceof u)||(0,r.isPromise)(e)}static flush(){return(0,i.awaitActive)(u)}}n.ZalgoPromise=u},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isPromise=function(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;const n={}.toString;if(n){const 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}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dispatchPossiblyUnhandledError=function(e,n){if(-1!==r.indexOf(e))return;r.push(e),setTimeout(()=>{throw e},1);for(let t=0;t<o.length;t++)o[t](e,n)},n.onPossiblyUnhandledException=function(e){return o.push(e),{cancel(){o.splice(o.indexOf(e),1)}}};const r=[],o=[]},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.awaitActive=function(e){const n=r=r||new e;return i(),n},n.endActive=function(){o-=1,i()},n.startActive=function(){o+=1};let r,o=0;function i(){if(!o&&r){const e=r;r=null,e.resolve()}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertSameDomain=m,n.canReadFromWindow=l,n.closeWindow=function(e){if(I(e)){const n=B(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}},n.findChildFrameByName=j,n.findFrameByName=function(e,n){const t=C(e,n);if(t)return t;return j(_(e)||e,n)},n.getActualDomain=p,n.getActualProtocol=a,n.getAllChildFrames=E,n.getAllFramesInWindow=O,n.getAllWindows=function e(n=window){const t=O(n),r=P(n);return r?[...e(r),...t]:t},n.getAncestor=R,n.getAncestors=function(e){const n=[];let t=e;for(;t;)t=R(t),t&&n.push(t);return n},n.getDistanceFromTop=k,n.getDomain=h,n.getDomainFromUrl=W,n.getFrameByName=C,n.getFrameForWindow=B,n.getFrames=b,n.getNextOpener=P,n.getNthParent=N,n.getNthParentFromTop=function(e,n=1){return N(e,k(e)-n)},n.getOpener=d,n.getParent=f,n.getParents=g,n.getProtocol=u,n.getTop=_,n.getUltimateTop=function e(n=window){const t=P(n);if(t)return e(t);return top},n.getUserAgent=function(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent},n.isAboutProtocol=c,n.isActuallySameDomain=w,n.isAncestor=function(e,n){const t=R(n);if(t)return t===e;if(n===e)return!1;if(_(n)===n)return!1;for(const t of b(e))if(t===n)return!0;return!1},n.isAncestorParent=v,n.isBlankDomain=function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1},n.isBrowser=L,n.isCurrentDomain=function(e){if(!L())return!1;return h()===e},n.isFileProtocol=function(e=window){return u(e)===o.PROTOCOL.FILE},n.isFrameWindowClosed=S,n.isFullpage=function(e=window){return Boolean(!I(e)&&!M(e))},n.isIframe=I,n.isMockDomain=z,n.isMockProtocol=s,n.isOpener=function(e,n){return e===d(n)},n.isParent=function(e,n){const t=f(n);if(t)return t===e;for(const t of b(e))if(t===n)return!0;return!1},n.isPopup=M,n.isSameDomain=y,n.isSameTopWindow=function(e,n){const t=_(e)||e,r=_(n)||n;try{if(t&&r)return t===r}catch(e){}const o=O(e),i=O(n);if(D(o,i))return!0;const a=d(t),u=d(r);if(a&&D(O(a),i))return!1;if(u&&D(O(u),o))return!1;return!1},n.isTop=function(e){return e===_(e)},n.isWindow=function(e){try{if(e===window)return!0}catch(e){if(e&&e.message===i)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===i)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if("__unlikely_value__"===(0,r.noop)(e==e))return!1}catch(e){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},n.isWindowClosed=A,n.linkFrameWindow=function(e){if(function(){for(let e=0;e<x.length;e++){let n=!1;try{n=x[e].closed}catch(e){}n&&(T.splice(e,1),x.splice(e,1))}}(),e&&e.contentWindow)try{x.push(e.contentWindow),T.push(e)}catch(e){}},n.matchDomain=function e(n,t){if("string"==typeof n){if("string"==typeof t)return n===o.WILDCARD||t===n;if((0,r.isRegex)(t))return!1;if(Array.isArray(t))return!1}if((0,r.isRegex)(n))return(0,r.isRegex)(t)?n.toString()===t.toString():!Array.isArray(t)&&Boolean(t.match(n));if(Array.isArray(n))return Array.isArray(t)?JSON.stringify(n)===JSON.stringify(t):!(0,r.isRegex)(t)&&n.some(n=>e(n,t));return!1},n.normalizeMockUrl=function(e){if(!z(W(e)))return e;throw new Error("Mock urls not supported out of test mode");return e.replace(/^mock:\/\/[^/]+/,p(window))},n.onCloseWindow=function(e,n,t=1e3,r=1/0){let o;const i=()=>{if(A(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))};return i(),{cancel(){o&&clearTimeout(o)}}},n.stringifyDomainPattern=function(e){return Array.isArray(e)?`(${e.join(" | ")})`:(0,r.isRegex)(e)?`RegExp(${e.toString()})`:e.toString()};var r=t(37),o=t(21);const i="Call was rejected by callee.\r\n";function a(e=window){return e.location.protocol}function u(e=window){if(e.mockDomain){const n=e.mockDomain.split("//")[0];if(n)return n}return a(e)}function c(e=window){return u(e)===o.PROTOCOL.ABOUT}function s(e=window){return u(e)===o.PROTOCOL.MOCK}function f(e=window){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function d(e=window){if(e&&!f(e))try{return e.opener}catch(e){}}function l(e){try{return(0,r.noop)(e&&e.location&&e.location.href),!0}catch(e){}return!1}function p(e=window){const n=e.location;if(!n)throw new Error("Can not read window location");const t=a(e);if(!t)throw new Error("Can not read window protocol");if(t===o.PROTOCOL.FILE)return o.PROTOCOL.FILE+"//";if(t===o.PROTOCOL.ABOUT){const n=f(e);return n&&l(n)?p(n):o.PROTOCOL.ABOUT+"//"}const r=n.host;if(!r)throw new Error("Can not read window host");return`${t}//${r}`}function h(e=window){const n=p(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf(o.PROTOCOL.MOCK)?e.mockDomain:n}function w(e){try{if(e===window)return!0}catch(e){}try{const n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(c(e)&&l(e))return!0}catch(e){}try{if(s(e)&&l(e))return!0}catch(e){}try{if(p(e)===p(window))return!0}catch(e){}return!1}function y(e){if(!w(e))return!1;try{if(e===window)return!0;if(c(e)&&l(e))return!0;if(h(window)===h(e))return!0}catch(e){}return!1}function m(e){if(!y(e))throw new Error("Expected window to be same domain");return e}function g(e){const n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}function v(e,n){if(!e||!n)return!1;const t=f(n);return t?t===e:-1!==g(n).indexOf(e)}function b(e){const n=[];let t,r;try{t=e.frames}catch(n){t=e}try{r=t.length}catch(e){}if(0===r)return n;if(r){for(let e=0;e<r;e++){let r;try{r=t[e]}catch(e){continue}n.push(r)}return n}for(let e=0;e<100;e++){let r;try{r=t[e]}catch(e){return n}if(!r)return n;n.push(r)}return n}function E(e){const n=[];for(const t of b(e)){n.push(t);for(const e of E(t))n.push(e)}return n}function _(e=window){try{if(e.top)return e.top}catch(e){}if(f(e)===e)return e;try{if(v(window,e)&&window.top)return window.top}catch(e){}try{if(v(e,window)&&window.top)return window.top}catch(e){}for(const n of E(e)){try{if(n.top)return n.top}catch(e){}if(f(n)===n)return n}}function P(e=window){return d(_(e)||e)}function O(e){const n=_(e);if(!n)throw new Error("Can not determine top window");let t=[...E(n),n];return-1===t.indexOf(e)&&(t=[...t,e,...E(e)]),t}function S(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;const n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){let t=e;for(;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}const x=[],T=[];function A(e,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!==i}if(n&&y(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}try{(0,r.noop)(e==e)}catch(e){return!0}const t=function(e,n){for(let t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(x,e);if(-1!==t){const e=T[t];if(e&&S(e))return!0}return!1}function C(e,n){const t=b(e);for(const e of t)try{if(y(e)&&e.name===n&&-1!==t.indexOf(e))return e}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 j(e,n){const t=C(e,n);if(t)return t;for(const t of b(e)){const e=j(t,n);if(e)return e}}function R(e=window){const n=d(e=e||window);if(n)return n;const t=f(e);return t||void 0}function M(e=window){return Boolean(d(e))}function I(e=window){return Boolean(f(e))}function D(e,n){for(const t of e)for(const e of n)if(t===e)return!0;return!1}function k(e=window){let n=0,t=e;for(;t;)t=f(t),t&&(n+=1);return n}function N(e,n=1){let t=e;for(let e=0;e<n;e++){if(!t)return;t=f(t)}return t}function W(e){let n;return e.match(/^(https?|mock|file):\/\//)?(n=e,n=n.split("/").slice(0,3).join("/"),n):h()}function L(){return"undefined"!=typeof window&&void 0!==window.location}function z(e){return 0===e.indexOf(o.PROTOCOL.MOCK)}function B(e){if(y(e))return m(e).frameElement;for(const n of document.querySelectorAll("iframe"))if(n&&n.contentWindow&&n.contentWindow===e)return n}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isRegex=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},n.noop=function(...e){}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TYPES=void 0;n.TYPES=!0},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CrossDomainSafeWeakMap=void 0;var r=t(20),o=t(40),i=t(41);function a(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.CrossDomainSafeWeakMap=class{constructor(){if(a(this,"name",void 0),a(this,"weakmap",void 0),a(this,"keys",void 0),a(this,"values",void 0),this.name=`__weakmap_${1e9*Math.random()>>>0}__`,(0,o.hasNativeWeakMap)())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}_cleanupClosedWindows(){const e=this.weakmap,n=this.keys;for(let t=0;t<n.length;t++){const o=n[t];if((0,r.isWindow)(o)&&(0,r.isWindowClosed)(o)){if(e)try{e.delete(o)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}}isSafeToReadWrite(e){if((0,r.isWindow)(e))return!1;try{(0,i.noop)(e&&e.self),(0,i.noop)(e&&e[this.name])}catch(e){return!1}return!0}set(e,n){if(!e)throw new Error("WeakMap expected key");const t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{const t=this.name,r=e[t];return void(r&&r[0]===e?r[1]=n:Object.defineProperty(e,t,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();const r=this.keys,o=this.values,a=(0,i.safeIndexOf)(r,e);-1===a?(r.push(e),o.push(n)):o[a]=n}get(e){if(!e)throw new Error("WeakMap expected key");const n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{const n=e[this.name];return n&&n[0]===e?n[1]:void 0}catch(e){}this._cleanupClosedWindows();const t=this.keys,r=(0,i.safeIndexOf)(t,e);if(-1!==r)return this.values[r]}delete(e){if(!e)throw new Error("WeakMap expected key");const n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{const n=e[this.name];n&&n[0]===e&&(n[0]=n[1]=void 0)}catch(e){}this._cleanupClosedWindows();const t=this.keys,r=(0,i.safeIndexOf)(t,e);-1!==r&&(t.splice(r,1),this.values.splice(r,1))}has(e){if(!e)throw new Error("WeakMap expected key");const n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{const n=e[this.name];return!(!n||n[0]!==e)}catch(e){}this._cleanupClosedWindows();return-1!==(0,i.safeIndexOf)(this.keys,e)}getOrSet(e,n){if(this.has(e))return this.get(e);const t=n();return this.set(e,t),t}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasNativeWeakMap=function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{const e=new WeakMap,n={},t="__testvalue__";return Object.freeze(n),e.set(n,t),e.get(n)===t}catch(e){return!1}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.noop=function(...e){},n.safeIndexOf=function(e,n){for(let t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}},function(e,n,t){"use strict";n.byteLength=function(e){var n=s(e),t=n[0],r=n[1];return 3*(t+r)/4-r},n.toByteArray=function(e){var n,t,r=s(e),a=r[0],u=r[1],c=new i(function(e,n,t){return 3*(n+t)/4-t}(0,a,u)),f=0,d=u>0?a-4:a;for(t=0;t<d;t+=4)n=o[e.charCodeAt(t)]<<18|o[e.charCodeAt(t+1)]<<12|o[e.charCodeAt(t+2)]<<6|o[e.charCodeAt(t+3)],c[f++]=n>>16&255,c[f++]=n>>8&255,c[f++]=255&n;2===u&&(n=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,c[f++]=255&n);1===u&&(n=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,c[f++]=n>>8&255,c[f++]=255&n);return c},n.fromByteArray=function(e){for(var n,t=e.length,o=t%3,i=[],a=0,u=t-o;a<u;a+=16383)i.push(f(e,a,a+16383>u?u:a+16383));1===o?(n=e[t-1],i.push(r[n>>2]+r[n<<4&63]+"==")):2===o&&(n=(e[t-2]<<8)+e[t-1],i.push(r[n>>10]+r[n>>4&63]+r[n<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function s(e){var n=e.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=n),[t,t===n?0:4-t%4]}function f(e,n,t){for(var o,i,a=[],u=n;u<t;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,n,t){"use strict";
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */n.read=function(e,n,t,r,o){var i,a,u=8*o-r-1,c=(1<<u)-1,s=c>>1,f=-7,d=t?o-1:0,l=t?-1:1,p=e[n+d];for(d+=l,i=p&(1<<-f)-1,p>>=-f,f+=u;f>0;i=256*i+e[n+d],d+=l,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[n+d],d+=l,f-=8);if(0===i)i=1-s;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=s}return(p?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,n,t,r,o,i){var a,u,c,s=8*i-o-1,f=(1<<s)-1,d=f>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,w=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=f):(a=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-a))<1&&(a--,c*=2),(n+=a+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=f?(u=0,a=f):a+d>=1?(u=(n*c-1)*Math.pow(2,o),a+=d):(u=n*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[t+p]=255&u,p+=h,u/=256,o-=8);for(a=a<<o|u,s+=o;s>0;e[t+p]=255&a,p+=h,a/=256,s-=8);e[t+p-h]|=128*w}},function(e,n,t){"use strict";var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.experiment=function({name:e,sample:n=50,logTreatment:t=r.noop,logCheckpoint:o=r.noop,sticky:d=!0}){const l=d?function(e){return i().getState(n=>(n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[e]=n.throttlePercentiles[e]||u(100),n.throttlePercentiles[e]))}(e):u(100);let p;p=l<n?c:n>=50||n<=l&&l<2*n?s:f;const h=`${e}_${p}`;let w=!1,y=!1;try{window.localStorage&&window.localStorage.getItem(e)&&(y=!0)}catch(e){}const m={isEnabled:()=>p===c||y,isDisabled:()=>p!==c&&!y,getTreatment:()=>h,log:(n,r={})=>w?(a(`${h}_${JSON.stringify(r)}`)&&t({name:e,treatment:h,payload:r,throttle:l}),a(`${h}_${n}_${JSON.stringify(r)}`)&&o({name:e,treatment:h,checkpoint:n,payload:r,throttle:l}),m):m,logStart:(e={})=>(w=!0,m.log("start",e)),logComplete:(e={})=>m.log("complete",e)};return m};var r=t(2),o=t(25);function i(){return(0,o.getStorage)({name:"belter_experiment"})}function a(e){return i().getSessionState(n=>(n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(e)&&(n.loggedBeacons.push(e),!0)))}function u(e){return Math.floor(Math.random()*e)}const c="test",s="control",f="throttle"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getGlobalNameSpace=function({name:e,version:n="latest"}){const t=(0,r.getGlobal)(),o=`__${e}__${n}_global__`,i=t[o]=t[o]||{};return{get:(e,n)=>{n=n||{};return i[e]=i[e]||n}}};var r=t(2)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addHeaderBuilder=function(e){a.push(e)},n.request=function({url:e,method:n="get",headers:t={},json:u,data:c,body:s,win:f=window,timeout:d=0}){return new r.ZalgoPromise((r,l)=>{if(u&&c||u&&s||c&&u)throw new Error("Only options.json or options.data or options.body should be passed");const p={};for(const e of Object.keys(t))p[e.toLowerCase()]=t[e];u?p[o]=p[o]||"application/json":(c||s)&&(p[o]=p[o]||"application/x-www-form-urlencoded; charset=utf-8"),p[i]=p[i]||"application/json";for(const e of a){const n=e();for(const e of Object.keys(n))p[e.toLowerCase()]=n[e]}const h=new f.XMLHttpRequest;h.addEventListener("load",(function(){const t=function(e=""){const n={};for(const t of e.trim().split("\n")){const[e,...r]=t.split(":");n[e.toLowerCase()]=r.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return l(new Error(`Request to ${n.toLowerCase()} ${e} failed: no response status code.`));const o=t["content-type"],i=o&&(0===o.indexOf("application/json")||0===o.indexOf("text/json"));let a=this.responseText;try{a=JSON.parse(a)}catch(e){if(i)return l(new Error(`Invalid json: ${this.responseText}.`))}const u={status:this.status,headers:t,body:a};return r(u)}),!1),h.addEventListener("error",t=>{l(new Error(`Request to ${n.toLowerCase()} ${e} failed: ${t.toString()}.`))},!1),h.open(n,e,!0);for(const e in p)p.hasOwnProperty(e)&&h.setRequestHeader(e,p[e]);u?s=JSON.stringify(u):c&&(s=Object.keys(c).map(e=>`${encodeURIComponent(e)}=${c?encodeURIComponent(c[e]):""}`).join("&")),h.timeout=d,h.ontimeout=function(){l(new Error(`Request to ${n.toLowerCase()} ${e} has timed out`))},h.send(s)})};var r=t(1);const o="content-type",i="accept",a=[]},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TYPES=void 0;n.TYPES=!0},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.memoized=function(e,n,t){t.value=(0,r.memoize)(t.value,{name:n,thisNamespace:!0})},n.promise=function(e,n,t){t.value=(0,r.promisify)(t.value,{name:n})};var r=t(2)},function(e,n,t){"use strict";function r(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function o(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function i(e){if("number"==typeof e)return e;const n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function a(e){return i(e)+"px"}function u(e,n){return parseInt(e*i(n)/100,10)}Object.defineProperty(n,"__esModule",{value:!0}),n.isPerc=r,n.isPx=o,n.normalizeDimension=function(e,n){if("number"==typeof e)return e;if(r(e))return u(n,e);if(o(e))return i(e);throw new Error("Can not normalize dimension: "+e)},n.percOf=u,n.toCSS=function(e){if("number"==typeof e)return a(e);return r(e)?e:a(e)},n.toNum=i,n.toPx=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wrapPromise=function(e,{timeout:n=5e3}={}){const t=[],i=[];return new r.ZalgoPromise((a,u)=>{const c=setTimeout(()=>{t.length&&u(new Error(`Expected ${t[0].name} to be called in ${n}ms`)),i.length&&u(new Error(`Expected ${i[0].name} promise to complete in ${n}ms`))},n),s=(e,n=o.noop)=>{const a={name:e,handler:n};return t.push(a),function(...u){(0,o.removeFromArray)(t,a);const{result:c,error:s}=(0,o.tryCatch)(()=>n.call(this,...u));if(s)throw i.push({name:e,promise:r.ZalgoPromise.asyncReject(s)}),s;return i.push({name:e,promise:r.ZalgoPromise.resolve(c)}),c}},f=(e,n=o.noop)=>function(...t){return i.push({name:e,promise:r.ZalgoPromise.asyncReject(new Error(`Expected ${e} to not be called`))}),n.call(this,...t)},d=(e,n=o.noop)=>{const a={name:e,handler:n};return t.push(a),function(...u){(0,o.removeFromArray)(t,a);const{result:c,error:s}=(0,o.tryCatch)(()=>n.call(this,...u));if(s)throw s;return i.push({name:e,promise:r.ZalgoPromise.resolve(c).then(()=>{throw new Error(`Expected ${e} to throw an error`)},o.noop)}),c}},l=()=>r.ZalgoPromise.try(()=>{if(i.length){const e=i[0];return e.promise.finally(()=>{(0,o.removeFromArray)(i,e)}).then(l)}}).then(()=>{if(t.length)return r.ZalgoPromise.delay(10).then(l)});i.push({name:"wrapPromise handler",promise:r.ZalgoPromise.try(()=>e({expect:s,avoid:f,expectError:d,error:f,wait:()=>r.ZalgoPromise.resolve()}))}),l().finally(()=>{clearTimeout(c)}).then(a,u)})};var r=t(1),o=t(2)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return c.default}});var r=l(t(53)),o=l(t(55)),i=l(t(57)),a=l(t(58)),u=l(t(60)),c=l(t(61)),s=l(t(11)),f=l(t(10)),d=l(t(28));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o,i=u(t(26)),a=u(t(10));function u(e){return e&&e.__esModule?e:{default:e}}var c=0,s=0;var f=function(e,n,t){var u=n&&t||0,f=n||new Array(16),d=(e=e||{}).node||r,l=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==l){var p=e.random||(e.rng||i.default)();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==l&&(l=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:Date.now(),w=void 0!==e.nsecs?e.nsecs:s+1,y=h-c+(w-s)/1e4;if(y<0&&void 0===e.clockseq&&(l=l+1&16383),(y<0||h>c)&&void 0===e.nsecs&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,s=w,o=l;var m=(1e4*(268435455&(h+=122192928e5))+w)%4294967296;f[u++]=m>>>24&255,f[u++]=m>>>16&255,f[u++]=m>>>8&255,f[u++]=255&m;var g=h/4294967296*1e4&268435455;f[u++]=g>>>8&255,f[u++]=255&g,f[u++]=g>>>24&15|16,f[u++]=g>>>16&255,f[u++]=l>>>8|128,f[u++]=255&l;for(var v=0;v<6;++v)f[u+v]=d[v];return n||(0,a.default)(f)};n.default=f},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t(27)),o=i(t(56));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,o.default);n.default=a},function(e,n,t){"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function o(e,n){var t=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(t>>16)<<16|65535&t}function i(e,n,t,r,i,a){return o((u=o(o(n,e),o(r,a)))<<(c=i)|u>>>32-c,t);var u,c}function a(e,n,t,r,o,a,u){return i(n&t|~n&r,e,n,o,a,u)}function u(e,n,t,r,o,a,u){return i(n&r|t&~r,e,n,o,a,u)}function c(e,n,t,r,o,a,u){return i(n^t^r,e,n,o,a,u)}function s(e,n,t,r,o,a,u){return i(t^(n|~r),e,n,o,a,u)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var f=function(e){if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=new Uint8Array(n.length);for(var t=0;t<n.length;++t)e[t]=n.charCodeAt(t)}return function(e){for(var n=[],t=32*e.length,r=0;r<t;r+=8){var o=e[r>>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);n.push(i)}return n}(function(e,n){e[n>>5]|=128<<n%32,e[r(n)-1]=n;for(var t=1732584193,i=-271733879,f=-1732584194,d=271733878,l=0;l<e.length;l+=16){var p=t,h=i,w=f,y=d;t=a(t,i,f,d,e[l],7,-680876936),d=a(d,t,i,f,e[l+1],12,-389564586),f=a(f,d,t,i,e[l+2],17,606105819),i=a(i,f,d,t,e[l+3],22,-1044525330),t=a(t,i,f,d,e[l+4],7,-176418897),d=a(d,t,i,f,e[l+5],12,1200080426),f=a(f,d,t,i,e[l+6],17,-1473231341),i=a(i,f,d,t,e[l+7],22,-45705983),t=a(t,i,f,d,e[l+8],7,1770035416),d=a(d,t,i,f,e[l+9],12,-1958414417),f=a(f,d,t,i,e[l+10],17,-42063),i=a(i,f,d,t,e[l+11],22,-1990404162),t=a(t,i,f,d,e[l+12],7,1804603682),d=a(d,t,i,f,e[l+13],12,-40341101),f=a(f,d,t,i,e[l+14],17,-1502002290),i=a(i,f,d,t,e[l+15],22,1236535329),t=u(t,i,f,d,e[l+1],5,-165796510),d=u(d,t,i,f,e[l+6],9,-1069501632),f=u(f,d,t,i,e[l+11],14,643717713),i=u(i,f,d,t,e[l],20,-373897302),t=u(t,i,f,d,e[l+5],5,-701558691),d=u(d,t,i,f,e[l+10],9,38016083),f=u(f,d,t,i,e[l+15],14,-660478335),i=u(i,f,d,t,e[l+4],20,-405537848),t=u(t,i,f,d,e[l+9],5,568446438),d=u(d,t,i,f,e[l+14],9,-1019803690),f=u(f,d,t,i,e[l+3],14,-187363961),i=u(i,f,d,t,e[l+8],20,1163531501),t=u(t,i,f,d,e[l+13],5,-1444681467),d=u(d,t,i,f,e[l+2],9,-51403784),f=u(f,d,t,i,e[l+7],14,1735328473),i=u(i,f,d,t,e[l+12],20,-1926607734),t=c(t,i,f,d,e[l+5],4,-378558),d=c(d,t,i,f,e[l+8],11,-2022574463),f=c(f,d,t,i,e[l+11],16,1839030562),i=c(i,f,d,t,e[l+14],23,-35309556),t=c(t,i,f,d,e[l+1],4,-1530992060),d=c(d,t,i,f,e[l+4],11,1272893353),f=c(f,d,t,i,e[l+7],16,-155497632),i=c(i,f,d,t,e[l+10],23,-1094730640),t=c(t,i,f,d,e[l+13],4,681279174),d=c(d,t,i,f,e[l],11,-358537222),f=c(f,d,t,i,e[l+3],16,-722521979),i=c(i,f,d,t,e[l+6],23,76029189),t=c(t,i,f,d,e[l+9],4,-640364487),d=c(d,t,i,f,e[l+12],11,-421815835),f=c(f,d,t,i,e[l+15],16,530742520),i=c(i,f,d,t,e[l+2],23,-995338651),t=s(t,i,f,d,e[l],6,-198630844),d=s(d,t,i,f,e[l+7],10,1126891415),f=s(f,d,t,i,e[l+14],15,-1416354905),i=s(i,f,d,t,e[l+5],21,-57434055),t=s(t,i,f,d,e[l+12],6,1700485571),d=s(d,t,i,f,e[l+3],10,-1894986606),f=s(f,d,t,i,e[l+10],15,-1051523),i=s(i,f,d,t,e[l+1],21,-2054922799),t=s(t,i,f,d,e[l+8],6,1873313359),d=s(d,t,i,f,e[l+15],10,-30611744),f=s(f,d,t,i,e[l+6],15,-1560198380),i=s(i,f,d,t,e[l+13],21,1309151649),t=s(t,i,f,d,e[l+4],6,-145523070),d=s(d,t,i,f,e[l+11],10,-1120210379),f=s(f,d,t,i,e[l+2],15,718787259),i=s(i,f,d,t,e[l+9],21,-343485551),t=o(t,p),i=o(i,h),f=o(f,w),d=o(d,y)}return[t,i,f,d]}(function(e){if(0===e.length)return[];for(var n=8*e.length,t=new Uint32Array(r(n)),o=0;o<n;o+=8)t[o>>5]|=(255&e[o/8])<<o%32;return t}(e),8*e.length))};n.default=f},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t(26)),o=i(t(10));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e,n,t){var i=(e=e||{}).random||(e.rng||r.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){t=t||0;for(var a=0;a<16;++a)n[t+a]=i[a];return n}return(0,o.default)(i)};n.default=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t(27)),o=i(t(59));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,o.default);n.default=a},function(e,n,t){"use strict";function r(e,n,t,r){switch(e){case 0:return n&t^~n&r;case 1:return n^t^r;case 2:return n&t^n&r^t&r;case 3:return n^t^r}}function o(e,n){return e<<n|e>>>32-n}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=function(e){var n=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var a=0;a<i.length;++a)e.push(i.charCodeAt(a))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var u=e.length/4+2,c=Math.ceil(u/16),s=new Array(c),f=0;f<c;++f){for(var d=new Uint32Array(16),l=0;l<16;++l)d[l]=e[64*f+4*l]<<24|e[64*f+4*l+1]<<16|e[64*f+4*l+2]<<8|e[64*f+4*l+3];s[f]=d}s[c-1][14]=8*(e.length-1)/Math.pow(2,32),s[c-1][14]=Math.floor(s[c-1][14]),s[c-1][15]=8*(e.length-1)&4294967295;for(var p=0;p<c;++p){for(var h=new Uint32Array(80),w=0;w<16;++w)h[w]=s[p][w];for(var y=16;y<80;++y)h[y]=o(h[y-3]^h[y-8]^h[y-14]^h[y-16],1);for(var m=t[0],g=t[1],v=t[2],b=t[3],E=t[4],_=0;_<80;++_){var P=Math.floor(_/20),O=o(m,5)+r(P,g,v,b)+E+n[P]+h[_]>>>0;E=b,b=v,v=o(g,30)>>>0,g=m,m=O}t[0]=t[0]+m>>>0,t[1]=t[1]+g>>>0,t[2]=t[2]+v>>>0,t[3]=t[3]+b>>>0,t[4]=t[4]+E>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]};n.default=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default="00000000-0000-0000-0000-000000000000"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t(11))&&r.__esModule?r:{default:r};var i=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};n.default=i},function(e,n,t){"use strict";(function(n){const t={DEV:"development",TEST:"test",PRODUCTION:"production"},r={[t.DEV]:"http",[t.TEST]:"https",[t.PRODUCTION]:"https",[t.STAGING]:"https"},o={[t.DEV]:n.env.API_PROTOCOL||"https",[t.TEST]:"https",[t.PRODUCTION]:"https",[t.STAGING]:"https"},i={[t.DEV]:"localhost:9001",[t.TEST]:"sdk.test.host",[t.PRODUCTION]:"js.crypto.com",[t.STAGING]:"js.3ona.co"},a={[t.DEV]:n.env.API_HOST||"localhost:3001",[t.TEST]:"api.test.host",[t.PRODUCTION]:"pay.crypto.com",[t.STAGING]:"pay.3ona.co"};e.exports={ENV:t,APP_ENV:{TESTING:"testing",STAGING:"staging",PRODUCTION:"production"},PROTOCOLS:r,API_PROTOCOLS:o,SDK_HOSTS:i,SDK_FILE_NAME:"cryptopay",API_HOSTS:a,jsonifyPrimitives:function e(n){if(Array.isArray(n))return JSON.stringify(n);if("object"==typeof n&&null!==n){if(n.hasOwnProperty("__literal__"))return n.__literal__;const t={};for(const r of Object.keys(n))t[r]=e(n[r]);return t}if("string"==typeof n||"number"==typeof n||"boolean"==typeof n||null==n)return JSON.stringify(n);if("function"==typeof n)return n();throw new TypeError("Unrecognized type: "+typeof n)}}}).call(this,t(9))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getMerchantOrigin=function(){if(r)return r;try{var e;if("undefined"==typeof window)return null;if((null===(e=window.location.ancestorOrigins)||void 0===e?void 0:e.length)>0)return window.location.ancestorOrigins[0];if(document.referrer)return new URL(document.referrer).origin;const n=window.location.origin;if(n&&!function(e){try{const{hostname:n}=new URL(e),t=function(){try{return"js.crypto.com"}catch{return}}();return!(!t||n!==t)||("crypto.com"===n||n.endsWith(".crypto.com")||"localhost"===n)}catch{return!1}}(n))return n}catch{}return null},n.resetMerchantOriginForTest=function(){r=null},n.setMerchantOrigin=function(e){if(null!==r)return;r=e};let r=null},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(65);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;var r=t(1),o=t(7),i=t(12),a=t(5),u=t(0),c=t(68);const s=(0,o.create)({tag:"crypto-pay-button",defaultContext:"iframe",url:({props:e})=>(0,u.isTest)()&&e.test&&e.test.buttonUrl?e.test.buttonUrl:(0,a.buttonUrl)(),dimensions:{width:"230px",height:"50px"},autoResize:{width:!0,height:!0,element:"#pay-with-crypto"},prerenderTemplate:({doc:e})=>{const n=e.createElement("html");return n.innerHTML=c.prerenderTemplate,n},props:{size:{type:"string",queryParam:!0,required:!1},onClick:{type:"function",required:!1},onWindowClose:{type:"function",required:!1},sdkMeta:{type:"string",queryParam:!0,value:()=>(0,i.getSDKMeta)()},defaultLang:{type:"string",required:!1,queryParam:!0},originPageUrl:{type:"string",queryParam:!1,value:()=>{var e,n;return null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}},createPayment:{type:"function",required:!1,decorate:({value:e})=>function(n){return r.ZalgoPromise.try(()=>e(n)).then(e=>{if(0===Object.keys(e).length)throw new Error("Expected a promise returning payment object");return e})},default:()=>e=>e.payment.create({currency:"USD",amount:1})},onApprove:{type:"function",required:!1,decorate:({value:e})=>function(n,t){return r.ZalgoPromise.try(()=>e(n,t)).then(()=>{})}},onCancel:{type:"function",required:!1,decorate:({value:e})=>function(n){return r.ZalgoPromise.try(()=>e(n)).then(()=>{})},default(){}},test:{type:"object",default:()=>({})}}});n.Button=s},function(e,n,t){"use strict";(function(n){"undefined"!=typeof self&&self,e.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,t,r){function o(e,n){return(o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function i(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,o(e,n)}function a(){return(a=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 u(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}r.r(t),r.d(t,"PopupOpenError",(function(){return Re})),r.d(t,"create",(function(){return tt})),r.d(t,"destroy",(function(){return it})),r.d(t,"destroyComponents",(function(){return rt})),r.d(t,"destroyAll",(function(){return ot})),r.d(t,"PROP_TYPE",(function(){return zn})),r.d(t,"PROP_SERIALIZATION",(function(){return Bn})),r.d(t,"CONTEXT",(function(){return Un})),r.d(t,"EVENT",(function(){return Fn}));var c,s=[],f=[],d=0;function l(){if(!d&&c){var e=c;c=null,e.resolve()}}function p(){d+=1}function h(){d-=1,l()}var w=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;p();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(u(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(u(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===s.indexOf(e)){s.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<f.length;t++)f[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,p();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],c=a.onSuccess,s=a.onError,f=a.promise,d=void 0;if(n)try{d=c?c(this.value):this.value}catch(e){f.reject(e);continue}else if(t){if(!s){f.reject(this.error);continue}try{d=s(this.error)}catch(e){f.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?f.resolve(d.value):f.reject(d.error),d.errorHandled=!0):u(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?f.resolve(d.value):f.reject(d.error):o(d,f):f.resolve(d)}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)},e.resolve=function(n){return n instanceof e?n:u(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 c=n[a];if(c instanceof e){if(c.resolved){o[a]=c.value,r-=1;continue}}else if(!u(c)){o[a]=c,r-=1;continue}i(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];u(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 f.push(e),{cancel:function(){f.splice(f.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;p();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)||u(n)},e.flush=function(){return n=e,t=c=c||new n,l(),t;var n,t},e}();function y(e){return"[object RegExp]"==={}.toString.call(e)}var m={IFRAME:"iframe",POPUP:"popup"},g="Call was rejected by callee.\r\n";function v(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function b(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function E(e){if(void 0===e&&(e=window),e&&!b(e))try{return e.opener}catch(e){}}function _(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=b(e);return r&&_()?P(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function O(e){void 0===e&&(e=window);var n=P(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(v(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(v(e)&&_())return!0;if(O(window)===O(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 T(e,n){if(!e||!n)return!1;var t=b(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 A(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 C(e){for(var n=[],t=0,r=A(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,a=C(o);i<a.length;i++)n.push(a[i])}return n}function j(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(b(e)===e)return e;try{if(T(window,e)&&window.top)return window.top}catch(e){}try{if(T(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=C(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(b(r)===r)return r}}function R(e){var n=j(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(C(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],C(e))),t}var M=[],I=[];function D(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!==g}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}(M,e);if(-1!==t){var r=I[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 k(e){return void 0===e&&(e=window),E(e=e||window)||b(e)||void 0}function N(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 W(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=b(t))&&(n+=1);return n}function L(e,n){var t=j(e)||e,r=j(n)||n;try{if(t&&r)return t===r}catch(e){}var o=R(e),i=R(n);if(N(o,i))return!0;var a=E(t),u=E(r);return a&&N(R(a),i)||u&&N(R(u),o),!1}function z(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(y(n))return!1;if(Array.isArray(n))return!1}return y(e)?y(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!y(n)&&e.some((function(e){return z(e,n)})))}function B(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):O()}function U(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(D(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function F(e){try{if(e===window)return!0}catch(e){if(e&&e.message===g)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===g)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===g)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 H(e){try{e.close()}catch(e){}}function $(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var q,Y=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(F(r)&&D(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!F(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=$(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=$(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=$(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!==$(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 K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(){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 V(e,n,t){return(V=G()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(e,r));return t&&o(i,t.prototype),i}).apply(null,arguments)}function Z(e){var n="function"==typeof Map?new Map:void 0;return(Z=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;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,r)}function r(){return V(e,arguments,K(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)})(e)}function J(e){return e.name||e.__name__||e.displayName||"anonymous"}function X(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function Q(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(void 0!==n)return n.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function ee(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+Q((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ne(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(q=q||new Y,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=q.get(e);return n||(n=typeof e+":"+ee(),q.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function te(){return{}}var re=0,oe=0;function ie(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=re;re+=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<oe&&(t=null,r=null,u=re,re+=1),s=i?(r=r||new Y).getOrSet(this,te):t=t||{};var f=ne(o),d=s[f];if(d&&a&&Date.now()-d.time<a&&(delete s[f],d=null),d)return d.value;var l=Date.now(),p=e.apply(this,arguments);return s[f]={time:l,value:p},p};return c.reset=function(){t=null,r=null},X(c,(n.name||J(e))+"::memoized")}function ae(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=ne(i);return n.hasOwnProperty(u)||(n[u]=w.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},X(t,J(e)+"::promiseMemoized")}function ue(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=ne(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function ce(){}function se(e){var n=!1;return X((function(){if(!n)return n=!0,e.apply(this,arguments)}),J(e)+"::once")}function fe(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: "+fe(e,n+1)}}function de(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function le(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 pe(e){return e}function he(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function we(e){return[].slice.call(e)}function ye(e){return null!=e}function me(e){return"[object RegExp]"==={}.toString.call(e)}function ge(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function ve(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(se((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return w.all(o).then(ce)}}}function be(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}ie.clear=function(){oe=re},ie((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 Ee=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 i(n,e),n}(Z(Error));function _e(){return Boolean(document.body)&&"complete"===document.readyState}function Pe(){return Boolean(document.body)&&"interactive"===document.readyState}function Oe(e){return encodeURIComponent(e)}function Se(e){return ue(Se,(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 xe(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(t=a({},Se(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 Oe(e)+"="+Oe(n.toString())})).join("&")):e;var t}function Te(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),Te(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Ce(e){return new w((function(n,t){var r=de(e),o=Ae(e);if(o)return n(o);if(_e())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)):_e()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}ie((function(){return new w((function(e){if(_e()||Pe())return e();var n=setInterval((function(){if(_e()||Pe())return clearInterval(n),e()}),10)}))}));var je,Re=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),n}(Ee);function Me(e){if((je=je||new Y).has(e)){var n=je.get(e);if(n)return n}var t=new w((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<M.length;e++){var n=!1;try{n=M[e].closed}catch(e){}n&&(I.splice(e,1),M.splice(e,1))}}(),e&&e.contentWindow)try{M.push(e.contentWindow),I.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return je.set(e,t),t}function Ie(e){return Me(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function De(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&&le(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:a({allowTransparency:"true"},e.attributes||{}),style:a({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",ee()),Me(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: "+de(e))}(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function ke(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Ne(e){e.style.setProperty("display","")}function We(e){e.style.setProperty("display","none","important")}function Le(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 Be(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,f=r.win,d=void 0===f?window:f,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,y,m=function(){if(!h&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return d.addEventListener("resize",m),void 0!==d.ResizeObserver?((w=new d.ResizeObserver(m)).observe(e),y=he(m,10*s)):void 0!==d.MutationObserver?((w=new d.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),y=he(m,10*s)):y=he(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),y.cancel()}}}function Ue(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Fe="undefined"!=typeof document?document.currentScript:null,He=ie((function(){if(Fe)return Fe;if(Fe=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 Fe;throw new Error("Can not determine current script")})),$e=ee();function qe(e){return function(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)}(e)+"px"}function Ye(e){return"number"==typeof e?qe(e):"string"==typeof(n=e)&&/^[0-9]+%$/.test(n)?e:qe(e);var n}function Ke(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}ie((function(){var e;try{e=He()}catch(e){return $e}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=ee(),e.setAttribute("data-uid-auto",n)),n}));var Ge=function(){return{}};function Ve(e,n){return void 0===e&&(e="store"),void 0===n&&(n=Ge),ge(Ke(),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 ge(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var Ze,Je=function(){};function Xe(){var e=Ke();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new Je,e.WINDOW_WILDCARD}function Qe(e,n){return void 0===e&&(e="store"),void 0===n&&(n=Ge),Ve("windowStore").getOrSet(e,(function(){var t=new Y,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 ge(r(n),e,t)}}}))}function en(){return Ve("instance").getOrSet("instanceID",ee)}function nn(e,n){var t=n.domain,r=Qe("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=w.resolve({domain:t});return r.set(e,i),i}function tn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:en()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return nn(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function rn(e,n){var t=n.send;return Qe("windowInstanceIDPromises").getOrSet(e,(function(){return tn(e,{send:t}).then((function(e){return e.instanceID}))}))}function on(e){Qe("knownWindows").set(e,!0)}function an(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function un(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 cn(e,n){return{__type__:e,__val__:n}}var sn,fn=((Ze={}).function=function(){},Ze.error=function(e){return cn("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},Ze.promise=function(){},Ze.regex=function(e){return cn("regex",e.source)},Ze.date=function(e){return cn("date",e.toJSON())},Ze.array=function(e){return e},Ze.object=function(e){return e},Ze.string=function(e){return e},Ze.number=function(e){return e},Ze.boolean=function(e){return e},Ze.null=function(e){return e},Ze),dn={},ln=((sn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},sn.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},sn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},sn.regex=function(e){return new RegExp(e)},sn.date=function(e){return new Date(e)},sn.array=function(e){return e},sn.object=function(e){return e},sn.string=function(e){return e},sn.number=function(e){return e},sn.boolean=function(e){return e},sn.null=function(e){return e},sn),pn={};function hn(){for(var e=Ve("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function wn(e,n){var t=n.send,r=n.id,o=void 0===r?ee():r,i=e.then((function(e){if(S(e))return x(e).name})),a=e.then((function(e){if(D(e))throw new Error("Window is closed, can not determine type");return E(e)?m.POPUP:m.IFRAME}));return i.catch(ce),a.catch(ce),{id:o,getType:function(){return a},getInstanceID:ae((function(){return e.then((function(e){return rn(e,{send:t})}))})),close:function(){return e.then(H)},getName:function(){return e.then((function(e){if(!D(e))return S(e)?x(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return D(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(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){var t=S(e),r=function(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}}(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=w.resolve(n)}))}}}new w((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 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 w,this.serializedWindow=r||wn(this.actualWindowPromise,{send:n}),Ve("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===m.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=w.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return w.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=wn(this.actualWindowPromise,{send:t,id:this.getID()}),Qe("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return w.try((function(){return t.actualWindow?e===t.actualWindow:w.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:rn(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&&D(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 hn(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return hn(),Ve("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!F(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(hn(),e.isProxyWindow(n))return n;var o=n;return Qe("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function mn(e,n,t,r,o){var i=Qe("methodStore"),a=Ve("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=Qe("methodStore"),r=Ve("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,Ve("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 "+O(window));var c=a.source,s=a.domain,f=a.val;return w.try((function(){if(!z(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(me(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+O(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 "+O(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return w.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),we(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__||ee();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)?(mn(c,t,s,e,n),e.awaitWindow().then((function(e){mn(c,t,s,e,n)}))):mn(c,t,s,e,n),cn("cross_domain_function",{id:c,name:s})}function bn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=dn);var t=JSON.stringify(e,(function(e){var t=this[e];if(an(this))return t;var r=un(t);if(!r)return t;var o=n[r]||fn[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 cn("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 F(e)||yn.isProxyWindow(e)?cn("cross_domain_window",yn.serialize(e,{send:a})):e},o))}function En(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=pn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(an(this))return t;var r,o;if(an(t)?(r=t.__type__,o=t.__val__):(r=un(t),o=t),!r)return o;var i=n[r]||ln[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new w(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:O()},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 _n={};function Pn(e,n,t,r){var o=r.on,i=r.send;return w.try((function(){var r=Qe().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||w.flush().then((function(){if(D(e))throw new Error("Window is closed");var t,a=bn(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(_n),c=[],s=0;s<u.length;s++){var f=u[s];try{_n[f](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+". "+fe(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(ce)}function On(e){return Ve("responseListeners").get(e)}function Sn(e){Ve("responseListeners").del(e)}function xn(e){return Ve("erroredResponseListeners").has(e)}function Tn(e){var n=e.name,t=e.win,r=e.domain,o=Qe("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,Xe()];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 f=0,d=s.__domain_regex__;f<d.length;f++){var l=d[f],p=l.listener;if(z(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function An(e,n,t,r){var o=r.on,i=r.send,a=Tn({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 w.flush().then((function(){if(!t.fireAndForget&&!D(e))try{return Pn(e,n,{id:ee(),origin:O(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 "+O()+"\n\n"+fe(e))}}))}return w.all([w.flush().then((function(){if(!t.fireAndForget&&!D(e))try{return Pn(e,n,{id:ee(),origin:O(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 "+O()+"\n\n"+fe(e))}})),w.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(!z(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(ce).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function Cn(e,n,t){if(!xn(t.hash)){var r=On(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 jn(e,n,t){if(!xn(t.hash)){var r,o=On(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(" | ")+")":y(r)?"RegExp("+r.toString():r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Sn(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}function Rn(e,n){var t=n.on,r=n.send,o=Ve("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=En(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){on(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),D(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?An(i,a,s,{on:t,send:r}):"postrobot_message_response"===s.type?jn(i,a,s):"postrobot_message_ack"===s.type&&Cn(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function Mn(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=Qe("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 f=[],d=0,l=i;d<l.length;d++)f.push(e({name:r,win:o,domain:l[d]},t));return{cancel:function(){for(var e=0;e<f.length;e++)f[e].cancel()}}}var p=Tn({name:r,win:o,domain:i});if(o&&"*"!==o||(o=Xe()),i=i||"*",p)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===Xe()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===Xe()?"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 h,w,y=a.getOrSet(o,(function(){return{}})),m=ge(y,r,(function(){return{}})),g=i.toString();return me(i)?(h=ge(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[g]=t,{cancel:function(){delete m[g],w&&(h.splice(h.indexOf(w,1)),h.length||delete m.__domain_regex__),Object.keys(m).length||delete y[r],o&&!Object.keys(y).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()}}}_n.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},_n.postrobot_global=function(e,n){if(!function(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}(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!==L(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=Ke(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:O(),data:n})};var In=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return w.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!me(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(D(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=k(n);if(t)return t===e;if(n===e)return!1;if(j(n)===n)return!1;for(var r=0,o=A(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 Qe("helloPromises").getOrSet(e,(function(){return new w}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}(n,u)})).then((function(t){return function(e,n,t,r){var o=r.send;return w.try((function(){return"string"==typeof n?n:w.try((function(){return t||tn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!z(n,n))throw new Error("Domain "+de(n)+" does not match "+de(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 w,f=t+"_"+ee();if(!c){var d={name:t,win:n,domain:i,promise:s};!function(e,n){Ve("responseListeners").set(e,n)}(f,d);var l=Qe("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){Ve("erroredResponseListeners").set(e,!0)}(f),Sn(f)}));var p=function(e){return Qe("knownWindows").get(e,!1)}(n)?1e4:2e3,h=a,y=p,m=h,g=he((function(){return D(n)?s.reject(new Error("Window closed for "+t+" before "+(d.ack?"response":"ack"))):d.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==m&&(m=Math.max(m-500,0)),d.ack||0!==y?0===m?s.reject(new Error("No response for postMessage "+u+" in "+O()+" in "+h+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+O()+" in "+p+"ms")))}),500);s.finally((function(){g.cancel(),l.splice(l.indexOf(s,1))})).catch(ce)}return Pn(n,i,{id:ee(),origin:O(window),type:"postrobot_message_request",hash:f,name:t,data:r,fireAndForget:c},{on:Mn,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+O()+"\n\n"+fe(e))}))}))};function Dn(e,n,t){return bn(e,n,t,{on:Mn,send:In})}function kn(e,n,t){return En(e,n,t,{on:Mn,send:In})}function Nn(e){return yn.toProxyWindow(e,{send:In})}function Wn(e){if(void 0===e&&(e=window),!S(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_65__||(e.__zoid_9_0_65__={}),e.__zoid_9_0_65__}function Ln(e){return{get:function(){var n=this;return w.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}var zn={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},Bn={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},Un=m,Fn={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 Hn(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 $n(e){return ue($n,(function(){if(!e)throw new Error("No window name");var t=e.split("__"),r=t[1],o=t[2],i=t[3];if("zoid"!==r)throw new Error("Window not rendered by zoid - got "+r);if(!o)throw new Error("Expected component name");if(!i)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(void 0!==n)return n.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(i))}catch(e){throw new Error("Can not decode window name payload: "+i+": "+fe(e))}}),[e])}function qn(){try{return $n(window.name)}catch(e){}}function Yn(){return w.try((function(){window.focus()}))}function Kn(){return w.try((function(){window.close()}))}function Gn(e,n,t){return w.try((function(){return"function"==typeof e.queryParam?e.queryParam({value:t}):"string"==typeof e.queryParam?e.queryParam:n}))}function Vn(e,n,t){return w.try((function(){return"function"==typeof e.queryValue&&ye(t)?e.queryValue({value:t}):t}))}function Zn(e,n,t){void 0===n&&(n={}),void 0===t&&(t=window);var r,o,i,u,c,s=e.propsDef,f=e.containerTemplate,d=e.prerenderTemplate,l=e.tag,p=e.name,h=e.attributes,y=e.dimensions,m=e.autoResize,g=e.url,v=e.domain,b=new w,E=[],_=ve(),P={},T={visible:!0},A=n.event?n.event:(r={},o={},{on:function(e,n){var t=o[e]=o[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 i=o[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(w.try((function(){return n.apply(void 0,t)})))},c=0;c<i.length;c++)u(c);return w.all(a).then(ce)},triggerOnce:function(e){if(r[e])return w.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(){o={}}}),C=n.props?n.props:{},j=n.onError,R=n.getProxyContainer,M=n.show,I=n.hide,k=n.close,N=n.renderContainer,F=n.getProxyWindow,H=n.setProxyWin,$=n.openFrame,q=n.openPrerenderFrame,Y=n.prerender,K=n.open,G=n.openPrerender,V=n.watchForUnload,Z=n.getInternalState,J=n.setInternalState,X=function(e){for(var n={},t=0,r=Object.keys(C);t<r.length;t++){var o=r[t],i=s[o];i&&!1===i.sendToChild||i&&i.sameDomain&&!z(e,O(window))||(n[o]=C[o])}return w.hash(n)},ne=function(){return w.try((function(){return Z?Z():T}))},te=function(e){return w.try((function(){return J?J(e):T=a({},T,e)}))},re=function(){return F?F():w.try((function(){var e=C.window;if(e){var n=Nn(e);return _.register((function(){return e.close()})),n}return new yn({send:In})}))},oe=function(e){return R?R(e):w.try((function(){return Ce(e)})).then((function(e){return Ue(e)&&(e=function(e){var n=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Ue(e))return e}(e);if(n.host)return n.host}(e);if(!n)throw new Error("Element is not in shadow dom");if(Ue(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+ee(),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)),Ln(e)}))},ae=function(e){return H?H(e):w.try((function(){i=e}))},ue=function(){return M?M():w.hash({setState:te({visible:!0}),showElement:u?u.get().then(Ne):null}).then(ce)},de=function(){return I?I():w.hash({setState:te({visible:!1}),showElement:u?u.get().then(We):null}).then(ce)},pe=function(){return"function"==typeof g?g({props:C}):g},ge=function(){return"function"==typeof h?h({props:C}):h},be=function(){return v&&"string"==typeof v?v:B(pe())},Ee=function(){return v&&me(v)?v:be()},_e=function(e,n){var t=n.windowName;return $?$(e,{windowName:t}):w.try((function(){if(e===Un.IFRAME)return Ln(De({attributes:a({name:t,title:p},ge().iframe)}))}))},Pe=function(e){return q?q(e):w.try((function(){if(e===Un.IFRAME)return Ln(De({attributes:a({name:"__zoid_prerender_frame__"+p+"_"+ee()+"__",title:"prerender__"+p},ge().iframe)}))}))},Oe=function(e,n,t){return G?G(e,n,t):w.try((function(){if(e===Un.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return _.register((function(){return Le(e)})),Ie(e).then((function(e){return x(e)})).then((function(e){return Nn(e)}))}))}throw new Error("No render context available for "+e)}))},Se=function(){return w.try((function(){if(i)return w.all([A.trigger(Fn.FOCUS),i.focus()]).then(ce)}))},Te=function(e,n,t,r){if(n===O(window)){var o=Wn(window);return o.windows=o.windows||{},o.windows[t]=window,_.register((function(){delete o.windows[t]})),{type:"global",uid:t}}return r===Un.POPUP?{type:"opener"}:{type:"parent",distance:W(window)}},je=function(e){return w.try((function(){c=e,b.resolve(),_.register((function(){return e.close.fireAndForget().catch(ce)}))}))},Re=function(e){var n=e.width,t=e.height;return w.try((function(){A.trigger(Fn.RESIZE,{width:n,height:t})}))},Me=function(e){return w.try((function(){return A.trigger(Fn.DESTROY)})).catch(ce).then((function(){return _.all(e)})).then((function(){b.asyncReject(e||new Error("Component destroyed"))}))},Fe=ie((function(e){return w.try((function(){if(k){if(D(k.__source__))return;return k()}return w.try((function(){return A.trigger(Fn.CLOSE)})).then((function(){return Me(e||new Error("Component closed"))}))}))})),He=function(e,n){var t=n.proxyWin,r=n.proxyFrame;return K?K(e,{proxyWin:t,proxyFrame:r,windowName:n.windowName}):w.try((function(){if(e===Un.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return Ie(e).then((function(n){return _.register((function(){return Le(e)})),_.register((function(){return function(e){for(var n=0,t=Qe("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(D(e)?"closed":"cleaned up")+" before response")).catch(ce)}(n)})),n}))}))}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:In}),t}))},$e=function(){return w.try((function(){var e=ke(window,"unload",se((function(){Me(new Error("Window navigated away"))}))),n=U(t,Me,3e3);if(_.register(n.cancel),_.register(e.cancel),V)return V()}))},qe=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,Fe(new Error("Detected component window close"))):w.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,Fe(new Error("Detected component window close"))}))})).then((function(){return n}))},Ye=function(e){return j?j(e):w.try((function(){if(-1===E.indexOf(e))return E.push(e),b.asyncReject(e),A.trigger(Fn.ERROR,e)}))};je.onError=Ye;var Ke=function(e,n){return e({container:n.container,context:n.context,uid:n.uid,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:Se,close:Fe,state:P,props:C,tag:l,dimensions:y,event:A})},Ge=function(e,n){var t=n.context,r=n.uid;return Y?Y(e,{context:t,uid:r}):w.try((function(){if(d){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 o=(n=x(n)).document,i=Ke(d,{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=we(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=we(n.children);a<u.length;a++)r.appendChild(u[a])}(n,i);var a=m.width,u=void 0!==a&&a,c=m.height,s=void 0!==c&&c,f=m.element,l=void 0===f?"body":f;if((l=Ae(l,o))&&(u||s)){var p=Be(l,(function(e){Re({width:u?e.width:void 0,height:s?e.height:void 0})}),{width:u,height:s,win:n});A.on(Fn.RENDERED,p.cancel)}}}}}))},Ve=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.uid;return N?N(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,uid:i}):w.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=Ke(f,{context:o,uid:i,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||We(r),function(e,n){e.appendChild(n)}(n,r);var a=function(e,n){n=se(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&&Le(r)},c=function(){i||(n(),u())};if(ze(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var f=new window.MutationObserver((function(){ze(e)&&c()}));f.observe(s,{childList:!0}),a.push(f),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+ee()+"__"),r.style.display="none",Ie(r).then((function(e){(o=x(e)).addEventListener("unload",c)})),e.appendChild(r),t=he((function(){ze(e)&&c()}),1e3),{cancel:u}}(r,(function(){return Fe(new Error("Detected container element removed from DOM"))}));return _.register((function(){return a.cancel()})),_.register((function(){return Le(r)})),u=Ln(r)}}))},Ze=function(){return{state:P,event:A,close:Fe,focus:Se,resize:Re,onError:Ye,updateProps:Xe,show:ue,hide:de}},Je=function(e,n){void 0===n&&(n=!1);var t=Ze();!function(e,n,t,r,o){void 0===o&&(o=!1),le(n,t=t||{});for(var i=o?[]:[].concat(Object.keys(e)),a=0,u=Object.keys(t);a<u.length;a++){var c=u[a];-1===i.indexOf(c)&&i.push(c)}for(var s=[],f=r.state,d=r.close,l=r.focus,p=r.event,h=r.onError,w=0;w<i.length;w++){var y=i[w],m=e[y],g=t[y];if(m){var v=m.alias;if(v&&(!ye(g)&&ye(t[v])&&(g=t[v]),s.push(v)),m.value&&(g=m.value({props:n,state:f,close:d,focus:l,event:p,onError:h})),!ye(g)&&m.default&&(g=m.default({props:n,state:f,close:d,focus:l,event:p,onError:h})),ye(g)&&("array"===m.type?!Array.isArray(g):typeof g!==m.type))throw new TypeError("Prop is not of type "+m.type+": "+y);n[y]=g}}for(var b=0;b<s.length;b++)delete n[s[b]];for(var E=0,_=Object.keys(n);E<_.length;E++){var P=_[E],O=e[P],S=n[P];O&&ye(S)&&O.decorate&&(n[P]=O.decorate({value:S,props:n,state:f,close:d,focus:l,event:p,onError:h}))}for(var x=0,T=Object.keys(e);x<T.length;x++){var A=T[x];if(!1!==e[A].required&&!ye(n[A]))throw new Error('Expected prop "'+A+'" to be defined')}}(s,C,e,t,n)},Xe=function(e){return Je(e,!0),b.then((function(){var e=c,n=i;if(e&&n)return X(Ee()).then((function(t){return e.updateProps(t).catch((function(e){return qe(n).then((function(n){if(!n)throw e}))}))}))}))};return{init:function(){A.on(Fn.RENDER,(function(){return C.onRender()})),A.on(Fn.DISPLAY,(function(){return C.onDisplay()})),A.on(Fn.RENDERED,(function(){return C.onRendered()})),A.on(Fn.CLOSE,(function(){return C.onClose()})),A.on(Fn.DESTROY,(function(){return C.onDestroy()})),A.on(Fn.RESIZE,(function(){return C.onResize()})),A.on(Fn.FOCUS,(function(){return C.onFocus()})),A.on(Fn.PROPS,(function(e){return C.onProps(e)})),A.on(Fn.ERROR,(function(e){return C&&C.onError?C.onError(e):b.reject(e).then((function(){setTimeout((function(){throw e}),1)}))})),_.register(A.reset)},render:function(e,n,t){return w.try((function(){var r="zoid-"+l+"-"+ee(),o=Ee(),a=be();!function(e,n,t){if(e!==window){if(!L(window,e))throw new Error("Can only renderTo an adjacent frame");var r=O();if(!z(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+" }")}}(e,o,n);var u=w.try((function(){if(e!==window)return function(e,n){for(var t={},r=0,o=Object.keys(C);r<o.length;r++){var i=o[r],a=s[i];a&&a.allowDelegate&&(t[i]=C[i])}var u=In(n,"zoid_delegate_"+p,{overrides:{props:t,event:A,close:Fe,onError:Ye,getInternalState:ne,setInternalState:te}}).then((function(e){var t=e.data.parent;return _.register((function(e){if(!D(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"+fe(e))}));return R=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)}))},N=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)}))},M=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)}))},I=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)}))},V=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===Un.IFRAME&&(F=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)}))},$=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)}))},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.openPrerenderFrame.apply(e,n)}))},Y=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)}))},K=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)}))},G=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)}))}),u}(t,e)})),c=C.window,f=$e(),d=function(e,n){var t={},r=Object.keys(n);return w.all(r.map((function(r){var o=e[r];if(o)return w.resolve().then((function(){var e=n[r];if(null!=e&&o.queryParam)return e})).then((function(e){if(null!=e)return w.all([Gn(o,r,e),Vn(o,0,e)]).then((function(e){var n,i=e[0],a=e[1];if("boolean"==typeof a)n=a.toString();else if("string"==typeof a)n=a.toString();else if("object"==typeof a&&null!==a){if(o.serialization===Bn.JSON)n=JSON.stringify(a);else if(o.serialization===Bn.BASE64)n=Q(JSON.stringify(a));else if(o.serialization===Bn.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}(a,r);for(var u=0,c=Object.keys(n);u<c.length;u++){var s=c[u];t[s]=n[s]}return}}else"number"==typeof a&&(n=a.toString());t[i]=n}))}))}))).then((function(){return t}))}(s,C).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=xe(u[1],o),s=xe(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(function(e){if(0!==B(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}(pe()),{query:e})})),h=A.trigger(Fn.RENDER),y=oe(n),m=re(),g=m.then((function(n){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomain,o=n.domain,i=(void 0===n.target&&window,n.context),a=n.uid;return function(e,n,t,r){return X(t).then((function(o){var i=Dn(e,t,o),a=n===O()?{type:"uid",uid:r}:{type:"raw",value:i};if("uid"===a.type){var u=Wn(window);u.props=u.props||{},u.props[r]=i,_.register((function(){delete u.props[r]}))}return a}))}(t,r,o,a).then((function(e){return{uid:a,context:i,tag:l,version:"9_0_65",childDomain:r,parentDomain:O(window),parent:Te(0,r,a,i),props:e,exports:Dn(t,o,(n=t,{init:je,close:Fe,checkClose:function(){return qe(n)},resize:Re,onError:Ye,show:ue,hide:de}))};var n}))}({proxyWin:(i={proxyWin:n,childDomain:a,domain:o,target:e,context:t,uid:r}).proxyWin,childDomain:i.childDomain,domain:i.domain,target:i.target,context:i.context,uid:i.uid}).then((function(e){return"__zoid__"+p+"__"+Q(JSON.stringify(e))+"__"}));var i})),v=g.then((function(e){return _e(t,{windowName:e})})),E=Pe(t),P=w.hash({proxyContainer:y,proxyFrame:v,proxyPrerenderFrame:E}).then((function(e){return Ve(e.proxyContainer,{context:t,uid:r,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame})})).then((function(e){return e})),x=w.hash({windowName:g,proxyFrame:v,proxyWin:m}).then((function(e){var n=e.proxyWin;return c?n:He(t,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),T=w.hash({proxyWin:x,proxyPrerenderFrame:E}).then((function(e){return Oe(t,e.proxyWin,e.proxyPrerenderFrame)})),j=x.then((function(e){return i=e,ae(e)})),k=w.hash({proxyPrerenderWin:T,state:j}).then((function(e){return Ge(e.proxyPrerenderWin,{context:t,uid:r})})),W=w.hash({proxyWin:x,windowName:g}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),U=w.hash({proxyWin:x,builtUrl:d,windowName:W,prerender:k}).then((function(e){return e.proxyWin.setLocation(e.builtUrl)})),H=x.then((function(e){!function e(n,t){var r=!1;return _.register((function(){r=!0})),w.delay(2e3).then((function(){return n.isClosed()})).then((function(o){return o?Fe(new Error("Detected "+t+" close")):r?void 0:e(n,t)}))}(e,t)})),Z=w.hash({container:P,prerender:k}).then((function(){return A.trigger(Fn.DISPLAY)})),J=x.then((function(e){})),ie=U.then((function(){return w.try((function(){var e=C.timeout;if(e)return b.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),ce=b.then((function(){return A.trigger(Fn.RENDERED)}));return w.hash({initPromise:b,buildUrlPromise:d,onRenderPromise:h,getProxyContainerPromise:y,openFramePromise:v,openPrerenderFramePromise:E,renderContainerPromise:P,openPromise:x,openPrerenderPromise:T,setStatePromise:j,prerenderPromise:k,loadUrlPromise:U,buildWindowNamePromise:g,setWindowNamePromise:W,watchForClosePromise:H,onDisplayPromise:Z,openBridgePromise:J,runTimeoutPromise:ie,onRenderedPromise:ce,delegatePromise:u,watchForUnloadPromise:f})})).catch((function(e){return w.all([Ye(e),Me(e)]).then((function(){throw e}),(function(){throw e}))})).then(ce)},destroy:Me,setProps:Je,getHelpers:Ze,getDelegateOverrides:function(){return w.try((function(){return{getProxyContainer:oe,show:ue,hide:de,renderContainer:Ve,getProxyWindow:re,watchForUnload:$e,openFrame:_e,openPrerenderFrame:Pe,prerender:Ge,open:He,openPrerender:Oe,setProxyWin:ae}}))}}}function Jn(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 f=o.createElement("div");f.setAttribute("id",n);var d=o.createElement("style");return i.cspNonce&&d.setAttribute("nonce",i.cspNonce),d.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        ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(Fn.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Le(r)}),1)})),a.on(Fn.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=Ye(n)),"number"==typeof t&&(f.style.height=Ye(t))})),f}}var Xn=function(){return ce},Qn=function(e){return se(e.value)},et=ve(),nt=ve();function tt(e){var n,t,r,o;Ke().initialized||(Ke().initialized=!0,t=(n={on:Mn,send:In}).on,r=n.send,(o=Ke()).receiveMessage=o.receiveMessage||function(e){return Rn(e,{on:t,send:r})},function(e){var n=e.on,t=e.send;Ve().getOrSet("postMessageListener",(function(){return ke(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;w.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");Rn({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:Mn,send:In}),function(e){var n=e.on,t=e.send;Ve("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return nn(e.source,{domain:e.origin}),{instanceID:en()}})),r=k();return r&&tn(r,{send:t}).catch((function(e){})),e}))}({on:Mn,send:In}));var i=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,i=e.props,u=void 0===i?{}:i,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,p=void 0===l?"*":l,h=e.attributes,w=void 0===h?{}:h,y=e.defaultContext,m=void 0===y?Un.IFRAME:y,g=e.containerTemplate,v=void 0===g?Jn:g,b=e.prerenderTemplate,E=void 0===b?null:b,_=e.validate,P=e.eligible,O=void 0===P?function(){return{eligible:!0}}:P,x=e.logger,T=void 0===x?{info:ce}:x,A=n.replace(/-/g,"_"),C=s.width,j=void 0===C?"300px":C,R=s.height,M=void 0===R?"150px":R;if(u=a({},{window:{type:"object",sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!F(n)&&!yn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(F(n)){if(D(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return Nn(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:Xn,decorate:Qn},onRendered:{type:"function",required:!1,sendToChild:!1,default:Xn,decorate:Qn},onRender:{type:"function",required:!1,sendToChild:!1,default:Xn,decorate:Qn},onClose:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Xn,decorate:Qn},onDestroy:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Xn,decorate:Qn},onResize:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Xn},onFocus:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:Xn},onError:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:"function",required:!1,sendToChild:!1,default:Xn,childDecorate:function(e){return e.onProps}}},u),!v)throw new Error("Container template required");return{name:A,tag:n,url:t,domain:r,bridgeUrl:o,propsDef:u,dimensions:{width:j,height:M},autoResize:d,allowedParentDomains:p,attributes:w,defaultContext:m,containerTemplate:v,prerenderTemplate:E,validate:_,logger:T,eligible:O}}(e),o=r.name,i=r.tag,u=r.defaultContext,c=r.eligible,s=Wn(),f=[],d=function(){var e=qn();return Boolean(e&&e.tag===i&&e.childDomain===O())},l=ie((function(){if(d()){if(window.xprops)throw delete s.components[i],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,t=e.propsDef,r=e.autoResize,o=e.allowedParentDomains,i=[],a=qn();if(!a)throw new Error("No child payload found");if("9_0_65"!==a.version)throw new Error("Parent window has zoid version "+a.version+", child window has version 9_0_65");var u=a.uid,c=a.parentDomain,s=a.exports,f=a.context,d=a.props,l=function(e){var n,t,r=e.type;if("opener"===r)return be("opener",E(window));if("parent"===r&&"number"==typeof e.distance)return be("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=b(t)}return t}(n,W(n)-t)));if("global"===r&&e.uid&&"string"==typeof e.uid){var o=e.uid,i=k(window);if(!i)throw new Error("Can not find ancestor window");for(var a=0,u=R(i);a<u.length;a++){var c=u[a];if(S(c)){var s=Wn(c);if(s&&s.windows&&s.windows[o])return s.windows[o]}}}throw new Error("Unable to find "+r+" parent component window")}(a.parent),p=kn(l,c,s),h=p.show,y=p.hide,m=p.close,g=function(){return l},v=function(){return c},_=function(e){i.push(e)},P=function(e){return w.try((function(){if(p&&p.onError)return p.onError(e);throw e}))},x=function(e){return p.resize.fireAndForget({width:e.width,height:e.height})},T=function(e,r,o){void 0===o&&(o=!1);var a=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],f=n[s];if(!f||!f.sameDomain||r===O(window)&&S(e)){var d=Hn(n,0,s,t[s],o);a[s]=d,f&&f.alias&&!a[f.alias]&&(a[f.alias]=d)}}if(!i)for(var l=0,p=Object.keys(n);l<p.length;l++){var h=p[l];t.hasOwnProperty(h)||(a[h]=Hn(n,0,h,void 0,o))}return a}(l,t,e,r,{show:h,hide:y,close:m,focus:Yn,onError:P,resize:x,onProps:_,getParent:g,getParentDomain:v,uid:u},o);n?le(n,a):n=a;for(var c=0;c<i.length;c++)(0,i[c])(n)},A=function(e){return w.try((function(){return T(e,c,!0)}))};return{init:function(){return w.try((function(){return function(e,n){if(!z(e,n))throw new Error("Can not be rendered by domain: "+n)}(o,c),on(l),window.addEventListener("beforeunload",(function(){p.checkClose.fireAndForget()})),window.addEventListener("unload",(function(){p.checkClose.fireAndForget()})),U(l,(function(){Kn()})),p.init({updateProps:A,close:Kn})})).then((function(){return(e=r.width,n=void 0!==e&&e,t=r.height,o=void 0!==t&&t,i=r.element,Ce(void 0===i?"body":i).catch(ce).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)&&f!==Un.POPUP&&Be(r,(function(e){x({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){P(e)}))},getProps:function(){return n||(T(function(e,n,t){var r,o=t.type,i=t.uid;if("raw"===o)r=t.value;else if("uid"===o){if(!S(e))throw new Error("Parent component window is on a different domain - expected "+O()+" - can not retrieve props");var a=Wn(e);r=be("props",a&&a.props[i])}if(!r)throw new Error("Could not find props");return kn(e,n,r)}(l,c,d),c),n)}}}(r);return e.init(),e}}));if(l(),n=Mn("zoid_allow_delegate_"+o,(function(){return!0})),t=Mn("zoid_delegate_"+o,(function(e){return{parent:Zn(r,e.data.overrides,e.source)}})),nt.register(n.cancel),nt.register(t.cancel),s.components=s.components||{},s.components[i])throw new Error("Can not register multiple components with the same tag: "+i);return s.components[i]=!0,{init:function e(n){var t,i=c({props:n=n||{}}),s=i.eligible,d=i.reason,l=n.onDestroy;n.onDestroy=function(){if(t&&s&&f.splice(f.indexOf(t),1),l)return l.apply(void 0,arguments)};var p=Zn(r);p.init(),s?p.setProps(n):n.onDestroy&&n.onDestroy(),et.register((function(e){p.destroy(e||new Error("zoid destroyed all components"))}));var h=function(e,t,r){return w.try((function(){if(!s){var t=new Error(d||o+" component is not eligible");return p.destroy(t).then((function(){throw t}))}if(!F(e))throw new Error("Must pass window to renderTo");return function(e,n){return w.try((function(){if(e.window)return Nn(e.window).getType();if(n){if(n!==Un.IFRAME&&n!==Un.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(n,r)})).then((function(n){return t=function(e,n){if(n){if("string"!=typeof n&&!Te(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===Un.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=a({},p.getHelpers(),{isEligible:function(){return s},clone:function(t){var r=(void 0===t?{}:t).decorate;return e((void 0===r?pe:r)(n))},render:function(e,n){return h(window,e,n)},renderTo:function(e,n,t){return h(e,n,t)}}),s&&f.push(t),t},instances:f,driver:function(e,n){throw new Error("Driver support not enabled")},isChild:d,canRenderTo:function(e){return In(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:l}}(e),u=function(e){return i.init(e)};u.driver=function(e,n){return i.driver(e,n)},u.isChild=function(){return i.isChild()},u.canRenderTo=function(e){return i.canRenderTo(e)},u.instances=i.instances;var c=i.registerChild();return c&&(window.xprops=u.xprops=c.getProps()),u}function rt(e){var n=et.all(e);return et=ve(),n}var ot=rt;function it(e){var n;return ot(),delete window.__zoid_9_0_65__,function(){for(var e=Ve("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=Ve().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_42__,nt.all(e)}}])}).call(this,t(15).Buffer)},function(e,n,t){"use strict";(function(n){"undefined"!=typeof self&&self,e.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,t,r){function o(e,n){return(o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function i(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,o(e,n)}function a(){return(a=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 u(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}r.r(t),r.d(t,"PopupOpenError",(function(){return ke})),r.d(t,"create",(function(){return xt})),r.d(t,"destroy",(function(){return Ct})),r.d(t,"destroyComponents",(function(){return Tt})),r.d(t,"destroyAll",(function(){return At})),r.d(t,"PROP_TYPE",(function(){return ct})),r.d(t,"PROP_SERIALIZATION",(function(){return st})),r.d(t,"CONTEXT",(function(){return ft})),r.d(t,"EVENT",(function(){return dt}));var c,s=[],f=[],d=0;function l(){if(!d&&c){var e=c;c=null,e.resolve()}}function p(){d+=1}function h(){d-=1,l()}var w=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;p();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(u(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(u(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===s.indexOf(e)){s.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<f.length;t++)f[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,p();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],c=a.onSuccess,s=a.onError,f=a.promise,d=void 0;if(n)try{d=c?c(this.value):this.value}catch(e){f.reject(e);continue}else if(t){if(!s){f.reject(this.error);continue}try{d=s(this.error)}catch(e){f.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?f.resolve(d.value):f.reject(d.error),d.errorHandled=!0):u(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?f.resolve(d.value):f.reject(d.error):o(d,f):f.resolve(d)}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)},e.resolve=function(n){return n instanceof e?n:u(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 c=n[a];if(c instanceof e){if(c.resolved){o[a]=c.value,r-=1;continue}}else if(!u(c)){o[a]=c,r-=1;continue}i(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];u(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 f.push(e),{cancel:function(){f.splice(f.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;p();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)||u(n)},e.flush=function(){return n=e,t=c=c||new n,l(),t;var n,t},e}();function y(e){return"[object RegExp]"==={}.toString.call(e)}var m={IFRAME:"iframe",POPUP:"popup"},g="Call was rejected by callee.\r\n";function v(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function b(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function E(e){if(void 0===e&&(e=window),e&&!b(e))try{return e.opener}catch(e){}}function _(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=b(e);return r&&_()?P(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function O(e){void 0===e&&(e=window);var n=P(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(v(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(v(e)&&_())return!0;if(O(window)===O(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 T(e,n){if(!e||!n)return!1;var t=b(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 A(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 C(e){for(var n=[],t=0,r=A(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,a=C(o);i<a.length;i++)n.push(a[i])}return n}function j(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(b(e)===e)return e;try{if(T(window,e)&&window.top)return window.top}catch(e){}try{if(T(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=C(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(b(r)===r)return r}}function R(e){var n=j(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(C(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],C(e))),t}var M=[],I=[];function D(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!==g}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}(M,e);if(-1!==t){var r=I[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 k(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function N(e,n){for(var t=A(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 W(e,n){return e===E(n)}function L(e){return void 0===e&&(e=window),E(e=e||window)||b(e)||void 0}function z(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 B(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=b(t))&&(n+=1);return n}function U(e,n){var t=j(e)||e,r=j(n)||n;try{if(t&&r)return t===r}catch(e){}var o=R(e),i=R(n);if(z(o,i))return!0;var a=E(t),u=E(r);return a&&z(R(a),i)||u&&z(R(u),o),!1}function F(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(y(n))return!1;if(Array.isArray(n))return!1}return y(e)?y(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!y(n)&&e.some((function(e){return F(e,n)})))}function H(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):O()}function $(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(D(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function q(e){try{if(e===window)return!0}catch(e){if(e&&e.message===g)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===g)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===g)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===g)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!==H(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function K(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,Z=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(q(r)&&D(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!q(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=G(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=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 J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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 Q(e,n,t){return(Q=X()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(e,r));return t&&o(i,t.prototype),i}).apply(null,arguments)}function ee(e){var n="function"==typeof Map?new Map:void 0;return(ee=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;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,r)}function r(){return Q(e,arguments,J(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)})(e)}function ne(e){return e.name||e.__name__||e.displayName||"anonymous"}function te(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function re(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(void 0!==n)return n.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function oe(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+re((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ie(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(V=V||new Z,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=V.get(e);return n||(n=typeof e+":"+oe(),V.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function ae(){return{}}var ue=0,ce=0;function se(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=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;u<ce&&(t=null,r=null,u=ue,ue+=1),s=i?(r=r||new Z).getOrSet(this,ae):t=t||{};var f=ie(o),d=s[f];if(d&&a&&Date.now()-d.time<a&&(delete s[f],d=null),d)return d.value;var l=Date.now(),p=e.apply(this,arguments);return s[f]={time:l,value:p},p};return c.reset=function(){t=null,r=null},te(c,(n.name||ne(e))+"::memoized")}function fe(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=ie(i);return n.hasOwnProperty(u)||(n[u]=w.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},te(t,ne(e)+"::promiseMemoized")}function de(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=ie(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function le(){}function pe(e){var n=!1;return te((function(){if(!n)return n=!0,e.apply(this,arguments)}),ne(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 we(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 me(e){return e}function ge(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function ve(e){return[].slice.call(e)}function be(e){return null!=e}function Ee(e){return"[object RegExp]"==={}.toString.call(e)}function _e(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Pe(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(pe((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return w.all(o).then(le)}}}function Oe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}se.clear=function(){ce=ue},se((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 Se=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 i(n,e),n}(ee(Error));function xe(){return Boolean(document.body)&&"complete"===document.readyState}function Te(){return Boolean(document.body)&&"interactive"===document.readyState}function Ae(e){return encodeURIComponent(e)}function Ce(e){return de(Ce,(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=a({},Ce(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 Ae(e)+"="+Ae(n.toString())})).join("&")):e;var t}function Re(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function Me(e,n){return void 0===n&&(n=document),Re(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Ie(e){return new w((function(n,t){var r=we(e),o=Me(e);if(o)return n(o);if(xe())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=Me(e))?(clearInterval(i),n(o)):xe()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}se((function(){return new w((function(e){if(xe()||Te())return e();var n=setInterval((function(){if(xe()||Te())return clearInterval(n),e()}),10)}))}));var De,ke=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),n}(Se);function Ne(e){if((De=De||new Z).has(e)){var n=De.get(e);if(n)return n}var t=new w((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<M.length;e++){var n=!1;try{n=M[e].closed}catch(e){}n&&(I.splice(e,1),M.splice(e,1))}}(),e&&e.contentWindow)try{M.push(e.contentWindow),I.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return De.set(e,t),t}function We(e){return Ne(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function Le(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:a({allowTransparency:"true"},e.attributes||{}),style:a({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",oe()),Ne(r),n&&function(e,n){void 0===n&&(n=document);var t=Me(e,n);if(t)return t;throw new Error("Can not find element: "+we(e))}(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function ze(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Be(e){e.style.setProperty("display","")}function Ue(e){e.style.setProperty("display","none","important")}function Fe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function He(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function $e(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,f=r.win,d=void 0===f?window:f,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,y,m=function(){if(!h&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return d.addEventListener("resize",m),void 0!==d.ResizeObserver?((w=new d.ResizeObserver(m)).observe(e),y=ge(m,10*s)):void 0!==d.MutationObserver?((w=new d.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),y=ge(m,10*s)):y=ge(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),y.cancel()}}}function qe(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Ye="undefined"!=typeof document?document.currentScript:null,Ke=se((function(){if(Ye)return Ye;if(Ye=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 Ye;throw new Error("Can not determine current script")})),Ge=oe();function Ve(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function Ze(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 Je(e){return Ze(e)+"px"}function Xe(e){return"number"==typeof e?Je(e):Ve(e)?e:Je(e)}function Qe(e,n){if("number"==typeof e)return e;if(Ve(e))return parseInt(n*Ze(e)/100,10);if("string"==typeof(t=e)&&/^[0-9]+px$/.test(t))return Ze(e);var t;throw new Error("Can not normalize dimension: "+e)}function en(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}se((function(){var e;try{e=Ke()}catch(e){return Ge}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=oe(),e.setAttribute("data-uid-auto",n)),n}));var nn=function(){return{}};function tn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=nn),_e(en(),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 _e(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var rn,on=function(){};function an(){var e=en();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new on,e.WINDOW_WILDCARD}function un(e,n){return void 0===e&&(e="store"),void 0===n&&(n=nn),tn("windowStore").getOrSet(e,(function(){var t=new Z,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 _e(r(n),e,t)}}}))}function cn(){return tn("instance").getOrSet("instanceID",oe)}function sn(e,n){var t=n.domain,r=un("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=w.resolve({domain:t});return r.set(e,i),i}function fn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:cn()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return sn(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function dn(e,n){var t=n.send;return un("windowInstanceIDPromises").getOrSet(e,(function(){return fn(e,{send:t}).then((function(e){return e.instanceID}))}))}function ln(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return un("helloPromises").getOrSet(e,(function(){return new w}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function pn(e){un("knownWindows").set(e,!0)}function hn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function wn(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 yn(e,n){return{__type__:e,__val__:n}}var mn,gn=((rn={}).function=function(){},rn.error=function(e){return yn("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},rn.promise=function(){},rn.regex=function(e){return yn("regex",e.source)},rn.date=function(e){return yn("date",e.toJSON())},rn.array=function(e){return e},rn.object=function(e){return e},rn.string=function(e){return e},rn.number=function(e){return e},rn.boolean=function(e){return e},rn.null=function(e){return e},rn),vn={},bn=((mn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},mn.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},mn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},mn.regex=function(e){return new RegExp(e)},mn.date=function(e){return new Date(e)},mn.array=function(e){return e},mn.object=function(e){return e},mn.string=function(e){return e},mn.number=function(e){return e},mn.boolean=function(e){return e},mn.null=function(e){return e},mn),En={};function _n(){return!!k(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Pn(e){return!U(window,e)}function On(e,n){if(e){if(O()!==H(e))return!0}else if(n&&!S(n))return!0;return!1}function Sn(e){var n=e.win,t=e.domain;return!(!_n()||t&&!On(t,n)||n&&!Pn(n))}function xn(e){return"__postrobot_bridge___"+(e=e||H(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Tn(){return Boolean(window.name&&window.name===xn(O()))}var An=new w((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 Cn(e){un("remoteWindowPromises").getOrSet(e,(function(){return new w}))}function jn(e){var n=un("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function Rn(e,n,t){jn(e).resolve((function(r,o,i){if(r!==e)throw new Error("Remote window does not match window");if(!F(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);t.fireAndForget(i)}))}function Mn(e,n){jn(e).reject(n).catch(le)}function In(e){for(var n=e.win,t=e.name,r=e.domain,o=tn("popupWindowsByName"),i=un("popupWindowsByWin"),a=0,u=o.keys();a<u.length;a++){var c=u[a],s=o.get(c);s&&!D(s.win)||o.del(c)}if(D(n))return{win:n,name:t,domain:r};var f=i.getOrSet(n,(function(){return t?o.getOrSet(t,(function(){return{win:n,name:t}})):{win:n}}));if(f.win&&f.win!==n)throw new Error("Different window already linked for window: "+(t||"undefined"));return t&&(f.name=t,o.set(t,f)),r&&(f.domain=r,Cn(n)),i.set(n,f),f}function Dn(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?(In({win:i,name:t,domain:e?H(e):null}),i):i},function(e){var n=e.on,t=e.send,r=e.receiveMessage,o=tn("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,a=e.origin,u=e.data,c=tn("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 Rn(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){w.reject(e)}}}}}))}))}({on:t,send:r,receiveMessage:o}),function(e){var n=e.send;en(window).openTunnelToParent=function(e){var t=e.name,r=e.source,o=e.canary,i=e.sendMessage,a=tn("tunnelWindows"),u=b(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=tn("tunnelWindows"),n=0,t=e.keys();n<t.length;n++){var r=t[n];D(e[r].source)&&e.del(r)}}();var i=oe();return tn("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&&!D(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;w.try((function(){var e,o=E(window);if(o&&Sn({win:o}))return Cn(o),(e=o,un("remoteBridgeAwaiters").getOrSet(e,(function(){return w.try((function(){var n=N(e,xn(O()));if(n)return S(n)&&en(x(n))?n:new w((function(e){var t,r;t=setInterval((function(){if(n&&S(n)&&en(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?en(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){w.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");Rn(n,t,r.sendMessage)})).catch((function(e){throw Mn(o,e),e})):Mn(o,new Error("Can not register with opener: window does not have a name")):Mn(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:t,send:r,receiveMessage:o})}function kn(){for(var e=tn("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Nn(e,n){var t=n.send,r=n.id,o=void 0===r?oe():r,i=e.then((function(e){if(S(e))return x(e).name})),a=e.then((function(e){if(D(e))throw new Error("Window is closed, can not determine type");return E(e)?m.POPUP:m.IFRAME}));return i.catch(le),a.catch(le),{id:o,getType:function(){return a},getInstanceID:fe((function(){return e.then((function(e){return dn(e,{send:t})}))})),close:function(){return e.then(K)},getName:function(){return e.then((function(e){if(!D(e))return S(e)?x(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return D(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(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){In({win:e,name:n});var t=S(e),r=function(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}}(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=w.resolve(n)}))}}}var Wn=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 w,this.serializedWindow=r||Nn(this.actualWindowPromise,{send:n}),tn("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===m.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=w.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return w.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=Nn(this.actualWindowPromise,{send:t,id:this.getID()}),un("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return w.try((function(){return t.actualWindow?e===t.actualWindow:w.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:dn(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&&D(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 kn(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return kn(),tn("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!q(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(kn(),e.isProxyWindow(n))return n;var o=n;return un("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function Ln(e,n,t,r,o){var i=un("methodStore"),a=tn("proxyWindowMethods");Wn.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 zn(e,n){var t=un("methodStore"),r=tn("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Bn(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,tn("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=zn(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+O(window));var c=a.source,s=a.domain,f=a.val;return w.try((function(){if(!F(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(Ee(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+O(window));if(Wn.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 "+O(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return w.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),ve(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__||oe();e=Wn.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+"::")),Wn.isProxyWindow(e)?(Ln(c,t,s,e,n),e.awaitWindow().then((function(e){Ln(c,t,s,e,n)}))):Ln(c,t,s,e,n),yn("cross_domain_function",{id:c,name:s})}function Un(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=vn);var t=JSON.stringify(e,(function(e){var t=this[e];if(hn(this))return t;var r=wn(t);if(!r)return t;var o=n[r]||gn[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 yn("cross_domain_zalgo_promise",{then:Bn(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 Bn(e,n,t,r,{on:i,send:a})},o.object=function(e){return q(e)||Wn.isProxyWindow(e)?yn("cross_domain_window",Wn.serialize(e,{send:a})):e},o))}function Fn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=En),"undefined"!==e)return JSON.parse(e,(function(e,t){if(hn(this))return t;var r,o;if(hn(t)?(r=t.__type__,o=t.__val__):(r=wn(t),o=t),!r)return o;var i=n[r]||bn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new w(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 Wn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=zn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:O()},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 Wn.deserialize(e,{send:i})},o))}var Hn={};function $n(e,n,t,r){var o=r.on,i=r.send;return w.try((function(){var r=un().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||w.flush().then((function(){if(D(e))throw new Error("Window is closed");var t,a=Un(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(Hn),c=[],s=0;s<u.length;s++){var f=u[s];try{Hn[f](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+". "+he(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(le)}function qn(e){return tn("responseListeners").get(e)}function Yn(e){tn("responseListeners").del(e)}function Kn(e){return tn("erroredResponseListeners").has(e)}function Gn(e){var n=e.name,t=e.win,r=e.domain,o=un("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,an()];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 f=0,d=s.__domain_regex__;f<d.length;f++){var l=d[f],p=l.listener;if(F(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function Vn(e,n,t,r){var o=r.on,i=r.send,a=Gn({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 w.flush().then((function(){if(!t.fireAndForget&&!D(e))try{return $n(e,n,{id:oe(),origin:O(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 "+O()+"\n\n"+he(e))}}))}return w.all([w.flush().then((function(){if(!t.fireAndForget&&!D(e))try{return $n(e,n,{id:oe(),origin:O(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 "+O()+"\n\n"+he(e))}})),w.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(!F(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(le).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function Zn(e,n,t){if(!Kn(t.hash)){var r=qn(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(!F(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 Jn(e,n,t){if(!Kn(t.hash)){var r,o=qn(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(!F(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(r=o.domain,Array.isArray(r)?"("+r.join(" | ")+")":y(r)?"RegExp("+r.toString():r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Yn(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}function Xn(e,n){var t=n.on,r=n.send,o=tn("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=Fn(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){pn(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),D(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?Vn(i,a,s,{on:t,send:r}):"postrobot_message_response"===s.type?Jn(i,a,s):"postrobot_message_ack"===s.type&&Zn(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function Qn(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=un("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 f=[],d=0,l=i;d<l.length;d++)f.push(e({name:r,win:o,domain:l[d]},t));return{cancel:function(){for(var e=0;e<f.length;e++)f[e].cancel()}}}var p=Gn({name:r,win:o,domain:i});if(o&&"*"!==o||(o=an()),i=i||"*",p)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===an()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===an()?"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 h,w,y=a.getOrSet(o,(function(){return{}})),m=_e(y,r,(function(){return{}})),g=i.toString();return Ee(i)?(h=_e(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[g]=t,{cancel:function(){delete m[g],w&&(h.splice(h.indexOf(w,1)),h.length||delete m.__domain_regex__),Object.keys(m).length||delete y[r],o&&!Object.keys(y).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()}}}Hn.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},Hn.postrobot_bridge=function(e,n,t){if(!_n()&&!Tn())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=W(window,e),o=W(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)},Hn.postrobot_global=function(e,n){if(!k(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=en(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:O(),data:n})};var et,nt=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return w.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!Ee(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(D(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(j(n)===n)return!1;for(var r=0,o=A(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return ln(n,u)})).then((function(t){return function(e,n,t,r){var o=r.send;return w.try((function(){return"string"==typeof n?n:w.try((function(){return t||fn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!F(n,n))throw new Error("Domain "+we(n)+" does not match "+we(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 w,f=t+"_"+oe();if(!c){var d={name:t,win:n,domain:i,promise:s};!function(e,n){tn("responseListeners").set(e,n)}(f,d);var l=un("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){tn("erroredResponseListeners").set(e,!0)}(f),Yn(f)}));var p=function(e){return un("knownWindows").get(e,!1)}(n)?1e4:2e3,h=a,y=p,m=h,g=ge((function(){return D(n)?s.reject(new Error("Window closed for "+t+" before "+(d.ack?"response":"ack"))):d.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==m&&(m=Math.max(m-500,0)),d.ack||0!==y?0===m?s.reject(new Error("No response for postMessage "+u+" in "+O()+" in "+h+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+O()+" in "+p+"ms")))}),500);s.finally((function(){g.cancel(),l.splice(l.indexOf(s,1))})).catch(le)}return $n(n,i,{id:oe(),origin:O(window),type:"postrobot_message_request",hash:f,name:t,data:r,fireAndForget:c},{on:Qn,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+O()+"\n\n"+he(e))}))}))};function tt(e,n,t){return Un(e,n,t,{on:Qn,send:nt})}function rt(e,n,t){return Fn(e,n,t,{on:Qn,send:nt})}function ot(e){return Wn.toProxyWindow(e,{send:nt})}function it(e){for(var n=0,t=un("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(D(e)?"closed":"cleaned up")+" before response")).catch(le)}function at(e){if(void 0===e&&(e=window),!S(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_65__||(e.__zoid_9_0_65__={}),e.__zoid_9_0_65__}function ut(e){return{get:function(){var n=this;return w.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}et={setupBridge:Dn,openBridge:function(e,n){var t=tn("bridges"),r=tn("bridgeFrames");return n=n||H(e),t.getOrSet(n,(function(){return w.try((function(){if(O()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=xn(n);if(N(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 w((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return ln(t,5e3,"Bridge "+e)})).then((function(){return t}))}))}))}))},linkWindow:In,linkUrl:function(e,n){In({win:e,domain:H(n)})},isBridge:Tn,needsBridge:Sn,needsBridgeForBrowser:_n,hasBridge:function(e,n){return tn("bridges").has(n||H(e))},needsBridgeForWin:Pn,needsBridgeForDomain:On,destroyBridges:function(){for(var e=tn("bridges"),n=tn("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 ct={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},st={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},ft=m,dt={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 lt(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 pt(e){return de(pt,(function(){if(!e)throw new Error("No window name");var t=e.split("__"),r=t[1],o=t[2],i=t[3];if("zoid"!==r)throw new Error("Window not rendered by zoid - got "+r);if(!o)throw new Error("Expected component name");if(!i)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(void 0!==n)return n.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(i))}catch(e){throw new Error("Can not decode window name payload: "+i+": "+he(e))}}),[e])}function ht(){try{return pt(window.name)}catch(e){}}function wt(){return w.try((function(){window.focus()}))}function yt(){return w.try((function(){window.close()}))}function mt(e,n,t){return w.try((function(){return"function"==typeof e.queryParam?e.queryParam({value:t}):"string"==typeof e.queryParam?e.queryParam:n}))}function gt(e,n,t){return w.try((function(){return"function"==typeof e.queryValue&&be(t)?e.queryValue({value:t}):t}))}function vt(e,n,t){void 0===n&&(n={}),void 0===t&&(t=window);var r,o,i,u,c,s=e.propsDef,f=e.containerTemplate,d=e.prerenderTemplate,l=e.tag,p=e.name,h=e.attributes,y=e.dimensions,m=e.autoResize,g=e.url,v=e.domain,b=new w,E=[],_=Pe(),P={},T={visible:!0},A=n.event?n.event:(r={},o={},{on:function(e,n){var t=o[e]=o[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 i=o[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(w.try((function(){return n.apply(void 0,t)})))},c=0;c<i.length;c++)u(c);return w.all(a).then(le)},triggerOnce:function(e){if(r[e])return w.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(){o={}}}),C=n.props?n.props:{},j=n.onError,R=n.getProxyContainer,M=n.show,I=n.hide,k=n.close,N=n.renderContainer,W=n.getProxyWindow,L=n.setProxyWin,z=n.openFrame,q=n.openPrerenderFrame,G=n.prerender,V=n.open,Z=n.openPrerender,J=n.watchForUnload,X=n.getInternalState,Q=n.setInternalState,ee=function(e){for(var n={},t=0,r=Object.keys(C);t<r.length;t++){var o=r[t],i=s[o];i&&!1===i.sendToChild||i&&i.sameDomain&&!F(e,O(window))||(n[o]=C[o])}return w.hash(n)},ne=function(){return w.try((function(){return X?X():T}))},te=function(e){return w.try((function(){return Q?Q(e):T=a({},T,e)}))},ie=function(){return W?W():w.try((function(){var e=C.window;if(e){var n=ot(e);return _.register((function(){return e.close()})),n}return new Wn({send:nt})}))},ae=function(e){return R?R(e):w.try((function(){return Ie(e)})).then((function(e){return qe(e)&&(e=function(e){var n=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(qe(e))return e}(e);if(n.host)return n.host}(e);if(!n)throw new Error("Element is not in shadow dom");if(qe(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+oe(),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)),ut(e)}))},ue=function(e){return L?L(e):w.try((function(){i=e}))},ce=function(){return M?M():w.hash({setState:te({visible:!0}),showElement:u?u.get().then(Be):null}).then(le)},fe=function(){return I?I():w.hash({setState:te({visible:!1}),showElement:u?u.get().then(Ue):null}).then(le)},de=function(){return"function"==typeof g?g({props:C}):g},me=function(){return"function"==typeof h?h({props:C}):h},_e=function(){return v&&"string"==typeof v?v:H(de())},Oe=function(){return v&&Ee(v)?v:_e()},Se=function(e,n){var t=n.windowName;return z?z(e,{windowName:t}):w.try((function(){if(e===ft.IFRAME)return ut(Le({attributes:a({name:t,title:p},me().iframe)}))}))},xe=function(e){return q?q(e):w.try((function(){if(e===ft.IFRAME)return ut(Le({attributes:a({name:"__zoid_prerender_frame__"+p+"_"+oe()+"__",title:"prerender__"+p},me().iframe)}))}))},Te=function(e,n,t){return Z?Z(e,n,t):w.try((function(){if(e===ft.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return _.register((function(){return Fe(e)})),We(e).then((function(e){return x(e)})).then((function(e){return ot(e)}))}))}if(e===ft.POPUP)return n;throw new Error("No render context available for "+e)}))},Ae=function(){return w.try((function(){if(i)return w.all([A.trigger(dt.FOCUS),i.focus()]).then(le)}))},Ce=function(e,n,t,r){if(n===O(window)){var o=at(window);return o.windows=o.windows||{},o.windows[t]=window,_.register((function(){delete o.windows[t]})),{type:"global",uid:t}}return r===ft.POPUP?{type:"opener"}:{type:"parent",distance:B(window)}},Re=function(e){return w.try((function(){c=e,b.resolve(),_.register((function(){return e.close.fireAndForget().catch(le)}))}))},De=function(e){var n=e.width,t=e.height;return w.try((function(){A.trigger(dt.RESIZE,{width:n,height:t})}))},Ne=function(e){return w.try((function(){return A.trigger(dt.DESTROY)})).catch(le).then((function(){return _.all(e)})).then((function(){b.asyncReject(e||new Error("Component destroyed"))}))},Ye=se((function(e){return w.try((function(){if(k){if(D(k.__source__))return;return k()}return w.try((function(){return A.trigger(dt.CLOSE)})).then((function(){return Ne(e||new Error("Component closed"))}))}))})),Ke=function(e,n){var t=n.proxyWin,r=n.proxyFrame,o=n.windowName;return V?V(e,{proxyWin:t,proxyFrame:r,windowName:o}):w.try((function(){if(e===ft.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return We(e).then((function(n){return _.register((function(){return Fe(e)})),_.register((function(){return it(n)})),n}))}))}if(e===ft.POPUP){var n=y.width,t=y.height;n=Qe(n,window.outerWidth),t=Qe(t,window.outerWidth);var i=function(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=a({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 c,s,f=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+we(n[e])})).filter(Boolean).join(",");try{c=window.open("",u,f)}catch(s){throw new ke("Can not open popup window - "+(s.stack||s.message))}if(D(c))throw new ke("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return c.close()})),c}(0,a({name:o,width:n,height:t},me().popup));return _.register((function(){return K(i)})),_.register((function(){return it(i)})),i}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:nt}),t}))},Ge=function(){return w.try((function(){var e=ze(window,"unload",pe((function(){Ne(new Error("Window navigated away"))}))),n=$(t,Ne,3e3);if(_.register(n.cancel),_.register(e.cancel),J)return J()}))},Ve=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,Ye(new Error("Detected component window close"))):w.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,Ye(new Error("Detected component window close"))}))})).then((function(){return n}))},Ze=function(e){return j?j(e):w.try((function(){if(-1===E.indexOf(e))return E.push(e),b.asyncReject(e),A.trigger(dt.ERROR,e)}))};Re.onError=Ze;var Je=function(e,n){return e({container:n.container,context:n.context,uid:n.uid,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:Ae,close:Ye,state:P,props:C,tag:l,dimensions:y,event:A})},Xe=function(e,n){var t=n.context,r=n.uid;return G?G(e,{context:t,uid:r}):w.try((function(){if(d){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 o=(n=x(n)).document,i=Je(d,{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=ve(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=ve(n.children);a<u.length;a++)r.appendChild(u[a])}(n,i);var a=m.width,u=void 0!==a&&a,c=m.height,s=void 0!==c&&c,f=m.element,l=void 0===f?"body":f;if((l=Me(l,o))&&(u||s)){var p=$e(l,(function(e){De({width:u?e.width:void 0,height:s?e.height:void 0})}),{width:u,height:s,win:n});A.on(dt.RENDERED,p.cancel)}}}}}))},en=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.uid;return N?N(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,uid:i}):w.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=Je(f,{context:o,uid:i,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||Ue(r),function(e,n){e.appendChild(n)}(n,r);var a=function(e,n){n=pe(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&&Fe(r)},c=function(){i||(n(),u())};if(He(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var f=new window.MutationObserver((function(){He(e)&&c()}));f.observe(s,{childList:!0}),a.push(f),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+oe()+"__"),r.style.display="none",We(r).then((function(e){(o=x(e)).addEventListener("unload",c)})),e.appendChild(r),t=ge((function(){He(e)&&c()}),1e3),{cancel:u}}(r,(function(){return Ye(new Error("Detected container element removed from DOM"))}));return _.register((function(){return a.cancel()})),_.register((function(){return Fe(r)})),u=ut(r)}}))},nn=function(){return{state:P,event:A,close:Ye,focus:Ae,resize:De,onError:Ze,updateProps:rn,show:ce,hide:fe}},tn=function(e,n){void 0===n&&(n=!1);var t=nn();!function(e,n,t,r,o){void 0===o&&(o=!1),ye(n,t=t||{});for(var i=o?[]:[].concat(Object.keys(e)),a=0,u=Object.keys(t);a<u.length;a++){var c=u[a];-1===i.indexOf(c)&&i.push(c)}for(var s=[],f=r.state,d=r.close,l=r.focus,p=r.event,h=r.onError,w=0;w<i.length;w++){var y=i[w],m=e[y],g=t[y];if(m){var v=m.alias;if(v&&(!be(g)&&be(t[v])&&(g=t[v]),s.push(v)),m.value&&(g=m.value({props:n,state:f,close:d,focus:l,event:p,onError:h})),!be(g)&&m.default&&(g=m.default({props:n,state:f,close:d,focus:l,event:p,onError:h})),be(g)&&("array"===m.type?!Array.isArray(g):typeof g!==m.type))throw new TypeError("Prop is not of type "+m.type+": "+y);n[y]=g}}for(var b=0;b<s.length;b++)delete n[s[b]];for(var E=0,_=Object.keys(n);E<_.length;E++){var P=_[E],O=e[P],S=n[P];O&&be(S)&&O.decorate&&(n[P]=O.decorate({value:S,props:n,state:f,close:d,focus:l,event:p,onError:h}))}for(var x=0,T=Object.keys(e);x<T.length;x++){var A=T[x];if(!1!==e[A].required&&!be(n[A]))throw new Error('Expected prop "'+A+'" to be defined')}}(s,C,e,t,n)},rn=function(e){return tn(e,!0),b.then((function(){var e=c,n=i;if(e&&n)return ee(Oe()).then((function(t){return e.updateProps(t).catch((function(e){return Ve(n).then((function(n){if(!n)throw e}))}))}))}))};return{init:function(){A.on(dt.RENDER,(function(){return C.onRender()})),A.on(dt.DISPLAY,(function(){return C.onDisplay()})),A.on(dt.RENDERED,(function(){return C.onRendered()})),A.on(dt.CLOSE,(function(){return C.onClose()})),A.on(dt.DESTROY,(function(){return C.onDestroy()})),A.on(dt.RESIZE,(function(){return C.onResize()})),A.on(dt.FOCUS,(function(){return C.onFocus()})),A.on(dt.PROPS,(function(e){return C.onProps(e)})),A.on(dt.ERROR,(function(e){return C&&C.onError?C.onError(e):b.reject(e).then((function(){setTimeout((function(){throw e}),1)}))})),_.register(A.reset)},render:function(n,t,r){return w.try((function(){var o="zoid-"+l+"-"+oe(),a=Oe(),u=_e();!function(e,n,t){if(e!==window){if(!U(window,e))throw new Error("Can only renderTo an adjacent frame");var r=O();if(!F(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 c=w.try((function(){if(n!==window)return function(e,n){for(var t={},r=0,o=Object.keys(C);r<o.length;r++){var i=o[r],a=s[i];a&&a.allowDelegate&&(t[i]=C[i])}var u=nt(n,"zoid_delegate_"+p,{overrides:{props:t,event:A,close:Ye,onError:Ze,getInternalState:ne,setInternalState:te}}).then((function(e){var t=e.data.parent;return _.register((function(e){if(!D(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 R=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)}))},N=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)}))},M=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)}))},I=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)}))},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.watchForUnload.apply(e,n)}))},e===ft.IFRAME?(W=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)}))},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.openFrame.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.openPrerenderFrame.apply(e,n)}))},G=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)}))},V=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)}))},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.openPrerender.apply(e,n)}))}):e===ft.POPUP&&(L=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)})),f=C.window,d=Ge(),h=function(e,n){var t={},r=Object.keys(n);return w.all(r.map((function(r){var o=e[r];if(o)return w.resolve().then((function(){var e=n[r];if(null!=e&&o.queryParam)return e})).then((function(e){if(null!=e)return w.all([mt(o,r,e),gt(o,0,e)]).then((function(e){var n,i=e[0],a=e[1];if("boolean"==typeof a)n=a.toString();else if("string"==typeof a)n=a.toString();else if("object"==typeof a&&null!==a){if(o.serialization===st.JSON)n=JSON.stringify(a);else if(o.serialization===st.BASE64)n=re(JSON.stringify(a));else if(o.serialization===st.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}(a,r);for(var u=0,c=Object.keys(n);u<c.length;u++){var s=c[u];t[s]=n[s]}return}}else"number"==typeof a&&(n=a.toString());t[i]=n}))}))}))).then((function(){return t}))}(s,C).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=je(u[1],o),s=je(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(Y(de()),{query:e})})),y=A.trigger(dt.RENDER),m=ae(t),g=ie(),v=g.then((function(e){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomain,o=n.domain,i=(void 0===n.target&&window,n.context),a=n.uid;return function(e,n,t,r){return ee(t).then((function(o){var i=tt(e,t,o),a=n===O()?{type:"uid",uid:r}:{type:"raw",value:i};if("uid"===a.type){var u=at(window);u.props=u.props||{},u.props[r]=i,_.register((function(){delete u.props[r]}))}return a}))}(t,r,o,a).then((function(e){return{uid:a,context:i,tag:l,version:"9_0_65",childDomain:r,parentDomain:O(window),parent:Ce(0,r,a,i),props:e,exports:tt(t,o,(n=t,{init:Re,close:Ye,checkClose:function(){return Ve(n)},resize:De,onError:Ze,show:ce,hide:fe}))};var n}))}({proxyWin:(t={proxyWin:e,childDomain:u,domain:a,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+"__"+re(JSON.stringify(e))+"__"}));var t})),E=v.then((function(e){return Se(r,{windowName:e})})),P=xe(r),x=w.hash({proxyContainer:m,proxyFrame:E,proxyPrerenderFrame:P}).then((function(e){return en(e.proxyContainer,{context:r,uid:o,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame})})).then((function(e){return e})),T=w.hash({windowName:v,proxyFrame:E,proxyWin:g}).then((function(e){var n=e.proxyWin;return f?n:Ke(r,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),j=w.hash({proxyWin:T,proxyPrerenderFrame:P}).then((function(e){return Te(r,e.proxyWin,e.proxyPrerenderFrame)})),k=T.then((function(e){return i=e,ue(e)})),B=w.hash({proxyPrerenderWin:j,state:k}).then((function(e){return Xe(e.proxyPrerenderWin,{context:r,uid:o})})),$=w.hash({proxyWin:T,windowName:v}).then((function(e){if(f)return e.proxyWin.setName(e.windowName)})),K=w.hash({proxyWin:T,builtUrl:h,windowName:$,prerender:B}).then((function(e){return e.proxyWin.setLocation(e.builtUrl)})),X=T.then((function(e){!function e(n,t){var r=!1;return _.register((function(){r=!0})),w.delay(2e3).then((function(){return n.isClosed()})).then((function(o){return o?Ye(new Error("Detected "+t+" close")):r?void 0:e(n,t)}))}(e,r)})),Q=w.hash({container:x,prerender:B}).then((function(){return A.trigger(dt.DISPLAY)})),se=T.then((function(n){return function(n,t,r){return w.try((function(){return n.awaitWindow()})).then((function(n){if(et&&et.needsBridge({win:n,domain:t})&&!et.hasBridge(t,t)){var o="function"==typeof e.bridgeUrl?e.bridgeUrl({props:C}):e.bridgeUrl;if(!o)throw new Error("Bridge needed to render "+r);var i=H(o);return et.linkUrl(n,t),et.openBridge(Y(o),i)}}))}(n,u,r)})),le=K.then((function(){return w.try((function(){var e=C.timeout;if(e)return b.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),pe=b.then((function(){return A.trigger(dt.RENDERED)}));return w.hash({initPromise:b,buildUrlPromise:h,onRenderPromise:y,getProxyContainerPromise:m,openFramePromise:E,openPrerenderFramePromise:P,renderContainerPromise:x,openPromise:T,openPrerenderPromise:j,setStatePromise:k,prerenderPromise:B,loadUrlPromise:K,buildWindowNamePromise:v,setWindowNamePromise:$,watchForClosePromise:X,onDisplayPromise:Q,openBridgePromise:se,runTimeoutPromise:le,onRenderedPromise:pe,delegatePromise:c,watchForUnloadPromise:d})})).catch((function(e){return w.all([Ze(e),Ne(e)]).then((function(){throw e}),(function(){throw e}))})).then(le)},destroy:Ne,setProps:tn,getHelpers:nn,getDelegateOverrides:function(){return w.try((function(){return{getProxyContainer:ae,show:ce,hide:fe,renderContainer:en,getProxyWindow:ie,watchForUnload:Ge,openFrame:Se,openPrerenderFrame:xe,prerender:Xe,open:Ke,openPrerender:Te,setProxyWin:ue}}))}}}function bt(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 f=o.createElement("div");f.setAttribute("id",n);var d=o.createElement("style");return i.cspNonce&&d.setAttribute("nonce",i.cspNonce),d.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        ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(dt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Fe(r)}),1)})),a.on(dt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=Xe(n)),"number"==typeof t&&(f.style.height=Xe(t))})),f}}function Et(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 _t=function(){return le},Pt=function(e){return pe(e.value)},Ot=Pe(),St=Pe();function xt(e){var n,t,r,o;en().initialized||(en().initialized=!0,t=(n={on:Qn,send:nt}).on,r=n.send,(o=en()).receiveMessage=o.receiveMessage||function(e){return Xn(e,{on:t,send:r})},function(e){var n=e.on,t=e.send;tn().getOrSet("postMessageListener",(function(){return ze(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;w.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");Xn({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:Qn,send:nt}),Dn({on:Qn,send:nt,receiveMessage:Xn}),function(e){var n=e.on,t=e.send;tn("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return sn(e.source,{domain:e.origin}),{instanceID:cn()}})),r=L();return r&&fn(r,{send:t}).catch((function(e){})),e}))}({on:Qn,send:nt}));var i=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,i=e.props,u=void 0===i?{}:i,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,p=void 0===l?"*":l,h=e.attributes,w=void 0===h?{}:h,y=e.defaultContext,m=void 0===y?ft.IFRAME:y,g=e.containerTemplate,v=void 0===g?bt:g,b=e.prerenderTemplate,E=void 0===b?Et:b,_=e.validate,P=e.eligible,O=void 0===P?function(){return{eligible:!0}}:P,x=e.logger,T=void 0===x?{info:le}:x,A=n.replace(/-/g,"_"),C=s.width,j=void 0===C?"300px":C,R=s.height,M=void 0===R?"150px":R;if(u=a({},{window:{type:"object",sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!q(n)&&!Wn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(q(n)){if(D(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return ot(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:_t,decorate:Pt},onRendered:{type:"function",required:!1,sendToChild:!1,default:_t,decorate:Pt},onRender:{type:"function",required:!1,sendToChild:!1,default:_t,decorate:Pt},onClose:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:_t,decorate:Pt},onDestroy:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:_t,decorate:Pt},onResize:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:_t},onFocus:{type:"function",required:!1,sendToChild:!1,allowDelegate:!0,default:_t},onError:{type:"function",required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:"function",required:!1,sendToChild:!1,default:_t,childDecorate:function(e){return e.onProps}}},u),!v)throw new Error("Container template required");return{name:A,tag:n,url:t,domain:r,bridgeUrl:o,propsDef:u,dimensions:{width:j,height:M},autoResize:d,allowedParentDomains:p,attributes:w,defaultContext:m,containerTemplate:v,prerenderTemplate:E,validate:_,logger:T,eligible:O}}(e),o=r.name,i=r.tag,u=r.defaultContext,c=r.eligible,s=at(),f=[],d=function(){var e=ht();return Boolean(e&&e.tag===i&&e.childDomain===O())},l=se((function(){if(d()){if(window.xprops)throw delete s.components[i],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,t=e.propsDef,r=e.autoResize,o=e.allowedParentDomains,i=[],a=ht();if(!a)throw new Error("No child payload found");if("9_0_65"!==a.version)throw new Error("Parent window has zoid version "+a.version+", child window has version 9_0_65");var u=a.uid,c=a.parentDomain,s=a.exports,f=a.context,d=a.props,l=function(e){var n,t,r=e.type;if("opener"===r)return Oe("opener",E(window));if("parent"===r&&"number"==typeof e.distance)return Oe("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=b(t)}return t}(n,B(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 a=0,u=R(i);a<u.length;a++){var c=u[a];if(S(c)){var s=at(c);if(s&&s.windows&&s.windows[o])return s.windows[o]}}}throw new Error("Unable to find "+r+" parent component window")}(a.parent),p=rt(l,c,s),h=p.show,y=p.hide,m=p.close,g=function(){return l},v=function(){return c},_=function(e){i.push(e)},P=function(e){return w.try((function(){if(p&&p.onError)return p.onError(e);throw e}))},x=function(e){return p.resize.fireAndForget({width:e.width,height:e.height})},T=function(e,r,o){void 0===o&&(o=!1);var a=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],f=n[s];if(!f||!f.sameDomain||r===O(window)&&S(e)){var d=lt(n,0,s,t[s],o);a[s]=d,f&&f.alias&&!a[f.alias]&&(a[f.alias]=d)}}if(!i)for(var l=0,p=Object.keys(n);l<p.length;l++){var h=p[l];t.hasOwnProperty(h)||(a[h]=lt(n,0,h,void 0,o))}return a}(l,t,e,r,{show:h,hide:y,close:m,focus:wt,onError:P,resize:x,onProps:_,getParent:g,getParentDomain:v,uid:u},o);n?ye(n,a):n=a;for(var c=0;c<i.length;c++)(0,i[c])(n)},A=function(e){return w.try((function(){return T(e,c,!0)}))};return{init:function(){return w.try((function(){return function(e,n){if(!F(e,n))throw new Error("Can not be rendered by domain: "+n)}(o,c),pn(l),window.addEventListener("beforeunload",(function(){p.checkClose.fireAndForget()})),window.addEventListener("unload",(function(){p.checkClose.fireAndForget()})),$(l,(function(){yt()})),p.init({updateProps:A,close:yt})})).then((function(){return(e=r.width,n=void 0!==e&&e,t=r.height,o=void 0!==t&&t,i=r.element,Ie(void 0===i?"body":i).catch(le).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)&&f!==ft.POPUP&&$e(r,(function(e){x({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){P(e)}))},getProps:function(){return n||(T(function(e,n,t){var r,o=t.type,i=t.uid;if("raw"===o)r=t.value;else if("uid"===o){if(!S(e))throw new Error("Parent component window is on a different domain - expected "+O()+" - can not retrieve props");var a=at(e);r=Oe("props",a&&a.props[i])}if(!r)throw new Error("Could not find props");return rt(e,n,r)}(l,c,d),c),n)}}}(r);return e.init(),e}}));if(l(),n=Qn("zoid_allow_delegate_"+o,(function(){return!0})),t=Qn("zoid_delegate_"+o,(function(e){return{parent:vt(r,e.data.overrides,e.source)}})),St.register(n.cancel),St.register(t.cancel),s.components=s.components||{},s.components[i])throw new Error("Can not register multiple components with the same tag: "+i);return s.components[i]=!0,{init:function e(n){var t,i=c({props:n=n||{}}),s=i.eligible,d=i.reason,l=n.onDestroy;n.onDestroy=function(){if(t&&s&&f.splice(f.indexOf(t),1),l)return l.apply(void 0,arguments)};var p=vt(r);p.init(),s?p.setProps(n):n.onDestroy&&n.onDestroy(),Ot.register((function(e){p.destroy(e||new Error("zoid destroyed all components"))}));var h=function(e,t,r){return w.try((function(){if(!s){var t=new Error(d||o+" component is not eligible");return p.destroy(t).then((function(){throw t}))}if(!q(e))throw new Error("Must pass window to renderTo");return function(e,n){return w.try((function(){if(e.window)return ot(e.window).getType();if(n){if(n!==ft.IFRAME&&n!==ft.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(n,r)})).then((function(n){return t=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===ft.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=a({},p.getHelpers(),{isEligible:function(){return s},clone:function(t){var r=(void 0===t?{}:t).decorate;return e((void 0===r?me:r)(n))},render:function(e,n){return h(window,e,n)},renderTo:function(e,n,t){return h(e,n,t)}}),s&&f.push(t),t},instances:f,driver:function(e,n){throw new Error("Driver support not enabled")},isChild:d,canRenderTo:function(e){return nt(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:l}}(e),u=function(e){return i.init(e)};u.driver=function(e,n){return i.driver(e,n)},u.isChild=function(){return i.isChild()},u.canRenderTo=function(e){return i.canRenderTo(e)},u.instances=i.instances;var c=i.registerChild();return c&&(window.xprops=u.xprops=c.getProps()),u}function Tt(e){et&&et.destroyBridges();var n=Ot.all(e);return Ot=Pe(),n}var At=Tt;function Ct(e){var n;return At(),delete window.__zoid_9_0_65__,function(){for(var e=tn("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=tn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_42__,St.all(e)}}])}).call(this,t(15).Buffer)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.prerenderTemplate=void 0;n.prerenderTemplate='\n      <body style="overflow:hidden;">\n        <div class="spinner"></div>\n        <style>\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        </style>\n      </body>\n    '},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(70);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BannerHelper=void 0;var r=t(71),o=t(14),i=t(16),a=t(3),u=t(6),c=t(81),s=t(0);const f=["defaultLang","targetNodes","theme","bannerMessage"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){p(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function h(e){return`Earn ${n=e,n?(100*Number(n)*2).toFixed(0):0}% rebate with`;var n}const w={createBanner:e=>{let{defaultLang:n,targetNodes:t,theme:d,bannerMessage:p}=e,w=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(n.includes(r))continue;t[r]=e[r]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,f);if(null==t)return void console.error("target element can't be null");const y=(e=>e===u.BannerThemeOld.DARK?u.BannerTheme.WHITE_ON_GREY:e===u.BannerThemeOld.LIGHT?u.BannerTheme.BLACK_ON_GREY:e)(d);let m;if(p===u.BannerMessage.SHOP_NOW)m=(0,r.ClientBanner)(l({defaultLang:n,cashbackRateText:"Shop now with",bannerMessage:p,theme:y,targetNodes:t},w));else{const{localStorage:e,localCashbackRate:u}=function(){let e;try{e=window.localStorage}catch{e=new i.MemoryStorage}const n=e.getItem("cashback_rate");return{localStorage:e,localCashbackRate:n}}(),f=h(u);m=(0,r.ClientBanner)(l({defaultLang:n,cashbackRateText:f,theme:y,targetNodes:t},w));const d=e.getItem("publishable_key"),p=e.getItem("cashback_rate_expired");u&&d&&d===(0,a.getPublishableKey)()&&p&&parseInt(p)&&!(p&&Date.now()>parseInt(p))||o.API.getCashbackRate().then(n=>{m.updateCashBackRate(h(n.cashback_rate)),e.setItem("publishable_key",(0,a.getPublishableKey)()),e.setItem("cashback_rate",n.cashback_rate);const t=(0,s.isProduction)()?(0,c.getLastMinToday)():Date.now()+6e5;e.setItem("cashback_rate_expired",t.toString())})}m.render()}};n.BannerHelper=w},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(72);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ClientBanner=void 0;var r=t(73),o=t(6),i=t(76),a=t(13),u=t(80);const c=e=>{const n=[];return"string"==typeof e?n.push(...document.querySelectorAll(e)):(e instanceof HTMLElement||e instanceof Element)&&n.push(e),n},s=({defaultLang:e,cashbackRateText:n,size:t=o.BannerSize.MEDIUM,theme:s=o.BannerTheme.BLACK_ON_WHITE,font:f,targetNodes:d,bannerMessage:l})=>{const p=(0,u.getTemplate)(t,s,n,l),h=(0,u.getStyles)(f),w=(e=>{const n=[];if(!e)return n;if(e instanceof Array&&e.length>0)e.forEach(e=>{n.push(...c(e))});else if("string"==typeof e)n.push(...c(e));else if(e instanceof HTMLElement)n.push(e);else if(e instanceof Element)n.push(e);else if(e.length>0)for(let t=0;t<e.length;t++)n.push(...c(e[t]));return n})(d),y=document.createElement("div");y.innerHTML=p,window.addEventListener("resize",()=>{for(let e=0;e<w.length;e++){const n=w[e].querySelector(".crypto-pay-banner-base"),t=window.outerWidth>w[e].clientWidth?w[e].clientWidth:window.outerWidth;n&&n.clientWidth>t&&(n.style.transformOrigin="left center",n.style.transform=`scale(${t/n.clientWidth})`)}});const m=new i.BannerModal.createBannerInfo(r.DefaultBannerInfoProps,s,f,{default_lang:e,size:t,banner_message:l}),g={default_lang:e,font:f,size:t,banner_message:l,theme:s},v=()=>{(0,a.trackingEvent)(o.TrackingEventType.INFORMATION_CLICK,g),m.render()};return{render:()=>{(0,a.trackingEvent)(w.length>0?o.TrackingEventType.BANNER_DISPLAY:o.TrackingEventType.BANNER_RENDER,g);const e=document.createElement("style");e.innerHTML=h,document.head.append(e),w.forEach(e=>{var n;(e.append(y.cloneNode(!0)),v)&&(null===(n=e.querySelector(".crypto-pay-banner-base-info"))||void 0===n||n.addEventListener("click",v))}),window.dispatchEvent(new Event("resize"))},updateCashBackRate:e=>{w.forEach(n=>{const t=n.querySelector(".cashback-rate-text");t&&(t.innerHTML=e)})},updateModal:e=>{m.updateContent(e)}}};n.ClientBanner=s;var f={ClientBanner:s};n.default=f},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DefaultBannerInfoProps=void 0;const r={earnRebate:"Pay with crypto and earn rebate",coins:"Pay with 30+ tokens, including CRO, ETH, BTC, USDC and DOGE.",paySteps:["Add products to the shopping cart","Choose Crypto.com Pay when checkout","Proceed in Crypto.com App","Pay with cryptocurrency and earn rebate"],moreDetail:"More details on rebate"};n.DefaultBannerInfoProps=r},function(e,n,t){},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TrackingEventType=void 0;let r=function(e){return e.BANNER_DISPLAY="banner_display",e.BANNER_RENDER="banner_render",e.INFORMATION_CLICK="information_click",e.FAQ_CLICK="faq_click",e.CHECKOUT_CLICK="checkout_click",e}({});n.TrackingEventType=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(77);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BannerModal=void 0;var r=t(78),o=t(79);function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){u(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const c={createBannerInfo:class{constructor(e,n,t,r){u(this,"extra",void 0),u(this,"infoProps",void 0),u(this,"theme",void 0),u(this,"font",void 0),u(this,"bannerInfoContent",void 0),this.infoProps=e,this.theme=n,this.font=t,this.bannerInfoContent="",this.extra=r}init(){this.bannerInfoContent=(0,r.bannerInfoTemplate)(a(a({},this.infoProps),{},{theme:this.theme,font:this.font}))}render(){this.init(),((e,n)=>{const t=document.createElement("div");t.id="crypto-pay-banner-info",t.innerHTML=e,document.body.appendChild(t);const r=document.querySelector(".crypt-pay-banner-modal"),i=(0,o.BodyOverflowControl)();i.hiddenOverflow();const a=(0,o.observeResize)(".crypt-pay-banner-modal");a.onResize(),(0,o.observeClose)(t.id,()=>{a.removeEventListener(),i.resetOverflow()}),(0,o.observeFAQ)(n),setTimeout(()=>{null==r||r.classList.add("open");const e=document.querySelector(".modal-content");e&&(e.scrollTop=0)},100)})(this.bannerInfoContent,a(a({},this.extra),{},{font:this.font,theme:this.theme}))}updateContent(e){this.infoProps=e}}};n.BannerModal=c},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bannerInfoTemplate=void 0;var r=t(6),o=t(13),i=t(5),a=function(e){return e.LIGHT="crypto-banner-light",e.DARK="crypto-banner-dark",e}(a||{});n.bannerInfoTemplate=({earnRebate:e,coins:n,paySteps:t,moreDetail:u,theme:c,font:s})=>{const f=(e=>{switch(e){case r.BannerTheme.WHITE:case r.BannerTheme.BLACK_ON_WHITE:case r.BannerTheme.WHITE_ON_GREY:return a.DARK;case r.BannerTheme.BLACK:case r.BannerTheme.BLACK_ON_GREY:default:return a.LIGHT}})(c),d=t.map((e,n)=>`<div class="pay-step" key="${e}}">\n      <div class="pay-step-index">${n+1}</div>\n      <div class="pay-step-text">${e}</div>\n    </div>`).join(" "),l=/Mobi/.test(navigator.userAgent)&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&window.innerHeight<720;return`\n  <div class="crypt-pay-banner-modal">\n  <div class="crypt-pay-banner-mask" ><div></div></div>\n  <div class="pay-banner-modal-container">\n      <div class="pay-banner-close-btn">\n          <img src="${(0,i.getSDKDomain)()}/svg/close-icon.svg" />\n      </div>\n      <div class="modal-content ${f}">\n          <div class="banner-info-title">\n              <div class="banner-info-title-left">\n                  <div class="banner-info-title-left-icon">\n                      <img class="banner-info-crypto-logo" src="${(0,i.getSDKDomain)()}/svg/crypto-pay-logo-white.svg" />\n                  </div>\n                  <div class="earn-rebate">\n                      ${e}\n                  </div>\n              </div>\n              <div class="banner-info-right-icon">\n                  <img src="${(0,i.getSDKDomain)()}/images/earn-rebate.png" />\n              </div>\n          </div>\n          <div class="banner-info-detail ${f}">\n              <div class="pay-step-coins">\n                  ${n}\n              </div>\n              <div class="pay-step-items">\n                  ${d}\n              </div>\n              <div class="more-detail-link">\n                  <a href="https://help.crypto.com/en/articles/3073269-crypto-com-pay-rewards" target="_blank"\n                      rel="noreferrer">\n                      ${u}\n                  </a>\n              </div>\n          </div>\n      </div>\n  </div>\n  <style>\n      .crypt-pay-banner-modal {\n          position: fixed;\n          left: 0;\n          top: 0;\n          background: transparent;\n          width: 100vw;\n          height: var(--height);\n          box-sizing: border-box;\n          margin: 0 auto;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          opacity: 0;\n          transition: all 0.1s ease-in;\n          z-index: -100;\n          box-sizing: border-box;\n          font-family: ${(0,o.getCustomerFont)(s)}-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"\n      }\n      .crypt-pay-banner-modal svg {  \n        display: inline-block;\n        vertical-align: middle;\n      }\n      .crypt-pay-banner-mask{\n        position: fixed;\n        left: 0;\n        top: 0;\n        background: rgba(0, 0, 0, 0.3);\n        width: 100vw;\n        height: 100vh;\n        z-index: 99;\n      }\n\n      .pay-banner-modal-container {\n          position: relative;\n          width: 100%;\n          max-height: 100%;\n          max-width: 600px;\n          background: #ffffff;\n          box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.101699);\n          transition: all 0.3s ease-in;\n          transform: scale(0);\n          border-radius: 8px;\n          z-index: 999;\n      }\n\n      .pay-banner-modal-container .pay-banner-close-btn {\n          min-width: 24px;\n          min-height: 24px;\n          position: absolute;\n          display: flex;\n          top: 11px;\n          right: 9px;\n          cursor: pointer;\n          background: #FFFFFF;\n          border-radius: 50%;\n          padding: 4px;\n          transform: scale(0.75);\n          z-index: 2;\n      }\n      .pay-banner-close-X{\n        font-size: 24px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        width: 24px;\n        height: 24px;\n      }\n\n      .crypt-pay-banner-modal.open {\n          opacity: 1;\n          z-index: 10000;\n      }\n\n      .crypt-pay-banner-modal.open .pay-banner-modal-container {\n          transform: scale(1);\n      }\n\n      .modal-content{\n        border-radius: 8px;\n        overflow-x: hidden;\n      }\n      .modal-content.${a.LIGHT}{\n        background: #FFFFFF;\n      }\n      .modal-content.${a.DARK}{\n        background: #012A67;\n      }\n\n      .banner-info-title {\n          display: flex;\n          background: linear-gradient(180deg, #021E3F 0%, #002A67 95.76%);\n          justify-content: space-between;\n          align-items: center;\n          padding: 20px 30px;\n          border-radius: 8px 8px 0 0;\n          box-sizing: border-box;\n      }\n\n      .banner-info-title-left {\n          display: flex;\n          flex-direction: column;\n      }\n\n      .banner-info-title-left-icon {\n          min-height: 24px;\n          text-align: center;\n      }\n\n      .banner-info-crypto-logo{\n        width: 288px;\n        height: 45px;\n      }\n\n      .banner-info-right-icon{\n        min-height: 140px;\n        margin-right: 20px;\n        margin-top: 10px;\n      }\n      .banner-info-right-icon>img{\n        width: 180px;\n        height: 162px;\n      }\n\n      .earn-rebate {\n          color: #FFFFFF;\n          font-weight: 600;\n          font-size: 18px;\n          font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"\n      }\n\n      .banner-info-detail {\n          padding: 16px 32px 24px;\n          border-radius: 0 0 8px 8px;\n      }\n\n      .banner-info-detail.${a.LIGHT} {\n          background: #FFFFFF;\n          color: #0B1426;\n      }\n\n      .banner-info-detail.${a.DARK} {\n          background: #012A67;\n          color: #FFFFFF;\n      }\n\n      .pay-step{\n          margin-bottom: 24px;\n          display: flex;\n          position: relative;\n      }\n      .pay-step:last-child{\n        margin-bottom: 0;\n      }\n\n      .pay-step-index {\n          width: 24px;\n          min-width: 24px;\n          height: 24px;\n          color: white;\n          background: #1199FA;\n          border-radius: 50%;\n          margin-right: 8px;\n          display: flex;\n          justify-content: center;\n          align-items: center;\n      }\n\n      .pay-step:not(:last-child):after {\n          content: '';\n          position: absolute;\n          top: 24px;\n          left: 12px;\n          height: 100%;\n          width: 1px;\n          background: #1199FA;\n      }\n\n      .pay-step-coins{\n        font-size: 16px;\n        margin-bottom: 16px;\n      }\n\n      .pay-step-text {\n        font-size: 14px;\n        font-weight: 600;\n        line-height: 150%;\n      }\n\n      .more-detail-link {\n          margin-top: 8px;\n          line-height: 150%;\n      }\n\n      .more-detail-link>a {\n        color: #1199FA;\n        text-decoration: underline;\n        font-size: 16px;\n      }\n\n      @media screen and (min-width: 600px) {\n        .banner-info-title {\n            height: 200px;\n        }\n      }\n\n      @media screen and (max-width: 599px) {\n        .pay-banner-modal-container {\n            width: 100vw;\n            height: 100%;\n            border-radius: 0;\n        }\n\n        .modal-content{\n            height: 100%;\n            display: flex;\n            flex-direction: column;\n            overflow-y: auto;\n            border-radius: 0;\n        }\n\n        .banner-info-crypto-logo{\n          height: 24px;\n        }\n  \n        .banner-info-right-icon{\n            min-height: 89px;\n            margin-right: 0;\n        }\n        .banner-info-right-icon>img{\n          width: 116px;\n          height: 101px;\n        }\n\n        .earn-rebate {\n            text-align: center;\n            font-size: 16px;\n            font-weight: 700;\n        }\n\n        .banner-info-detail {\n            padding: 16px;\n            flex: 1 1;\n            border-radius: 0;\n        }\n\n        .banner-info-title {\n            flex-direction: column;\n        }\n\n        .more-detail-link{\n          padding-bottom: ${l?"100px":"0"};\n        }\n      }\n\n    @media screen and (max-height: 600px) and (min-width: 600px){\n      .pay-banner-modal-container {\n        width: 100vw;\n        height: 100vh;\n        border-radius: 0;\n        max-width: 100vw;\n      }\n      .pay-banner-modal-container .pay-banner-close-btn {\n        z-index: 1;\n        top: 6px;\n        right: 4px;\n      }\n\n      .modal-content{\n        width: 100%;\n        height: 100%;\n        display: flex;\n        overflow-y: auto;\n        border-radius: 0;\n      }\n\n      .banner-info-title{\n        height: 100%;\n        width: 289px;\n        display: flex;\n        flex-direction: column;\n        justify-content: flex-start;\n        border-radius: 0;\n        padding-left: 0;\n        padding-right: 0;\n      }\n\n      .banner-info-crypto-logo{\n        height: 28px;\n        margin-left: 0;\n      }\n      .banner-info-right-icon{\n        min-height: 89px;\n        margin-right: 0;\n      }\n      .earn-rebate {\n          text-align: center;\n          font-size: 16px;\n          font-weight: 500;\n      }\n      .banner-info-detail {\n        padding: 16px 24px 16px 16px;\n        flex: 1 1;\n        border-radius: 0;\n    }\n    }\n  </style>\n    `}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BodyOverflowControl=void 0,n.observeClose=function(e,n){var t,r;function o(){var t;null==n||n(),null===(t=document.querySelector(".crypt-pay-banner-modal"))||void 0===t||t.classList.remove("open"),setTimeout(()=>{var n;null===(n=document.querySelector("#"+e))||void 0===n||n.remove(),window.removeEventListener("popstate",i)},100)}function i(){o()}null===(t=document.querySelector(".crypt-pay-banner-mask"))||void 0===t||t.addEventListener("click",o),null===(r=document.querySelector(".pay-banner-close-btn"))||void 0===r||r.addEventListener("click",o),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",i)},n.observeFAQ=function(e){var n;null===(n=document.querySelector(".more-detail-link"))||void 0===n||n.addEventListener("click",(function(){(0,o.trackingEvent)(r.TrackingEventType.INFORMATION_CLICK,e)}))},n.observeResize=void 0;var r=t(6),o=t(13);n.observeResize=e=>{function n(){var n;const t=document.querySelector(e);null==t||null===(n=t.style)||void 0===n||n.setProperty("--height",window.innerHeight+"px")}return window.addEventListener("resize",n),{onResize:n,removeEventListener:function(){window.removeEventListener("resize",n)}}};n.BodyOverflowControl=()=>{let e="";return{hiddenOverflow:function(){e=document.body.style.getPropertyValue("overflow"),document.body.style.setProperty("overflow","hidden")},resetOverflow:function(){e&&"hidden"!==e?document.body.style.setProperty("overflow",e):document.body.style.removeProperty("overflow")}}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTemplate=n.getStyles=void 0;var r=t(16),o=t(6),i=t(5),a=t(13);const u=(0,r.generateUUID)(8,16);n.getTemplate=(e,n,t,r)=>{let a=e,c=n;return Object.values(o.BannerSize).includes(a)||(a=o.BannerSize.MEDIUM),Object.values(o.BannerTheme).includes(c)||(c=o.BannerTheme.BLACK_ON_GREY),`\n      <div class="crypto-${u} crypto-pay-banner-base ${a} ${r===o.BannerMessage.SHOP_NOW?"base-mode":""} ${c}">\n          <div class="crypto-${u} cashback-rate-text ${a}">${t}</div>\n          <div class="crypto-${u} crypto-pay-logo ${a}">${function(e,n){return`<img class=${e} src=${(0,i.getSDKDomain)()}${n===o.BannerTheme.WHITE||n===o.BannerTheme.WHITE_ON_GREY?"/svg/crypto-pay-logo-white.svg":"/svg/crypto-pay-logo.svg"}/>`}(a,c)}</div>\n          <div class="crypto-${u} crypto-pay-banner-base-info">${function(e,n){return`<img class=${e} src=${(0,i.getSDKDomain)()}${n===o.BannerTheme.WHITE||n===o.BannerTheme.WHITE_ON_GREY?"/svg/circle-info-white.svg":"/svg/circle-info-grey.svg"}/>`}(a,c)}</div>\n      </div>\n          `};n.getStyles=e=>`\n            .crypto-${u}.crypto-pay-banner-base{\n                width: 100%;\n                height: 100%;\n                display: flex;\n                justify-content: center;\n                align-items: center;\n                border-radius: 5px;\n                font-weight: 600;\n                padding: 14px 16px;\n                box-sizing: border-box;\n                font-family: ${(0,a.getCustomerFont)(e)}-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.SMALL}{\n              width: 321px;\n              height: 49px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.SMALL}.base-mode{\n              width: 285px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.MEDIUM}{\n              width: 404px;\n              height: 56px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.MEDIUM}.base-mode{\n              width: 348px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.LARGE}{\n              width: 425px;\n              height: 56px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.LARGE}.base-mode{\n              width: 368px;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.FIT}{\n              width: 100%;\n              min-width: 404px;\n              height: 56px;\n              text-align: center;\n              justify-content: center;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.FIT}.base-mode{\n                        min-width: 368px;\n                      }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerTheme.BLACK}{\n              background: transparent;\n              color: #323C52;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerTheme.WHITE}{\n              background: transparent;\n              color: #FFFFFF;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerTheme.BLACK_ON_GREY}{\n              background: #EAEEF4;\n              color: #323C52;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerTheme.WHITE_ON_GREY}{\n              background: #323C52;\n              color: #FFFFFF;\n            }\n            .crypto-${u}.crypto-pay-banner-base.${o.BannerTheme.BLACK_ON_WHITE}{\n              background: #FFFFFF;\n              color: #323C52;\n            }\n            .crypto-${u}.cashback-rate-text{\n              white-space: nowrap;\n            }\n            .crypto-${u}.cashback-rate-text.${o.BannerSize.SMALL}{\n              font-size: 14px;\n            }\n            .crypto-${u}.cashback-rate-text.${o.BannerSize.MEDIUM}{\n              font-size: 16px;\n            }\n            .crypto-${u}.cashback-rate-text.${o.BannerSize.LARGE}{\n              font-size: 18px;\n            }\n            .crypto-${u}.cashback-rate-text.${o.BannerSize.FIT}{\n              font-size: 16px;\n            }\n            .crypto-${u}.crypto-pay-logo{\n              height: 100%;\n              display: flex;\n              align-items: center;\n              margin: 0 8px;\n            }\n            .crypto-${u}.crypto-pay-logo .${o.BannerSize.SMALL}{\n              width: 107px;\n              height: 17px;\n            }\n            .crypto-${u}.crypto-pay-logo .${o.BannerSize.MEDIUM} {\n              width: 161px;\n              height: 28px;\n            }\n            .crypto-${u}.crypto-pay-logo .${o.BannerSize.LARGE}{\n              width: 161px;\n              height: 28px;\n            }\n            .crypto-${u}.crypto-pay-logo .${o.BannerSize.FIT}{\n              width: 161px;\n              height: 28px;\n            }\n            .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.SMALL}{\n              width: 17px;\n              height: 17px;\n            }\n            .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.MEDIUM}{\n              width: 24px;\n              height: 24px;\n            }\n            .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.LARGE}{\n              width: 24px;\n              height: 24px;\n            }\n            .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.FIT}{\n              width: 24px;\n              height: 24px;\n            }\n            .crypto-${u}.crypto-pay-banner-base-info{\n              height: 100%;\n              cursor: pointer;\n              display: flex;\n              align-items: center;\n            }\n            @media screen and (max-width: 600px) {\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.SMALL}{\n                width: 285px;\n                height: 46px;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.SMALL}.base-mode{\n                width: 248px;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.MEDIUM}{\n                width: 321px;\n                height: 49px;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.MEDIUM}.base-mode{\n                width: 285px;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.LARGE}{\n                width: 404px;\n                height: 56px;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.LARGE}.base-mode{\n                            width: 348px;\n                          }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.FIT}{\n                width: 100%;\n                min-width: 321px;\n                height: 49px;\n                text-align: center;\n                justify-content: center;\n              }\n              .crypto-${u}.crypto-pay-banner-base.${o.BannerSize.FIT}.base-mode{\n                            width: 100%;\n                            min-width: 285px;\n                            text-align: center;\n                            justify-content: center;\n                          }\n              .crypto-${u}.cashback-rate-text.${o.BannerSize.SMALL}{\n                font-size: 12px;\n              }\n              .crypto-${u}.cashback-rate-text.${o.BannerSize.MEDIUM}{\n                font-size: 14px;\n              }\n              .crypto-${u}.cashback-rate-text.${o.BannerSize.LARGE}{\n                font-size: 16px;\n              }\n              .crypto-${u}.cashback-rate-text.${o.BannerSize.FIT}{\n                font-size: 14px;\n              }\n              .crypto-${u}.crypto-pay-logo .${o.BannerSize.SMALL}{\n                width: 94px;\n                height: 14px;\n              }\n              .crypto-${u}.crypto-pay-logo .${o.BannerSize.MEDIUM}{\n                width: 107px;\n                height: 17px;\n              }\n              .crypto-${u}.crypto-pay-logo .${o.BannerSize.LARGE}{\n                width: 161px;\n                height: 28px;\n              }\n              .crypto-${u}.crypto-pay-logo .${o.BannerSize.FIT}{\n                width: 107px;\n                height: 17px;\n              }\n              .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.SMALL}{\n                width: 14px;\n                height: 14px;\n              }\n              .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.MEDIUM}{\n                width: 17px;\n                height: 17px;\n              }\n              .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.LARGE}{\n                width: 24px;\n                height: 24px;\n              }\n              .crypto-${u}.crypto-pay-banner-base-info .${o.BannerSize.FIT}{\n                            width: 17px;\n                            height: 17px;\n                          }\n            }`},function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.getAPIHost=function(n){return e.env.API_HOST||r.API_HOSTS[n]},n.getApiProtocol=function(e){return r.API_PROTOCOLS[e]},n.getEnv=function(n){return e.env.ENV||n},n.getLastMinToday=void 0,n.getProtocol=function(e){return r.PROTOCOLS[e]},n.getSDKHost=function(n){return e.env.SDK_HOST||r.SDK_HOSTS[n]},n.isAndroid=function(e=""){return/(Android)/i.test(e)},n.isIOS=function(e=""){return/(iPhone|iPad|iPod|iOS)/i.test(e)},n.isLedger=function(e){return null!==e.match(/Ledger/i)},n.isLocal=function(){return"production"===r.ENV.DEV||"production"===r.ENV.TEST},n.isMobileDevice=function(e){return null!==e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)},n.isTest=function(){return"production"===r.ENV.TEST};var r=t(4);n.getLastMinToday=()=>{const e=(new Date).getFullYear(),n=(new Date).getMonth(),t=(new Date).getDate();return new Date(e,n,t,23,59,59).getTime()}}).call(this,t(9))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(83);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Checkout=void 0;var r=t(1),o=t(7),i=t(12),a=t(3),u=t(14),c=t(5),s=t(0),f=t(29),d=t(84);const l=(0,o.create)({tag:"crypto-pay-checkout",defaultContext:"popup",url:({props:e})=>(0,s.isTest)()&&e.test&&e.test.checkoutUrl?e.test.checkoutUrl:(0,c.checkoutUrl)(),dimensions:{width:"600px",height:"795px"},containerTemplate:(0,s.isTest)()?o.defaultContainerTemplate:d.containerTemplate,props:{sdkMeta:{type:"string",queryParam:!0,value:()=>(0,i.getSDKMeta)()},publishableKey:{type:"string",queryParam:!0,value:()=>(0,a.getPublishableKey)()},defaultLang:{type:"string",required:!1,queryParam:!0},originPageUrl:{type:"string",required:!1,queryParam:!1,value:()=>{var e,n,t,r;return(null===(e=window)||void 0===e||null===(n=e.xprops)||void 0===n?void 0:n.originPageUrl)||(null===(t=window)||void 0===t||null===(r=t.location)||void 0===r?void 0:r.href)}},createPayment:{type:"function",queryParam:"id",queryValue:({value:e})=>e(),decorate:({value:e,state:n})=>function(){return r.ZalgoPromise.try(e).then(e=>{if(0===Object.keys(e).length)throw new Error("Expected a promise returning payment object");const t=e.id;return n.paymentId=t,t}).catch(f.errorHandler)}},onApprove:{type:"function",decorate:({value:e,state:n,onError:t})=>function(r){n.approved=!0;return e(r,{payment:{fetch:()=>u.API.showPayment(n.paymentId)}}).catch(e=>t(e)).then(()=>{})}},onCancel:{type:"function",required:!1,decorate:({value:e})=>function(){return r.ZalgoPromise.try(()=>e()).then(()=>{})},default(){}},test:{type:"object",default:()=>({})}}});n.Checkout=l},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(85);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.containerTemplate=void 0;const o=(0,((r=t(30))&&r.__esModule?r:{default:r}).default)();n.containerTemplate=o},function(e,n,t){"use strict";e.exports=t(87)},function(e,n,t){"use strict";"undefined"!=typeof self&&self,e.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){t.r(n),t.d(n,"ElementNode",(function(){return i})),t.d(n,"FragmentNode",(function(){return a})),t.d(n,"TextNode",(function(){return u})),t.d(n,"ComponentNode",(function(){return c})),t.d(n,"node",(function(){return p})),t.d(n,"Fragment",(function(){return h})),t.d(n,"text",(function(){return w})),t.d(n,"dom",(function(){return P})),t.d(n,"react",(function(){return T})),t.d(n,"html",(function(){return j})),t.d(n,"preact",(function(){return M})),t.d(n,"regex",(function(){return I})),t.d(n,"NODE_TYPE",(function(){return r})),t.d(n,"Style",(function(){return D})),t.d(n,"Regex",(function(){return W})),t.d(n,"RegexText",(function(){return L})),t.d(n,"RegexWord",(function(){return z})),t.d(n,"RegexCharacters",(function(){return B})),t.d(n,"RegexGroup",(function(){return U})),t.d(n,"RegexUnion",(function(){return F}));var r={ELEMENT:"element",TEXT:"text",COMPONENT:"component",FRAGMENT:"fragment"};function o(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r].render(n);if(o)if(Array.isArray(o))for(var i=0;i<o.length;i++){var a=o[i];a&&t.push(a)}else t.push(o)}return t}var i=function(){function e(e,n,t){this.type=r.ELEMENT,this.name=void 0,this.props=void 0,this.children=void 0,this.onRender=void 0,this.name=e,this.props=n||{},this.children=t;var o=this.props.onRender;"function"==typeof o&&(this.onRender=o,delete n.onRender)}var n=e.prototype;return n.render=function(e){var n=e(this);return this.onRender&&this.onRender(n),n},n.renderChildren=function(e){return o(this.children,e)},e}(),a=function(){function e(e){this.type=r.FRAGMENT,this.children=void 0,this.children=e}return e.prototype.render=function(e){return o(this.children,e)},e}(),u=function(){function e(e){this.type=r.TEXT,this.text=void 0,this.text=e}return e.prototype.render=function(e){return e(this)},e}(),c=function(){function e(e,n,t){this.type=r.COMPONENT,this.component=void 0,this.props=void 0,this.children=void 0,this.component=e,this.props=n||{},this.children=t,this.props.children=t}var n=e.prototype;return n.renderComponent=function(e){var n=function(e){var n=s(Array.isArray(e)?e:[e]);return 1===n.length?n[0]:n.length>1?new a(n):void 0}(this.component(this.props,this.children));if(n)return n.render(e)},n.render=function(e){return e(this)},n.renderChildren=function(e){return o(this.children,e)},e}();function s(e){for(var n=[],t=0;t<e.length;t++){var o=e[t];if(o)if("string"==typeof o||"number"==typeof o)n.push(new u(o.toString()));else{if("boolean"==typeof o)continue;if(Array.isArray(o))for(var i=0,a=s(o);i<a.length;i++)n.push(a[i]);else{if(!o||o.type!==r.ELEMENT&&o.type!==r.TEXT&&o.type!==r.COMPONENT)throw new TypeError("Unrecognized node type: "+typeof o);n.push(o)}}}return n}var f,d,l,p=function(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];if(r=s(r),"string"==typeof e)return new i(e,n,r);if("function"==typeof e)return new c(e,n,r);throw new TypeError("Expected jsx element to be a string or a function")},h=function(e,n){return n};function w(){return function e(n){if(n.type===r.COMPONENT)return[].concat(n.renderComponent(e)).join("");if(n.type===r.ELEMENT)throw new Error("Text renderer does not support basic elements");if(n.type===r.TEXT)return n.text;throw new TypeError("Unhandleable node: "+n.type)}}function y(e){return null!=e}var m=((f={}).svg="http://www.w3.org/2000/svg",f),g=((d={})["xlink:href"]="http://www.w3.org/1999/xlink",d);function v(e,n){return e.createTextNode(n.text)}function b(e,n){for(var t=n.props,r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];if(null!=a&&"el"!==i&&"innerHTML"!==i)if(i.match(/^on[A-Z][a-z]/)&&"function"==typeof a)e.addEventListener(i.slice(2).toLowerCase(),a);else if("string"==typeof a||"number"==typeof a){var u=g[i];u?e.setAttributeNS(u,i,a.toString()):e.setAttribute(i,a.toString())}else"boolean"==typeof a&&!0===a&&e.setAttribute(i,"")}"iframe"!==e.tagName.toLowerCase()||t.id||e.setAttribute("id","jsx-iframe-"+"xxxxxxxxxx".replace(/./g,(function(){return"0123456789abcdef".charAt(Math.floor(Math.random()*"0123456789abcdef".length))})))}var E=((l={}).iframe=function(e,n){var t=n.children[0];if(1!==n.children.length||!t||t.type!==r.ELEMENT||"html"!==t.name)throw new Error("Expected only single html element node as child of iframe element");e.addEventListener("load",(function(){var n=e.contentWindow;if(!n)throw new Error("Expected frame to have contentWindow");for(var r=n.document,o=r.documentElement;o.children&&o.children.length;)o.removeChild(o.children[0]);for(var i=t.render(P({doc:r}));i.children.length;)o.appendChild(i.children[0])}))},l.script=function(e,n){var t=n.children[0];if(1!==n.children.length||!t||t.type!==r.TEXT)throw new Error("Expected only single text node as child of script element");e.text=t.text},l.default=function(e,n,t){for(var r=0,o=n.renderChildren(t);r<o.length;r++)e.appendChild(o[r])},l);function _(e,n,t,r){if(n.props.hasOwnProperty("innerHTML")){if(n.children.length)throw new Error("Expected no children to be passed when innerHTML prop is set");var o=n.props.innerHTML;if("string"!=typeof o)throw new TypeError("innerHTML prop must be string");"script"===n.name?e.text=o:(e.innerHTML=o,function(e,n){void 0===n&&(n=window.document);for(var t=0,r=e.querySelectorAll("script");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)}}}(e,t))}else(E[n.name]||E.default)(e,n,r)}function P(e){void 0===e&&(e={});var n=e.doc,t=void 0===n?document:n;return function e(n){if(n.type===r.COMPONENT)return n.renderComponent(e);if(n.type===r.TEXT)return v(t,n);if(n.type===r.ELEMENT){var o=m[n.name.toLowerCase()];if(o)return function e(n,o){if(n.type===r.COMPONENT)return n.renderComponent((function(n){return e(n,o)}));if(n.type===r.TEXT)return v(t,n);if(n.type===r.ELEMENT){var i=function(e,n,t){return e.createElementNS(t,n.name)}(t,n,o);return b(i,n),_(i,n,t,(function(n){return e(n,o)})),i}throw new TypeError("Unhandleable node")}(n,o);var i=function(e,n){return n.props.el?n.props.el:e.createElement(n.name)}(t,n);return b(i,n),_(i,n,t,e),i}throw new TypeError("Unhandleable node")}}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 S(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}var x=["innerHTML","class"];function T(e){var n=(void 0===e?{}:e).React;if(!n)throw new Error("Must pass React library to react renderer");return function e(t){if(t.type===r.COMPONENT)return n.createElement.apply(n,[function(){return t.renderComponent(e)||null},t.props].concat(t.renderChildren(e)));if(t.type===r.ELEMENT)return n.createElement.apply(n,[t.name,(o=t.props,i=o.innerHTML,O({dangerouslySetInnerHTML:i?{__html:i}:null,className:o.class},S(o,x)))].concat(t.renderChildren(e)));var o,i;if(t.type===r.TEXT)return t.text;throw new TypeError("Unhandleable node")}}var A={br:!0};function C(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")}function j(){return function e(n){if(n.type===r.COMPONENT)return[].concat(n.renderComponent(e)).join("");if(n.type===r.ELEMENT){var t=(i=n.props,(a=Object.keys(i).filter((function(e){var n=i[e];return"innerHTML"!==e&&("string"==typeof n||"number"==typeof n||!0===n)}))).length?" "+a.map((function(e){var n=i[e];if(!0===n)return""+C(e);if("string"!=typeof n&&"number"!=typeof n)throw new TypeError("Unexpected prop type: "+typeof n);return""===n?C(e):C(e)+'="'+C(n.toString())+'"'})).join(" "):"");if(A[n.name])return"<"+n.name+t+" />";var o="string"==typeof n.props.innerHTML?n.props.innerHTML:n.renderChildren(e).join("");return"<"+n.name+t+">"+o+"</"+n.name+">"}var i,a;if(n.type===r.TEXT)return C(n.text);throw new TypeError("Unhandleable node: "+n.type)}}var R=["innerHTML"];function M(e){var n=(void 0===e?{}:e).Preact;if(!n)throw new Error("Must pass Preact library to react renderer");return function e(t){if(t.type===r.COMPONENT)return n.h.apply(n,[function(){return t.renderComponent(e)||null},t.props].concat(t.renderChildren(e)));if(t.type===r.ELEMENT)return n.h.apply(n,[t.name,(o=t.props,i=o.innerHTML,O({dangerouslySetInnerHTML:i?{__html:i}:null},S(o,R)))].concat(t.renderChildren(e)));var o,i;if(t.type===r.TEXT)return t.text;throw new TypeError("Unhandleable node")}}function I(){var e=w();return function(n){return new RegExp(e(n))}}function D(e){var n=e.css,t=e.nonce,r=e.children;return p(h,null,p("style",{innerHTML:"string"==typeof n?n:n._getCss(),nonce:t}),r)}I.node=function(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];var i=p.apply(void 0,[e,n].concat(r));return e.renderer?i.render(e.renderer()):i};var k=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")},N=function(e,n){return(n=function(e,n){if(!n)throw new Error("Must pass children to "+e);return n}(e,n)).map((function(e){return e.type===r.TEXT?new u(k(e.text)):e}))};function W(e,n){var t=e.exact,r=void 0===t||t;return n=N("RegexGroup",n),r?["^"].concat(n,["$"]):n}function L(e,n){return N("RegexText",n)}function z(e,n){return function(e,n){if(n&&n.length)throw new Error("Must not pass children to RegexWord")}(0,n),"\\w+"}function B(e,n){return["["].concat(N("RegexText",n),["]"])}function U(e,n){var t=e.repeat,r=e.repeatMin,o=e.repeatMax,i=e.name,a=e.optional,c=void 0!==a&&a,s=e.capture,f=void 0===s||s,d=e.union,l=void 0!==d&&d;if(n=N("RegexGroup",n),y(t)&&(y(r)||y(o)))throw new Error("repeat can not be used with repeatMin or repeatMax");if(i&&!f)throw new Error("Named groups must be captured");if(l){for(var p=[],h=0,w=n;h<w.length;h++)p.push(w[h]),p.push(new u("|"));p.pop(),n=p}var m=[];return m.push(f?"(":"(?:"),i&&m.push("?<"+k(i)+">"),m.push.apply(m,n),m.push(")"),y(t)&&("number"==typeof t?m.push("{"+t+"}"):!0===t&&m.push("+")),(y(r)||y(o))&&m.push("{"+(r||"")+","+(o||"")+"}"),c&&m.push("?"),m}function F(e,n){for(var t=[],r=0,o=n=N("RegexGroup",n);r<o.length;r++)t.push(o[r]),t.push("|");return t.pop(),t}W.renderer=I}])},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getOverlayStyle=function({uid:e}){return`\n    #${e} {\n      position: absolute;\n      z-index: 2147483647;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n\n      transform: translate3d(0, 0, 0);\n\n      background-color: black;\n      background-color: rgba(0, 0, 0, 0.8);\n      background: radial-gradient(50% 50%, ellipse closest-corner, rgba(0,0,0,0.6) 1%, rgba(0,0,0,0.8) 100%);\n\n      cursor: pointer;\n\n      color: #fff;\n      font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"\n    }\n\n    #${e} .crypto-pay-overlay-close:before,\n    #${e} .crypto-pay-overlay-close:after {\n      background-color: #fff;\n    }\n\n    #${e} .crypto-pay-overlay-close {\n      position: absolute;\n      right: 16px;\n      top: 16px;\n      width: 16px;\n      height: 16px;\n      opacity: 0.6;\n    }\n\n    #${e}-loading .crypto-pay-overlay-close {\n      display: none;\n    }\n\n    #${e} .crypto-pay-overlay-close:hover {\n      opacity: 1;\n    }\n\n    #${e} .crypto-pay-overlay-close:before, .crypto-pay-overlay-close:after {\n      position: absolute;\n      left: 8px;\n      content: ' ';\n      height: 16px;\n      width: 2px;\n    }\n\n    #${e} .crypto-pay-overlay-close:before {\n      transform: rotate(45deg);\n      -webkit-transform: rotate(45deg);\n      -moz-transform: rotate(45deg);\n      -o-transform: rotate(45deg);\n      -ms-transform: rotate(45deg);\n    }\n\n    #${e} .crypto-pay-overlay-close:after {\n      transform: rotate(-45deg);\n      -webkit-transform: rotate(-45deg);\n      -moz-transform: rotate(-45deg);\n      -o-transform: rotate(-45deg);\n      -ms-transform: rotate(-45deg);\n    }\n\n    #${e} .crypto-pay-overlay-content {\n      max-width: 350px;\n      top: 50%;\n      left: 50%;\n      position: absolute;\n      text-align: center;\n      transform: translateX(-50%) translateY(-50%);\n      -webkit-transform: translateX(-50%)\n    }\n\n    #${e} .crypto-pay-overlay-content .crypto-pay-overlay-message {\n      font-size: 25px;\n      line-height: 1.5;\n      color: #fff;\n    }\n\n    #${e} .crypto-pay-overlay-content .crypto-pay-spinner-container {\n      display: none;\n    }\n\n    #${e} .crypto-pay-overlay-content.crypto-pay-loading .crypto-pay-spinner-container {\n      display: block;\n    }\n\n    #${e} .crypto-pay-overlay-content.crypto-pay-loading .crypto-pay-overlay-message {\n      display: none;\n    }\n\n    @keyframes show-component {\n        from {\n            opacity: 0;\n            transform: scale3d(.3, .3, .3);\n        }\n        to {\n            opacity: 1;\n            transform: scale3d(1, 1, 1);\n        }\n    }\n\n    @-webkit-keyframes show-component {\n      from {\n          opacity: 0;\n          transform: scale3d(.3, .3, .3);\n      }\n      to {\n          opacity: 1;\n          transform: scale3d(1, 1, 1);\n      }\n    }\n\n    @keyframes hide-component {\n        from {\n            opacity: 1;\n            transform: scale3d(1, 1, 1);\n        }\n\n        to {\n            opacity: 0;\n            transform: scale3d(.3, .3, .3);\n        }\n    }\n\n    @-webkit-keyframes hide-component {\n        from {\n            opacity: 1;\n            transform: scale3d(1, 1, 1);\n        }\n\n        to {\n            opacity: 0;\n            transform: scale3d(.3, .3, .3);\n        }\n    }\n\n    #${e} .crypto-pay-overlay-content .crypto-pay-spinner-container .crypto-pay-spinner {\n      height: 30px;\n      width: 30px;\n      display: inline-block;\n      box-sizing: content-box;\n      opacity: 1;\n      filter: alpha(opacity=100);\n      -webkit-animation: rotation .7s infinite linear;\n      -moz-animation: rotation .7s infinite linear;\n      -o-animation: rotation .7s infinite linear;\n      animation: rotation .7s infinite linear;\n      border-left: 8px solid rgba(0, 0, 0, .2);\n      border-right: 8px solid rgba(0, 0, 0, .2);\n      border-bottom: 8px solid rgba(0, 0, 0, .2);\n      border-top: 8px solid #fff;\n      border-radius: 100%\n    }\n\n    @-webkit-keyframes rotation {\n        from {\n            -webkit-transform: rotate(0deg)\n        }\n        to {\n            -webkit-transform: rotate(359deg)\n        }\n    }\n    @-moz-keyframes rotation {\n        from {\n            -moz-transform: rotate(0deg)\n        }\n        to {\n            -moz-transform: rotate(359deg)\n        }\n    }\n    @-o-keyframes rotation {\n        from {\n            -o-transform: rotate(0deg)\n        }\n        to {\n            -o-transform: rotate(359deg)\n        }\n    }\n    @keyframes rotation {\n        from {\n            transform: rotate(0deg)\n        }\n        to {\n            transform: rotate(359deg)\n        }\n    }\n  `}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSandboxStyle=function({uid:e}){return`\n    #${e}.crypto-pay-overlay-sandbox {\n      display: block;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      z-index: 2147483647;\n\n      animation-duration: 1s;\n      animation-fill-mode: forwards !important;\n      animation-iteration-count: 1;\n\n      -webkit-animation-duration: 1s;\n      -webkit-animation-fill-mode: forwards !important;\n      -webkit-animation-iteration-count: 1;\n\n      opacity: 0;\n    }\n\n    #${e}.crypto-pay-overlay-sandbox .crypto-pay-overlay-sandbox-iframe {\n      display: block;\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n    }\n\n    @keyframes show-container {\n      from {\n          opacity: 0;\n      }\n\n      to {\n          opacity: 1;\n      }\n    }\n\n    @keyframes hide-container {\n        from {\n            opacity: 1;\n        }\n\n        50% {\n            opacity: 1;\n        }\n\n        to {\n            opacity: 0;\n        }\n    }\n\n    @-webkit-keyframes show-container {\n      from {\n          opacity: 0;\n      }\n\n      to {\n          opacity: 1;\n      }\n    }\n\n    @-webkit-keyframes hide-container {\n        from {\n            opacity: 1;\n        }\n\n        50% {\n            opacity: 1;\n        }\n\n        to {\n            opacity: 0;\n        }\n    }\n  `}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(91);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Download=void 0;var r=t(7),o=t(12),i=t(3),a=t(5),u=t(0);const c=(0,r.create)({tag:"crypto-pay-download",defaultContext:"iframe",url:({props:e})=>(0,u.isTest)()&&e.test&&e.test.downloadUrl?e.test.downloadUrl:(0,a.downloadUrl)(),dimensions:{width:"100%",height:"670px"},prerenderTemplate:({doc:e})=>{const n=e.createElement("html");return n.innerHTML='\n      <body style="overflow:hidden;">\n        <div class="spinner"></div>\n        <style>\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        </style>\n      </body>\n    ',n},props:{sdkMeta:{type:"string",queryParam:!0,value:()=>(0,o.getSDKMeta)()},publishableKey:{type:"string",queryParam:!0,value:()=>(0,i.getPublishableKey)()},merchantName:{type:"string",required:!1,default:()=>"here"}}});n.Download=c},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(93);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Subscription=void 0;var r=t(1),o=t(7),i=t(12),a=t(3),u=t(0),c=t(5),s=t(29),f=t(94);const d=(0,o.create)({tag:"crypto-pay-subscription",defaultContext:"popup",url:({props:e})=>(0,u.isTest)()&&e.test&&e.test.subscriptionUrl?e.test.subscriptionUrl:(0,c.subscriptionUrl)(),dimensions:{width:"600px",height:"795px"},containerTemplate:(0,u.isTest)()?o.defaultContainerTemplate:f.containerTemplate,props:{sdkMeta:{type:"string",queryParam:!0,value:()=>(0,i.getSDKMeta)()},publishableKey:{type:"string",queryParam:!0,value:()=>(0,a.getPublishableKey)()},defaultLang:{type:"string",required:!1,queryParam:!0},createSubscription:{type:"function",queryParam:"id",queryValue:({value:e})=>e(),decorate:({value:e})=>function(){return r.ZalgoPromise.try(e).then(e=>{if(0===Object.keys(e).length)throw new Error("Expected a promise returning payment object");return e.id}).catch(s.errorHandler)}},onApprove:{type:"function",decorate:({value:e})=>function(n){return e(n)}},test:{type:"object",default:()=>({})}}});n.Subscription=d},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(95);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}))},function(e,n,t){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.containerTemplate=void 0;const o=(0,((r=t(30))&&r.__esModule?r:{default:r}).default)();n.containerTemplate=o}])}));