@soyio/soyio-widget 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ function Kr(w, y, D, W) {
|
|
|
33
33
|
if (!E)
|
|
34
34
|
throw new Error("Iframe container does not exist");
|
|
35
35
|
const v = document.createElement("iframe");
|
|
36
|
-
return v.src = Yr(w, y, D, W), v.id = Wn, v.style.zIndex = String(Number.MAX_SAFE_INTEGER), v.style.width = "100%", v.style.height = "100%", v.allow = "autoplay", v.allow = "camera", v.allow = "publickey-credentials-create", v.allow = "publickey-credentials-get", E.appendChild(v), v;
|
|
36
|
+
return v.src = Yr(w, y, D, W), v.id = Wn, v.style.zIndex = String(Number.MAX_SAFE_INTEGER), v.style.width = "100%", v.style.height = "100%", v.allow = "autoplay", v.allow = "camera", v.allow = "publickey-credentials-create *", v.allow = "publickey-credentials-get", E.appendChild(v), v;
|
|
37
37
|
}
|
|
38
38
|
function Qr(w, y, D, W) {
|
|
39
39
|
return kr() ? document.getElementById(Wn) : Kr(w, y, D, W);
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(R,P){typeof exports=="object"&&typeof module<"u"?module.exports=P():typeof define=="function"&&define.amd?define(P):(R=typeof globalThis<"u"?globalThis:R||self,R["soyio-widget"]=P())})(this,function(){"use strict";var ut=Object.defineProperty;var ct=(R,P,L)=>P in R?ut(R,P,{enumerable:!0,configurable:!0,writable:!0,value:L}):R[P]=L;var nn=(R,P,L)=>(ct(R,typeof P!="symbol"?P+"":P,L),L),st=(R,P,L)=>{if(!P.has(R))throw TypeError("Cannot "+L)};var Cn=(R,P,L)=>{if(P.has(R))throw TypeError("Cannot add the same private member more than once");P instanceof WeakSet?P.add(R):P.set(R,L)};var Mn=(R,P,L)=>(st(R,P,"access private method"),L);var ln,ge,vn,ye;const R="soyio-widget-iframe-container",P="soyio-widget-iframe",L="https://app.soyio.id/widget",Ee="https://sandbox.soyio.id/widget",We=["IDENTITY_AUTHENTICATED","IDENTITY_REGISTERED"];function xe(W,D,H,y){const g=y||(H?Ee:L),v=`platform=web&companyId=${encodeURIComponent(D.companyId)}`,x=D.userEmail?`&userEmail=${D.userEmail}`:"";switch(W){case"authenticate":return`${g}/authenticate?${v}&identityId=${D.identityId}`;case"register":return`${g}/register?${v}&flowTemplateId=${D.flowTemplateId}${x}`;default:return"INVALID_PARAMS"}}function Se(){return!!document.getElementById(P)}function Ie(){return document.getElementById(R)}function be(W,D,H,y){const g=Ie();if(!g)throw new Error("Iframe container does not exist");const v=document.createElement("iframe");return v.src=xe(W,D,H,y),v.id=P,v.style.zIndex=String(Number.MAX_SAFE_INTEGER),v.style.width="100%",v.style.height="100%",v.allow="autoplay",v.allow="camera",v.allow="publickey-credentials-create",v.allow="publickey-credentials-get",g.appendChild(v),v}function Pe(W,D,H,y){return Se()?document.getElementById(P):be(W,D,H,y)}function Ln(){const W=document.getElementById(P);W&&W.remove()}var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var Fn={exports:{}},Bn={exports:{}};(function(W,D){(function(H,y){W.exports=y()})(typeof self<"u"?self:Oe,function(){return function(H){var y={};function g(v){if(y[v])return y[v].exports;var x=y[v]={i:v,l:!1,exports:{}};return H[v].call(x.exports,x,x.exports,g),x.l=!0,x.exports}return g.m=H,g.c=y,g.d=function(v,x,Z){g.o(v,x)||Object.defineProperty(v,x,{enumerable:!0,get:Z})},g.r=function(v){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},g.t=function(v,x){if(1&x&&(v=g(v)),8&x||4&x&&typeof v=="object"&&v&&v.__esModule)return v;var Z=Object.create(null);if(g.r(Z),Object.defineProperty(Z,"default",{enumerable:!0,value:v}),2&x&&typeof v!="string")for(var en in v)g.d(Z,en,(function(wn){return v[wn]}).bind(null,en));return Z},g.n=function(v){var x=v&&v.__esModule?function(){return v.default}:function(){return v};return g.d(x,"a",x),x},g.o=function(v,x){return{}.hasOwnProperty.call(v,x)},g.p="",g(g.s=0)}([function(H,y,g){g.r(y),g.d(y,"Promise",function(){return S}),g.d(y,"TYPES",function(){return it}),g.d(y,"ProxyWindow",function(){return U}),g.d(y,"setup",function(){return pe}),g.d(y,"destroy",function(){return ot}),g.d(y,"serializeMessage",function(){return nt}),g.d(y,"deserializeMessage",function(){return et}),g.d(y,"createProxyWindow",function(){return tt}),g.d(y,"toProxyWindow",function(){return rt}),g.d(y,"on",function(){return V}),g.d(y,"once",function(){return _e}),g.d(y,"send",function(){return $}),g.d(y,"markWindowKnown",function(){return ie}),g.d(y,"cleanUpWindow",function(){return at}),g.d(y,"bridge",function(){});function v(n){return{}.toString.call(n)==="[object RegExp]"}var x=`Call was rejected by callee.\r
|
|
1
|
+
(function(R,P){typeof exports=="object"&&typeof module<"u"?module.exports=P():typeof define=="function"&&define.amd?define(P):(R=typeof globalThis<"u"?globalThis:R||self,R["soyio-widget"]=P())})(this,function(){"use strict";var ut=Object.defineProperty;var ct=(R,P,L)=>P in R?ut(R,P,{enumerable:!0,configurable:!0,writable:!0,value:L}):R[P]=L;var nn=(R,P,L)=>(ct(R,typeof P!="symbol"?P+"":P,L),L),st=(R,P,L)=>{if(!P.has(R))throw TypeError("Cannot "+L)};var Cn=(R,P,L)=>{if(P.has(R))throw TypeError("Cannot add the same private member more than once");P instanceof WeakSet?P.add(R):P.set(R,L)};var Mn=(R,P,L)=>(st(R,P,"access private method"),L);var ln,ge,vn,ye;const R="soyio-widget-iframe-container",P="soyio-widget-iframe",L="https://app.soyio.id/widget",Ee="https://sandbox.soyio.id/widget",We=["IDENTITY_AUTHENTICATED","IDENTITY_REGISTERED"];function xe(W,D,H,y){const g=y||(H?Ee:L),v=`platform=web&companyId=${encodeURIComponent(D.companyId)}`,x=D.userEmail?`&userEmail=${D.userEmail}`:"";switch(W){case"authenticate":return`${g}/authenticate?${v}&identityId=${D.identityId}`;case"register":return`${g}/register?${v}&flowTemplateId=${D.flowTemplateId}${x}`;default:return"INVALID_PARAMS"}}function Se(){return!!document.getElementById(P)}function Ie(){return document.getElementById(R)}function be(W,D,H,y){const g=Ie();if(!g)throw new Error("Iframe container does not exist");const v=document.createElement("iframe");return v.src=xe(W,D,H,y),v.id=P,v.style.zIndex=String(Number.MAX_SAFE_INTEGER),v.style.width="100%",v.style.height="100%",v.allow="autoplay",v.allow="camera",v.allow="publickey-credentials-create *",v.allow="publickey-credentials-get",g.appendChild(v),v}function Pe(W,D,H,y){return Se()?document.getElementById(P):be(W,D,H,y)}function Ln(){const W=document.getElementById(P);W&&W.remove()}var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var Fn={exports:{}},Bn={exports:{}};(function(W,D){(function(H,y){W.exports=y()})(typeof self<"u"?self:Oe,function(){return function(H){var y={};function g(v){if(y[v])return y[v].exports;var x=y[v]={i:v,l:!1,exports:{}};return H[v].call(x.exports,x,x.exports,g),x.l=!0,x.exports}return g.m=H,g.c=y,g.d=function(v,x,Z){g.o(v,x)||Object.defineProperty(v,x,{enumerable:!0,get:Z})},g.r=function(v){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},g.t=function(v,x){if(1&x&&(v=g(v)),8&x||4&x&&typeof v=="object"&&v&&v.__esModule)return v;var Z=Object.create(null);if(g.r(Z),Object.defineProperty(Z,"default",{enumerable:!0,value:v}),2&x&&typeof v!="string")for(var en in v)g.d(Z,en,(function(wn){return v[wn]}).bind(null,en));return Z},g.n=function(v){var x=v&&v.__esModule?function(){return v.default}:function(){return v};return g.d(x,"a",x),x},g.o=function(v,x){return{}.hasOwnProperty.call(v,x)},g.p="",g(g.s=0)}([function(H,y,g){g.r(y),g.d(y,"Promise",function(){return S}),g.d(y,"TYPES",function(){return it}),g.d(y,"ProxyWindow",function(){return U}),g.d(y,"setup",function(){return pe}),g.d(y,"destroy",function(){return ot}),g.d(y,"serializeMessage",function(){return nt}),g.d(y,"deserializeMessage",function(){return et}),g.d(y,"createProxyWindow",function(){return tt}),g.d(y,"toProxyWindow",function(){return rt}),g.d(y,"on",function(){return V}),g.d(y,"once",function(){return _e}),g.d(y,"send",function(){return $}),g.d(y,"markWindowKnown",function(){return ie}),g.d(y,"cleanUpWindow",function(){return at}),g.d(y,"bridge",function(){});function v(n){return{}.toString.call(n)==="[object RegExp]"}var x=`Call was rejected by callee.\r
|
|
2
2
|
`;function Z(n){return n===void 0&&(n=window),n.location.protocol}function en(n){if(n===void 0&&(n=window),n.mockDomain){var t=n.mockDomain.split("//")[0];if(t)return t}return Z(n)}function wn(n){return n===void 0&&(n=window),en(n)==="about:"}function Y(n){if(n===void 0&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch{}}function Un(n){if(n===void 0&&(n=window),n&&!Y(n))try{return n.opener}catch{}}function mn(n){try{return!0}catch{}return!1}function pn(n){n===void 0&&(n=window);var t=n.location;if(!t)throw new Error("Can not read window location");var e=Z(n);if(!e)throw new Error("Can not read window protocol");if(e==="file:")return"file://";if(e==="about:"){var r=Y(n);return r&&mn()?pn(r):"about://"}var o=t.host;if(!o)throw new Error("Can not read window host");return e+"//"+o}function C(n){n===void 0&&(n=window);var t=pn(n);return t&&n.mockDomain&&n.mockDomain.indexOf("mock:")===0?n.mockDomain:t}function k(n){if(!function(t){try{if(t===window)return!0}catch{}try{var e=Object.getOwnPropertyDescriptor(t,"location");if(e&&e.enumerable===!1)return!1}catch{}try{if(wn(t)&&mn())return!0}catch{}try{if(function(r){return r===void 0&&(r=window),en(r)==="mock:"}(t)&&mn())return!0}catch{}try{if(pn(t)===pn(window))return!0}catch{}return!1}(n))return!1;try{if(n===window||wn(n)&&mn()||C(window)===C(n))return!0}catch{}return!1}function gn(n){if(!k(n))throw new Error("Expected window to be same domain");return n}function Hn(n,t){if(!n||!t)return!1;var e=Y(t);return e?e===n:function(r){var o=[];try{for(;r.parent!==r;)o.push(r.parent),r=r.parent}catch{}return o}(t).indexOf(n)!==-1}function Gn(n){var t=[],e;try{e=n.frames}catch{e=n}var r;try{r=e.length}catch{}if(r===0)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=e[o]}catch{continue}t.push(i)}return t}for(var a=0;a<100;a++){var s=void 0;try{s=e[a]}catch{return t}if(!s)return t;t.push(s)}return t}var Fe=[],Be=[];function G(n,t){t===void 0&&(t=!0);try{if(n===window)return!1}catch{return!0}try{if(!n)return!0}catch{return!0}try{if(n.closed)return!0}catch(o){return!o||o.message!==x}if(t&&k(n))try{if(n.mockclosed)return!0}catch{}try{if(!n.parent||!n.top)return!0}catch{}var e=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch{}return-1}(Fe,n);if(e!==-1){var r=Be[e];if(r&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(r))return!0}return!1}function Jn(n){return n===void 0&&(n=window),Un(n=n||window)||Y(n)||void 0}function _(n,t){if(typeof n=="string"){if(typeof t=="string")return n==="*"||t===n;if(v(t)||Array.isArray(t))return!1}return v(n)?v(t)?n.toString()===t.toString():!Array.isArray(t)&&!!t.match(n):!!Array.isArray(n)&&(Array.isArray(t)?JSON.stringify(n)===JSON.stringify(t):!v(t)&&n.some(function(e){return _(e,t)}))}function yn(n){try{if(n===window)return!0}catch(t){if(t&&t.message===x)return!0}try{if({}.toString.call(n)==="[object Window]")return!0}catch(t){if(t&&t.message===x)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(t){if(t&&t.message===x)return!0}try{if(n&&n.self===n)return!0}catch(t){if(t&&t.message===x)return!0}try{if(n&&n.parent===n)return!0}catch(t){if(t&&t.message===x)return!0}try{if(n&&n.top===n)return!0}catch(t){if(t&&t.message===x)return!0}try{if(n&&n.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch{return!0}try{if("postMessage"in n&&"self"in n&&"location"in n)return!0}catch{}return!1}function qn(n){if(k(n))return gn(n).frameElement;for(var t=0,e=document.querySelectorAll("iframe");t<e.length;t++){var r=e[t];if(r&&r.contentWindow&&r.contentWindow===n)return r}}function Ue(n){if(function(e){return e===void 0&&(e=window),!!Y(e)}(n)){var t=qn(n);if(t&&t.parentElement){t.parentElement.removeChild(t);return}}try{n.close()}catch{}}function X(n){try{if(!n)return!1;if(typeof Promise<"u"&&n instanceof Promise)return!0;if(typeof window<"u"&&typeof window.Window=="function"&&n instanceof window.Window||typeof window<"u"&&typeof window.constructor=="function"&&n instanceof window.constructor)return!1;var t={}.toString;if(t){var e=t.call(n);if(e==="[object Window]"||e==="[object global]"||e==="[object DOMWindow]")return!1}if(typeof n.then=="function")return!0}catch{return!1}return!1}var Zn=[],tn=[],In=0,rn;function Vn(){if(!In&&rn){var n=rn;rn=null,n.resolve()}}function bn(){In+=1}function on(){In-=1,Vn()}var S=function(){function n(e){var r=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 o,i,a=!1,s=!1,c=!1;bn();try{e(function(u){c?r.resolve(u):(a=!0,o=u)},function(u){c?r.reject(u):(s=!0,i=u)})}catch(u){on(),this.reject(u);return}on(),c=!0,a?this.resolve(o):s&&this.reject(i)}}var t=n.prototype;return t.resolve=function(e){if(this.resolved||this.rejected)return this;if(X(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},t.reject=function(e){var r=this;if(this.resolved||this.rejected)return this;if(X(e))throw new Error("Can not reject promise with another promise");if(!e){var o=e&&typeof e.toString=="function"?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+o)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){r.errorHandled||function(i,a){if(Zn.indexOf(i)===-1){Zn.push(i),setTimeout(function(){throw i},1);for(var s=0;s<tn.length;s++)tn[s](i,a)}}(e,r)},1),this.dispatch(),this},t.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},t.dispatch=function(){var e=this.resolved,r=this.rejected,o=this.handlers;if(!this.dispatching&&(e||r)){this.dispatching=!0,bn();for(var i=function(l,p){return l.then(function(w){p.resolve(w)},function(w){p.reject(w)})},a=0;a<o.length;a++){var s=o[a],c=s.onSuccess,u=s.onError,h=s.promise,f=void 0;if(e)try{f=c?c(this.value):this.value}catch(l){h.reject(l);continue}else if(r){if(!u){h.reject(this.error);continue}try{f=u(this.error)}catch(l){h.reject(l);continue}}if(f instanceof n&&(f.resolved||f.rejected)){var d=f;d.resolved?h.resolve(d.value):h.reject(d.error),d.errorHandled=!0}else X(f)?f instanceof n&&(f.resolved||f.rejected)?f.resolved?h.resolve(f.value):h.reject(f.error):i(f,h):h.resolve(f)}o.length=0,this.dispatching=!1,on()}},t.then=function(e,r){if(e&&typeof e!="function"&&!e.call)throw new Error("Promise.then expected a function for success handler");if(r&&typeof r!="function"&&!r.call)throw new Error("Promise.then expected a function for error handler");var o=new n;return this.handlers.push({promise:o,onSuccess:e,onError:r}),this.errorHandled=!0,this.dispatch(),o},t.catch=function(e){return this.then(void 0,e)},t.finally=function(e){if(e&&typeof e!="function"&&!e.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return n.try(e).then(function(){return r})},function(r){return n.try(e).then(function(){throw r})})},t.timeout=function(e,r){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(r||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(a){return clearTimeout(i),a})},t.toPromise=function(){if(typeof Promise>"u")throw new TypeError("Could not find Promise");return Promise.resolve(this)},t.lazy=function(){return this.errorHandled=!0,this},n.resolve=function(e){return e instanceof n?e:X(e)?new n(function(r,o){return e.then(r,o)}):new n().resolve(e)},n.reject=function(e){return new n().reject(e)},n.asyncReject=function(e){return new n().asyncReject(e)},n.all=function(e){var r=new n,o=e.length,i=[].slice();if(!o)return r.resolve(i),r;for(var a=function(u,h,f){return h.then(function(d){i[u]=d,(o-=1)==0&&r.resolve(i)},function(d){f.reject(d)})},s=0;s<e.length;s++){var c=e[s];if(c instanceof n){if(c.resolved){i[s]=c.value,o-=1;continue}}else if(!X(c)){i[s]=c,o-=1;continue}a(s,n.resolve(c),r)}return o===0&&r.resolve(i),r},n.hash=function(e){var r={},o=[],i=function(s){if(e.hasOwnProperty(s)){var c=e[s];X(c)?o.push(c.then(function(u){r[s]=u})):r[s]=c}};for(var a in e)i(a);return n.all(o).then(function(){return r})},n.map=function(e,r){return n.all(e.map(r))},n.onPossiblyUnhandledException=function(e){return function(r){return tn.push(r),{cancel:function(){tn.splice(tn.indexOf(r),1)}}}(e)},n.try=function(e,r,o){if(e&&typeof e!="function"&&!e.call)throw new Error("Promise.try expected a function");var i;bn();try{i=e.apply(r,o||[])}catch(a){return on(),n.reject(a)}return on(),n.resolve(i)},n.delay=function(e){return new n(function(r){setTimeout(r,e)})},n.isPromise=function(e){return!!(e&&e instanceof n)||X(e)},n.flush=function(){return function(e){var r=rn=rn||new e;return Vn(),r}(n)},n}();function En(n,t){for(var e=0;e<n.length;e++)try{if(n[e]===t)return e}catch{}return-1}var Pn=function(){function n(){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(typeof WeakMap>"u"||Object.freeze===void 0)return!1;try{var e=new WeakMap,r={};return Object.freeze(r),e.set(r,"__testvalue__"),e.get(r)==="__testvalue__"}catch{return!1}}())try{this.weakmap=new WeakMap}catch{}this.keys=[],this.values=[]}var t=n.prototype;return t._cleanupClosedWindows=function(){for(var e=this.weakmap,r=this.keys,o=0;o<r.length;o++){var i=r[o];if(yn(i)&&G(i)){if(e)try{e.delete(i)}catch{}r.splice(o,1),this.values.splice(o,1),o-=1}}},t.isSafeToReadWrite=function(e){return!yn(e)},t.set=function(e,r){if(!e)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(e,r)}catch{delete this.weakmap}if(this.isSafeToReadWrite(e))try{var i=this.name,a=e[i];a&&a[0]===e?a[1]=r:Object.defineProperty(e,i,{value:[e,r],writable:!0});return}catch{}this._cleanupClosedWindows();var s=this.keys,c=this.values,u=En(s,e);u===-1?(s.push(e),c.push(r)):c[u]=r},t.get=function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(e))return r.get(e)}catch{delete this.weakmap}if(this.isSafeToReadWrite(e))try{var o=e[this.name];return o&&o[0]===e?o[1]:void 0}catch{}this._cleanupClosedWindows();var i=En(this.keys,e);if(i!==-1)return this.values[i]},t.delete=function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(e)}catch{delete this.weakmap}if(this.isSafeToReadWrite(e))try{var o=e[this.name];o&&o[0]===e&&(o[0]=o[1]=void 0)}catch{}this._cleanupClosedWindows();var i=this.keys,a=En(i,e);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},t.has=function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(e))return!0}catch{delete this.weakmap}if(this.isSafeToReadWrite(e))try{var o=e[this.name];return!(!o||o[0]!==e)}catch{}return this._cleanupClosedWindows(),En(this.keys,e)!==-1},t.getOrSet=function(e,r){if(this.has(e))return this.get(e);var o=r();return this.set(e,o),o},n}();function $n(n){return n.name||n.__name__||n.displayName||"anonymous"}function Yn(n,t){try{delete n.name,n.name=t}catch{}return n.__name__=n.displayName=t,n}function q(){var n="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return n.charAt(Math.floor(Math.random()*n.length))})+"_"+function(t){if(typeof btoa=="function")return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(e,r){return String.fromCharCode(parseInt(r,16))})).replace(/[=]/g,"");if(typeof Buffer<"u")return Buffer.from(t,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var Wn;function kn(n){try{return JSON.stringify([].slice.call(n),function(t,e){return typeof e=="function"?"memoize["+function(r){if(Wn=Wn||new Pn,r==null||typeof r!="object"&&typeof r!="function")throw new Error("Invalid object");var o=Wn.get(r);return o||(o=typeof r+":"+q(),Wn.set(r,o)),o}(e)+"]":typeof window<"u"&&e instanceof window.Element||e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object"?{}:e})}catch{throw new Error("Arguments not serializable -- can not be used to memoize")}}function He(){return{}}var an=0,Xn=0;function un(n,t){t===void 0&&(t={});var e=t.thisNamespace,r=e!==void 0&&e,o=t.time,i,a,s=an;an+=1;var c=function(){for(var u=arguments.length,h=new Array(u),f=0;f<u;f++)h[f]=arguments[f];s<Xn&&(i=null,a=null,s=an,an+=1);var d;d=r?(a=a||new Pn).getOrSet(this,He):i=i||{};var l;try{l=kn(h)}catch{return n.apply(this,arguments)}var p=d[l];if(p&&o&&Date.now()-p.time<o&&(delete d[l],p=null),p)return p.value;var w=Date.now(),m=n.apply(this,arguments);return d[l]={time:w,value:m},m};return c.reset=function(){i=null,a=null},Yn(c,(t.name||$n(n))+"::memoized")}un.clear=function(){Xn=an};function Ge(n){var t={};function e(){for(var r=arguments,o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=kn(a);return t.hasOwnProperty(c)||(t[c]=S.try(function(){return n.apply(o,r)}).finally(function(){delete t[c]})),t[c]}return e.reset=function(){t={}},Yn(e,$n(n)+"::promiseMemoized")}function K(){}function cn(n,t){if(t===void 0&&(t=1),t>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if(typeof n=="string")return n;if(n instanceof Error){var e=n&&n.stack,r=n&&n.message;if(e&&r)return e.indexOf(r)!==-1?e:r+`
|
|
3
3
|
`+e;if(e)return e;if(r)return r}return n&&n.toString&&typeof n.toString=="function"?n.toString():{}.toString.call(n)}catch(o){return"Error while stringifying error: "+cn(o,t+1)}}function Kn(n){return typeof n=="string"?n:n&&n.toString&&typeof n.toString=="function"?n.toString():{}.toString.call(n)}un(function(n){if(Object.values)return Object.values(n);var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(n[e]);return t});function On(n){return{}.toString.call(n)==="[object RegExp]"}function sn(n,t,e){if(n.hasOwnProperty(t))return n[t];var r=e();return n[t]=r,r}function Qn(){var n=document.body;if(!n)throw new Error("Body element not found");return n}function _n(){return!!document.body&&document.readyState==="complete"}function ne(){return!!document.body&&document.readyState==="interactive"}un(function(){return new S(function(n){if(_n()||ne())return n();var t=setInterval(function(){if(_n()||ne())return clearInterval(t),n()},10)})});var xn=typeof document<"u"?document.currentScript:null,Je=un(function(){if(xn||(xn=function(){try{var n=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),t=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(n),e=t&&t[1];if(!e)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===e)return i}}catch{}}()))return xn;throw new Error("Can not determine current script")}),qe=q();un(function(){var n;try{n=Je()}catch{return qe}var t=n.getAttribute("data-uid");if(t&&typeof t=="string"||(t=n.getAttribute("data-uid-auto"))&&typeof t=="string")return t;if(n.src){var e=function(r){for(var o="",i=0;i<r.length;i++){var a=r[i].charCodeAt(0)*i;r[i+1]&&(a+=r[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:n.src,dataset:n.dataset}));t="uid_"+e.slice(e.length-30)}else t=q();return n.setAttribute("data-uid-auto",t),t});function fn(n){n===void 0&&(n=window);var t="__post_robot_10_0_46__";return n!==window?n[t]:n[t]=n[t]||{}}var ee=function(){return{}};function z(n,t){return n===void 0&&(n="store"),t===void 0&&(t=ee),sn(fn(),n,function(){var e=t();return{has:function(r){return e.hasOwnProperty(r)},get:function(r,o){return e.hasOwnProperty(r)?e[r]:o},set:function(r,o){return e[r]=o,o},del:function(r){delete e[r]},getOrSet:function(r,o){return sn(e,r,o)},reset:function(){e=t()},keys:function(){return Object.keys(e)}}})}var Ze=function(){};function Sn(){var n=fn();return n.WINDOW_WILDCARD=n.WINDOW_WILDCARD||new Ze,n.WINDOW_WILDCARD}function M(n,t){return n===void 0&&(n="store"),t===void 0&&(t=ee),z("windowStore").getOrSet(n,function(){var e=new Pn,r=function(o){return e.getOrSet(o,t)};return{has:function(o){return r(o).hasOwnProperty(n)},get:function(o,i){var a=r(o);return a.hasOwnProperty(n)?a[n]:i},set:function(o,i){return r(o)[n]=i,i},del:function(o){delete r(o)[n]},getOrSet:function(o,i){return sn(r(o),n,i)}}})}function te(){return z("instance").getOrSet("instanceID",q)}function re(n,t){var e=t.domain,r=M("helloPromises"),o=r.get(n);o&&o.resolve({domain:e});var i=S.resolve({domain:e});return r.set(n,i),i}function An(n,t){return(0,t.send)(n,"postrobot_hello",{instanceID:te()},{domain:"*",timeout:-1}).then(function(e){var r=e.origin,o=e.data.instanceID;return re(n,{domain:r}),{win:n,domain:r,instanceID:o}})}function oe(n,t){var e=t.send;return M("windowInstanceIDPromises").getOrSet(n,function(){return An(n,{send:e}).then(function(r){return r.instanceID})})}function ie(n){M("knownWindows").set(n,!0)}function Dn(n){return typeof n=="object"&&n!==null&&typeof n.__type__=="string"}function ae(n){return n===void 0?"undefined":n===null?"null":Array.isArray(n)?"array":typeof n=="function"?"function":typeof n=="object"?n instanceof Error?"error":typeof n.then=="function"?"promise":{}.toString.call(n)==="[object RegExp]"?"regex":{}.toString.call(n)==="[object Date]"?"date":"object":typeof n=="string"?"string":typeof n=="number"?"number":typeof n=="boolean"?"boolean":void 0}function Q(n,t){return{__type__:n,__val__:t}}var F,Ve=((F={}).function=function(){},F.error=function(n){return Q("error",{message:n.message,stack:n.stack,code:n.code,data:n.data})},F.promise=function(){},F.regex=function(n){return Q("regex",n.source)},F.date=function(n){return Q("date",n.toJSON())},F.array=function(n){return n},F.object=function(n){return n},F.string=function(n){return n},F.number=function(n){return n},F.boolean=function(n){return n},F.null=function(n){return n},F[void 0]=function(n){return Q("undefined",n)},F),$e={},B,Ye=((B={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},B.error=function(n){var t=n.stack,e=n.code,r=n.data,o=new Error(n.message);return o.code=e,r&&(o.data=r),o.stack=t+`
|
|
4
4
|
|