@regulaforensics/idv-capture-web 2.3.126-nightly → 2.3.127-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { B as Vu, r as la, j as lD } from "./index-B6kx6RhW.js";
1
+ import { B as Vu, r as la, j as lD } from "./index-DGIh-wu6.js";
2
2
  var k0 = Object.defineProperty, h0 = Object.defineProperties, v0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, b0 = Object.prototype.hasOwnProperty, U0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? k0(M, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : M[r] = i, sl = (M, r) => {
3
3
  for (var i in r || (r = {}))
4
4
  b0.call(r, i) && sD(M, i, r[i]);
@@ -22,7 +22,7 @@ var N1 = (e) => {
22
22
  throw l;
23
23
  }, "return" in r && i("return"), o;
24
24
  };
25
- import { B as cc, r as Bs, j as gE } from "./index-B6kx6RhW.js";
25
+ import { B as cc, r as Bs, j as gE } from "./index-DGIh-wu6.js";
26
26
  var QT = Object.defineProperty, JT = Object.defineProperties, XT = Object.getOwnPropertyDescriptors, RE = Object.getOwnPropertySymbols, $T = Object.prototype.hasOwnProperty, eb = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), tb = (e) => {
27
27
  throw TypeError(e);
28
28
  }, IE = (e, r, t) => r in e ? QT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, xe = (e, r) => {
@@ -18152,7 +18152,7 @@ var St = h5.create("wasm_idv"), hA = /* @__PURE__ */ function() {
18152
18152
  return lr().wrap(function(d) {
18153
18153
  for (; ; ) switch (d.prev = d.next) {
18154
18154
  case 0:
18155
- return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/08ebdfa-dfaa30264//PlatformAdaptor.worker.js");
18155
+ return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/59f584f-6386586d1//PlatformAdaptor.worker.js");
18156
18156
  case 4:
18157
18157
  return u = d.sent, d.next = 7, u.blob();
18158
18158
  case 7:
@@ -18179,7 +18179,7 @@ var St = h5.create("wasm_idv"), hA = /* @__PURE__ */ function() {
18179
18179
  }), d.next = 23, this.sendMessage({
18180
18180
  target: "worker-init",
18181
18181
  URL: document.URL,
18182
- currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/08ebdfa-dfaa30264/",
18182
+ currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/2.3/59f584f-6386586d1/",
18183
18183
  preMain: !0
18184
18184
  });
18185
18185
  case 23:
@@ -19526,9 +19526,9 @@ function v2() {
19526
19526
  supportedTemplates: $n.getSupportedTemplates(),
19527
19527
  component: $n
19528
19528
  }], o = f2(f2({}, Fh.LIVENESS, function() {
19529
- return import("./index-CXL6wUv8.js");
19529
+ return import("./index-BOSKCIZc.js");
19530
19530
  }), Fh.DOC_READER, function() {
19531
- return import("./index-CdNoMprF.js");
19531
+ return import("./index-CldjntRT.js");
19532
19532
  }), u = /* @__PURE__ */ br().mark(function h() {
19533
19533
  var g, w, S;
19534
19534
  return br().wrap(function(O) {
package/dist/main.iife.js CHANGED
@@ -59,7 +59,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
59
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FIe(t,r){if(t){if(typeof t=="string")return F$(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?F$(t,r):void 0}}function F$(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function VIe(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function $Ie(t){if(Array.isArray(t))return t}var Rg=function(t){var r=t.imageId,i=t.imageURL,a=t.base64,u=t.contentMode,l=u===void 0?S0.ASPECT_FILL:u,c=t.cornerRadius,f=t.backgroundColor,M=f===void 0?"transparent":f,d=function(L){if(L===S0.ASPECT_FILL)return"cover";if(L===S0.ASPECT_FIT)return"contain";if(L===S0.FILL)return"fill"},I=Jn.useState(!0),N=QIe(I,2),y=N[0],h=N[1],m=y&&i,E=function(){h(!1)};if(r){var T=r in yT?r:"default";return le.jsx(YIe,{type:T})}if(a||i)return le.jsxs(le.Fragment,{children:[m&&le.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:"#e0e0e0",borderRadius:c}}),le.jsx("img",{style:{width:"100%",height:"100%",objectFit:d(l),borderRadius:c,backgroundColor:M,display:m?"none":"block"},src:a||i,onLoad:E})]})},BIe=function(t){var r=t.signature;return le.jsx("footer",{style:{display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:le.jsx("a",{href:"",children:le.jsx(Rg,{imageId:r==null?void 0:r.imageId})})})},V$={},$$;function GIe(){if($$)return V$;$$=1;var t=Tn(),r=Pn(),i=ef(),a=rD(),u=r(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});return t({target:"Date",proto:!0,arity:1,forced:u},{toJSON:function(l){var c=i(this),f=a(c,"number");return typeof f=="number"&&!isFinite(f)?null:c.toISOString()}}),V$}GIe(),rF();var B$=Jn.createContext(void 0),ZIe=function(t){var r=t.perform,i=t.children;return le.jsx(B$.Provider,{value:{perform:r},children:i})},G$=function(){var t=Jn.useContext(B$);if(!t)throw new Error("usePerform must be used within a PerformProvider");return t},Z$={},NT,W$;function WIe(){if(W$)return NT;W$=1;var t=Li(),r=Pn(),i=Xn(),a=oy(),u=ey(),l=ul(),c=TE().f,f=i(c),M=i([].push),d=t&&r(function(){var N=Object.create(null);return N[2]=2,!f(N,2)}),I=function(N){return function(y){for(var h=l(y),m=u(h),E=d&&a(h)===null,T=m.length,L=0,A=[],j;T>L;)j=m[L++],(!t||(E?j in h:f(h,j)))&&M(A,N?[j,h[j]]:h[j]);return A}};return NT={entries:I(!0),values:I(!1)},NT}var K$;function KIe(){if(K$)return Z$;K$=1;var t=Tn(),r=WIe().entries;return t({target:"Object",stat:!0},{entries:function(i){return r(i)}}),Z$}KIe();function ly(t){"@babel/helpers - typeof";return ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ly(t)}function q$(t){return t.split("\\n")}function J$(t){return t===A0.CENTER?"center":t===A0.RIGHT?"right":"left"}function hT(t){if(ly(t)==="object"&&t!==null)for(var r in t)ly(t[r])==="object"?hT(t[r]):t[r]==="true"?t[r]=!0:t[r]==="false"&&(t[r]=!1);return t}var qIe={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},JIe=function(t){var r=t.dataTestId,i=t.responseBody,a=G$(),u=a.perform,l=function(){var c=JSON.parse(JSON.stringify(i));hT(c),u(c)};return le.jsx("button",{"data-test":r,onClick:l,style:qIe,children:le.jsx(Rg,{imageId:"cross"})},r)},XIe=function(t){var r=t.closeButton;return le.jsx("header",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"16px"},children:le.jsx("div",{children:r&&le.jsx(JIe,Bo({dataTestId:"close-btn"},r))})})},X$={},eB;function epe(){if(eB)return X$;eB=1;var t=Tn(),r=PH(),i=aH().indexOf,a=BV(),u=r([].indexOf),l=!!u&&1/u([1],1,-0)<0,c=l||!a("indexOf");return t({target:"Array",proto:!0,forced:c},{indexOf:function(f){var M=arguments.length>1?arguments[1]:void 0;return l?u(this,f,M)||0:i(this,f,M)}}),X$}epe();var tB={},rB;function tpe(){if(rB)return tB;rB=1;var t=Tn(),r=iy().map,i=Zv(),a=i("map");return t({target:"Array",proto:!0,forced:!a},{map:function(u){return r(this,u,arguments.length>1?arguments[1]:void 0)}}),tB}tpe();var rpe={},nB={},mT,iB;function npe(){if(iB)return mT;iB=1;var t=io(),r=Pd(),i=Ka(),a=cT(),u=T$(),l=Ov(),c=u(function(){var f=this.iterator,M=i(t(this.next,f)),d=this.done=!!M.done;if(!d)return l(f,this.mapper,[M.value,this.counter++],!0)});return mT=function(f){return i(this),r(f),new c(a(this),{mapper:f})},mT}var aB;function ipe(){if(aB)return nB;aB=1;var t=Tn(),r=npe(),i=s1();return t({target:"Iterator",proto:!0,real:!0,forced:i},{map:r}),nB}var oB;function ape(){return oB||(oB=1,ipe()),rpe}ape();var O0=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontSize,l=u===void 0?"17px":u,c=t.fontColor,f=c===void 0?"black":c,M=t.alignment,d=M===void 0?A0.LEFT:M,I=t.backgroundColor,N=I===void 0?"transparent":I,y=t.cornerRadius,h=y===void 0?0:y;return le.jsx("div",{className:"title",style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:l,color:f,textAlign:J$(d),backgroundColor:N,borderRadius:h},children:r&&q$(r)})};function _0(t){"@babel/helpers - typeof";return _0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_0(t)}function ET(t,r,i){return(r=ope(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function ope(t){var r=upe(t,"string");return _0(r)=="symbol"?r:r+""}function upe(t,r){if(_0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(_0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var spe=function(t){var r=t.title,i=t.image,a=t.responseBody,u=t.backgroundColor,l=t.cornerRadius,c=t.highlightColor,f=t.dataTestId,M=t.children,d=G$(),I=d.perform,N=function(){var h=JSON.parse(JSON.stringify(a));hT(h),I(h)},y=ET(ET(ET({height:"50px",width:"100%",padding:"10px 16px",textAlign:"center",fontSize:"16px",fontWeight:"400",border:"none",cursor:"pointer",borderRadius:l||0},"--hover-btn-background",c||"red"),"backgroundColor",u||"transparent"),"transition",".3s");return le.jsxs("button",{"data-test":f,onClick:N,style:y,children:[i&&le.jsx(Rg,{imageURL:i.imageURL}),M||le.jsx(O0,Bo({},r))]},f)};function L0(t){"@babel/helpers - typeof";return L0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},L0(t)}var lpe=["items"];function uB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function sB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?uB(Object(i),!0).forEach(function(a){cpe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):uB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function cpe(t,r,i){return(r=fpe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function fpe(t){var r=Mpe(t,"string");return L0(r)=="symbol"?r:r+""}function Mpe(t,r){if(L0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(L0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function dpe(t,r){if(t==null)return{};var i,a,u=gpe(t,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)i=l[a],r.indexOf(i)===-1&&{}.propertyIsEnumerable.call(t,i)&&(u[i]=t[i])}return u}function gpe(t,r){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(r.indexOf(a)!==-1)continue;i[a]=t[a]}return i}var Ipe=function(t){var r=t.items,i=dpe(t,lpe),a={display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",alignSelf:"flex-end",justifyContent:"center",gap:"8px",width:"100%",height:"auto",alignContent:"flex-end",paddingTop:"20px"};return le.jsx("div",{className:"buttons",style:sB(sB({},a),i),children:r.map(function(u){var l,c;return le.jsx(spe,Bo({dataTestId:"button-"+((l=u.title)===null||l===void 0?void 0:l.text)},u),(c=u.title)===null||c===void 0?void 0:c.text)})})};function x0(t){"@babel/helpers - typeof";return x0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},x0(t)}function lB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function ppe(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?lB(Object(i),!0).forEach(function(a){ype(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function ype(t,r,i){return(r=Npe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Npe(t){var r=hpe(t,"string");return x0(r)=="symbol"?r:r+""}function hpe(t,r){if(x0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(x0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var cy=function(t){var r=t.children,i=t.header,a=t.footer,u=t.backgroundColor,l=u===void 0?"white":u,c=t.buttons,f=i?60:10,M=a?30:10,d={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",margin:"0 auto",paddingTop:i?f+10+"px":"10px",paddingBottom:a?M+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:l};return le.jsxs("div",{id:"base-container",style:ppe({},d),children:[i&&le.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:f},children:le.jsx(XIe,{closeButton:i.closeButton})}),le.jsx("div",{style:{height:"100%",flex:"1 1 100%",overflow:"hidden"},children:r}),(c==null?void 0:c.length)&&le.jsx(Ipe,{items:c}),a&&le.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:M},children:le.jsx(BIe,Bo({},a))})]})},DT=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontColor,l=u===void 0?"#000000":u,c=t.alignment,f=c===void 0?A0.LEFT:c,M=t.fontSize,d=M===void 0?17:M,I=t.backgroundColor,N=I===void 0?"transparent":I,y=t.cornerRadius,h=y===void 0?0:y;return le.jsx("div",{style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:d,textAlign:J$(f),color:l,borderRadius:h,backgroundColor:N,whiteSpace:"pre-line"},children:r&&q$(r).map(function(m,E){return m.length===0?le.jsx("br",{},"description-text_"+E):le.jsx("p",{children:m},"description-text_"+E)})})};function w0(t){"@babel/helpers - typeof";return w0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w0(t)}function cB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function fB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?cB(Object(i),!0).forEach(function(a){mpe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):cB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function mpe(t,r,i){return(r=Epe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Epe(t){var r=Dpe(t,"string");return w0(r)=="symbol"?r:r+""}function Dpe(t,r){if(w0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(w0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var vpe=function(t){var r=t.title,i=t.description,a=t.image,u=t.backgroundColor,l=u===void 0?"transparent":u,c=t.cornerRadius,f=c===void 0?0:c,M=t.isLastChild,d={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:M?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return le.jsxs("div",{className:"details-item",style:fB(fB({},d),{},{backgroundColor:l,borderRadius:f}),children:[le.jsxs("div",{style:{flex:"0 1 auto"},children:[le.jsx("div",{style:{marginBottom:5,fontWeight:"bold",lineHeight:"21px"},children:le.jsx(O0,Bo({},r))}),le.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:le.jsx(DT,Bo({},i))})]}),le.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:le.jsx(Rg,Bo({},a))})]})};function b0(t){"@babel/helpers - typeof";return b0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},b0(t)}function MB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function dB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?MB(Object(i),!0).forEach(function(a){Tpe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):MB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Tpe(t,r,i){return(r=jpe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function jpe(t){var r=Ape(t,"string");return b0(r)=="symbol"?r:r+""}function Ape(t,r){if(b0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(b0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Spe={display:"flex",flexDirection:"column",padding:"0 16px"},Cpe=function(t){var r=t.items,i=t.backgroundColor,a=i===void 0?"white":i,u=t.cornerRadius,l=u===void 0?16:u;return le.jsx("div",{className:"details",style:dB(dB({},Spe),{},{backgroundColor:a,borderRadius:l}),children:r.map(function(c,f){return le.jsx(vpe,Bo({isLastChild:f===r.length-1},c),f)})})},Ope=function(t){var r=t.title,i=t.indicatorColor,a=i===void 0?"black":i;return le.jsxs(le.Fragment,{children:[le.jsx(H$,{indicatorColor:a}),le.jsx("div",{children:r==null?void 0:r.text})]})};function _pe(t,r){return bpe(t)||wpe(t,r)||xpe(t,r)||Lpe()}function Lpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
60
60
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xpe(t,r){if(t){if(typeof t=="string")return gB(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?gB(t,r):void 0}}function gB(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function wpe(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function bpe(t){if(Array.isArray(t))return t}var kpe=function(t){var r=t.title,i=t.header,a=t.footer,u=t.details,l=t.buttons,c=t.backgroundColor,f=Jn.useRef(null),M=Jn.useState(!1),d=_pe(M,2),I=d[0],N=d[1];return Jn.useEffect(function(){f.current&&N(f.current.scrollHeight>f.current.clientHeight)},[]),le.jsx(cy,{header:i,buttons:l,footer:a,backgroundColor:c,children:le.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:I?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:f,children:[le.jsx("div",{style:{marginBottom:r?"16px":"0",fontWeight:400,fontSize:"28px"},children:r&&le.jsx(O0,Bo({},r))}),u&&le.jsx(Cpe,Bo({},u))]})})},zpe={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},Rpe={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function k0(t){"@babel/helpers - typeof";return k0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},k0(t)}function IB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function pB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?IB(Object(i),!0).forEach(function(a){Ppe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):IB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Ppe(t,r,i){return(r=Upe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Upe(t){var r=Ype(t,"string");return k0(r)=="symbol"?r:r+""}function Ype(t,r){if(k0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(k0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Qpe=function(t){var r=t.title,i=t.header,a=t.footer,u=t.image,l=t.description,c=t.buttons,f=t.backgroundColor;return le.jsx(cy,{header:i,footer:a,buttons:c,backgroundColor:f,children:le.jsx(le.Fragment,{children:le.jsxs("div",{style:pB(pB({},Rpe),{},{justifyContent:u?"flex-start":"center"}),children:[u&&le.jsx("div",{style:zpe,children:le.jsx(Rg,Bo({},u))}),r&&le.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:le.jsx(O0,Bo({},r))}),l&&le.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:le.jsx(DT,Bo({},l))})]})})})},yB=function(t){var r=t.progressView,i=t.footer,a=t.backgroundColor;return le.jsx(cy,{footer:i,backgroundColor:a,children:le.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:le.jsx(Ope,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},Hpe={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},Fpe={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},Vpe={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},$pe={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},Bpe=function(t){var r=t.header,i=t.footer,a=t.image,u=t.title,l=t.description,c=t.buttons,f=t.backgroundColor;return le.jsx(cy,{header:r,buttons:c,footer:i,backgroundColor:f,children:le.jsxs("div",{style:Hpe,children:[a&&le.jsx("div",{style:Fpe,children:le.jsx(Rg,Bo({},a))}),(u==null?void 0:u.text)&&le.jsx("div",{style:Vpe,children:u&&le.jsx(O0,Bo({},u))}),(l==null?void 0:l.text)&&le.jsx("div",{style:$pe,children:le.jsx(DT,Bo({},l))})]})})},vT=!1,Gpe=function(t){var r=t.template,i=t.templateLayout;if(r==="STATUS")return le.jsx(Bpe,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,buttons:i==null?void 0:i.buttons,description:i==null?void 0:i.description,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO")return le.jsx(Qpe,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,description:i==null?void 0:i.description,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="PROGRESS")return le.jsx(yB,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,progressView:i==null?void 0:i.progressView,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO_DETAILS")return le.jsx(kpe,{header:i==null?void 0:i.header,title:i==null?void 0:i.title,details:i==null?void 0:i.details,buttons:i==null?void 0:i.buttons,footer:i==null?void 0:i.footer,backgroundColor:i==null?void 0:i.backgroundColor})},NB="GUI",l1=function(t){var r=t.moduleProps,i=t.perform,a=r.templateId,u=r.templateLayout,l=Jn.useCallback(function(c){i&&i(c)},[a]);return a&&u?le.jsx(ZIe,{perform:l,children:le.jsx(Gpe,{template:a,templateLayout:u})}):le.jsx(yB,{})};l1.getIdentifier=function(){return NB},l1.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},l1.deinitialize=function(){vT=!1},l1.initialize=function(){vT=!0},l1.isReady=function(){return vT},l1.displayName=NB;var hB={},mB;function Zpe(){if(mB)return hB;mB=1;var t=Ft(),r=kr(),i=Date,a=r(i.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new i)}}),hB}Zpe();var EB={},DB={},TT,vB;function TB(){if(vB)return TT;vB=1;var t=Rr(),r=Kn(),i=vn(),a=qo(),u=r("iterator");return TT=!t(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),M="";return l.pathname="c%20d",c.forEach(function(d,I){c.delete("b"),M+=I+d}),f.delete("a",2),f.delete("b",void 0),a&&(!l.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!i)||!c.sort||l.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[u]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||M!=="a1c3"||new URL("https://x",void 0).host!=="x"}),TT}var jT,jB;function Wpe(){if(jB)return jT;jB=1;var t=vn(),r=kr(),i=Di(),a=Rr(),u=Lp(),l=Op(),c=aN(),f=js(),M=P4(),d=Object.assign,I=Object.defineProperty,N=r([].concat);return jT=!d||a(function(){if(t&&d({b:1},d(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},h={},m=Symbol("assign detection"),E="abcdefghijklmnopqrst";return y[m]=7,E.split("").forEach(function(T){h[T]=T}),d({},y)[m]!==7||u(d({},h)).join("")!==E})?function(h,m){for(var E=f(h),T=arguments.length,L=1,A=l.f,j=c.f;T>L;)for(var C=M(arguments[L++]),b=A?N(u(C),A(C)):u(C),k=b.length,V=0,B;k>V;)B=b[V++],(!t||i(j,C,B))&&(E[B]=C[B]);return E}:d,jT}var AT,AB;function Kpe(){if(AB)return AT;AB=1;var t=kr(),r=2147483647,i=36,a=1,u=26,l=38,c=700,f=72,M=128,d="-",I=/[^\0-\u007E]/,N=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",h=i-a,m=RangeError,E=t(N.exec),T=Math.floor,L=String.fromCharCode,A=t("".charCodeAt),j=t([].join),C=t([].push),b=t("".replace),k=t("".split),V=t("".toLowerCase),B=function(q){for(var ee=[],ae=0,oe=q.length;ae<oe;){var z=A(q,ae++);if(z>=55296&&z<=56319&&ae<oe){var x=A(q,ae++);(x&64512)===56320?C(ee,((z&1023)<<10)+(x&1023)+65536):(C(ee,z),ae--)}else C(ee,z)}return ee},Y=function(q){return q+22+75*(q<26)},W=function(q,ee,ae){var oe=0;for(q=ae?T(q/c):q>>1,q+=T(q/ee);q>h*u>>1;)q=T(q/h),oe+=i;return T(oe+(h+1)*q/(q+l))},X=function(q){var ee=[];q=B(q);var ae=q.length,oe=M,z=0,x=f,_,P;for(_=0;_<q.length;_++)P=q[_],P<128&&C(ee,L(P));var Q=ee.length,S=Q;for(Q&&C(ee,d);S<ae;){var F=r;for(_=0;_<q.length;_++)P=q[_],P>=oe&&P<F&&(F=P);var fe=S+1;if(F-oe>T((r-z)/fe))throw new m(y);for(z+=(F-oe)*fe,oe=F,_=0;_<q.length;_++){if(P=q[_],P<oe&&++z>r)throw new m(y);if(P===oe){for(var Me=z,se=i;;){var Ee=se<=x?a:se>=x+u?u:se-x;if(Me<Ee)break;var Ce=Me-Ee,Ae=i-Ee;C(ee,L(Y(Ee+Ce%Ae))),Me=T(Ce/Ae),se+=i}C(ee,L(Y(Me))),x=W(z,fe,S===Q),z=0,S++}}z++,oe++}return j(ee,"")};return AT=function(q){var ee=[],ae=k(b(V(q),N,"."),"."),oe,z;for(oe=0;oe<ae.length;oe++)z=ae[oe],C(ee,E(I,z)?"xn--"+X(z):z);return j(ee,".")},AT}var SB={},CB;function qpe(){if(CB)return SB;CB=1;var t=Ft(),r=kr(),i=ah(),a=RangeError,u=String.fromCharCode,l=String.fromCodePoint,c=r([].join),f=!!l&&l.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(d){for(var I=[],N=arguments.length,y=0,h;N>y;){if(h=+arguments[y++],i(h,1114111)!==h)throw new a(h+" is not a valid code point");I[y]=h<65536?u(h):u(((h-=65536)>>10)+55296,h%1024+56320)}return c(I,"")}}),SB}var ST,OB;function Jpe(){if(OB)return ST;OB=1;var t=G1(),r=Math.floor,i=function(a,u){var l=a.length;if(l<8)for(var c=1,f,M;c<l;){for(M=c,f=a[c];M&&u(a[M-1],f)>0;)a[M]=a[--M];M!==c++&&(a[M]=f)}else for(var d=r(l/2),I=i(t(a,0,d),u),N=i(t(a,d),u),y=I.length,h=N.length,m=0,E=0;m<y||E<h;)a[m+E]=m<y&&E<h?u(I[m],N[E])<=0?I[m++]:N[E++]:m<y?I[m++]:N[E++];return a};return ST=i,ST}var CT,_B;function LB(){if(_B)return CT;_B=1,N5(),qpe();var t=Ft(),r=an(),i=eU(),a=Ko(),u=Di(),l=kr(),c=vn(),f=TB(),M=Wa(),d=Xc(),I=P5(),N=al(),y=pk(),h=qc(),m=Tg(),E=Wn(),T=Ti(),L=Z1(),A=$4(),j=ri(),C=_i(),b=$o(),k=Jc(),V=Cd(),B=_5(),Y=kp(),W=q4(),X=jg(),q=Kn(),ee=Jpe(),ae=q("iterator"),oe="URLSearchParams",z=oe+"Iterator",x=h.set,_=h.getterFor(oe),P=h.getterFor(z),Q=i("fetch"),S=i("Request"),F=i("Headers"),fe=S&&S.prototype,Me=F&&F.prototype,se=r.TypeError,Ee=r.encodeURIComponent,Ce=String.fromCharCode,Ae=a("String","fromCodePoint"),He=parseInt,rt=l("".charAt),ot=l([].join),st=l([].push),pt=l("".replace),Ot=l([].shift),St=l([].splice),At=l("".split),it=l("".slice),dt=l(/./.exec),ct=/\+/g,yt="�",ve=/^[0-9a-f]+$/i,$e=function(Ne,we){var ze=it(Ne,we,we+2);return dt(ve,ze)?He(ze,16):NaN},Ze=function(Ne){for(var we=0,ze=128;ze>0&&(Ne&ze)!==0;ze>>=1)we++;return we},Mt=function(Ne){var we=null;switch(Ne.length){case 1:we=Ne[0];break;case 2:we=(Ne[0]&31)<<6|Ne[1]&63;break;case 3:we=(Ne[0]&15)<<12|(Ne[1]&63)<<6|Ne[2]&63;break;case 4:we=(Ne[0]&7)<<18|(Ne[1]&63)<<12|(Ne[2]&63)<<6|Ne[3]&63;break}return we>1114111?null:we},Ue=function(Ne){Ne=pt(Ne,ct," ");for(var we=Ne.length,ze="",xe=0;xe<we;){var et=rt(Ne,xe);if(et==="%"){if(rt(Ne,xe+1)==="%"||xe+3>we){ze+="%",xe++;continue}var ht=$e(Ne,xe+1);if(ht!==ht){ze+=et,xe++;continue}xe+=2;var Dt=Ze(ht);if(Dt===0)et=Ce(ht);else{if(Dt===1||Dt>4){ze+=yt,xe++;continue}for(var Tt=[ht],Pt=1;Pt<Dt&&(xe++,!(xe+3>we||rt(Ne,xe)!=="%"));){var er=$e(Ne,xe+1);if(er!==er){xe+=3;break}if(er>191||er<128)break;st(Tt,er),xe+=2,Pt++}if(Tt.length!==Dt){ze+=yt;continue}var cr=Mt(Tt);cr===null?ze+=yt:et=Ae(cr)}}ze+=et,xe++}return ze},Se=/[!'()~]|%20/g,Le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ge=function(Ne){return Le[Ne]},gt=function(Ne){return pt(Ee(Ne),Se,Ge)},ut=y(function(we,ze){x(this,{type:z,target:_(we).entries,index:0,kind:ze})},oe,function(){var we=P(this),ze=we.target,xe=we.index++;if(!ze||xe>=ze.length)return we.target=null,W(void 0,!0);var et=ze[xe];switch(we.kind){case"keys":return W(et.key,!1);case"values":return W(et.value,!1)}return W([et.key,et.value],!1)},!0),ke=function(Ne){this.entries=[],this.url=null,Ne!==void 0&&(C(Ne)?this.parseObject(Ne):this.parseQuery(typeof Ne=="string"?rt(Ne,0)==="?"?it(Ne,1):Ne:b(Ne)))};ke.prototype={type:oe,bindURL:function(Ne){this.url=Ne,this.update()},parseObject:function(Ne){var we=this.entries,ze=Y(Ne),xe,et,ht,Dt,Tt,Pt,er;if(ze)for(xe=B(Ne,ze),et=xe.next;!(ht=u(et,xe)).done;){if(Dt=B(j(ht.value)),Tt=Dt.next,(Pt=u(Tt,Dt)).done||(er=u(Tt,Dt)).done||!u(Tt,Dt).done)throw new se("Expected sequence with length 2");st(we,{key:b(Pt.value),value:b(er.value)})}else for(var cr in Ne)T(Ne,cr)&&st(we,{key:cr,value:b(Ne[cr])})},parseQuery:function(Ne){if(Ne)for(var we=this.entries,ze=At(Ne,"&"),xe=0,et,ht;xe<ze.length;)et=ze[xe++],et.length&&(ht=At(et,"="),st(we,{key:Ue(Ot(ht)),value:Ue(ot(ht,"="))}))},serialize:function(){for(var Ne=this.entries,we=[],ze=0,xe;ze<Ne.length;)xe=Ne[ze++],st(we,gt(xe.key)+"="+gt(xe.value));return ot(we,"&")},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 we=arguments.length>0?arguments[0]:void 0,ze=x(this,new ke(we));c||(this.size=ze.entries.length)},_e=Te.prototype;if(I(_e,{append:function(we,ze){var xe=_(this);X(arguments.length,2),st(xe.entries,{key:b(we),value:b(ze)}),c||this.length++,xe.updateURL()},delete:function(Ne){for(var we=_(this),ze=X(arguments.length,1),xe=we.entries,et=b(Ne),ht=ze<2?void 0:arguments[1],Dt=ht===void 0?ht:b(ht),Tt=0;Tt<xe.length;){var Pt=xe[Tt];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt)){if(St(xe,Tt,1),Dt!==void 0)break}else Tt++}c||(this.size=xe.length),we.updateURL()},get:function(we){var ze=_(this).entries;X(arguments.length,1);for(var xe=b(we),et=0;et<ze.length;et++)if(ze[et].key===xe)return ze[et].value;return null},getAll:function(we){var ze=_(this).entries;X(arguments.length,1);for(var xe=b(we),et=[],ht=0;ht<ze.length;ht++)ze[ht].key===xe&&st(et,ze[ht].value);return et},has:function(we){for(var ze=_(this).entries,xe=X(arguments.length,1),et=b(we),ht=xe<2?void 0:arguments[1],Dt=ht===void 0?ht:b(ht),Tt=0;Tt<ze.length;){var Pt=ze[Tt++];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt))return!0}return!1},set:function(we,ze){var xe=_(this);X(arguments.length,1);for(var et=xe.entries,ht=!1,Dt=b(we),Tt=b(ze),Pt=0,er;Pt<et.length;Pt++)er=et[Pt],er.key===Dt&&(ht?St(et,Pt--,1):(ht=!0,er.value=Tt));ht||st(et,{key:Dt,value:Tt}),c||(this.size=et.length),xe.updateURL()},sort:function(){var we=_(this);ee(we.entries,function(ze,xe){return ze.key>xe.key?1:-1}),we.updateURL()},forEach:function(we){for(var ze=_(this).entries,xe=L(we,arguments.length>1?arguments[1]:void 0),et=0,ht;et<ze.length;)ht=ze[et++],xe(ht.value,ht.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),M(_e,ae,_e.entries,{name:"entries"}),M(_e,"toString",function(){return _(this).serialize()},{enumerable:!0}),c&&d(_e,"size",{get:function(){return _(this).entries.length},configurable:!0,enumerable:!0}),N(Te,oe),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&E(F)){var Be=l(Me.has),It=l(Me.set),Ct=function(Ne){if(C(Ne)){var we=Ne.body,ze;if(A(we)===oe)return ze=Ne.headers?new F(Ne.headers):new F,Be(ze,"content-type")||It(ze,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k(Ne,{body:V(0,b(we)),headers:V(0,ze)})}return Ne};if(E(Q)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(we){return Q(we,arguments.length>1?Ct(arguments[1]):{})}}),E(S)){var lr=function(we){return m(this,fe),new S(we,arguments.length>1?Ct(arguments[1]):{})};fe.constructor=lr,lr.prototype=fe,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:lr})}}return CT={URLSearchParams:Te,getState:_},CT}var xB;function Xpe(){if(xB)return DB;xB=1,Rz();var t=Ft(),r=vn(),i=TB(),a=an(),u=Z1(),l=kr(),c=Wa(),f=Xc(),M=Tg(),d=Ti(),I=Wpe(),N=gR(),y=G1(),h=kz().codeAt,m=Kpe(),E=$o(),T=al(),L=jg(),A=LB(),j=qc(),C=j.set,b=j.getterFor("URL"),k=A.URLSearchParams,V=A.getState,B=a.URL,Y=a.TypeError,W=a.parseInt,X=Math.floor,q=Math.pow,ee=l("".charAt),ae=l(/./.exec),oe=l([].join),z=l(1 .toString),x=l([].pop),_=l([].push),P=l("".replace),Q=l([].shift),S=l("".split),F=l("".slice),fe=l("".toLowerCase),Me=l([].unshift),se="Invalid authority",Ee="Invalid scheme",Ce="Invalid host",Ae="Invalid port",He=/[a-z]/i,rt=/[\d+-.a-z]/i,ot=/\d/,st=/^0x/i,pt=/^[0-7]+$/,Ot=/^\d+$/,St=/^[\da-f]+$/i,At=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,ct=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,ve,$e=function(te){var de=S(te,"."),ue,G,he,Je,Re,_t,at;if(de.length&&de[de.length-1]===""&&de.length--,ue=de.length,ue>4)return te;for(G=[],he=0;he<ue;he++){if(Je=de[he],Je==="")return te;if(Re=10,Je.length>1&&ee(Je,0)==="0"&&(Re=ae(st,Je)?16:8,Je=F(Je,Re===8?1:2)),Je==="")_t=0;else{if(!ae(Re===10?Ot:Re===8?pt:St,Je))return te;_t=W(Je,Re)}_(G,_t)}for(he=0;he<ue;he++)if(_t=G[he],he===ue-1){if(_t>=q(256,5-ue))return null}else if(_t>255)return null;for(at=x(G),he=0;he<G.length;he++)at+=G[he]*q(256,3-he);return at},Ze=function(te){var de=[0,0,0,0,0,0,0,0],ue=0,G=null,he=0,Je,Re,_t,at,Kt,ir,ye,Lt=function(){return ee(te,he)};if(Lt()===":"){if(ee(te,1)!==":")return;he+=2,ue++,G=ue}for(;Lt();){if(ue===8)return;if(Lt()===":"){if(G!==null)return;he++,ue++,G=ue;continue}for(Je=Re=0;Re<4&&ae(St,Lt());)Je=Je*16+W(Lt(),16),he++,Re++;if(Lt()==="."){if(Re===0||(he-=Re,ue>6))return;for(_t=0;Lt();){if(at=null,_t>0)if(Lt()==="."&&_t<4)he++;else return;if(!ae(ot,Lt()))return;for(;ae(ot,Lt());){if(Kt=W(Lt(),10),at===null)at=Kt;else{if(at===0)return;at=at*10+Kt}if(at>255)return;he++}de[ue]=de[ue]*256+at,_t++,(_t===2||_t===4)&&ue++}if(_t!==4)return;break}else if(Lt()===":"){if(he++,!Lt())return}else if(Lt())return;de[ue++]=Je}if(G!==null)for(ir=ue-G,ue=7;ue!==0&&ir>0;)ye=de[ue],de[ue--]=de[G+ir-1],de[G+--ir]=ye;else if(ue!==8)return;return de},Mt=function(te){for(var de=null,ue=1,G=null,he=0,Je=0;Je<8;Je++)te[Je]!==0?(he>ue&&(de=G,ue=he),G=null,he=0):(G===null&&(G=Je),++he);return he>ue?G:de},Ue=function(te){var de,ue,G,he;if(typeof te=="number"){for(de=[],ue=0;ue<4;ue++)Me(de,te%256),te=X(te/256);return oe(de,".")}if(typeof te=="object"){for(de="",G=Mt(te),ue=0;ue<8;ue++)he&&te[ue]===0||(he&&(he=!1),G===ue?(de+=ue?":":"::",he=!0):(de+=z(te[ue],16),ue<7&&(de+=":")));return"["+de+"]"}return te},Se={},Le=I({},Se,{" ":1,'"':1,"<":1,">":1,"`":1}),Ge=I({},Le,{"#":1,"?":1,"{":1,"}":1}),gt=I({},Ge,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(te,de){var ue=h(te,0);return ue>32&&ue<127&&!d(de,te)?te:encodeURIComponent(te)},ke={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(te,de){var ue;return te.length===2&&ae(He,ee(te,0))&&((ue=ee(te,1))===":"||!de&&ue==="|")},_e=function(te){var de;return te.length>1&&Te(F(te,0,2))&&(te.length===2||(de=ee(te,2))==="/"||de==="\\"||de==="?"||de==="#")},Be=function(te){return te==="."||fe(te)==="%2e"},It=function(te){return te=fe(te),te===".."||te==="%2e."||te===".%2e"||te==="%2e%2e"},Ct={},lr={},Ne={},we={},ze={},xe={},et={},ht={},Dt={},Tt={},Pt={},er={},cr={},Un={},mr={},An={},Ut={},Er={},cn={},Dr={},fr={},Sn=function(te,de,ue){var G=E(te),he,Je,Re;if(de){if(Je=this.parse(G),Je)throw new Y(Je);this.searchParams=null}else{if(ue!==void 0&&(he=new Sn(ue,!0)),Je=this.parse(G,null,he),Je)throw new Y(Je);Re=V(new k),Re.bindURL(this),this.searchParams=Re}};Sn.prototype={type:"URL",parse:function(te,de,ue){var G=this,he=de||Ct,Je=0,Re="",_t=!1,at=!1,Kt=!1,ir,ye,Lt,Ur;for(te=E(te),de||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,te=P(te,dt,""),te=P(te,ct,"$1")),te=P(te,yt,""),ir=N(te);Je<=ir.length;){switch(ye=ir[Je],he){case Ct:if(ye&&ae(He,ye))Re+=fe(ye),he=lr;else{if(de)return Ee;he=Ne;continue}break;case lr:if(ye&&(ae(rt,ye)||ye==="+"||ye==="-"||ye==="."))Re+=fe(ye);else if(ye===":"){if(de&&(G.isSpecial()!==d(ke,Re)||Re==="file"&&(G.includesCredentials()||G.port!==null)||G.scheme==="file"&&!G.host))return;if(G.scheme=Re,de){G.isSpecial()&&ke[G.scheme]===G.port&&(G.port=null);return}Re="",G.scheme==="file"?he=Un:G.isSpecial()&&ue&&ue.scheme===G.scheme?he=we:G.isSpecial()?he=ht:ir[Je+1]==="/"?(he=ze,Je++):(G.cannotBeABaseURL=!0,_(G.path,""),he=cn)}else{if(de)return Ee;Re="",he=Ne,Je=0;continue}break;case Ne:if(!ue||ue.cannotBeABaseURL&&ye!=="#")return Ee;if(ue.cannotBeABaseURL&&ye==="#"){G.scheme=ue.scheme,G.path=y(ue.path),G.query=ue.query,G.fragment="",G.cannotBeABaseURL=!0,he=fr;break}he=ue.scheme==="file"?Un:xe;continue;case we:if(ye==="/"&&ir[Je+1]==="/")he=Dt,Je++;else{he=xe;continue}break;case ze:if(ye==="/"){he=Tt;break}else{he=Er;continue}case xe:if(G.scheme=ue.scheme,ye===ve)G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query=ue.query;else if(ye==="/"||ye==="\\"&&G.isSpecial())he=et;else if(ye==="?")G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query="",he=Dr;else if(ye==="#")G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query=ue.query,G.fragment="",he=fr;else{G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.path.length--,he=Er;continue}break;case et:if(G.isSpecial()&&(ye==="/"||ye==="\\"))he=Dt;else if(ye==="/")he=Tt;else{G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,he=Er;continue}break;case ht:if(he=Dt,ye!=="/"||ee(Re,Je+1)!=="/")continue;Je++;break;case Dt:if(ye!=="/"&&ye!=="\\"){he=Tt;continue}break;case Tt:if(ye==="@"){_t&&(Re="%40"+Re),_t=!0,Lt=N(Re);for(var ui=0;ui<Lt.length;ui++){var Yn=Lt[ui];if(Yn===":"&&!Kt){Kt=!0;continue}var vr=ut(Yn,gt);Kt?G.password+=vr:G.username+=vr}Re=""}else if(ye===ve||ye==="/"||ye==="?"||ye==="#"||ye==="\\"&&G.isSpecial()){if(_t&&Re==="")return se;Je-=N(Re).length+1,Re="",he=Pt}else Re+=ye;break;case Pt:case er:if(de&&G.scheme==="file"){he=An;continue}else if(ye===":"&&!at){if(Re==="")return Ce;if(Ur=G.parseHost(Re),Ur)return Ur;if(Re="",he=cr,de===er)return}else if(ye===ve||ye==="/"||ye==="?"||ye==="#"||ye==="\\"&&G.isSpecial()){if(G.isSpecial()&&Re==="")return Ce;if(de&&Re===""&&(G.includesCredentials()||G.port!==null))return;if(Ur=G.parseHost(Re),Ur)return Ur;if(Re="",he=Ut,de)return;continue}else ye==="["?at=!0:ye==="]"&&(at=!1),Re+=ye;break;case cr:if(ae(ot,ye))Re+=ye;else if(ye===ve||ye==="/"||ye==="?"||ye==="#"||ye==="\\"&&G.isSpecial()||de){if(Re!==""){var Pi=W(Re,10);if(Pi>65535)return Ae;G.port=G.isSpecial()&&Pi===ke[G.scheme]?null:Pi,Re=""}if(de)return;he=Ut;continue}else return Ae;break;case Un:if(G.scheme="file",ye==="/"||ye==="\\")he=mr;else if(ue&&ue.scheme==="file")switch(ye){case ve:G.host=ue.host,G.path=y(ue.path),G.query=ue.query;break;case"?":G.host=ue.host,G.path=y(ue.path),G.query="",he=Dr;break;case"#":G.host=ue.host,G.path=y(ue.path),G.query=ue.query,G.fragment="",he=fr;break;default:_e(oe(y(ir,Je),""))||(G.host=ue.host,G.path=y(ue.path),G.shortenPath()),he=Er;continue}else{he=Er;continue}break;case mr:if(ye==="/"||ye==="\\"){he=An;break}ue&&ue.scheme==="file"&&!_e(oe(y(ir,Je),""))&&(Te(ue.path[0],!0)?_(G.path,ue.path[0]):G.host=ue.host),he=Er;continue;case An:if(ye===ve||ye==="/"||ye==="\\"||ye==="?"||ye==="#"){if(!de&&Te(Re))he=Er;else if(Re===""){if(G.host="",de)return;he=Ut}else{if(Ur=G.parseHost(Re),Ur)return Ur;if(G.host==="localhost"&&(G.host=""),de)return;Re="",he=Ut}continue}else Re+=ye;break;case Ut:if(G.isSpecial()){if(he=Er,ye!=="/"&&ye!=="\\")continue}else if(!de&&ye==="?")G.query="",he=Dr;else if(!de&&ye==="#")G.fragment="",he=fr;else if(ye!==ve&&(he=Er,ye!=="/"))continue;break;case Er:if(ye===ve||ye==="/"||ye==="\\"&&G.isSpecial()||!de&&(ye==="?"||ye==="#")){if(It(Re)?(G.shortenPath(),ye!=="/"&&!(ye==="\\"&&G.isSpecial())&&_(G.path,"")):Be(Re)?ye!=="/"&&!(ye==="\\"&&G.isSpecial())&&_(G.path,""):(G.scheme==="file"&&!G.path.length&&Te(Re)&&(G.host&&(G.host=""),Re=ee(Re,0)+":"),_(G.path,Re)),Re="",G.scheme==="file"&&(ye===ve||ye==="?"||ye==="#"))for(;G.path.length>1&&G.path[0]==="";)Q(G.path);ye==="?"?(G.query="",he=Dr):ye==="#"&&(G.fragment="",he=fr)}else Re+=ut(ye,Ge);break;case cn:ye==="?"?(G.query="",he=Dr):ye==="#"?(G.fragment="",he=fr):ye!==ve&&(G.path[0]+=ut(ye,Se));break;case Dr:!de&&ye==="#"?(G.fragment="",he=fr):ye!==ve&&(ye==="'"&&G.isSpecial()?G.query+="%27":ye==="#"?G.query+="%23":G.query+=ut(ye,Se));break;case fr:ye!==ve&&(G.fragment+=ut(ye,Le));break}Je++}},parseHost:function(te){var de,ue,G;if(ee(te,0)==="["){if(ee(te,te.length-1)!=="]"||(de=Ze(F(te,1,-1)),!de))return Ce;this.host=de}else if(this.isSpecial()){if(te=m(te),ae(At,te)||(de=$e(te),de===null))return Ce;this.host=de}else{if(ae(it,te))return Ce;for(de="",ue=N(te),G=0;G<ue.length;G++)de+=ut(ue[G],Se);this.host=de}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return d(ke,this.scheme)},shortenPath:function(){var te=this.path,de=te.length;de&&(this.scheme!=="file"||de!==1||!Te(te[0],!0))&&te.length--},serialize:function(){var te=this,de=te.scheme,ue=te.username,G=te.password,he=te.host,Je=te.port,Re=te.path,_t=te.query,at=te.fragment,Kt=de+":";return he!==null?(Kt+="//",te.includesCredentials()&&(Kt+=ue+(G?":"+G:"")+"@"),Kt+=Ue(he),Je!==null&&(Kt+=":"+Je)):de==="file"&&(Kt+="//"),Kt+=te.cannotBeABaseURL?Re[0]:Re.length?"/"+oe(Re,"/"):"",_t!==null&&(Kt+="?"+_t),at!==null&&(Kt+="#"+at),Kt},setHref:function(te){var de=this.parse(te);if(de)throw new Y(de);this.searchParams.update()},getOrigin:function(){var te=this.scheme,de=this.port;if(te==="blob")try{return new fn(te.path[0]).origin}catch(ue){return"null"}return te==="file"||!this.isSpecial()?"null":te+"://"+Ue(this.host)+(de!==null?":"+de:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(te){this.parse(E(te)+":",Ct)},getUsername:function(){return this.username},setUsername:function(te){var de=N(E(te));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var ue=0;ue<de.length;ue++)this.username+=ut(de[ue],gt)}},getPassword:function(){return this.password},setPassword:function(te){var de=N(E(te));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var ue=0;ue<de.length;ue++)this.password+=ut(de[ue],gt)}},getHost:function(){var te=this.host,de=this.port;return te===null?"":de===null?Ue(te):Ue(te)+":"+de},setHost:function(te){this.cannotBeABaseURL||this.parse(te,Pt)},getHostname:function(){var te=this.host;return te===null?"":Ue(te)},setHostname:function(te){this.cannotBeABaseURL||this.parse(te,er)},getPort:function(){var te=this.port;return te===null?"":E(te)},setPort:function(te){this.cannotHaveUsernamePasswordPort()||(te=E(te),te===""?this.port=null:this.parse(te,cr))},getPathname:function(){var te=this.path;return this.cannotBeABaseURL?te[0]:te.length?"/"+oe(te,"/"):""},setPathname:function(te){this.cannotBeABaseURL||(this.path=[],this.parse(te,Ut))},getSearch:function(){var te=this.query;return te?"?"+te:""},setSearch:function(te){te=E(te),te===""?this.query=null:(ee(te,0)==="?"&&(te=F(te,1)),this.query="",this.parse(te,Dr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var te=this.fragment;return te?"#"+te:""},setHash:function(te){if(te=E(te),te===""){this.fragment=null;return}ee(te,0)==="#"&&(te=F(te,1)),this.fragment="",this.parse(te,fr)},update:function(){this.query=this.searchParams.serialize()||null}};var fn=function(de){var ue=M(this,Jt),G=L(arguments.length,1)>1?arguments[1]:void 0,he=C(ue,new Sn(de,!1,G));r||(ue.href=he.serialize(),ue.origin=he.getOrigin(),ue.protocol=he.getProtocol(),ue.username=he.getUsername(),ue.password=he.getPassword(),ue.host=he.getHost(),ue.hostname=he.getHostname(),ue.port=he.getPort(),ue.pathname=he.getPathname(),ue.search=he.getSearch(),ue.searchParams=he.getSearchParams(),ue.hash=he.getHash())},Jt=fn.prototype,Ir=function(te,de){return{get:function(){return b(this)[te]()},set:de&&function(ue){return b(this)[de](ue)},configurable:!0,enumerable:!0}};if(r&&(f(Jt,"href",Ir("serialize","setHref")),f(Jt,"origin",Ir("getOrigin")),f(Jt,"protocol",Ir("getProtocol","setProtocol")),f(Jt,"username",Ir("getUsername","setUsername")),f(Jt,"password",Ir("getPassword","setPassword")),f(Jt,"host",Ir("getHost","setHost")),f(Jt,"hostname",Ir("getHostname","setHostname")),f(Jt,"port",Ir("getPort","setPort")),f(Jt,"pathname",Ir("getPathname","setPathname")),f(Jt,"search",Ir("getSearch","setSearch")),f(Jt,"searchParams",Ir("getSearchParams")),f(Jt,"hash",Ir("getHash","setHash"))),c(Jt,"toJSON",function(){return b(this).serialize()},{enumerable:!0}),c(Jt,"toString",function(){return b(this).serialize()},{enumerable:!0}),B){var Kr=B.createObjectURL,Ri=B.revokeObjectURL;Kr&&c(fn,"createObjectURL",u(Kr,B)),Ri&&c(fn,"revokeObjectURL",u(Ri,B))}return T(fn,"URL"),t({global:!0,constructor:!0,forced:!i,sham:!r},{URL:fn}),DB}var wB;function eye(){return wB||(wB=1,Xpe()),EB}eye();var bB={},kB;function tye(){if(kB)return bB;kB=1;var t=Ft(),r=Di();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),bB}tye();var zB={},RB;function rye(){return RB||(RB=1,LB()),zB}rye();var PB={},UB;function nye(){if(UB)return PB;UB=1;var t=Wa(),r=kr(),i=$o(),a=jg(),u=URLSearchParams,l=u.prototype,c=r(l.append),f=r(l.delete),M=r(l.forEach),d=r([].push),I=new u("a=1&a=2&b=3");return I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&t(l,"delete",function(N){var y=arguments.length,h=y<2?void 0:arguments[1];if(y&&h===void 0)return f(this,N);var m=[];M(this,function(k,V){d(m,{key:V,value:k})}),a(y,1);for(var E=i(N),T=i(h),L=0,A=0,j=!1,C=m.length,b;L<C;)b=m[L++],j||b.key===E?(j=!0,f(this,b.key)):A++;for(;A<C;)b=m[A++],b.key===E&&b.value===T||c(this,b.key,b.value)},{enumerable:!0,unsafe:!0}),PB}nye();var YB={},QB;function iye(){if(QB)return YB;QB=1;var t=Wa(),r=kr(),i=$o(),a=jg(),u=URLSearchParams,l=u.prototype,c=r(l.getAll),f=r(l.has),M=new u("a=1");return(M.has("a",2)||!M.has("a",void 0))&&t(l,"has",function(I){var N=arguments.length,y=N<2?void 0:arguments[1];if(N&&y===void 0)return f(this,I);var h=c(this,I);a(N,1);for(var m=i(y),E=0;E<h.length;)if(h[E++]===m)return!0;return!1},{enumerable:!0,unsafe:!0}),YB}iye();var HB={},FB;function aye(){if(FB)return HB;FB=1;var t=vn(),r=kr(),i=Xc(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&i(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),HB}aye();function z0(t){"@babel/helpers - typeof";return z0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},z0(t)}function oye(t,r){return cye(t)||lye(t,r)||sye(t,r)||uye()}function uye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
61
61
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sye(t,r){if(t){if(typeof t=="string")return VB(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?VB(t,r):void 0}}function VB(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function lye(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function cye(t){if(Array.isArray(t))return t}function fye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Mye(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,$B(a.key),a)}}function dye(t,r,i){return r&&Mye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fy(t,r,i){return(r=$B(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function $B(t){var r=gye(t,"string");return z0(r)=="symbol"?r:r+""}function gye(t,r){if(z0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(z0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Iye=function(){function t(){fye(this,t),fy(this,"_levels",[]),fy(this,"_transports",[]),fy(this,"_logs",[]),fy(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var i=r.split(">"),a=oye(i,2),u=a[0],l=a[1];this._levels=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return dye(t,[{key:"create",value:function(i,a){var u=this;return function(l){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u._levels.includes(i)&&u._transports.includes("console")){var M=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(M,";"),i,"",l,"color: ".concat(M,";"),f)}u._logs.push("".concat(i,": ").concat(l," +").concat(f,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"cleanLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var i=this._logs.join(`
62
- `),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),OT=new Iye;function Ud(t){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ud(t)}function mn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Ud(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Ud(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function BB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Go(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){BB(l,a,u,c,f,"next",M)}function f(M){BB(l,a,u,c,f,"throw",M)}c(void 0)})}}function pye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yye(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GB(a.key),a)}}function Nye(t,r,i){return r&&yye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pg(t,r,i){return(r=GB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function GB(t){var r=hye(t,"string");return Ud(r)=="symbol"?r:r+""}function hye(t,r){if(Ud(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Ud(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ao=OT.create("wasm_idv"),mye=function(){function t(r){pye(this,t),Pg(this,"_worker",null),Pg(this,"_initialized",!1),Pg(this,"_connectedToIdv",!1),Pg(this,"_serviceRunning",!1),Pg(this,"_userId",I0e(sge)),Pg(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return Nye(t,[{key:"init",value:function(){var r=Go(mn().mark(function a(){var u,l,c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/08ebdfa-dfaa30264//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),ao("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/08ebdfa-dfaa30264/",preMain:!0});case 23:return f=d.sent,f.code===0&&ao("Worker was created successfully"),d.abrupt("return",f);case 26:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Go(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:om.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=M.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),ao("IdvWasmService result code: ".concat(c.code)),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Go(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:om.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,ao("Connection by URL result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Go(mn().mark(function a(u,l){var c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c={workflowId:u},l&&(p0e(l)?c.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),d.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:c,preMain:!0});case 4:return f=d.sent,ao("Start session result code: ".concat(f.code)),d.abrupt("return",f);case 7:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Go(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,ao("Continue session result code: ".concat(c.code)),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Go(mn().mark(function a(){var u,l,c=arguments;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,ao("listWorkflows result code: ".concat(l.code)),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,ao("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,ao("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,ao("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Go(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,ao("getWorkflow result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Go(mn().mark(function a(u,l){var c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 2:return c=M.sent,ao("pushData result code: ".concat(c.code)),M.abrupt("return",c);case 5:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,ao("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,ao("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,ao("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Go(mn().mark(function a(u){var l=this;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var N=I.data.target;if(N==="stdout"){ao(JSON.stringify(I.data.content));return}if(N==="custom"){var y=I.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(l._initialized=!0),M(m)}if(N==="stderr"){var E=I.data.content;ao(JSON.stringify(E)),l._setErrorScreen&&l._setErrorScreen(E)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()}])}();function Yd(t){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yd(t)}function ZB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function Qd(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?ZB(Object(i),!0).forEach(function(a){_T(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ZB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function _T(t,r,i){return(r=Eye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Eye(t){var r=Dye(t,"string");return Yd(r)=="symbol"?r:r+""}function Dye(t,r){if(Yd(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Yd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Yd(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Yd(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function WB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Rs(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){WB(l,a,u,c,f,"next",M)}function f(M){WB(l,a,u,c,f,"throw",M)}c(void 0)})}}var vye=OT.create("store_idv"),Tye=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Rs(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new mye,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(M=y.sent,d=null,M.code===4&&(d=Ld.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=Ld.PROVIDER_ERROR),d===null){y.next=12;break}return I=new p0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,M=null,f.code===4&&(M=Ld.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=Ld.PROVIDER_ERROR),M===null){y.next=13;break}return d=new p0({errorCode:M}),I=new Vp({errorCode:sm.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=Qd(Qd({},f.results),{},{sessionId:d}),N=Qd({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(N)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=Rs(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return c=i().externalModulesNames,N.prev=1,N.next=4,jye(c);case 4:return f=N.sent,r(function(){return{externalModules:f}}),N.abrupt("return",{});case 9:return N.prev=9,N.t0=N.catch(1),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new I0({errorCode:r0.MODULES_INSTANTIATION_FAILURE}),N.abrupt("return",{error:d});case 16:case"end":return N.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=ME(u.find(function(c){return c.templateId===lm}));l.templateLayout=NY(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Rs(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var h=Rs(ei().mark(function m(){var E,T,L,A;return ei().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,i().wasmService.pushData(c,f);case 2:if(E=C.sent,T=null,E.code===4&&(T=ks.HTTP_ISSUE),E.code!==0&&E.code!==4&&(T=ks.PROVIDER_ERROR),T!==null&&(L=new y0({errorCode:ks.HTTP_ISSUE}),A=new eu({errorCode:Xo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=A),E.code!==0){C.next=12;break}return M=null,C.abrupt("return",E);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),I=function(){return null},y.next=5,gE(d,I);case 5:return y.abrupt("return",M?{error:M}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var h=Rs(ei().mark(function m(){var E,T,L,A,j,C,b,k,V,B,Y,W,X,q,ee;return ei().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,i().wasmService.getSessionState();case 2:if(A=oe.sent,j=(E=A.data)===null||E===void 0?void 0:E.currentStep,C=(T=A.data)===null||T===void 0?void 0:T.isProcessingFiles,b=(L=A.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,k=M0e(b,j),V=A.code===4,B=A.code!==0&&A.code!==4,Y=A.code===0&&(!A.data.workflow||!A.data.currentStep),W=j&&j===c,X=null,b&&!k&&(X=ks.NOT_DATA_TYPE),V&&(X=ks.HTTP_ISSUE),B&&(X=ks.PROVIDER_ERROR),C&&(X=ks.IS_PROCESSING),W&&(X=ks.SAME_STEP),Y&&(X=ks.DECODING_FAILED),X!==null&&(q=new y0({errorCode:X}),ee=new eu({errorCode:Xo.INTERNAL_ISSUE,underlyingBaseError:q}),f=ee),vye(JSON.stringify({nextStep:j,isDataType:k,isProcessingFiles:C})),!(k&&!W&&!C&&!V&&!B&&!Y)){oe.next=23;break}return f=null,oe.abrupt("return",A.data);case 23:return oe.abrupt("return",null);case 24:case"end":return oe.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),d=function(){return null},y.next=6,gE(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.currentStep});case 10:case"end":return y.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({eventType:e0.MESSAGE,message:t0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Rs(ei().mark(function l(c,f){var M,d,I,N,y,h,m,E;return ei().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof Rn)){L.next=10;break}return M=f,d=new eu({errorCode:Xo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(N=L.sent,!N.error){L.next=24;break}return i().workflowSessionCompletion({error:N.error}),i().resetSession(),L.abrupt("return");case 24:if(y=N.workflow,h=N.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),m=i()._findStepById(h),E=function(j){return!!j&&Object.prototype.toString.call(j)==="[object Object]"&&j.templateId},!(m!=null&&m.final&&!E(m.client))){L.next=34;break}return i().setFinalStepAndStopProcess(m.id),L.abrupt("return");case 34:m!=null&&m.final&&E(m.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(h),i().setIsProcessing(!1);case 37:case"end":return L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=Rs(ei().mark(function l(){var c,f,M,d,I,N,y,h,m,E,T,L,A;return ei().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){C.next=6;break}return C.abrupt("return",c);case 6:if(M){C.next=8;break}return C.abrupt("return",c);case 8:if(I=M.sessionId,N=M.workflowId,!(!I||N!==f.id)){C.next=11;break}return C.abrupt("return",c);case 11:return C.next=13,i().wasmService.continueSession(I);case 13:return y=C.sent,h=y.data,m=h.currentStep,"id"in h&&"currentStep"in h||(E=new Og({errorCode:Ag.DECODING_FAILED}),T=new eu({errorCode:Xo.START_SESSION_ERROR,underlyingBaseError:E}),c=Qd(Qd({},c),{},{error:T})),L=i()._findStepById(m),(L==null?void 0:L.final)===!1?(A=h.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(A),i().setCurrentSessionDataLsAndStore({sessionId:h.id,workflowId:N}),i().listener({eventType:e0.MESSAGE,message:t0.DID_START_RESTORE_SESSION,module:"IDV"}),c=Qd(Qd({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),C.abrupt("return",c);case 20:case"end":return C.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===lm)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,f.serviceToken=i().serviceToken}f&&f.templateLayout&&(f.templateLayout=NY(f.templateLayout,i().layout))}var I=f0e(i().externalModules,c.steps,u);if(f===null||!I){var N=new eu({errorCode:Xo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:N}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Rs(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function jye(t){return LT.apply(this,arguments)}function LT(){return LT=Rs(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:l1.getIdentifier(),supportedTemplates:l1.getSupportedTemplates(),component:l1}],a=_T(_T({},um.LIVENESS,function(){return Promise.resolve().then(()=>tBe)}),um.DOC_READER,function(){return Promise.resolve().then(()=>CSt)}),u=ei().mark(function I(){var N,y,h;return ei().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(N=c[l],y=function(){return a[N]()},!y){E.next=7;break}return E.next=5,y();case 5:h=E.sent,i.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return E.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),LT.apply(this,arguments)}function R0(t){"@babel/helpers - typeof";return R0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R0(t)}function KB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function xT(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?KB(Object(i),!0).forEach(function(a){Aye(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):KB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Aye(t,r,i){return(r=Sye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Sye(t){var r=Cye(t,"string");return R0(r)=="symbol"?r:r+""}function Cye(t,r){if(R0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=a4e(function(){return xT(xT(xT({},m0e.apply(void 0,arguments)),w0e.apply(void 0,arguments)),Tye.apply(void 0,arguments))}),qB=function(r){var i=r.children;return qn.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:i})};function P0(t){"@babel/helpers - typeof";return P0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},P0(t)}function JB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function XB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?JB(Object(i),!0).forEach(function(a){Oye(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):JB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Oye(t,r,i){return(r=_ye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function _ye(t){var r=Lye(t,"string");return P0(r)=="symbol"?r:r+""}function Lye(t,r){if(P0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var xye=function(){var r=ia(function(m){return m.currentScreenConfig}),i=ia(function(m){return m.pushStepWaitNextStepAndSet}),a=ia(function(m){return m.proccessingTransformedTemplate}),u=ia(function(m){return m.isProcessing}),l=ia(function(m){return m.setIsProcessing}),c=ia(function(m){return m.currentStepId}),f=ia(function(m){return m.listener}),M=ia(function(m){return m.externalModules}),d=ia(function(m){return m.modulesConfig}),I=function(E,T){f({eventType:e0.MESSAGE,message:T,module:E})},N=function(E){l(E)},y=function(E){c&&(l(!1),i(c,E))},h=Jn.useCallback(function(){if(!r)return null;var m=M.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(m&&r)return qn.jsx(m.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:N})},[r,M]);return!r&&!a?qn.jsx(mm,{direction:Rp.Ltr,children:qn.jsx(qB,{children:"Waiting for play... or process completed"})}):qn.jsx(qn.Fragment,{children:qn.jsx(mm,{direction:Rp.Ltr,children:qn.jsxs(qn.Fragment,{children:[u&&qn.jsx(qB,{children:a?qn.jsx(l1,{perform:y,moduleProps:XB(XB({},a),{},{templateId:"PROGRESS"}),idvEventListener:I,isProcessing:N}):"Processing..."}),h()]})})})};function wye(){return qn.jsx(Jn.StrictMode,{children:qn.jsx(bge,{children:qn.jsx(xye,{})})})}function Ug(t){"@babel/helpers - typeof";return Ug=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ug(t)}function bye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function eG(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,rG(a.key),a)}}function kye(t,r,i){return r&&eG(t.prototype,r),i&&eG(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function zye(t,r,i){return r=Y0(r),Rye(t,bT()?Reflect.construct(r,[],Y0(t).constructor):r.apply(t,i))}function Rye(t,r){if(r&&(Ug(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pye(t)}function Pye(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uye(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&U0(t,r)}function wT(t){var r=typeof Map=="function"?new Map:void 0;return wT=function(a){if(a===null||!Qye(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return Yye(a,arguments,Y0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),U0(u,a)},wT(t)}function Yye(t,r,i){if(bT())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&U0(u,i.prototype),u}function bT(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(bT=function(){return!!t})()}function Qye(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function U0(t,r){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},U0(t,r)}function Y0(t){return Y0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Y0(t)}function tG(t,r,i){return(r=rG(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function rG(t){var r=Hye(t,"string");return Ug(r)=="symbol"?r:r+""}function Hye(t,r){if(Ug(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Ug(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Fye="*,::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%}",nG=function(t){function r(){var i;return bye(this,r),i=zye(this,r),tG(i,"_root",rge.createRoot(i.attachShadow({mode:"open"}))),tG(i,"_mounted",!1),i}return Uye(r,t),kye(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(qn.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[qn.jsx("style",{nonce:ia.getState().getNonce(),children:Fye}),qn.jsx(wye,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OT.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(wT(HTMLElement));function Hd(t){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hd(t)}function As(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */As=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Hd(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Hd(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function iG(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Yg(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){iG(l,a,u,c,f,"next",M)}function f(M){iG(l,a,u,c,f,"throw",M)}c(void 0)})}}function Vye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function $ye(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Gye(a.key),a)}}function Bye(t,r,i){return r&&$ye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gye(t){var r=Zye(t,"string");return Hd(r)=="symbol"?r:r+""}function Zye(t,r){if(Hd(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Hd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Wye=function(){function t(){Vye(this,t)}return Bye(t,[{key:"initialize",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=Yg(As().mark(function a(u){var l,c;return As().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=Yg(As().mark(function a(u){var l,c;return As().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workflowId,M.next=3,ia.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().startNewSession(u);case 2:if(l=f.sent,!l.error){f.next=5;break}return f.abrupt("return",l);case 5:return f.abrupt("return",new Promise(function(M){var d=function(N){M(N)};ia.getState().playWorkflow(d)}));case 6:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=Yg(As().mark(function a(){var u;return As().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),Kye=window.customElements.get("idv-flow");Kye||window.customElements.define("idv-flow",nG);var qye=Object.defineProperty,Jye=Object.defineProperties,Xye=Object.getOwnPropertyDescriptors,aG=Object.getOwnPropertySymbols,e3e=Object.prototype.hasOwnProperty,t3e=Object.prototype.propertyIsEnumerable,oG=(t,r,i)=>r in t?qye(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,kT=(t,r)=>{for(var i in r||(r={}))e3e.call(r,i)&&oG(t,i,r[i]);if(aG)for(var i of aG(r))t3e.call(r,i)&&oG(t,i,r[i]);return t},r3e=(t,r)=>Jye(t,Xye(r)),oo=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),uG=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function sG(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lG={exports:{}},Q0={},cG={exports:{}},Br={},fG;function n3e(){if(fG)return Br;fG=1;/**
62
+ `),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),OT=new Iye;function Ud(t){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ud(t)}function mn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Ud(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Ud(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function BB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Go(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){BB(l,a,u,c,f,"next",M)}function f(M){BB(l,a,u,c,f,"throw",M)}c(void 0)})}}function pye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yye(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,GB(a.key),a)}}function Nye(t,r,i){return r&&yye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pg(t,r,i){return(r=GB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function GB(t){var r=hye(t,"string");return Ud(r)=="symbol"?r:r+""}function hye(t,r){if(Ud(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Ud(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ao=OT.create("wasm_idv"),mye=function(){function t(r){pye(this,t),Pg(this,"_worker",null),Pg(this,"_initialized",!1),Pg(this,"_connectedToIdv",!1),Pg(this,"_serviceRunning",!1),Pg(this,"_userId",I0e(sge)),Pg(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return Nye(t,[{key:"init",value:function(){var r=Go(mn().mark(function a(){var u,l,c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/59f584f-6386586d1//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),ao("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/59f584f-6386586d1/",preMain:!0});case 23:return f=d.sent,f.code===0&&ao("Worker was created successfully"),d.abrupt("return",f);case 26:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Go(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:om.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(l=u.isSecure)!==null&&l!==void 0?l:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return c=M.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),ao("IdvWasmService result code: ".concat(c.code)),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Go(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:om.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,ao("Connection by URL result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Go(mn().mark(function a(u,l){var c,f;return mn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c={workflowId:u},l&&(p0e(l)?c.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),d.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:c,preMain:!0});case 4:return f=d.sent,ao("Start session result code: ".concat(f.code)),d.abrupt("return",f);case 7:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Go(mn().mark(function a(u){var l,c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,ao("Continue session result code: ".concat(c.code)),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Go(mn().mark(function a(){var u,l,c=arguments;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,ao("listWorkflows result code: ".concat(l.code)),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,ao("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getServiceToken",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,ao("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,ao("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Go(mn().mark(function a(u){var l;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,ao("getWorkflow result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Go(mn().mark(function a(u,l){var c;return mn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 2:return c=M.sent,ao("pushData result code: ".concat(c.code)),M.abrupt("return",c);case 5:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,ao("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,ao("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,ao("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Go(mn().mark(function a(u){var l=this;return mn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var N=I.data.target;if(N==="stdout"){ao(JSON.stringify(I.data.content));return}if(N==="custom"){var y=I.data,h=y.method,m=y.data;h==="onRuntimeInitialized"&&(l._initialized=!0),M(m)}if(N==="stderr"){var E=I.data.content;ao(JSON.stringify(E)),l._setErrorScreen&&l._setErrorScreen(E)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var r=Go(mn().mark(function a(){var u;return mn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()}])}();function Yd(t){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yd(t)}function ZB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function Qd(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?ZB(Object(i),!0).forEach(function(a){_T(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ZB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function _T(t,r,i){return(r=Eye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Eye(t){var r=Dye(t,"string");return Yd(r)=="symbol"?r:r+""}function Dye(t,r){if(Yd(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Yd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Yd(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Yd(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function WB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Rs(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){WB(l,a,u,c,f,"next",M)}function f(M){WB(l,a,u,c,f,"throw",M)}c(void 0)})}}var vye=OT.create("store_idv"),Tye=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Rs(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new mye,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(M=y.sent,d=null,M.code===4&&(d=Ld.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=Ld.PROVIDER_ERROR),d===null){y.next=12;break}return I=new p0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,M=null,f.code===4&&(M=Ld.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=Ld.PROVIDER_ERROR),M===null){y.next=13;break}return d=new p0({errorCode:M}),I=new Vp({errorCode:sm.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=Qd(Qd({},f.results),{},{sessionId:d}),N=Qd({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(N)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=Rs(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return c=i().externalModulesNames,N.prev=1,N.next=4,jye(c);case 4:return f=N.sent,r(function(){return{externalModules:f}}),N.abrupt("return",{});case 9:return N.prev=9,N.t0=N.catch(1),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new I0({errorCode:r0.MODULES_INSTANTIATION_FAILURE}),N.abrupt("return",{error:d});case 16:case"end":return N.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=ME(u.find(function(c){return c.templateId===lm}));l.templateLayout=NY(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Rs(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var h=Rs(ei().mark(function m(){var E,T,L,A;return ei().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,i().wasmService.pushData(c,f);case 2:if(E=C.sent,T=null,E.code===4&&(T=ks.HTTP_ISSUE),E.code!==0&&E.code!==4&&(T=ks.PROVIDER_ERROR),T!==null&&(L=new y0({errorCode:ks.HTTP_ISSUE}),A=new eu({errorCode:Xo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=A),E.code!==0){C.next=12;break}return M=null,C.abrupt("return",E);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),I=function(){return null},y.next=5,gE(d,I);case 5:return y.abrupt("return",M?{error:M}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=Rs(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var h=Rs(ei().mark(function m(){var E,T,L,A,j,C,b,k,V,B,Y,W,X,q,ee;return ei().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,i().wasmService.getSessionState();case 2:if(A=oe.sent,j=(E=A.data)===null||E===void 0?void 0:E.currentStep,C=(T=A.data)===null||T===void 0?void 0:T.isProcessingFiles,b=(L=A.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,k=M0e(b,j),V=A.code===4,B=A.code!==0&&A.code!==4,Y=A.code===0&&(!A.data.workflow||!A.data.currentStep),W=j&&j===c,X=null,b&&!k&&(X=ks.NOT_DATA_TYPE),V&&(X=ks.HTTP_ISSUE),B&&(X=ks.PROVIDER_ERROR),C&&(X=ks.IS_PROCESSING),W&&(X=ks.SAME_STEP),Y&&(X=ks.DECODING_FAILED),X!==null&&(q=new y0({errorCode:X}),ee=new eu({errorCode:Xo.INTERNAL_ISSUE,underlyingBaseError:q}),f=ee),vye(JSON.stringify({nextStep:j,isDataType:k,isProcessingFiles:C})),!(k&&!W&&!C&&!V&&!B&&!Y)){oe.next=23;break}return f=null,oe.abrupt("return",A.data);case 23:return oe.abrupt("return",null);case 24:case"end":return oe.stop()}},m)}));return function(){return h.apply(this,arguments)}}(),d=function(){return null},y.next=6,gE(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.currentStep});case 10:case"end":return y.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({eventType:e0.MESSAGE,message:t0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Rs(ei().mark(function l(c,f){var M,d,I,N,y,h,m,E;return ei().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof Rn)){L.next=10;break}return M=f,d=new eu({errorCode:Xo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(N=L.sent,!N.error){L.next=24;break}return i().workflowSessionCompletion({error:N.error}),i().resetSession(),L.abrupt("return");case 24:if(y=N.workflow,h=N.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),m=i()._findStepById(h),E=function(j){return!!j&&Object.prototype.toString.call(j)==="[object Object]"&&j.templateId},!(m!=null&&m.final&&!E(m.client))){L.next=34;break}return i().setFinalStepAndStopProcess(m.id),L.abrupt("return");case 34:m!=null&&m.final&&E(m.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(h),i().setIsProcessing(!1);case 37:case"end":return L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=Rs(ei().mark(function l(){var c,f,M,d,I,N,y,h,m,E,T,L,A;return ei().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){C.next=6;break}return C.abrupt("return",c);case 6:if(M){C.next=8;break}return C.abrupt("return",c);case 8:if(I=M.sessionId,N=M.workflowId,!(!I||N!==f.id)){C.next=11;break}return C.abrupt("return",c);case 11:return C.next=13,i().wasmService.continueSession(I);case 13:return y=C.sent,h=y.data,m=h.currentStep,"id"in h&&"currentStep"in h||(E=new Og({errorCode:Ag.DECODING_FAILED}),T=new eu({errorCode:Xo.START_SESSION_ERROR,underlyingBaseError:E}),c=Qd(Qd({},c),{},{error:T})),L=i()._findStepById(m),(L==null?void 0:L.final)===!1?(A=h.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(A),i().setCurrentSessionDataLsAndStore({sessionId:h.id,workflowId:N}),i().listener({eventType:e0.MESSAGE,message:t0.DID_START_RESTORE_SESSION,module:"IDV"}),c=Qd(Qd({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),C.abrupt("return",c);case 20:case"end":return C.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===lm)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,f.serviceToken=i().serviceToken}f&&f.templateLayout&&(f.templateLayout=NY(f.templateLayout,i().layout))}var I=f0e(i().externalModules,c.steps,u);if(f===null||!I){var N=new eu({errorCode:Xo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:N}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Rs(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function jye(t){return LT.apply(this,arguments)}function LT(){return LT=Rs(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:l1.getIdentifier(),supportedTemplates:l1.getSupportedTemplates(),component:l1}],a=_T(_T({},um.LIVENESS,function(){return Promise.resolve().then(()=>tBe)}),um.DOC_READER,function(){return Promise.resolve().then(()=>CSt)}),u=ei().mark(function I(){var N,y,h;return ei().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(N=c[l],y=function(){return a[N]()},!y){E.next=7;break}return E.next=5,y();case 5:h=E.sent,i.push({id:h.default.getIdentifier(),supportedTemplates:h.default.getSupportedTemplates(),component:h.default});case 7:case"end":return E.stop()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),LT.apply(this,arguments)}function R0(t){"@babel/helpers - typeof";return R0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R0(t)}function KB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function xT(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?KB(Object(i),!0).forEach(function(a){Aye(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):KB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Aye(t,r,i){return(r=Sye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Sye(t){var r=Cye(t,"string");return R0(r)=="symbol"?r:r+""}function Cye(t,r){if(R0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=a4e(function(){return xT(xT(xT({},m0e.apply(void 0,arguments)),w0e.apply(void 0,arguments)),Tye.apply(void 0,arguments))}),qB=function(r){var i=r.children;return qn.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:i})};function P0(t){"@babel/helpers - typeof";return P0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},P0(t)}function JB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function XB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?JB(Object(i),!0).forEach(function(a){Oye(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):JB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Oye(t,r,i){return(r=_ye(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function _ye(t){var r=Lye(t,"string");return P0(r)=="symbol"?r:r+""}function Lye(t,r){if(P0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var xye=function(){var r=ia(function(m){return m.currentScreenConfig}),i=ia(function(m){return m.pushStepWaitNextStepAndSet}),a=ia(function(m){return m.proccessingTransformedTemplate}),u=ia(function(m){return m.isProcessing}),l=ia(function(m){return m.setIsProcessing}),c=ia(function(m){return m.currentStepId}),f=ia(function(m){return m.listener}),M=ia(function(m){return m.externalModules}),d=ia(function(m){return m.modulesConfig}),I=function(E,T){f({eventType:e0.MESSAGE,message:T,module:E})},N=function(E){l(E)},y=function(E){c&&(l(!1),i(c,E))},h=Jn.useCallback(function(){if(!r)return null;var m=M.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(m&&r)return qn.jsx(m.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:N})},[r,M]);return!r&&!a?qn.jsx(mm,{direction:Rp.Ltr,children:qn.jsx(qB,{children:"Waiting for play... or process completed"})}):qn.jsx(qn.Fragment,{children:qn.jsx(mm,{direction:Rp.Ltr,children:qn.jsxs(qn.Fragment,{children:[u&&qn.jsx(qB,{children:a?qn.jsx(l1,{perform:y,moduleProps:XB(XB({},a),{},{templateId:"PROGRESS"}),idvEventListener:I,isProcessing:N}):"Processing..."}),h()]})})})};function wye(){return qn.jsx(Jn.StrictMode,{children:qn.jsx(bge,{children:qn.jsx(xye,{})})})}function Ug(t){"@babel/helpers - typeof";return Ug=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ug(t)}function bye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function eG(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,rG(a.key),a)}}function kye(t,r,i){return r&&eG(t.prototype,r),i&&eG(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function zye(t,r,i){return r=Y0(r),Rye(t,bT()?Reflect.construct(r,[],Y0(t).constructor):r.apply(t,i))}function Rye(t,r){if(r&&(Ug(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pye(t)}function Pye(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uye(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&U0(t,r)}function wT(t){var r=typeof Map=="function"?new Map:void 0;return wT=function(a){if(a===null||!Qye(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return Yye(a,arguments,Y0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),U0(u,a)},wT(t)}function Yye(t,r,i){if(bT())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&U0(u,i.prototype),u}function bT(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(bT=function(){return!!t})()}function Qye(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function U0(t,r){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},U0(t,r)}function Y0(t){return Y0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Y0(t)}function tG(t,r,i){return(r=rG(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function rG(t){var r=Hye(t,"string");return Ug(r)=="symbol"?r:r+""}function Hye(t,r){if(Ug(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Ug(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Fye="*,::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%}",nG=function(t){function r(){var i;return bye(this,r),i=zye(this,r),tG(i,"_root",rge.createRoot(i.attachShadow({mode:"open"}))),tG(i,"_mounted",!1),i}return Uye(r,t),kye(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(qn.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[qn.jsx("style",{nonce:ia.getState().getNonce(),children:Fye}),qn.jsx(wye,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OT.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(wT(HTMLElement));function Hd(t){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hd(t)}function As(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */As=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,x,_){z[x]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(z,x,_){return Object.defineProperty(z,x,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[x]}try{d({},"")}catch(z){d=function(_,P,Q){return _[P]=Q}}function I(z,x,_,P){var Q=x&&x.prototype instanceof L?x:L,S=Object.create(Q.prototype),F=new ae(P||[]);return u(S,"_invoke",{value:W(z,_,F)}),S}function N(z,x,_){try{return{type:"normal",arg:z.call(x,_)}}catch(P){return{type:"throw",arg:P}}}r.wrap=I;var y="suspendedStart",h="suspendedYield",m="executing",E="completed",T={};function L(){}function A(){}function j(){}var C={};d(C,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(oe([])));k&&k!==i&&a.call(k,c)&&(C=k);var V=j.prototype=L.prototype=Object.create(C);function B(z){["next","throw","return"].forEach(function(x){d(z,x,function(_){return this._invoke(x,_)})})}function Y(z,x){function _(Q,S,F,fe){var Me=N(z[Q],z,S);if(Me.type!=="throw"){var se=Me.arg,Ee=se.value;return Ee&&Hd(Ee)=="object"&&a.call(Ee,"__await")?x.resolve(Ee.__await).then(function(Ce){_("next",Ce,F,fe)},function(Ce){_("throw",Ce,F,fe)}):x.resolve(Ee).then(function(Ce){se.value=Ce,F(se)},function(Ce){return _("throw",Ce,F,fe)})}fe(Me.arg)}var P;u(this,"_invoke",{value:function(S,F){function fe(){return new x(function(Me,se){_(S,F,Me,se)})}return P=P?P.then(fe,fe):fe()}})}function W(z,x,_){var P=y;return function(Q,S){if(P===m)throw Error("Generator is already running");if(P===E){if(Q==="throw")throw S;return{value:t,done:!0}}for(_.method=Q,_.arg=S;;){var F=_.delegate;if(F){var fe=X(F,_);if(fe){if(fe===T)continue;return fe}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=E,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=m;var Me=N(z,x,_);if(Me.type==="normal"){if(P=_.done?E:h,Me.arg===T)continue;return{value:Me.arg,done:_.done}}Me.type==="throw"&&(P=E,_.method="throw",_.arg=Me.arg)}}}function X(z,x){var _=x.method,P=z.iterator[_];if(P===t)return x.delegate=null,_==="throw"&&z.iterator.return&&(x.method="return",x.arg=t,X(z,x),x.method==="throw")||_!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+_+"' method")),T;var Q=N(P,z.iterator,x.arg);if(Q.type==="throw")return x.method="throw",x.arg=Q.arg,x.delegate=null,T;var S=Q.arg;return S?S.done?(x[z.resultName]=S.value,x.next=z.nextLoc,x.method!=="return"&&(x.method="next",x.arg=t),x.delegate=null,T):S:(x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,T)}function q(z){var x={tryLoc:z[0]};1 in z&&(x.catchLoc=z[1]),2 in z&&(x.finallyLoc=z[2],x.afterLoc=z[3]),this.tryEntries.push(x)}function ee(z){var x=z.completion||{};x.type="normal",delete x.arg,z.completion=x}function ae(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(q,this),this.reset(!0)}function oe(z){if(z||z===""){var x=z[c];if(x)return x.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,P=function Q(){for(;++_<z.length;)if(a.call(z,_))return Q.value=z[_],Q.done=!1,Q;return Q.value=t,Q.done=!0,Q};return P.next=P}}throw new TypeError(Hd(z)+" is not iterable")}return A.prototype=j,u(V,"constructor",{value:j,configurable:!0}),u(j,"constructor",{value:A,configurable:!0}),A.displayName=d(j,M,"GeneratorFunction"),r.isGeneratorFunction=function(z){var x=typeof z=="function"&&z.constructor;return!!x&&(x===A||(x.displayName||x.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,j):(z.__proto__=j,d(z,M,"GeneratorFunction")),z.prototype=Object.create(V),z},r.awrap=function(z){return{__await:z}},B(Y.prototype),d(Y.prototype,f,function(){return this}),r.AsyncIterator=Y,r.async=function(z,x,_,P,Q){Q===void 0&&(Q=Promise);var S=new Y(I(z,x,_,P),Q);return r.isGeneratorFunction(x)?S:S.next().then(function(F){return F.done?F.value:S.next()})},B(V),d(V,M,"Generator"),d(V,c,function(){return this}),d(V,"toString",function(){return"[object Generator]"}),r.keys=function(z){var x=Object(z),_=[];for(var P in x)_.push(P);return _.reverse(),function Q(){for(;_.length;){var S=_.pop();if(S in x)return Q.value=S,Q.done=!1,Q}return Q.done=!0,Q}},r.values=oe,ae.prototype={constructor:ae,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ee),!x)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function P(se,Ee){return F.type="throw",F.arg=x,_.next=se,Ee&&(_.method="next",_.arg=t),!!Ee}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var S=this.tryEntries[Q],F=S.completion;if(S.tryLoc==="root")return P("end");if(S.tryLoc<=this.prev){var fe=a.call(S,"catchLoc"),Me=a.call(S,"finallyLoc");if(fe&&Me){if(this.prev<S.catchLoc)return P(S.catchLoc,!0);if(this.prev<S.finallyLoc)return P(S.finallyLoc)}else if(fe){if(this.prev<S.catchLoc)return P(S.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return P(S.finallyLoc)}}}},abrupt:function(x,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Q=this.tryEntries[P];if(Q.tryLoc<=this.prev&&a.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var S=Q;break}}S&&(x==="break"||x==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var F=S?S.completion:{};return F.type=x,F.arg=_,S?(this.method="next",this.next=S.finallyLoc,T):this.complete(F)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),T},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===x)return this.complete(P.completion,P.afterLoc),ee(P),T}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===x){var Q=P.completion;if(Q.type==="throw"){var S=Q.arg;ee(P)}return S}}throw Error("illegal catch attempt")},delegateYield:function(x,_,P){return this.delegate={iterator:oe(x),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=t),T}},r}function iG(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Yg(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){iG(l,a,u,c,f,"next",M)}function f(M){iG(l,a,u,c,f,"throw",M)}c(void 0)})}}function Vye(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function $ye(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Gye(a.key),a)}}function Bye(t,r,i){return r&&$ye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gye(t){var r=Zye(t,"string");return Hd(r)=="symbol"?r:r+""}function Zye(t,r){if(Hd(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(Hd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Wye=function(){function t(){Vye(this,t)}return Bye(t,[{key:"initialize",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=Yg(As().mark(function a(u){var l,c;return As().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=Yg(As().mark(function a(u){var l,c;return As().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workflowId,M.next=3,ia.getState().prepareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=Yg(As().mark(function a(u){var l;return As().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.getState().startNewSession(u);case 2:if(l=f.sent,!l.error){f.next=5;break}return f.abrupt("return",l);case 5:return f.abrupt("return",new Promise(function(M){var d=function(N){M(N)};ia.getState().playWorkflow(d)}));case 6:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=Yg(As().mark(function a(){var u;return As().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),Kye=window.customElements.get("idv-flow");Kye||window.customElements.define("idv-flow",nG);var qye=Object.defineProperty,Jye=Object.defineProperties,Xye=Object.getOwnPropertyDescriptors,aG=Object.getOwnPropertySymbols,e3e=Object.prototype.hasOwnProperty,t3e=Object.prototype.propertyIsEnumerable,oG=(t,r,i)=>r in t?qye(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,kT=(t,r)=>{for(var i in r||(r={}))e3e.call(r,i)&&oG(t,i,r[i]);if(aG)for(var i of aG(r))t3e.call(r,i)&&oG(t,i,r[i]);return t},r3e=(t,r)=>Jye(t,Xye(r)),oo=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),uG=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function sG(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lG={exports:{}},Q0={},cG={exports:{}},Br={},fG;function n3e(){if(fG)return Br;fG=1;/**
63
63
  * @license React
64
64
  * react.production.min.js
65
65
  *
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-B6kx6RhW.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-DGIh-wu6.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.126-nightly",
3
+ "version": "2.3.127-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",