@regulaforensics/idv-capture-web 2.4.169-rc → 2.5.171

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.
@@ -24734,7 +24734,7 @@ var Ft = O3.create("wasm_idv"), gW = /* @__PURE__ */ function() {
24734
24734
  return Pr().wrap(function(v) {
24735
24735
  for (; ; ) switch (v.prev = v.next) {
24736
24736
  case 0:
24737
- return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/rc/2.4/0e9b50e-c49957c66//PlatformAdaptor.worker.js");
24737
+ return v.prev = 1, v.next = 4, fetch("https://wasm.regulaforensics.com/idv/release/2.5/ed166d4-c49957c66//PlatformAdaptor.worker.js");
24738
24738
  case 4:
24739
24739
  return a = v.sent, v.next = 7, a.blob();
24740
24740
  case 7:
@@ -24761,7 +24761,7 @@ var Ft = O3.create("wasm_idv"), gW = /* @__PURE__ */ function() {
24761
24761
  }), v.next = 23, this.sendMessage({
24762
24762
  target: "worker-init",
24763
24763
  URL: document.URL,
24764
- currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/rc/2.4/0e9b50e-c49957c66/",
24764
+ currentScriptUrl: "https://wasm.regulaforensics.com/idv/release/2.5/ed166d4-c49957c66/",
24765
24765
  preMain: !0
24766
24766
  });
24767
24767
  case 23:
@@ -26066,9 +26066,9 @@ function t5() {
26066
26066
  supportedTemplates: Si.getSupportedTemplates(),
26067
26067
  component: Si
26068
26068
  }], i = r5(r5({}, Qm.LIVENESS, function() {
26069
- return import("./index-D4WupPjy.js");
26069
+ return import("./index-CGSHjGKy.js");
26070
26070
  }), Qm.DOC_READER, function() {
26071
- return import("./index-Dfv3m-Fx.js");
26071
+ return import("./index-j6Z6qFA1.js");
26072
26072
  }), a = /* @__PURE__ */ Jr().mark(function p() {
26073
26073
  var h, y, m;
26074
26074
  return Jr().wrap(function(C) {
@@ -26386,7 +26386,7 @@ var BW = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
26386
26386
  }, {
26387
26387
  key: "version",
26388
26388
  get: function() {
26389
- return "".concat("2.4.169-rc".trim());
26389
+ return "".concat("2.5.171".trim());
26390
26390
  }
26391
26391
  }, {
26392
26392
  key: "render",
@@ -26856,7 +26856,7 @@ var KW = /* @__PURE__ */ function() {
26856
26856
  key: "version",
26857
26857
  get: function() {
26858
26858
  var t;
26859
- return (t = "2.4.169-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26859
+ return (t = "2.5.171") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26860
26860
  }
26861
26861
  }, {
26862
26862
  key: "nonce",
@@ -1,4 +1,4 @@
1
- import { B as Vu, r as la, j as lD } from "./index-IuUo9-iT.js";
1
+ import { B as Vu, r as la, j as lD } from "./index-BJmCp-qc.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 Qu = (e) => {
22
22
  throw l;
23
23
  }, "return" in r && i("return"), o;
24
24
  };
25
- import { B as Hc, r as dl, j as L4 } from "./index-IuUo9-iT.js";
25
+ import { B as Hc, r as dl, j as L4 } from "./index-BJmCp-qc.js";
26
26
  var pO = Object.defineProperty, hO = Object.defineProperties, EO = Object.getOwnPropertyDescriptors, y4 = Object.getOwnPropertySymbols, mO = Object.prototype.hasOwnProperty, SO = Object.prototype.propertyIsEnumerable, h2 = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), CO = (e) => {
27
27
  throw TypeError(e);
28
28
  }, b4 = (e, r, t) => r in e ? pO(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, tt = (e, r) => {
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 yq(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)?yq(t,r):void 0}}function yq(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,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.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 wve(t){if(Array.isArray(t))return t}var xve=function(r){var n=r.option,a=r.layout,u=r.dataSourceQuestion,s=r.register,c=r.watch,f=jr.useState(!1),d=Cve(f,2),M=d[0],I=d[1],y=fq(),p=String(u.id),N=c(p),E=N===String(n.id),D=a.option,m=a.optionSelected,j={borderRadius:D.cornerRadius,background:Xn(D.backgroundColor),borderColor:Xn(D.borderColor),borderWidth:D.borderWidth},T={borderRadius:m.cornerRadius,background:Xn(m.backgroundColor),borderColor:Xn(m.borderColor),borderWidth:m.borderWidth},S=M&&y?{outline:"2px solid ".concat(WM)}:{};return ae.jsx("div",{style:{display:"flex",flexGrow:1},children:ae.jsxs("label",{style:pq(pq({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},E?T:j),S),children:[ae.jsx("input",gi(Ot({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},s(p,{required:!!u.required,validate:f4(u.validators,!!u.required)})),{value:n.id,type:"radio",onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})),ae.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,s=r.dataSourceQuestion;return ae.jsx("div",{style:{boxSizing:"border-box"},children:ae.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ae.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ae.jsx(Oo,gi(Ot({},n.title),{text:s.text}))}),ae.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:s.options.map(function(c){return ae.jsx(xve,{register:u,watch:a,layout:n,option:c,dataSourceQuestion:s},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 hq(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 qS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hq(Object(n),!0).forEach(function(a){Rve(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hq(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,s=u===void 0?0:u,c=r.isError,f=r.isRequired,d=r.validationBorderColor,M=r.validationBorderWidth,I=qS({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Xn(a)||"transparent",borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},c&&qS(qS({},Xn(d)&&{borderColor:d,borderStyle:"solid"}),M&&{borderWidth:M}));return ae.jsxs("div",{style:I,children:[f&&ae.jsx("span",{style:{color:Xn(d),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function Uve(t,r){return Yve(t)||Fve(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 Nq(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)?Nq(t,r):void 0}}function Nq(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 Fve(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.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 Yve(t){if(Array.isArray(t))return t}var Qve=function(r){var n=r.validationErrorsTypes,a=r.title;return n?ae.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(u){var s=Uve(u,2),c=s[0],f=s[1];return ae.jsx(Oo,gi(Ot({},a),{text:f}),c)})}):null},$ve=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,E,D,m,j,T=r.layout,S=r.dataSourceQuestion,A=r.register,w=String(S.id),b=function(Q){return Q?Q===U5.EMAIL?"email":Q===U5.FREE_TEXT?"text":Q===U5.NUMBER?"number":Q===U5.SECURE?"password":"text":"text"};return ae.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ae.jsx(Oo,gi(Ot({},T.title),{text:S.text,htmlFor:w})),ae.jsx("input",gi(Ot({},A(w,{required:!!S.required,validate:f4(S.validators,!!S.required)})),{id:w,type:b((n=T.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=T==null||(u=T.textField)===null||u===void 0?void 0:u.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(s=T==null||(c=T.textField)===null||c===void 0?void 0:c.fontSize)!==null&&s!==void 0?s:15,color:(f=Xn(T==null||(d=T.textField)===null||d===void 0?void 0:d.fontColor))!==null&&f!==void 0?f:"#000000",height:"42px",borderWidth:(M=T==null||(I=T.textField)===null||I===void 0?void 0:I.borderWidth)!==null&&M!==void 0?M:1,borderColor:(y=Xn(T==null||(p=T.textField)===null||p===void 0?void 0:p.borderColor))!==null&&y!==void 0?y:"#d9d9d9",borderStyle:"solid",borderRadius:(N=T==null||(E=T.textField)===null||E===void 0?void 0:E.cornerRadius)!==null&&N!==void 0?N:8,padding:"11px",boxSizing:"border-box",backgroundColor:(D=Xn(T==null||(m=T.textField)===null||m===void 0?void 0:m.backgroundColor))!==null&&D!==void 0?D:"#FFFFFF",outlineColor:WM},placeholder:(j=S.placeholder)!==null&&j!==void 0?j:"","data-id":w}))]})},Bve=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,E,D=r.layout,m=r.dataSourceQuestion,j=r.register,T=String(m.id);return ae.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ae.jsx(Oo,gi(Ot({},D.title),{text:m.text,htmlFor:T})),ae.jsx("textarea",gi(Ot({},j(T,{required:!!m.required,validate:f4(m.validators,!!m.required)})),{id:T,placeholder:(n=m.placeholder)!==null&&n!==void 0?n:"",onChange:function(A){A.target.style.height="auto",A.target.style.height="".concat(A.target.scrollHeight-15,"px")},"data-id":T,style:{fontFamily:"sans-serif",fontSize:(a=D==null||(u=D.textField)===null||u===void 0?void 0:u.fontSize)!==null&&a!==void 0?a:15,color:(s=Xn(D==null||(c=D.textField)===null||c===void 0?void 0:c.fontColor))!==null&&s!==void 0?s:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(f=D==null||(d=D.textField)===null||d===void 0?void 0:d.borderWidth)!==null&&f!==void 0?f:1,borderColor:(M=Xn(D==null||(I=D.textField)===null||I===void 0?void 0:I.borderColor))!==null&&M!==void 0?M:"#d9d9d9",borderStyle:"solid",borderRadius:(y=D==null||(p=D.textField)===null||p===void 0?void 0:p.cornerRadius)!==null&&y!==void 0?y:8,padding:"11px",boxSizing:"border-box",backgroundColor:(N=Xn(D==null||(E=D.textField)===null||E===void 0?void 0:E.backgroundColor))!==null&&N!==void 0?N:"#FFFFFF",outlineColor:WM}}))]})},Eq={},XS,Dq;function vq(){if(Dq)return XS;Dq=1;var t=qn(),r=Nl(),n=jo(),a=Ta(),u=O5(),s=VM(),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 XS=s?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},XS}var mq;function Gve(){if(mq)return Eq;mq=1;var t=kr(),r=vq();return t({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r}),Eq}Gve();var _q={},Tq;function Zve(){if(Tq)return _q;Tq=1;var t=kr(),r=ti(),n=w1();return t({target:"Object",stat:!0,sham:!r},{create:n}),_q}Zve();var Sq={},Aq;function Wve(){if(Aq)return Sq;Aq=1;var t=kr(),r=pn(),n=El(),a=BM(),u=F$(),s=r(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(f){return a(n(f))}}),Sq}Wve();var Cq={},jq;function Kve(){if(jq)return Cq;jq=1;var t=ti(),r=c0(),n=jo(),a=X$(),u=El(),s=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=s(this);a(y)&&n(p)&&f(p,y)}})}catch(I){}return Cq}Kve();var Oq={},Lq;function qve(){if(Lq)return Oq;Lq=1;var t=kr(),r=C5();return t({target:"Object",stat:!0},{setPrototypeOf:r}),Oq}qve();var wq={},JS,xq;function Xve(){if(xq)return JS;xq=1;var t=w5(),r=YM(),n=TypeError;return JS=function(u){if(t(u))return u;throw new n(r(u)+" is not a constructor")},JS}var bq;function Jve(){if(bq)return wq;bq=1;var t=kr(),r=J2(),n=A5(),a=vq(),u=Xve(),s=Na(),c=jo(),f=w1(),d=pn(),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),s(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 S=[null];return n(y,S,j),new(n(a,m,S))}var A=T.prototype,w=f(c(A)?A:I),b=n(m,w,j);return c(b)?b:w}}),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 Rq(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,kq(a.key),a)}}function tme(t,r,n){return r&&Rq(t.prototype,r),n&&Rq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function z1(t,r,n){return(r=kq(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function kq(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 zq=function(){function t(r){var n=r.errorCode,a=r.errorCodeKey,u=r.message,s=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=s,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(s){return a[s]===n});if(!u)throw new Error("Invalid errorCode: ".concat(n," in enum"));return u}}])}();function d4(t){"@babel/helpers - typeof";return d4=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},d4(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=W5(r),ome(t,Pq()?Reflect.construct(r,n||[],W5(t).constructor):r.apply(t,n))}function ome(t,r){if(r&&(d4(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 Pq(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Pq=function(){return!!t})()}function W5(t){return W5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},W5(t)}function sme(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&&eA(t,r)}function eA(t,r){return eA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},eA(t,r)}function tA(t,r,n){return(r=lme(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function lme(t){var r=cme(t,"string");return d4(r)=="symbol"?r:r+""}function cme(t,r){if(d4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(d4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var K5=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;ime(this,r);var f=zq.getErrorKey(a,FW);return ame(this,r,[{errorCode:a,errorCodeKey:f,errorEnumName:r.ERROR_ENUM_NAME,module:r.MODULE,message:u,underlyingError:s,underlyingBaseError:c,domain:r.ERROR_ENUM_NAME,shortDomainCode:r.SHORT_CODE}])}return sme(r,t),nme(r)}(zq);tA(K5,"MODULE",xS),tA(K5,"ERROR_ENUM_NAME","GuiModuleError"),tA(K5,"SHORT_CODE","GM");var fme=function(r){var n=r.header,a=r.title,u=r.buttons,s=r.footer,c=r.questions,f=r.dataSource,d=r.properties,M=r.backgroundColor,I=hT(),y=I.perform,p=d?wNe(f.questions,d):{},N=jr.useRef(null),E=zDe({criteriaMode:"all",defaultValues:p}),D=E.register,m=E.handleSubmit,j=E.formState.errors,T=E.reset,S=E.watch,A=E.control,w=function(V){y(ONe(V)),T()};return ae.jsx(eg,{header:n,footer:s,backgroundColor:M,children:ae.jsxs("form",{onSubmit:m(w),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ae.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:Xn(c.backgroundColor)||"transparent"},ref:N,children:[a&&ae.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ae.jsx(Oo,Ot({},a))}),ae.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,Q=f.static,F=function(K,J){return J.find(function(R){var G;if((G=R.questionIds)!==null&&G!==void 0&&G.length)return R.questionIds.find(function(X){return K===X})})},O=function(K,J){return J.find(function(R){return!R.questionIds&&R.answerType===K})},C=Q?F(String(b.id),c.itemTypes)||O(b.answerType,c.itemTypes):c.itemTypes.find(function(B){return B.answerType===b.answerType});if(!C){var L=new K5({errorCode:FW.DECODING_FAILED,message:"The question template has not been found"});y(L);return}var z=C==null?void 0:C.displayType,U=b.id in j&&((V=j[b.id])===null||V===void 0?void 0:V.types);return ae.jsxs(jr.Fragment,{children:[ae.jsxs(Pve,{backgroundColor:C==null?void 0:C.backgroundColor,cornerRadius:C==null?void 0:C.cornerRadius,isError:!!U,isRequired:b.required,validationBorderColor:C==null?void 0:C.validationBorderColor,validationBorderWidth:C==null?void 0:C.validationBorderWidth,children:[z===s4.TEXT_EXPANDABLE&&ae.jsx(Bve,{layout:C,dataSourceQuestion:b,register:D}),z===s4.TEXT_SINGLE_LINE&&ae.jsx($ve,{layout:C,dataSourceQuestion:b,register:D}),z===s4.SELECTOR_OPTIONS&&ae.jsx(_ve,{layout:C,dataSourceQuestion:b,watch:S,register:D}),z===s4.SELECTOR_BUTTONS&&ae.jsx(bve,{layout:C,dataSourceQuestion:b,watch:S,register:D}),z===s4.SELECTOR_DROPDOWN&&ae.jsx(ive,{control:A,layout:C,dataSourceQuestion:b,parentElementRef:N}),z===s4.MULTI_SELECTOR_DROPDOWN&&ae.jsx(lve,{control:A,layout:C,dataSourceQuestion:b,parentElementRef:N})]}),U&&ae.jsx(Qve,{validationErrorsTypes:U,title:C.validationMessage})]},b.id)})})]}),!!(u!=null&&u.length)&&ae.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 ae.jsx(tK,Ot({dataTestId:"question-button"},b),V)})})]})})},Uq=function(r){var n=r.templateId,a=r.templateLayout,u=r.dataSource,s=r.properties;if(!n||!a)return ae.jsx(lK,{});var c=s!=null&&s.length?JSON.stringify(s):"default-key";return n===f0.STATUS?ae.jsx(GEe,{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?ae.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?ae.jsx(lK,{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?ae.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?ae.jsx(fme,{dataSource:u,properties:s,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?ae.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"}):ae.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},rA=!1,n1=function(r){var n=r.moduleProps,a=r.perform,u=n,s=u.templateId,c=u.templateLayout,f=u.dataSource,d=u.properties,M=function(y){a&&a(y)};return s===f0.QUESTIONS?ae.jsx(NB,{perform:M,children:ae.jsx(Uq,{properties:d,dataSource:f,templateId:s,templateLayout:c})}):ae.jsx(NB,{perform:M,children:ae.jsx(Uq,{templateId:s,templateLayout:c})})};n1.getIdentifier=function(){return xS},n1.getSupportedTemplates=function(){return Object.values(f0)},n1.deinitialize=function(){rA=!1},n1.initialize=function(){rA=!0},n1.isReady=function(){return rA},n1.displayName=xS;var Hq={},Vq;function dme(){if(Vq)return Hq;Vq=1;var t=Rt(),r=mr(),n=Date,a=r(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),Hq}dme();var Fq={},Yq={},nA,Qq;function $q(){if(Qq)return nA;Qq=1;var t=vr(),r=Zn(),n=nn(),a=Eu(),u=r("iterator");return nA=!t(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),c=s.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),d="";return s.pathname="c%20d",c.forEach(function(M,I){c.delete("b"),d+=I+M}),f.delete("a",2),f.delete("b",void 0),a&&(!s.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!n)||!c.sort||s.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"}),nA}var iA,Bq;function Mme(){if(Bq)return iA;Bq=1;var t=nn(),r=mr(),n=hn(),a=vr(),u=dM(),s=i5(),c=e5(),f=Su(),d=aM(),M=Object.assign,I=Object.defineProperty,y=r([].concat);return iA=!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=s.f,S=c.f;m>j;)for(var A=d(arguments[j++]),w=T?y(u(A),T(A)):u(A),b=w.length,V=0,Q;b>V;)Q=w[V++],(!t||n(S,A,Q))&&(D[Q]=A[Q]);return D}:M,iA}var aA,Gq;function gme(){if(Gq)return aA;Gq=1;var t=mr(),r=2147483647,n=36,a=1,u=26,s=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),S=t([].join),A=t([].push),w=t("".replace),b=t("".split),V=t("".toLowerCase),Q=function(L){for(var z=[],U=0,B=L.length;U<B;){var K=T(L,U++);if(K>=55296&&K<=56319&&U<B){var J=T(L,U++);(J&64512)===56320?A(z,((K&1023)<<10)+(J&1023)+65536):(A(z,K),U--)}else A(z,K)}return z},F=function(L){return L+22+75*(L<26)},O=function(L,z,U){var B=0;for(L=U?m(L/c):L>>1,L+=m(L/z);L>N*u>>1;)L=m(L/N),B+=n;return m(B+(N+1)*L/(L+s))},C=function(L){var z=[];L=Q(L);var U=L.length,B=d,K=0,J=f,R,G;for(R=0;R<L.length;R++)G=L[R],G<128&&A(z,j(G));var X=z.length,x=X;for(X&&A(z,M);x<U;){var W=r;for(R=0;R<L.length;R++)G=L[R],G>=B&&G<W&&(W=G);var de=x+1;if(W-B>m((r-K)/de))throw new E(p);for(K+=(W-B)*de,B=W,R=0;R<L.length;R++){if(G=L[R],G<B&&++K>r)throw new E(p);if(G===B){for(var Me=K,se=n;;){var Se=se<=J?a:se>=J+u?u:se-J;if(Me<Se)break;var He=Me-Se,he=n-Se;A(z,j(F(Se+He%he))),Me=m(He/he),se+=n}A(z,j(F(Me))),J=O(K,de,x===X),K=0,x++}}K++,B++}return S(z,"")};return aA=function(L){var z=[],U=b(w(V(L),y,"."),"."),B,K;for(B=0;B<U.length;B++)K=U[B],A(z,D(I,K)?"xn--"+C(K):K);return S(z,".")},aA}var Zq={},Wq;function Ime(){if(Wq)return Zq;Wq=1;var t=Rt(),r=mr(),n=BN(),a=RangeError,u=String.fromCharCode,s=String.fromCodePoint,c=r([].join),f=!!s&&s.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,"")}}),Zq}var oA,Kq;function pme(){if(Kq)return oA;Kq=1;var t=n0(),r=Math.floor,n=function(a,u){var s=a.length;if(s<8)for(var c=1,f,d;c<s;){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(s/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 oA=n,oA}var uA,qq;function Xq(){if(qq)return uA;qq=1,oD(),Ime();var t=Rt(),r=$r(),n=mV(),a=Tu(),u=hn(),s=mr(),c=nn(),f=$q(),d=ba(),M=Uu(),I=AD(),y=pl(),p=bz(),N=tl(),E=W3(),D=Wn(),m=Ni(),j=i0(),T=fM(),S=wn(),A=pi(),w=zi(),b=Bl(),V=Pd(),Q=ND(),F=s5(),O=yM(),C=K3(),L=Zn(),z=pme(),U=L("iterator"),B="URLSearchParams",K=B+"Iterator",J=N.set,R=N.getterFor(B),G=N.getterFor(K),X=n("fetch"),x=n("Request"),W=n("Headers"),de=x&&x.prototype,Me=W&&W.prototype,se=r.TypeError,Se=r.encodeURIComponent,He=String.fromCharCode,he=a("String","fromCodePoint"),be=parseInt,Xe=s("".charAt),ft=s([].join),ut=s([].push),dt=s("".replace),vt=s([].shift),St=s([].splice),Tt=s("".split),tt=s("".slice),Mt=s(/./.exec),pt=/\+/g,et="�",Ae=/^[0-9a-f]+$/i,Fe=function(ye,ke){var Qe=tt(ye,ke,ke+2);return Mt(Ae,Qe)?be(Qe,16):NaN},le=function(ye){for(var ke=0,Qe=128;Qe>0&&(ye&Qe)!==0;Qe>>=1)ke++;return ke},Le=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 st=Xe(ye,xe);if(st==="%"){if(Xe(ye,xe+1)==="%"||xe+3>ke){Qe+="%",xe++;continue}var Nt=Fe(ye,xe+1);if(Nt!==Nt){Qe+=st,xe++;continue}xe+=2;var Lt=le(Nt);if(Lt===0)st=He(Nt);else{if(Lt===1||Lt>4){Qe+=et,xe++;continue}for(var Ct=[Nt],Gt=1;Gt<Lt&&(xe++,!(xe+3>ke||Xe(ye,xe)!=="%"));){var ur=Fe(ye,xe+1);if(ur!==ur){xe+=3;break}if(ur>191||ur<128)break;ut(Ct,ur),xe+=2,Gt++}if(Ct.length!==Lt){Qe+=et;continue}var hr=Le(Ct);hr===null?Qe+=et:st=he(hr)}}Qe+=st,xe++}return Qe},Ie=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},we=function(ye){return fe[ye]},nt=function(ye){return dt(Se(ye),Ie,we)},it=p(function(ke,Qe){J(this,{type:K,target:R(ke).entries,index:0,kind:Qe})},B,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 st=Qe[xe];switch(ke.kind){case"keys":return O(st.key,!1);case"values":return O(st.value,!1)}return O([st.key,st.value],!1)},!0),Ye=function(ye){this.entries=[],this.url=null,ye!==void 0&&(A(ye)?this.parseObject(ye):this.parseQuery(typeof ye=="string"?Xe(ye,0)==="?"?tt(ye,1):ye:w(ye)))};Ye.prototype={type:B,bindURL:function(ye){this.url=ye,this.update()},parseObject:function(ye){var ke=this.entries,Qe=F(ye),xe,st,Nt,Lt,Ct,Gt,ur;if(Qe)for(xe=Q(ye,Qe),st=xe.next;!(Nt=u(st,xe)).done;){if(Lt=Q(S(Nt.value)),Ct=Lt.next,(Gt=u(Ct,Lt)).done||(ur=u(Ct,Lt)).done||!u(Ct,Lt).done)throw new se("Expected sequence with length 2");ut(ke,{key:w(Gt.value),value:w(ur.value)})}else for(var hr in ye)m(ye,hr)&&ut(ke,{key:hr,value:w(ye[hr])})},parseQuery:function(ye){if(ye)for(var ke=this.entries,Qe=Tt(ye,"&"),xe=0,st,Nt;xe<Qe.length;)st=Qe[xe++],st.length&&(Nt=Tt(st,"="),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,Oe);var ke=arguments.length>0?arguments[0]:void 0,Qe=J(this,new Ye(ke));c||(this.size=Qe.entries.length)},Oe=me.prototype;if(I(Oe,{append:function(ke,Qe){var xe=R(this);C(arguments.length,2),ut(xe.entries,{key:w(ke),value:w(Qe)}),c||this.length++,xe.updateURL()},delete:function(ye){for(var ke=R(this),Qe=C(arguments.length,1),xe=ke.entries,st=w(ye),Nt=Qe<2?void 0:arguments[1],Lt=Nt===void 0?Nt:w(Nt),Ct=0;Ct<xe.length;){var Gt=xe[Ct];if(Gt.key===st&&(Lt===void 0||Gt.value===Lt)){if(St(xe,Ct,1),Lt!==void 0)break}else Ct++}c||(this.size=xe.length),ke.updateURL()},get:function(ke){var Qe=R(this).entries;C(arguments.length,1);for(var xe=w(ke),st=0;st<Qe.length;st++)if(Qe[st].key===xe)return Qe[st].value;return null},getAll:function(ke){var Qe=R(this).entries;C(arguments.length,1);for(var xe=w(ke),st=[],Nt=0;Nt<Qe.length;Nt++)Qe[Nt].key===xe&&ut(st,Qe[Nt].value);return st},has:function(ke){for(var Qe=R(this).entries,xe=C(arguments.length,1),st=w(ke),Nt=xe<2?void 0:arguments[1],Lt=Nt===void 0?Nt:w(Nt),Ct=0;Ct<Qe.length;){var Gt=Qe[Ct++];if(Gt.key===st&&(Lt===void 0||Gt.value===Lt))return!0}return!1},set:function(ke,Qe){var xe=R(this);C(arguments.length,1);for(var st=xe.entries,Nt=!1,Lt=w(ke),Ct=w(Qe),Gt=0,ur;Gt<st.length;Gt++)ur=st[Gt],ur.key===Lt&&(Nt?St(st,Gt--,1):(Nt=!0,ur.value=Ct));Nt||ut(st,{key:Lt,value:Ct}),c||(this.size=st.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),st=0,Nt;st<Qe.length;)Nt=Qe[st++],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(Oe,U,Oe.entries,{name:"entries"}),d(Oe,"toString",function(){return R(this).serialize()},{enumerable:!0}),c&&M(Oe,"size",{get:function(){return R(this).entries.length},configurable:!0,enumerable:!0}),y(me,B),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:me}),!f&&D(W)){var Ke=s(Me.has),yt=s(Me.set),ct=function(ye){if(A(ye)){var ke=ye.body,Qe;if(T(ke)===B)return Qe=ye.headers?new W(ye.headers):new W,Ke(Qe,"content-type")||yt(Qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(ye,{body:V(0,w(ke)),headers:V(0,Qe)})}return ye};if(D(X)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(ke){return X(ke,arguments.length>1?ct(arguments[1]):{})}}),D(x)){var Ft=function(ke){return E(this,de),new x(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 uA={URLSearchParams:me,getState:R},uA}var Jq;function yme(){if(Jq)return Yq;Jq=1,qP();var t=Rt(),r=nn(),n=$q(),a=$r(),u=i0(),s=mr(),c=ba(),f=Uu(),d=W3(),M=Ni(),I=Mme(),y=wU(),p=n0(),N=FD().codeAt,E=gme(),D=zi(),m=pl(),j=K3(),T=Xq(),S=tl(),A=S.set,w=S.getterFor("URL"),b=T.URLSearchParams,V=T.getState,Q=a.URL,F=a.TypeError,O=a.parseInt,C=Math.floor,L=Math.pow,z=s("".charAt),U=s(/./.exec),B=s([].join),K=s(1 .toString),J=s([].pop),R=s([].push),G=s("".replace),X=s([].shift),x=s("".split),W=s("".slice),de=s("".toLowerCase),Me=s([].unshift),se="Invalid authority",Se="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+$/,St=/^[\da-f]+$/i,Tt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,tt=/[\0\t\n\r #/:<>?@[\\\]^|]/,Mt=/^[\u0000-\u0020]+/,pt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,et=/[\t\n\r]/g,Ae,Fe=function(ne){var pe=x(ne,"."),ue,q,_e,lt,Be,kt,Et;if(pe.length&&pe[pe.length-1]===""&&pe.length--,ue=pe.length,ue>4)return ne;for(q=[],_e=0;_e<ue;_e++){if(lt=pe[_e],lt==="")return ne;if(Be=10,lt.length>1&&z(lt,0)==="0"&&(Be=U(ut,lt)?16:8,lt=W(lt,Be===8?1:2)),lt==="")kt=0;else{if(!U(Be===10?vt:Be===8?dt:St,lt))return ne;kt=O(lt,Be)}R(q,kt)}for(_e=0;_e<ue;_e++)if(kt=q[_e],_e===ue-1){if(kt>=L(256,5-ue))return null}else if(kt>255)return null;for(Et=J(q),_e=0;_e<q.length;_e++)Et+=q[_e]*L(256,3-_e);return Et},le=function(ne){var pe=[0,0,0,0,0,0,0,0],ue=0,q=null,_e=0,lt,Be,kt,Et,nr,dr,ve,zt=function(){return z(ne,_e)};if(zt()===":"){if(z(ne,1)!==":")return;_e+=2,ue++,q=ue}for(;zt();){if(ue===8)return;if(zt()===":"){if(q!==null)return;_e++,ue++,q=ue;continue}for(lt=Be=0;Be<4&&U(St,zt());)lt=lt*16+O(zt(),16),_e++,Be++;if(zt()==="."){if(Be===0||(_e-=Be,ue>6))return;for(kt=0;zt();){if(Et=null,kt>0)if(zt()==="."&&kt<4)_e++;else return;if(!U(ft,zt()))return;for(;U(ft,zt());){if(nr=O(zt(),10),Et===null)Et=nr;else{if(Et===0)return;Et=Et*10+nr}if(Et>255)return;_e++}pe[ue]=pe[ue]*256+Et,kt++,(kt===2||kt===4)&&ue++}if(kt!==4)return;break}else if(zt()===":"){if(_e++,!zt())return}else if(zt())return;pe[ue++]=lt}if(q!==null)for(dr=ue-q,ue=7;ue!==0&&dr>0;)ve=pe[ue],pe[ue--]=pe[q+dr-1],pe[q+--dr]=ve;else if(ue!==8)return;return pe},Le=function(ne){for(var pe=null,ue=1,q=null,_e=0,lt=0;lt<8;lt++)ne[lt]!==0?(_e>ue&&(pe=q,ue=_e),q=null,_e=0):(q===null&&(q=lt),++_e);return _e>ue?q:pe},Ne=function(ne){var pe,ue,q,_e;if(typeof ne=="number"){for(pe=[],ue=0;ue<4;ue++)Me(pe,ne%256),ne=C(ne/256);return B(pe,".")}if(typeof ne=="object"){for(pe="",q=Le(ne),ue=0;ue<8;ue++)_e&&ne[ue]===0||(_e&&(_e=!1),q===ue?(pe+=ue?":":"::",_e=!0):(pe+=K(ne[ue],16),ue<7&&(pe+=":")));return"["+pe+"]"}return ne},Ie={},fe=I({},Ie,{" ":1,'"':1,"<":1,">":1,"`":1}),we=I({},fe,{"#":1,"?":1,"{":1,"}":1}),nt=I({},we,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),it=function(ne,pe){var ue=N(ne,0);return ue>32&&ue<127&&!M(pe,ne)?ne:encodeURIComponent(ne)},Ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},me=function(ne,pe){var ue;return ne.length===2&&U(be,z(ne,0))&&((ue=z(ne,1))===":"||!pe&&ue==="|")},Oe=function(ne){var pe;return ne.length>1&&me(W(ne,0,2))&&(ne.length===2||(pe=z(ne,2))==="/"||pe==="\\"||pe==="?"||pe==="#")},Ke=function(ne){return ne==="."||de(ne)==="%2e"},yt=function(ne){return ne=de(ne),ne===".."||ne==="%2e."||ne===".%2e"||ne==="%2e%2e"},ct={},Ft={},ye={},ke={},Qe={},xe={},st={},Nt={},Lt={},Ct={},Gt={},ur={},hr={},ii={},Or={},Pn={},Zt={},Lr={},vn={},wr={},Nr={},Un=function(ne,pe,ue){var q=D(ne),_e,lt,Be;if(pe){if(lt=this.parse(q),lt)throw new F(lt);this.searchParams=null}else{if(ue!==void 0&&(_e=new Un(ue,!0)),lt=this.parse(q,null,_e),lt)throw new F(lt);Be=V(new b),Be.bindURL(this),this.searchParams=Be}};Un.prototype={type:"URL",parse:function(ne,pe,ue){var q=this,_e=pe||ct,lt=0,Be="",kt=!1,Et=!1,nr=!1,dr,ve,zt,Kr;for(ne=D(ne),pe||(q.scheme="",q.username="",q.password="",q.host=null,q.port=null,q.path=[],q.query=null,q.fragment=null,q.cannotBeABaseURL=!1,ne=G(ne,Mt,""),ne=G(ne,pt,"$1")),ne=G(ne,et,""),dr=y(ne);lt<=dr.length;){switch(ve=dr[lt],_e){case ct:if(ve&&U(be,ve))Be+=de(ve),_e=Ft;else{if(pe)return Se;_e=ye;continue}break;case Ft:if(ve&&(U(Xe,ve)||ve==="+"||ve==="-"||ve==="."))Be+=de(ve);else if(ve===":"){if(pe&&(q.isSpecial()!==M(Ye,Be)||Be==="file"&&(q.includesCredentials()||q.port!==null)||q.scheme==="file"&&!q.host))return;if(q.scheme=Be,pe){q.isSpecial()&&Ye[q.scheme]===q.port&&(q.port=null);return}Be="",q.scheme==="file"?_e=ii:q.isSpecial()&&ue&&ue.scheme===q.scheme?_e=ke:q.isSpecial()?_e=Nt:dr[lt+1]==="/"?(_e=Qe,lt++):(q.cannotBeABaseURL=!0,R(q.path,""),_e=vn)}else{if(pe)return Se;Be="",_e=ye,lt=0;continue}break;case ye:if(!ue||ue.cannotBeABaseURL&&ve!=="#")return Se;if(ue.cannotBeABaseURL&&ve==="#"){q.scheme=ue.scheme,q.path=p(ue.path),q.query=ue.query,q.fragment="",q.cannotBeABaseURL=!0,_e=Nr;break}_e=ue.scheme==="file"?ii:xe;continue;case ke:if(ve==="/"&&dr[lt+1]==="/")_e=Lt,lt++;else{_e=xe;continue}break;case Qe:if(ve==="/"){_e=Ct;break}else{_e=Lr;continue}case xe:if(q.scheme=ue.scheme,ve===Ae)q.username=ue.username,q.password=ue.password,q.host=ue.host,q.port=ue.port,q.path=p(ue.path),q.query=ue.query;else if(ve==="/"||ve==="\\"&&q.isSpecial())_e=st;else if(ve==="?")q.username=ue.username,q.password=ue.password,q.host=ue.host,q.port=ue.port,q.path=p(ue.path),q.query="",_e=wr;else if(ve==="#")q.username=ue.username,q.password=ue.password,q.host=ue.host,q.port=ue.port,q.path=p(ue.path),q.query=ue.query,q.fragment="",_e=Nr;else{q.username=ue.username,q.password=ue.password,q.host=ue.host,q.port=ue.port,q.path=p(ue.path),q.path.length--,_e=Lr;continue}break;case st:if(q.isSpecial()&&(ve==="/"||ve==="\\"))_e=Lt;else if(ve==="/")_e=Ct;else{q.username=ue.username,q.password=ue.password,q.host=ue.host,q.port=ue.port,_e=Lr;continue}break;case Nt:if(_e=Lt,ve!=="/"||z(Be,lt+1)!=="/")continue;lt++;break;case Lt:if(ve!=="/"&&ve!=="\\"){_e=Ct;continue}break;case Ct:if(ve==="@"){kt&&(Be="%40"+Be),kt=!0,zt=y(Be);for(var vi=0;vi<zt.length;vi++){var ai=zt[vi];if(ai===":"&&!nr){nr=!0;continue}var xr=it(ai,nt);nr?q.password+=xr:q.username+=xr}Be=""}else if(ve===Ae||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&q.isSpecial()){if(kt&&Be==="")return se;lt-=y(Be).length+1,Be="",_e=Gt}else Be+=ve;break;case Gt:case ur:if(pe&&q.scheme==="file"){_e=Pn;continue}else if(ve===":"&&!Et){if(Be==="")return He;if(Kr=q.parseHost(Be),Kr)return Kr;if(Be="",_e=hr,pe===ur)return}else if(ve===Ae||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&q.isSpecial()){if(q.isSpecial()&&Be==="")return He;if(pe&&Be===""&&(q.includesCredentials()||q.port!==null))return;if(Kr=q.parseHost(Be),Kr)return Kr;if(Be="",_e=Zt,pe)return;continue}else ve==="["?Et=!0:ve==="]"&&(Et=!1),Be+=ve;break;case hr:if(U(ft,ve))Be+=ve;else if(ve===Ae||ve==="/"||ve==="?"||ve==="#"||ve==="\\"&&q.isSpecial()||pe){if(Be!==""){var ta=O(Be,10);if(ta>65535)return he;q.port=q.isSpecial()&&ta===Ye[q.scheme]?null:ta,Be=""}if(pe)return;_e=Zt;continue}else return he;break;case ii:if(q.scheme="file",ve==="/"||ve==="\\")_e=Or;else if(ue&&ue.scheme==="file")switch(ve){case Ae:q.host=ue.host,q.path=p(ue.path),q.query=ue.query;break;case"?":q.host=ue.host,q.path=p(ue.path),q.query="",_e=wr;break;case"#":q.host=ue.host,q.path=p(ue.path),q.query=ue.query,q.fragment="",_e=Nr;break;default:Oe(B(p(dr,lt),""))||(q.host=ue.host,q.path=p(ue.path),q.shortenPath()),_e=Lr;continue}else{_e=Lr;continue}break;case Or:if(ve==="/"||ve==="\\"){_e=Pn;break}ue&&ue.scheme==="file"&&!Oe(B(p(dr,lt),""))&&(me(ue.path[0],!0)?R(q.path,ue.path[0]):q.host=ue.host),_e=Lr;continue;case Pn:if(ve===Ae||ve==="/"||ve==="\\"||ve==="?"||ve==="#"){if(!pe&&me(Be))_e=Lr;else if(Be===""){if(q.host="",pe)return;_e=Zt}else{if(Kr=q.parseHost(Be),Kr)return Kr;if(q.host==="localhost"&&(q.host=""),pe)return;Be="",_e=Zt}continue}else Be+=ve;break;case Zt:if(q.isSpecial()){if(_e=Lr,ve!=="/"&&ve!=="\\")continue}else if(!pe&&ve==="?")q.query="",_e=wr;else if(!pe&&ve==="#")q.fragment="",_e=Nr;else if(ve!==Ae&&(_e=Lr,ve!=="/"))continue;break;case Lr:if(ve===Ae||ve==="/"||ve==="\\"&&q.isSpecial()||!pe&&(ve==="?"||ve==="#")){if(yt(Be)?(q.shortenPath(),ve!=="/"&&!(ve==="\\"&&q.isSpecial())&&R(q.path,"")):Ke(Be)?ve!=="/"&&!(ve==="\\"&&q.isSpecial())&&R(q.path,""):(q.scheme==="file"&&!q.path.length&&me(Be)&&(q.host&&(q.host=""),Be=z(Be,0)+":"),R(q.path,Be)),Be="",q.scheme==="file"&&(ve===Ae||ve==="?"||ve==="#"))for(;q.path.length>1&&q.path[0]==="";)X(q.path);ve==="?"?(q.query="",_e=wr):ve==="#"&&(q.fragment="",_e=Nr)}else Be+=it(ve,we);break;case vn:ve==="?"?(q.query="",_e=wr):ve==="#"?(q.fragment="",_e=Nr):ve!==Ae&&(q.path[0]+=it(ve,Ie));break;case wr:!pe&&ve==="#"?(q.fragment="",_e=Nr):ve!==Ae&&(ve==="'"&&q.isSpecial()?q.query+="%27":ve==="#"?q.query+="%23":q.query+=it(ve,Ie));break;case Nr:ve!==Ae&&(q.fragment+=it(ve,fe));break}lt++}},parseHost:function(ne){var pe,ue,q;if(z(ne,0)==="["){if(z(ne,ne.length-1)!=="]"||(pe=le(W(ne,1,-1)),!pe))return He;this.host=pe}else if(this.isSpecial()){if(ne=E(ne),U(Tt,ne)||(pe=Fe(ne),pe===null))return He;this.host=pe}else{if(U(tt,ne))return He;for(pe="",ue=y(ne),q=0;q<ue.length;q++)pe+=it(ue[q],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(Ye,this.scheme)},shortenPath:function(){var ne=this.path,pe=ne.length;pe&&(this.scheme!=="file"||pe!==1||!me(ne[0],!0))&&ne.length--},serialize:function(){var ne=this,pe=ne.scheme,ue=ne.username,q=ne.password,_e=ne.host,lt=ne.port,Be=ne.path,kt=ne.query,Et=ne.fragment,nr=pe+":";return _e!==null?(nr+="//",ne.includesCredentials()&&(nr+=ue+(q?":"+q:"")+"@"),nr+=Ne(_e),lt!==null&&(nr+=":"+lt)):pe==="file"&&(nr+="//"),nr+=ne.cannotBeABaseURL?Be[0]:Be.length?"/"+B(Be,"/"):"",kt!==null&&(nr+="?"+kt),Et!==null&&(nr+="#"+Et),nr},setHref:function(ne){var pe=this.parse(ne);if(pe)throw new F(pe);this.searchParams.update()},getOrigin:function(){var ne=this.scheme,pe=this.port;if(ne==="blob")try{return new mn(ne.path[0]).origin}catch(ue){return"null"}return ne==="file"||!this.isSpecial()?"null":ne+"://"+Ne(this.host)+(pe!==null?":"+pe:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ne){this.parse(D(ne)+":",ct)},getUsername:function(){return this.username},setUsername:function(ne){var pe=y(D(ne));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(ne){var pe=y(D(ne));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var ue=0;ue<pe.length;ue++)this.password+=it(pe[ue],nt)}},getHost:function(){var ne=this.host,pe=this.port;return ne===null?"":pe===null?Ne(ne):Ne(ne)+":"+pe},setHost:function(ne){this.cannotBeABaseURL||this.parse(ne,Gt)},getHostname:function(){var ne=this.host;return ne===null?"":Ne(ne)},setHostname:function(ne){this.cannotBeABaseURL||this.parse(ne,ur)},getPort:function(){var ne=this.port;return ne===null?"":D(ne)},setPort:function(ne){this.cannotHaveUsernamePasswordPort()||(ne=D(ne),ne===""?this.port=null:this.parse(ne,hr))},getPathname:function(){var ne=this.path;return this.cannotBeABaseURL?ne[0]:ne.length?"/"+B(ne,"/"):""},setPathname:function(ne){this.cannotBeABaseURL||(this.path=[],this.parse(ne,Zt))},getSearch:function(){var ne=this.query;return ne?"?"+ne:""},setSearch:function(ne){ne=D(ne),ne===""?this.query=null:(z(ne,0)==="?"&&(ne=W(ne,1)),this.query="",this.parse(ne,wr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ne=this.fragment;return ne?"#"+ne:""},setHash:function(ne){if(ne=D(ne),ne===""){this.fragment=null;return}z(ne,0)==="#"&&(ne=W(ne,1)),this.fragment="",this.parse(ne,Nr)},update:function(){this.query=this.searchParams.serialize()||null}};var mn=function(pe){var ue=d(this,ar),q=j(arguments.length,1)>1?arguments[1]:void 0,_e=A(ue,new Un(pe,!1,q));r||(ue.href=_e.serialize(),ue.origin=_e.getOrigin(),ue.protocol=_e.getProtocol(),ue.username=_e.getUsername(),ue.password=_e.getPassword(),ue.host=_e.getHost(),ue.hostname=_e.getHostname(),ue.port=_e.getPort(),ue.pathname=_e.getPathname(),ue.search=_e.getSearch(),ue.searchParams=_e.getSearchParams(),ue.hash=_e.getHash())},ar=mn.prototype,_r=function(ne,pe){return{get:function(){return w(this)[ne]()},set:pe&&function(ue){return w(this)[pe](ue)},configurable:!0,enumerable:!0}};if(r&&(f(ar,"href",_r("serialize","setHref")),f(ar,"origin",_r("getOrigin")),f(ar,"protocol",_r("getProtocol","setProtocol")),f(ar,"username",_r("getUsername","setUsername")),f(ar,"password",_r("getPassword","setPassword")),f(ar,"host",_r("getHost","setHost")),f(ar,"hostname",_r("getHostname","setHostname")),f(ar,"port",_r("getPort","setPort")),f(ar,"pathname",_r("getPathname","setPathname")),f(ar,"search",_r("getSearch","setSearch")),f(ar,"searchParams",_r("getSearchParams")),f(ar,"hash",_r("getHash","setHash"))),c(ar,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),c(ar,"toString",function(){return w(this).serialize()},{enumerable:!0}),Q){var sn=Q.createObjectURL,ea=Q.revokeObjectURL;sn&&c(mn,"createObjectURL",u(sn,Q)),ea&&c(mn,"revokeObjectURL",u(ea,Q))}return m(mn,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:mn}),Yq}var eX;function hme(){return eX||(eX=1,yme()),Fq}hme();var tX={},rX;function Nme(){if(rX)return tX;rX=1;var t=Rt(),r=hn();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),tX}Nme();var nX={},iX;function Eme(){return iX||(iX=1,Xq()),nX}Eme();var aX={},oX;function Dme(){if(oX)return aX;oX=1;var t=ba(),r=mr(),n=zi(),a=K3(),u=URLSearchParams,s=u.prototype,c=r(s.append),f=r(s.delete),d=r(s.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(s,"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,S=!1,A=E.length,w;j<A;)w=E[j++],S||w.key===D?(S=!0,f(this,w.key)):T++;for(;T<A;)w=E[T++],w.key===D&&w.value===m||c(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),aX}Dme();var uX={},sX;function vme(){if(sX)return uX;sX=1;var t=ba(),r=mr(),n=zi(),a=K3(),u=URLSearchParams,s=u.prototype,c=r(s.getAll),f=r(s.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&t(s,"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}),uX}vme();var lX={},cX;function mme(){if(cX)return lX;cX=1;var t=nn(),r=mr(),n=Uu(),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}),lX}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 _me(t,r){return Cme(t)||Ame(t,r)||Sme(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 Sme(t,r){if(t){if(typeof t=="string")return fX(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)?fX(t,r):void 0}}function fX(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 Ame(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.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,dX(a.key),a)}}function Lme(t,r,n){return r&&Ome(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function q5(t,r,n){return(r=dX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function dX(t){var r=wme(t,"string");return gg(r)=="symbol"?r:r+""}function wme(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 xme=function(){function t(){jme(this,t),q5(this,"_levels",[]),q5(this,"_transports",[]),q5(this,"_logs",[]),q5(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var n=r.split(">"),a=_me(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(c){return}}return Lme(t,[{key:"create",value:function(n,a){var u=this;return function(s){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,"",s,"color: ".concat(d,";"),f)}u._logs.push("".concat(n,": ").concat(s," +").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),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),sA=new xme;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 xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */xn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&Jd(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function MX(t,r,n,a,u,s,c){try{var f=t[s](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 s=t.apply(r,n);function c(d){MX(s,a,u,c,f,"next",d)}function f(d){MX(s,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,gX(a.key),a)}}function kme(t,r,n){return r&&Rme(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function M4(t,r,n){return(r=gX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gX(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 wo=sA.create("wasm_idv"),Pme=function(){function t(r){bme(this,t),M4(this,"_worker",null),M4(this,"_initialized",!1),M4(this,"_connectedToIdv",!1),M4(this,"_serviceRunning",!1),M4(this,"_userId",C5e(xIe)),M4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return kme(t,[{key:"init",value:function(){var r=Du(xn().mark(function a(){var u,s,c,f;return xn().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/rc/2.4/0e9b50e-c49957c66//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),wo("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/rc/2.4/0e9b50e-c49957c66/",preMain:!0});case 23:return f=M.sent,f.code===0&&wo("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(xn().mark(function a(u){var s,c;return xn().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:JD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!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),wo("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(xn().mark(function a(u){var s;return xn().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:JD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);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(xn().mark(function a(u,s,c){var f,d;return xn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},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,wo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=Du(xn().mark(function a(u,s){var c,f;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,wo("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(xn().mark(function a(){var u,s,c=arguments;return xn().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 s=d.sent,wo("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(u){var s;return xn().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 s=f.sent,wo("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);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(xn().mark(function a(u,s){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(u){var s=this;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){wo(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,E=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(E)}if(y==="stderr"){var D=I.data.content;wo(JSON.stringify(D)),s._setErrorScreen&&s._setErrorScreen(D)}},s._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(xn().mark(function a(){var u;return xn().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 IX(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?IX(Object(n),!0).forEach(function(a){lA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):IX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function lA(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 Hi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Hi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&e3(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function pX(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Xl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pX(s,a,u,c,f,"next",d)}function f(d){pX(s,a,u,c,f,"throw",d)}c(void 0)})}}var Vme=sA.create("store_idv"),Fme=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Xl(Hi().mark(function s(){var c;return Hi().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()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().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=Fd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=Fd.PROVIDER_ERROR),M===null){p.next=12;break}return I=new RM({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().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=Fd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Fd.PROVIDER_ERROR),d===null){p.next=13;break}return M=new RM({errorCode:d}),I=new y5({errorCode:rv.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()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=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:s}})},loadModules:function(){var a=Xl(Hi().mark(function s(){var c,f,d,M;return Hi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,Yme(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 bM({errorCode:DM.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=cm(u.find(function(c){return c.templateId===nv}));s.templateLayout=HF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Xl(Hi().mark(function s(c,f){var d,M,I;return Hi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Xl(Hi().mark(function E(){var D,m,j,T;return Hi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(D=A.sent,m=null,D.code===4&&(m=hl.HTTP_ISSUE),D.code!==0&&D.code!==4&&(m=hl.PROVIDER_ERROR),m!==null&&(j=new J3({errorCode:hl.HTTP_ISSUE}),T=new Co({errorCode:Ao.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:j}),d=T),D.code!==0){A.next=12;break}return d=null,A.abrupt("return",D);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,dm(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Xl(Hi().mark(function E(){var D,m,j,T,S,A,w,b,V,Q,F,O,C,L;return Hi().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,n().wasmService.getSessionState();case 2:if(T=U.sent,S=(D=T.data)===null||D===void 0?void 0:D.currentStep,A=(m=T.data)===null||m===void 0?void 0:m.isProcessingFiles,w=(j=T.data)===null||j===void 0||(j=j.workflow)===null||j===void 0?void 0:j.steps,b=T5e(w,S),V=T.code===4,Q=T.code!==0&&T.code!==4,F=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,w&&!b&&(O=hl.NOT_DATA_TYPE),V&&(O=hl.HTTP_ISSUE),Q&&(O=hl.PROVIDER_ERROR),A&&(O=hl.IS_PROCESSING),F&&(O=hl.DECODING_FAILED),O!==null&&(C=new J3({errorCode:O}),L=new Co({errorCode:Ao.INTERNAL_ISSUE,underlyingBaseError:C}),c=L),Vme(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:A})),!(b&&!A&&!V&&!Q&&!F)){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,dm(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:hl.DECODING_FAILED}),I=new Co({errorCode:Ao.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:NM.MESSAGE,message:EM.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Xl(Hi().mark(function s(c){var f,d,M,I,y,p,N,E,D;return Hi().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:Ao.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(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.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()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===nv&&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=HF(y.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=_5e(n().externalModules,s.steps,u);if(f===null||!D){var m=new Co({errorCode:Ao.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=Xl(Hi().mark(function s(){var c,f;return Hi().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()}},s)}));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 Yme(t){return cA.apply(this,arguments)}function cA(){return cA=Xl(Hi().mark(function t(r){var n,a,u,s,c,f;return Hi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:n1.getIdentifier(),supportedTemplates:n1.getSupportedTemplates(),component:n1}],a=lA(lA({},tv.LIVENESS,function(){return Promise.resolve().then(()=>Vrt)}),tv.DOC_READER,function(){return Promise.resolve().then(()=>JLt)}),u=Hi().mark(function I(){var y,p,N;return Hi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(y=c[s],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)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,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)})),cA.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 yX(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 fA(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yX(Object(n),!0).forEach(function(a){Qme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yX(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=Bme(t,"string");return pg(r)=="symbol"?r:r+""}function Bme(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=_pe(function(){return fA(fA(fA({},z5e.apply(void 0,arguments)),J5e.apply(void 0,arguments)),Fme.apply(void 0,arguments))}),hX=function(r){var n=r.children;return Ii.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 NX(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 EX(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NX(Object(n),!0).forEach(function(a){Gme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Gme(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}),s=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:NM.MESSAGE,message:D,module:E})},I=function(E){s(E)},y=function(E){s(!1),n(E)},p=jr.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return Ii.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?Ii.jsx(yv,{direction:c5.Ltr,children:Ii.jsx(hX,{children:"Waiting for play... or process completed"})}):Ii.jsx(Ii.Fragment,{children:Ii.jsx(yv,{direction:c5.Ltr,children:Ii.jsxs(Ii.Fragment,{children:[u&&Ii.jsx(hX,{children:a?Ii.jsx(n1,{perform:y,moduleProps:EX(EX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function qme(){return Ii.jsx(jr.StrictMode,{children:Ii.jsx(rpe,{children:Ii.jsx(Kme,{})})})}function g4(t){"@babel/helpers - typeof";return g4=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},g4(t)}function Xme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function DX(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 Jme(t,r,n){return r&&DX(t.prototype,r),n&&DX(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function e_e(t,r,n){return r=Ng(r),t_e(t,MA()?Reflect.construct(r,[],Ng(t).constructor):r.apply(t,n))}function t_e(t,r){if(r&&(g4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r_e(t)}function r_e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n_e(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 dA(t){var r=typeof Map=="function"?new Map:void 0;return dA=function(a){if(a===null||!a_e(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 i_e(a,arguments,Ng(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),hg(u,a)},dA(t)}function i_e(t,r,n){if(MA())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 MA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(MA=function(){return!!t})()}function a_e(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 vX(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=o_e(t,"string");return g4(r)=="symbol"?r:r+""}function o_e(t,r){if(g4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(g4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var u_e="*,::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%}",_X=function(t){function r(){var n;return Xme(this,r),n=e_e(this,r),vX(n,"_root",_Ie.createRoot(n.attachShadow({mode:"open"}))),vX(n,"_mounted",!1),n}return n_e(r,t),Jme(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.4.169-rc".trim())}},{key:"render",value:function(){this._root.render(Ii.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Ii.jsx("style",{nonce:ka.getState().getNonce(),children:u_e}),Ii.jsx(qme,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),sA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(dA(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 il(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */il=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&t3(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function TX(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function I4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){TX(s,a,u,c,f,"next",d)}function f(d){TX(s,a,u,c,f,"throw",d)}c(void 0)})}}function s_e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function l_e(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,f_e(a.key),a)}}function c_e(t,r,n){return r&&l_e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f_e(t){var r=d_e(t,"string");return t3(r)=="symbol"?r:r+""}function d_e(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 M_e=function(){function t(){s_e(this,t)}return c_e(t,[{key:"initialize",value:function(){var r=I4(il().mark(function a(u){var s;return il().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=ka.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=I4(il().mark(function a(u){var s,c;return il().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 s=d.sent,d.abrupt("return",s);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=I4(il().mark(function a(u){var s;return il().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ka.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=I4(il().mark(function a(u){var s,c;return il().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,ka.getState().prepareWorkflowAndPrepareUi(s);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=I4(il().mark(function a(u){var s,c,f,d;return il().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=x5e(s),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=I4(il().mark(function a(){var u;return il().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.4.169-rc")!==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)}}])}(),g_e=window.customElements.get("idv-flow");g_e||window.customElements.define("idv-flow",_X);var I_e=Object.defineProperty,p_e=Object.defineProperties,y_e=Object.getOwnPropertyDescriptors,SX=Object.getOwnPropertySymbols,h_e=Object.prototype.hasOwnProperty,N_e=Object.prototype.propertyIsEnumerable,AX=(t,r,n)=>r in t?I_e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,gA=(t,r)=>{for(var n in r||(r={}))h_e.call(r,n)&&AX(t,n,r[n]);if(SX)for(var n of SX(r))N_e.call(r,n)&&AX(t,n,r[n]);return t},CX=(t,r)=>p_e(t,y_e(r)),xo=(t,r,n)=>new Promise((a,u)=>{var s=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(s,c);f((n=n.apply(t,r)).next())}),jX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function OX(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var LX={exports:{}},Eg={},wX={exports:{}},an={},xX;function E_e(){if(xX)return an;xX=1;/**
76
+ `),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),sA=new xme;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 xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */xn=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&Jd(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function MX(t,r,n,a,u,s,c){try{var f=t[s](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 s=t.apply(r,n);function c(d){MX(s,a,u,c,f,"next",d)}function f(d){MX(s,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,gX(a.key),a)}}function kme(t,r,n){return r&&Rme(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function M4(t,r,n){return(r=gX(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gX(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 wo=sA.create("wasm_idv"),Pme=function(){function t(r){bme(this,t),M4(this,"_worker",null),M4(this,"_initialized",!1),M4(this,"_connectedToIdv",!1),M4(this,"_serviceRunning",!1),M4(this,"_userId",C5e(xIe)),M4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return kme(t,[{key:"init",value:function(){var r=Du(xn().mark(function a(){var u,s,c,f;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm.regulaforensics.com/idv/release/2.5/ed166d4-c49957c66//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),wo("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.regulaforensics.com/idv/release/2.5/ed166d4-c49957c66/",preMain:!0});case 23:return f=M.sent,f.code===0&&wo("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(xn().mark(function a(u){var s,c;return xn().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:JD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!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),wo("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(xn().mark(function a(u){var s;return xn().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:JD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);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(xn().mark(function a(u,s,c){var f,d;return xn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},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,wo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=Du(xn().mark(function a(u,s){var c,f;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,wo("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(xn().mark(function a(){var u,s,c=arguments;return xn().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 s=d.sent,wo("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(u){var s;return xn().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 s=f.sent,wo("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);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(xn().mark(function a(u,s){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(){var u;return xn().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,wo("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(xn().mark(function a(u){var s=this;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var y=I.data.target;if(y==="stdout"){wo(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,E=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(E)}if(y==="stderr"){var D=I.data.content;wo(JSON.stringify(D)),s._setErrorScreen&&s._setErrorScreen(D)}},s._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(xn().mark(function a(){var u;return xn().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 IX(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?IX(Object(n),!0).forEach(function(a){lA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):IX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function lA(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 Hi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Hi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&e3(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function pX(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Xl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pX(s,a,u,c,f,"next",d)}function f(d){pX(s,a,u,c,f,"throw",d)}c(void 0)})}}var Vme=sA.create("store_idv"),Fme=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Xl(Hi().mark(function s(){var c;return Hi().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()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().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=Fd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=Fd.PROVIDER_ERROR),M===null){p.next=12;break}return I=new RM({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().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=Fd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=Fd.PROVIDER_ERROR),d===null){p.next=13;break}return M=new RM({errorCode:d}),I=new y5({errorCode:rv.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()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=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:s}})},loadModules:function(){var a=Xl(Hi().mark(function s(){var c,f,d,M;return Hi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,Yme(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 bM({errorCode:DM.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=cm(u.find(function(c){return c.templateId===nv}));s.templateLayout=HF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Xl(Hi().mark(function s(c,f){var d,M,I;return Hi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Xl(Hi().mark(function E(){var D,m,j,T;return Hi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(D=A.sent,m=null,D.code===4&&(m=hl.HTTP_ISSUE),D.code!==0&&D.code!==4&&(m=hl.PROVIDER_ERROR),m!==null&&(j=new J3({errorCode:hl.HTTP_ISSUE}),T=new Co({errorCode:Ao.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:j}),d=T),D.code!==0){A.next=12;break}return d=null,A.abrupt("return",D);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,dm(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Xl(Hi().mark(function s(){var c,f,d,M,I;return Hi().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Xl(Hi().mark(function E(){var D,m,j,T,S,A,w,b,V,Q,F,O,C,L;return Hi().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,n().wasmService.getSessionState();case 2:if(T=U.sent,S=(D=T.data)===null||D===void 0?void 0:D.currentStep,A=(m=T.data)===null||m===void 0?void 0:m.isProcessingFiles,w=(j=T.data)===null||j===void 0||(j=j.workflow)===null||j===void 0?void 0:j.steps,b=T5e(w,S),V=T.code===4,Q=T.code!==0&&T.code!==4,F=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,w&&!b&&(O=hl.NOT_DATA_TYPE),V&&(O=hl.HTTP_ISSUE),Q&&(O=hl.PROVIDER_ERROR),A&&(O=hl.IS_PROCESSING),F&&(O=hl.DECODING_FAILED),O!==null&&(C=new J3({errorCode:O}),L=new Co({errorCode:Ao.INTERNAL_ISSUE,underlyingBaseError:C}),c=L),Vme(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:A})),!(b&&!A&&!V&&!Q&&!F)){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,dm(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:hl.DECODING_FAILED}),I=new Co({errorCode:Ao.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:NM.MESSAGE,message:EM.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Xl(Hi().mark(function s(c){var f,d,M,I,y,p,N,E,D;return Hi().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:Ao.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(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.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()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===nv&&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=HF(y.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=_5e(n().externalModules,s.steps,u);if(f===null||!D){var m=new Co({errorCode:Ao.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=Xl(Hi().mark(function s(){var c,f;return Hi().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()}},s)}));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 Yme(t){return cA.apply(this,arguments)}function cA(){return cA=Xl(Hi().mark(function t(r){var n,a,u,s,c,f;return Hi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:n1.getIdentifier(),supportedTemplates:n1.getSupportedTemplates(),component:n1}],a=lA(lA({},tv.LIVENESS,function(){return Promise.resolve().then(()=>Vrt)}),tv.DOC_READER,function(){return Promise.resolve().then(()=>JLt)}),u=Hi().mark(function I(){var y,p,N;return Hi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(y=c[s],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)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,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)})),cA.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 yX(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 fA(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yX(Object(n),!0).forEach(function(a){Qme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yX(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=Bme(t,"string");return pg(r)=="symbol"?r:r+""}function Bme(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=_pe(function(){return fA(fA(fA({},z5e.apply(void 0,arguments)),J5e.apply(void 0,arguments)),Fme.apply(void 0,arguments))}),hX=function(r){var n=r.children;return Ii.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 NX(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 EX(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NX(Object(n),!0).forEach(function(a){Gme(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NX(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Gme(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}),s=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:NM.MESSAGE,message:D,module:E})},I=function(E){s(E)},y=function(E){s(!1),n(E)},p=jr.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return Ii.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?Ii.jsx(yv,{direction:c5.Ltr,children:Ii.jsx(hX,{children:"Waiting for play... or process completed"})}):Ii.jsx(Ii.Fragment,{children:Ii.jsx(yv,{direction:c5.Ltr,children:Ii.jsxs(Ii.Fragment,{children:[u&&Ii.jsx(hX,{children:a?Ii.jsx(n1,{perform:y,moduleProps:EX(EX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function qme(){return Ii.jsx(jr.StrictMode,{children:Ii.jsx(rpe,{children:Ii.jsx(Kme,{})})})}function g4(t){"@babel/helpers - typeof";return g4=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},g4(t)}function Xme(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function DX(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 Jme(t,r,n){return r&&DX(t.prototype,r),n&&DX(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function e_e(t,r,n){return r=Ng(r),t_e(t,MA()?Reflect.construct(r,[],Ng(t).constructor):r.apply(t,n))}function t_e(t,r){if(r&&(g4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r_e(t)}function r_e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n_e(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 dA(t){var r=typeof Map=="function"?new Map:void 0;return dA=function(a){if(a===null||!a_e(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 i_e(a,arguments,Ng(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),hg(u,a)},dA(t)}function i_e(t,r,n){if(MA())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 MA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(MA=function(){return!!t})()}function a_e(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 vX(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=o_e(t,"string");return g4(r)=="symbol"?r:r+""}function o_e(t,r){if(g4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(g4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var u_e="*,::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%}",_X=function(t){function r(){var n;return Xme(this,r),n=e_e(this,r),vX(n,"_root",_Ie.createRoot(n.attachShadow({mode:"open"}))),vX(n,"_mounted",!1),n}return n_e(r,t),Jme(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.5.171".trim())}},{key:"render",value:function(){this._root.render(Ii.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Ii.jsx("style",{nonce:ka.getState().getNonce(),children:u_e}),Ii.jsx(qme,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),sA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(dA(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 il(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */il=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,C,L,z){return Object.defineProperty(O,C,{value:L,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(L,z,U){return L[z]=U}}function M(O,C,L,z){var U=C&&C.prototype instanceof p?C:p,B=Object.create(U.prototype);return d(B,"_invoke",function(K,J,R){var G=1;return function(X,x){if(G===3)throw Error("Generator is already running");if(G===4){if(X==="throw")throw x;return{value:t,done:!0}}for(R.method=X,R.arg=x;;){var W=R.delegate;if(W){var de=w(W,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,J,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 Q(z||[])),!0),B}function I(O,C,L){try{return{type:"normal",arg:O.call(C,L)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var y={};function p(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var m=Object.getPrototypeOf,j=m&&m(m(F([])));j&&j!==n&&a.call(j,s)&&(D=j);var T=E.prototype=p.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(C){d(O,C,function(L){return this._invoke(C,L)})})}function A(O,C){function L(U,B,K,J){var R=I(O[U],O,B);if(R.type!=="throw"){var G=R.arg,X=G.value;return X&&t3(X)=="object"&&a.call(X,"__await")?C.resolve(X.__await).then(function(x){L("next",x,K,J)},function(x){L("throw",x,K,J)}):C.resolve(X).then(function(x){G.value=x,K(G)},function(x){return L("throw",x,K,J)})}J(R.arg)}var z;d(this,"_invoke",function(U,B){function K(){return new C(function(J,R){L(U,B,J,R)})}return z=z?z.then(K,K):K()},!0)}function w(O,C){var L=C.method,z=O.i[L];if(z===t)return C.delegate=null,L==="throw"&&O.i.return&&(C.method="return",C.arg=t,w(O,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var U=I(z,O.i,C.arg);if(U.type==="throw")return C.method="throw",C.arg=U.arg,C.delegate=null,y;var B=U.arg;return B?B.done?(C[O.r]=B.value,C.next=O.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function b(O){this.tryEntries.push(O)}function V(O){var C=O[4]||{};C.type="normal",C.arg=t,O[4]=C}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function F(O){if(O!=null){var C=O[s];if(C)return C.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 C=typeof O=="function"&&O.constructor;return!!C&&(C===N||(C.displayName||C.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}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,C,L,z,U){U===void 0&&(U=Promise);var B=new A(M(O,C,L,z),U);return r.isGeneratorFunction(C)?B:B.next().then(function(K){return K.done?K.value:B.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var C=Object(O),L=[];for(var z in C)L.unshift(z);return function U(){for(;L.length;)if((z=L.pop())in C)return U.value=z,U.done=!1,U;return U.done=!0,U}},r.values=F,Q.prototype={constructor:Q,reset:function(C){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),!C)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 C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function z(X){K.type="throw",K.arg=C,L.next=X}for(var U=L.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B[4],J=this.prev,R=B[1],G=B[2];if(B[0]===-1)return z("end"),!1;if(!R&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=J){if(J<R)return this.method="next",this.arg=t,z(R),!0;if(J<G)return z(G),!1}}},abrupt:function(C,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 B=U;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var K=B?B[4]:{};return K.type=C,K.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(K)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[2]===C)return this.complete(z[4],z[3]),V(z),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var z=this.tryEntries[L];if(z[0]===C){var U=z[4];if(U.type==="throw"){var B=U.arg;V(z)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,z){return this.delegate={i:F(C),r:L,n:z},this.method==="next"&&(this.arg=t),y}},r}function TX(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function I4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){TX(s,a,u,c,f,"next",d)}function f(d){TX(s,a,u,c,f,"throw",d)}c(void 0)})}}function s_e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function l_e(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,f_e(a.key),a)}}function c_e(t,r,n){return r&&l_e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f_e(t){var r=d_e(t,"string");return t3(r)=="symbol"?r:r+""}function d_e(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 M_e=function(){function t(){s_e(this,t)}return c_e(t,[{key:"initialize",value:function(){var r=I4(il().mark(function a(u){var s;return il().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=ka.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=I4(il().mark(function a(u){var s,c;return il().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 s=d.sent,d.abrupt("return",s);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=I4(il().mark(function a(u){var s;return il().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ka.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=I4(il().mark(function a(u){var s,c;return il().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,ka.getState().prepareWorkflowAndPrepareUi(s);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=I4(il().mark(function a(u){var s,c,f,d;return il().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=x5e(s),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=I4(il().mark(function a(){var u;return il().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.5.171")!==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)}}])}(),g_e=window.customElements.get("idv-flow");g_e||window.customElements.define("idv-flow",_X);var I_e=Object.defineProperty,p_e=Object.defineProperties,y_e=Object.getOwnPropertyDescriptors,SX=Object.getOwnPropertySymbols,h_e=Object.prototype.hasOwnProperty,N_e=Object.prototype.propertyIsEnumerable,AX=(t,r,n)=>r in t?I_e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,gA=(t,r)=>{for(var n in r||(r={}))h_e.call(r,n)&&AX(t,n,r[n]);if(SX)for(var n of SX(r))N_e.call(r,n)&&AX(t,n,r[n]);return t},CX=(t,r)=>p_e(t,y_e(r)),xo=(t,r,n)=>new Promise((a,u)=>{var s=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(s,c);f((n=n.apply(t,r)).next())}),jX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function OX(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var LX={exports:{}},Eg={},wX={exports:{}},an={},xX;function E_e(){if(xX)return an;xX=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-IuUo9-iT.js";
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-BJmCp-qc.js";
2
2
  export {
3
3
  a as ConnectionError,
4
4
  e as DeinitializationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/idv-capture-web",
3
- "version": "2.4.169-rc",
3
+ "version": "2.5.171",
4
4
  "description": "Regula framework agnostic web components to work with webcamera",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/main.js",