@regulaforensics/idv-capture-web 2.3.146-nightly → 2.3.148-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -132,10 +132,7 @@ export declare class IdvIntegrationService {
132
132
  prepareWorkflow({ workflowId }: {
133
133
  workflowId: string;
134
134
  }): Promise<PrepareWorkflowCompletion>;
135
- startWorkflow({ metadata, locale, }: {
136
- metadata?: Record<string, unknown>;
137
- locale?: string;
138
- }): Promise<WorkflowCompletion>;
135
+ startWorkflow(config?: StartWorkflowConfig): Promise<WorkflowCompletion>;
139
136
  deinitialize(): Promise<DeinitializeCompletion>;
140
137
  /** service commands */
141
138
  get version(): string;
@@ -243,6 +240,11 @@ export declare enum StartSessionError {
243
240
  TOKEN_ERROR = 3
244
241
  }
245
242
 
243
+ declare type StartWorkflowConfig = {
244
+ metadata?: Record<string, unknown>;
245
+ locale?: string;
246
+ };
247
+
246
248
  declare enum TokenInitializeError {
247
249
  CONNECTION_ISSUE = 0,
248
250
  WORKFLOW_ISSUE = 1
package/dist/main.iife.js CHANGED
@@ -81,7 +81,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
81
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rOe(t,e){if(t){if(typeof t=="string")return yee(t,e);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)?yee(t,e):void 0}}function yee(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function nOe(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function iOe(t){if(Array.isArray(t))return t}var aOe=function(e){var n=e.option,a=e.layout,o=e.dataSourceQuestion,s=e.register,l=e.watch,d=ht.useState(!1),f=eOe(d,2),g=f[0],M=f[1],I=fee(),y=String(o.id),h=l(y),m=h===String(n.id),N=a.option,E=a.optionSelected,A={borderRadius:N.cornerRadius,background:Br(N.backgroundColor),borderColor:Br(N.borderColor),borderWidth:N.borderWidth},j={borderRadius:E.cornerRadius,background:Br(E.backgroundColor),borderColor:Br(E.borderColor),borderWidth:E.borderWidth},T=g&&I?{outline:"2px solid ".concat(Jp)}:{};return ne.jsx("div",{style:{display:"flex",flexGrow:1},children:ne.jsxs("label",{style:Iee(Iee({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},m?j:A),T),children:[ne.jsx("input",xn(Tt({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},s(y,{required:!!o.required,validate:X4(o.validators,!!o.required)})),{value:n.id,type:"radio",onFocus:function(){return M(!0)},onBlur:function(){return M(!1)}})),ne.jsx(Ou,xn(Tt({},m?E.title:N.title),{text:n.text}))]})},n.id)},oOe=function(e){var n=e.layout,a=e.watch,o=e.register,s=e.dataSourceQuestion;return ne.jsx("div",{style:{boxSizing:"border-box"},children:ne.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ne.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ne.jsx(Ou,xn(Tt({},n.title),{text:s.text}))}),ne.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:s.options.map(function(l){return ne.jsx(aOe,{register:o,watch:a,layout:n,option:l,dataSourceQuestion:s},l.id)})})]})})};function D2(t){"@babel/helpers - typeof";return D2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D2(t)}function hee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function aA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hee(Object(n),!0).forEach(function(a){uOe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hee(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function uOe(t,e,n){return(e=sOe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sOe(t){var e=lOe(t,"string");return D2(e)=="symbol"?e:e+""}function lOe(t,e){if(D2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(D2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cOe=function(e){var n=e.children,a=e.backgroundColor,o=e.cornerRadius,s=o===void 0?0:o,l=e.isError,d=e.isRequired,f=e.validationBorderColor,g=e.validationBorderWidth,M=aA({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Br(a)||"transparent",borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},l&&aA(aA({},Br(f)&&{borderColor:f,borderStyle:"solid"}),g&&{borderWidth:g}));return ne.jsxs("div",{style:M,children:[d&&ne.jsx("span",{style:{color:Br(f),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function fOe(t,e){return pOe(t)||MOe(t,e)||gOe(t,e)||dOe()}function dOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
82
82
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gOe(t,e){if(t){if(typeof t=="string")return vee(t,e);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)?vee(t,e):void 0}}function vee(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function MOe(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function pOe(t){if(Array.isArray(t))return t}var IOe=function(e){var n=e.validationErrorsTypes,a=e.title;return n?ne.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(o){var s=fOe(o,2),l=s[0],d=s[1];return ne.jsx(Ou,xn(Tt({},a),{text:d}),l)})}):null},yOe=function(e){var n,a,o,s,l,d,f,g,M,I,y,h,m,N,E=e.layout,A=e.dataSourceQuestion,j=e.register,T=String(A.id),C=function(L){return L?L===e3.EMAIL?"email":L===e3.FREE_TEXT?"text":L===e3.NUMBER?"number":L===e3.SECURE?"password":"text":"text"};return ne.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ne.jsx(Ou,xn(Tt({},E.title),{text:A.text,htmlFor:T})),ne.jsx("input",xn(Tt({},j(T,{required:!!A.required,validate:X4(A.validators,!!A.required)})),{id:T,type:C((n=E.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=E==null||(o=E.textField)===null||o===void 0?void 0:o.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(s=E==null||(l=E.textField)===null||l===void 0?void 0:l.fontSize)!==null&&s!==void 0?s:15,color:(d=Br(E==null||(f=E.textField)===null||f===void 0?void 0:f.fontColor))!==null&&d!==void 0?d:"#000000",height:"42px",borderWidth:(g=E==null||(M=E.textField)===null||M===void 0?void 0:M.borderWidth)!==null&&g!==void 0?g:1,borderColor:(I=Br(E==null||(y=E.textField)===null||y===void 0?void 0:y.borderColor))!==null&&I!==void 0?I:"#d9d9d9",borderStyle:"solid",borderRadius:(h=E==null||(m=E.textField)===null||m===void 0?void 0:m.cornerRadius)!==null&&h!==void 0?h:8,padding:"11px",boxSizing:"border-box",outlineColor:Jp},placeholder:(N=A.placeholder)!==null&&N!==void 0?N:"","data-id":T}))]})},hOe=function(e){var n,a,o,s,l,d,f,g,M,I,y,h=e.layout,m=e.dataSourceQuestion,N=e.register,E=String(m.id);return ne.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ne.jsx(Ou,xn(Tt({},h.title),{text:m.text,htmlFor:E})),ne.jsx("textarea",xn(Tt({},N(E,{required:!!m.required,validate:X4(m.validators,!!m.required)})),{id:E,placeholder:(n=m.placeholder)!==null&&n!==void 0?n:"",onChange:function(j){j.target.style.height="auto",j.target.style.height="".concat(j.target.scrollHeight-15,"px")},"data-id":E,style:{fontFamily:"sans-serif",fontSize:(a=h==null||(o=h.textField)===null||o===void 0?void 0:o.fontSize)!==null&&a!==void 0?a:15,color:(s=Br(h==null||(l=h.textField)===null||l===void 0?void 0:l.fontColor))!==null&&s!==void 0?s:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(d=h==null||(f=h.textField)===null||f===void 0?void 0:f.borderWidth)!==null&&d!==void 0?d:1,borderColor:(g=Br(h==null||(M=h.textField)===null||M===void 0?void 0:M.borderColor))!==null&&g!==void 0?g:"#d9d9d9",borderStyle:"solid",borderRadius:(I=h==null||(y=h.textField)===null||y===void 0?void 0:y.cornerRadius)!==null&&I!==void 0?I:8,padding:"11px",boxSizing:"border-box",outlineColor:Jp}}))]})},mee={},oA,Nee;function Eee(){if(Nee)return oA;Nee=1;var t=ei(),e=C1(),n=Oo(),a=Ca(),o=Bp(),s=Yp(),l=Function,d=t([].concat),f=t([].join),g={},M=function(y,h,m){if(!a(g,h)){for(var N=[],E=0;E<h;E++)N[E]="a["+E+"]";g[h]=l("C,a","return new C("+f(N,",")+")")}return g[h](y,m)};return oA=s?l.bind:function(I){var y=e(this),h=y.prototype,m=o(arguments,1),N=function(){var A=d(m,o(arguments));return this instanceof N?M(y,A.length,A):y.apply(I,A)};return n(h)&&(N.prototype=h),N},oA}var Dee;function vOe(){if(Dee)return mee;Dee=1;var t=zr(),e=Eee();return t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),mee}vOe();var Tee={},jee;function mOe(){if(jee)return Tee;jee=1;var t=zr(),e=ii(),n=O1();return t({target:"Object",stat:!0,sham:!e},{create:n}),Tee}mOe();var See={},Cee;function NOe(){if(Cee)return See;Cee=1;var t=zr(),e=yn(),n=Zl(),a=Vp(),o=OG(),s=e(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!o},{getPrototypeOf:function(d){return a(n(d))}}),See}NOe();var Aee={},Oee;function EOe(){if(Oee)return Aee;Oee=1;var t=ii(),e=nd(),n=Oo(),a=UG(),o=Zl(),s=BM(),l=Object.getPrototypeOf,d=Object.setPrototypeOf,f=Object.prototype,g="__proto__";if(t&&l&&d&&!(g in f))try{e(f,g,{configurable:!0,get:function(){return l(o(this))},set:function(I){var y=s(this);a(I)&&n(y)&&d(y,I)}})}catch(M){}return Aee}EOe();var _ee={},xee;function DOe(){if(xee)return _ee;xee=1;var t=zr(),e=Hh();return t({target:"Object",stat:!0},{setPrototypeOf:e}),_ee}DOe();var wee={},uA,bee;function TOe(){if(bee)return uA;bee=1;var t=Gh(),e=Qp(),n=TypeError;return uA=function(o){if(t(o))return o;throw new n(e(o)+" is not a constructor")},uA}var Lee;function jOe(){if(Lee)return wee;Lee=1;var t=zr(),e=qf(),n=Fh(),a=Eee(),o=TOe(),s=Ra(),l=Oo(),d=O1(),f=yn(),g=e("Reflect","construct"),M=Object.prototype,I=[].push,y=f(function(){function N(){}return!(g(function(){},[],N)instanceof N)}),h=!f(function(){g(function(){})}),m=y||h;return t({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(E,A){o(E),s(A);var j=arguments.length<3?E:o(arguments[2]);if(h&&!y)return g(E,A,j);if(E===j){switch(A.length){case 0:return new E;case 1:return new E(A[0]);case 2:return new E(A[0],A[1]);case 3:return new E(A[0],A[1],A[2]);case 4:return new E(A[0],A[1],A[2],A[3])}var T=[null];return n(I,T,A),new(n(a,E,T))}var C=j.prototype,_=d(l(C)?C:M),L=n(E,_,A);return l(L)?L:_}}),wee}jOe();var kee={},Ree;function SOe(){if(Ree)return kee;Ree=1;var t=zr(),e=yn(),n=V4(),a=Oo(),o=Zl(),s=GM(),l=DW(),d=Wp(),f=OZ(),g=Wh(),M=Qi(),I=bT(),y=M("isConcatSpreadable"),h=I>=51||!e(function(){var E=[];return E[y]=!1,E.concat()[0]!==E}),m=function(A){if(!a(A))return!1;var j=A[y];return j!==void 0?!!j:n(A)},N=!h||!g("concat");return t({target:"Array",proto:!0,arity:1,forced:N},{concat:function(A){var j=o(this),T=f(j,0),C=0,_,L,U,Q,F;for(_=-1,U=arguments.length;_<U;_++)if(F=_===-1?j:arguments[_],m(F))for(Q=s(F),l(C+Q),L=0;L<Q;L++,C++)L in F&&d(T,C,F[L]);else l(C+1),d(T,C++,F);return T.length=C,T}}),kee}SOe();function T2(t){"@babel/helpers - typeof";return T2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T2(t)}function COe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zee(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Pee(a.key),a)}}function AOe(t,e,n){return e&&zee(t.prototype,e),n&&zee(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function L1(t,e,n){return(e=Pee(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pee(t){var e=OOe(t,"string");return T2(e)=="symbol"?e:e+""}function OOe(t,e){if(T2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(T2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Uee=function(){function t(e){var n=e.errorCode,a=e.errorCodeKey,o=e.message,s=e.underlyingError,l=e.underlyingBaseError,d=e.domain,f=e.module,g=e.errorEnumName,M=e.shortDomainCode;COe(this,t),L1(this,"errorCode",void 0),L1(this,"errorCodeKey",void 0),L1(this,"message",void 0),L1(this,"underlyingError",void 0),L1(this,"underlyingBaseError",void 0),L1(this,"domain",void 0),L1(this,"module",void 0),L1(this,"errorEnumName",void 0),L1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=o,this.underlyingError=s,this.underlyingBaseError=l,this.module=f,this.domain=d,this.errorEnumName=g,this.shortDomainCode=M}return AOe(t,[{key:"lastUnderlyingError",get:function(){for(var n,a=this.underlyingBaseError;((o=a)===null||o===void 0?void 0:o.underlyingBaseError)instanceof t;){var o;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 o=Object.keys(a).find(function(s){return a[s]===n});if(!o)throw new Error("Invalid errorCode: ".concat(n," in enum"));return o}}])}();function e0(t){"@babel/helpers - typeof";return e0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e0(t)}function _Oe(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function xOe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wOe(t,e,n){return e=w3(e),bOe(t,Yee()?Reflect.construct(e,n||[],w3(t).constructor):e.apply(t,n))}function bOe(t,e){if(e&&(e0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LOe(t)}function LOe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yee=function(){return!!t})()}function w3(t){return w3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w3(t)}function kOe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sA(t,e)}function sA(t,e){return sA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sA(t,e)}function lA(t,e,n){return(e=ROe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ROe(t){var e=zOe(t,"string");return e0(e)=="symbol"?e:e+""}function zOe(t,e){if(e0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(e0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var b3=function(t){function e(n){var a=n.errorCode,o=n.message,s=n.underlyingError,l=n.underlyingBaseError;xOe(this,e);var d=Uee.getErrorKey(a,Lq);return wOe(this,e,[{errorCode:a,errorCodeKey:d,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:o,underlyingError:s,underlyingBaseError:l,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE}])}return kOe(e,t),_Oe(e)}(Uee);lA(b3,"MODULE",vC),lA(b3,"ERROR_ENUM_NAME","GuiModuleError"),lA(b3,"SHORT_CODE","GM");var POe=function(e){var n=e.header,a=e.title,o=e.buttons,s=e.footer,l=e.questions,d=e.dataSource,f=e.backgroundColor,g=rS(),M=g.perform,I=OTe({criteriaMode:"all"}),y=I.register,h=I.handleSubmit,m=I.formState.errors,N=I.reset,E=I.watch,A=I.control,j=function(C){M(NEe(C)),N()};return ne.jsx(n2,{header:n,footer:s,backgroundColor:f,children:ne.jsxs("form",{onSubmit:h(j),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ne.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:Br(l.backgroundColor)||"transparent"},children:[a&&ne.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ne.jsx(Ou,Tt({},a))}),ne.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:d.questions.map(function(T){var C,_=d.static,L=function(R,Y){return Y.find(function(V){var q;if((q=V.questionIds)!==null&&q!==void 0&&q.length)return V.questionIds.find(function(te){return R===te})})},U=function(R,Y){return Y.find(function(V){return!V.questionIds&&V.answerType===R})},Q=_?L(String(T.id),l.itemTypes)||U(T.answerType,l.itemTypes):l.itemTypes.find(function(b){return b.answerType===T.answerType});if(!Q){var F=new b3({errorCode:Lq.DECODING_FAILED,message:"The question template has not been found"});M(F);return}var x=Q==null?void 0:Q.displayType,O=T.id in m&&((C=m[T.id])===null||C===void 0?void 0:C.types);return ne.jsxs(ht.Fragment,{children:[ne.jsxs(cOe,{backgroundColor:Q==null?void 0:Q.backgroundColor,cornerRadius:Q==null?void 0:Q.cornerRadius,isError:!!O,isRequired:T.required,validationBorderColor:Q==null?void 0:Q.validationBorderColor,validationBorderWidth:Q==null?void 0:Q.validationBorderWidth,children:[x===B4.TEXT_EXPANDABLE&&ne.jsx(hOe,{layout:Q,dataSourceQuestion:T,register:y}),x===B4.TEXT_SINGLE_LINE&&ne.jsx(yOe,{layout:Q,dataSourceQuestion:T,register:y}),x===B4.SELECTOR_OPTIONS&&ne.jsx(KAe,{layout:Q,dataSourceQuestion:T,watch:E,register:y}),x===B4.SELECTOR_BUTTONS&&ne.jsx(oOe,{layout:Q,dataSourceQuestion:T,watch:E,register:y}),x===B4.SELECTOR_DROPDOWN&&ne.jsx(DAe,{control:A,layout:Q,dataSourceQuestion:T}),x===B4.MULTI_SELECTOR_DROPDOWN&&ne.jsx(kAe,{control:A,layout:Q,dataSourceQuestion:T})]}),O&&ne.jsx(IOe,{validationErrorsTypes:O,title:Q.validationMessage})]},T.id)})})]}),!!(o!=null&&o.length)&&ne.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:o.map(function(T,C){return ne.jsx(Rq,Tt({dataTestId:"question-button"},T),C)})})]})})},$ee=function(e){var n=e.templateId,a=e.templateLayout,o=e.dataSource;return!n||!a?ne.jsx(Hq,{}):n===id.STATUS?ne.jsx(kDe,{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===id.INFO?ne.jsx($De,{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===id.PROGRESS?ne.jsx(Hq,{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===id.INFO_DETAILS?ne.jsx(nTe,{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}):o&&o!==null&&o!==void 0&&o.questions.length&&n===id.QUESTIONS?ne.jsx(POe,{dataSource:o,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}):n===id.QUESTIONS&&!o?ne.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"}):ne.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},cA=!1,i1=function(e){var n=e.moduleProps,a=e.perform,o=n,s=o.templateId,l=o.templateLayout,d=o.dataSource,f=function(M){a&&a(M)};return s===id.QUESTIONS?ne.jsx(oZ,{perform:f,children:ne.jsx($ee,{dataSource:d,templateId:s,templateLayout:l})}):ne.jsx(oZ,{perform:f,children:ne.jsx($ee,{templateId:s,templateLayout:l})})};i1.getIdentifier=function(){return vC},i1.getSupportedTemplates=function(){return Object.values(id)},i1.deinitialize=function(){cA=!1},i1.initialize=function(){cA=!0},i1.isReady=function(){return cA},i1.displayName=vC;var Qee={},Fee;function UOe(){if(Fee)return Qee;Fee=1;var t=wt(),e=Mr(),n=Date,a=e(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),Qee}UOe();var Hee={},Vee={},fA,Bee;function Gee(){if(Bee)return fA;Bee=1;var t=dr(),e=Zn(),n=tn(),a=yu(),o=e("iterator");return fA=!t(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),l=s.searchParams,d=new URLSearchParams("a=1&a=2&b=3"),f="";return s.pathname="c%20d",l.forEach(function(g,M){l.delete("b"),f+=M+g}),d.delete("a",2),d.delete("b",void 0),a&&(!s.toJSON||!d.has("a",1)||d.has("a",2)||!d.has("a",void 0)||d.has("b"))||!l.size&&(a||!n)||!l.sort||s.href!=="https://a/c%20d?a=1&c=3"||l.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!l[o]||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"||f!=="a1c3"||new URL("https://x",void 0).host!=="x"}),fA}var dA,Zee;function YOe(){if(Zee)return dA;Zee=1;var t=Mr(),e=2147483647,n=36,a=1,o=26,s=38,l=700,d=72,f=128,g="-",M=/[^\0-\u007E]/,I=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",h=n-a,m=RangeError,N=t(I.exec),E=Math.floor,A=String.fromCharCode,j=t("".charCodeAt),T=t([].join),C=t([].push),_=t("".replace),L=t("".split),U=t("".toLowerCase),Q=function(b){for(var R=[],Y=0,V=b.length;Y<V;){var q=j(b,Y++);if(q>=55296&&q<=56319&&Y<V){var te=j(b,Y++);(te&64512)===56320?C(R,((q&1023)<<10)+(te&1023)+65536):(C(R,q),Y--)}else C(R,q)}return R},F=function(b){return b+22+75*(b<26)},x=function(b,R,Y){var V=0;for(b=Y?E(b/l):b>>1,b+=E(b/R);b>h*o>>1;)b=E(b/h),V+=n;return E(V+(h+1)*b/(b+s))},O=function(b){var R=[];b=Q(b);var Y=b.length,V=f,q=0,te=d,z,G;for(z=0;z<b.length;z++)G=b[z],G<128&&C(R,A(G));var K=R.length,k=K;for(K&&C(R,g);k<Y;){var W=e;for(z=0;z<b.length;z++)G=b[z],G>=V&&G<W&&(W=G);var pe=k+1;if(W-V>E((e-q)/pe))throw new m(y);for(q+=(W-V)*pe,V=W,z=0;z<b.length;z++){if(G=b[z],G<V&&++q>e)throw new m(y);if(G===V){for(var Me=q,le=n;;){var Oe=le<=te?a:le>=te+o?o:le-te;if(Me<Oe)break;var Pe=Me-Oe,me=n-Oe;C(R,A(F(Oe+Pe%me))),Me=E(Pe/me),le+=n}C(R,A(F(Me))),te=x(q,pe,k===K),q=0,k++}}q++,V++}return T(R,"")};return dA=function(b){var R=[],Y=L(_(U(b),I,"."),"."),V,q;for(V=0;V<Y.length;V++)q=Y[V],C(R,N(M,q)?"xn--"+O(q):q);return T(R,".")},dA}var Wee={},Kee;function $Oe(){if(Kee)return Wee;Kee=1;var t=wt(),e=Mr(),n=CN(),a=RangeError,o=String.fromCharCode,s=String.fromCodePoint,l=e([].join),d=!!s&&s.length!==1;return t({target:"String",stat:!0,arity:1,forced:d},{fromCodePoint:function(g){for(var M=[],I=arguments.length,y=0,h;I>y;){if(h=+arguments[y++],n(h,1114111)!==h)throw new a(h+" is not a valid code point");M[y]=h<65536?o(h):o(((h-=65536)>>10)+55296,h%1024+56320)}return l(M,"")}}),Wee}var gA,qee;function QOe(){if(qee)return gA;qee=1;var t=q1(),e=Math.floor,n=function(a,o){var s=a.length;if(s<8)for(var l=1,d,f;l<s;){for(f=l,d=a[l];f&&o(a[f-1],d)>0;)a[f]=a[--f];f!==l++&&(a[f]=d)}else for(var g=e(s/2),M=n(t(a,0,g),o),I=n(t(a,g),o),y=M.length,h=I.length,m=0,N=0;m<y||N<h;)a[m+N]=m<y&&N<h?o(M[m],I[N])<=0?M[m++]:I[N++]:m<y?M[m++]:I[N++];return a};return gA=n,gA}var MA,Jee;function Xee(){if(Jee)return MA;Jee=1,$5(),$Oe();var t=wt(),e=Lr(),n=$Q(),a=ju(),o=In(),s=Mr(),l=tn(),d=Gee(),f=ka(),g=Uu(),M=pp(),I=vl(),y=nU(),h=Au(),m=RM(),N=qn(),E=mi(),A=J1(),j=up(),T=_n(),C=Jn(),_=Ni(),L=Hl(),U=wM(),Q=tE(),F=Eh(),x=gp(),O=P4(),b=Zn(),R=QOe(),Y=b("iterator"),V="URLSearchParams",q=V+"Iterator",te=h.set,z=h.getterFor(V),G=h.getterFor(q),K=n("fetch"),k=n("Request"),W=n("Headers"),pe=k&&k.prototype,Me=W&&W.prototype,le=e.TypeError,Oe=e.encodeURIComponent,Pe=String.fromCharCode,me=a("String","fromCodePoint"),Le=parseInt,Ze=s("".charAt),Xe=s([].join),tt=s([].push),ct=s("".replace),Dt=s([].shift),Et=s([].splice),vt=s("".split),Je=s("".slice),dt=s(/./.exec),pt=/\+/g,Ke="�",Ce=/^[0-9a-f]+$/i,Ue=function(he,Re){var $e=Je(he,Re,Re+2);return dt(Ce,$e)?Le($e,16):NaN},fe=function(he){for(var Re=0,$e=128;$e>0&&(he&$e)!==0;$e>>=1)Re++;return Re},xe=function(he){var Re=null;switch(he.length){case 1:Re=he[0];break;case 2:Re=(he[0]&31)<<6|he[1]&63;break;case 3:Re=(he[0]&15)<<12|(he[1]&63)<<6|he[2]&63;break;case 4:Re=(he[0]&7)<<18|(he[1]&63)<<12|(he[2]&63)<<6|he[3]&63;break}return Re>1114111?null:Re},ve=function(he){he=ct(he,pt," ");for(var Re=he.length,$e="",be=0;be<Re;){var ot=Ze(he,be);if(ot==="%"){if(Ze(he,be+1)==="%"||be+3>Re){$e+="%",be++;continue}var It=Ue(he,be+1);if(It!==It){$e+=ot,be++;continue}be+=2;var At=fe(It);if(At===0)ot=Pe(It);else{if(At===1||At>4){$e+=Ke,be++;continue}for(var St=[It],Ft=1;Ft<At&&(be++,!(be+3>Re||Ze(he,be)!=="%"));){var ir=Ue(he,be+1);if(ir!==ir){be+=3;break}if(ir>191||ir<128)break;tt(St,ir),be+=2,Ft++}if(St.length!==At){$e+=Ke;continue}var Ir=xe(St);Ir===null?$e+=Ke:ot=me(Ir)}}$e+=ot,be++}return $e},ge=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},we=function(he){return de[he]},et=function(he){return ct(Oe(he),ge,we)},rt=y(function(Re,$e){te(this,{type:q,target:z(Re).entries,index:0,kind:$e})},V,function(){var Re=G(this),$e=Re.target,be=Re.index++;if(!$e||be>=$e.length)return Re.target=null,x(void 0,!0);var ot=$e[be];switch(Re.kind){case"keys":return x(ot.key,!1);case"values":return x(ot.value,!1)}return x([ot.key,ot.value],!1)},!0),Ye=function(he){this.entries=[],this.url=null,he!==void 0&&(C(he)?this.parseObject(he):this.parseQuery(typeof he=="string"?Ze(he,0)==="?"?Je(he,1):he:_(he)))};Ye.prototype={type:V,bindURL:function(he){this.url=he,this.update()},parseObject:function(he){var Re=this.entries,$e=F(he),be,ot,It,At,St,Ft,ir;if($e)for(be=Q(he,$e),ot=be.next;!(It=o(ot,be)).done;){if(At=Q(T(It.value)),St=At.next,(Ft=o(St,At)).done||(ir=o(St,At)).done||!o(St,At).done)throw new le("Expected sequence with length 2");tt(Re,{key:_(Ft.value),value:_(ir.value)})}else for(var Ir in he)E(he,Ir)&&tt(Re,{key:Ir,value:_(he[Ir])})},parseQuery:function(he){if(he)for(var Re=this.entries,$e=vt(he,"&"),be=0,ot,It;be<$e.length;)ot=$e[be++],ot.length&&(It=vt(ot,"="),tt(Re,{key:ve(Dt(It)),value:ve(Xe(It,"="))}))},serialize:function(){for(var he=this.entries,Re=[],$e=0,be;$e<he.length;)be=he[$e++],tt(Re,et(be.key)+"="+et(be.value));return Xe(Re,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){m(this,_e);var Re=arguments.length>0?arguments[0]:void 0,$e=te(this,new Ye(Re));l||(this.size=$e.entries.length)},_e=Te.prototype;if(M(_e,{append:function(Re,$e){var be=z(this);O(arguments.length,2),tt(be.entries,{key:_(Re),value:_($e)}),l||this.length++,be.updateURL()},delete:function(he){for(var Re=z(this),$e=O(arguments.length,1),be=Re.entries,ot=_(he),It=$e<2?void 0:arguments[1],At=It===void 0?It:_(It),St=0;St<be.length;){var Ft=be[St];if(Ft.key===ot&&(At===void 0||Ft.value===At)){if(Et(be,St,1),At!==void 0)break}else St++}l||(this.size=be.length),Re.updateURL()},get:function(Re){var $e=z(this).entries;O(arguments.length,1);for(var be=_(Re),ot=0;ot<$e.length;ot++)if($e[ot].key===be)return $e[ot].value;return null},getAll:function(Re){var $e=z(this).entries;O(arguments.length,1);for(var be=_(Re),ot=[],It=0;It<$e.length;It++)$e[It].key===be&&tt(ot,$e[It].value);return ot},has:function(Re){for(var $e=z(this).entries,be=O(arguments.length,1),ot=_(Re),It=be<2?void 0:arguments[1],At=It===void 0?It:_(It),St=0;St<$e.length;){var Ft=$e[St++];if(Ft.key===ot&&(At===void 0||Ft.value===At))return!0}return!1},set:function(Re,$e){var be=z(this);O(arguments.length,1);for(var ot=be.entries,It=!1,At=_(Re),St=_($e),Ft=0,ir;Ft<ot.length;Ft++)ir=ot[Ft],ir.key===At&&(It?Et(ot,Ft--,1):(It=!0,ir.value=St));It||tt(ot,{key:At,value:St}),l||(this.size=ot.length),be.updateURL()},sort:function(){var Re=z(this);R(Re.entries,function($e,be){return $e.key>be.key?1:-1}),Re.updateURL()},forEach:function(Re){for(var $e=z(this).entries,be=A(Re,arguments.length>1?arguments[1]:void 0),ot=0,It;ot<$e.length;)It=$e[ot++],be(It.value,It.key,this)},keys:function(){return new rt(this,"keys")},values:function(){return new rt(this,"values")},entries:function(){return new rt(this,"entries")}},{enumerable:!0}),f(_e,Y,_e.entries,{name:"entries"}),f(_e,"toString",function(){return z(this).serialize()},{enumerable:!0}),l&&g(_e,"size",{get:function(){return z(this).entries.length},configurable:!0,enumerable:!0}),I(Te,V),t({global:!0,constructor:!0,forced:!d},{URLSearchParams:Te}),!d&&N(W)){var Be=s(Me.has),gt=s(Me.set),lt=function(he){if(C(he)){var Re=he.body,$e;if(j(Re)===V)return $e=he.headers?new W(he.headers):new W,Be($e,"content-type")||gt($e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),L(he,{body:U(0,_(Re)),headers:U(0,$e)})}return he};if(N(K)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Re){return K(Re,arguments.length>1?lt(arguments[1]):{})}}),N(k)){var Ut=function(Re){return m(this,pe),new k(Re,arguments.length>1?lt(arguments[1]):{})};pe.constructor=Ut,Ut.prototype=pe,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ut})}}return MA={URLSearchParams:Te,getState:z},MA}var ete;function FOe(){if(ete)return Vee;ete=1,hY();var t=wt(),e=tn(),n=Gee(),a=Lr(),o=J1(),s=Mr(),l=ka(),d=Uu(),f=RM(),g=mi(),M=YH(),I=KY(),y=q1(),h=EE().codeAt,m=YOe(),N=Ni(),E=vl(),A=P4(),j=Xee(),T=Au(),C=T.set,_=T.getterFor("URL"),L=j.URLSearchParams,U=j.getState,Q=a.URL,F=a.TypeError,x=a.parseInt,O=Math.floor,b=Math.pow,R=s("".charAt),Y=s(/./.exec),V=s([].join),q=s(1 .toString),te=s([].pop),z=s([].push),G=s("".replace),K=s([].shift),k=s("".split),W=s("".slice),pe=s("".toLowerCase),Me=s([].unshift),le="Invalid authority",Oe="Invalid scheme",Pe="Invalid host",me="Invalid port",Le=/[a-z]/i,Ze=/[\d+-.a-z]/i,Xe=/\d/,tt=/^0x/i,ct=/^[0-7]+$/,Dt=/^\d+$/,Et=/^[\da-f]+$/i,vt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Je=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,pt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ke=/[\t\n\r]/g,Ce,Ue=function(ie){var Ie=k(ie,"."),se,J,je,ut,Fe,bt,yt;if(Ie.length&&Ie[Ie.length-1]===""&&Ie.length--,se=Ie.length,se>4)return ie;for(J=[],je=0;je<se;je++){if(ut=Ie[je],ut==="")return ie;if(Fe=10,ut.length>1&&R(ut,0)==="0"&&(Fe=Y(tt,ut)?16:8,ut=W(ut,Fe===8?1:2)),ut==="")bt=0;else{if(!Y(Fe===10?Dt:Fe===8?ct:Et,ut))return ie;bt=x(ut,Fe)}z(J,bt)}for(je=0;je<se;je++)if(bt=J[je],je===se-1){if(bt>=b(256,5-se))return null}else if(bt>255)return null;for(yt=te(J),je=0;je<J.length;je++)yt+=J[je]*b(256,3-je);return yt},fe=function(ie){var Ie=[0,0,0,0,0,0,0,0],se=0,J=null,je=0,ut,Fe,bt,yt,er,sr,De,Lt=function(){return R(ie,je)};if(Lt()===":"){if(R(ie,1)!==":")return;je+=2,se++,J=se}for(;Lt();){if(se===8)return;if(Lt()===":"){if(J!==null)return;je++,se++,J=se;continue}for(ut=Fe=0;Fe<4&&Y(Et,Lt());)ut=ut*16+x(Lt(),16),je++,Fe++;if(Lt()==="."){if(Fe===0||(je-=Fe,se>6))return;for(bt=0;Lt();){if(yt=null,bt>0)if(Lt()==="."&&bt<4)je++;else return;if(!Y(Xe,Lt()))return;for(;Y(Xe,Lt());){if(er=x(Lt(),10),yt===null)yt=er;else{if(yt===0)return;yt=yt*10+er}if(yt>255)return;je++}Ie[se]=Ie[se]*256+yt,bt++,(bt===2||bt===4)&&se++}if(bt!==4)return;break}else if(Lt()===":"){if(je++,!Lt())return}else if(Lt())return;Ie[se++]=ut}if(J!==null)for(sr=se-J,se=7;se!==0&&sr>0;)De=Ie[se],Ie[se--]=Ie[J+sr-1],Ie[J+--sr]=De;else if(se!==8)return;return Ie},xe=function(ie){for(var Ie=null,se=1,J=null,je=0,ut=0;ut<8;ut++)ie[ut]!==0?(je>se&&(Ie=J,se=je),J=null,je=0):(J===null&&(J=ut),++je);return je>se?J:Ie},ve=function(ie){var Ie,se,J,je;if(typeof ie=="number"){for(Ie=[],se=0;se<4;se++)Me(Ie,ie%256),ie=O(ie/256);return V(Ie,".")}if(typeof ie=="object"){for(Ie="",J=xe(ie),se=0;se<8;se++)je&&ie[se]===0||(je&&(je=!1),J===se?(Ie+=se?":":"::",je=!0):(Ie+=q(ie[se],16),se<7&&(Ie+=":")));return"["+Ie+"]"}return ie},ge={},de=M({},ge,{" ":1,'"':1,"<":1,">":1,"`":1}),we=M({},de,{"#":1,"?":1,"{":1,"}":1}),et=M({},we,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),rt=function(ie,Ie){var se=h(ie,0);return se>32&&se<127&&!g(Ie,ie)?ie:encodeURIComponent(ie)},Ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(ie,Ie){var se;return ie.length===2&&Y(Le,R(ie,0))&&((se=R(ie,1))===":"||!Ie&&se==="|")},_e=function(ie){var Ie;return ie.length>1&&Te(W(ie,0,2))&&(ie.length===2||(Ie=R(ie,2))==="/"||Ie==="\\"||Ie==="?"||Ie==="#")},Be=function(ie){return ie==="."||pe(ie)==="%2e"},gt=function(ie){return ie=pe(ie),ie===".."||ie==="%2e."||ie===".%2e"||ie==="%2e%2e"},lt={},Ut={},he={},Re={},$e={},be={},ot={},It={},At={},St={},Ft={},ir={},Ir={},ui={},Ar={},Pn={},Ht={},Or={},Nn={},_r={},yr={},Un=function(ie,Ie,se){var J=N(ie),je,ut,Fe;if(Ie){if(ut=this.parse(J),ut)throw new F(ut);this.searchParams=null}else{if(se!==void 0&&(je=new Un(se,!0)),ut=this.parse(J,null,je),ut)throw new F(ut);Fe=U(new L),Fe.bindURL(this),this.searchParams=Fe}};Un.prototype={type:"URL",parse:function(ie,Ie,se){var J=this,je=Ie||lt,ut=0,Fe="",bt=!1,yt=!1,er=!1,sr,De,Lt,Zr;for(ie=N(ie),Ie||(J.scheme="",J.username="",J.password="",J.host=null,J.port=null,J.path=[],J.query=null,J.fragment=null,J.cannotBeABaseURL=!1,ie=G(ie,dt,""),ie=G(ie,pt,"$1")),ie=G(ie,Ke,""),sr=I(ie);ut<=sr.length;){switch(De=sr[ut],je){case lt:if(De&&Y(Le,De))Fe+=pe(De),je=Ut;else{if(Ie)return Oe;je=he;continue}break;case Ut:if(De&&(Y(Ze,De)||De==="+"||De==="-"||De==="."))Fe+=pe(De);else if(De===":"){if(Ie&&(J.isSpecial()!==g(Ye,Fe)||Fe==="file"&&(J.includesCredentials()||J.port!==null)||J.scheme==="file"&&!J.host))return;if(J.scheme=Fe,Ie){J.isSpecial()&&Ye[J.scheme]===J.port&&(J.port=null);return}Fe="",J.scheme==="file"?je=ui:J.isSpecial()&&se&&se.scheme===J.scheme?je=Re:J.isSpecial()?je=It:sr[ut+1]==="/"?(je=$e,ut++):(J.cannotBeABaseURL=!0,z(J.path,""),je=Nn)}else{if(Ie)return Oe;Fe="",je=he,ut=0;continue}break;case he:if(!se||se.cannotBeABaseURL&&De!=="#")return Oe;if(se.cannotBeABaseURL&&De==="#"){J.scheme=se.scheme,J.path=y(se.path),J.query=se.query,J.fragment="",J.cannotBeABaseURL=!0,je=yr;break}je=se.scheme==="file"?ui:be;continue;case Re:if(De==="/"&&sr[ut+1]==="/")je=At,ut++;else{je=be;continue}break;case $e:if(De==="/"){je=St;break}else{je=Or;continue}case be:if(J.scheme=se.scheme,De===Ce)J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query=se.query;else if(De==="/"||De==="\\"&&J.isSpecial())je=ot;else if(De==="?")J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query="",je=_r;else if(De==="#")J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.query=se.query,J.fragment="",je=yr;else{J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,J.path=y(se.path),J.path.length--,je=Or;continue}break;case ot:if(J.isSpecial()&&(De==="/"||De==="\\"))je=At;else if(De==="/")je=St;else{J.username=se.username,J.password=se.password,J.host=se.host,J.port=se.port,je=Or;continue}break;case It:if(je=At,De!=="/"||R(Fe,ut+1)!=="/")continue;ut++;break;case At:if(De!=="/"&&De!=="\\"){je=St;continue}break;case St:if(De==="@"){bt&&(Fe="%40"+Fe),bt=!0,Lt=I(Fe);for(var Ci=0;Ci<Lt.length;Ci++){var si=Lt[Ci];if(si===":"&&!er){er=!0;continue}var xr=rt(si,et);er?J.password+=xr:J.username+=xr}Fe=""}else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()){if(bt&&Fe==="")return le;ut-=I(Fe).length+1,Fe="",je=Ft}else Fe+=De;break;case Ft:case ir:if(Ie&&J.scheme==="file"){je=Pn;continue}else if(De===":"&&!yt){if(Fe==="")return Pe;if(Zr=J.parseHost(Fe),Zr)return Zr;if(Fe="",je=Ir,Ie===ir)return}else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()){if(J.isSpecial()&&Fe==="")return Pe;if(Ie&&Fe===""&&(J.includesCredentials()||J.port!==null))return;if(Zr=J.parseHost(Fe),Zr)return Zr;if(Fe="",je=Ht,Ie)return;continue}else De==="["?yt=!0:De==="]"&&(yt=!1),Fe+=De;break;case Ir:if(Y(Xe,De))Fe+=De;else if(De===Ce||De==="/"||De==="?"||De==="#"||De==="\\"&&J.isSpecial()||Ie){if(Fe!==""){var ra=x(Fe,10);if(ra>65535)return me;J.port=J.isSpecial()&&ra===Ye[J.scheme]?null:ra,Fe=""}if(Ie)return;je=Ht;continue}else return me;break;case ui:if(J.scheme="file",De==="/"||De==="\\")je=Ar;else if(se&&se.scheme==="file")switch(De){case Ce:J.host=se.host,J.path=y(se.path),J.query=se.query;break;case"?":J.host=se.host,J.path=y(se.path),J.query="",je=_r;break;case"#":J.host=se.host,J.path=y(se.path),J.query=se.query,J.fragment="",je=yr;break;default:_e(V(y(sr,ut),""))||(J.host=se.host,J.path=y(se.path),J.shortenPath()),je=Or;continue}else{je=Or;continue}break;case Ar:if(De==="/"||De==="\\"){je=Pn;break}se&&se.scheme==="file"&&!_e(V(y(sr,ut),""))&&(Te(se.path[0],!0)?z(J.path,se.path[0]):J.host=se.host),je=Or;continue;case Pn:if(De===Ce||De==="/"||De==="\\"||De==="?"||De==="#"){if(!Ie&&Te(Fe))je=Or;else if(Fe===""){if(J.host="",Ie)return;je=Ht}else{if(Zr=J.parseHost(Fe),Zr)return Zr;if(J.host==="localhost"&&(J.host=""),Ie)return;Fe="",je=Ht}continue}else Fe+=De;break;case Ht:if(J.isSpecial()){if(je=Or,De!=="/"&&De!=="\\")continue}else if(!Ie&&De==="?")J.query="",je=_r;else if(!Ie&&De==="#")J.fragment="",je=yr;else if(De!==Ce&&(je=Or,De!=="/"))continue;break;case Or:if(De===Ce||De==="/"||De==="\\"&&J.isSpecial()||!Ie&&(De==="?"||De==="#")){if(gt(Fe)?(J.shortenPath(),De!=="/"&&!(De==="\\"&&J.isSpecial())&&z(J.path,"")):Be(Fe)?De!=="/"&&!(De==="\\"&&J.isSpecial())&&z(J.path,""):(J.scheme==="file"&&!J.path.length&&Te(Fe)&&(J.host&&(J.host=""),Fe=R(Fe,0)+":"),z(J.path,Fe)),Fe="",J.scheme==="file"&&(De===Ce||De==="?"||De==="#"))for(;J.path.length>1&&J.path[0]==="";)K(J.path);De==="?"?(J.query="",je=_r):De==="#"&&(J.fragment="",je=yr)}else Fe+=rt(De,we);break;case Nn:De==="?"?(J.query="",je=_r):De==="#"?(J.fragment="",je=yr):De!==Ce&&(J.path[0]+=rt(De,ge));break;case _r:!Ie&&De==="#"?(J.fragment="",je=yr):De!==Ce&&(De==="'"&&J.isSpecial()?J.query+="%27":De==="#"?J.query+="%23":J.query+=rt(De,ge));break;case yr:De!==Ce&&(J.fragment+=rt(De,de));break}ut++}},parseHost:function(ie){var Ie,se,J;if(R(ie,0)==="["){if(R(ie,ie.length-1)!=="]"||(Ie=fe(W(ie,1,-1)),!Ie))return Pe;this.host=Ie}else if(this.isSpecial()){if(ie=m(ie),Y(vt,ie)||(Ie=Ue(ie),Ie===null))return Pe;this.host=Ie}else{if(Y(Je,ie))return Pe;for(Ie="",se=I(ie),J=0;J<se.length;J++)Ie+=rt(se[J],ge);this.host=Ie}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return g(Ye,this.scheme)},shortenPath:function(){var ie=this.path,Ie=ie.length;Ie&&(this.scheme!=="file"||Ie!==1||!Te(ie[0],!0))&&ie.length--},serialize:function(){var ie=this,Ie=ie.scheme,se=ie.username,J=ie.password,je=ie.host,ut=ie.port,Fe=ie.path,bt=ie.query,yt=ie.fragment,er=Ie+":";return je!==null?(er+="//",ie.includesCredentials()&&(er+=se+(J?":"+J:"")+"@"),er+=ve(je),ut!==null&&(er+=":"+ut)):Ie==="file"&&(er+="//"),er+=ie.cannotBeABaseURL?Fe[0]:Fe.length?"/"+V(Fe,"/"):"",bt!==null&&(er+="?"+bt),yt!==null&&(er+="#"+yt),er},setHref:function(ie){var Ie=this.parse(ie);if(Ie)throw new F(Ie);this.searchParams.update()},getOrigin:function(){var ie=this.scheme,Ie=this.port;if(ie==="blob")try{return new En(ie.path[0]).origin}catch(se){return"null"}return ie==="file"||!this.isSpecial()?"null":ie+"://"+ve(this.host)+(Ie!==null?":"+Ie:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ie){this.parse(N(ie)+":",lt)},getUsername:function(){return this.username},setUsername:function(ie){var Ie=I(N(ie));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<Ie.length;se++)this.username+=rt(Ie[se],et)}},getPassword:function(){return this.password},setPassword:function(ie){var Ie=I(N(ie));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<Ie.length;se++)this.password+=rt(Ie[se],et)}},getHost:function(){var ie=this.host,Ie=this.port;return ie===null?"":Ie===null?ve(ie):ve(ie)+":"+Ie},setHost:function(ie){this.cannotBeABaseURL||this.parse(ie,Ft)},getHostname:function(){var ie=this.host;return ie===null?"":ve(ie)},setHostname:function(ie){this.cannotBeABaseURL||this.parse(ie,ir)},getPort:function(){var ie=this.port;return ie===null?"":N(ie)},setPort:function(ie){this.cannotHaveUsernamePasswordPort()||(ie=N(ie),ie===""?this.port=null:this.parse(ie,Ir))},getPathname:function(){var ie=this.path;return this.cannotBeABaseURL?ie[0]:ie.length?"/"+V(ie,"/"):""},setPathname:function(ie){this.cannotBeABaseURL||(this.path=[],this.parse(ie,Ht))},getSearch:function(){var ie=this.query;return ie?"?"+ie:""},setSearch:function(ie){ie=N(ie),ie===""?this.query=null:(R(ie,0)==="?"&&(ie=W(ie,1)),this.query="",this.parse(ie,_r)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ie=this.fragment;return ie?"#"+ie:""},setHash:function(ie){if(ie=N(ie),ie===""){this.fragment=null;return}R(ie,0)==="#"&&(ie=W(ie,1)),this.fragment="",this.parse(ie,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var En=function(Ie){var se=f(this,rr),J=A(arguments.length,1)>1?arguments[1]:void 0,je=C(se,new Un(Ie,!1,J));e||(se.href=je.serialize(),se.origin=je.getOrigin(),se.protocol=je.getProtocol(),se.username=je.getUsername(),se.password=je.getPassword(),se.host=je.getHost(),se.hostname=je.getHostname(),se.port=je.getPort(),se.pathname=je.getPathname(),se.search=je.getSearch(),se.searchParams=je.getSearchParams(),se.hash=je.getHash())},rr=En.prototype,Dr=function(ie,Ie){return{get:function(){return _(this)[ie]()},set:Ie&&function(se){return _(this)[Ie](se)},configurable:!0,enumerable:!0}};if(e&&(d(rr,"href",Dr("serialize","setHref")),d(rr,"origin",Dr("getOrigin")),d(rr,"protocol",Dr("getProtocol","setProtocol")),d(rr,"username",Dr("getUsername","setUsername")),d(rr,"password",Dr("getPassword","setPassword")),d(rr,"host",Dr("getHost","setHost")),d(rr,"hostname",Dr("getHostname","setHostname")),d(rr,"port",Dr("getPort","setPort")),d(rr,"pathname",Dr("getPathname","setPathname")),d(rr,"search",Dr("getSearch","setSearch")),d(rr,"searchParams",Dr("getSearchParams")),d(rr,"hash",Dr("getHash","setHash"))),l(rr,"toJSON",function(){return _(this).serialize()},{enumerable:!0}),l(rr,"toString",function(){return _(this).serialize()},{enumerable:!0}),Q){var un=Q.createObjectURL,ta=Q.revokeObjectURL;un&&l(En,"createObjectURL",o(un,Q)),ta&&l(En,"revokeObjectURL",o(ta,Q))}return E(En,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!e},{URL:En}),Vee}var tte;function HOe(){return tte||(tte=1,FOe()),Hee}HOe();var rte={},nte;function VOe(){if(nte)return rte;nte=1;var t=wt(),e=In();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),rte}VOe();var ite={},ate;function BOe(){return ate||(ate=1,Xee()),ite}BOe();var ote={},ute;function GOe(){if(ute)return ote;ute=1;var t=ka(),e=Mr(),n=Ni(),a=P4(),o=URLSearchParams,s=o.prototype,l=e(s.append),d=e(s.delete),f=e(s.forEach),g=e([].push),M=new o("a=1&a=2&b=3");return M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&t(s,"delete",function(I){var y=arguments.length,h=y<2?void 0:arguments[1];if(y&&h===void 0)return d(this,I);var m=[];f(this,function(L,U){g(m,{key:U,value:L})}),a(y,1);for(var N=n(I),E=n(h),A=0,j=0,T=!1,C=m.length,_;A<C;)_=m[A++],T||_.key===N?(T=!0,d(this,_.key)):j++;for(;j<C;)_=m[j++],_.key===N&&_.value===E||l(this,_.key,_.value)},{enumerable:!0,unsafe:!0}),ote}GOe();var ste={},lte;function ZOe(){if(lte)return ste;lte=1;var t=ka(),e=Mr(),n=Ni(),a=P4(),o=URLSearchParams,s=o.prototype,l=e(s.getAll),d=e(s.has),f=new o("a=1");return(f.has("a",2)||!f.has("a",void 0))&&t(s,"has",function(M){var I=arguments.length,y=I<2?void 0:arguments[1];if(I&&y===void 0)return d(this,M);var h=l(this,M);a(I,1);for(var m=n(y),N=0;N<h.length;)if(h[N++]===m)return!0;return!1},{enumerable:!0,unsafe:!0}),ste}ZOe();var cte={},fte;function WOe(){if(fte)return cte;fte=1;var t=tn(),e=Mr(),n=Uu(),a=URLSearchParams.prototype,o=e(a.forEach);return t&&!("size"in a)&&n(a,"size",{get:function(){var l=0;return o(this,function(){l++}),l},configurable:!0,enumerable:!0}),cte}WOe();function j2(t){"@babel/helpers - typeof";return j2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j2(t)}function KOe(t,e){return e6e(t)||XOe(t,e)||JOe(t,e)||qOe()}function qOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
83
83
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JOe(t,e){if(t){if(typeof t=="string")return dte(t,e);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)?dte(t,e):void 0}}function dte(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function XOe(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],f=!0,g=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);f=!0);}catch(M){g=!0,o=M}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function e6e(t){if(Array.isArray(t))return t}function t6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,gte(a.key),a)}}function n6e(t,e,n){return e&&r6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L3(t,e,n){return(e=gte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gte(t){var e=i6e(t,"string");return j2(e)=="symbol"?e:e+""}function i6e(t,e){if(j2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(j2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var a6e=function(){function t(){t6e(this,t),L3(this,"_levels",[]),L3(this,"_transports",[]),L3(this,"_logs",[]),L3(this,"_prevTime",0);try{if(!window.localStorage)return;var e=window.localStorage.getItem("logger");if(!e)return;var n=e.split(">"),a=KOe(n,2),o=a[0],s=a[1];this._levels=o.split(","),s&&(this._transports=s.split(","))}catch(l){return}}return n6e(t,[{key:"create",value:function(n,a){var o=this;return function(s){var l=Date.now(),d=0;if(o._prevTime&&(d=l-o._prevTime),o._prevTime=l,o._levels.includes(n)&&o._transports.includes("console")){var f=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(f,";"),n,"",s,"color: ".concat(f,";"),d)}o._logs.push("".concat(n,": ").concat(s," +").concat(d,"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(`
84
- `),a=new Blob([n],{type:"text/plain"}),o=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=o,s.click(),window.URL.revokeObjectURL(o),this.cleanLogs()}}}])}(),pA=new a6e;function JM(t){"@babel/helpers - typeof";return JM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JM(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&JM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(JM(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function Mte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Nu(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Mte(s,a,o,l,d,"next",f)}function d(f){Mte(s,a,o,l,d,"throw",f)}l(void 0)})}}function o6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,pte(a.key),a)}}function s6e(t,e,n){return e&&u6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function t0(t,e,n){return(e=pte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pte(t){var e=l6e(t,"string");return JM(e)=="symbol"?e:e+""}function l6e(t,e){if(JM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(JM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wo=pA.create("wasm_idv"),c6e=function(){function t(e){o6e(this,t),t0(this,"_worker",null),t0(this,"_initialized",!1),t0(this,"_connectedToIdv",!1),t0(this,"_serviceRunning",!1),t0(this,"_userId",Ime(N3e)),t0(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return s6e(t,[{key:"init",value:function(){var e=Nu(bn().mark(function a(){var o,s,l,d;return bn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/99157e3-6d68959d3//PlatformAdaptor.worker.js");case 4:return o=g.sent,g.next=7,o.blob();case 7:s=g.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),wo("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/99157e3-6d68959d3/",preMain:!0});case 23:return d=g.sent,d.code===0&&wo("Worker was created successfully"),g.abrupt("return",d);case 26:case"end":return g.stop()}},a,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:o.host,httpRetryCount:o.httpRetryCount||0,httpTimeoutMs:o.httpTimeoutMs||0,isSecure:(s=o.isSecure)!==null&&s!==void 0?s:!0,password:o.password,port:o.port?o.port:0,schema:o.schema?o.schema:"basic",userName:o.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:o},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=Nu(bn().mark(function a(o,s,l){var d,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return d={workflowId:o,locale:s},l&&(yme(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=M.sent,wo("Start session result code: ".concat(f.code)),M.abrupt("return",f);case 7:case"end":return M.stop()}},a,this)}));function n(a,o,s){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:o},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,wo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=Nu(bn().mark(function a(){var o,s,l=arguments;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:o,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,wo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return o=l.sent,wo("getHealth result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return o=l.sent,wo("getServiceToken result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return o=l.sent,wo("abandonSession result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:o},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,wo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=Nu(bn().mark(function a(o,s){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:o},preMain:!0});case 2:return l=f.sent,wo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,o){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return o=l.sent,wo("getSessionState result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return o=l.sent,wo("waitForSessionUpdate result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return o=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,wo("disconnect result code: ".concat(o.code)),l.abrupt("return",o);case 7:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=Nu(bn().mark(function a(o){var s=this;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,g){if(!s._worker)return g();s._worker.onmessage=function(M){var I=M.data.target;if(I==="stdout"){wo(JSON.stringify(M.data.content));return}if(I==="custom"){var y=M.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(s._initialized=!0),f(m)}if(I==="stderr"){var N=M.data.content;wo(JSON.stringify(N)),s._setErrorScreen&&s._setErrorScreen(N)}},s._worker.postMessage(o)}));case 1:case"end":return d.stop()}},a)}));function n(a){return e.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 e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return o=l.sent,this.terminateWorker(),l.abrupt("return",o);case 10:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function XM(t){"@babel/helpers - typeof";return XM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XM(t)}function Ite(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function S2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ite(Object(n),!0).forEach(function(a){IA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ite(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function IA(t,e,n){return(e=f6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f6e(t){var e=d6e(t,"string");return XM(e)=="symbol"?e:e+""}function d6e(t,e){if(XM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(XM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Fi=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&XM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(XM(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function yte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function ql(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){yte(s,a,o,l,d,"next",f)}function d(f){yte(s,a,o,l,d,"throw",f)}l(void 0)})}}var g6e=pA.create("store_idv"),M6e=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ql(Fi().mark(function s(){var l;return Fi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new c6e,f.next=3,l.init();case 3:e({wasmService:l});case 4:case"end":return f.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalWaitingUi:function(o){e({isFinalWaitingUi:o})},connectToIdv:function(o){return ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){y.next=3;break}return y.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(o);case 5:if(f=y.sent,g=null,f.code===4&&(g=PM.HTTP_ISSUE),f.code!==0&&f.code!==4&&(g=PM.PROVIDER_ERROR),g===null){y.next=12;break}return M=new bp({errorCode:g}),y.abrupt("return",{error:M});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(o){return ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().wasmService,y.next=3,l.connectByUrl(o);case 3:if(d=y.sent,f=null,d.code===4&&(f=PM.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=PM.PROVIDER_ERROR),f===null){y.next=13;break}return g=new bp({errorCode:f}),M=new bh({errorCode:kE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:M});case 13:return y.abrupt("return",{workflows:d.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(o){var s=function(d){var f,g=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,M=S2(S2({},d.results),{},{sessionId:g}),I=S2({results:M},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),o(I)};e(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=ql(Fi().mark(function s(){var l,d,f,g;return Fi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().externalModulesNames,I.prev=1,I.next=4,p6e(l);case 4:return d=I.sent,e(function(){return{externalModules:d}}),I.abrupt("return",{});case 9:return I.prev=9,I.t0=I.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),g=new wp({errorCode:vp.MODULES_INSTANTIATION_FAILURE}),I.abrupt("return",{error:g});case 16:case"end":return I.stop()}},s,null,[[1,9]])}));function o(){return a.apply(this,arguments)}return o}(),setProcessingTemplate:function(o){var s=FD(o.find(function(l){return l.templateId===RE}));s.templateLayout=iH(s.templateLayout,n().layout),e({processingTransformedTemplate:s})},setIsProcessing:function(o){e({isProcessing:o})},_pushStep:function(){var a=ql(Fi().mark(function s(l,d){var f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return f=null,g=function(){var h=ql(Fi().mark(function m(){var N,E,A,j;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(N=C.sent,E=null,N.code===4&&(E=Nl.HTTP_ISSUE),N.code!==0&&N.code!==4&&(E=Nl.PROVIDER_ERROR),E!==null&&(A=new Lp({errorCode:Nl.HTTP_ISSUE}),j=new vu({errorCode:hu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=j),N.code!==0){C.next=12;break}return f=null,C.abrupt("return",N);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),M=function(){return null},y.next=5,VD(g,M);case 5:return y.abrupt("return",f?{error:f}:{});case 6:case"end":return y.stop()}},s)}));function o(s,l){return a.apply(this,arguments)}return o}(),_findStepById:function(o){var s=n().workflow;if(!s||!o)return null;var l=s.steps.find(function(d){return d.id===o});return l!=null?l:null},_waitingForNextStep:function(){var a=ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().currentStepId,d=null,f=function(){var h=ql(Fi().mark(function m(){var N,E,A,j,T,C,_,L,U,Q,F,x,O,b,R;return Fi().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,n().wasmService.getSessionState();case 2:if(j=V.sent,T=(N=j.data)===null||N===void 0?void 0:N.currentStep,C=(E=j.data)===null||E===void 0?void 0:E.isProcessingFiles,_=(A=j.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,L=gme(_,T),U=j.code===4,Q=j.code!==0&&j.code!==4,F=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=T&&T===l,O=null,_&&!L&&(O=Nl.NOT_DATA_TYPE),U&&(O=Nl.HTTP_ISSUE),Q&&(O=Nl.PROVIDER_ERROR),C&&(O=Nl.IS_PROCESSING),x&&(O=Nl.SAME_STEP),F&&(O=Nl.DECODING_FAILED),O!==null&&(b=new Lp({errorCode:O}),R=new vu({errorCode:hu.INTERNAL_ISSUE,underlyingBaseError:b}),d=R),g6e(JSON.stringify({nextStep:T,isDataType:L,isProcessingFiles:C})),!(L&&!x&&!C&&!U&&!Q&&!F)){V.next=23;break}return d=null,V.abrupt("return",j.data);case 23:return V.abrupt("return",null);case 24:case"end":return V.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),g=function(){return null},y.next=6,VD(f,g);case 6:if(M=y.sent,!d){y.next=9;break}return y.abrupt("return",{error:d});case 9:return y.abrupt("return",{workflow:M==null?void 0:M.workflow,nextStep:M==null?void 0:M.currentStep});case 10:case"end":return y.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalStepAndStopProcess:function(o){var s=o||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:yp.MESSAGE,message:hp.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=ql(Fi().mark(function s(l){var d,f,g,M,I,y,h,m,N;return Fi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(d=n().currentStepId,d){A.next=3;break}return A.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){A.next=7;break}return n().setFinalStepAndStopProcess(),A.abrupt("return");case 7:if(!(l instanceof ri)){A.next=13;break}return f=l,g=new vu({errorCode:hu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:f}),n().workflowSessionCompletion({error:g}),n().resetSession(),A.abrupt("return");case 13:return A.next=15,n()._pushStep(d,l);case 15:if(M=A.sent,!M.error){A.next=20;break}return n().workflowSessionCompletion({error:M.error}),n().resetSession(),A.abrupt("return");case 20:return A.next=22,n()._waitingForNextStep();case 22:if(I=A.sent,!I.error){A.next=27;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),A.abrupt("return");case 27:if(y=I.workflow,h=I.nextStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),m=n()._findStepById(h),N=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(m!=null&&m.final&&!N(m.client))){A.next=37;break}return n().setFinalStepAndStopProcess(m.id),A.abrupt("return");case 37:m!=null&&m.final&&N(m.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(h),n().setIsProcessing(!1);case 40:case"end":return A.stop()}},s)}));function o(s){return a.apply(this,arguments)}return o}(),onChangeScreen:function(o){if(!o)return e(function(){return{currentScreenConfig:null}});var s=n().workflow,l=null;if(o===RE&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(l={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var f,g,M=n()._findStepById(o);if(typeof(M==null||(f=M.client)===null||f===void 0?void 0:f.templateId)=="string"){var I;l=S2(S2({},M==null?void 0:M.client),{},{templateId:M.client.templateId,dataSource:(I=M.dataSource)!==null&&I!==void 0?I:null})}if(l){var y;l.sessionId=(y=n().currentSessionData)===null||y===void 0?void 0:y.sessionId,l.serviceToken=n().serviceToken}if(l&&hme(M==null||(g=M.client)===null||g===void 0?void 0:g.templateLayout)){var h=iH(M.client.templateLayout,n().layout);h&&(l.templateLayout=h)}}var m=dme(n().externalModules,s.steps,o);if(l===null||!m){var N=new vu({errorCode:hu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:N}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(o),e(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var a=ql(Fi().mark(function s(){var l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=g.sent,n().resetWasmService(),n().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(d==null?void 0:d.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),resetSession:function(){return e(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 e(function(){return{wasmService:null}})}}};function p6e(t){return yA.apply(this,arguments)}function yA(){return yA=ql(Fi().mark(function t(e){var n,a,o,s,l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:n=[{id:i1.getIdentifier(),supportedTemplates:i1.getSupportedTemplates(),component:i1}],a=IA(IA({},LE.LIVENESS,function(){return Promise.resolve().then(()=>Zot)}),LE.DOC_READER,function(){return Promise.resolve().then(()=>vPt)}),o=Fi().mark(function M(){var I,y,h;return Fi().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(I=l[s],y=function(){return a[I]()},!y){N.next=7;break}return N.next=5,y();case 5:h=N.sent,n.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return N.stop()}},M)}),s=0,l=e;case 4:if(!(s<l.length)){g.next=9;break}return g.delegateYield(o(),"t0",6);case 6:s++,g.next=4;break;case 9:return d=n.filter(function(M){return M!==null}),g.abrupt("return",d);case 11:case"end":return g.stop()}},t)})),yA.apply(this,arguments)}function C2(t){"@babel/helpers - typeof";return C2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C2(t)}function hte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function hA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hte(Object(n),!0).forEach(function(a){I6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function I6e(t,e,n){return(e=y6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y6e(t){var e=h6e(t,"string");return C2(e)=="symbol"?e:e+""}function h6e(t,e){if(C2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(C2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xa=dve(function(){return hA(hA(hA({},jme.apply(void 0,arguments)),$me.apply(void 0,arguments)),M6e.apply(void 0,arguments))}),vte=function(e){var n=e.children;return vi.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 A2(t){"@babel/helpers - typeof";return A2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A2(t)}function mte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function Nte(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mte(Object(n),!0).forEach(function(a){v6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function v6e(t,e,n){return(e=m6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m6e(t){var e=N6e(t,"string");return A2(e)=="symbol"?e:e+""}function N6e(t,e){if(A2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(A2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var E6e=function(){var e=xa(function(h){return h.currentScreenConfig}),n=xa(function(h){return h.pushStepWaitNextStepAndSet}),a=xa(function(h){return h.processingTransformedTemplate}),o=xa(function(h){return h.isProcessing}),s=xa(function(h){return h.setIsProcessing}),l=xa(function(h){return h.listener}),d=xa(function(h){return h.externalModules}),f=xa(function(h){return h.modulesConfig}),g=function(m,N){l({eventType:yp.MESSAGE,message:N,module:m})},M=function(m){s(m)},I=function(m){s(!1),n(m)},y=ht.useCallback(function(){if(!e)return null;var h=d.find(function(m){return m.supportedTemplates.includes(e.templateId)});if(h&&e)return vi.jsx(h.component,{perform:I,moduleProps:e,modulesConfig:f,idvEventListener:g,isProcessing:M})},[e,d]);return!e&&!a?vi.jsx(KE,{direction:Sh.Ltr,children:vi.jsx(vte,{children:"Waiting for play... or process completed"})}):vi.jsx(vi.Fragment,{children:vi.jsx(KE,{direction:Sh.Ltr,children:vi.jsxs(vi.Fragment,{children:[o&&vi.jsx(vte,{children:a?vi.jsx(i1,{perform:I,moduleProps:Nte(Nte({},a),{},{templateId:"PROGRESS"}),idvEventListener:g,isProcessing:M}):"Processing..."}),y()]})})})};function D6e(){return vi.jsx(ht.StrictMode,{children:vi.jsx(H3e,{children:vi.jsx(E6e,{})})})}function r0(t){"@babel/helpers - typeof";return r0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r0(t)}function T6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ete(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Tte(a.key),a)}}function j6e(t,e,n){return e&&Ete(t.prototype,e),n&&Ete(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function S6e(t,e,n){return e=_2(e),C6e(t,mA()?Reflect.construct(e,[],_2(t).constructor):e.apply(t,n))}function C6e(t,e){if(e&&(r0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A6e(t)}function A6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O2(t,e)}function vA(t){var e=typeof Map=="function"?new Map:void 0;return vA=function(a){if(a===null||!x6e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(a))return e.get(a);e.set(a,o)}function o(){return _6e(a,arguments,_2(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),O2(o,a)},vA(t)}function _6e(t,e,n){if(mA())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,e);var o=new(t.bind.apply(t,a));return n&&O2(o,n.prototype),o}function mA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mA=function(){return!!t})()}function x6e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(e){return typeof t=="function"}}function O2(t,e){return O2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},O2(t,e)}function _2(t){return _2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_2(t)}function Dte(t,e,n){return(e=Tte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tte(t){var e=w6e(t,"string");return r0(e)=="symbol"?e:e+""}function w6e(t,e){if(r0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(r0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var b6e="*,::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%}",jte=function(t){function e(){var n;return T6e(this,e),n=S6e(this,e),Dte(n,"_root",p3e.createRoot(n.attachShadow({mode:"open"}))),Dte(n,"_mounted",!1),n}return O6e(e,t),j6e(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.146-nightly".trim())}},{key:"render",value:function(){this._root.render(vi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[vi.jsx("style",{nonce:xa.getState().getNonce(),children:b6e}),vi.jsx(D6e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),pA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(vA(HTMLElement));function e4(t){"@babel/helpers - typeof";return e4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e4(t)}function sl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sl=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&e4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(e4(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function Ste(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function n0(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Ste(s,a,o,l,d,"next",f)}function d(f){Ste(s,a,o,l,d,"throw",f)}l(void 0)})}}function L6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,z6e(a.key),a)}}function R6e(t,e,n){return e&&k6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function z6e(t){var e=P6e(t,"string");return e4(e)=="symbol"?e:e+""}function P6e(t,e){if(e4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(e4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var U6e=function(){function t(){L6e(this,t)}return R6e(t,[{key:"initialize",value:function(){var e=n0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=xa.getState().initialize(o),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=n0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof o=="string"){f.next=5;break}return f.next=3,xa.getState().configure(o);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,xa.getState().configureWithUrl(o);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=n0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,xa.getState().getWorkflows(o);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=n0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=o.workflowId,f.next=3,xa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=n0(sl().mark(function a(o){var s,l,d,f;return sl().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return s=o.metadata,l=o.locale,d=Nme(l),M.next=4,xa.getState().startNewSession(d,s);case 4:if(f=M.sent,!f.error){M.next=7;break}return M.abrupt("return",f);case 7:return M.abrupt("return",new Promise(function(I){var y=function(m){I(m)};xa.getState().playWorkflow(y)}));case 8:case"end":return M.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=n0(sl().mark(function a(){var o;return sl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,xa.getState().deinitialize();case 2:return o=l.sent,l.abrupt("return",o);case 4:case"end":return l.stop()}},a)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.146-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){xa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}xa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){xa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return xa.getState().getCurrentSessionId()}}])}(),Y6e=window.customElements.get("idv-flow");Y6e||window.customElements.define("idv-flow",jte);var $6e=Object.defineProperty,Q6e=Object.defineProperties,F6e=Object.getOwnPropertyDescriptors,Cte=Object.getOwnPropertySymbols,H6e=Object.prototype.hasOwnProperty,V6e=Object.prototype.propertyIsEnumerable,Ate=(t,e,n)=>e in t?$6e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NA=(t,e)=>{for(var n in e||(e={}))H6e.call(e,n)&&Ate(t,n,e[n]);if(Cte)for(var n of Cte(e))V6e.call(e,n)&&Ate(t,n,e[n]);return t},B6e=(t,e)=>Q6e(t,F6e(e)),bo=(t,e,n)=>new Promise((a,o)=>{var s=f=>{try{d(n.next(f))}catch(g){o(g)}},l=f=>{try{d(n.throw(f))}catch(g){o(g)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(t,e)).next())}),Ote=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xte={exports:{}},x2={},wte={exports:{}},rn={},bte;function G6e(){if(bte)return rn;bte=1;/**
84
+ `),a=new Blob([n],{type:"text/plain"}),o=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=o,s.click(),window.URL.revokeObjectURL(o),this.cleanLogs()}}}])}(),pA=new a6e;function JM(t){"@babel/helpers - typeof";return JM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JM(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */bn=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&JM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(JM(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function Mte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function Nu(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Mte(s,a,o,l,d,"next",f)}function d(f){Mte(s,a,o,l,d,"throw",f)}l(void 0)})}}function o6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,pte(a.key),a)}}function s6e(t,e,n){return e&&u6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function t0(t,e,n){return(e=pte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pte(t){var e=l6e(t,"string");return JM(e)=="symbol"?e:e+""}function l6e(t,e){if(JM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(JM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wo=pA.create("wasm_idv"),c6e=function(){function t(e){o6e(this,t),t0(this,"_worker",null),t0(this,"_initialized",!1),t0(this,"_connectedToIdv",!1),t0(this,"_serviceRunning",!1),t0(this,"_userId",Ime(N3e)),t0(this,"_setErrorScreen",null),e&&(this._setErrorScreen=e)}return s6e(t,[{key:"init",value:function(){var e=Nu(bn().mark(function a(){var o,s,l,d;return bn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/456c009-8f5dbf8bd//PlatformAdaptor.worker.js");case 4:return o=g.sent,g.next=7,o.blob();case 7:s=g.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),wo("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/456c009-8f5dbf8bd/",preMain:!0});case 23:return d=g.sent,d.code===0&&wo("Worker was created successfully"),g.abrupt("return",d);case 26:case"end":return g.stop()}},a,this,[[1,12]])}));function n(){return e.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:o.host,httpRetryCount:o.httpRetryCount||0,httpTimeoutMs:o.httpTimeoutMs||0,isSecure:(s=o.isSecure)!==null&&s!==void 0?s:!0,password:o.password,port:o.port?o.port:0,schema:o.schema?o.schema:"basic",userName:o.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:bE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:o},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),wo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var e=Nu(bn().mark(function a(o,s,l){var d,f;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return d={workflowId:o,locale:s},l&&(yme(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),M.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=M.sent,wo("Start session result code: ".concat(f.code)),M.abrupt("return",f);case 7:case"end":return M.stop()}},a,this)}));function n(a,o,s){return e.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var e=Nu(bn().mark(function a(o){var s,l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:o},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,wo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var e=Nu(bn().mark(function a(){var o,s,l=arguments;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:o,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,wo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return o=l.sent,wo("getHealth result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return o=l.sent,wo("getServiceToken result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return o=l.sent,wo("abandonSession result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var e=Nu(bn().mark(function a(o){var s;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:o},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,wo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var e=Nu(bn().mark(function a(o,s){var l;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:o},preMain:!0});case 2:return l=f.sent,wo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,o){return e.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return o=l.sent,wo("getSessionState result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return o=l.sent,wo("waitForSessionUpdate result code: ".concat(o.code)),l.abrupt("return",o);case 5:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return o=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,wo("disconnect result code: ".concat(o.code)),l.abrupt("return",o);case 7:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var e=Nu(bn().mark(function a(o){var s=this;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,g){if(!s._worker)return g();s._worker.onmessage=function(M){var I=M.data.target;if(I==="stdout"){wo(JSON.stringify(M.data.content));return}if(I==="custom"){var y=M.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(s._initialized=!0),f(m)}if(I==="stderr"){var N=M.data.content;wo(JSON.stringify(N)),s._setErrorScreen&&s._setErrorScreen(N)}},s._worker.postMessage(o)}));case 1:case"end":return d.stop()}},a)}));function n(a){return e.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 e=Nu(bn().mark(function a(){var o;return bn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return o=l.sent,this.terminateWorker(),l.abrupt("return",o);case 10:case"end":return l.stop()}},a,this)}));function n(){return e.apply(this,arguments)}return n}()}])}();function XM(t){"@babel/helpers - typeof";return XM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XM(t)}function Ite(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function S2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ite(Object(n),!0).forEach(function(a){IA(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ite(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function IA(t,e,n){return(e=f6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f6e(t){var e=d6e(t,"string");return XM(e)=="symbol"?e:e+""}function d6e(t,e){if(XM(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(XM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Fi=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&XM(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(XM(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function yte(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function ql(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){yte(s,a,o,l,d,"next",f)}function d(f){yte(s,a,o,l,d,"throw",f)}l(void 0)})}}var g6e=pA.create("store_idv"),M6e=function(e,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ql(Fi().mark(function s(){var l;return Fi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new c6e,f.next=3,l.init();case 3:e({wasmService:l});case 4:case"end":return f.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalWaitingUi:function(o){e({isFinalWaitingUi:o})},connectToIdv:function(o){return ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){y.next=3;break}return y.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(o);case 5:if(f=y.sent,g=null,f.code===4&&(g=PM.HTTP_ISSUE),f.code!==0&&f.code!==4&&(g=PM.PROVIDER_ERROR),g===null){y.next=12;break}return M=new bp({errorCode:g}),y.abrupt("return",{error:M});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(o){return ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().wasmService,y.next=3,l.connectByUrl(o);case 3:if(d=y.sent,f=null,d.code===4&&(f=PM.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=PM.PROVIDER_ERROR),f===null){y.next=13;break}return g=new bp({errorCode:f}),M=new bh({errorCode:kE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:M});case 13:return y.abrupt("return",{workflows:d.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(o){var s=function(d){var f,g=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,M=S2(S2({},d.results),{},{sessionId:g}),I=S2({results:M},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),o(I)};e(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=ql(Fi().mark(function s(){var l,d,f,g;return Fi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().externalModulesNames,I.prev=1,I.next=4,p6e(l);case 4:return d=I.sent,e(function(){return{externalModules:d}}),I.abrupt("return",{});case 9:return I.prev=9,I.t0=I.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),g=new wp({errorCode:vp.MODULES_INSTANTIATION_FAILURE}),I.abrupt("return",{error:g});case 16:case"end":return I.stop()}},s,null,[[1,9]])}));function o(){return a.apply(this,arguments)}return o}(),setProcessingTemplate:function(o){var s=FD(o.find(function(l){return l.templateId===RE}));s.templateLayout=iH(s.templateLayout,n().layout),e({processingTransformedTemplate:s})},setIsProcessing:function(o){e({isProcessing:o})},_pushStep:function(){var a=ql(Fi().mark(function s(l,d){var f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return f=null,g=function(){var h=ql(Fi().mark(function m(){var N,E,A,j;return Fi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(N=C.sent,E=null,N.code===4&&(E=Nl.HTTP_ISSUE),N.code!==0&&N.code!==4&&(E=Nl.PROVIDER_ERROR),E!==null&&(A=new Lp({errorCode:Nl.HTTP_ISSUE}),j=new vu({errorCode:hu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=j),N.code!==0){C.next=12;break}return f=null,C.abrupt("return",N);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),M=function(){return null},y.next=5,VD(g,M);case 5:return y.abrupt("return",f?{error:f}:{});case 6:case"end":return y.stop()}},s)}));function o(s,l){return a.apply(this,arguments)}return o}(),_findStepById:function(o){var s=n().workflow;if(!s||!o)return null;var l=s.steps.find(function(d){return d.id===o});return l!=null?l:null},_waitingForNextStep:function(){var a=ql(Fi().mark(function s(){var l,d,f,g,M;return Fi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().currentStepId,d=null,f=function(){var h=ql(Fi().mark(function m(){var N,E,A,j,T,C,_,L,U,Q,F,x,O,b,R;return Fi().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,n().wasmService.getSessionState();case 2:if(j=V.sent,T=(N=j.data)===null||N===void 0?void 0:N.currentStep,C=(E=j.data)===null||E===void 0?void 0:E.isProcessingFiles,_=(A=j.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,L=gme(_,T),U=j.code===4,Q=j.code!==0&&j.code!==4,F=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=T&&T===l,O=null,_&&!L&&(O=Nl.NOT_DATA_TYPE),U&&(O=Nl.HTTP_ISSUE),Q&&(O=Nl.PROVIDER_ERROR),C&&(O=Nl.IS_PROCESSING),x&&(O=Nl.SAME_STEP),F&&(O=Nl.DECODING_FAILED),O!==null&&(b=new Lp({errorCode:O}),R=new vu({errorCode:hu.INTERNAL_ISSUE,underlyingBaseError:b}),d=R),g6e(JSON.stringify({nextStep:T,isDataType:L,isProcessingFiles:C})),!(L&&!x&&!C&&!U&&!Q&&!F)){V.next=23;break}return d=null,V.abrupt("return",j.data);case 23:return V.abrupt("return",null);case 24:case"end":return V.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),g=function(){return null},y.next=6,VD(f,g);case 6:if(M=y.sent,!d){y.next=9;break}return y.abrupt("return",{error:d});case 9:return y.abrupt("return",{workflow:M==null?void 0:M.workflow,nextStep:M==null?void 0:M.currentStep});case 10:case"end":return y.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),setFinalStepAndStopProcess:function(o){var s=o||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:yp.MESSAGE,message:hp.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=ql(Fi().mark(function s(l){var d,f,g,M,I,y,h,m,N;return Fi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(d=n().currentStepId,d){A.next=3;break}return A.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){A.next=7;break}return n().setFinalStepAndStopProcess(),A.abrupt("return");case 7:if(!(l instanceof ri)){A.next=13;break}return f=l,g=new vu({errorCode:hu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:f}),n().workflowSessionCompletion({error:g}),n().resetSession(),A.abrupt("return");case 13:return A.next=15,n()._pushStep(d,l);case 15:if(M=A.sent,!M.error){A.next=20;break}return n().workflowSessionCompletion({error:M.error}),n().resetSession(),A.abrupt("return");case 20:return A.next=22,n()._waitingForNextStep();case 22:if(I=A.sent,!I.error){A.next=27;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),A.abrupt("return");case 27:if(y=I.workflow,h=I.nextStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),m=n()._findStepById(h),N=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(m!=null&&m.final&&!N(m.client))){A.next=37;break}return n().setFinalStepAndStopProcess(m.id),A.abrupt("return");case 37:m!=null&&m.final&&N(m.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(h),n().setIsProcessing(!1);case 40:case"end":return A.stop()}},s)}));function o(s){return a.apply(this,arguments)}return o}(),onChangeScreen:function(o){if(!o)return e(function(){return{currentScreenConfig:null}});var s=n().workflow,l=null;if(o===RE&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(l={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var f,g,M=n()._findStepById(o);if(typeof(M==null||(f=M.client)===null||f===void 0?void 0:f.templateId)=="string"){var I;l=S2(S2({},M==null?void 0:M.client),{},{templateId:M.client.templateId,dataSource:(I=M.dataSource)!==null&&I!==void 0?I:null})}if(l){var y;l.sessionId=(y=n().currentSessionData)===null||y===void 0?void 0:y.sessionId,l.serviceToken=n().serviceToken}if(l&&hme(M==null||(g=M.client)===null||g===void 0?void 0:g.templateLayout)){var h=iH(M.client.templateLayout,n().layout);h&&(l.templateLayout=h)}}var m=dme(n().externalModules,s.steps,o);if(l===null||!m){var N=new vu({errorCode:hu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:N}),e(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(o),e(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var a=ql(Fi().mark(function s(){var l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=g.sent,n().resetWasmService(),n().externalModules.forEach(function(M){M.component.deinitialize&&M.component.isReady&&M.component.deinitialize()}),(d==null?void 0:d.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},s)}));function o(){return a.apply(this,arguments)}return o}(),resetSession:function(){return e(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 e(function(){return{wasmService:null}})}}};function p6e(t){return yA.apply(this,arguments)}function yA(){return yA=ql(Fi().mark(function t(e){var n,a,o,s,l,d;return Fi().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:n=[{id:i1.getIdentifier(),supportedTemplates:i1.getSupportedTemplates(),component:i1}],a=IA(IA({},LE.LIVENESS,function(){return Promise.resolve().then(()=>Zot)}),LE.DOC_READER,function(){return Promise.resolve().then(()=>vPt)}),o=Fi().mark(function M(){var I,y,h;return Fi().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(I=l[s],y=function(){return a[I]()},!y){N.next=7;break}return N.next=5,y();case 5:h=N.sent,n.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return N.stop()}},M)}),s=0,l=e;case 4:if(!(s<l.length)){g.next=9;break}return g.delegateYield(o(),"t0",6);case 6:s++,g.next=4;break;case 9:return d=n.filter(function(M){return M!==null}),g.abrupt("return",d);case 11:case"end":return g.stop()}},t)})),yA.apply(this,arguments)}function C2(t){"@babel/helpers - typeof";return C2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C2(t)}function hte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function hA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hte(Object(n),!0).forEach(function(a){I6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function I6e(t,e,n){return(e=y6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y6e(t){var e=h6e(t,"string");return C2(e)=="symbol"?e:e+""}function h6e(t,e){if(C2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(C2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xa=dve(function(){return hA(hA(hA({},jme.apply(void 0,arguments)),$me.apply(void 0,arguments)),M6e.apply(void 0,arguments))}),vte=function(e){var n=e.children;return vi.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 A2(t){"@babel/helpers - typeof";return A2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A2(t)}function mte(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function Nte(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mte(Object(n),!0).forEach(function(a){v6e(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mte(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function v6e(t,e,n){return(e=m6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m6e(t){var e=N6e(t,"string");return A2(e)=="symbol"?e:e+""}function N6e(t,e){if(A2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(A2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var E6e=function(){var e=xa(function(h){return h.currentScreenConfig}),n=xa(function(h){return h.pushStepWaitNextStepAndSet}),a=xa(function(h){return h.processingTransformedTemplate}),o=xa(function(h){return h.isProcessing}),s=xa(function(h){return h.setIsProcessing}),l=xa(function(h){return h.listener}),d=xa(function(h){return h.externalModules}),f=xa(function(h){return h.modulesConfig}),g=function(m,N){l({eventType:yp.MESSAGE,message:N,module:m})},M=function(m){s(m)},I=function(m){s(!1),n(m)},y=ht.useCallback(function(){if(!e)return null;var h=d.find(function(m){return m.supportedTemplates.includes(e.templateId)});if(h&&e)return vi.jsx(h.component,{perform:I,moduleProps:e,modulesConfig:f,idvEventListener:g,isProcessing:M})},[e,d]);return!e&&!a?vi.jsx(KE,{direction:Sh.Ltr,children:vi.jsx(vte,{children:"Waiting for play... or process completed"})}):vi.jsx(vi.Fragment,{children:vi.jsx(KE,{direction:Sh.Ltr,children:vi.jsxs(vi.Fragment,{children:[o&&vi.jsx(vte,{children:a?vi.jsx(i1,{perform:I,moduleProps:Nte(Nte({},a),{},{templateId:"PROGRESS"}),idvEventListener:g,isProcessing:M}):"Processing..."}),y()]})})})};function D6e(){return vi.jsx(ht.StrictMode,{children:vi.jsx(H3e,{children:vi.jsx(E6e,{})})})}function r0(t){"@babel/helpers - typeof";return r0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r0(t)}function T6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ete(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Tte(a.key),a)}}function j6e(t,e,n){return e&&Ete(t.prototype,e),n&&Ete(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function S6e(t,e,n){return e=_2(e),C6e(t,mA()?Reflect.construct(e,[],_2(t).constructor):e.apply(t,n))}function C6e(t,e){if(e&&(r0(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A6e(t)}function A6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O2(t,e)}function vA(t){var e=typeof Map=="function"?new Map:void 0;return vA=function(a){if(a===null||!x6e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(a))return e.get(a);e.set(a,o)}function o(){return _6e(a,arguments,_2(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),O2(o,a)},vA(t)}function _6e(t,e,n){if(mA())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,e);var o=new(t.bind.apply(t,a));return n&&O2(o,n.prototype),o}function mA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mA=function(){return!!t})()}function x6e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(e){return typeof t=="function"}}function O2(t,e){return O2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},O2(t,e)}function _2(t){return _2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_2(t)}function Dte(t,e,n){return(e=Tte(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tte(t){var e=w6e(t,"string");return r0(e)=="symbol"?e:e+""}function w6e(t,e){if(r0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(r0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var b6e="*,::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%}",jte=function(t){function e(){var n;return T6e(this,e),n=S6e(this,e),Dte(n,"_root",p3e.createRoot(n.attachShadow({mode:"open"}))),Dte(n,"_mounted",!1),n}return O6e(e,t),j6e(e,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.148-nightly".trim())}},{key:"render",value:function(){this._root.render(vi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[vi.jsx("style",{nonce:xa.getState().getNonce(),children:b6e}),vi.jsx(D6e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),pA.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(vA(HTMLElement));function e4(t){"@babel/helpers - typeof";return e4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e4(t)}function sl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */sl=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function f(x,O,b,R){return Object.defineProperty(x,O,{value:b,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(x){f=function(b,R,Y){return b[R]=Y}}function g(x,O,b,R){var Y=O&&O.prototype instanceof y?O:y,V=Object.create(Y.prototype);return f(V,"_invoke",function(q,te,z){var G=1;return function(K,k){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw k;return{value:t,done:!0}}for(z.method=K,z.arg=k;;){var W=z.delegate;if(W){var pe=_(W,z);if(pe){if(pe===I)continue;return pe}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(G===1)throw G=4,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);G=3;var Me=M(q,te,z);if(Me.type==="normal"){if(G=z.done?4:2,Me.arg===I)continue;return{value:Me.arg,done:z.done}}Me.type==="throw"&&(G=4,z.method="throw",z.arg=Me.arg)}}}(x,b,new Q(R||[])),!0),V}function M(x,O,b){try{return{type:"normal",arg:x.call(O,b)}}catch(R){return{type:"throw",arg:R}}}e.wrap=g;var I={};function y(){}function h(){}function m(){}var N={};f(N,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(F([])));A&&A!==n&&a.call(A,s)&&(N=A);var j=m.prototype=y.prototype=Object.create(N);function T(x){["next","throw","return"].forEach(function(O){f(x,O,function(b){return this._invoke(O,b)})})}function C(x,O){function b(Y,V,q,te){var z=M(x[Y],x,V);if(z.type!=="throw"){var G=z.arg,K=G.value;return K&&e4(K)=="object"&&a.call(K,"__await")?O.resolve(K.__await).then(function(k){b("next",k,q,te)},function(k){b("throw",k,q,te)}):O.resolve(K).then(function(k){G.value=k,q(G)},function(k){return b("throw",k,q,te)})}te(z.arg)}var R;f(this,"_invoke",function(Y,V){function q(){return new O(function(te,z){b(Y,V,te,z)})}return R=R?R.then(q,q):q()},!0)}function _(x,O){var b=O.method,R=x.i[b];if(R===t)return O.delegate=null,b==="throw"&&x.i.return&&(O.method="return",O.arg=t,_(x,O),O.method==="throw")||b!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+b+"' method")),I;var Y=M(R,x.i,O.arg);if(Y.type==="throw")return O.method="throw",O.arg=Y.arg,O.delegate=null,I;var V=Y.arg;return V?V.done?(O[x.r]=V.value,O.next=x.n,O.method!=="return"&&(O.method="next",O.arg=t),O.delegate=null,I):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function L(x){this.tryEntries.push(x)}function U(x){var O=x[4]||{};O.type="normal",O.arg=t,x[4]=O}function Q(x){this.tryEntries=[[-1]],x.forEach(L,this),this.reset(!0)}function F(x){if(x!=null){var O=x[s];if(O)return O.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var b=-1,R=function Y(){for(;++b<x.length;)if(a.call(x,b))return Y.value=x[b],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return R.next=R}}throw new TypeError(e4(x)+" is not iterable")}return h.prototype=m,f(j,"constructor",m),f(m,"constructor",h),h.displayName=f(m,d,"GeneratorFunction"),e.isGeneratorFunction=function(x){var O=typeof x=="function"&&x.constructor;return!!O&&(O===h||(O.displayName||O.name)==="GeneratorFunction")},e.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,m):(x.__proto__=m,f(x,d,"GeneratorFunction")),x.prototype=Object.create(j),x},e.awrap=function(x){return{__await:x}},T(C.prototype),f(C.prototype,l,function(){return this}),e.AsyncIterator=C,e.async=function(x,O,b,R,Y){Y===void 0&&(Y=Promise);var V=new C(g(x,O,b,R),Y);return e.isGeneratorFunction(O)?V:V.next().then(function(q){return q.done?q.value:V.next()})},T(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(x){var O=Object(x),b=[];for(var R in O)b.unshift(R);return function Y(){for(;b.length;)if((R=b.pop())in O)return Y.value=R,Y.done=!1,Y;return Y.done=!0,Y}},e.values=F,Q.prototype={constructor:Q,reset:function(O){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(U),!O)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=t)},stop:function(){this.done=!0;var O=this.tryEntries[0][4];if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var b=this;function R(K){q.type="throw",q.arg=O,b.next=K}for(var Y=b.tryEntries.length-1;Y>=0;--Y){var V=this.tryEntries[Y],q=V[4],te=this.prev,z=V[1],G=V[2];if(V[0]===-1)return R("end"),!1;if(!z&&!G)throw Error("try statement without catch or finally");if(V[0]!=null&&V[0]<=te){if(te<z)return this.method="next",this.arg=t,R(z),!0;if(te<G)return R(G),!1}}},abrupt:function(O,b){for(var R=this.tryEntries.length-1;R>=0;--R){var Y=this.tryEntries[R];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var V=Y;break}}V&&(O==="break"||O==="continue")&&V[0]<=b&&b<=V[2]&&(V=null);var q=V?V[4]:{};return q.type=O,q.arg=b,V?(this.method="next",this.next=V[2],I):this.complete(q)},complete:function(O,b){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&b&&(this.next=b),I},finish:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[2]===O)return this.complete(R[4],R[3]),U(R),I}},catch:function(O){for(var b=this.tryEntries.length-1;b>=0;--b){var R=this.tryEntries[b];if(R[0]===O){var Y=R[4];if(Y.type==="throw"){var V=Y.arg;U(R)}return V}}throw Error("illegal catch attempt")},delegateYield:function(O,b,R){return this.delegate={i:F(O),r:b,n:R},this.method==="next"&&(this.arg=t),I}},e}function Ste(t,e,n,a,o,s,l){try{var d=t[s](l),f=d.value}catch(g){return void n(g)}d.done?e(f):Promise.resolve(f).then(a,o)}function n0(t){return function(){var e=this,n=arguments;return new Promise(function(a,o){var s=t.apply(e,n);function l(f){Ste(s,a,o,l,d,"next",f)}function d(f){Ste(s,a,o,l,d,"throw",f)}l(void 0)})}}function L6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k6e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,z6e(a.key),a)}}function R6e(t,e,n){return e&&k6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function z6e(t){var e=P6e(t,"string");return e4(e)=="symbol"?e:e+""}function P6e(t,e){if(e4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(e4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var U6e=function(){function t(){L6e(this,t)}return R6e(t,[{key:"initialize",value:function(){var e=n0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=xa.getState().initialize(o),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"configure",value:function(){var e=n0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof o=="string"){f.next=5;break}return f.next=3,xa.getState().configure(o);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,xa.getState().configureWithUrl(o);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var e=n0(sl().mark(function a(o){var s;return sl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,xa.getState().getWorkflows(o);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var e=n0(sl().mark(function a(o){var s,l;return sl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=o.workflowId,f.next=3,xa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var e=n0(sl().mark(function a(o){var s,l,d,f;return sl().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return s=o==null?void 0:o.locale,l=o==null?void 0:o.metadata,d=Nme(s),M.next=5,xa.getState().startNewSession(d,l);case 5:if(f=M.sent,!f.error){M.next=8;break}return M.abrupt("return",f);case 8:return M.abrupt("return",new Promise(function(I){var y=function(m){I(m)};xa.getState().playWorkflow(y)}));case 9:case"end":return M.stop()}},a)}));function n(a){return e.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var e=n0(sl().mark(function a(){var o;return sl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,xa.getState().deinitialize();case 2:return o=l.sent,l.abrupt("return",o);case 4:case"end":return l.stop()}},a)}));function n(){return e.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.148-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){xa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}xa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){xa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return xa.getState().getCurrentSessionId()}}])}(),Y6e=window.customElements.get("idv-flow");Y6e||window.customElements.define("idv-flow",jte);var $6e=Object.defineProperty,Q6e=Object.defineProperties,F6e=Object.getOwnPropertyDescriptors,Cte=Object.getOwnPropertySymbols,H6e=Object.prototype.hasOwnProperty,V6e=Object.prototype.propertyIsEnumerable,Ate=(t,e,n)=>e in t?$6e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NA=(t,e)=>{for(var n in e||(e={}))H6e.call(e,n)&&Ate(t,n,e[n]);if(Cte)for(var n of Cte(e))V6e.call(e,n)&&Ate(t,n,e[n]);return t},B6e=(t,e)=>Q6e(t,F6e(e)),bo=(t,e,n)=>new Promise((a,o)=>{var s=f=>{try{d(n.next(f))}catch(g){o(g)}},l=f=>{try{d(n.throw(f))}catch(g){o(g)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(t,e)).next())}),Ote=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xte={exports:{}},x2={},wte={exports:{}},rn={},bte;function G6e(){if(bte)return rn;bte=1;/**
85
85
  * @license React
86
86
  * react.production.min.js
87
87
  *
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-BXTc_4d-.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-roTpX8DE.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.3.146-nightly",
3
+ "version": "2.3.148-nightly",
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",