onz-auth
Version:
Onz Auth Javascript SDK for Passwordless Authentication
2 lines • 205 kB
JavaScript
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("onz",[],n):"object"==typeof exports?exports.onz=n():e.onz=n()}(self,(function(){return function(){var e={669:function(e,n,r){e.exports=r(609)},448:function(e,n,r){"use strict";var t=r(867),o=r(26),i=r(372),a=r(327),u=r(97),c=r(109),s=r(985),f=r(61),d=r(655),l=r(263);e.exports=function(e){return new Promise((function(n,r){var h,p=e.data,w=e.headers,m=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}t.isFormData(p)&&delete w["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";w.Authorization="Basic "+btoa(g+":"+b)}var E=u(e.baseURL,e.url);function _(){if(y){var t="getAllResponseHeaders"in y?c(y.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:t,config:e,request:y};o((function(e){n(e),v()}),(function(e){r(e),v()}),i),y=null}}if(y.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(_)},y.onabort=function(){y&&(r(f("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){r(f("Network Error",e,null,y)),y=null},y.ontimeout=function(){var n=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",t=e.transitional||d.transitional;e.timeoutErrorMessage&&(n=e.timeoutErrorMessage),r(f(n,e,t.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},t.isStandardBrowserEnv()){var x=(e.withCredentials||s(E))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;x&&(w[e.xsrfHeaderName]=x)}"setRequestHeader"in y&&t.forEach(w,(function(e,n){void 0===p&&"content-type"===n.toLowerCase()?delete w[n]:y.setRequestHeader(n,e)})),t.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),m&&"json"!==m&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(r(!e||e&&e.type?new l("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),y.send(p)}))}},609:function(e,n,r){"use strict";var t=r(867),o=r(849),i=r(321),a=r(185);var u=function e(n){var r=new i(n),u=o(i.prototype.request,r);return t.extend(u,i.prototype,r),t.extend(u,r),u.create=function(r){return e(a(n,r))},u}(r(655));u.Axios=i,u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.VERSION=r(288).version,u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:function(e){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},972:function(e,n,r){"use strict";var t=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){var n,t=r._listeners.length;for(n=0;n<t;n++)r._listeners[n](e);r._listeners=null}})),this.promise.then=function(e){var n,t=new Promise((function(e){r.subscribe(e),n=e})).then(e);return t.cancel=function(){r.unsubscribe(n)},t},e((function(e){r.reason||(r.reason=new t(e),n(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var n=this._listeners.indexOf(e);-1!==n&&this._listeners.splice(n,1)}},o.source=function(){var e;return{token:new o((function(n){e=n})),cancel:e}},e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,n,r){"use strict";var t=r(867),o=r(327),i=r(782),a=r(572),u=r(185),c=r(875),s=c.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:s.transitional(s.boolean),forcedJSONParsing:s.transitional(s.boolean),clarifyTimeoutError:s.transitional(s.boolean)},!1);var r=[],t=!0;this.interceptors.request.forEach((function(n){"function"==typeof n.runWhen&&!1===n.runWhen(e)||(t=t&&n.synchronous,r.unshift(n.fulfilled,n.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!t){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var d=e;r.length;){var l=r.shift(),h=r.shift();try{d=l(d)}catch(e){h(e);break}}try{o=a(d)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},t.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(n,r){return this.request(u(r||{},{method:e,url:n,data:(r||{}).data}))}})),t.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(n,r,t){return this.request(u(t||{},{method:e,url:n,data:r}))}})),e.exports=f},782:function(e,n,r){"use strict";var t=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){t.forEach(this.handlers,(function(n){null!==n&&e(n)}))},e.exports=o},97:function(e,n,r){"use strict";var t=r(793),o=r(303);e.exports=function(e,n){return e&&!t(n)?o(e,n):n}},61:function(e,n,r){"use strict";var t=r(481);e.exports=function(e,n,r,o,i){var a=new Error(e);return t(a,n,r,o,i)}},572:function(e,n,r){"use strict";var t=r(867),o=r(527),i=r(502),a=r(655),u=r(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new u("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=t.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),t.forEach(["delete","get","head","post","put","patch","common"],(function(n){delete e.headers[n]})),(e.adapter||a.adapter)(e).then((function(n){return c(e),n.data=o.call(e,n.data,n.headers,e.transformResponse),n}),(function(n){return i(n)||(c(e),n&&n.response&&(n.response.data=o.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)}))}},481:function(e){"use strict";e.exports=function(e,n,r,t,o){return e.config=n,r&&(e.code=r),e.request=t,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:function(e,n,r){"use strict";var t=r(867);e.exports=function(e,n){n=n||{};var r={};function o(e,n){return t.isPlainObject(e)&&t.isPlainObject(n)?t.merge(e,n):t.isPlainObject(n)?t.merge({},n):t.isArray(n)?n.slice():n}function i(r){return t.isUndefined(n[r])?t.isUndefined(e[r])?void 0:o(void 0,e[r]):o(e[r],n[r])}function a(e){if(!t.isUndefined(n[e]))return o(void 0,n[e])}function u(r){return t.isUndefined(n[r])?t.isUndefined(e[r])?void 0:o(void 0,e[r]):o(void 0,n[r])}function c(r){return r in n?o(e[r],n[r]):r in e?o(void 0,e[r]):void 0}var s={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return t.forEach(Object.keys(e).concat(Object.keys(n)),(function(e){var n=s[e]||i,o=n(e);t.isUndefined(o)&&n!==c||(r[e]=o)})),r}},26:function(e,n,r){"use strict";var t=r(61);e.exports=function(e,n,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?n(t("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:function(e,n,r){"use strict";var t=r(867),o=r(655);e.exports=function(e,n,r){var i=this||o;return t.forEach(r,(function(r){e=r.call(i,e,n)})),e}},655:function(e,n,r){"use strict";var t=r(155),o=r(867),i=r(16),a=r(481),u={"Content-Type":"application/x-www-form-urlencoded"};function c(e,n){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=n)}var s,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(s=r(448)),s),transformRequest:[function(e,n){return i(n,"Accept"),i(n,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(c(n,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||n&&"application/json"===n["Content-Type"]?(c(n,"application/json"),function(e,n,r){if(o.isString(e))try{return(n||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var n=this.transitional||f.transitional,r=n&&n.silentJSONParsing,t=n&&n.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||t&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){f.headers[e]=o.merge(u)})),e.exports=f},288:function(e){e.exports={version:"0.24.0"}},849:function(e){"use strict";e.exports=function(e,n){return function(){for(var r=new Array(arguments.length),t=0;t<r.length;t++)r[t]=arguments[t];return e.apply(n,r)}}},327:function(e,n,r){"use strict";var t=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,n,r){if(!n)return e;var i;if(r)i=r(n);else if(t.isURLSearchParams(n))i=n.toString();else{var a=[];t.forEach(n,(function(e,n){null!=e&&(t.isArray(e)?n+="[]":e=[e],t.forEach(e,(function(e){t.isDate(e)?e=e.toISOString():t.isObject(e)&&(e=JSON.stringify(e)),a.push(o(n)+"="+o(e))})))})),i=a.join("&")}if(i){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:function(e){"use strict";e.exports=function(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}},372:function(e,n,r){"use strict";var t=r(867);e.exports=t.isStandardBrowserEnv()?{write:function(e,n,r,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(n)),t.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),t.isString(o)&&u.push("path="+o),t.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:function(e,n,r){"use strict";var t=r(867);e.exports=t.isStandardBrowserEnv()?function(){var e,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(n){var r=t.isString(n)?o(n):n;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:function(e,n,r){"use strict";var t=r(867);e.exports=function(e,n){t.forEach(e,(function(r,t){t!==n&&t.toUpperCase()===n.toUpperCase()&&(e[n]=r,delete e[t])}))}},109:function(e,n,r){"use strict";var t=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var n,r,i,a={};return e?(t.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),n=t.trim(e.substr(0,i)).toLowerCase(),r=t.trim(e.substr(i+1)),n){if(a[n]&&o.indexOf(n)>=0)return;a[n]="set-cookie"===n?(a[n]?a[n]:[]).concat([r]):a[n]?a[n]+", "+r:r}})),a):a}},713:function(e){"use strict";e.exports=function(e){return function(n){return e.apply(null,n)}}},875:function(e,n,r){"use strict";var t=r(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,n){o[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}}));var i={};o.transitional=function(e,n,r){function o(e,n){return"[Axios v"+t+"] Transitional option '"+e+"'"+n+(r?". "+r:"")}return function(r,t,a){if(!1===e)throw new Error(o(t," has been removed"+(n?" in "+n:"")));return n&&!i[t]&&(i[t]=!0,console.warn(o(t," has been deprecated since v"+n+" and will be removed in the near future"))),!e||e(r,t,a)}},e.exports={assertOptions:function(e,n,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var t=Object.keys(e),o=t.length;o-- >0;){var i=t[o],a=n[i];if(a){var u=e[i],c=void 0===u||a(u,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},867:function(e,n,r){"use strict";var t=r(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var n=Object.getPrototypeOf(e);return null===n||n===Object.prototype}function s(e){return"[object Function]"===o.call(e)}function f(e,n){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,t=e.length;r<t;r++)n.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:s,isStream:function(e){return u(e)&&s(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var n={};function r(r,t){c(n[t])&&c(r)?n[t]=e(n[t],r):c(r)?n[t]=e({},r):i(r)?n[t]=r.slice():n[t]=r}for(var t=0,o=arguments.length;t<o;t++)f(arguments[t],r);return n},extend:function(e,n,r){return f(n,(function(n,o){e[o]=r&&"function"==typeof n?t(n,r):n})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},155:function(e){var n,r,t=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],s=!1,f=-1;function d(){s&&u&&(s=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!s){var e=a(d);s=!0;for(var n=c.length;n;){for(u=c,c=[];++f<n;)u&&u[f].run();f=-1,n=c.length}u=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function p(){}t.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];c.push(new h(e,n)),1!==c.length||s||a(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.prependListener=p,t.prependOnceListener=p,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},145:function(e){"undefined"!=typeof self&&self,e.exports=function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return{}.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}([function(e,n,r){"use strict";function t(e,n){return(t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,t(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function a(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var r=n.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}r.r(n),r.d(n,"PopupOpenError",(function(){return Ie})),r.d(n,"create",(function(){return hr})),r.d(n,"destroy",(function(){return mr})),r.d(n,"destroyComponents",(function(){return pr})),r.d(n,"destroyAll",(function(){return wr})),r.d(n,"PROP_TYPE",(function(){return Yn})),r.d(n,"PROP_SERIALIZATION",(function(){return Vn})),r.d(n,"CONTEXT",(function(){return Zn})),r.d(n,"EVENT",(function(){return Gn}));var u,c=[],s=[],f=0;function d(){if(!f&&u){var e=u;u=null,e.resolve()}}function l(){f+=1}function h(){f-=1,d()}var p=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var r,t,o=!1,i=!1,a=!1;l();try{e((function(e){a?n.resolve(e):(o=!0,r=e)}),(function(e){a?n.reject(e):(i=!0,t=e)}))}catch(e){return h(),void this.reject(e)}h(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not reject promise with another promise");if(!e){var r=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===c.indexOf(e)){c.push(e),setTimeout((function(){throw e}),1);for(var r=0;r<s.length;r++)s[r](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,r=this.rejected,t=this.handlers;if(!this.dispatching&&(n||r)){this.dispatching=!0,l();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<t.length;i++){var u=t[i],c=u.onSuccess,s=u.onError,f=u.promise,d=void 0;if(n)try{d=c?c(this.value):this.value}catch(e){f.reject(e);continue}else if(r){if(!s){f.reject(this.error);continue}try{d=s(this.error)}catch(e){f.reject(e);continue}}if(d instanceof e&&(d.resolved||d.rejected)){var p=d;p.resolved?f.resolve(p.value):f.reject(p.error),p.errorHandled=!0}else a(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?f.resolve(d.value):f.reject(d.error):o(d,f):f.resolve(d)}t.length=0,this.dispatching=!1,h()}},n.then=function(n,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:n,onError:r}),this.errorHandled=!0,this.dispatch(),t},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(r){return e.try(n).then((function(){return r}))}),(function(r){return e.try(n).then((function(){throw r}))}))},n.timeout=function(e,n){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(t),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:a(n)?new e((function(e,r){return n.then(e,r)})):(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 r=new e,t=n.length,o=[].slice();if(!t)return r.resolve(o),r;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(t-=1)&&r.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof e){if(c.resolved){o[u]=c.value,t-=1;continue}}else if(!a(c)){o[u]=c,t-=1;continue}i(u,e.resolve(c),r)}return 0===t&&r.resolve(o),r},e.hash=function(n){var r={},t=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];a(o)?t.push(o.then((function(n){r[e]=n}))):r[e]=o}};for(var i in n)o(i);return e.all(t).then((function(){return r}))},e.map=function(n,r){return e.all(n.map(r))},e.onPossiblyUnhandledException=function(e){return function(e){return s.push(e),{cancel:function(){s.splice(s.indexOf(e),1)}}}(e)},e.try=function(n,r,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;l();try{o=n.apply(r,t||[])}catch(n){return h(),e.reject(n)}return h(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||a(n)},e.flush=function(){return n=e,r=u=u||new n,d(),r;var n,r},e}();function w(e){return"[object RegExp]"==={}.toString.call(e)}var m={IFRAME:"iframe",POPUP:"popup"},v="Call was rejected by callee.\r\n";function y(e){return void 0===e&&(e=window),e.location.protocol}function g(e){if(void 0===e&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return y(e)}function b(e){return void 0===e&&(e=window),"about:"===g(e)}function E(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function _(e){if(void 0===e&&(e=window),e&&!E(e))try{return e.opener}catch(e){}}function x(e){try{return!0}catch(e){}return!1}function O(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var r=y(e);if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=E(e);return t&&x()?O(t):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function P(e){void 0===e&&(e=window);var n=O(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function C(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(b(e)&&x())return!0}catch(e){}try{if(function(e){return void 0===e&&(e=window),"mock:"===g(e)}(e)&&x())return!0}catch(e){}try{if(O(e)===O(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(b(e)&&x())return!0;if(P(window)===P(e))return!0}catch(e){}return!1}function S(e){if(!C(e))throw new Error("Expected window to be same domain");return e}function D(e,n){if(!e||!n)return!1;var r=E(n);return r?r===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function T(e){var n,r,t=[];try{n=e.frames}catch(r){n=e}try{r=n.length}catch(e){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=n[o]}catch(e){continue}t.push(i)}return t}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return t}if(!u)return t;t.push(u)}return t}function W(e){for(var n=[],r=0,t=T(e);r<t.length;r++){var o=t[r];n.push(o);for(var i=0,a=W(o);i<a.length;i++)n.push(a[i])}return n}function k(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(E(e)===e)return e;try{if(D(window,e)&&window.top)return window.top}catch(e){}try{if(D(e,window)&&window.top)return window.top}catch(e){}for(var n=0,r=W(e);n<r.length;n++){var t=r[n];try{if(t.top)return t.top}catch(e){}if(E(t)===t)return t}}function N(e){var n=k(e);if(!n)throw new Error("Can not determine top window");var r=[].concat(W(n),[n]);return-1===r.indexOf(e)&&(r=[].concat(r,[e],W(e))),r}var R=[],j=[];function I(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==v}if(n&&C(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var r=function(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}(R,e);if(-1!==r){var t=j[r];if(t&&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 r=e;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!n.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function A(e,n){for(var r=T(e),t=0;t<r.length;t++){var o=r[t];try{if(C(o)&&o.name===n&&-1!==r.indexOf(o))return o}catch(e){}}try{if(-1!==r.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==r.indexOf(e[n]))return e[n]}catch(e){}}function z(e){return void 0===e&&(e=window),_(e=e||window)||E(e)||void 0}function F(e,n){for(var r=0;r<e.length;r++)for(var t=e[r],o=0;o<n.length;o++)if(t===n[o])return!0;return!1}function L(e){void 0===e&&(e=window);for(var n=0,r=e;r;)(r=E(r))&&(n+=1);return n}function M(e,n){var r=k(e)||e,t=k(n)||n;try{if(r&&t)return r===t}catch(e){}var o=N(e),i=N(n);if(F(o,i))return!0;var a=_(r),u=_(t);return a&&F(N(a),i)||u&&F(N(u),o),!1}function U(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(w(n))return!1;if(Array.isArray(n))return!1}return w(e)?w(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!w(n)&&e.some((function(e){return U(e,n)})))}function q(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):P()}function B(e,n,r,t){var o;return void 0===r&&(r=1e3),void 0===t&&(t=1/0),function i(){if(I(e))return o&&clearTimeout(o),n();t<=0?clearTimeout(o):(t-=r,o=setTimeout(i,r))}(),{cancel:function(){o&&clearTimeout(o)}}}function J(e){try{if(e===window)return!0}catch(e){if(e&&e.message===v)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===v)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function H(e){if(C(e))return S(e).frameElement;for(var n=0,r=document.querySelectorAll("iframe");n<r.length;n++){var t=r[n];if(t&&t.contentWindow&&t.contentWindow===e)return t}}function Y(e){if(function(e){return void 0===e&&(e=window),Boolean(E(e))}(e)){var n=H(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}}function V(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}var Z,G=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,r=0;r<n.length;r++){var t=n[r];if(J(t)&&I(t)){if(e)try{e.delete(t)}catch(e){}n.splice(r,1),this.values.splice(r,1),r-=1}}},n.isSafeToReadWrite=function(e){return!J(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=this.name,o=e[t];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,t,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=V(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 r=e[this.name];return r&&r[0]===e?r[1]:void 0}catch(e){}this._cleanupClosedWindows();var t=V(this.keys,e);if(-1!==t)return this.values[t]},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 r=e[this.name];r&&r[0]===e&&(r[0]=r[1]=void 0)}catch(e){}this._cleanupClosedWindows();var t=this.keys,o=V(t,e);-1!==o&&(t.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 r=e[this.name];return!(!r||r[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==V(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var r=n();return this.set(e,r),r},e}();function $(e){return($=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 K(e,n,r){return(K=X()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i}).apply(null,arguments)}function Q(e){var n="function"==typeof Map?new Map:void 0;return(Q=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;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,o)}function o(){return K(e,arguments,$(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t(o,e)})(e)}function ee(e){return e.name||e.__name__||e.displayName||"anonymous"}function ne(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function 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("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function te(){var e="0123456789abcdef";return"uid_"+"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 oe(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(Z=Z||new G,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=Z.get(e);return n||(n=typeof e+":"+te(),Z.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function ie(){return{}}var ae=0,ue=0;function ce(e,n){void 0===n&&(n={});var r,t,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=ae;ae+=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<ue&&(r=null,t=null,u=ae,ae+=1),s=i?(t=t||new G).getOrSet(this,ie):r=r||{};var f=oe(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(),h=e.apply(this,arguments);return s[f]={time:l,value:h},h};return c.reset=function(){r=null,t=null},ne(c,(n.name||ee(e))+"::memoized")}function se(e){var n={};function r(){for(var r=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=oe(i);return n.hasOwnProperty(u)||(n[u]=p.try((function(){return e.apply(t,r)})).finally((function(){delete n[u]}))),n[u]}return r.reset=function(){n={}},ne(r,ee(e)+"::promiseMemoized")}function fe(){}function de(e){var n=!1;return ne((function(){if(!n)return n=!0,e.apply(this,arguments)}),ee(e)+"::once")}function le(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 r=e&&e.stack,t=e&&e.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+le(e,n+1)}}function he(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function pe(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function we(e){return e}function me(e,n){var r;return function t(){r=setTimeout((function(){e(),t()}),n)}(),{cancel:function(){clearTimeout(r)}}}function ve(e){return[].slice.call(e)}function ye(e){return null!=e}function ge(e){return"[object RegExp]"==={}.toString.call(e)}function be(e,n,r){if(e.hasOwnProperty(n))return e[n];var t=r();return e[n]=t,t}function Ee(e){var n,r=[],t=!1,o={set:function(n,r){return t||(e[n]=r,o.register((function(){delete e[n]}))),r},register:function(e){var o=de((function(){return e(n)}));return t?e(n):r.push(o),{cancel:function(){var e=r.indexOf(o);-1!==e&&r.splice(e,1)}}},all:function(e){n=e;var o=[];for(t=!0;r.length;){var i=r.shift();o.push(i())}return p.all(o).then(fe)}};return o}function _e(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}ce.clear=function(){ue=ae},ce((function(e){if(Object.values)return Object.values(e);var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(e[r]);return n}));var xe=function(e){function n(n){var r;return(r=e.call(this,n)||this).name=r.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}(r),r.constructor):r.stack=new Error(n).stack,r}return o(n,e),n}(Q(Error));function Oe(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Pe(){return Boolean(document.body)&&"complete"===document.readyState}function Ce(){return Boolean(document.body)&&"interactive"===document.readyState}function Se(e){return encodeURIComponent(e)}function De(e){return function(n,r,t){void 0===t&&(t=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=oe(t);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var r=0,t=e.split("&");r<t.length;r++){var o=t[r];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}.apply(void 0,t)}(De,0,[e])}function Te(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(r=i({},De(e),n))&&(r={}),Object.keys(r).filter((function(e){return"string"==typeof r[e]||"boolean"==typeof r[e]})).map((function(e){var n=r[e];if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("Invalid type for query");return Se(e)+"="+Se(n.toString())})).join("&")):e;var r}function We(e,n){e.appendChild(n)}function ke(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function Ne(e,n){return void 0===n&&(n=document),ke(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Re(e){return new p((function(n,r){var t=he(e),o=Ne(e);if(o)return n(o);if(Pe())return r(new Error("Document is ready and element "+t+" does not exist"));var i=setInterval((function(){if(o=Ne(e))n(o),clearInterval(i);else if(Pe())return clearInterval(i),r(new Error("Document is ready and element "+t+" does not exist"))}),10)}))}ce((function(){return new p((function(e){if(Pe()||Ce())return e();var n=setInterval((function(){if(Pe()||Ce())return clearInterval(n),e()}),10)}))}));var je,Ie=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),n}(xe);function Ae(e){if((je=je||new G).has(e)){var n=je.get(e);if(n)return n}var r=new p((function(n,r){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<R.length;e++){var n=!1;try{n=R[e].closed}catch(e){}n&&(j.splice(e,1),R.splice(e,1))}}(),e&&e.contentWindow)try{R.push(e.contentWindow),j.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(t){e.contentWindow?n(e):r(t)}))}));return je.set(e,r),r}function ze(e){return Ae(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function Fe(e,n){void 0===e&&(e={});var r=e.style||{},t=function(e,n,r){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var t,o,i,a=document.createElement(e);if(n.style&&pe(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&&(t=a,o=n.styleSheet,void 0===i&&(i=window.document),t.styleSheet?t.styleSheet.cssText=o:t.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");a.innerHTML=n.html}return a}("iframe",{attributes:i({allowTransparency:"true"},e.attributes||{}),style:i({backgroundColor:"transparent",border:"none"},r),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return t.hasAttribute("id")||t.setAttribute("id",te()),Ae(t),n&&function(e,n){void 0===n&&(n=document);var r=Ne(e,n);if(r)return r;throw new Error("Can not find element: "+he(e))}(n).appendChild(t),(e.url||o)&&t.setAttribute("src",e.url||"about:blank"),t}function Le(e,n,r){return e.addEventListener(n,r),{cancel:function(){e.removeEventListener(n,r)}}}function Me(e){e.style.setProperty("display","")}function Ue(e){e.style.setProperty("display","none","important")}function qe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Be(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Je(e,n,r){var t=void 0===r?{}:r,o=t.width,i=void 0===o||o,a=t.height,u=void 0===a||a,c=t.interval,s=void 0===c?100:c,f=t.win,d=void 0===f?window:f,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,m,v=function(){if(!p&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var r=e.offsetWidth,t=e.offsetHeight;(i&&r!==l||u&&t!==h)&&n({width:r,height:t}),l=r,h=t}};return d.addEventListener("resize",v),void 0!==d.ResizeObserver?((w=new d.ResizeObserver(v)).observe(e),m=me(v,10*s)):void 0!==d.MutationObserver?((w=new d.MutationObserver(v)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),m=me(v,10*s)):m=me(v,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",v),m.cancel()}}}function He(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Ye="undefined"!=typeof document?document.currentScript:null,Ve=ce((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),r=n&&n[1];if(!r)return;for(var t=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();t<o.length;t++){var i=o[t];if(i.src&&i.src===r)return i}}catch(e){}}())return Ye;throw new Error("Can not determine current script")})),Ze=te();function Ge(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 $e(e){return"number"==typeof e?Ge(e):"string"==typeof(n=e)&&/^[0-9]+%$/.test(n)?e:Ge(e);var n}function Xe(e){void 0===e&&(e=window);var n="__post_robot_10_0_44__";return e!==window?e[n]:e[n]=e[n]||{}}ce((function(){var e;try{e=Ve()}catch(e){return Ze}var n=e.getAttribute("data-uid");if(n&&"string"==typeof n)return n;if((n=e.getAttribute("data-uid-auto"))&&"string"==typeof n)return n;if(e.src){var r=function(e){for(var n="",r=0;r<e.length;r++){var t=e[r].charCodeAt(0)*r;e[r+1]&&(t+=e[r+1].charCodeAt(0)*(r-1)),n+=String.fromCharCode(97+Math.abs(t)%26)}return n}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+r.slice(r.length-30)}else n=te();return e.setAttribute("data-uid-auto",n),n}));var Ke=function(){return{}};function Qe(e,n){return void 0===e&&(e="store"),void 0===n&&(n=Ke),be(Xe(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,r){return e.hasOwnProperty(n)?e[n]:r},set:function(n,r){return e[n]=r,r},del:function(n){delete e[n]},getOrSet:function(n,r){return be(e,n,r)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var en,nn=function(){};function rn(){var e=Xe();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new nn,e.WINDOW_WILDCARD}function tn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=Ke),Qe("windowStore").getOrSet(e,(function(){var r=new G,t=function(e){return r.getOrSet(e,n)};return{has:function(n){return t(n).hasOwnProperty(e)},get:function(n,r){var o=t(n);return o.hasOwnProperty(e)?o[e]:r},set:function(n,r){return t(n)[e]=r,r},del:function(n){delete t(n)[e]},getOrSet:function(n,r){return be(t(n),e,r)}}}))}function on(){return Qe("instance").getOrSet("instanceID",te)}function an(e,n){var r=n.domain,t=tn("helloPromises"),o=t.get(e);o&&o.resolve({domain:r});var i=p.resolve({domain:r});return t.set(e,i),i}function un(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:on()},{domain:"*",timeout:-1}).then((function(n){var r=n.origin,t=n.data.instanceID;return an(e,{domain:r}),{win:e,domain:r,instanceID:t}}))}function cn(e,n){var r=n.send;return tn("windowInstanceIDPromises").getOrSet(e,(function(){return un(e,{send:r}).then((function(e){return e.instanceID}))}))}function sn(e){tn("knownWindows").set(e,!0)}function fn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function dn(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 ln(e,n){return{__type__:e,__val__:n}}var hn,pn=((en={}).function=function(){},en.error=function(e){return ln("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},en.promise=function(){},en.regex=function(e){return ln("regex",e.source)},en.date=function(e){return ln("date",e.toJSON())},en.array=function(e){return e},en.object=function(e){return e},en.string=function(e){return e},en.number=function(e){return e},en.boolean=function(e){return e},en.null=function(e){return e},en[void 0]=function(e){return ln("undefined",e)},en),wn={},mn=((hn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},hn.error=function(e){var n=e.stack,r=e.code,t=e.data,o=new Error(e.message);return o.code=r,t&&(o.data=t),o.stack=n+"\n\n"+o.stack,o},hn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},hn.regex=function(e){return new RegExp(e)},hn.date=function(e){return new Date(e)},hn.array=function(e){return e},hn.object=function(e){return e},hn.string=function(e){return e},hn.number=function(e){return e},hn.boolean=function(e){return e},hn.null=function(e){return e},hn[void 0]=function(){},hn),vn={};function yn(){for(var e=Qe("idToProxyWindow"),n=0,r=e.keys();n<r.length;n++){var t=r[n];e.get(t).shouldClean()&&e.del(t)}}function gn(e,n){var r=n.send,t=n.id,o=void 0===t?te():t,i=e.then((function(e){if(C(e))return S(e).name})),a=e.then((function(e){if(I(e))throw new Error("Window is closed, can not determine type");return _(e)?m.POPUP:m.IFRAME}));i.catch(fe),a.catch(fe);var u=function(){return e.then((function(e){if(!I(e))return C(e)?S(e).name:i}))};return{id:o,getType:function(){return a},getInstanceID:se((function(){return e.then((function(e){return cn(e,{send:r})}))})),close:function(){return e.then(Y)},getName:u,focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return I(e)}))},setLocation:function(n,r){return void 0===r&&(r={}),e.then((function(e){var t=window.location.protocol+"//"+window.location.host,o=r.method,i=void 0===o?"get":o,a=r.body;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("post"===i)return u().then((function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var n=e.url,r=e.target,t=e.body,o=e.method,i=void 0===o?"post":o,a=document.createElement("form");if(a.setAttribute("target",r),a.setAttribute("method",i),a.setAttribute("action",n),a.style.display="none",t)for(var u=0,c=Object.keys(t);u<c.length;u++){var s,f=c[u],d=document.createElement("input");d.setAttribute("name",f),d.setAttribute("value",null==(s=t[f])?void 0:s.toString()),a.appendChild(d)}Oe().appendChild(a),a.submit(),Oe().removeChild(a)}({url:n,target:e,method:i,body:a})}));if("get"!==i)throw new Error("Unsupported method: "+i);if(C(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 r=C(e),t=H(e);if(!r)throw new Error("Can not set name for cross-domain window: "+n);S(e).name=n,t&&t.setAttribute("name",n),i=p.resolve(n)}))}}}new p((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));var bn=function(){function e(e){var n=e.send,r=e.win,t=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new p,this.serializedWindow=t||gn(this.actualWindowPromise,{send:n}),Qe("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{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,n){var r=this;return this.serializedWindow.setLocation(e,n).then((function(){return r}))},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(),r=this.getName(),t=p.hash({isPopup:n,name:r}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return p.all([t,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var r=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=gn(this.actualWindowPromise,{send:r,id:this.getID()}),tn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var r=this,t=n.send;return p.try((function(){return r.actualWindow?e===r.actualWindow:p.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:cn(e,{send:t})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&r.setWindow(e,{send:t}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&I(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,r){var t=r.send;return yn(),e.toProxyWindow(n,{send:t}).serialize()},e.deserialize=function(n,r){var t=r.send;return yn(),Qe("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:t})},e.isProxyWindow=function(e){return Boolean(e&&!J(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,r){var t=r.send;if(yn(),e.isProxyWindow(n))return n;var o=n;return tn("winToProxyWindow").get(o)||new e({win:o,send:t})},e}();function En(e,n,r,t,o){var i=tn("methodStore"),a=Qe("proxyWindowMethods");bn.isProxyWindow(t)?a.set(e,{val:n,name:r,domain:o,source:t}):(a.del(e),i.getOrSet(t,(function(){return{}}))[e]={domain:o,name:r,val:n,source:t})}function _n(e,n){var r=tn("methodStore"),t=Qe("proxyWindowMethods");return r.getOrSet(e,(function(){return{}}))[n]||t.get(n)}function xn(e,n,r,t,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,Qe("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,r=e.origin,t=e.data,o=t.id,i=t.name,a=_n(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+P(window));var c=a.source,s=a.domain,f=a.val;return p.try((function(){if(!U(s,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(ge(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+P(window));if(bn.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+P(window))}))})).then((function(){return f.apply({source:n,origin:r},t.args)}),(function(e){return p.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=t.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=r.__id__||te();e=bn.unwrap(e);var s=r.__name__||r.name||t;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",t+"::")),bn.isProxyWindow(e)?(En(c,r,s,e,n),e.awaitWindow().then((function(e){En(c,r,s,e,n)}))):En(c,r,s,e,n),ln("cross_domain_function",{id:c,name:s})}function On(e,n,r,t){var o,i=t.on,a=t.send;return function(e,n){void 0===n&&(n=wn);var r=JSON.stringify(e,(function(e){var r=this[e];if(fn(this))return r;var t=dn(r);if(!t)return r;var o=n[t]||pn[t];return o?o(r,e):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(e,n,r,t,o){return ln("cross_domain_zalgo_promise",{then:xn(e,n,(function(e,n){return r.then(e,n)}),t,{on:o.on,send:o.send})})}(e,n,r,t,{on:i,send:a})},o.function=function(r,t){return xn(e,n,r,t,{on:i,send:a})},o.object=function(e){return J(e)||bn.isProxyWindow(e)?ln("cross_domain_window",bn.serialize(e,{send:a})):e},o))}function Pn(e,n,r,t){var o,i=t.send;return function(e,n){if(void 0===n&&(n=vn),"undefined"!==e)return JSON.parse(e,(function(e,r){if(fn(this))return r;var t,o;if(fn(r)?(t=r.__type__,o=r.__val__):(t=dn(r),o=r),!t)return o;var i=n[t]||mn[t];return i?i(o,e):o}))}(r,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,r){return new p(r.then)}(0,0,e)},o.cross_domain_function=function(r){return function(e,n,r,t){var o=r.id,i=r.name,a=t.send,u=function(r){function t(){var u=arguments;return bn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=_n(e,o);if(c&&c.val!==t)return c.val.apply({source:window,origin:P()},u);var s=[].slice.call(u);return r.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===r&&(r={}),t.__name__=i,t.__origin__=n,t.__source__=e,t.__id__=o,t.origin=n,t},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,r,{send:i})},o.cross_domain_window=function(e){return bn.deserialize(e,{send:i})},o))}var Cn={};function Sn(e,n,r,t){var o=t.on,i=t.send;return p.try((function(){var t=tn().getOrSet(e,(function(){return{}}));return t.buffer=t.buffer||[],t.buffer.push(r),t.flush=t.flush||p.flush().then((function(){if(I(e))throw new Error("Window is closed");var r,a=On(e,n,((r={}).__post_robot_10_0_44__=t.buffer||[],r),{on:o,send:i});delete t.buffer;for(var u=Object.keys(Cn),c=[],s=0;s<u.length;s++){var f=u[s];try{Cn[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+". "+le(e)})).join("\n\n"))})),t.flush.then((function(){delete t.flush}))})).then(fe)}function Dn(e){return Qe("responseListeners").get(e)}function Tn(e){Qe("responseListeners").del(e)}function Wn(e){return Qe("erroredResponseListeners").has(e)}function kn(e){var n=e.name,r=e.win,t=e.domain,o=tn("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[r,rn()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(t&&"string"==typeof t){if(s[t])return s[t];if(s.__domain_regex__)for(var f=0,d=s.__domain_regex__;f<d.length;f++){var l=d[f],h=l.listener;if(U(l.regex,t))return h}}if(s["*"])return s["*"]}}}}}function Nn(e,n,r,t){var o=t.on,i=t.send,a=kn({name:r.name,win:e,domain:n}),u="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function c(t,a,c){return p.flush().then((function(){if(!r.fireAndForget&&!I(e))try{return Sn(e,n,{id:te(),origin:P(window),type:"postrobot_message_response",hash:r.hash,name:r.name,ack:t,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+P()+"\n\n"+le(e))}}))}return p.all([p.flush().then((function(){if(!r.fireAndForget&&!I(e))try{return Sn(e,n,{id:te(),origin:P(window),type:"postrobot_message_ack",hash:r.hash,name:r.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+P()+"\n\n"+le(e))}})),p.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!U(a.domain,n))throw new Error("Request origin "+n+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:n,data:r.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(fe).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function Rn(e,n,r){if(!Wn(r.hash)){var t=Dn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!U(t.domain,n))throw new Error("Ack origin "+n+" does not match domain "+t.domain.toString());if(e!==t.win)throw new Error("Ack source does not match registered window")}catch(e){t.promise.reject(e)}t.ack=!0}}function jn(e,n,r){if(!Wn(r.hash)){var t,o=Dn(r.hash);if(!o)throw new Error("No handler found for post message response for message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!U(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(t=o.domain,Array.isArray(t)?"("+t.join(" | ")+")":w(t)?"RegExp("+t.toString()+")":t.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Tn(r.hash),"error"===r.ack?o.promise.reject(r.error):"success"===r.ack&&o.promise.resolve({source:e,origin:n,data:r.data})}}function In(e,n){var r=n.on,t=n.send,o=Qe("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,r,t){var o,i=t.on,a=t.send;try{o=Pn(n,r,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_10_0_44__;if(Array.isArray(u))return u}}(e.data,i,a,{on:r,send:t});if(u){sn(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),I(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?Nn(i,a,s,{on:r,send:t}):"postrobot_message_response"===s.type?jn(i,a,s):"postrobot_message_ack"===s.type&&Rn(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function An(e,n,r){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(r=n,n={}),!r)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=r||n.handler;var t=n.window,o=n.domain,i=function e(n,r){var t=n.name,o=n.win,i=n.domain,a=tn("requestListeners");if(!t||"string"!=typeof t)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:t,domain:i,win:s[c]},r));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:t,win:o,domain:l[d]},r));return{cancel:function(){for(var e=0;e<f.length;e++)f[e].cancel()}}}var h=kn({name:t,win:o,domain:i});if(o&&"*"!==o||(o=rn()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===rn()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===rn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var p,w,m=a.getOrSet(o,(function(){return{}})),v=be(m,t,(function(){return{}})),y=i.toString();return ge(i)?(p=be(v,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:r}):v[y]=r,{cancel:function(){delete v[y],w&&(p.splice(p.indexOf(w,1)),p.length||delete v.__domain_regex__),Object.keys(v).length||delete m[t],o&&!Object.keys(m).length&&a.del(o)}}}({name:e,win:t,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:t,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}Cn.postrobot_post_message=function(e,n,r){0===r.indexOf("file:")&&(r="*"),e.postMessage(n,r)},Cn.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(!C(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==M(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var r=Xe(e);if(!r)throw new Error("Can not find postRobot global on foreign window");r.receiveMessage({source:window,origin:P(),data:n})};var zn=function e(n,r,t,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return p.try((function(){if(function(e,n,r){if(!e)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!ge(r))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(r)+" to be a string, array, or regex");if(I(n))throw new Error("Can not send "+e+". Target window is closed")}(r,n,i),function(e,n){var r=z(n);if(r)return r===e;if(n===e)return!1;if(k(n)===n)return!1;for(var t=0,o=T(e);t<o.length;t++)if(o[t]===n)return!0;return!1}(window,n))return function(e,n,r){void 0===n&&(n=5e3),void 0===r&&(r="Window");var t=function(e){return tn("helloPromises").getOrSet(e,(function(){return new p}))}(e);return-1!==n&&(t=t.timeout(n,new Error(r+" did not load after "+n+"ms"))),t}(n,u)})).then((function(r){return function(e,n,r,t){var o=t.send;return p.try((function(){return"string"==typeof n?n:p.try((function(){return r||un(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!U(n,n))throw new Error("Domain "+he(n)+" does not match "+he(n));return e}))}))}(n,i,(void 0===r?{}:r).domain,{send:e})})).then((function(o){var i=o,u="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,s=new p,f=r+"_"+te();if(!c){var d={name:r,win:n,domain:i,promise:s};!function(e,n){Qe("responseListeners").set(e,n)}(f,d);var l=tn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){Qe("erroredResponseListeners").set(e,!0)}(f),Tn(f)}));var h=function(e){return tn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=a,m=h,v=w,y=me((function(){return I(n)?s.reject(new Error("Window closed for "+r+" before "+(d.ack?"response":"ack"))):d.cancelled?s.reject(new Error("Response listener was cancelled for "+r)):(m=Math.max(m-500,0),-1!==v&&(v=Math.max(v-500,0)),d.ack||0!==m?0===v?s.reject(new Error("No response for postMessage "+u+" in "+P()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+P()+" in "+h+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(fe)}return Sn(n,i,{id:te(),origin:P(window),type:"postrobot_message_request",hash:f,name:r,data:t,fireAndForget:c},{on:An,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+P()+"\n\n"+le(e))}))}))};function Fn(e){return bn.toProxyWindow(e,{send:zn})}function Ln(e){if(!C(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_82__||(e.__zoid_9_0_82__={}),e.__zoid_9_0_82__}function Mn(e,n){try{return n(Ln(e))}catch(e){}}function Un(e){return{get:function(){var n=this;return p.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}function qn(e){return re(JSON.stringify(e))}function Bn(e){var n=Ln(e);return n.references=n.references||{},n.references}function Jn(e){var n,r,t=e.data,o=e.metaData,i=e.sender,a=e.receiver,u=e.passByReference,c=void 0!==u&&u,s=e.basic,f=void 0!==s&&s,d=Fn(a.win),l=f?JSON.stringify(t):On(d,a.domain,t,{on:An,send:zn}),h=c?(n=l,r=te(),Bn(window)[r]=n,{type:"uid",uid:r}):{type:"raw",val:l};return{serializedData:qn({sender:{domain:i.domain},metaData:o,reference:h}),cleanReference:function(){var e,n;e=window,"uid"===(n=h).type&&delete Bn(e)[n.uid]}}}function Hn(e){var n,r,t=e.sender,o=e.basic,i=void 0!==o&&o,a=function(e){return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(e))}(e.data),u=a.reference,c=a.metaData;n="function"==typeof t.win?t.win({metaData:c}):t.win,r="function"==typeof t.domain?t.domain({metaData:c}):"string"==typeof t.domain?t.domain:a.sender.domain;var s=function(e,n){if("raw"===n.type)return n.val;if("uid"===n.type)return Bn(e)[n.uid];throw new Error("Unsupported ref type: "+n.type)}(n,u);return{data:i?JSON.parse(s):function(e,n,r){return Pn(e,n,r,{on:An,send:zn})}(n,r,s),metaData:c,sender:{win:n,domain:r},reference:u}}var Yn={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},Vn={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},Zn=m,Gn={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 $n(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function Xn(e){if(!e)throw new Error("No window name");var n=e.split("__"),r=n[1],t=n[2],o=n[3];if("zoid"!==r)throw new Error("Window not rendered by zoid - got "+r);if(!t)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:t,serializedInitialPayload:o}}var Kn=ce((function(e){var n=Hn({data:Xn(e).serializedInitialPayload,sender:{win:function(e){return function(e){if("opener"===e.type)return _e("opener",_(window));if("parent"===e.type&&"number"==typeof e.distance)return _e("parent",(n=window,void 0===(r=e.distance)&&(r=1),function(e,n){void 0===n&&(n=1);for(var r=e,t=0;t<n;t++){if(!r)return;r=E(r)}return r}(n,L(n)-r)));var n,r;if("global"===e.type&&e.uid&&"string"==typeof e.uid){var t=function(){var n=e.uid,r=z(window);if(!r)throw new Error("Can not find ancestor window");for(var t=0,o=N(r);t<o.length;t++){var i=o[t];if(C(i)){var a=Mn(i,(function(e){return e.windows&&e.windows[n]}));if(a)return{v:a}}}}();if("object"==typeof t)return t.v}else if("name"===e.type){var o=e.name;return _e("namedWindow",function(e,n){return A(e,n)||function e(n,r){var t=A(n,r);if(t)return t;for(var o=0,i=T(n);o<i.length;o++){var a=e(i[o],r);if(a)return a}}(k(e)||e,n)}(_e("ancestor",z(window)),o))}throw new Error("Unable to find "+e.type+" parent component window")}(e.metaData.windowRef)}}});return{parent:n.sender,payload:n.data,reference:n.reference}}));function Qn(){return Kn(window.name)}function er(e,n){if(void 0===n&&(n=window),e===E(n))return{type:"parent",distance:L(e)};if(e===_(n))return{type:"opener"};if(C(e)&&(t=e)!==k(t)){var r=S(e).name;if(r)return{type:"name",name:r}}var t}function nr(e,n,r,t,o){if(!e.hasOwnProperty(r))return t;var i=e[r];return"function"==typeof i.childDecorate?i.childDecorate({value:t,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):t}function rr(){return p.try((function(){window.focus()}))}function tr(){return p.try((function(){window.close()}))}var or=function(){return fe},ir=function(e){return de(e.value)};function ar(e,n,r){for(var t=0,o=Object.keys(e);t<o.length;t++){var i=o[t],a=n[i];a&&r(i,a,e[i])}}function ur(e,n,r){var t={};return p.all(function(e,n,o){var i=[];return ar(e,n,(function(e,n,o){var a=function(e,n,o){return p.resolve().then((function(){var i,a;if(null!=o){var u=(i={},i.get=n.queryParam,i.post=n.bodyParam,i)[r],c=(a={},a.get=n.queryValue,a.post=n.bodyValue,a)[r];if(u)return p.hash({finalParam:p.try((function(){return"function"==typeof u?u({value:o}):"string"==typeof u?u:e})),finalValue:p.try((function(){return"function"==typeof c&&ye(o)?c({value:o}):o}))}).then((function(r){var o,i=r.finalParam,a=r.finalValue;if("boolean"==typeof a)o=a.toString();else if("string"==typeof a)o=a.toString();else if("object"==typeof a&&null!==a){if(n.serialization===Vn.JSON)o=JSON.stringify(a);else if(n.serialization===Vn.BASE64)o=re(JSON.stringify(a));else if(n.serialization===Vn.DOTIFY||!n.serialization){o=function e(n,r,t){for(var o in void 0===r&&(r=""),void 0===t&&(t={}),r=r?r+".":r,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}))?t[""+r+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?t=e(n[o],""+r+o,t):t[""+r+o]=n[o].toString());return t}(a,e);for(var u=0,c=Object.keys(o);u<c.length;u++){var s=c[u];t[s]=o[s]}return}}else"number"==typeof a&&(o=a.toString());t[i]=o}))}}))}(e,n,o);i.push(a)})),i}(n,e)).then((function(){return t}))}function cr(e){var n,r,t,o,a,u,c,s=e.uid,f=e.options,d=e.overrides,l=void 0===d?{}:d,h=e.parentWin,w=void 0===h?window:h,m=f.propsDef,v=f.containerTemplate,y=f.prerenderTemplate,g=f.tag,b=f.name,E=f.attributes,_=f.dimensions,x=f.autoResize,O=f.url,D=f.domain,T=f.exports,W=new p,k=[],N=Ee(),R={},j={visible:!0},A=l.event?l.event:(n={},r={},t={on:function(e,n){var t=r[e]=r[e]||[];t.push(n);var o=!1;return{cancel:function(){o||(o=!0,t.splice(t.indexOf(n),1))}}},once:function(e,n){var r=t.on(e,(function(){r.cancel(),n()}));return r},trigger:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];var i=r[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(p.try((function(){return n.apply(void 0,t)})))},c=0;c<i.length;c++)u(c);return p.all(a).then(fe)},triggerOnce:function(e){if(n[e])return p.resolve();n[e]=!0;for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.trigger.apply(t,[e].concat(o))},reset:function(){r={}}}),F=l.props?l.props:{},J=l.onError,H=l.getProxyContainer,Y=l.show,V=l.hide,Z=l.close,G=l.renderContainer,$=l.getProxyWindow,X=l.setProxyWin,K=l.openFrame,Q=l.openPrerenderFrame,ee=l.prerender,ne=l.open,re=l.openPrerender,oe=l.watchForUnload,ie=l.getInternalState,ae=l.setInternalState,ue=function(){return p.try((function(){return l.resolveInitPromise?l.resolveInitPromise():W.resolve()}))},se=function(e){return p.try((function(){return l.rejectInitPromise?l.rejectInitPromise(e):W.reject(e)}))},he=function(e){for(var n={},r=0,t=Object.keys(F);r<t.length;r++){var o=t[r],i=m[o];i&&!1===i.sendToChild||i&&i.sameDomain&&!U(e,P(window))||(n[o]=F[o])}return p.hash(n)},we=function(){return p.try((function(){return ie?ie():j}))},ge=function(e){return p.try((function(){return ae?ae(e):j=i({},j,e)}))},be=function(){return $?$():p.try((function(){var e=F.window;if(e){var n=Fn(e);return N.register((function(){return e.close()})),n}return new bn({send:zn})}))},_e=function(e){return H?H(e):p.try((function(){return Re(e)})).then((function(e){return He(e)&&(e=function e(n){var r=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(He(e))return e}(e);if(n&&n.host)return n.host}(n);if(!r)throw new Error("Element is not in shadow dom");var t="shadow-slot-"+te(),o=document.createElement("slot");o.setAttribute("name",t),n.appendChild(o);var i=document.createElement("div");return i.setAttribute("slot",t),r.appendChild(i),He(r)?e(i):i}(e)),Un(e)}))},xe=function(e){return X?X(e):p.try((function(){o=e}))},Oe=function(){return Y?Y():p.hash({setState:ge({visible:!0}),showElement:a?a.get().then(Me):null}).then(fe)},Pe=function(){return V?V():p.hash({setState:ge({visible:!1}),showElement:a?a.get().then(Ue):null}).then(fe)},Ce=function(){return"function"==typeof O?O({props:F}):O},Se=function(){return"function"==typeof E?E({props:F}):E},De=function(){return q(Ce())},ke=function(e,n){var r=n.windowName;return K?K(e,{windowName:r}):p.try((function(){if(e===Zn.IFRAME)return Un(Fe({attributes:i({name:r,title:b},Se().iframe)}))}))},je=function(e){return Q?Q(e):p.try((function(){if(e===Zn.IFRAME)return Un(Fe({attributes:i({name:"__zoid_prerender_frame__"+b+"_"+te()+"__",title:"prerender__"+b},Se().iframe)}))}))},Ie=function(e,n,r){return re?re(e,n,r):p.try((function(){if(e===Zn.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return N.register((function(){return qe(e)})),ze(e).then((function(e){return S(e)})).then((function(e){return Fn(e)}))}))}throw new Error("No render context available for "+e)}))},Ae=function(){return p.try((function(){if(o)return p.all([A.trigger(Gn.FOCUS),o.focus()]).then(fe)}))},Ye=function(){var e=Ln(window);return e.windows=e.windows||{},e.windows[s]=window,N.register((function(){delete e.windows[s]})),s},Ve=function(e,n,r,t){if(n===P(window))return{type:"global",uid:Ye()};if(e!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(F.window){var o=t.getWindow();if(!o)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(z(o)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(r===Zn.POPUP)return{type:"opener"};if(r===Zn.IFRAME)return{type:"parent",distance:L(window)};throw new Error("Can not construct window reference for child")},Ze=function(e,n){return p.try((function(){c=e,u=n,ue(),N.register((function(){return n.close.fireAndForget().catch(fe)}))}))},Ge=function(e){var n=e.width,r=e.height;return p.try((function(){A.trigger(Gn.RESIZE,{width:n,height:r})}))},$e=function(e){return p.try((function(){return A.trigger(Gn.DESTROY)})).catch(fe).then((function(){return N.all(e)})).then((function(){W.asyncReject(e||new Error("Component destroyed"))}))},Xe=ce((function(e){return p.try((function(){if(Z){if(I(Z.__source__))return;return Z()}return p.try((function(){return A.trigger(Gn.CLOSE)})).then((function(){return $e(e||new Error("Component closed"))}))}))})),Ke=function(e,n){var r=n.proxyWin,t=n.proxyFrame,o=n.windowName;return ne?ne(e,{proxyWin:r,proxyFrame:t,windowName:o}):p.try((function(){if(e===Zn.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return ze(e).then((function(n){return N.register((function(){return qe(e)})),N.register((function(){return function(e){for(var n=0,r=tn("requestPromises").get(e,[]);n<r.length;n++)r[n].reject(new Error("Window "+(I(e)?"closed":"cleaned up")+" before response")).catch(fe)}(n)})),n}))}))}throw new Error("No render context available for "+e)})).then((function(e){return r.setWindow(e,{send:zn}),r.setName(o).then((function(){return r}))}))},Qe=function(){return p.try((function(){var e=Le(window,"unload",de((function(){$e(new Error("Window navigated away"))}))),n=B(w,$e,3e3);if(N.register(n.cancel),N.register(e.cancel),oe)return oe()}))},en=function(e){var n=!1;return e.isClosed().then((function(r){return r?(n=!0,Xe(new Error("Detected component window close"))):p.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,Xe(new Error("Detected component window close"))}))})).then((function(){return n}))},nn=function(e){return J?J(e):p.try((function(){if(-1===k.indexOf(e))return k.push(e),W.asyncReject(e),A.trigger(Gn.ERROR,e)}))},rn=new p,on=function(e){return p.try((function(){rn.resolve(e)}))};Ze.onError=nn;var an=function(e,n){return e({uid:s,container:n.container,context:n.context,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:Ae,close:Xe,state:R,props:F,tag:g,dimensions:"function"==typeof _?_({props:F}):_,event:A})},un=function(e,n){var r=n.context;return ee?ee(e,{context:r}):p.try((function(){if(y){var n=e.getWindow();if(n&&C(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var t=(n=S(n)).document,o=an(y,{context:r,doc:t});if(o){if(o.ownerDocument!==t)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var r=n.tagName.toLowerCase();if("html"!==r)throw new Error("Expected element to be html, got "+r);for(var t=e.document.documentElement,o=0,i=ve(t.children);o<i.length;o++)t.removeChild(i[o]);for(var a=0,u=ve(n.children);a<u.length;a++)t.appendChild(u[a])}(n,o);var i=x.width,a=void 0!==i&&i,u=x.height,c=void 0!==u&&u,s=x.element,f=void 0===s?"body":s;if((f=Ne(f,t))&&(a||c)){var d=Je(f,(function(e){Ge({width:a?e.width:void 0,height:c?e.height:void 0})}),{width:a,height:c,win:n});A.on(Gn.RENDERED,d.cancel)}}}}}))},cn=function(e,n){var r=n.proxyFrame,t=n.proxyPrerenderFrame,o=n.context,i=n.rerender;return G?G(e,{proxyFrame:r,proxyPrerenderFrame:t,context:o,rerender:i}):p.hash({container:e.get(),frame:r?r.get():null,prerenderFrame:t?t.get():null,internalState:we()}).then((function(e){var n=e.container,r=e.internalState.visible,t=an(v,{context:o,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(t){r||Ue(t),We(n,t);var u=function(e,n){n=de(n);var r,t,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();r&&r.cancel(),o&&o.removeEventListener("unload",c),t&&qe(t)},c=function(){i||(n(),u())};if(Be(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var f=new window.MutationObserver((function(){Be(e)&&c()}));f.observe(s,{childList:!0}),a.push(f),s=s.parentElement}return(t=document.createElement("iframe")).setAttribute("name","__detect_close_"+te()+"__"),t.style.display="none",ze(t).then((function(e){(o=S(e)).addEventListener("unload",c)})),e.appendChild(t),r=me((function(){Be(e)&&c()}),1e3),{cancel:u}}(t,(function(){var e=new Error("Detected container element removed from DOM");return p.delay(1).then((function(){if(!Be(t))return N.all(e),i().then(ue,se);Xe(e)}))}));return N.register((function(){return u.cancel()})),N.register((function(){return qe(t)})),a=Un(t)}}))},sn=function(){return{state:R,event:A,close:Xe,focus:Ae,resize:Ge,onError:nn,updateProps:dn,show:Oe,hide:Pe}},fn=function(e,n){void 0===n&&(n=!1);var r=sn();!function(e,n,r,t,o){void 0===o&&(o=!1),pe(n,r=r||{});for(var i=o?[]:[].concat(Object.keys(e)),a=0,u=Object.keys(r);a<u.length;a++){var c=u[a];-1===i.indexOf(c)&&i.push(c)}for(var s=[],f=t.state,d=t.close,l=t.focus,h=t.event,p=t.onError,w=0;w<i.length;w++){var m=i[w],v=e[m],y=r[m];if(v){var g=v.alias;if(g&&(!ye(y)&&ye(r[g])&&(y=r[g]),s.push(g)),v.value&&(y=v.value({props:n,state:f,close:d,focus:l,event:h,onError:p})),!ye(y)&&v.default&&(y=v.default({props:n,state:f,close:d,focus:l,event:h,onError:p})),ye(y)&&("array"===v.type?!Array.isArray(y):typeof y!==v.type))throw new TypeError("Prop is not of type "+v.type+": "+m);n[m]=y}}for(var b=0;b<s.length;b++)delete n[s[b]];ar(n,e,(function(e,r,t){if(r&&ye(t)&&r.decorate){var o=r.decorate({value:t,props:n,state:f,close:d,focus:l,event:h,onError:p});n[e]=o}}));for(var E=0,_=Object.keys(e);E<_.length;E++){var x=_[E];if(!1!==e[x].required&&!ye(n[x]))throw new Error('Expected prop "'+x+'" to be defined')}}(m,F,e,r,n)},dn=function(e){return fn(e,!0),W.then((function(){var e=u,n=o;if(e&&n&&c)return he(c).then((function(r){return e.updateProps(r).catch((function(e){return en(n).then((function(n){if(!n)throw e}))}))}))}))};return{init:function(){A.on(Gn.RENDER,(function(){return F.onRender()})),A.on(Gn.DISPLAY,(function(){return F.onDisplay()})),A.on(Gn.RENDERED,(function(){return F.onRendered()})),A.on(Gn.CLOSE,(function(){return F.onClose()})),A.on(Gn.DESTROY,(function(){return F.onDestroy()})),A.on(Gn.RESIZE,(function(){return F.onResize()})),A.on(Gn.FOCUS,(function(){return F.onFocus()})),A.on(Gn.PROPS,(function(e){return F.onProps(e)})),A.on(Gn.ERROR,(function(e){return F&&F.onError?F.onError(e):se(e).then((function(){setTimeout((function(){throw e}),1)}))})),N.register(A.reset)},render:function(e){var n=e.target,r=e.container,t=e.context,i=e.rerender;return p.try((function(){var e=De(),a=D||De();!function(e,n,r){if(e!==window){if(!M(window,e))throw new Error("Can only renderTo an adjacent frame");var t=P();if(!U(n,t)&&!C(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+t);if(r&&"string"!=typeof r)throw new Error("Container passed to renderTo must be a string selector, got "+typeof r+" }")}}(n,a,r);var u=p.try((function(){if(n!==window)return function(e,n){for(var r={},t=0,o=Object.keys(F);t<o.length;t++){var i=o[t],a=m[i];a&&a.allowDelegate&&(r[i]=F[i])}var u=zn(n,"zoid_delegate_"+b,{uid:s,overrides:{props:r,event:A,close:Xe,onError:nn,getInternalState:we,setInternalState:ge,resolveInitPromise:ue,rejectInitPromise:se}}).then((function(e){var r=e.data.parent;return N.register((function(e){if(!I(n))return r.destroy(e)})),r.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+le(e))}));return H=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.getProxyContainer.apply(e,n)}))},G=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.renderContainer.apply(e,n)}))},Y=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.show.apply(e,n)}))},V=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.hide.apply(e,n)}))},oe=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.watchForUnload.apply(e,n)}))},e===Zn.IFRAME&&($=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.getProxyWindow.apply(e,n)}))},K=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openFrame.apply(e,n)}))},Q=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},ee=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.prerender.apply(e,n)}))},ne=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.open.apply(e,n)}))},re=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openPrerender.apply(e,n)}))}),u}(t,n)})),c=F.window,d=Qe(),l=ur(m,F,"get").then((function(e){return function(e,n){var r,t,o=n.query||{},i=n.hash||{},a=e.split("#");t=a[1];var u=(r=a[0]).split("?");r=u[0];var c=Te(u[1],o),s=Te(t,i);return c&&(r=r+"?"+c),s&&(r=r+"#"+s),r}(function(e){if(0!==q(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}(Ce()),{query:e})})),h=ur(m,F,"post"),w=A.trigger(Gn.RENDER),v=_e(r),y=be(),E=y.then((function(r){return function(e){var n=void 0===e?{}:e,r=n.proxyWin,t=n.initialChildDomain,o=n.childDomainMatch,i=n.target,a=void 0===i?window:i,u=n.context;return function(e){var n=void 0===e?{}:e,r=n.proxyWin,t=n.childDomainMatch,o=n.context;return he(n.initialChildDomain).then((function(e){return{uid:s,context:o,tag:g,childDomainMatch:t,version:"9_0_82",props:e,exports:(n=r,{init:function(e){return Ze(this.origin,e)},close:Xe,checkClose:function(){return en(n)},resize:Ge,onError:nn,show:Oe,hide:Pe,export:on})};var n}))}({proxyWin:r,initialChildDomain:t,childDomainMatch:o,context:u}).then((function(e){var n=Jn({data:e,metaData:{windowRef:Ve(a,t,u,r)},sender:{domain:P(window)},receiver:{win:r,domain:o},passByReference:t===P()}),i=n.serializedData;return N.register(n.cleanReference),i}))}({proxyWin:(o={proxyWin:r,initialChildDomain:e,childDomainMatch:a,target:n,context:t}).proxyWin,initialChildDomain:o.initialChildDomain,childDomainMatch:o.childDomainMatch,target:o.target,context:o.context}).then((function(e){return $n({name:b,serializedPayload:e})}));var o})),_=E.then((function(e){return ke(t,{windowName:e})})),x=je(t),O=p.hash({proxyContainer:v,proxyFrame:_,proxyPrerenderFrame:x}).then((function(e){return cn(e.proxyContainer,{context:t,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame,rerender:i})})).then((function(e){return e})),S=p.hash({windowName:E,proxyFrame:_,proxyWin:y}).then((function(e){var n=e.proxyWin;return c?n:Ke(t,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),T=p.hash({proxyWin:S,proxyPrerenderFrame:x}).then((function(e){return Ie(t,e.proxyWin,e.proxyPrerenderFrame)})),k=S.then((function(e){return o=e,xe(e)})),R=p.hash({proxyPrerenderWin:T,state:k}).then((function(e){return un(e.proxyPrerenderWin,{context:t})})),j=p.hash({proxyWin:S,windowName:E}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),z=p.hash({body:h}).then((function(e){return f.method?f.method:Object.keys(e.body).length?"post":"get"})),L=p.hash({proxyWin:S,windowUrl:l,body:h,method:z,windowName:j,prerender:R}).then((function(e){return e.proxyWin.setLocation(e.windowUrl,{method:e.method,body:e.body})})),B=S.then((function(e){!function e(n,r){var t=!1;return N.register((function(){t=!0})),p.delay(2e3).then((function(){return n.isClosed()})).then((function(o){if(!t)return o?Xe(new Error("Detected "+r+" close")):e(n,r)}))}(e,t)})),J=p.hash({container:O,prerender:R}).then((function(){return A.trigger(Gn.DISPLAY)})),Z=S.then((function(e){})),X=L.then((function(){return p.try((function(){var e=F.timeout;if(e)return W.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),te=W.then((function(){return A.trigger(Gn.RENDERED)}));return p.hash({initPromise:W,buildUrlPromise:l,onRenderPromise:w,getProxyContainerPromise:v,openFramePromise:_,openPrerenderFramePromise:x,renderContainerPromise:O,openPromise:S,openPrerenderPromise:T,setStatePromise:k,prerenderPromise:R,loadUrlPromise:L,buildWindowNamePromise:E,setWindowNamePromise:j,watchForClosePromise:B,onDisplayPromise:J,openBridgePromise:Z,runTimeoutPromise:X,onRenderedPromise:te,delegatePromise:u,watchForUnloadPromise:d})})).catch((function(e){return p.all([nn(e),$e(e)]).then((function(){throw e}),(function(){throw e}))})).then(fe)},destroy:$e,getProps:function(){return F},setProps:fn,export:on,getHelpers:sn,getDelegateOverrides:function(){return p.try((function(){return{getProxyContainer:_e,show:Oe,hide:Pe,renderContainer:cn,getProxyWindow:be,watchForUnload:Qe,openFrame:ke,openPrerenderFrame:je,prerender:un,open:Ke,openPrerender:Ie,setProxyWin:xe}}))},getExports:function(){return T({getExports:function(){return rn}})}}}function sr(e){var n=e.uid,r=e.frame,t=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,c=u.width,s=u.height;if(r&&t){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(r),f.appendChild(t),f.appendChild(d),t.classList.add("zoid-visible"),r.classList.add("zoid-invisible"),a.on(Gn.RENDERED,(function(){t.classList.remove("zoid-visible"),t.classList.add("zoid-invisible"),r.classList.remove("zoid-invisible"),r.classList.add("zoid-visible"),setTimeout((function(){qe(t)}),1)})),a.on(Gn.RESIZE,(function(e){var n=e.width,r=e.height;"number"==typeof n&&(f.style.width=$e(n)),"number"==typeof r&&(f.style.height=$e(r))})),f}}var fr=Ee(),dr=Ee();function lr(e){var n,r,t=function(e){var n=e.tag,r=e.url,t=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?Zn.IFRAME:m,y=e.containerTemplate,g=void 0===y?sr:y,b=e.prerenderTemplate,E=void 0===b?null:b,_=e.validate,x=e.eligible,O=void 0===x?function(){return{eligible:!0}}:x,P=e.logger,S=void 0===P?{info:fe}:P,D=e.exports,T=void 0===D?fe:D,W=e.method,k=e.children,N=void 0===k?function(){return{}}:k,R=n.replace(/-/g,"_"),j=i({},{window:{type:Yn.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!J(n)&&!bn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(J(n)){if(I(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return Fn(e.value)}},timeout:{type:Yn.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:Yn.STRING,required:!1},onDisplay:{type:Yn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:or,decorate:ir},onRendered:{type:Yn.FUNCTION,required:!1,sendToChild:!1,default:or,decorate:ir},onRender:{type:Yn.FUNCTION,required:!1,sendToChild:!1,default:or,decorate:ir},onClose:{type:Yn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:or,decorate:ir},onDestroy:{type:Yn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:or,decorate:ir},onResize:{type:Yn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:or},onFocus:{type:Yn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:or},close:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:Yn.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:Yn.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:Yn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:R,tag:n,url:r,domain:t,bridgeUrl:o,method:W,propsDef:j,dimensions:s,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:O,children:N,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,r={},t=function(e,t){var o=t[e],i=T[o].type,a=n().then((function(e){return e[o]}));r[o]=i===Yn.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return a.then((function(e){return e.apply(void 0,n)}))}:a},o=0,i=Object.keys(T);o<i.length;o++)t(o,i);return r}}}(e),o=t.name,a=t.tag,u=t.defaultContext,c=t.eligible,s=t.children,f=Ln(window),d=[],l=function(){if(function(e){try{return Xn(window.name).name===e}catch(e){}return!1}(o)){var e=Qn().payload;if(e.tag===a&&U(e.childDomainMatch,P()))return!0}return!1},h=ce((function(){if(l()){if(window.xprops)throw delete f.components[a],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,r=e.tag,t=e.propsDef,o=e.autoResize,i=e.allowedParentDomains,a=[],u=Qn(),c=u.parent,s=u.payload,f=c.win,d=c.domain,l=new p,h=s.version,w=s.uid,m=s.exports,v=s.context,y=s.props;if("9_0_82"!==h)throw new Error("Parent window has zoid version "+h+", child window has version 9_0_82");var g=m.show,b=m.hide,E=m.close,_=m.onError,x=m.checkClose,O=m.export,D=m.resize,T=m.init,W=function(){return f},k=function(){return d},R=function(e){a.push(e)},j=function(e){return D.fireAndForget({width:e.width,height:e.height})},I=function(e){return l.resolve(e),O(e)},A=function(e){var t=(void 0===e?{}:e).anyParent,o=[],i=n.parent;if(void 0===t&&(t=!i),!t&&!i)throw new Error("No parent found for "+r+" child");for(var a=0,u=N(window);a<u.length;a++){var c=u[a];if(C(c)){var s=S(c).xprops;if(s&&W()===s.getParent()){var f=s.parent;if(t||!i||f&&f.uid===i.uid){var d=Mn(c,(function(e){return e.exports}));o.push({props:s,exports:d})}}}}return o},z=function(e,o,i){void 0===i&&(i=!1);var u=function(e,n,r,t,o,i){void 0===i&&(i=!1);for(var a={},u=0,c=Object.keys(r);u<c.length;u++){var s=c[u],f=n[s];if(!f||!f.sameDomain||t===P(window)&&C(e)){var d=nr(n,0,s,r[s],o);a[s]=d,f&&f.alias&&!a[f.alias]&&(a[f.alias]=d)}}if(!i)for(var l=0,h=Object.keys(n);l<h.length;l++){var p=h[l];r.hasOwnProperty(p)||(a[p]=nr(n,0,p,void 0,o))}return a}(f,t,e,o,{tag:r,show:g,hide:b,close:E,focus:rr,onError:_,resize:j,getSiblings:A,onProps:R,getParent:W,getParentDomain:k,uid:w,export:I},i);n?pe(n,u):n=u;for(var c=0;c<a.length;c++)(0,a[c])(n)},F=function(e){return p.try((function(){return z(e,d,!0)}))};return{init:function(){return p.try((function(){return C(f)&&function(e){var n=e.componentName,r=e.parentComponentWindow,t=Hn({data:Xn(window.name).serializedInitialPayload,sender:{win:r},basic:!0}),o=t.sender;if("uid"===t.reference.type||"global"===t.metaData.windowRef.type){var i=Jn({data:t.data,metaData:{windowRef:er(r)},sender:{domain:o.domain},receiver:{win:window,domain:P()},basic:!0});window.name=$n({name:n,serializedPayload:i.serializedData})}}({componentName:e.name,parentComponentWindow:f}),Ln(window).exports=e.exports({getExports:function(){return l}}),function(e,n){if(!U(e,n))throw new Error("Can not be rendered by domain: "+n)}(i,d),sn(f),window.addEventListener("beforeunload",(function(){x.fireAndForget()})),window.addEventListener("unload",(function(){x.fireAndForget()})),B(f,(function(){tr()})),T({updateProps:F,close:tr})})).then((function(){return(e=o.width,n=void 0!==e&&e,r=o.height,t=void 0!==r&&r,i=o.element,Re(void 0===i?"body":i).catch(fe).then((function(e){return{width:n,height:t,element:e}}))).then((function(e){var n=e.width,r=e.height,t=e.element;t&&(n||r)&&v!==Zn.POPUP&&Je(t,(function(e){j({width:n?e.width:void 0,height:r?e.height:void 0})}),{width:n,height:r})}));var e,n,r,t,i})).catch((function(e){_(e)}))},getProps:function(){return n||(z(y,d),n)}}}(t);return e.init(),e}}));if(h(),n=An("zoid_allow_delegate_"+o,(function(){return!0})),r=An("zoid_delegate_"+o,(function(e){var n=e.data;return{parent:cr({uid:n.uid,options:t,overrides:n.overrides,parentWin:e.source})}})),dr.register(n.cancel),dr.register(r.cancel),f.components=f.components||{},f.components[a])throw new Error("Can not register multiple components with the same tag: "+a);return f.components[a]=!0,{init:function e(n){var r,f="zoid-"+a+"-"+te(),l=n||{},h=c({props:l}),w=h.eligible,m=h.reason,v=l.onDestroy;l.onDestroy=function(){if(r&&w&&d.splice(d.indexOf(r),1),v)return v.apply(void 0,arguments)};var y=cr({uid:f,options:t});y.init(),w?y.setProps(l):l.onDestroy&&l.onDestroy(),fr.register((function(e){return y.destroy(e||new Error("zoid destroyed all components"))}));var g=function(n){var r=(void 0===n?{}:n).decorate;return e((void 0===r?we:r)(l))},b=function(e,n,t){return p.try((function(){if(!w){var n=new Error(m||o+" component is not eligible");return y.destroy(n).then((function(){throw n}))}if(!J(e))throw new Error("Must pass window to renderTo");return function(e,n){return p.try((function(){if(e.window)return Fn(e.window).getType();if(n){if(n!==Zn.IFRAME&&n!==Zn.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(l,t)})).then((function(o){if(n=function(e,n){if(n){if("string"!=typeof n&&!ke(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===Zn.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(o,n),e!==window&&"string"!=typeof n)throw new Error("Must pass string element when rendering to another window");return y.render({target:e,container:n,context:o,rerender:function(){var o=g();return pe(r,o),o.renderTo(e,n,t)}})})).catch((function(e){return y.destroy(e).then((function(){throw e}))}))};return r=i({},y.getExports(),y.getHelpers(),function(){for(var e=s(),n={},r=function(r,t){var o=t[r],a=e[o];n[o]=function(e){var n=y.getProps(),r=i({},e,{parent:{uid:f,props:n,export:y.export}});return a(r)}},t=0,o=Object.keys(e);t<o.length;t++)r(t,o);return n}(),{isEligible:function(){return w},clone:g,render:function(e,n){return b(window,e,n)},renderTo:function(e,n,r){return b(e,n,r)}}),w&&d.push(r),r},instances:d,driver:function(e,n){throw new Error("Driver support not enabled")},isChild:l,canRenderTo:function(e){return zn(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:h}}var hr=function(e){var n,r,t,o;Xe().initialized||(Xe().initialized=!0,r=(n={on:An,send:zn}).on,t=n.send,(o=Xe()).receiveMessage=o.receiveMessage||function(e){return In(e,{on:r,send:t})},function(e){var n=e.on,r=e.send;Qe().getOrSet("postMessageListener",(function(){return Le(window,"message",(function(e){!function(e,n){var r=n.on,t=n.send;p.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");In({source:n,origin:o,data:i},{on:r,send:t})}}))}(e,{on:n,send:r})}))}))}({on:An,send:zn}),function(e){var n=e.on,r=e.send;Qe("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return an(e.source,{domain:e.origin}),{instanceID:on()}})),t=z();return t&&un(t,{send:r}).catch((function(e){})),e}))}({on:An,send:zn}));var i=lr(e),a=function(e){return i.init(e)};a.driver=function(e,n){return i.driver(e,n)},a.isChild=function(){return i.isChild()},a.canRenderTo=function(e){return i.canRenderTo(e)},a.instances=i.instances;var u=i.registerChild();return u&&(window.xprops=a.xprops=u.getProps()),a};function pr(e){var n=fr.all(e);return fr=Ee(),n}var wr=pr;function mr(e){var n;return wr(),delete window.__zoid_9_0_82__,function(){for(var e=Qe("responseListeners"),n=0,r=e.keys();n<r.length;n++){var t=r[n],o=e.get(t);o&&(o.cancelled=!0),e.del(t)}}(),(n=Qe().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_44__,dr.all(e)}}])},548:function(e){"undefined"!=typeof self&&self,e.exports=function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return{}.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}([function(e,n,r){"use strict";function t(e,n){return(t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,t(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function a(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var r=n.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}r.r(n),r.d(n,"PopupOpenError",(function(){return Fe})),r.d(n,"create",(function(){return Ar})),r.d(n,"destroy",(function(){return Lr})),r.d(n,"destroyComponents",(function(){return zr})),r.d(n,"destroyAll",(function(){return Fr})),r.d(n,"PROP_TYPE",(function(){return pr})),r.d(n,"PROP_SERIALIZATION",(function(){return wr})),r.d(n,"CONTEXT",(function(){return mr})),r.d(n,"EVENT",(function(){return vr}));var u,c=[],s=[],f=0;function d(){if(!f&&u){var e=u;u=null,e.resolve()}}function l(){f+=1}function h(){f-=1,d()}var p=function(){function e(e){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var r,t,o=!1,i=!1,a=!1;l();try{e((function(e){a?n.resolve(e):(o=!0,r=e)}),(function(e){a?n.reject(e):(i=!0,t=e)}))}catch(e){return h(),void this.reject(e)}h(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not reject promise with another promise");if(!e){var r=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===c.indexOf(e)){c.push(e),setTimeout((function(){throw e}),1);for(var r=0;r<s.length;r++)s[r](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,r=this.rejected,t=this.handlers;if(!this.dispatching&&(n||r)){this.dispatching=!0,l();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<t.length;i++){var u=t[i],c=u.onSuccess,s=u.onError,f=u.promise,d=void 0;if(n)try{d=c?c(this.value):this.value}catch(e){f.reject(e);continue}else if(r){if(!s){f.reject(this.error);continue}try{d=s(this.error)}catch(e){f.reject(e);continue}}if(d instanceof e&&(d.resolved||d.rejected)){var p=d;p.resolved?f.resolve(p.value):f.reject(p.error),p.errorHandled=!0}else a(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?f.resolve(d.value):f.reject(d.error):o(d,f):f.resolve(d)}t.length=0,this.dispatching=!1,h()}},n.then=function(n,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:n,onError:r}),this.errorHandled=!0,this.dispatch(),t},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(r){return e.try(n).then((function(){return r}))}),(function(r){return e.try(n).then((function(){throw r}))}))},n.timeout=function(e,n){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(t),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:a(n)?new e((function(e,r){return n.then(e,r)})):(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 r=new e,t=n.length,o=[].slice();if(!t)return r.resolve(o),r;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(t-=1)&&r.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof e){if(c.resolved){o[u]=c.value,t-=1;continue}}else if(!a(c)){o[u]=c,t-=1;continue}i(u,e.resolve(c),r)}return 0===t&&r.resolve(o),r},e.hash=function(n){var r={},t=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];a(o)?t.push(o.then((function(n){r[e]=n}))):r[e]=o}};for(var i in n)o(i);return e.all(t).then((function(){return r}))},e.map=function(n,r){return e.all(n.map(r))},e.onPossiblyUnhandledException=function(e){return function(e){return s.push(e),{cancel:function(){s.splice(s.indexOf(e),1)}}}(e)},e.try=function(n,r,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;l();try{o=n.apply(r,t||[])}catch(n){return h(),e.reject(n)}return h(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||a(n)},e.flush=function(){return n=e,r=u=u||new n,d(),r;var n,r},e}();function w(e){return"[object RegExp]"==={}.toString.call(e)}var m={IFRAME:"iframe",POPUP:"popup"},v="Call was rejected by callee.\r\n";function y(e){return void 0===e&&(e=window),e.location.protocol}function g(e){if(void 0===e&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return y(e)}function b(e){return void 0===e&&(e=window),"about:"===g(e)}function E(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function _(e){if(void 0===e&&(e=window),e&&!E(e))try{return e.opener}catch(e){}}function x(e){try{return!0}catch(e){}return!1}function O(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var r=y(e);if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=E(e);return t&&x()?O(t):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function P(e){void 0===e&&(e=window);var n=O(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function C(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(b(e)&&x())return!0}catch(e){}try{if(function(e){return void 0===e&&(e=window),"mock:"===g(e)}(e)&&x())return!0}catch(e){}try{if(O(e)===O(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(b(e)&&x())return!0;if(P(window)===P(e))return!0}catch(e){}return!1}function S(e){if(!C(e))throw new Error("Expected window to be same domain");return e}function D(e,n){if(!e||!n)return!1;var r=E(n);return r?r===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function T(e){var n,r,t=[];try{n=e.frames}catch(r){n=e}try{r=n.length}catch(e){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=n[o]}catch(e){continue}t.push(i)}return t}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return t}if(!u)return t;t.push(u)}return t}function W(e){for(var n=[],r=0,t=T(e);r<t.length;r++){var o=t[r];n.push(o);for(var i=0,a=W(o);i<a.length;i++)n.push(a[i])}return n}function k(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(E(e)===e)return e;try{if(D(window,e)&&window.top)return window.top}catch(e){}try{if(D(e,window)&&window.top)return window.top}catch(e){}for(var n=0,r=W(e);n<r.length;n++){var t=r[n];try{if(t.top)return t.top}catch(e){}if(E(t)===t)return t}}function N(e){var n=k(e);if(!n)throw new Error("Can not determine top window");var r=[].concat(W(n),[n]);return-1===r.indexOf(e)&&(r=[].concat(r,[e],W(e))),r}var R=[],j=[];function I(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==v}if(n&&C(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var r=function(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}(R,e);if(-1!==r){var t=j[r];if(t&&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 r=e;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!n.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function A(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function z(e,n){for(var r=T(e),t=0;t<r.length;t++){var o=r[t];try{if(C(o)&&o.name===n&&-1!==r.indexOf(o))return o}catch(e){}}try{if(-1!==r.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==r.indexOf(e[n]))return e[n]}catch(e){}}function F(e,n){return e===_(n)}function L(e){return void 0===e&&(e=window),_(e=e||window)||E(e)||void 0}function M(e,n){for(var r=0;r<e.length;r++)for(var t=e[r],o=0;o<n.length;o++)if(t===n[o])return!0;return!1}function U(e){void 0===e&&(e=window);for(var n=0,r=e;r;)(r=E(r))&&(n+=1);return n}function q(e,n){var r=k(e)||e,t=k(n)||n;try{if(r&&t)return r===t}catch(e){}var o=N(e),i=N(n);if(M(o,i))return!0;var a=_(r),u=_(t);return a&&M(N(a),i)||u&&M(N(u),o),!1}function B(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(w(n))return!1;if(Array.isArray(n))return!1}return w(e)?w(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!w(n)&&e.some((function(e){return B(e,n)})))}function J(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):P()}function H(e,n,r,t){var o;return void 0===r&&(r=1e3),void 0===t&&(t=1/0),function i(){if(I(e))return o&&clearTimeout(o),n();t<=0?clearTimeout(o):(t-=r,o=setTimeout(i,r))}(),{cancel:function(){o&&clearTimeout(o)}}}function Y(e){try{if(e===window)return!0}catch(e){if(e&&e.message===v)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===v)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===v)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function V(e){if(0!==J(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function Z(e){if(C(e))return S(e).frameElement;for(var n=0,r=document.querySelectorAll("iframe");n<r.length;n++){var t=r[n];if(t&&t.contentWindow&&t.contentWindow===e)return t}}function G(e){if(function(e){return void 0===e&&(e=window),Boolean(E(e))}(e)){var n=Z(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}}function $(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}var X,K=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,r=0;r<n.length;r++){var t=n[r];if(Y(t)&&I(t)){if(e)try{e.delete(t)}catch(e){}n.splice(r,1),this.values.splice(r,1),r-=1}}},n.isSafeToReadWrite=function(e){return!Y(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=this.name,o=e[t];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,t,{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 r=e[this.name];return r&&r[0]===e?r[1]:void 0}catch(e){}this._cleanupClosedWindows();var t=$(this.keys,e);if(-1!==t)return this.values[t]},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 r=e[this.name];r&&r[0]===e&&(r[0]=r[1]=void 0)}catch(e){}this._cleanupClosedWindows();var t=this.keys,o=$(t,e);-1!==o&&(t.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 r=e[this.name];return!(!r||r[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 r=n();return this.set(e,r),r},e}();function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ne(e,n,r){return(ne=ee()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i}).apply(null,arguments)}function re(e){var n="function"==typeof Map?new Map:void 0;return(re=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;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,o)}function o(){return ne(e,arguments,Q(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t(o,e)})(e)}function te(e){return e.name||e.__name__||e.displayName||"anonymous"}function oe(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ie(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))}))).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function ae(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ie((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ue(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(X=X||new K,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=X.get(e);return n||(n=typeof e+":"+ae(),X.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function ce(){return{}}var se=0,fe=0;function de(e,n){void 0===n&&(n={});var r,t,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=se;se+=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<fe&&(r=null,t=null,u=se,se+=1),s=i?(t=t||new K).getOrSet(this,ce):r=r||{};var f=ue(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(),h=e.apply(this,arguments);return s[f]={time:l,value:h},h};return c.reset=function(){r=null,t=null},oe(c,(n.name||te(e))+"::memoized")}function le(e){var n={};function r(){for(var r=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=ue(i);return n.hasOwnProperty(u)||(n[u]=p.try((function(){return e.apply(t,r)})).finally((function(){delete n[u]}))),n[u]}return r.reset=function(){n={}},oe(r,te(e)+"::promiseMemoized")}function he(){}function pe(e){var n=!1;return oe((function(){if(!n)return n=!0,e.apply(this,arguments)}),te(e)+"::once")}function we(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 r=e&&e.stack,t=e&&e.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+we(e,n+1)}}function me(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function ve(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function ye(e){return e}function ge(e,n){var r;return function t(){r=setTimeout((function(){e(),t()}),n)}(),{cancel:function(){clearTimeout(r)}}}function be(e){return[].slice.call(e)}function Ee(e){return null!=e}function _e(e){return"[object RegExp]"==={}.toString.call(e)}function xe(e,n,r){if(e.hasOwnProperty(n))return e[n];var t=r();return e[n]=t,t}function Oe(e){var n,r=[],t=!1,o={set:function(n,r){return t||(e[n]=r,o.register((function(){delete e[n]}))),r},register:function(e){var o=pe((function(){return e(n)}));return t?e(n):r.push(o),{cancel:function(){var e=r.indexOf(o);-1!==e&&r.splice(e,1)}}},all:function(e){n=e;var o=[];for(t=!0;r.length;){var i=r.shift();o.push(i())}return p.all(o).then(he)}};return o}function Pe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}de.clear=function(){fe=se},de((function(e){if(Object.values)return Object.values(e);var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(e[r]);return n}));var Ce=function(e){function n(n){var r;return(r=e.call(this,n)||this).name=r.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}(r),r.constructor):r.stack=new Error(n).stack,r}return o(n,e),n}(re(Error));function Se(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function De(){return Boolean(document.body)&&"complete"===document.readyState}function Te(){return Boolean(document.body)&&"interactive"===document.readyState}function We(e){return encodeURIComponent(e)}function ke(e){return function(n,r,t){void 0===t&&(t=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ue(t);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var r=0,t=e.split("&");r<t.length;r++){var o=t[r];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}.apply(void 0,t)}(ke,0,[e])}function Ne(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(r=i({},ke(e),n))&&(r={}),Object.keys(r).filter((function(e){return"string"==typeof r[e]||"boolean"==typeof r[e]})).map((function(e){var n=r[e];if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("Invalid type for query");return We(e)+"="+We(n.toString())})).join("&")):e;var r}function Re(e,n){e.appendChild(n)}function je(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function Ie(e,n){return void 0===n&&(n=document),je(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Ae(e){return new p((function(n,r){var t=me(e),o=Ie(e);if(o)return n(o);if(De())return r(new Error("Document is ready and element "+t+" does not exist"));var i=setInterval((function(){if(o=Ie(e))n(o),clearInterval(i);else if(De())return clearInterval(i),r(new Error("Document is ready and element "+t+" does not exist"))}),10)}))}de((function(){return new p((function(e){if(De()||Te())return e();var n=setInterval((function(){if(De()||Te())return clearInterval(n),e()}),10)}))}));var ze,Fe=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),n}(Ce);function Le(e){if((ze=ze||new K).has(e)){var n=ze.get(e);if(n)return n}var r=new p((function(n,r){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<R.length;e++){var n=!1;try{n=R[e].closed}catch(e){}n&&(j.splice(e,1),R.splice(e,1))}}(),e&&e.contentWindow)try{R.push(e.contentWindow),j.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(t){e.contentWindow?n(e):r(t)}))}));return ze.set(e,r),r}function Me(e){return Le(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function Ue(e,n){void 0===e&&(e={});var r=e.style||{},t=function(e,n,r){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var t,o,i,a=document.createElement(e);if(n.style&&ve(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&&(t=a,o=n.styleSheet,void 0===i&&(i=window.document),t.styleSheet?t.styleSheet.cssText=o:t.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");a.innerHTML=n.html}return a}("iframe",{attributes:i({allowTransparency:"true"},e.attributes||{}),style:i({backgroundColor:"transparent",border:"none"},r),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return t.hasAttribute("id")||t.setAttribute("id",ae()),Le(t),n&&function(e,n){void 0===n&&(n=document);var r=Ie(e,n);if(r)return r;throw new Error("Can not find element: "+me(e))}(n).appendChild(t),(e.url||o)&&t.setAttribute("src",e.url||"about:blank"),t}function qe(e,n,r){return e.addEventListener(n,r),{cancel:function(){e.removeEventListener(n,r)}}}function Be(e){e.style.setProperty("display","")}function Je(e){e.style.setProperty("display","none","important")}function He(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ye(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Ve(e,n,r){var t=void 0===r?{}:r,o=t.width,i=void 0===o||o,a=t.height,u=void 0===a||a,c=t.interval,s=void 0===c?100:c,f=t.win,d=void 0===f?window:f,l=e.offsetWidth,h=e.offsetHeight,p=!1;n({width:l,height:h});var w,m,v=function(){if(!p&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var r=e.offsetWidth,t=e.offsetHeight;(i&&r!==l||u&&t!==h)&&n({width:r,height:t}),l=r,h=t}};return d.addEventListener("resize",v),void 0!==d.ResizeObserver?((w=new d.ResizeObserver(v)).observe(e),m=ge(v,10*s)):void 0!==d.MutationObserver?((w=new d.MutationObserver(v)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),m=ge(v,10*s)):m=ge(v,s),{cancel:function(){p=!0,w.disconnect(),window.removeEventListener("resize",v),m.cancel()}}}function Ze(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Ge="undefined"!=typeof document?document.currentScript:null,$e=de((function(){if(Ge)return Ge;if(Ge=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),r=n&&n[1];if(!r)return;for(var t=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();t<o.length;t++){var i=o[t];if(i.src&&i.src===r)return i}}catch(e){}}())return Ge;throw new Error("Can not determine current script")})),Xe=ae();function Ke(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function Qe(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function en(e){return Qe(e)+"px"}function nn(e){return"number"==typeof e?en(e):Ke(e)?e:en(e)}function rn(e,n){if("number"==typeof e)return e;if(Ke(e))return parseInt(n*Qe(e)/100,10);if("string"==typeof(r=e)&&/^[0-9]+px$/.test(r))return Qe(e);var r;throw new Error("Can not normalize dimension: "+e)}function tn(e){void 0===e&&(e=window);var n="__post_robot_10_0_44__";return e!==window?e[n]:e[n]=e[n]||{}}de((function(){var e;try{e=$e()}catch(e){return Xe}var n=e.getAttribute("data-uid");if(n&&"string"==typeof n)return n;if((n=e.getAttribute("data-uid-auto"))&&"string"==typeof n)return n;if(e.src){var r=function(e){for(var n="",r=0;r<e.length;r++){var t=e[r].charCodeAt(0)*r;e[r+1]&&(t+=e[r+1].charCodeAt(0)*(r-1)),n+=String.fromCharCode(97+Math.abs(t)%26)}return n}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+r.slice(r.length-30)}else n=ae();return e.setAttribute("data-uid-auto",n),n}));var on=function(){return{}};function an(e,n){return void 0===e&&(e="store"),void 0===n&&(n=on),xe(tn(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,r){return e.hasOwnProperty(n)?e[n]:r},set:function(n,r){return e[n]=r,r},del:function(n){delete e[n]},getOrSet:function(n,r){return xe(e,n,r)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var un,cn=function(){};function sn(){var e=tn();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new cn,e.WINDOW_WILDCARD}function fn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=on),an("windowStore").getOrSet(e,(function(){var r=new K,t=function(e){return r.getOrSet(e,n)};return{has:function(n){return t(n).hasOwnProperty(e)},get:function(n,r){var o=t(n);return o.hasOwnProperty(e)?o[e]:r},set:function(n,r){return t(n)[e]=r,r},del:function(n){delete t(n)[e]},getOrSet:function(n,r){return xe(t(n),e,r)}}}))}function dn(){return an("instance").getOrSet("instanceID",ae)}function ln(e,n){var r=n.domain,t=fn("helloPromises"),o=t.get(e);o&&o.resolve({domain:r});var i=p.resolve({domain:r});return t.set(e,i),i}function hn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:dn()},{domain:"*",timeout:-1}).then((function(n){var r=n.origin,t=n.data.instanceID;return ln(e,{domain:r}),{win:e,domain:r,instanceID:t}}))}function pn(e,n){var r=n.send;return fn("windowInstanceIDPromises").getOrSet(e,(function(){return hn(e,{send:r}).then((function(e){return e.instanceID}))}))}function wn(e,n,r){void 0===n&&(n=5e3),void 0===r&&(r="Window");var t=function(e){return fn("helloPromises").getOrSet(e,(function(){return new p}))}(e);return-1!==n&&(t=t.timeout(n,new Error(r+" did not load after "+n+"ms"))),t}function mn(e){fn("knownWindows").set(e,!0)}function vn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function yn(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function gn(e,n){return{__type__:e,__val__:n}}var bn,En=((un={}).function=function(){},un.error=function(e){return gn("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},un.promise=function(){},un.regex=function(e){return gn("regex",e.source)},un.date=function(e){return gn("date",e.toJSON())},un.array=function(e){return e},un.object=function(e){return e},un.string=function(e){return e},un.number=function(e){return e},un.boolean=function(e){return e},un.null=function(e){return e},un[void 0]=function(e){return gn("undefined",e)},un),_n={},xn=((bn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},bn.error=function(e){var n=e.stack,r=e.code,t=e.data,o=new Error(e.message);return o.code=r,t&&(o.data=t),o.stack=n+"\n\n"+o.stack,o},bn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},bn.regex=function(e){return new RegExp(e)},bn.date=function(e){return new Date(e)},bn.array=function(e){return e},bn.object=function(e){return e},bn.string=function(e){return e},bn.number=function(e){return e},bn.boolean=function(e){return e},bn.null=function(e){return e},bn[void 0]=function(){},bn),On={};function Pn(){return!!A(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Cn(e){return!q(window,e)}function Sn(e,n){if(e){if(P()!==J(e))return!0}else if(n&&!C(n))return!0;return!1}function Dn(e){var n=e.win,r=e.domain;return!(!Pn()||r&&!Sn(r,n)||n&&!Cn(n))}function Tn(e){return"__postrobot_bridge___"+(e=e||J(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Wn(){return Boolean(window.name&&window.name===Tn(P()))}var kn=new p((function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval((function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)}),10)}));function Nn(e){fn("remoteWindowPromises").getOrSet(e,(function(){return new p}))}function Rn(e){var n=fn("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function jn(e,n,r){Rn(e).resolve((function(t,o,i){if(t!==e)throw new Error("Remote window does not match window");if(!B(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);r.fireAndForget(i)}))}function In(e,n){Rn(e).reject(n).catch(he)}function An(e){for(var n=e.win,r=e.name,t=e.domain,o=an("popupWindowsByName"),i=fn("popupWindowsByWin"),a=0,u=o.keys();a<u.length;a++){var c=u[a],s=o.get(c);s&&!I(s.win)||o.del(c)}if(I(n))return{win:n,name:r,domain:t};var f=i.getOrSet(n,(function(){return r?o.getOrSet(r,(function(){return{win:n,name:r}})):{win:n}}));if(f.win&&f.win!==n)throw new Error("Different window already linked for window: "+(r||"undefined"));return r&&(f.name=r,o.set(r,f)),t&&(f.domain=t,Nn(n)),i.set(n,f),f}function zn(e){var n,r=e.on,t=e.send,o=e.receiveMessage;n=window.open,window.open=function(e,r,t,o){var i=n.call(this,V(e),r,t,o);return i?(An({win:i,name:r,domain:e?J(e):null}),i):i},function(e){var n=e.on,r=e.send,t=e.receiveMessage,o=an("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,a=e.origin,u=e.data,c=an("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 jn(c().win,a,u.sendMessage),{sendMessage:function(e){if(window&&!window.closed&&c()){var o=c().domain;if(o)try{t({data:e,origin:o,source:c().win},{on:n,send:r})}catch(e){p.reject(e)}}}}}))}))}({on:r,send:t,receiveMessage:o}),function(e){var n=e.send;tn(window).openTunnelToParent=function(e){var r=e.name,t=e.source,o=e.canary,i=e.sendMessage,a=an("tunnelWindows"),u=E(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(e){var n=e.name,r=e.source,t=e.canary,o=e.sendMessage;!function(){for(var e=an("tunnelWindows"),n=0,r=e.keys();n<r.length;n++){var t=r[n];I(e[t].source)&&e.del(t)}}();var i=ae();return an("tunnelWindows").set(i,{name:n,source:r,canary:t,sendMessage:o}),i}({name:r,source:t,canary:o,sendMessage:i});return n(u,"postrobot_open_tunnel",{name:r,sendMessage:function(){var e=a.get(c);if(e&&e.source&&!I(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:t}),function(e){var n=e.on,r=e.send,t=e.receiveMessage;p.try((function(){var e,o=_(window);if(o&&Dn({win:o}))return Nn(o),(e=o,fn("remoteBridgeAwaiters").getOrSet(e,(function(){return p.try((function(){var n=z(e,Tn(P()));if(n)return C(n)&&tn(S(n))?n:new p((function(e){var r,t;r=setInterval((function(){if(n&&C(n)&&tn(S(n)))return clearInterval(r),clearTimeout(t),e(n)}),100),t=setTimeout((function(){return clearInterval(r),e()}),2e3)}))}))}))).then((function(e){return e?window.name?tn(S(e)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{window}catch(e){return}if(window&&!window.closed)try{t({data:e,origin:this.origin,source:this.source},{on:n,send:r})}catch(e){p.reject(e)}}}).then((function(e){var n=e.source,r=e.origin,t=e.data;if(n!==o)throw new Error("Source does not match opener");jn(n,r,t.sendMessage)})).catch((function(e){throw In(o,e),e})):In(o,new Error("Can not register with opener: window does not have a name")):In(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:r,send:t,receiveMessage:o})}function Fn(){for(var e=an("idToProxyWindow"),n=0,r=e.keys();n<r.length;n++){var t=r[n];e.get(t).shouldClean()&&e.del(t)}}function Ln(e,n){var r=n.send,t=n.id,o=void 0===t?ae():t,i=e.then((function(e){if(C(e))return S(e).name})),a=e.then((function(e){if(I(e))throw new Error("Window is closed, can not determine type");return _(e)?m.POPUP:m.IFRAME}));i.catch(he),a.catch(he);var u=function(){return e.then((function(e){if(!I(e))return C(e)?S(e).name:i}))};return{id:o,getType:function(){return a},getInstanceID:le((function(){return e.then((function(e){return pn(e,{send:r})}))})),close:function(){return e.then(G)},getName:u,focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return I(e)}))},setLocation:function(n,r){return void 0===r&&(r={}),e.then((function(e){var t=window.location.protocol+"//"+window.location.host,o=r.method,i=void 0===o?"get":o,a=r.body;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("post"===i)return u().then((function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var n=e.url,r=e.target,t=e.body,o=e.method,i=void 0===o?"post":o,a=document.createElement("form");if(a.setAttribute("target",r),a.setAttribute("method",i),a.setAttribute("action",n),a.style.display="none",t)for(var u=0,c=Object.keys(t);u<c.length;u++){var s,f=c[u],d=document.createElement("input");d.setAttribute("name",f),d.setAttribute("value",null==(s=t[f])?void 0:s.toString()),a.appendChild(d)}Se().appendChild(a),a.submit(),Se().removeChild(a)}({url:n,target:e,method:i,body:a})}));if("get"!==i)throw new Error("Unsupported method: "+i);if(C(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){An({win:e,name:n});var r=C(e),t=Z(e);if(!r)throw new Error("Can not set name for cross-domain window: "+n);S(e).name=n,t&&t.setAttribute("name",n),i=p.resolve(n)}))}}}var Mn=function(){function e(e){var n=e.send,r=e.win,t=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new p,this.serializedWindow=t||Ln(this.actualWindowPromise,{send:n}),an("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{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,n){var r=this;return this.serializedWindow.setLocation(e,n).then((function(){return r}))},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(),r=this.getName(),t=p.hash({isPopup:n,name:r}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return p.all([t,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var r=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Ln(this.actualWindowPromise,{send:r,id:this.getID()}),fn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var r=this,t=n.send;return p.try((function(){return r.actualWindow?e===r.actualWindow:p.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:pn(e,{send:t})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&r.setWindow(e,{send:t}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&I(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,r){var t=r.send;return Fn(),e.toProxyWindow(n,{send:t}).serialize()},e.deserialize=function(n,r){var t=r.send;return Fn(),an("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:t})},e.isProxyWindow=function(e){return Boolean(e&&!Y(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,r){var t=r.send;if(Fn(),e.isProxyWindow(n))return n;var o=n;return fn("winToProxyWindow").get(o)||new e({win:o,send:t})},e}();function Un(e,n,r,t,o){var i=fn("methodStore"),a=an("proxyWindowMethods");Mn.isProxyWindow(t)?a.set(e,{val:n,name:r,domain:o,source:t}):(a.del(e),i.getOrSet(t,(function(){return{}}))[e]={domain:o,name:r,val:n,source:t})}function qn(e,n){var r=fn("methodStore"),t=an("proxyWindowMethods");return r.getOrSet(e,(function(){return{}}))[n]||t.get(n)}function Bn(e,n,r,t,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,an("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,r=e.origin,t=e.data,o=t.id,i=t.name,a=qn(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+P(window));var c=a.source,s=a.domain,f=a.val;return p.try((function(){if(!B(s,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(_e(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+P(window));if(Mn.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+P(window))}))})).then((function(){return f.apply({source:n,origin:r},t.args)}),(function(e){return p.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=t.args)&&(n=[]),be(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=r.__id__||ae();e=Mn.unwrap(e);var s=r.__name__||r.name||t;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",t+"::")),Mn.isProxyWindow(e)?(Un(c,r,s,e,n),e.awaitWindow().then((function(e){Un(c,r,s,e,n)}))):Un(c,r,s,e,n),gn("cross_domain_function",{id:c,name:s})}function Jn(e,n,r,t){var o,i=t.on,a=t.send;return function(e,n){void 0===n&&(n=_n);var r=JSON.stringify(e,(function(e){var r=this[e];if(vn(this))return r;var t=yn(r);if(!t)return r;var o=n[t]||En[t];return o?o(r,e):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(e,n,r,t,o){return gn("cross_domain_zalgo_promise",{then:Bn(e,n,(function(e,n){return r.then(e,n)}),t,{on:o.on,send:o.send})})}(e,n,r,t,{on:i,send:a})},o.function=function(r,t){return Bn(e,n,r,t,{on:i,send:a})},o.object=function(e){return Y(e)||Mn.isProxyWindow(e)?gn("cross_domain_window",Mn.serialize(e,{send:a})):e},o))}function Hn(e,n,r,t){var o,i=t.send;return function(e,n){if(void 0===n&&(n=On),"undefined"!==e)return JSON.parse(e,(function(e,r){if(vn(this))return r;var t,o;if(vn(r)?(t=r.__type__,o=r.__val__):(t=yn(r),o=r),!t)return o;var i=n[t]||xn[t];return i?i(o,e):o}))}(r,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,r){return new p(r.then)}(0,0,e)},o.cross_domain_function=function(r){return function(e,n,r,t){var o=r.id,i=r.name,a=t.send,u=function(r){function t(){var u=arguments;return Mn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=qn(e,o);if(c&&c.val!==t)return c.val.apply({source:window,origin:P()},u);var s=[].slice.call(u);return r.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===r&&(r={}),t.__name__=i,t.__origin__=n,t.__source__=e,t.__id__=o,t.origin=n,t},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,r,{send:i})},o.cross_domain_window=function(e){return Mn.deserialize(e,{send:i})},o))}var Yn={};function Vn(e,n,r,t){var o=t.on,i=t.send;return p.try((function(){var t=fn().getOrSet(e,(function(){return{}}));return t.buffer=t.buffer||[],t.buffer.push(r),t.flush=t.flush||p.flush().then((function(){if(I(e))throw new Error("Window is closed");var r,a=Jn(e,n,((r={}).__post_robot_10_0_44__=t.buffer||[],r),{on:o,send:i});delete t.buffer;for(var u=Object.keys(Yn),c=[],s=0;s<u.length;s++){var f=u[s];try{Yn[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+". "+we(e)})).join("\n\n"))})),t.flush.then((function(){delete t.flush}))})).then(he)}function Zn(e){return an("responseListeners").get(e)}function Gn(e){an("responseListeners").del(e)}function $n(e){return an("erroredResponseListeners").has(e)}function Xn(e){var n=e.name,r=e.win,t=e.domain,o=fn("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[r,sn()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(t&&"string"==typeof t){if(s[t])return s[t];if(s.__domain_regex__)for(var f=0,d=s.__domain_regex__;f<d.length;f++){var l=d[f],h=l.listener;if(B(l.regex,t))return h}}if(s["*"])return s["*"]}}}}}function Kn(e,n,r,t){var o=t.on,i=t.send,a=Xn({name:r.name,win:e,domain:n}),u="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function c(t,a,c){return p.flush().then((function(){if(!r.fireAndForget&&!I(e))try{return Vn(e,n,{id:ae(),origin:P(window),type:"postrobot_message_response",hash:r.hash,name:r.name,ack:t,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+P()+"\n\n"+we(e))}}))}return p.all([p.flush().then((function(){if(!r.fireAndForget&&!I(e))try{return Vn(e,n,{id:ae(),origin:P(window),type:"postrobot_message_ack",hash:r.hash,name:r.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+P()+"\n\n"+we(e))}})),p.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!B(a.domain,n))throw new Error("Request origin "+n+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:n,data:r.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(he).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function Qn(e,n,r){if(!$n(r.hash)){var t=Zn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!B(t.domain,n))throw new Error("Ack origin "+n+" does not match domain "+t.domain.toString());if(e!==t.win)throw new Error("Ack source does not match registered window")}catch(e){t.promise.reject(e)}t.ack=!0}}function er(e,n,r){if(!$n(r.hash)){var t,o=Zn(r.hash);if(!o)throw new Error("No handler found for post message response for message: "+r.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!B(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(t=o.domain,Array.isArray(t)?"("+t.join(" | ")+")":w(t)?"RegExp("+t.toString()+")":t.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Gn(r.hash),"error"===r.ack?o.promise.reject(r.error):"success"===r.ack&&o.promise.resolve({source:e,origin:n,data:r.data})}}function nr(e,n){var r=n.on,t=n.send,o=an("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,r,t){var o,i=t.on,a=t.send;try{o=Hn(n,r,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_10_0_44__;if(Array.isArray(u))return u}}(e.data,i,a,{on:r,send:t});if(u){mn(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),I(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?Kn(i,a,s,{on:r,send:t}):"postrobot_message_response"===s.type?er(i,a,s):"postrobot_message_ack"===s.type&&Qn(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function rr(e,n,r){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(r=n,n={}),!r)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=r||n.handler;var t=n.window,o=n.domain,i=function e(n,r){var t=n.name,o=n.win,i=n.domain,a=fn("requestListeners");if(!t||"string"!=typeof t)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:t,domain:i,win:s[c]},r));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:t,win:o,domain:l[d]},r));return{cancel:function(){for(var e=0;e<f.length;e++)f[e].cancel()}}}var h=Xn({name:t,win:o,domain:i});if(o&&"*"!==o||(o=sn()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===sn()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===sn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var p,w,m=a.getOrSet(o,(function(){return{}})),v=xe(m,t,(function(){return{}})),y=i.toString();return _e(i)?(p=xe(v,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:r}):v[y]=r,{cancel:function(){delete v[y],w&&(p.splice(p.indexOf(w,1)),p.length||delete v.__domain_regex__),Object.keys(v).length||delete m[t],o&&!Object.keys(m).length&&a.del(o)}}}({name:e,win:t,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:t,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}Yn.postrobot_post_message=function(e,n,r){0===r.indexOf("file:")&&(r="*"),e.postMessage(n,r)},Yn.postrobot_bridge=function(e,n,r){if(!Pn()&&!Wn())throw new Error("Bridge not needed for browser");if(C(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==q(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(e,n,r){var t=F(window,e),o=F(e,window);if(!t&&!o)throw new Error("Can only send messages to and from parent and popup windows");Rn(e).then((function(t){return t(e,n,r)}))}(e,r,n)},Yn.postrobot_global=function(e,n){if(!A(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!C(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==q(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var r=tn(e);if(!r)throw new Error("Can not find postRobot global on foreign window");r.receiveMessage({source:window,origin:P(),data:n})};var tr,or=function e(n,r,t,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return p.try((function(){if(function(e,n,r){if(!e)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!_e(r))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(r)+" to be a string, array, or regex");if(I(n))throw new Error("Can not send "+e+". Target window is closed")}(r,n,i),function(e,n){var r=L(n);if(r)return r===e;if(n===e)return!1;if(k(n)===n)return!1;for(var t=0,o=T(e);t<o.length;t++)if(o[t]===n)return!0;return!1}(window,n))return wn(n,u)})).then((function(r){return function(e,n,r,t){var o=t.send;return p.try((function(){return"string"==typeof n?n:p.try((function(){return r||hn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!B(n,n))throw new Error("Domain "+me(n)+" does not match "+me(n));return e}))}))}(n,i,(void 0===r?{}:r).domain,{send:e})})).then((function(o){var i=o,u="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,s=new p,f=r+"_"+ae();if(!c){var d={name:r,win:n,domain:i,promise:s};!function(e,n){an("responseListeners").set(e,n)}(f,d);var l=fn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){an("erroredResponseListeners").set(e,!0)}(f),Gn(f)}));var h=function(e){return fn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=a,m=h,v=w,y=ge((function(){return I(n)?s.reject(new Error("Window closed for "+r+" before "+(d.ack?"response":"ack"))):d.cancelled?s.reject(new Error("Response listener was cancelled for "+r)):(m=Math.max(m-500,0),-1!==v&&(v=Math.max(v-500,0)),d.ack||0!==m?0===v?s.reject(new Error("No response for postMessage "+u+" in "+P()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+P()+" in "+h+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(he)}return Vn(n,i,{id:ae(),origin:P(window),type:"postrobot_message_request",hash:f,name:r,data:t,fireAndForget:c},{on:rr,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+P()+"\n\n"+we(e))}))}))};function ir(e){return Mn.toProxyWindow(e,{send:or})}function ar(e){for(var n=0,r=fn("requestPromises").get(e,[]);n<r.length;n++)r[n].reject(new Error("Window "+(I(e)?"closed":"cleaned up")+" before response")).catch(he)}function ur(e){if(!C(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_82__||(e.__zoid_9_0_82__={}),e.__zoid_9_0_82__}function cr(e,n){try{return n(ur(e))}catch(e){}}function sr(e){return{get:function(){var n=this;return p.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}function fr(e){return ie(JSON.stringify(e))}function dr(e){var n=ur(e);return n.references=n.references||{},n.references}function lr(e){var n,r,t=e.data,o=e.metaData,i=e.sender,a=e.receiver,u=e.passByReference,c=void 0!==u&&u,s=e.basic,f=void 0!==s&&s,d=ir(a.win),l=f?JSON.stringify(t):Jn(d,a.domain,t,{on:rr,send:or}),h=c?(n=l,r=ae(),dr(window)[r]=n,{type:"uid",uid:r}):{type:"raw",val:l};return{serializedData:fr({sender:{domain:i.domain},metaData:o,reference:h}),cleanReference:function(){var e,n;e=window,"uid"===(n=h).type&&delete dr(e)[n.uid]}}}function hr(e){var n,r,t=e.sender,o=e.basic,i=void 0!==o&&o,a=function(e){return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(e))}(e.data),u=a.reference,c=a.metaData;n="function"==typeof t.win?t.win({metaData:c}):t.win,r="function"==typeof t.domain?t.domain({metaData:c}):"string"==typeof t.domain?t.domain:a.sender.domain;var s=function(e,n){if("raw"===n.type)return n.val;if("uid"===n.type)return dr(e)[n.uid];throw new Error("Unsupported ref type: "+n.type)}(n,u);return{data:i?JSON.parse(s):function(e,n,r){return Hn(e,n,r,{on:rr,send:or})}(n,r,s),metaData:c,sender:{win:n,domain:r},reference:u}}tr={setupBridge:zn,openBridge:function(e,n){var r=an("bridges"),t=an("bridgeFrames");return n=n||J(e),r.getOrSet(n,(function(){return p.try((function(){if(P()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var r=Tn(n);if(z(window,r))throw new Error("Frame with name "+r+" already exists on page");var o=function(e,n){var r=document.createElement("iframe");return r.setAttribute("name",e),r.setAttribute("id",e),r.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),r.setAttribute("frameborder","0"),r.setAttribute("border","0"),r.setAttribute("scrolling","no"),r.setAttribute("allowTransparency","true"),r.setAttribute("tabindex","-1"),r.setAttribute("hidden","true"),r.setAttribute("title",""),r.setAttribute("role","presentation"),r.src=n,r}(r,e);return t.set(n,o),kn.then((function(n){n.appendChild(o);var r=o.contentWindow;return new p((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return wn(r,5e3,"Bridge "+e)})).then((function(){return r}))}))}))}))},linkWindow:An,linkUrl:function(e,n){An({win:e,domain:J(n)})},isBridge:Wn,needsBridge:Dn,needsBridgeForBrowser:Pn,hasBridge:function(e,n){return an("bridges").has(n||J(e))},needsBridgeForWin:Cn,needsBridgeForDomain:Sn,destroyBridges:function(){for(var e=an("bridges"),n=an("bridgeFrames"),r=0,t=n.keys();r<t.length;r++){var o=n.get(t[r]);o&&o.parentNode&&o.parentNode.removeChild(o)}n.reset(),e.reset()}};var pr={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},wr={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},mr=m,vr={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 yr(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function gr(e){if(!e)throw new Error("No window name");var n=e.split("__"),r=n[1],t=n[2],o=n[3];if("zoid"!==r)throw new Error("Window not rendered by zoid - got "+r);if(!t)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:t,serializedInitialPayload:o}}var br=de((function(e){var n=hr({data:gr(e).serializedInitialPayload,sender:{win:function(e){return function(e){if("opener"===e.type)return Pe("opener",_(window));if("parent"===e.type&&"number"==typeof e.distance)return Pe("parent",(n=window,void 0===(r=e.distance)&&(r=1),function(e,n){void 0===n&&(n=1);for(var r=e,t=0;t<n;t++){if(!r)return;r=E(r)}return r}(n,U(n)-r)));var n,r;if("global"===e.type&&e.uid&&"string"==typeof e.uid){var t=function(){var n=e.uid,r=L(window);if(!r)throw new Error("Can not find ancestor window");for(var t=0,o=N(r);t<o.length;t++){var i=o[t];if(C(i)){var a=cr(i,(function(e){return e.windows&&e.windows[n]}));if(a)return{v:a}}}}();if("object"==typeof t)return t.v}else if("name"===e.type){var o=e.name;return Pe("namedWindow",function(e,n){return z(e,n)||function e(n,r){var t=z(n,r);if(t)return t;for(var o=0,i=T(n);o<i.length;o++){var a=e(i[o],r);if(a)return a}}(k(e)||e,n)}(Pe("ancestor",L(window)),o))}throw new Error("Unable to find "+e.type+" parent component window")}(e.metaData.windowRef)}}});return{parent:n.sender,payload:n.data,reference:n.reference}}));function Er(){return br(window.name)}function _r(e,n){if(void 0===n&&(n=window),e===E(n))return{type:"parent",distance:U(e)};if(e===_(n))return{type:"opener"};if(C(e)&&(t=e)!==k(t)){var r=S(e).name;if(r)return{type:"name",name:r}}var t}function xr(e,n,r,t,o){if(!e.hasOwnProperty(r))return t;var i=e[r];return"function"==typeof i.childDecorate?i.childDecorate({value:t,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):t}function Or(){return p.try((function(){window.focus()}))}function Pr(){return p.try((function(){window.close()}))}var Cr=function(){return he},Sr=function(e){return pe(e.value)};function Dr(e,n,r){for(var t=0,o=Object.keys(e);t<o.length;t++){var i=o[t],a=n[i];a&&r(i,a,e[i])}}function Tr(e,n,r){var t={};return p.all(function(e,n,o){var i=[];return Dr(e,n,(function(e,n,o){var a=function(e,n,o){return p.resolve().then((function(){var i,a;if(null!=o){var u=(i={},i.get=n.queryParam,i.post=n.bodyParam,i)[r],c=(a={},a.get=n.queryValue,a.post=n.bodyValue,a)[r];if(u)return p.hash({finalParam:p.try((function(){return"function"==typeof u?u({value:o}):"string"==typeof u?u:e})),finalValue:p.try((function(){return"function"==typeof c&&Ee(o)?c({value:o}):o}))}).then((function(r){var o,i=r.finalParam,a=r.finalValue;if("boolean"==typeof a)o=a.toString();else if("string"==typeof a)o=a.toString();else if("object"==typeof a&&null!==a){if(n.serialization===wr.JSON)o=JSON.stringify(a);else if(n.serialization===wr.BASE64)o=ie(JSON.stringify(a));else if(n.serialization===wr.DOTIFY||!n.serialization){o=function e(n,r,t){for(var o in void 0===r&&(r=""),void 0===t&&(t={}),r=r?r+".":r,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}))?t[""+r+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?t=e(n[o],""+r+o,t):t[""+r+o]=n[o].toString());return t}(a,e);for(var u=0,c=Object.keys(o);u<c.length;u++){var s=c[u];t[s]=o[s]}return}}else"number"==typeof a&&(o=a.toString());t[i]=o}))}}))}(e,n,o);i.push(a)})),i}(n,e)).then((function(){return t}))}function Wr(e){var n,r,t,o,a,u,c,s=e.uid,f=e.options,d=e.overrides,l=void 0===d?{}:d,h=e.parentWin,w=void 0===h?window:h,m=f.propsDef,v=f.containerTemplate,y=f.prerenderTemplate,g=f.tag,b=f.name,E=f.attributes,_=f.dimensions,x=f.autoResize,O=f.url,D=f.domain,T=f.exports,W=new p,k=[],N=Oe(),R={},j={visible:!0},A=l.event?l.event:(n={},r={},t={on:function(e,n){var t=r[e]=r[e]||[];t.push(n);var o=!1;return{cancel:function(){o||(o=!0,t.splice(t.indexOf(n),1))}}},once:function(e,n){var r=t.on(e,(function(){r.cancel(),n()}));return r},trigger:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];var i=r[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(p.try((function(){return n.apply(void 0,t)})))},c=0;c<i.length;c++)u(c);return p.all(a).then(he)},triggerOnce:function(e){if(n[e])return p.resolve();n[e]=!0;for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.trigger.apply(t,[e].concat(o))},reset:function(){r={}}}),z=l.props?l.props:{},F=l.onError,M=l.getProxyContainer,Y=l.show,Z=l.hide,$=l.close,X=l.renderContainer,K=l.getProxyWindow,Q=l.setProxyWin,ee=l.openFrame,ne=l.openPrerenderFrame,re=l.prerender,te=l.open,oe=l.openPrerender,ie=l.watchForUnload,ue=l.getInternalState,ce=l.setInternalState,se=function(){return"function"==typeof _?_({props:z}):_},fe=function(){return p.try((function(){return l.resolveInitPromise?l.resolveInitPromise():W.resolve()}))},le=function(e){return p.try((function(){return l.rejectInitPromise?l.rejectInitPromise(e):W.reject(e)}))},ye=function(e){for(var n={},r=0,t=Object.keys(z);r<t.length;r++){var o=t[r],i=m[o];i&&!1===i.sendToChild||i&&i.sameDomain&&!B(e,P(window))||(n[o]=z[o])}return p.hash(n)},_e=function(){return p.try((function(){return ue?ue():j}))},xe=function(e){return p.try((function(){return ce?ce(e):j=i({},j,e)}))},Pe=function(){return K?K():p.try((function(){var e=z.window;if(e){var n=ir(e);return N.register((function(){return e.close()})),n}return new Mn({send:or})}))},Ce=function(e){return M?M(e):p.try((function(){return Ae(e)})).then((function(e){return Ze(e)&&(e=function e(n){var r=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Ze(e))return e}(e);if(n&&n.host)return n.host}(n);if(!r)throw new Error("Element is not in shadow dom");var t="shadow-slot-"+ae(),o=document.createElement("slot");o.setAttribute("name",t),n.appendChild(o);var i=document.createElement("div");return i.setAttribute("slot",t),r.appendChild(i),Ze(r)?e(i):i}(e)),sr(e)}))},Se=function(e){return Q?Q(e):p.try((function(){o=e}))},De=function(){return Y?Y():p.hash({setState:xe({visible:!0}),showElement:a?a.get().then(Be):null}).then(he)},Te=function(){return Z?Z():p.hash({setState:xe({visible:!1}),showElement:a?a.get().then(Je):null}).then(he)},We=function(){return"function"==typeof O?O({props:z}):O},ke=function(){return"function"==typeof E?E({props:z}):E},je=function(){return J(We())},ze=function(e,n){var r=n.windowName;return ee?ee(e,{windowName:r}):p.try((function(){if(e===mr.IFRAME)return sr(Ue({attributes:i({name:r,title:b},ke().iframe)}))}))},Le=function(e){return ne?ne(e):p.try((function(){if(e===mr.IFRAME)return sr(Ue({attributes:i({name:"__zoid_prerender_frame__"+b+"_"+ae()+"__",title:"prerender__"+b},ke().iframe)}))}))},Ge=function(e,n,r){return oe?oe(e,n,r):p.try((function(){if(e===mr.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return N.register((function(){return He(e)})),Me(e).then((function(e){return S(e)})).then((function(e){return ir(e)}))}))}if(e===mr.POPUP)return n;throw new Error("No render context available for "+e)}))},$e=function(){return p.try((function(){if(o)return p.all([A.trigger(vr.FOCUS),o.focus()]).then(he)}))},Xe=function(){var e=ur(window);return e.windows=e.windows||{},e.windows[s]=window,N.register((function(){delete e.windows[s]})),s},Ke=function(e,n,r,t){if(n===P(window))return{type:"global",uid:Xe()};if(e!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(z.window){var o=t.getWindow();if(!o)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(L(o)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(r===mr.POPUP)return{type:"opener"};if(r===mr.IFRAME)return{type:"parent",distance:U(window)};throw new Error("Can not construct window reference for child")},Qe=function(e,n){return p.try((function(){c=e,u=n,fe(),N.register((function(){return n.close.fireAndForget().catch(he)}))}))},en=function(e){var n=e.width,r=e.height;return p.try((function(){A.trigger(vr.RESIZE,{width:n,height:r})}))},nn=function(e){return p.try((function(){return A.trigger(vr.DESTROY)})).catch(he).then((function(){return N.all(e)})).then((function(){W.asyncReject(e||new Error("Component destroyed"))}))},tn=de((function(e){return p.try((function(){if($){if(I($.__source__))return;return $()}return p.try((function(){return A.trigger(vr.CLOSE)})).then((function(){return nn(e||new Error("Component closed"))}))}))})),on=function(e,n){var r=n.proxyWin,t=n.proxyFrame,o=n.windowName;return te?te(e,{proxyWin:r,proxyFrame:t,windowName:o}):p.try((function(){if(e===mr.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return Me(e).then((function(n){return N.register((function(){return He(e)})),N.register((function(){return ar(n)})),n}))}))}if(e===mr.POPUP){var n=se(),r=n.width,a=void 0===r?"300px":r,u=n.height,c=void 0===u?"150px":u;a=rn(a,window.outerWidth),c=rn(c,window.outerWidth);var s=function(e,n){var r=(n=n||{}).closeOnUnload,t=void 0===r?1:r,o=n.name,a=void 0===o?"":o,u=n.width,c=n.height,s=0,f=0;u&&(window.outerWidth?f=Math.round((window.outerWidth-u)/2)+window.screenX:window.screen.width&&(f=Math.round((window.screen.width-u)/2))),c&&(window.outerHeight?s=Math.round((window.outerHeight-c)/2)+window.screenY:window.screen.height&&(s=Math.round((window.screen.height-c)/2))),delete n.closeOnUnload,delete n.name,u&&c&&(n=i({top:s,left:f,width:u,height:c,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var d,l,h=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+me(n[e])})).filter(Boolean).join(",");try{d=window.open("",a,h)}catch(l){throw new Fe("Can not open popup window - "+(l.stack||l.message))}if(I(d))throw new Fe("Can not open popup window - blocked");return t&&window.addEventListener("unload",(function(){return d.close()})),d}(0,i({name:o,width:a,height:c},ke().popup));return N.register((function(){return G(s)})),N.register((function(){return ar(s)})),s}throw new Error("No render context available for "+e)})).then((function(e){return r.setWindow(e,{send:or}),r.setName(o).then((function(){return r}))}))},an=function(){return p.try((function(){var e=qe(window,"unload",pe((function(){nn(new Error("Window navigated away"))}))),n=H(w,nn,3e3);if(N.register(n.cancel),N.register(e.cancel),ie)return ie()}))},un=function(e){var n=!1;return e.isClosed().then((function(r){return r?(n=!0,tn(new Error("Detected component window close"))):p.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,tn(new Error("Detected component window close"))}))})).then((function(){return n}))},cn=function(e){return F?F(e):p.try((function(){if(-1===k.indexOf(e))return k.push(e),W.asyncReject(e),A.trigger(vr.ERROR,e)}))},sn=new p,fn=function(e){return p.try((function(){sn.resolve(e)}))};Qe.onError=cn;var dn=function(e,n){return e({uid:s,container:n.container,context:n.context,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:$e,close:tn,state:R,props:z,tag:g,dimensions:se(),event:A})},ln=function(e,n){var r=n.context;return re?re(e,{context:r}):p.try((function(){if(y){var n=e.getWindow();if(n&&C(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var t=(n=S(n)).document,o=dn(y,{context:r,doc:t});if(o){if(o.ownerDocument!==t)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var r=n.tagName.toLowerCase();if("html"!==r)throw new Error("Expected element to be html, got "+r);for(var t=e.document.documentElement,o=0,i=be(t.children);o<i.length;o++)t.removeChild(i[o]);for(var a=0,u=be(n.children);a<u.length;a++)t.appendChild(u[a])}(n,o);var i=x.width,a=void 0!==i&&i,u=x.height,c=void 0!==u&&u,s=x.element,f=void 0===s?"body":s;if((f=Ie(f,t))&&(a||c)){var d=Ve(f,(function(e){en({width:a?e.width:void 0,height:c?e.height:void 0})}),{width:a,height:c,win:n});A.on(vr.RENDERED,d.cancel)}}}}}))},hn=function(e,n){var r=n.proxyFrame,t=n.proxyPrerenderFrame,o=n.context,i=n.rerender;return X?X(e,{proxyFrame:r,proxyPrerenderFrame:t,context:o,rerender:i}):p.hash({container:e.get(),frame:r?r.get():null,prerenderFrame:t?t.get():null,internalState:_e()}).then((function(e){var n=e.container,r=e.internalState.visible,t=dn(v,{context:o,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(t){r||Je(t),Re(n,t);var u=function(e,n){n=pe(n);var r,t,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();r&&r.cancel(),o&&o.removeEventListener("unload",c),t&&He(t)},c=function(){i||(n(),u())};if(Ye(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var f=new window.MutationObserver((function(){Ye(e)&&c()}));f.observe(s,{childList:!0}),a.push(f),s=s.parentElement}return(t=document.createElement("iframe")).setAttribute("name","__detect_close_"+ae()+"__"),t.style.display="none",Me(t).then((function(e){(o=S(e)).addEventListener("unload",c)})),e.appendChild(t),r=ge((function(){Ye(e)&&c()}),1e3),{cancel:u}}(t,(function(){var e=new Error("Detected container element removed from DOM");return p.delay(1).then((function(){if(!Ye(t))return N.all(e),i().then(fe,le);tn(e)}))}));return N.register((function(){return u.cancel()})),N.register((function(){return He(t)})),a=sr(t)}}))},pn=function(){return{state:R,event:A,close:tn,focus:$e,resize:en,onError:cn,updateProps:mn,show:De,hide:Te}},wn=function(e,n){void 0===n&&(n=!1);var r=pn();!function(e,n,r,t,o){void 0===o&&(o=!1),ve(n,r=r||{});for(var i=o?[]:[].concat(Object.keys(e)),a=0,u=Object.keys(r);a<u.length;a++){var c=u[a];-1===i.indexOf(c)&&i.push(c)}for(var s=[],f=t.state,d=t.close,l=t.focus,h=t.event,p=t.onError,w=0;w<i.length;w++){var m=i[w],v=e[m],y=r[m];if(v){var g=v.alias;if(g&&(!Ee(y)&&Ee(r[g])&&(y=r[g]),s.push(g)),v.value&&(y=v.value({props:n,state:f,close:d,focus:l,event:h,onError:p})),!Ee(y)&&v.default&&(y=v.default({props:n,state:f,close:d,focus:l,event:h,onError:p})),Ee(y)&&("array"===v.type?!Array.isArray(y):typeof y!==v.type))throw new TypeError("Prop is not of type "+v.type+": "+m);n[m]=y}}for(var b=0;b<s.length;b++)delete n[s[b]];Dr(n,e,(function(e,r,t){if(r&&Ee(t)&&r.decorate){var o=r.decorate({value:t,props:n,state:f,close:d,focus:l,event:h,onError:p});n[e]=o}}));for(var E=0,_=Object.keys(e);E<_.length;E++){var x=_[E];if(!1!==e[x].required&&!Ee(n[x]))throw new Error('Expected prop "'+x+'" to be defined')}}(m,z,e,r,n)},mn=function(e){return wn(e,!0),W.then((function(){var e=u,n=o;if(e&&n&&c)return ye(c).then((function(r){return e.updateProps(r).catch((function(e){return un(n).then((function(n){if(!n)throw e}))}))}))}))};return{init:function(){A.on(vr.RENDER,(function(){return z.onRender()})),A.on(vr.DISPLAY,(function(){return z.onDisplay()})),A.on(vr.RENDERED,(function(){return z.onRendered()})),A.on(vr.CLOSE,(function(){return z.onClose()})),A.on(vr.DESTROY,(function(){return z.onDestroy()})),A.on(vr.RESIZE,(function(){return z.onResize()})),A.on(vr.FOCUS,(function(){return z.onFocus()})),A.on(vr.PROPS,(function(e){return z.onProps(e)})),A.on(vr.ERROR,(function(e){return z&&z.onError?z.onError(e):le(e).then((function(){setTimeout((function(){throw e}),1)}))})),N.register(A.reset)},render:function(e){var n=e.target,r=e.container,t=e.context,i=e.rerender;return p.try((function(){var e=je(),a=D||je();!function(e,n,r){if(e!==window){if(!q(window,e))throw new Error("Can only renderTo an adjacent frame");var t=P();if(!B(n,t)&&!C(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+t);if(r&&"string"!=typeof r)throw new Error("Container passed to renderTo must be a string selector, got "+typeof r+" }")}}(n,a,r);var u=p.try((function(){if(n!==window)return function(e,n){for(var r={},t=0,o=Object.keys(z);t<o.length;t++){var i=o[t],a=m[i];a&&a.allowDelegate&&(r[i]=z[i])}var u=or(n,"zoid_delegate_"+b,{uid:s,overrides:{props:r,event:A,close:tn,onError:cn,getInternalState:_e,setInternalState:xe,resolveInitPromise:fe,rejectInitPromise:le}}).then((function(e){var r=e.data.parent;return N.register((function(e){if(!I(n))return r.destroy(e)})),r.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+we(e))}));return M=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.getProxyContainer.apply(e,n)}))},X=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.renderContainer.apply(e,n)}))},Y=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.show.apply(e,n)}))},Z=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.hide.apply(e,n)}))},ie=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.watchForUnload.apply(e,n)}))},e===mr.IFRAME?(K=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.getProxyWindow.apply(e,n)}))},ee=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openFrame.apply(e,n)}))},ne=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},re=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.prerender.apply(e,n)}))},te=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.open.apply(e,n)}))},oe=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.openPrerender.apply(e,n)}))}):e===mr.POPUP&&(Q=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return u.then((function(e){return e.setProxyWin.apply(e,n)}))}),u}(t,n)})),c=z.window,d=an(),l=Tr(m,z,"get").then((function(e){return function(e,n){var r,t,o=n.query||{},i=n.hash||{},a=e.split("#");t=a[1];var u=(r=a[0]).split("?");r=u[0];var c=Ne(u[1],o),s=Ne(t,i);return c&&(r=r+"?"+c),s&&(r=r+"#"+s),r}(V(We()),{query:e})})),h=Tr(m,z,"post"),w=A.trigger(vr.RENDER),v=Ce(r),y=Pe(),E=y.then((function(r){return function(e){var n=void 0===e?{}:e,r=n.proxyWin,t=n.initialChildDomain,o=n.childDomainMatch,i=n.target,a=void 0===i?window:i,u=n.context;return function(e){var n=void 0===e?{}:e,r=n.proxyWin,t=n.childDomainMatch,o=n.context;return ye(n.initialChildDomain).then((function(e){return{uid:s,context:o,tag:g,childDomainMatch:t,version:"9_0_82",props:e,exports:(n=r,{init:function(e){return Qe(this.origin,e)},close:tn,checkClose:function(){return un(n)},resize:en,onError:cn,show:De,hide:Te,export:fn})};var n}))}({proxyWin:r,initialChildDomain:t,childDomainMatch:o,context:u}).then((function(e){var n=lr({data:e,metaData:{windowRef:Ke(a,t,u,r)},sender:{domain:P(window)},receiver:{win:r,domain:o},passByReference:t===P()}),i=n.serializedData;return N.register(n.cleanReference),i}))}({proxyWin:(o={proxyWin:r,initialChildDomain:e,childDomainMatch:a,target:n,context:t}).proxyWin,initialChildDomain:o.initialChildDomain,childDomainMatch:o.childDomainMatch,target:o.target,context:o.context}).then((function(e){return yr({name:b,serializedPayload:e})}));var o})),_=E.then((function(e){return ze(t,{windowName:e})})),x=Le(t),O=p.hash({proxyContainer:v,proxyFrame:_,proxyPrerenderFrame:x}).then((function(e){return hn(e.proxyContainer,{context:t,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame,rerender:i})})).then((function(e){return e})),S=p.hash({windowName:E,proxyFrame:_,proxyWin:y}).then((function(e){var n=e.proxyWin;return c?n:on(t,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),T=p.hash({proxyWin:S,proxyPrerenderFrame:x}).then((function(e){return Ge(t,e.proxyWin,e.proxyPrerenderFrame)})),k=S.then((function(e){return o=e,Se(e)})),R=p.hash({proxyPrerenderWin:T,state:k}).then((function(e){return ln(e.proxyPrerenderWin,{context:t})})),j=p.hash({proxyWin:S,windowName:E}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),F=p.hash({body:h}).then((function(e){return f.method?f.method:Object.keys(e.body).length?"post":"get"})),L=p.hash({proxyWin:S,windowUrl:l,body:h,method:F,windowName:j,prerender:R}).then((function(e){return e.proxyWin.setLocation(e.windowUrl,{method:e.method,body:e.body})})),U=S.then((function(e){!function e(n,r){var t=!1;return N.register((function(){t=!0})),p.delay(2e3).then((function(){return n.isClosed()})).then((function(o){if(!t)return o?tn(new Error("Detected "+r+" close")):e(n,r)}))}(e,t)})),H=p.hash({container:O,prerender:R}).then((function(){return A.trigger(vr.DISPLAY)})),G=S.then((function(n){return function(e,n,r){return p.try((function(){return e.awaitWindow()})).then((function(e){if(tr&&tr.needsBridge({win:e,domain:n})&&!tr.hasBridge(n,n)){var t="function"==typeof f.bridgeUrl?f.bridgeUrl({props:z}):f.bridgeUrl;if(!t)throw new Error("Bridge needed to render "+r);var o=J(t);return tr.linkUrl(e,n),tr.openBridge(V(t),o)}}))}(n,e,t)})),$=L.then((function(){return p.try((function(){var e=z.timeout;if(e)return W.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),ae=W.then((function(){return A.trigger(vr.RENDERED)}));return p.hash({initPromise:W,buildUrlPromise:l,onRenderPromise:w,getProxyContainerPromise:v,openFramePromise:_,openPrerenderFramePromise:x,renderContainerPromise:O,openPromise:S,openPrerenderPromise:T,setStatePromise:k,prerenderPromise:R,loadUrlPromise:L,buildWindowNamePromise:E,setWindowNamePromise:j,watchForClosePromise:U,onDisplayPromise:H,openBridgePromise:G,runTimeoutPromise:$,onRenderedPromise:ae,delegatePromise:u,watchForUnloadPromise:d})})).catch((function(e){return p.all([cn(e),nn(e)]).then((function(){throw e}),(function(){throw e}))})).then(he)},destroy:nn,getProps:function(){return z},setProps:wn,export:fn,getHelpers:pn,getDelegateOverrides:function(){return p.try((function(){return{getProxyContainer:Ce,show:De,hide:Te,renderContainer:hn,getProxyWindow:Pe,watchForUnload:an,openFrame:ze,openPrerenderFrame:Le,prerender:ln,open:on,openPrerender:Ge,setProxyWin:Se}}))},getExports:function(){return T({getExports:function(){return sn}})}}}function kr(e){var n=e.uid,r=e.frame,t=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,c=u.width,s=u.height;if(r&&t){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(r),f.appendChild(t),f.appendChild(d),t.classList.add("zoid-visible"),r.classList.add("zoid-invisible"),a.on(vr.RENDERED,(function(){t.classList.remove("zoid-visible"),t.classList.add("zoid-invisible"),r.classList.remove("zoid-invisible"),r.classList.add("zoid-visible"),setTimeout((function(){He(t)}),1)})),a.on(vr.RESIZE,(function(e){var n=e.width,r=e.height;"number"==typeof n&&(f.style.width=nn(n)),"number"==typeof r&&(f.style.height=nn(r))})),f}}function Nr(e){var n=e.doc,r=e.props,t=n.createElement("html"),o=n.createElement("body"),i=n.createElement("style"),a=n.createElement("div");return a.classList.add("spinner"),r.cspNonce&&i.setAttribute("nonce",r.cspNonce),t.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 ")),t}var Rr=Oe(),jr=Oe();function Ir(e){var n,r,t=function(e){var n=e.tag,r=e.url,t=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?mr.IFRAME:m,y=e.containerTemplate,g=void 0===y?kr:y,b=e.prerenderTemplate,E=void 0===b?Nr:b,_=e.validate,x=e.eligible,O=void 0===x?function(){return{eligible:!0}}:x,P=e.logger,S=void 0===P?{info:he}:P,D=e.exports,T=void 0===D?he:D,W=e.method,k=e.children,N=void 0===k?function(){return{}}:k,R=n.replace(/-/g,"_"),j=i({},{window:{type:pr.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!Y(n)&&!Mn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(Y(n)){if(I(n))throw new Error("Window is closed");if(!C(n))throw new Error("Window is not same domain")}},decorate:function(e){return ir(e.value)}},timeout:{type:pr.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:pr.STRING,required:!1},onDisplay:{type:pr.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Cr,decorate:Sr},onRendered:{type:pr.FUNCTION,required:!1,sendToChild:!1,default:Cr,decorate:Sr},onRender:{type:pr.FUNCTION,required:!1,sendToChild:!1,default:Cr,decorate:Sr},onClose:{type:pr.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Cr,decorate:Sr},onDestroy:{type:pr.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Cr,decorate:Sr},onResize:{type:pr.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Cr},onFocus:{type:pr.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Cr},close:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:pr.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:pr.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:pr.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:R,tag:n,url:r,domain:t,bridgeUrl:o,method:W,propsDef:j,dimensions:s,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:g,prerenderTemplate:E,validate:_,logger:S,eligible:O,children:N,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,r={},t=function(e,t){var o=t[e],i=T[o].type,a=n().then((function(e){return e[o]}));r[o]=i===pr.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return a.then((function(e){return e.apply(void 0,n)}))}:a},o=0,i=Object.keys(T);o<i.length;o++)t(o,i);return r}}}(e),o=t.name,a=t.tag,u=t.defaultContext,c=t.eligible,s=t.children,f=ur(window),d=[],l=function(){if(function(e){try{return gr(window.name).name===e}catch(e){}return!1}(o)){var e=Er().payload;if(e.tag===a&&B(e.childDomainMatch,P()))return!0}return!1},h=de((function(){if(l()){if(window.xprops)throw delete f.components[a],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,r=e.tag,t=e.propsDef,o=e.autoResize,i=e.allowedParentDomains,a=[],u=Er(),c=u.parent,s=u.payload,f=c.win,d=c.domain,l=new p,h=s.version,w=s.uid,m=s.exports,v=s.context,y=s.props;if("9_0_82"!==h)throw new Error("Parent window has zoid version "+h+", child window has version 9_0_82");var g=m.show,b=m.hide,E=m.close,_=m.onError,x=m.checkClose,O=m.export,D=m.resize,T=m.init,W=function(){return f},k=function(){return d},R=function(e){a.push(e)},j=function(e){return D.fireAndForget({width:e.width,height:e.height})},I=function(e){return l.resolve(e),O(e)},A=function(e){var t=(void 0===e?{}:e).anyParent,o=[],i=n.parent;if(void 0===t&&(t=!i),!t&&!i)throw new Error("No parent found for "+r+" child");for(var a=0,u=N(window);a<u.length;a++){var c=u[a];if(C(c)){var s=S(c).xprops;if(s&&W()===s.getParent()){var f=s.parent;if(t||!i||f&&f.uid===i.uid){var d=cr(c,(function(e){return e.exports}));o.push({props:s,exports:d})}}}}return o},z=function(e,o,i){void 0===i&&(i=!1);var u=function(e,n,r,t,o,i){void 0===i&&(i=!1);for(var a={},u=0,c=Object.keys(r);u<c.length;u++){var s=c[u],f=n[s];if(!f||!f.sameDomain||t===P(window)&&C(e)){var d=xr(n,0,s,r[s],o);a[s]=d,f&&f.alias&&!a[f.alias]&&(a[f.alias]=d)}}if(!i)for(var l=0,h=Object.keys(n);l<h.length;l++){var p=h[l];r.hasOwnProperty(p)||(a[p]=xr(n,0,p,void 0,o))}return a}(f,t,e,o,{tag:r,show:g,hide:b,close:E,focus:Or,onError:_,resize:j,getSiblings:A,onProps:R,getParent:W,getParentDomain:k,uid:w,export:I},i);n?ve(n,u):n=u;for(var c=0;c<a.length;c++)(0,a[c])(n)},F=function(e){return p.try((function(){return z(e,d,!0)}))};return{init:function(){return p.try((function(){return C(f)&&function(e){var n=e.componentName,r=e.parentComponentWindow,t=hr({data:gr(window.name).serializedInitialPayload,sender:{win:r},basic:!0}),o=t.sender;if("uid"===t.reference.type||"global"===t.metaData.windowRef.type){var i=lr({data:t.data,metaData:{windowRef:_r(r)},sender:{domain:o.domain},receiver:{win:window,domain:P()},basic:!0});window.name=yr({name:n,serializedPayload:i.serializedData})}}({componentName:e.name,parentComponentWindow:f}),ur(window).exports=e.exports({getExports:function(){return l}}),function(e,n){if(!B(e,n))throw new Error("Can not be rendered by domain: "+n)}(i,d),mn(f),window.addEventListener("beforeunload",(function(){x.fireAndForget()})),window.addEventListener("unload",(function(){x.fireAndForget()})),H(f,(function(){Pr()})),T({updateProps:F,close:Pr})})).then((function(){return(e=o.width,n=void 0!==e&&e,r=o.height,t=void 0!==r&&r,i=o.element,Ae(void 0===i?"body":i).catch(he).then((function(e){return{width:n,height:t,element:e}}))).then((function(e){var n=e.width,r=e.height,t=e.element;t&&(n||r)&&v!==mr.POPUP&&Ve(t,(function(e){j({width:n?e.width:void 0,height:r?e.height:void 0})}),{width:n,height:r})}));var e,n,r,t,i})).catch((function(e){_(e)}))},getProps:function(){return n||(z(y,d),n)}}}(t);return e.init(),e}}));if(h(),n=rr("zoid_allow_delegate_"+o,(function(){return!0})),r=rr("zoid_delegate_"+o,(function(e){var n=e.data;return{parent:Wr({uid:n.uid,options:t,overrides:n.overrides,parentWin:e.source})}})),jr.register(n.cancel),jr.register(r.cancel),f.components=f.components||{},f.components[a])throw new Error("Can not register multiple components with the same tag: "+a);return f.components[a]=!0,{init:function e(n){var r,f="zoid-"+a+"-"+ae(),l=n||{},h=c({props:l}),w=h.eligible,m=h.reason,v=l.onDestroy;l.onDestroy=function(){if(r&&w&&d.splice(d.indexOf(r),1),v)return v.apply(void 0,arguments)};var y=Wr({uid:f,options:t});y.init(),w?y.setProps(l):l.onDestroy&&l.onDestroy(),Rr.register((function(e){return y.destroy(e||new Error("zoid destroyed all components"))}));var g=function(n){var r=(void 0===n?{}:n).decorate;return e((void 0===r?ye:r)(l))},b=function(e,n,t){return p.try((function(){if(!w){var n=new Error(m||o+" component is not eligible");return y.destroy(n).then((function(){throw n}))}if(!Y(e))throw new Error("Must pass window to renderTo");return function(e,n){return p.try((function(){if(e.window)return ir(e.window).getType();if(n){if(n!==mr.IFRAME&&n!==mr.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(l,t)})).then((function(o){if(n=function(e,n){if(n){if("string"!=typeof n&&!je(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===mr.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(o,n),e!==window&&"string"!=typeof n)throw new Error("Must pass string element when rendering to another window");return y.render({target:e,container:n,context:o,rerender:function(){var o=g();return ve(r,o),o.renderTo(e,n,t)}})})).catch((function(e){return y.destroy(e).then((function(){throw e}))}))};return r=i({},y.getExports(),y.getHelpers(),function(){for(var e=s(),n={},r=function(r,t){var o=t[r],a=e[o];n[o]=function(e){var n=y.getProps(),r=i({},e,{parent:{uid:f,props:n,export:y.export}});return a(r)}},t=0,o=Object.keys(e);t<o.length;t++)r(t,o);return n}(),{isEligible:function(){return w},clone:g,render:function(e,n){return b(window,e,n)},renderTo:function(e,n,r){return b(e,n,r)}}),w&&d.push(r),r},instances:d,driver:function(e,n){throw new Error("Driver support not enabled")},isChild:l,canRenderTo:function(e){return or(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:h}}var Ar=function(e){var n,r,t,o;tn().initialized||(tn().initialized=!0,r=(n={on:rr,send:or}).on,t=n.send,(o=tn()).receiveMessage=o.receiveMessage||function(e){return nr(e,{on:r,send:t})},function(e){var n=e.on,r=e.send;an().getOrSet("postMessageListener",(function(){return qe(window,"message",(function(e){!function(e,n){var r=n.on,t=n.send;p.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");nr({source:n,origin:o,data:i},{on:r,send:t})}}))}(e,{on:n,send:r})}))}))}({on:rr,send:or}),zn({on:rr,send:or,receiveMessage:nr}),function(e){var n=e.on,r=e.send;an("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ln(e.source,{domain:e.origin}),{instanceID:dn()}})),t=L();return t&&hn(t,{send:r}).catch((function(e){})),e}))}({on:rr,send:or}));var i=Ir(e),a=function(e){return i.init(e)};a.driver=function(e,n){return i.driver(e,n)},a.isChild=function(){return i.isChild()},a.canRenderTo=function(e){return i.canRenderTo(e)},a.instances=i.instances;var u=i.registerChild();return u&&(window.xprops=a.xprops=u.getProps()),a};function zr(e){tr&&tr.destroyBridges();var n=Rr.all(e);return Rr=Oe(),n}var Fr=zr;function Lr(e){var n;return Fr(),delete window.__zoid_9_0_82__,function(){for(var e=an("responseListeners"),n=0,r=e.keys();n<r.length;n++){var t=r[n],o=e.get(t);o&&(o.cancelled=!0),e.del(t)}}(),(n=an().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_44__,jr.all(e)}}])},175:function(e,n,r){var t=r(155);t&&t.env&&t.env.ZOID_FRAME_ONLY?(e.exports=r(145),e.exports.default=e.exports):(e.exports=r(548),e.exports.default=e.exports)}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};return function(){"use strict";function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}r.r(t),r.d(t,{Auth:function(){return O}});var n=function(){function n(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),this.events={}}var r,t,o;return r=n,t=[{key:"_getEventListByName",value:function(e){return void 0===this.events[e]&&(this.events[e]=new Set),this.events[e]}},{key:"on",value:function(e,n){this._getEventListByName(e).add(n)}},{key:"once",value:function(e,n){var r=this;this.on(e,(function t(){r.removeListener(e,t);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];n.apply(r,i)}))}},{key:"emit",value:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),t=1;t<n;t++)r[t-1]=arguments[t];this._getEventListByName(e).forEach(function(e){e.apply(this,r)}.bind(this))}},{key:"removeListener",value:function(e,n){this._getEventListByName(e).delete(n)}}],t&&e(r.prototype,t),o&&e(r,o),n}(),o=n,i=Object.freeze({Production:{AuthURL:"https://auth.onzauth.com",IdpURL:"https://idp.onzauth.com",IdpApiURL:"https://idp-api.onzauth.com"}}),a=Object.freeze({OnAuthenticated:"authenticated",OnClosed:"closed",OnError:"error",OnRefreshed:"refreshed",OnLoggedOut:"logged_out"}),u=r(175),c=r.n(u),s=c().create({tag:"onz-login-component",url:function(e){var n=e.props;return new URL("signin",n.idpURL).href},dimensions:{width:"350px",height:"575px"},autoResize:{width:!1,height:!1},props:{idpURL:{type:"string",required:!0},clientID:{type:"string",required:!0,queryParam:"client_id"},onLogin:{type:"function",required:!0},onLoginError:{type:"function",required:!0}},attributes:{iframe:{allow:"publickey-credentials-get *"}}}),f=c().create({tag:"onz-logout-component",url:function(e){var n=e.props;return new URL("logout",n.idpURL).href},dimensions:{width:"0px",height:"0px"},props:{idpURL:{type:"string",required:!0},idToken:{type:"string",required:!0,queryParam:"id_token"},clientID:{type:"string",required:!0,queryParam:"client_id"},onLogout:{type:"function",required:!0},onLogoutError:{type:"function",required:!0}}}),d=r(669),l=r.n(d);function h(e){this.message=e}h.prototype=new Error,h.prototype.name="InvalidCharacterError";var p="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new h("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,t,o=0,i=0,a="";t=n.charAt(i++);~t&&(r=o%4?64*r+t:t,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t);return a};function w(e){var n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(p(e).replace(/(.)/g,(function(e,n){var r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(n)}catch(e){return p(n)}}function m(e){this.message=e}m.prototype=new Error,m.prototype.name="InvalidTokenError";var v=function(e,n){if("string"!=typeof e)throw new m("Invalid token specified");var r=!0===(n=n||{}).header?0:1;try{return JSON.parse(w(e.split(".")[r]))}catch(e){throw new m("Invalid token specified: "+e.message)}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function b(e,n){return b=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},b(e,n)}function E(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,t=x(e);if(n){var o=x(this).constructor;r=Reflect.construct(t,arguments,o)}else r=t.apply(this,arguments);return _(this,r)}}function _(e,n){if(n&&("object"===y(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}var O=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&b(e,n)}(u,e);var n,r,t,o=E(u);function u(e){var n,r;if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),r=o.call(this),!e)throw new Exception("invalid auth options");if(!e.clientID)throw new Exception("invalid clientID");return r.clientID=e.clientID,r.containerID=null!==(n=e.containerID)&&void 0!==n?n:"container",r.isIframe=e.isIframe?"iframe":"popup",r._currentComponent=null,r._initialiseURL(),r}return n=u,r=[{key:"_initialiseURL",value:function(){this.urls=i.Production}},{key:"_newLoginComponent",value:function(){var e=this;return s({clientID:this.clientID,idpURL:this.urls.IdpURL,onLogin:function(n){e._setSession(n),e.emit(a.OnAuthenticated,n)},onLoginError:function(n){e.emit(a.OnError,n)},onClose:function(){e.emit(a.OnClosed),e._currentComponent=null},onError:function(n){var r=n&&n.message?n.message.toString():n;e.emit(a.OnError,r)}})}},{key:"_newLogoutComponent",value:function(e){var n=this;return f({idToken:e,clientID:this.clientID,idpURL:this.urls.IdpURL,onLogout:function(){n._setSession(null),n.emit(a.OnLoggedOut)},onLogoutError:function(e){n.emit(a.OnError,e)},onClose:function(){n.emit(a.OnClosed)},onError:function(e){var r=e&&e.message?e.message.toString():e;n.emit(a.OnError,r)}})}},{key:"_setSession",value:function(e){e?(e.accessToken&&localStorage.setItem("access_token",e.accessToken),e.idToken&&localStorage.setItem("id_token",e.idToken),e.refreshToken&&localStorage.setItem("refresh_token",e.refreshToken),e.expiry&&localStorage.setItem("expiry",e.expiry)):(localStorage.removeItem("access_token"),localStorage.removeItem("id_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("expiry"))}},{key:"showLogin",value:function(){var e=this;this._currentComponent?this._currentComponent.close().then((function(){e.emit(a.OnClosed),e._currentComponent=e._newLoginComponent(),e._currentComponent.render("#".concat(e.containerID),e.isIframe)})):(this._currentComponent=this._newLoginComponent(),this._currentComponent.render("#".concat(this.containerID),this.isIframe))}},{key:"isLoggingIn",value:function(){return this._currentComponent}},{key:"updateOptions",value:function(e){e.clientID&&e.clientID!==this.clientID&&(this.clientID=e.clientID),e.containerID&&e.containerID!==this.containerID&&(this.containerID=e.containerID),!!e.isIframe!=("iframe"===this.isIframe)&&(this.isIframe=e.isIframe?"iframe":"popup")}},{key:"close",value:function(){var e=this;this._currentComponent&&this._currentComponent.close().then((function(){e.emit(a.OnClosed)}))}},{key:"refreshAccessToken",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getRefreshToken(),r=new URL("public/refresh",this.urls.IdpApiURL).href;l().post(r,{clientId:this.clientID,refreshToken:n}).then((function(n){n.data&&(e._setSession(n.data),e.emit(a.OnRefreshed,n.data))})).catch((function(n){n.response&&n.response.data&&n.response.data.message?e.emit(a.OnError,n.response.data.message):e.emit(a.OnError,"unknown-error")}))}},{key:"logout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getIDToken();if(e){var n=document.getElementById("onzHiddenFrame");if(null===n){var r=document.createElement("div");r.id="onzHiddenFrame",r.style.display="none",document.body.appendChild(r)}this._newLogoutComponent(e).render("#onzHiddenFrame")}else this.emit(a.OnError,"no id token provided")}},{key:"isAuthenticated",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAccessToken();if(!e)return!1;var n=v(e),r=Date.now()/1e3;return!(n.exp<r)}},{key:"getOAuthTokens",value:function(){return localStorage.getItem("access_token")?{accessToken:localStorage.getItem("access_token"),idToken:localStorage.getItem("id_token"),refreshToken:localStorage.getItem("refresh_token"),expiry:localStorage.getItem("expiry")}:null}},{key:"getAccessToken",value:function(){return window.localStorage.getItem("access_token")}},{key:"getDecodedAccessToken",value:function(){var e=this.getAccessToken(),n=v(e);return n||null}},{key:"getIDToken",value:function(){return window.localStorage.getItem("id_token")}},{key:"getDecodedIDToken",value:function(){var e=this.getIDToken(),n=v(e);return n||null}},{key:"getRefreshToken",value:function(){return window.localStorage.getItem("refresh_token")}}],r&&g(n.prototype,r),t&&g(n,t),u}(o)}(),t}()}));
//# sourceMappingURL=onz-auth-js-sdk.min.js.map