@regulaforensics/idv-capture-web 2.3.160-nightly → 2.3.162-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Vu, r as la, j as lD } from "./index-
|
|
1
|
+
import { B as Vu, r as la, j as lD } from "./index-lzRvKWCN.js";
|
|
2
2
|
var p0 = Object.defineProperty, k0 = Object.defineProperties, m0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, w0 = Object.prototype.hasOwnProperty, h0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? p0(M, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : M[r] = i, sl = (M, r) => {
|
|
3
3
|
for (var i in r || (r = {}))
|
|
4
4
|
w0.call(r, i) && sD(M, i, r[i]);
|
|
@@ -22,7 +22,7 @@ var Jc = (e) => {
|
|
|
22
22
|
throw l;
|
|
23
23
|
}, "return" in r && i("return"), o;
|
|
24
24
|
};
|
|
25
|
-
import { B as H0, r as dl, j as b4 } from "./index-
|
|
25
|
+
import { B as H0, r as dl, j as b4 } from "./index-lzRvKWCN.js";
|
|
26
26
|
var pv = Object.defineProperty, hv = Object.defineProperties, Ev = Object.getOwnPropertyDescriptors, y4 = Object.getOwnPropertySymbols, mv = Object.prototype.hasOwnProperty, Sv = Object.prototype.propertyIsEnumerable, h2 = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), Cv = (e) => {
|
|
27
27
|
throw TypeError(e);
|
|
28
28
|
}, M4 = (e, r, t) => r in e ? pv(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, rt = (e, r) => {
|
|
@@ -24732,7 +24732,7 @@ var Ft = O5.create("wasm_idv"), gW = /* @__PURE__ */ function() {
|
|
|
24732
24732
|
return Pr().wrap(function(v) {
|
|
24733
24733
|
for (; ; ) switch (v.prev = v.next) {
|
|
24734
24734
|
case 0:
|
|
24735
|
-
return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-
|
|
24735
|
+
return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-dee94fb3e//PlatformAdaptor.worker.js");
|
|
24736
24736
|
case 4:
|
|
24737
24737
|
return a = v.sent, v.next = 7, a.blob();
|
|
24738
24738
|
case 7:
|
|
@@ -24759,7 +24759,7 @@ var Ft = O5.create("wasm_idv"), gW = /* @__PURE__ */ function() {
|
|
|
24759
24759
|
}), v.next = 23, this.sendMessage({
|
|
24760
24760
|
target: "worker-init",
|
|
24761
24761
|
URL: document.URL,
|
|
24762
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-
|
|
24762
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-dee94fb3e/",
|
|
24763
24763
|
preMain: !0
|
|
24764
24764
|
});
|
|
24765
24765
|
case 23:
|
|
@@ -26064,9 +26064,9 @@ function t3() {
|
|
|
26064
26064
|
supportedTemplates: Si.getSupportedTemplates(),
|
|
26065
26065
|
component: Si
|
|
26066
26066
|
}], i = r3(r3({}, Qm.LIVENESS, function() {
|
|
26067
|
-
return import("./index-
|
|
26067
|
+
return import("./index-DB_0cnE_.js");
|
|
26068
26068
|
}), Qm.DOC_READER, function() {
|
|
26069
|
-
return import("./index-
|
|
26069
|
+
return import("./index-c43fiayi.js");
|
|
26070
26070
|
}), a = /* @__PURE__ */ Jr().mark(function p() {
|
|
26071
26071
|
var h, y, m;
|
|
26072
26072
|
return Jr().wrap(function(E) {
|
|
@@ -26384,7 +26384,7 @@ var BW = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
|
|
|
26384
26384
|
}, {
|
|
26385
26385
|
key: "version",
|
|
26386
26386
|
get: function() {
|
|
26387
|
-
return "".concat("2.3.
|
|
26387
|
+
return "".concat("2.3.162-nightly".trim());
|
|
26388
26388
|
}
|
|
26389
26389
|
}, {
|
|
26390
26390
|
key: "render",
|
|
@@ -26854,7 +26854,7 @@ var KW = /* @__PURE__ */ function() {
|
|
|
26854
26854
|
key: "version",
|
|
26855
26855
|
get: function() {
|
|
26856
26856
|
var t;
|
|
26857
|
-
return (t = "2.3.
|
|
26857
|
+
return (t = "2.3.162-nightly") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
|
|
26858
26858
|
}
|
|
26859
26859
|
}, {
|
|
26860
26860
|
key: "nonce",
|
package/dist/main.iife.js
CHANGED
|
@@ -73,7 +73,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
73
73
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ove(t,r){if(t){if(typeof t=="string")return hq(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hq(t,r):void 0}}function hq(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function Lve(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,l,c,f=[],d=!0,M=!1;try{if(l=(n=n.call(t)).next,r!==0)for(;!(d=(a=l.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function xve(t){if(Array.isArray(t))return t}var wve=function(r){var n=r.option,a=r.layout,u=r.dataSourceQuestion,l=r.register,c=r.watch,f=Or.useState(!1),d=Cve(f,2),M=d[0],I=d[1],y=dq(),p=String(u.id),N=c(p),E=N===String(n.id),D=a.option,m=a.optionSelected,j={borderRadius:D.cornerRadius,background:Ii(D.backgroundColor),borderColor:Ii(D.borderColor),borderWidth:D.borderWidth},T={borderRadius:m.cornerRadius,background:Ii(m.backgroundColor),borderColor:Ii(m.borderColor),borderWidth:m.borderWidth},A=M&&y?{outline:"2px solid ".concat(W4)}:{};return ie.jsx("div",{style:{display:"flex",flexGrow:1},children:ie.jsxs("label",{style:yq(yq({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},E?T:j),A),children:[ie.jsx("input",gi(Ot({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},l(p,{required:!!u.required,validate:fM(u.validators,!!u.required)})),{value:n.id,type:"radio",onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})),ie.jsx(Oo,gi(Ot({},E?m.title:D.title),{text:n.text}))]})},n.id)},bve=function(r){var n=r.layout,a=r.watch,u=r.register,l=r.dataSourceQuestion;return ie.jsx("div",{style:{boxSizing:"border-box"},children:ie.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ie.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ie.jsx(Oo,gi(Ot({},n.title),{text:l.text}))}),ie.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:l.options.map(function(c){return ie.jsx(wve,{register:u,watch:a,layout:n,option:c,dataSourceQuestion:l},c.id)})})]})})};function dg(t){"@babel/helpers - typeof";return dg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dg(t)}function Nq(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function XA(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Nq(Object(n),!0).forEach(function(a){Rve(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nq(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Rve(t,r,n){return(r=kve(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function kve(t){var r=zve(t,"string");return dg(r)=="symbol"?r:r+""}function zve(t,r){if(dg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(dg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Pve=function(r){var n=r.children,a=r.backgroundColor,u=r.cornerRadius,l=u===void 0?0:u,c=r.isError,f=r.isRequired,d=r.validationBorderColor,M=r.validationBorderWidth,I=XA({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Ii(a)||"transparent",borderRadius:l,padding:"16px",boxSizing:"border-box",height:"auto"},c&&XA(XA({},Ii(d)&&{borderColor:d,borderStyle:"solid"}),M&&{borderWidth:M}));return ie.jsxs("div",{style:I,children:[f&&ie.jsx("span",{style:{color:Ii(d),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function Uve(t,r){return Fve(t)||Yve(t,r)||Vve(t,r)||Hve()}function Hve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
74
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vve(t,r){if(t){if(typeof t=="string")return Eq(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Eq(t,r):void 0}}function Eq(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function Yve(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,l,c,f=[],d=!0,M=!1;try{if(l=(n=n.call(t)).next,r!==0)for(;!(d=(a=l.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function Fve(t){if(Array.isArray(t))return t}var Qve=function(r){var n=r.validationErrorsTypes,a=r.title;return n?ie.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(u){var l=Uve(u,2),c=l[0],f=l[1];return ie.jsx(Oo,gi(Ot({},a),{text:f}),c)})}):null},$ve=function(r){var n,a,u,l,c,f,d,M,I,y,p,N,E,D,m=r.layout,j=r.dataSourceQuestion,T=r.register,A=String(j.id),C=function(b){return b?b===P5.EMAIL?"email":b===P5.FREE_TEXT?"text":b===P5.NUMBER?"number":b===P5.SECURE?"password":"text":"text"};return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Oo,gi(Ot({},m.title),{text:j.text,htmlFor:A})),ie.jsx("input",gi(Ot({},T(A,{required:!!j.required,validate:fM(j.validators,!!j.required)})),{id:A,type:C((n=m.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=m==null||(u=m.textField)===null||u===void 0?void 0:u.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(l=m==null||(c=m.textField)===null||c===void 0?void 0:c.fontSize)!==null&&l!==void 0?l:15,color:(f=Ii(m==null||(d=m.textField)===null||d===void 0?void 0:d.fontColor))!==null&&f!==void 0?f:"#000000",height:"42px",borderWidth:(M=m==null||(I=m.textField)===null||I===void 0?void 0:I.borderWidth)!==null&&M!==void 0?M:1,borderColor:(y=Ii(m==null||(p=m.textField)===null||p===void 0?void 0:p.borderColor))!==null&&y!==void 0?y:"#d9d9d9",borderStyle:"solid",borderRadius:(N=m==null||(E=m.textField)===null||E===void 0?void 0:E.cornerRadius)!==null&&N!==void 0?N:8,padding:"11px",boxSizing:"border-box",outlineColor:W4},placeholder:(D=j.placeholder)!==null&&D!==void 0?D:"","data-id":A}))]})},Gve=function(r){var n,a,u,l,c,f,d,M,I,y,p,N=r.layout,E=r.dataSourceQuestion,D=r.register,m=String(E.id);return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Oo,gi(Ot({},N.title),{text:E.text,htmlFor:m})),ie.jsx("textarea",gi(Ot({},D(m,{required:!!E.required,validate:fM(E.validators,!!E.required)})),{id:m,placeholder:(n=E.placeholder)!==null&&n!==void 0?n:"",onChange:function(T){T.target.style.height="auto",T.target.style.height="".concat(T.target.scrollHeight-15,"px")},"data-id":m,style:{fontFamily:"sans-serif",fontSize:(a=N==null||(u=N.textField)===null||u===void 0?void 0:u.fontSize)!==null&&a!==void 0?a:15,color:(l=Ii(N==null||(c=N.textField)===null||c===void 0?void 0:c.fontColor))!==null&&l!==void 0?l:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(f=N==null||(d=N.textField)===null||d===void 0?void 0:d.borderWidth)!==null&&f!==void 0?f:1,borderColor:(M=Ii(N==null||(I=N.textField)===null||I===void 0?void 0:I.borderColor))!==null&&M!==void 0?M:"#d9d9d9",borderStyle:"solid",borderRadius:(y=N==null||(p=N.textField)===null||p===void 0?void 0:p.cornerRadius)!==null&&y!==void 0?y:8,padding:"11px",boxSizing:"border-box",outlineColor:W4}}))]})},Dq={},JA,vq;function mq(){if(vq)return JA;vq=1;var t=Xn(),r=Ns(),n=jo(),a=Aa(),u=j5(),l=V4(),c=Function,f=t([].concat),d=t([].join),M={},I=function(p,N,E){if(!a(M,N)){for(var D=[],m=0;m<N;m++)D[m]="a["+m+"]";M[N]=c("C,a","return new C("+d(D,",")+")")}return M[N](p,E)};return JA=l?c.bind:function(y){var p=r(this),N=p.prototype,E=u(arguments,1),D=function(){var j=f(E,u(arguments));return this instanceof D?I(p,j.length,j):p.apply(y,j)};return n(N)&&(D.prototype=N),D},JA}var Sq;function Bve(){if(Sq)return Dq;Sq=1;var t=zr(),r=mq();return t({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r}),Dq}Bve();var Tq={},Aq;function Zve(){if(Aq)return Tq;Aq=1;var t=zr(),r=ti(),n=x1();return t({target:"Object",stat:!0,sham:!r},{create:n}),Tq}Zve();var _q={},Cq;function Wve(){if(Cq)return _q;Cq=1;var t=zr(),r=yn(),n=Es(),a=G4(),u=F$(),l=r(function(){a(1)});return t({target:"Object",stat:!0,forced:l,sham:!u},{getPrototypeOf:function(f){return a(n(f))}}),_q}Wve();var jq={},Oq;function Kve(){if(Oq)return jq;Oq=1;var t=ti(),r=c0(),n=jo(),a=J$(),u=Es(),l=Kd(),c=Object.getPrototypeOf,f=Object.setPrototypeOf,d=Object.prototype,M="__proto__";if(t&&c&&f&&!(M in d))try{r(d,M,{configurable:!0,get:function(){return c(u(this))},set:function(y){var p=l(this);a(y)&&n(p)&&f(p,y)}})}catch(I){}return jq}Kve();var Lq={},xq;function qve(){if(xq)return Lq;xq=1;var t=zr(),r=_5();return t({target:"Object",stat:!0},{setPrototypeOf:r}),Lq}qve();var wq={},e_,bq;function Xve(){if(bq)return e_;bq=1;var t=L5(),r=F4(),n=TypeError;return e_=function(u){if(t(u))return u;throw new n(r(u)+" is not a constructor")},e_}var Rq;function Jve(){if(Rq)return wq;Rq=1;var t=zr(),r=J2(),n=A5(),a=mq(),u=Xve(),l=Na(),c=jo(),f=x1(),d=yn(),M=r("Reflect","construct"),I=Object.prototype,y=[].push,p=d(function(){function D(){}return!(M(function(){},[],D)instanceof D)}),N=!d(function(){M(function(){})}),E=p||N;return t({target:"Reflect",stat:!0,forced:E,sham:E},{construct:function(m,j){u(m),l(j);var T=arguments.length<3?m:u(arguments[2]);if(N&&!p)return M(m,j,T);if(m===T){switch(j.length){case 0:return new m;case 1:return new m(j[0]);case 2:return new m(j[0],j[1]);case 3:return new m(j[0],j[1],j[2]);case 4:return new m(j[0],j[1],j[2],j[3])}var A=[null];return n(y,A,j),new(n(a,m,A))}var C=T.prototype,x=f(c(C)?C:I),b=n(m,x,j);return c(b)?b:x}}),wq}Jve();function Mg(t){"@babel/helpers - typeof";return Mg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mg(t)}function eme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function kq(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,zq(a.key),a)}}function tme(t,r,n){return r&&kq(t.prototype,r),n&&kq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function z1(t,r,n){return(r=zq(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function zq(t){var r=rme(t,"string");return Mg(r)=="symbol"?r:r+""}function rme(t,r){if(Mg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Mg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Pq=function(){function t(r){var n=r.errorCode,a=r.errorCodeKey,u=r.message,l=r.underlyingError,c=r.underlyingBaseError,f=r.domain,d=r.module,M=r.errorEnumName,I=r.shortDomainCode;eme(this,t),z1(this,"errorCode",void 0),z1(this,"errorCodeKey",void 0),z1(this,"message",void 0),z1(this,"underlyingError",void 0),z1(this,"underlyingBaseError",void 0),z1(this,"domain",void 0),z1(this,"module",void 0),z1(this,"errorEnumName",void 0),z1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=u,this.underlyingError=l,this.underlyingBaseError=c,this.module=d,this.domain=f,this.errorEnumName=M,this.shortDomainCode=I}return tme(t,[{key:"lastUnderlyingError",get:function(){for(var n,a=this.underlyingBaseError;((u=a)===null||u===void 0?void 0:u.underlyingBaseError)instanceof t;){var u;a=a.underlyingBaseError}return(n=a)===null||n===void 0?void 0:n.underlyingError}},{key:"toObject",value:function(){var n={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof t&&(n.underlyingBaseError=this.underlyingBaseError.toObject()),n}},{key:"shortChain",get:function(){var n="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.shortChain)),n}},{key:"fullChain",get:function(){var n="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.fullChain)),n}}],[{key:"getErrorKey",value:function(n,a){var u=Object.keys(a).find(function(l){return a[l]===n});if(!u)throw new Error("Invalid errorCode: ".concat(n," in enum"));return u}}])}();function dM(t){"@babel/helpers - typeof";return dM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},dM(t)}function nme(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function ime(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ame(t,r,n){return r=Z5(r),ome(t,Uq()?Reflect.construct(r,n||[],Z5(t).constructor):r.apply(t,n))}function ome(t,r){if(r&&(dM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ume(t)}function ume(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uq(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Uq=function(){return!!t})()}function Z5(t){return Z5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z5(t)}function lme(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&t_(t,r)}function t_(t,r){return t_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},t_(t,r)}function r_(t,r,n){return(r=sme(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function sme(t){var r=cme(t,"string");return dM(r)=="symbol"?r:r+""}function cme(t,r){if(dM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(dM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var W5=function(t){function r(n){var a=n.errorCode,u=n.message,l=n.underlyingError,c=n.underlyingBaseError;ime(this,r);var f=Pq.getErrorKey(a,FW);return ame(this,r,[{errorCode:a,errorCodeKey:f,errorEnumName:r.ERROR_ENUM_NAME,module:r.MODULE,message:u,underlyingError:l,underlyingBaseError:c,domain:r.ERROR_ENUM_NAME,shortDomainCode:r.SHORT_CODE}])}return lme(r,t),nme(r)}(Pq);r_(W5,"MODULE",bA),r_(W5,"ERROR_ENUM_NAME","GuiModuleError"),r_(W5,"SHORT_CODE","GM");var fme=function(r){var n=r.header,a=r.title,u=r.buttons,l=r.footer,c=r.questions,f=r.dataSource,d=r.properties,M=r.backgroundColor,I=NT(),y=I.perform,p=d?xNe(f.questions,d):{},N=Or.useRef(null),E=zDe({criteriaMode:"all",defaultValues:p}),D=E.register,m=E.handleSubmit,j=E.formState.errors,T=E.reset,A=E.watch,C=E.control,x=function(V){y(ONe(V)),T()};return ie.jsx(eg,{header:n,footer:l,backgroundColor:M,children:ie.jsxs("form",{onSubmit:m(x),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ie.jsxs("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"flex-start",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"10px",height:"100%",width:"100%",overflow:"auto",position:"relative",backgroundColor:Ii(c.backgroundColor)||"transparent"},ref:N,children:[a&&ie.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ie.jsx(Oo,Ot({},a))}),ie.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:f.questions.map(function(b){var V,F=f.static,Y=function(K,X){return X.find(function(R){var G;if((G=R.questionIds)!==null&&G!==void 0&&G.length)return R.questionIds.find(function(q){return K===q})})},O=function(K,X){return X.find(function(R){return!R.questionIds&&R.answerType===K})},_=F?Y(String(b.id),c.itemTypes)||O(b.answerType,c.itemTypes):c.itemTypes.find(function($){return $.answerType===b.answerType});if(!_){var L=new W5({errorCode:FW.DECODING_FAILED,message:"The question template has not been found"});y(L);return}var z=_==null?void 0:_.displayType,U=b.id in j&&((V=j[b.id])===null||V===void 0?void 0:V.types);return ie.jsxs(Or.Fragment,{children:[ie.jsxs(Pve,{backgroundColor:_==null?void 0:_.backgroundColor,cornerRadius:_==null?void 0:_.cornerRadius,isError:!!U,isRequired:b.required,validationBorderColor:_==null?void 0:_.validationBorderColor,validationBorderWidth:_==null?void 0:_.validationBorderWidth,children:[z===lM.TEXT_EXPANDABLE&&ie.jsx(Gve,{layout:_,dataSourceQuestion:b,register:D}),z===lM.TEXT_SINGLE_LINE&&ie.jsx($ve,{layout:_,dataSourceQuestion:b,register:D}),z===lM.SELECTOR_OPTIONS&&ie.jsx(Sve,{layout:_,dataSourceQuestion:b,watch:A,register:D}),z===lM.SELECTOR_BUTTONS&&ie.jsx(bve,{layout:_,dataSourceQuestion:b,watch:A,register:D}),z===lM.SELECTOR_DROPDOWN&&ie.jsx(ive,{control:C,layout:_,dataSourceQuestion:b,parentElementRef:N}),z===lM.MULTI_SELECTOR_DROPDOWN&&ie.jsx(sve,{control:C,layout:_,dataSourceQuestion:b,parentElementRef:N})]}),U&&ie.jsx(Qve,{validationErrorsTypes:U,title:_.validationMessage})]},b.id)})})]}),!!(u!=null&&u.length)&&ie.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:u.map(function(b,V){return ie.jsx(rK,Ot({dataTestId:"question-button"},b),V)})})]})})},Hq=function(r){var n=r.templateId,a=r.templateLayout,u=r.dataSource,l=r.properties;if(!n||!a)return ie.jsx(cK,{});var c=l!=null&&l.length?JSON.stringify(l):"default-key";return n===f0.STATUS?ie.jsx(BEe,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===f0.INFO?ie.jsx(JEe,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,description:a==null?void 0:a.description,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===f0.PROGRESS?ie.jsx(cK,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,progressView:a==null?void 0:a.progressView,backgroundColor:a==null?void 0:a.backgroundColor}):n===f0.INFO_DETAILS?ie.jsx(IDe,{header:a==null?void 0:a.header,title:a==null?void 0:a.title,details:a==null?void 0:a.details,buttons:a==null?void 0:a.buttons,footer:a==null?void 0:a.footer,backgroundColor:a==null?void 0:a.backgroundColor}):u&&u!==null&&u!==void 0&&u.questions.length&&n===f0.QUESTIONS?ie.jsx(fme,{dataSource:u,properties:l,questions:a.questions,header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor},c):n===f0.QUESTIONS&&!u?ie.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: No data for questions"}):ie.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},n_=!1,n1=function(r){var n=r.moduleProps,a=r.perform,u=n,l=u.templateId,c=u.templateLayout,f=u.dataSource,d=u.properties,M=function(y){a&&a(y)};return l===f0.QUESTIONS?ie.jsx(EG,{perform:M,children:ie.jsx(Hq,{properties:d,dataSource:f,templateId:l,templateLayout:c})}):ie.jsx(EG,{perform:M,children:ie.jsx(Hq,{templateId:l,templateLayout:c})})};n1.getIdentifier=function(){return bA},n1.getSupportedTemplates=function(){return Object.values(f0)},n1.deinitialize=function(){n_=!1},n1.initialize=function(){n_=!0},n1.isReady=function(){return n_},n1.displayName=bA;var Vq={},Yq;function dme(){if(Yq)return Vq;Yq=1;var t=kt(),r=Sr(),n=Date,a=r(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),Vq}dme();var Fq={},Qq={},i_,$q;function Gq(){if($q)return i_;$q=1;var t=mr(),r=Wn(),n=an(),a=Eu(),u=r("iterator");return i_=!t(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),d="";return l.pathname="c%20d",c.forEach(function(M,I){c.delete("b"),d+=I+M}),f.delete("a",2),f.delete("b",void 0),a&&(!l.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!n)||!c.sort||l.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[u]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||d!=="a1c3"||new URL("https://x",void 0).host!=="x"}),i_}var a_,Bq;function Mme(){if(Bq)return a_;Bq=1;var t=an(),r=Sr(),n=Nn(),a=mr(),u=d4(),l=n5(),c=Jp(),f=Tu(),d=a4(),M=Object.assign,I=Object.defineProperty,y=r([].concat);return a_=!M||a(function(){if(t&&M({b:1},M(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},N={},E=Symbol("assign detection"),D="abcdefghijklmnopqrst";return p[E]=7,D.split("").forEach(function(m){N[m]=m}),M({},p)[E]!==7||u(M({},N)).join("")!==D})?function(N,E){for(var D=f(N),m=arguments.length,j=1,T=l.f,A=c.f;m>j;)for(var C=d(arguments[j++]),x=T?y(u(C),T(C)):u(C),b=x.length,V=0,F;b>V;)F=x[V++],(!t||n(A,C,F))&&(D[F]=C[F]);return D}:M,a_}var o_,Zq;function gme(){if(Zq)return o_;Zq=1;var t=Sr(),r=2147483647,n=36,a=1,u=26,l=38,c=700,f=72,d=128,M="-",I=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",N=n-a,E=RangeError,D=t(y.exec),m=Math.floor,j=String.fromCharCode,T=t("".charCodeAt),A=t([].join),C=t([].push),x=t("".replace),b=t("".split),V=t("".toLowerCase),F=function(L){for(var z=[],U=0,$=L.length;U<$;){var K=T(L,U++);if(K>=55296&&K<=56319&&U<$){var X=T(L,U++);(X&64512)===56320?C(z,((K&1023)<<10)+(X&1023)+65536):(C(z,K),U--)}else C(z,K)}return z},Y=function(L){return L+22+75*(L<26)},O=function(L,z,U){var $=0;for(L=U?m(L/c):L>>1,L+=m(L/z);L>N*u>>1;)L=m(L/N),$+=n;return m($+(N+1)*L/(L+l))},_=function(L){var z=[];L=F(L);var U=L.length,$=d,K=0,X=f,R,G;for(R=0;R<L.length;R++)G=L[R],G<128&&C(z,j(G));var q=z.length,w=q;for(q&&C(z,M);w<U;){var Z=r;for(R=0;R<L.length;R++)G=L[R],G>=$&&G<Z&&(Z=G);var de=w+1;if(Z-$>m((r-K)/de))throw new E(p);for(K+=(Z-$)*de,$=Z,R=0;R<L.length;R++){if(G=L[R],G<$&&++K>r)throw new E(p);if(G===$){for(var Me=K,le=n;;){var Ae=le<=X?a:le>=X+u?u:le-X;if(Me<Ae)break;var He=Me-Ae,he=n-Ae;C(z,j(Y(Ae+He%he))),Me=m(He/he),le+=n}C(z,j(Y(Me))),X=O(K,de,w===q),K=0,w++}}K++,$++}return A(z,"")};return o_=function(L){var z=[],U=b(x(V(L),y,"."),"."),$,K;for($=0;$<U.length;$++)K=U[$],C(z,D(I,K)?"xn--"+_(K):K);return A(z,".")},o_}var Wq={},Kq;function Ime(){if(Kq)return Wq;Kq=1;var t=kt(),r=Sr(),n=BN(),a=RangeError,u=String.fromCharCode,l=String.fromCodePoint,c=r([].join),f=!!l&&l.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(M){for(var I=[],y=arguments.length,p=0,N;y>p;){if(N=+arguments[p++],n(N,1114111)!==N)throw new a(N+" is not a valid code point");I[p]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),Wq}var u_,qq;function pme(){if(qq)return u_;qq=1;var t=n0(),r=Math.floor,n=function(a,u){var l=a.length;if(l<8)for(var c=1,f,d;c<l;){for(d=c,f=a[c];d&&u(a[d-1],f)>0;)a[d]=a[--d];d!==c++&&(a[d]=f)}else for(var M=r(l/2),I=n(t(a,0,M),u),y=n(t(a,M),u),p=I.length,N=y.length,E=0,D=0;E<p||D<N;)a[E+D]=E<p&&D<N?u(I[E],y[D])<=0?I[E++]:y[D++]:E<p?I[E++]:y[D++];return a};return u_=n,u_}var l_,Xq;function Jq(){if(Xq)return l_;Xq=1,uD(),Ime();var t=kt(),r=Gr(),n=SV(),a=Su(),u=Nn(),l=Sr(),c=an(),f=Gq(),d=ba(),M=Pu(),I=CD(),y=ps(),p=Rz(),N=es(),E=W3(),D=Kn(),m=Ei(),j=i0(),T=f4(),A=wn(),C=yi(),x=Pi(),b=$s(),V=Pd(),F=ED(),Y=u5(),O=y4(),_=K3(),L=Wn(),z=pme(),U=L("iterator"),$="URLSearchParams",K=$+"Iterator",X=N.set,R=N.getterFor($),G=N.getterFor(K),q=n("fetch"),w=n("Request"),Z=n("Headers"),de=w&&w.prototype,Me=Z&&Z.prototype,le=r.TypeError,Ae=r.encodeURIComponent,He=String.fromCharCode,he=a("String","fromCodePoint"),be=parseInt,Xe=l("".charAt),ft=l([].join),ut=l([].push),dt=l("".replace),vt=l([].shift),Tt=l([].splice),St=l("".split),tt=l("".slice),Mt=l(/./.exec),pt=/\+/g,et="�",_e=/^[0-9a-f]+$/i,Ye=function(ye,ke){var Qe=tt(ye,ke,ke+2);return Mt(_e,Qe)?be(Qe,16):NaN},se=function(ye){for(var ke=0,Qe=128;Qe>0&&(ye&Qe)!==0;Qe>>=1)ke++;return ke},Oe=function(ye){var ke=null;switch(ye.length){case 1:ke=ye[0];break;case 2:ke=(ye[0]&31)<<6|ye[1]&63;break;case 3:ke=(ye[0]&15)<<12|(ye[1]&63)<<6|ye[2]&63;break;case 4:ke=(ye[0]&7)<<18|(ye[1]&63)<<12|(ye[2]&63)<<6|ye[3]&63;break}return ke>1114111?null:ke},Ne=function(ye){ye=dt(ye,pt," ");for(var ke=ye.length,Qe="",xe=0;xe<ke;){var lt=Xe(ye,xe);if(lt==="%"){if(Xe(ye,xe+1)==="%"||xe+3>ke){Qe+="%",xe++;continue}var Nt=Ye(ye,xe+1);if(Nt!==Nt){Qe+=lt,xe++;continue}xe+=2;var Lt=se(Nt);if(Lt===0)lt=He(Nt);else{if(Lt===1||Lt>4){Qe+=et,xe++;continue}for(var Ct=[Nt],Zt=1;Zt<Lt&&(xe++,!(xe+3>ke||Xe(ye,xe)!=="%"));){var lr=Ye(ye,xe+1);if(lr!==lr){xe+=3;break}if(lr>191||lr<128)break;ut(Ct,lr),xe+=2,Zt++}if(Ct.length!==Lt){Qe+=et;continue}var Nr=Oe(Ct);Nr===null?Qe+=et:lt=he(Nr)}}Qe+=lt,xe++}return Qe},Ie=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Le=function(ye){return fe[ye]},nt=function(ye){return dt(Ae(ye),Ie,Le)},it=p(function(ke,Qe){X(this,{type:K,target:R(ke).entries,index:0,kind:Qe})},$,function(){var ke=G(this),Qe=ke.target,xe=ke.index++;if(!Qe||xe>=Qe.length)return ke.target=null,O(void 0,!0);var lt=Qe[xe];switch(ke.kind){case"keys":return O(lt.key,!1);case"values":return O(lt.value,!1)}return O([lt.key,lt.value],!1)},!0),Fe=function(ye){this.entries=[],this.url=null,ye!==void 0&&(C(ye)?this.parseObject(ye):this.parseQuery(typeof ye=="string"?Xe(ye,0)==="?"?tt(ye,1):ye:x(ye)))};Fe.prototype={type:$,bindURL:function(ye){this.url=ye,this.update()},parseObject:function(ye){var ke=this.entries,Qe=Y(ye),xe,lt,Nt,Lt,Ct,Zt,lr;if(Qe)for(xe=F(ye,Qe),lt=xe.next;!(Nt=u(lt,xe)).done;){if(Lt=F(A(Nt.value)),Ct=Lt.next,(Zt=u(Ct,Lt)).done||(lr=u(Ct,Lt)).done||!u(Ct,Lt).done)throw new le("Expected sequence with length 2");ut(ke,{key:x(Zt.value),value:x(lr.value)})}else for(var Nr in ye)m(ye,Nr)&&ut(ke,{key:Nr,value:x(ye[Nr])})},parseQuery:function(ye){if(ye)for(var ke=this.entries,Qe=St(ye,"&"),xe=0,lt,Nt;xe<Qe.length;)lt=Qe[xe++],lt.length&&(Nt=St(lt,"="),ut(ke,{key:Ne(vt(Nt)),value:Ne(ft(Nt,"="))}))},serialize:function(){for(var ye=this.entries,ke=[],Qe=0,xe;Qe<ye.length;)xe=ye[Qe++],ut(ke,nt(xe.key)+"="+nt(xe.value));return ft(ke,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var me=function(){E(this,je);var ke=arguments.length>0?arguments[0]:void 0,Qe=X(this,new Fe(ke));c||(this.size=Qe.entries.length)},je=me.prototype;if(I(je,{append:function(ke,Qe){var xe=R(this);_(arguments.length,2),ut(xe.entries,{key:x(ke),value:x(Qe)}),c||this.length++,xe.updateURL()},delete:function(ye){for(var ke=R(this),Qe=_(arguments.length,1),xe=ke.entries,lt=x(ye),Nt=Qe<2?void 0:arguments[1],Lt=Nt===void 0?Nt:x(Nt),Ct=0;Ct<xe.length;){var Zt=xe[Ct];if(Zt.key===lt&&(Lt===void 0||Zt.value===Lt)){if(Tt(xe,Ct,1),Lt!==void 0)break}else Ct++}c||(this.size=xe.length),ke.updateURL()},get:function(ke){var Qe=R(this).entries;_(arguments.length,1);for(var xe=x(ke),lt=0;lt<Qe.length;lt++)if(Qe[lt].key===xe)return Qe[lt].value;return null},getAll:function(ke){var Qe=R(this).entries;_(arguments.length,1);for(var xe=x(ke),lt=[],Nt=0;Nt<Qe.length;Nt++)Qe[Nt].key===xe&&ut(lt,Qe[Nt].value);return lt},has:function(ke){for(var Qe=R(this).entries,xe=_(arguments.length,1),lt=x(ke),Nt=xe<2?void 0:arguments[1],Lt=Nt===void 0?Nt:x(Nt),Ct=0;Ct<Qe.length;){var Zt=Qe[Ct++];if(Zt.key===lt&&(Lt===void 0||Zt.value===Lt))return!0}return!1},set:function(ke,Qe){var xe=R(this);_(arguments.length,1);for(var lt=xe.entries,Nt=!1,Lt=x(ke),Ct=x(Qe),Zt=0,lr;Zt<lt.length;Zt++)lr=lt[Zt],lr.key===Lt&&(Nt?Tt(lt,Zt--,1):(Nt=!0,lr.value=Ct));Nt||ut(lt,{key:Lt,value:Ct}),c||(this.size=lt.length),xe.updateURL()},sort:function(){var ke=R(this);z(ke.entries,function(Qe,xe){return Qe.key>xe.key?1:-1}),ke.updateURL()},forEach:function(ke){for(var Qe=R(this).entries,xe=j(ke,arguments.length>1?arguments[1]:void 0),lt=0,Nt;lt<Qe.length;)Nt=Qe[lt++],xe(Nt.value,Nt.key,this)},keys:function(){return new it(this,"keys")},values:function(){return new it(this,"values")},entries:function(){return new it(this,"entries")}},{enumerable:!0}),d(je,U,je.entries,{name:"entries"}),d(je,"toString",function(){return R(this).serialize()},{enumerable:!0}),c&&M(je,"size",{get:function(){return R(this).entries.length},configurable:!0,enumerable:!0}),y(me,$),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:me}),!f&&D(Z)){var We=l(Me.has),yt=l(Me.set),ct=function(ye){if(C(ye)){var ke=ye.body,Qe;if(T(ke)===$)return Qe=ye.headers?new Z(ye.headers):new Z,We(Qe,"content-type")||yt(Qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(ye,{body:V(0,x(ke)),headers:V(0,Qe)})}return ye};if(D(q)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(ke){return q(ke,arguments.length>1?ct(arguments[1]):{})}}),D(w)){var Ft=function(ke){return E(this,de),new w(ke,arguments.length>1?ct(arguments[1]):{})};de.constructor=Ft,Ft.prototype=de,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ft})}}return l_={URLSearchParams:me,getState:R},l_}var eX;function yme(){if(eX)return Qq;eX=1,XP();var t=kt(),r=an(),n=Gq(),a=Gr(),u=i0(),l=Sr(),c=ba(),f=Pu(),d=W3(),M=Ei(),I=Mme(),y=wU(),p=n0(),N=FD().codeAt,E=gme(),D=Pi(),m=ps(),j=K3(),T=Jq(),A=es(),C=A.set,x=A.getterFor("URL"),b=T.URLSearchParams,V=T.getState,F=a.URL,Y=a.TypeError,O=a.parseInt,_=Math.floor,L=Math.pow,z=l("".charAt),U=l(/./.exec),$=l([].join),K=l(1 .toString),X=l([].pop),R=l([].push),G=l("".replace),q=l([].shift),w=l("".split),Z=l("".slice),de=l("".toLowerCase),Me=l([].unshift),le="Invalid authority",Ae="Invalid scheme",He="Invalid host",he="Invalid port",be=/[a-z]/i,Xe=/[\d+-.a-z]/i,ft=/\d/,ut=/^0x/i,dt=/^[0-7]+$/,vt=/^\d+$/,Tt=/^[\da-f]+$/i,St=/[\0\t\n\r #%/:<>?@[\\\]^|]/,tt=/[\0\t\n\r #/:<>?@[\\\]^|]/,Mt=/^[\u0000-\u0020]+/,pt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,et=/[\t\n\r]/g,_e,Ye=function(re){var pe=w(re,"."),ue,W,Se,st,Ge,zt,Et;if(pe.length&&pe[pe.length-1]===""&&pe.length--,ue=pe.length,ue>4)return re;for(W=[],Se=0;Se<ue;Se++){if(st=pe[Se],st==="")return re;if(Ge=10,st.length>1&&z(st,0)==="0"&&(Ge=U(ut,st)?16:8,st=Z(st,Ge===8?1:2)),st==="")zt=0;else{if(!U(Ge===10?vt:Ge===8?dt:Tt,st))return re;zt=O(st,Ge)}R(W,zt)}for(Se=0;Se<ue;Se++)if(zt=W[Se],Se===ue-1){if(zt>=L(256,5-ue))return null}else if(zt>255)return null;for(Et=X(W),Se=0;Se<W.length;Se++)Et+=W[Se]*L(256,3-Se);return Et},se=function(re){var pe=[0,0,0,0,0,0,0,0],ue=0,W=null,Se=0,st,Ge,zt,Et,ir,Mr,ve,Pt=function(){return z(re,Se)};if(Pt()===":"){if(z(re,1)!==":")return;Se+=2,ue++,W=ue}for(;Pt();){if(ue===8)return;if(Pt()===":"){if(W!==null)return;Se++,ue++,W=ue;continue}for(st=Ge=0;Ge<4&&U(Tt,Pt());)st=st*16+O(Pt(),16),Se++,Ge++;if(Pt()==="."){if(Ge===0||(Se-=Ge,ue>6))return;for(zt=0;Pt();){if(Et=null,zt>0)if(Pt()==="."&&zt<4)Se++;else return;if(!U(ft,Pt()))return;for(;U(ft,Pt());){if(ir=O(Pt(),10),Et===null)Et=ir;else{if(Et===0)return;Et=Et*10+ir}if(Et>255)return;Se++}pe[ue]=pe[ue]*256+Et,zt++,(zt===2||zt===4)&&ue++}if(zt!==4)return;break}else if(Pt()===":"){if(Se++,!Pt())return}else if(Pt())return;pe[ue++]=st}if(W!==null)for(Mr=ue-W,ue=7;ue!==0&&Mr>0;)ve=pe[ue],pe[ue--]=pe[W+Mr-1],pe[W+--Mr]=ve;else if(ue!==8)return;return pe},Oe=function(re){for(var pe=null,ue=1,W=null,Se=0,st=0;st<8;st++)re[st]!==0?(Se>ue&&(pe=W,ue=Se),W=null,Se=0):(W===null&&(W=st),++Se);return Se>ue?W:pe},Ne=function(re){var pe,ue,W,Se;if(typeof re=="number"){for(pe=[],ue=0;ue<4;ue++)Me(pe,re%256),re=_(re/256);return $(pe,".")}if(typeof re=="object"){for(pe="",W=Oe(re),ue=0;ue<8;ue++)Se&&re[ue]===0||(Se&&(Se=!1),W===ue?(pe+=ue?":":"::",Se=!0):(pe+=K(re[ue],16),ue<7&&(pe+=":")));return"["+pe+"]"}return re},Ie={},fe=I({},Ie,{" ":1,'"':1,"<":1,">":1,"`":1}),Le=I({},fe,{"#":1,"?":1,"{":1,"}":1}),nt=I({},Le,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),it=function(re,pe){var ue=N(re,0);return ue>32&&ue<127&&!M(pe,re)?re:encodeURIComponent(re)},Fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},me=function(re,pe){var ue;return re.length===2&&U(be,z(re,0))&&((ue=z(re,1))===":"||!pe&&ue==="|")},je=function(re){var pe;return re.length>1&&me(Z(re,0,2))&&(re.length===2||(pe=z(re,2))==="/"||pe==="\\"||pe==="?"||pe==="#")},We=function(re){return re==="."||de(re)==="%2e"},yt=function(re){return re=de(re),re===".."||re==="%2e."||re===".%2e"||re==="%2e%2e"},ct={},Ft={},ye={},ke={},Qe={},xe={},lt={},Nt={},Lt={},Ct={},Zt={},lr={},Nr={},ii={},Lr={},Un={},Wt={},xr={},mn={},wr={},Er={},Hn=function(re,pe,ue){var W=D(re),Se,st,Ge;if(pe){if(st=this.parse(W),st)throw new Y(st);this.searchParams=null}else{if(ue!==void 0&&(Se=new Hn(ue,!0)),st=this.parse(W,null,Se),st)throw new Y(st);Ge=V(new b),Ge.bindURL(this),this.searchParams=Ge}};Hn.prototype={type:"URL",parse:function(re,pe,ue){var W=this,Se=pe||ct,st=0,Ge="",zt=!1,Et=!1,ir=!1,Mr,ve,Pt,qr;for(re=D(re),pe||(W.scheme="",W.username="",W.password="",W.host=null,W.port=null,W.path=[],W.query=null,W.fragment=null,W.cannotBeABaseURL=!1,re=G(re,Mt,""),re=G(re,pt,"$1")),re=G(re,et,""),Mr=y(re);st<=Mr.length;){switch(ve=Mr[st],Se){case ct:if(ve&&U(be,ve))Ge+=de(ve),Se=Ft;else{if(pe)return Ae;Se=ye;continue}break;case Ft:if(ve&&(U(Xe,ve)||ve==="+"||ve==="-"||ve==="."))Ge+=de(ve);else if(ve===":"){if(pe&&(W.isSpecial()!==M(Fe,Ge)||Ge==="file"&&(W.includesCredentials()||W.port!==null)||W.scheme==="file"&&!W.host))return;if(W.scheme=Ge,pe){W.isSpecial()&&Fe[W.scheme]===W.port&&(W.port=null);return}Ge="",W.scheme==="file"?Se=ii:W.isSpecial()&&ue&&ue.scheme===W.scheme?Se=ke:W.isSpecial()?Se=Nt:Mr[st+1]==="/"?(Se=Qe,st++):(W.cannotBeABaseURL=!0,R(W.path,""),Se=mn)}else{if(pe)return Ae;Ge="",Se=ye,st=0;continue}break;case ye:if(!ue||ue.cannotBeABaseURL&&ve!=="#")return Ae;if(ue.cannotBeABaseURL&&ve==="#"){W.scheme=ue.scheme,W.path=p(ue.path),W.query=ue.query,W.fragment="",W.cannotBeABaseURL=!0,Se=Er;break}Se=ue.scheme==="file"?ii:xe;continue;case ke:if(ve==="/"&&Mr[st+1]==="/")Se=Lt,st++;else{Se=xe;continue}break;case Qe:if(ve==="/"){Se=Ct;break}else{Se=xr;continue}case xe:if(W.scheme=ue.scheme,ve===_e)W.username=ue.username,W.password=ue.password,W.host=ue.host,W.port=ue.port,W.path=p(ue.path),W.query=ue.query;else if(ve==="/"||ve==="\\"&&W.isSpecial())Se=lt;else if(ve==="?")W.username=ue.username,W.password=ue.password,W.host=ue.host,W.port=ue.port,W.path=p(ue.path),W.query="",Se=wr;else if(ve==="#")W.username=ue.username,W.password=ue.password,W.host=ue.host,W.port=ue.port,W.path=p(ue.path),W.query=ue.query,W.fragment="",Se=Er;else{W.username=ue.username,W.password=ue.password,W.host=ue.host,W.port=ue.port,W.path=p(ue.path),W.path.length--,Se=xr;continue}break;case lt:if(W.isSpecial()&&(ve==="/"||ve==="\\"))Se=Lt;else if(ve==="/")Se=Ct;else{W.username=ue.username,W.password=ue.password,W.host=ue.host,W.port=ue.port,Se=xr;continue}break;case Nt:if(Se=Lt,ve!=="/"||z(Ge,st+1)!=="/")continue;st++;break;case Lt:if(ve!=="/"&&ve!=="\\"){Se=Ct;continue}break;case Ct:if(ve==="@"){zt&&(Ge="%40"+Ge),zt=!0,Pt=y(Ge);for(var mi=0;mi<Pt.length;mi++){var ai=Pt[mi];if(ai===":"&&!ir){ir=!0;continue}var br=it(ai,nt);ir?W.password+=br:W.username+=br}Ge=""}else if(ve===_e||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&W.isSpecial()){if(zt&&Ge==="")return le;st-=y(Ge).length+1,Ge="",Se=Zt}else Ge+=ve;break;case Zt:case lr:if(pe&&W.scheme==="file"){Se=Un;continue}else if(ve===":"&&!Et){if(Ge==="")return He;if(qr=W.parseHost(Ge),qr)return qr;if(Ge="",Se=Nr,pe===lr)return}else if(ve===_e||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&W.isSpecial()){if(W.isSpecial()&&Ge==="")return He;if(pe&&Ge===""&&(W.includesCredentials()||W.port!==null))return;if(qr=W.parseHost(Ge),qr)return qr;if(Ge="",Se=Wt,pe)return;continue}else ve==="["?Et=!0:ve==="]"&&(Et=!1),Ge+=ve;break;case Nr:if(U(ft,ve))Ge+=ve;else if(ve===_e||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&W.isSpecial()||pe){if(Ge!==""){var ta=O(Ge,10);if(ta>65535)return he;W.port=W.isSpecial()&&ta===Fe[W.scheme]?null:ta,Ge=""}if(pe)return;Se=Wt;continue}else return he;break;case ii:if(W.scheme="file",ve==="/"||ve==="\\")Se=Lr;else if(ue&&ue.scheme==="file")switch(ve){case _e:W.host=ue.host,W.path=p(ue.path),W.query=ue.query;break;case"?":W.host=ue.host,W.path=p(ue.path),W.query="",Se=wr;break;case"#":W.host=ue.host,W.path=p(ue.path),W.query=ue.query,W.fragment="",Se=Er;break;default:je($(p(Mr,st),""))||(W.host=ue.host,W.path=p(ue.path),W.shortenPath()),Se=xr;continue}else{Se=xr;continue}break;case Lr:if(ve==="/"||ve==="\\"){Se=Un;break}ue&&ue.scheme==="file"&&!je($(p(Mr,st),""))&&(me(ue.path[0],!0)?R(W.path,ue.path[0]):W.host=ue.host),Se=xr;continue;case Un:if(ve===_e||ve==="/"||ve==="\\"||ve==="?"||ve==="#"){if(!pe&&me(Ge))Se=xr;else if(Ge===""){if(W.host="",pe)return;Se=Wt}else{if(qr=W.parseHost(Ge),qr)return qr;if(W.host==="localhost"&&(W.host=""),pe)return;Ge="",Se=Wt}continue}else Ge+=ve;break;case Wt:if(W.isSpecial()){if(Se=xr,ve!=="/"&&ve!=="\\")continue}else if(!pe&&ve==="?")W.query="",Se=wr;else if(!pe&&ve==="#")W.fragment="",Se=Er;else if(ve!==_e&&(Se=xr,ve!=="/"))continue;break;case xr:if(ve===_e||ve==="/"||ve==="\\"&&W.isSpecial()||!pe&&(ve==="?"||ve==="#")){if(yt(Ge)?(W.shortenPath(),ve!=="/"&&!(ve==="\\"&&W.isSpecial())&&R(W.path,"")):We(Ge)?ve!=="/"&&!(ve==="\\"&&W.isSpecial())&&R(W.path,""):(W.scheme==="file"&&!W.path.length&&me(Ge)&&(W.host&&(W.host=""),Ge=z(Ge,0)+":"),R(W.path,Ge)),Ge="",W.scheme==="file"&&(ve===_e||ve==="?"||ve==="#"))for(;W.path.length>1&&W.path[0]==="";)q(W.path);ve==="?"?(W.query="",Se=wr):ve==="#"&&(W.fragment="",Se=Er)}else Ge+=it(ve,Le);break;case mn:ve==="?"?(W.query="",Se=wr):ve==="#"?(W.fragment="",Se=Er):ve!==_e&&(W.path[0]+=it(ve,Ie));break;case wr:!pe&&ve==="#"?(W.fragment="",Se=Er):ve!==_e&&(ve==="'"&&W.isSpecial()?W.query+="%27":ve==="#"?W.query+="%23":W.query+=it(ve,Ie));break;case Er:ve!==_e&&(W.fragment+=it(ve,fe));break}st++}},parseHost:function(re){var pe,ue,W;if(z(re,0)==="["){if(z(re,re.length-1)!=="]"||(pe=se(Z(re,1,-1)),!pe))return He;this.host=pe}else if(this.isSpecial()){if(re=E(re),U(St,re)||(pe=Ye(re),pe===null))return He;this.host=pe}else{if(U(tt,re))return He;for(pe="",ue=y(re),W=0;W<ue.length;W++)pe+=it(ue[W],Ie);this.host=pe}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return M(Fe,this.scheme)},shortenPath:function(){var re=this.path,pe=re.length;pe&&(this.scheme!=="file"||pe!==1||!me(re[0],!0))&&re.length--},serialize:function(){var re=this,pe=re.scheme,ue=re.username,W=re.password,Se=re.host,st=re.port,Ge=re.path,zt=re.query,Et=re.fragment,ir=pe+":";return Se!==null?(ir+="//",re.includesCredentials()&&(ir+=ue+(W?":"+W:"")+"@"),ir+=Ne(Se),st!==null&&(ir+=":"+st)):pe==="file"&&(ir+="//"),ir+=re.cannotBeABaseURL?Ge[0]:Ge.length?"/"+$(Ge,"/"):"",zt!==null&&(ir+="?"+zt),Et!==null&&(ir+="#"+Et),ir},setHref:function(re){var pe=this.parse(re);if(pe)throw new Y(pe);this.searchParams.update()},getOrigin:function(){var re=this.scheme,pe=this.port;if(re==="blob")try{return new Sn(re.path[0]).origin}catch(ue){return"null"}return re==="file"||!this.isSpecial()?"null":re+"://"+Ne(this.host)+(pe!==null?":"+pe:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(re){this.parse(D(re)+":",ct)},getUsername:function(){return this.username},setUsername:function(re){var pe=y(D(re));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var ue=0;ue<pe.length;ue++)this.username+=it(pe[ue],nt)}},getPassword:function(){return this.password},setPassword:function(re){var pe=y(D(re));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var ue=0;ue<pe.length;ue++)this.password+=it(pe[ue],nt)}},getHost:function(){var re=this.host,pe=this.port;return re===null?"":pe===null?Ne(re):Ne(re)+":"+pe},setHost:function(re){this.cannotBeABaseURL||this.parse(re,Zt)},getHostname:function(){var re=this.host;return re===null?"":Ne(re)},setHostname:function(re){this.cannotBeABaseURL||this.parse(re,lr)},getPort:function(){var re=this.port;return re===null?"":D(re)},setPort:function(re){this.cannotHaveUsernamePasswordPort()||(re=D(re),re===""?this.port=null:this.parse(re,Nr))},getPathname:function(){var re=this.path;return this.cannotBeABaseURL?re[0]:re.length?"/"+$(re,"/"):""},setPathname:function(re){this.cannotBeABaseURL||(this.path=[],this.parse(re,Wt))},getSearch:function(){var re=this.query;return re?"?"+re:""},setSearch:function(re){re=D(re),re===""?this.query=null:(z(re,0)==="?"&&(re=Z(re,1)),this.query="",this.parse(re,wr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var re=this.fragment;return re?"#"+re:""},setHash:function(re){if(re=D(re),re===""){this.fragment=null;return}z(re,0)==="#"&&(re=Z(re,1)),this.fragment="",this.parse(re,Er)},update:function(){this.query=this.searchParams.serialize()||null}};var Sn=function(pe){var ue=d(this,or),W=j(arguments.length,1)>1?arguments[1]:void 0,Se=C(ue,new Hn(pe,!1,W));r||(ue.href=Se.serialize(),ue.origin=Se.getOrigin(),ue.protocol=Se.getProtocol(),ue.username=Se.getUsername(),ue.password=Se.getPassword(),ue.host=Se.getHost(),ue.hostname=Se.getHostname(),ue.port=Se.getPort(),ue.pathname=Se.getPathname(),ue.search=Se.getSearch(),ue.searchParams=Se.getSearchParams(),ue.hash=Se.getHash())},or=Sn.prototype,Tr=function(re,pe){return{get:function(){return x(this)[re]()},set:pe&&function(ue){return x(this)[pe](ue)},configurable:!0,enumerable:!0}};if(r&&(f(or,"href",Tr("serialize","setHref")),f(or,"origin",Tr("getOrigin")),f(or,"protocol",Tr("getProtocol","setProtocol")),f(or,"username",Tr("getUsername","setUsername")),f(or,"password",Tr("getPassword","setPassword")),f(or,"host",Tr("getHost","setHost")),f(or,"hostname",Tr("getHostname","setHostname")),f(or,"port",Tr("getPort","setPort")),f(or,"pathname",Tr("getPathname","setPathname")),f(or,"search",Tr("getSearch","setSearch")),f(or,"searchParams",Tr("getSearchParams")),f(or,"hash",Tr("getHash","setHash"))),c(or,"toJSON",function(){return x(this).serialize()},{enumerable:!0}),c(or,"toString",function(){return x(this).serialize()},{enumerable:!0}),F){var sn=F.createObjectURL,ea=F.revokeObjectURL;sn&&c(Sn,"createObjectURL",u(sn,F)),ea&&c(Sn,"revokeObjectURL",u(ea,F))}return m(Sn,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:Sn}),Qq}var tX;function hme(){return tX||(tX=1,yme()),Fq}hme();var rX={},nX;function Nme(){if(nX)return rX;nX=1;var t=kt(),r=Nn();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),rX}Nme();var iX={},aX;function Eme(){return aX||(aX=1,Jq()),iX}Eme();var oX={},uX;function Dme(){if(uX)return oX;uX=1;var t=ba(),r=Sr(),n=Pi(),a=K3(),u=URLSearchParams,l=u.prototype,c=r(l.append),f=r(l.delete),d=r(l.forEach),M=r([].push),I=new u("a=1&a=2&b=3");return I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&t(l,"delete",function(y){var p=arguments.length,N=p<2?void 0:arguments[1];if(p&&N===void 0)return f(this,y);var E=[];d(this,function(b,V){M(E,{key:V,value:b})}),a(p,1);for(var D=n(y),m=n(N),j=0,T=0,A=!1,C=E.length,x;j<C;)x=E[j++],A||x.key===D?(A=!0,f(this,x.key)):T++;for(;T<C;)x=E[T++],x.key===D&&x.value===m||c(this,x.key,x.value)},{enumerable:!0,unsafe:!0}),oX}Dme();var lX={},sX;function vme(){if(sX)return lX;sX=1;var t=ba(),r=Sr(),n=Pi(),a=K3(),u=URLSearchParams,l=u.prototype,c=r(l.getAll),f=r(l.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&t(l,"has",function(I){var y=arguments.length,p=y<2?void 0:arguments[1];if(y&&p===void 0)return f(this,I);var N=c(this,I);a(y,1);for(var E=n(p),D=0;D<N.length;)if(N[D++]===E)return!0;return!1},{enumerable:!0,unsafe:!0}),lX}vme();var cX={},fX;function mme(){if(fX)return cX;fX=1;var t=an(),r=Sr(),n=Pu(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&n(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),cX}mme();function gg(t){"@babel/helpers - typeof";return gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gg(t)}function Sme(t,r){return Cme(t)||_me(t,r)||Ame(t,r)||Tme()}function Tme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
75
75
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ame(t,r){if(t){if(typeof t=="string")return dX(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dX(t,r):void 0}}function dX(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function _me(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,l,c,f=[],d=!0,M=!1;try{if(l=(n=n.call(t)).next,r!==0)for(;!(d=(a=l.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function Cme(t){if(Array.isArray(t))return t}function jme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Ome(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,MX(a.key),a)}}function Lme(t,r,n){return r&&Ome(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function K5(t,r,n){return(r=MX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function MX(t){var r=xme(t,"string");return gg(r)=="symbol"?r:r+""}function xme(t,r){if(gg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(gg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wme=function(){function t(){jme(this,t),K5(this,"_levels",[]),K5(this,"_transports",[]),K5(this,"_logs",[]),K5(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var n=r.split(">"),a=Sme(n,2),u=a[0],l=a[1];this._levels=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return Lme(t,[{key:"create",value:function(n,a){var u=this;return function(l){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u._levels.includes(n)&&u._transports.includes("console")){var d=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(d,";"),n,"",l,"color: ".concat(d,";"),f)}u._logs.push("".concat(n,": ").concat(l," +").concat(f,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"cleanLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var n=this._logs.join(`
|
|
76
|
-
`),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),s_=new wme;function Jd(t){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jd(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&Jd(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(Jd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function gX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Du(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){gX(l,a,u,c,f,"next",d)}function f(d){gX(l,a,u,c,f,"throw",d)}c(void 0)})}}function bme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Rme(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,IX(a.key),a)}}function kme(t,r,n){return r&&Rme(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function MM(t,r,n){return(r=IX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function IX(t){var r=zme(t,"string");return Jd(r)=="symbol"?r:r+""}function zme(t,r){if(Jd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Jd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var xo=s_.create("wasm_idv"),Pme=function(){function t(r){bme(this,t),MM(this,"_worker",null),MM(this,"_initialized",!1),MM(this,"_connectedToIdv",!1),MM(this,"_serviceRunning",!1),MM(this,"_userId",C5e(wIe)),MM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return kme(t,[{key:"init",value:function(){var r=Du(bn().mark(function a(){var u,l,c,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-046198c20//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:l=M.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),xo("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-046198c20/",preMain:!0});case 23:return f=M.sent,f.code===0&&xo("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=Du(bn().mark(function a(u){var l,c;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ev.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),xo("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=Du(bn().mark(function a(u){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ev.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),xo("Connection by URL result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=Du(bn().mark(function a(u,l,c){var f,d;return bn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:l},c&&(j5e(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,xo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,l){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=Du(bn().mark(function a(u,l){var c,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:l},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,xo("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=Du(bn().mark(function a(){var u,l,c=arguments;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,xo("listWorkflows result code: ".concat(l.code)),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,xo("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,xo("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,xo("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=Du(bn().mark(function a(u){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,xo("getWorkflow result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=Du(bn().mark(function a(u,l){var c;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 2:return c=d.sent,xo("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,xo("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,xo("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,xo("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=Du(bn().mark(function a(u){var l=this;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!l._worker)return M();l._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){xo(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,E=p.data;N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(y==="stderr"){var D=I.data.content;xo(JSON.stringify(D)),l._setErrorScreen&&l._setErrorScreen(D)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function e3(t){"@babel/helpers - typeof";return e3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e3(t)}function pX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function Ig(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?pX(Object(n),!0).forEach(function(a){c_(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function c_(t,r,n){return(r=Ume(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Ume(t){var r=Hme(t,"string");return e3(r)=="symbol"?r:r+""}function Hme(t,r){if(e3(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(e3(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Vi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Vi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&e3(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(e3(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function yX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function qs(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){yX(l,a,u,c,f,"next",d)}function f(d){yX(l,a,u,c,f,"throw",d)}c(void 0)})}}var Vme=s_.create("store_idv"),Yme=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=qs(Vi().mark(function l(){var c;return Vi().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new Pme,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=Yd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=Yd.PROVIDER_ERROR),M===null){p.next=12;break}return I=new R4({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},l)}))()},connectByUrl:function(u){return qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=Yd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Yd.PROVIDER_ERROR),d===null){p.next=13;break}return M=new R4({errorCode:d}),I=new p5({errorCode:nv.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=Ig(Ig({},f.results),{},{sessionId:M}),y=Ig({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=qs(Vi().mark(function l(){var c,f,d,M;return Vi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,Fme(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new b4({errorCode:D4.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=fm(u.find(function(c){return c.templateId===iv}));l.templateLayout=VY(l.templateLayout,n().layout),r({processingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=qs(Vi().mark(function l(c,f){var d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=qs(Vi().mark(function E(){var D,m,j,T;return Vi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(c,f);case 2:if(D=C.sent,m=null,D.code===4&&(m=hs.HTTP_ISSUE),D.code!==0&&D.code!==4&&(m=hs.PROVIDER_ERROR),m!==null&&(j=new J3({errorCode:hs.HTTP_ISSUE}),T=new Co({errorCode:_o.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:j}),d=T),D.code!==0){C.next=12;break}return d=null,C.abrupt("return",D);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,Mm(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=n().workflow;if(!l||!u)return null;var c=l.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=qs(Vi().mark(function E(){var D,m,j,T,A,C,x,b,V,F,Y,O,_,L;return Vi().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,n().wasmService.getSessionState();case 2:if(T=U.sent,A=(D=T.data)===null||D===void 0?void 0:D.currentStep,C=(m=T.data)===null||m===void 0?void 0:m.isProcessingFiles,x=(j=T.data)===null||j===void 0||(j=j.workflow)===null||j===void 0?void 0:j.steps,b=T5e(x,A),V=T.code===4,F=T.code!==0&&T.code!==4,Y=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,x&&!b&&(O=hs.NOT_DATA_TYPE),V&&(O=hs.HTTP_ISSUE),F&&(O=hs.PROVIDER_ERROR),C&&(O=hs.IS_PROCESSING),Y&&(O=hs.DECODING_FAILED),O!==null&&(_=new J3({errorCode:O}),L=new Co({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:_}),c=L),Vme(JSON.stringify({nextStep:A,isDataType:b,isProcessingFiles:C})),!(b&&!C&&!V&&!F&&!Y)){U.next=21;break}return c=null,U.abrupt("return",T.data);case 21:return U.abrupt("return",null);case 22:case"end":return U.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,Mm(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new J3({errorCode:hs.DECODING_FAILED}),I=new Co({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||n().currentStepId;if(l){var c=n()._findStepById(l);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:N4.MESSAGE,message:E4.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=qs(Vi().mark(function l(c){var f,d,M,I,y,p,N,E,D;return Vi().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(f=n().currentStepId,f){j.next=3;break}return j.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){j.next=7;break}return n().setFinalStepAndStopProcess(),j.abrupt("return");case 7:if(!(c instanceof ei)){j.next=13;break}return d=c,M=new Co({errorCode:_o.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),j.abrupt("return");case 13:return j.next=15,n()._pushStep(f,c);case 15:if(I=j.sent,!I.error){j.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),j.abrupt("return");case 20:return j.next=22,n()._waitingForNextStep();case 22:if(y=j.sent,!y.error){j.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),j.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),E=n()._findStepById(N),D=function(A){return!!A&&Object.prototype.toString.call(A)==="[object Object]"&&A.templateId},!(E!=null&&E.final&&!D(E.client))){j.next=38;break}return n().setFinalStepAndStopProcess(E.id),j.abrupt("return");case 38:E!=null&&E.final&&D(E.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return j.stop()}},l)}));function u(l){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var l=n().workflow,c=n().sessionProperties,f=null;if(u===iv&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=Ig(Ig({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&O5e(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var E=VY(y.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=S5e(n().externalModules,l.steps,u);if(f===null||!D){var m=new Co({errorCode:_o.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:m}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=qs(Vi().mark(function l(){var c,f;return Vi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function Fme(t){return f_.apply(this,arguments)}function f_(){return f_=qs(Vi().mark(function t(r){var n,a,u,l,c,f;return Vi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:n1.getIdentifier(),supportedTemplates:n1.getSupportedTemplates(),component:n1}],a=c_(c_({},rv.LIVENESS,function(){return Promise.resolve().then(()=>Vrt)}),rv.DOC_READER,function(){return Promise.resolve().then(()=>rxt)}),u=Vi().mark(function I(){var y,p,N;return Vi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(y=c[l],p=function(){return a[y]()},!p){D.next=7;break}return D.next=5,p();case 5:N=D.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return D.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:l++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),f_.apply(this,arguments)}function pg(t){"@babel/helpers - typeof";return pg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pg(t)}function hX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function d_(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hX(Object(n),!0).forEach(function(a){Qme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Qme(t,r,n){return(r=$me(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function $me(t){var r=Gme(t,"string");return pg(r)=="symbol"?r:r+""}function Gme(t,r){if(pg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(pg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ka=Spe(function(){return d_(d_(d_({},z5e.apply(void 0,arguments)),J5e.apply(void 0,arguments)),Yme.apply(void 0,arguments))}),NX=function(r){var n=r.children;return pi.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function yg(t){"@babel/helpers - typeof";return yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yg(t)}function EX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function DX(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?EX(Object(n),!0).forEach(function(a){Bme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Bme(t,r,n){return(r=Zme(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Zme(t){var r=Wme(t,"string");return yg(r)=="symbol"?r:r+""}function Wme(t,r){if(yg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(yg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Kme=function(){var r=ka(function(N){return N.currentScreenConfig}),n=ka(function(N){return N.pushStepWaitNextStepAndSet}),a=ka(function(N){return N.processingTransformedTemplate}),u=ka(function(N){return N.isProcessing}),l=ka(function(N){return N.setIsProcessing}),c=ka(function(N){return N.listener}),f=ka(function(N){return N.externalModules}),d=ka(function(N){return N.modulesConfig}),M=function(E,D){c({eventType:N4.MESSAGE,message:D,module:E})},I=function(E){l(E)},y=function(E){l(!1),n(E)},p=Or.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return pi.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?pi.jsx(hv,{direction:s5.Ltr,children:pi.jsx(NX,{children:"Waiting for play... or process completed"})}):pi.jsx(pi.Fragment,{children:pi.jsx(hv,{direction:s5.Ltr,children:pi.jsxs(pi.Fragment,{children:[u&&pi.jsx(NX,{children:a?pi.jsx(n1,{perform:y,moduleProps:DX(DX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function qme(){return pi.jsx(Or.StrictMode,{children:pi.jsx(rpe,{children:pi.jsx(Kme,{})})})}function gM(t){"@babel/helpers - typeof";return gM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gM(t)}function Xme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function vX(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,SX(a.key),a)}}function Jme(t,r,n){return r&&vX(t.prototype,r),n&&vX(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function eSe(t,r,n){return r=Ng(r),tSe(t,g_()?Reflect.construct(r,[],Ng(t).constructor):r.apply(t,n))}function tSe(t,r){if(r&&(gM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rSe(t)}function rSe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nSe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&hg(t,r)}function M_(t){var r=typeof Map=="function"?new Map:void 0;return M_=function(a){if(a===null||!aSe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return iSe(a,arguments,Ng(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),hg(u,a)},M_(t)}function iSe(t,r,n){if(g_())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&hg(u,n.prototype),u}function g_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(g_=function(){return!!t})()}function aSe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function hg(t,r){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hg(t,r)}function Ng(t){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ng(t)}function mX(t,r,n){return(r=SX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function SX(t){var r=oSe(t,"string");return gM(r)=="symbol"?r:r+""}function oSe(t,r){if(gM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(gM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var uSe="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",TX=function(t){function r(){var n;return Xme(this,r),n=eSe(this,r),mX(n,"_root",SIe.createRoot(n.attachShadow({mode:"open"}))),mX(n,"_mounted",!1),n}return nSe(r,t),Jme(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.160-nightly".trim())}},{key:"render",value:function(){this._root.render(pi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[pi.jsx("style",{nonce:ka.getState().getNonce(),children:uSe}),pi.jsx(qme,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),s_.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(M_(HTMLElement));function t3(t){"@babel/helpers - typeof";return t3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t3(t)}function ns(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ns=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&t3(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(t3(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function AX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function IM(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){AX(l,a,u,c,f,"next",d)}function f(d){AX(l,a,u,c,f,"throw",d)}c(void 0)})}}function lSe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function sSe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,fSe(a.key),a)}}function cSe(t,r,n){return r&&sSe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fSe(t){var r=dSe(t,"string");return t3(r)=="symbol"?r:r+""}function dSe(t,r){if(t3(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(t3(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var MSe=function(){function t(){lSe(this,t)}return cSe(t,[{key:"initialize",value:function(){var r=IM(ns().mark(function a(u){var l;return ns().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ka.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=IM(ns().mark(function a(u){var l,c;return ns().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,ka.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,ka.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=IM(ns().mark(function a(u){var l;return ns().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ka.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=IM(ns().mark(function a(u){var l,c;return ns().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workflowId,d.next=3,ka.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=IM(ns().mark(function a(u){var l,c,f,d;return ns().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=w5e(l),I.next=5,ka.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(y){var p=function(E){y(E)};ka.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=IM(ns().mark(function a(){var u;return ns().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ka.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.160-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){ka.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ka.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){ka.getState().setSessionRestoreMode(n)}}])}(),gSe=window.customElements.get("idv-flow");gSe||window.customElements.define("idv-flow",TX);var ISe=Object.defineProperty,pSe=Object.defineProperties,ySe=Object.getOwnPropertyDescriptors,_X=Object.getOwnPropertySymbols,hSe=Object.prototype.hasOwnProperty,NSe=Object.prototype.propertyIsEnumerable,CX=(t,r,n)=>r in t?ISe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,I_=(t,r)=>{for(var n in r||(r={}))hSe.call(r,n)&&CX(t,n,r[n]);if(_X)for(var n of _X(r))NSe.call(r,n)&&CX(t,n,r[n]);return t},jX=(t,r)=>pSe(t,ySe(r)),wo=(t,r,n)=>new Promise((a,u)=>{var l=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);f((n=n.apply(t,r)).next())}),OX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function LX(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xX={exports:{}},Eg={},wX={exports:{}},on={},bX;function ESe(){if(bX)return on;bX=1;/**
|
|
76
|
+
`),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),s_=new wme;function Jd(t){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jd(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&Jd(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(Jd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function gX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Du(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){gX(l,a,u,c,f,"next",d)}function f(d){gX(l,a,u,c,f,"throw",d)}c(void 0)})}}function bme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Rme(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,IX(a.key),a)}}function kme(t,r,n){return r&&Rme(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function MM(t,r,n){return(r=IX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function IX(t){var r=zme(t,"string");return Jd(r)=="symbol"?r:r+""}function zme(t,r){if(Jd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Jd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var xo=s_.create("wasm_idv"),Pme=function(){function t(r){bme(this,t),MM(this,"_worker",null),MM(this,"_initialized",!1),MM(this,"_connectedToIdv",!1),MM(this,"_serviceRunning",!1),MM(this,"_userId",C5e(wIe)),MM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return kme(t,[{key:"init",value:function(){var r=Du(bn().mark(function a(){var u,l,c,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-dee94fb3e//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:l=M.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),xo("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/cbd762b-dee94fb3e/",preMain:!0});case 23:return f=M.sent,f.code===0&&xo("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=Du(bn().mark(function a(u){var l,c;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ev.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),xo("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=Du(bn().mark(function a(u){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ev.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),xo("Connection by URL result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=Du(bn().mark(function a(u,l,c){var f,d;return bn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:l},c&&(j5e(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,xo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,l){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=Du(bn().mark(function a(u,l){var c,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:l},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,xo("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=Du(bn().mark(function a(){var u,l,c=arguments;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,xo("listWorkflows result code: ".concat(l.code)),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,xo("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,xo("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,xo("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=Du(bn().mark(function a(u){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,xo("getWorkflow result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=Du(bn().mark(function a(u,l){var c;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 2:return c=d.sent,xo("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,xo("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,xo("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,xo("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=Du(bn().mark(function a(u){var l=this;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!l._worker)return M();l._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){xo(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,E=p.data;N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(y==="stderr"){var D=I.data.content;xo(JSON.stringify(D)),l._setErrorScreen&&l._setErrorScreen(D)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Du(bn().mark(function a(){var u;return bn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function e3(t){"@babel/helpers - typeof";return e3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e3(t)}function pX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function Ig(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?pX(Object(n),!0).forEach(function(a){c_(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function c_(t,r,n){return(r=Ume(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Ume(t){var r=Hme(t,"string");return e3(r)=="symbol"?r:r+""}function Hme(t,r){if(e3(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(e3(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Vi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Vi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&e3(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(e3(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function yX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function qs(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){yX(l,a,u,c,f,"next",d)}function f(d){yX(l,a,u,c,f,"throw",d)}c(void 0)})}}var Vme=s_.create("store_idv"),Yme=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=qs(Vi().mark(function l(){var c;return Vi().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new Pme,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=Yd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=Yd.PROVIDER_ERROR),M===null){p.next=12;break}return I=new R4({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},l)}))()},connectByUrl:function(u){return qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=Yd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Yd.PROVIDER_ERROR),d===null){p.next=13;break}return M=new R4({errorCode:d}),I=new p5({errorCode:nv.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=Ig(Ig({},f.results),{},{sessionId:M}),y=Ig({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=qs(Vi().mark(function l(){var c,f,d,M;return Vi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,Fme(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new b4({errorCode:D4.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=fm(u.find(function(c){return c.templateId===iv}));l.templateLayout=VY(l.templateLayout,n().layout),r({processingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=qs(Vi().mark(function l(c,f){var d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=qs(Vi().mark(function E(){var D,m,j,T;return Vi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(c,f);case 2:if(D=C.sent,m=null,D.code===4&&(m=hs.HTTP_ISSUE),D.code!==0&&D.code!==4&&(m=hs.PROVIDER_ERROR),m!==null&&(j=new J3({errorCode:hs.HTTP_ISSUE}),T=new Co({errorCode:_o.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:j}),d=T),D.code!==0){C.next=12;break}return d=null,C.abrupt("return",D);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,Mm(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=n().workflow;if(!l||!u)return null;var c=l.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=qs(Vi().mark(function l(){var c,f,d,M,I;return Vi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=qs(Vi().mark(function E(){var D,m,j,T,A,C,x,b,V,F,Y,O,_,L;return Vi().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,n().wasmService.getSessionState();case 2:if(T=U.sent,A=(D=T.data)===null||D===void 0?void 0:D.currentStep,C=(m=T.data)===null||m===void 0?void 0:m.isProcessingFiles,x=(j=T.data)===null||j===void 0||(j=j.workflow)===null||j===void 0?void 0:j.steps,b=T5e(x,A),V=T.code===4,F=T.code!==0&&T.code!==4,Y=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,x&&!b&&(O=hs.NOT_DATA_TYPE),V&&(O=hs.HTTP_ISSUE),F&&(O=hs.PROVIDER_ERROR),C&&(O=hs.IS_PROCESSING),Y&&(O=hs.DECODING_FAILED),O!==null&&(_=new J3({errorCode:O}),L=new Co({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:_}),c=L),Vme(JSON.stringify({nextStep:A,isDataType:b,isProcessingFiles:C})),!(b&&!C&&!V&&!F&&!Y)){U.next=21;break}return c=null,U.abrupt("return",T.data);case 21:return U.abrupt("return",null);case 22:case"end":return U.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,Mm(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new J3({errorCode:hs.DECODING_FAILED}),I=new Co({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||n().currentStepId;if(l){var c=n()._findStepById(l);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:N4.MESSAGE,message:E4.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=qs(Vi().mark(function l(c){var f,d,M,I,y,p,N,E,D;return Vi().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(f=n().currentStepId,f){j.next=3;break}return j.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){j.next=7;break}return n().setFinalStepAndStopProcess(),j.abrupt("return");case 7:if(!(c instanceof ei)){j.next=13;break}return d=c,M=new Co({errorCode:_o.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),j.abrupt("return");case 13:return j.next=15,n()._pushStep(f,c);case 15:if(I=j.sent,!I.error){j.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),j.abrupt("return");case 20:return j.next=22,n()._waitingForNextStep();case 22:if(y=j.sent,!y.error){j.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),j.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),E=n()._findStepById(N),D=function(A){return!!A&&Object.prototype.toString.call(A)==="[object Object]"&&A.templateId},!(E!=null&&E.final&&!D(E.client))){j.next=38;break}return n().setFinalStepAndStopProcess(E.id),j.abrupt("return");case 38:E!=null&&E.final&&D(E.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return j.stop()}},l)}));function u(l){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var l=n().workflow,c=n().sessionProperties,f=null;if(u===iv&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=Ig(Ig({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&O5e(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var E=VY(y.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=S5e(n().externalModules,l.steps,u);if(f===null||!D){var m=new Co({errorCode:_o.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:m}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=qs(Vi().mark(function l(){var c,f;return Vi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function Fme(t){return f_.apply(this,arguments)}function f_(){return f_=qs(Vi().mark(function t(r){var n,a,u,l,c,f;return Vi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:n1.getIdentifier(),supportedTemplates:n1.getSupportedTemplates(),component:n1}],a=c_(c_({},rv.LIVENESS,function(){return Promise.resolve().then(()=>Vrt)}),rv.DOC_READER,function(){return Promise.resolve().then(()=>rxt)}),u=Vi().mark(function I(){var y,p,N;return Vi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(y=c[l],p=function(){return a[y]()},!p){D.next=7;break}return D.next=5,p();case 5:N=D.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return D.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:l++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),f_.apply(this,arguments)}function pg(t){"@babel/helpers - typeof";return pg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pg(t)}function hX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function d_(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hX(Object(n),!0).forEach(function(a){Qme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Qme(t,r,n){return(r=$me(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function $me(t){var r=Gme(t,"string");return pg(r)=="symbol"?r:r+""}function Gme(t,r){if(pg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(pg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ka=Spe(function(){return d_(d_(d_({},z5e.apply(void 0,arguments)),J5e.apply(void 0,arguments)),Yme.apply(void 0,arguments))}),NX=function(r){var n=r.children;return pi.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function yg(t){"@babel/helpers - typeof";return yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yg(t)}function EX(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function DX(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?EX(Object(n),!0).forEach(function(a){Bme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Bme(t,r,n){return(r=Zme(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Zme(t){var r=Wme(t,"string");return yg(r)=="symbol"?r:r+""}function Wme(t,r){if(yg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(yg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Kme=function(){var r=ka(function(N){return N.currentScreenConfig}),n=ka(function(N){return N.pushStepWaitNextStepAndSet}),a=ka(function(N){return N.processingTransformedTemplate}),u=ka(function(N){return N.isProcessing}),l=ka(function(N){return N.setIsProcessing}),c=ka(function(N){return N.listener}),f=ka(function(N){return N.externalModules}),d=ka(function(N){return N.modulesConfig}),M=function(E,D){c({eventType:N4.MESSAGE,message:D,module:E})},I=function(E){l(E)},y=function(E){l(!1),n(E)},p=Or.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return pi.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?pi.jsx(hv,{direction:s5.Ltr,children:pi.jsx(NX,{children:"Waiting for play... or process completed"})}):pi.jsx(pi.Fragment,{children:pi.jsx(hv,{direction:s5.Ltr,children:pi.jsxs(pi.Fragment,{children:[u&&pi.jsx(NX,{children:a?pi.jsx(n1,{perform:y,moduleProps:DX(DX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function qme(){return pi.jsx(Or.StrictMode,{children:pi.jsx(rpe,{children:pi.jsx(Kme,{})})})}function gM(t){"@babel/helpers - typeof";return gM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gM(t)}function Xme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function vX(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,SX(a.key),a)}}function Jme(t,r,n){return r&&vX(t.prototype,r),n&&vX(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function eSe(t,r,n){return r=Ng(r),tSe(t,g_()?Reflect.construct(r,[],Ng(t).constructor):r.apply(t,n))}function tSe(t,r){if(r&&(gM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rSe(t)}function rSe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nSe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&hg(t,r)}function M_(t){var r=typeof Map=="function"?new Map:void 0;return M_=function(a){if(a===null||!aSe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return iSe(a,arguments,Ng(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),hg(u,a)},M_(t)}function iSe(t,r,n){if(g_())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&hg(u,n.prototype),u}function g_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(g_=function(){return!!t})()}function aSe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function hg(t,r){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hg(t,r)}function Ng(t){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ng(t)}function mX(t,r,n){return(r=SX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function SX(t){var r=oSe(t,"string");return gM(r)=="symbol"?r:r+""}function oSe(t,r){if(gM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(gM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var uSe="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",TX=function(t){function r(){var n;return Xme(this,r),n=eSe(this,r),mX(n,"_root",SIe.createRoot(n.attachShadow({mode:"open"}))),mX(n,"_mounted",!1),n}return nSe(r,t),Jme(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.162-nightly".trim())}},{key:"render",value:function(){this._root.render(pi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[pi.jsx("style",{nonce:ka.getState().getNonce(),children:uSe}),pi.jsx(qme,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),s_.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(M_(HTMLElement));function t3(t){"@babel/helpers - typeof";return t3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t3(t)}function ns(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ns=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,_,L,z){return Object.defineProperty(O,_,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,_,L,z){var U=_&&_.prototype instanceof p?_:p,$=Object.create(U.prototype);return d($,"_invoke",function(K,X,R){var G=1;return function(q,w){if(G===3)throw Error("Generator is already running");if(G===4){if(q==="throw")throw w;return{value:t,done:!0}}for(R.method=q,R.arg=w;;){var Z=R.delegate;if(Z){var de=x(Z,R);if(de){if(de===y)continue;return de}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(G===1)throw G=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);G=3;var Me=I(K,X,R);if(Me.type==="normal"){if(G=R.done?4:2,Me.arg===y)continue;return{value:Me.arg,done:R.done}}Me.type==="throw"&&(G=4,R.method="throw",R.arg=Me.arg)}}}(O,L,new F(z||[])),!0),$}function I(O,_,L){try{return{type:"normal",arg:O.call(_,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,l,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(Y([])));j&&j!==n&&a.call(j,l)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function A(O){["next","throw","return"].forEach(function(_){d(O,_,function(L){return this._invoke(_,L)})})}function C(O,_){function L(U,$,K,X){var R=I(O[U],O,$);if(R.type!=="throw"){var G=R.arg,q=G.value;return q&&t3(q)=="object"&&a.call(q,"__await")?_.resolve(q.__await).then(function(w){L("next",w,K,X)},function(w){L("throw",w,K,X)}):_.resolve(q).then(function(w){G.value=w,K(G)},function(w){return L("throw",w,K,X)})}X(R.arg)}var z;d(this,"_invoke",function(U,$){function K(){return new _(function(X,R){L(U,$,X,R)})}return z=z?z.then(K,K):K()},!0)}function x(O,_){var L=_.method,z=O.i[L];if(z===t)return _.delegate=null,L==="throw"&&O.i.return&&(_.method="return",_.arg=t,x(O,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,_.arg);if(U.type==="throw")return _.method="throw",_.arg=U.arg,_.delegate=null,y;var $=U.arg;return $?$.done?(_[O.r]=$.value,_.next=O.n,_.method!=="return"&&(_.method="next",_.arg=t),_.delegate=null,y):$:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var _=O[4]||{};_.type="normal",_.arg=t,O[4]=_}function F(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var _=O[l];if(_)return _.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var L=-1,z=function U(){for(;++L<O.length;)if(a.call(O,L))return U.value=O[L],U.done=!1,U;return U.value=t,U.done=!0,U};return z.next=z}}throw new TypeError(t3(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var _=typeof O=="function"&&O.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},A(C.prototype),d(C.prototype,c,function(){return this}),r.AsyncIterator=C,r.async=function(O,_,L,z,U){U===void 0&&(U=Promise);var $=new C(M(O,_,L,z),U);return r.isGeneratorFunction(_)?$:$.next().then(function(K){return K.done?K.value:$.next()})},A(T),d(T,f,"Generator"),d(T,l,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var _=Object(O),L=[];for(var z in _)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in _)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=Y,F.prototype={constructor:F,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!_)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var L=this;function z(q){K.type="throw",K.arg=_,L.next=q}for(var U=L.tryEntries.length-1;U>=0;--U){var $=this.tryEntries[U],K=$[4],X=this.prev,R=$[1],G=$[2];if($[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if($[0]!=null&&$[0]<=X){if(X<R)return this.method="next",this.arg=t,z(R),!0;if(X<G)return z(G),!1}}},abrupt:function(_,L){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U[0]>-1&&U[0]<=this.prev&&this.prev<U[2]){var $=U;break}}$&&(_==="break"||_==="continue")&&$[0]<=L&&L<=$[2]&&($=null);var K=$?$[4]:{};return K.type=_,K.arg=L,$?(this.method="next",this.next=$[2],y):this.complete(K)},complete:function(_,L){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&L&&(this.next=L),y},finish:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===_)return this.complete(z[4],z[3]),V(z),y}},catch:function(_){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===_){var U=z[4];if(U.type==="throw"){var $=U.arg;V(z)}return $}}throw Error("illegal catch attempt")},delegateYield:function(_,L,z){return this.delegate={i:Y(_),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function AX(t,r,n,a,u,l,c){try{var f=t[l](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function IM(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var l=t.apply(r,n);function c(d){AX(l,a,u,c,f,"next",d)}function f(d){AX(l,a,u,c,f,"throw",d)}c(void 0)})}}function lSe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function sSe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,fSe(a.key),a)}}function cSe(t,r,n){return r&&sSe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fSe(t){var r=dSe(t,"string");return t3(r)=="symbol"?r:r+""}function dSe(t,r){if(t3(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(t3(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var MSe=function(){function t(){lSe(this,t)}return cSe(t,[{key:"initialize",value:function(){var r=IM(ns().mark(function a(u){var l;return ns().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ka.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=IM(ns().mark(function a(u){var l,c;return ns().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,ka.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,ka.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=IM(ns().mark(function a(u){var l;return ns().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ka.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=IM(ns().mark(function a(u){var l,c;return ns().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workflowId,d.next=3,ka.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=IM(ns().mark(function a(u){var l,c,f,d;return ns().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=w5e(l),I.next=5,ka.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(y){var p=function(E){y(E)};ka.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=IM(ns().mark(function a(){var u;return ns().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ka.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.162-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){ka.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ka.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){ka.getState().setSessionRestoreMode(n)}}])}(),gSe=window.customElements.get("idv-flow");gSe||window.customElements.define("idv-flow",TX);var ISe=Object.defineProperty,pSe=Object.defineProperties,ySe=Object.getOwnPropertyDescriptors,_X=Object.getOwnPropertySymbols,hSe=Object.prototype.hasOwnProperty,NSe=Object.prototype.propertyIsEnumerable,CX=(t,r,n)=>r in t?ISe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,I_=(t,r)=>{for(var n in r||(r={}))hSe.call(r,n)&&CX(t,n,r[n]);if(_X)for(var n of _X(r))NSe.call(r,n)&&CX(t,n,r[n]);return t},jX=(t,r)=>pSe(t,ySe(r)),wo=(t,r,n)=>new Promise((a,u)=>{var l=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);f((n=n.apply(t,r)).next())}),OX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function LX(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xX={exports:{}},Eg={},wX={exports:{}},on={},bX;function ESe(){if(bX)return on;bX=1;/**
|
|
77
77
|
* @license React
|
|
78
78
|
* react.production.min.js
|
|
79
79
|
*
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-
|
|
1
|
+
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-lzRvKWCN.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED