@regulaforensics/idv-capture-web 3.6.433-nightly → 3.6.436-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.iife.js CHANGED
@@ -19,7 +19,7 @@ __p += '`),r&&(m+=`' +
19
19
  function print() { __p += __j.call(arguments, '') }
20
20
  `:`;
21
21
  `)+m+`return __p
22
- }`;var v=wf(function(){return wt(o,g+`return `+m).apply(n,l)});if(v.source=m,Tu(v))throw v;return v}function $(e){return X(e).toLowerCase()}function hf(e){return X(e).toUpperCase()}function gf(e,t,r){if(e=X(e),e&&(r||t===n))return cr(e);if(!e||!(t=Ga(t)))return e;var i=Ar(e),a=Ar(t);return ro(i,fr(i,a),pr(i,a)+1).join(``)}function _f(e,t,r){if(e=X(e),e&&(r||t===n))return e.slice(0,jr(e)+1);if(!e||!(t=Ga(t)))return e;var i=Ar(e);return ro(i,0,pr(i,Ar(t))+1).join(``)}function vf(e,t,r){if(e=X(e),e&&(r||t===n))return e.replace(ot,``);if(!e||!(t=Ga(t)))return e;var i=Ar(e);return ro(i,fr(i,Ar(t))).join(``)}function yf(e,t){var r=D,i=ee;if(Au(t)){var a=`separator`in t?t.separator:a;r=`length`in t?Y(t.length):r,i=`omission`in t?Ga(t.omission):i}e=X(e);var o=e.length;if(yr(e)){var s=Ar(e);o=s.length}if(r>=o)return e;var c=r-kr(i);if(c<1)return i;var l=s?ro(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),Vu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=Et(a.source,X(mt.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Ga(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function bf(e){return e=X(e),e&&Xe.test(e)?e.replace(Je,Mr):e}var xf=To(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),Sf=wo(`toUpperCase`);function Cf(e,t,r){return e=X(e),t=r?n:t,t===n?br(e)?Fr(e):Jn(e):e.match(t)||[]}var wf=V(function(e,t){try{return Nn(e,n,t)}catch(e){return Tu(e)?e:new Ct(e)}}),Tf=qo(function(e,t){return Fn(t,function(t){t=Rs(t),ki(e,t,zl(e[t],e))}),e});function Ef(e){var t=e==null?0:e.length,n=K();return e=t?Vn(e,function(e){if(typeof e[1]!=`function`)throw new Ot(o);return[n(e[0]),e[1]]}):[],V(function(n){for(var r=-1;++r<t;){var i=e[r];if(Nn(i[0],this,n))return Nn(i[1],this,n)}})}function Df(e){return Ni(Mi(e,f))}function Of(e){return function(){return e}}function kf(e,t){return e==null||e!==e?t:e}var Af=ko(),jf=ko(!0);function Mf(e){return e}function Nf(e){return ha(typeof e==`function`?e:Mi(e,f))}function Pf(e){return ba(Mi(e,f))}function Ff(e,t){return xa(e,Mi(t,f))}var If=V(function(e,t){return function(n){return ia(n,e,t)}}),Lf=V(function(e,t){return function(n){return ia(e,n,t)}});function Rf(e,t,n){var r=Ed(t),i=Ji(t,r);n==null&&!(Au(t)&&(i.length||!r.length))&&(n=t,t=e,e=this,i=Ji(t,Ed(t)));var a=!(Au(n)&&`chain`in n)||!!n.chain,o=Du(e);return Fn(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Hn([this.value()],arguments))})}),e}function zf(){return Sn._===this&&(Sn._=Rt),this}function Bf(){}function Vf(e){return e=Y(e),V(function(t){return wa(t,e)})}var Hf=Mo(Vn),Uf=Mo(Ln),Wf=Mo(Gn);function Gf(e){return gs(e)?tr(Rs(e)):Oa(e)}function Kf(e){return function(t){return e==null?n:Yi(e,t)}}var qf=Fo(),Jf=Fo(!0);function Yf(){return[]}function Xf(){return!1}function Zf(){return{}}function Qf(){return``}function $f(){return!0}function ep(e,t){if(e=Y(e),e<1||e>ae)return[];var n=ce,r=mn(e,ce);t=K(t),e-=ce;for(var i=or(r,t);++n<e;)t(n);return i}function tp(e){return J(e)?Vn(e,Rs):Gu(e)?[e]:go(Ls(X(e)))}function np(e){var t=++Pt;return X(e)+t}var rp=jo(function(e,t){return e+t},0),ip=Ro(`ceil`),ap=jo(function(e,t){return e/t},1),op=Ro(`floor`);function sp(e){return e&&e.length?Bi(e,Mf,Qi):n}function cp(e,t){return e&&e.length?Bi(e,K(t,2),Qi):n}function lp(e){return er(e,Mf)}function up(e,t){return er(e,K(t,2))}function dp(e){return e&&e.length?Bi(e,Mf,va):n}function fp(e,t){return e&&e.length?Bi(e,K(t,2),va):n}var pp=jo(function(e,t){return e*t},1),mp=Ro(`round`),hp=jo(function(e,t){return e-t},0);function gp(e){return e&&e.length?ar(e,Mf):0}function _p(e,t){return e&&e.length?ar(e,K(t,2)):0}return L.after=Il,L.ary=Ll,L.assign=id,L.assignIn=ad,L.assignInWith=od,L.assignWith=sd,L.at=cd,L.before=Rl,L.bind=zl,L.bindAll=Tf,L.bindKey=Bl,L.castArray=au,L.chain=Qc,L.chunk=Hs,L.compact=Us,L.concat=Ws,L.cond=Ef,L.conforms=Df,L.constant=Of,L.countBy=ll,L.create=ld,L.curry=Vl,L.curryRight=Hl,L.debounce=Ul,L.defaults=ud,L.defaultsDeep=dd,L.defer=Wl,L.delay=Gl,L.difference=Gs,L.differenceBy=Ks,L.differenceWith=qs,L.drop=Js,L.dropRight=Ys,L.dropRightWhile=Xs,L.dropWhile=Zs,L.fill=Qs,L.filter=dl,L.flatMap=ml,L.flatMapDeep=hl,L.flatMapDepth=gl,L.flatten=tc,L.flattenDeep=nc,L.flattenDepth=rc,L.flip=Kl,L.flow=Af,L.flowRight=jf,L.fromPairs=ic,L.functions=vd,L.functionsIn=yd,L.groupBy=yl,L.initial=sc,L.intersection=cc,L.intersectionBy=lc,L.intersectionWith=uc,L.invert=Cd,L.invertBy=wd,L.invokeMap=xl,L.iteratee=Nf,L.keyBy=Sl,L.keys=Ed,L.keysIn=Dd,L.map=Cl,L.mapKeys=Od,L.mapValues=kd,L.matches=Pf,L.matchesProperty=Ff,L.memoize=ql,L.merge=Ad,L.mergeWith=jd,L.method=If,L.methodOf=Lf,L.mixin=Rf,L.negate=Jl,L.nthArg=Vf,L.omit=Md,L.omitBy=Nd,L.once=Yl,L.orderBy=wl,L.over=Hf,L.overArgs=Xl,L.overEvery=Uf,L.overSome=Wf,L.partial=Zl,L.partialRight=Ql,L.partition=Tl,L.pick=Pd,L.pickBy=Fd,L.property=Gf,L.propertyOf=Kf,L.pull=hc,L.pullAll=gc,L.pullAllBy=_c,L.pullAllWith=vc,L.pullAt=yc,L.range=qf,L.rangeRight=Jf,L.rearg=$l,L.reject=Ol,L.remove=bc,L.rest=eu,L.reverse=xc,L.sampleSize=Al,L.set=Ld,L.setWith=Rd,L.shuffle=jl,L.slice=Sc,L.sortBy=Pl,L.sortedUniq=kc,L.sortedUniqBy=Ac,L.split=ff,L.spread=tu,L.tail=jc,L.take=Mc,L.takeRight=Nc,L.takeRightWhile=Pc,L.takeWhile=Fc,L.tap=$c,L.throttle=nu,L.thru=el,L.toArray=Qu,L.toPairs=zd,L.toPairsIn=Bd,L.toPath=tp,L.toPlainObject=nd,L.transform=Vd,L.unary=ru,L.union=Ic,L.unionBy=Lc,L.unionWith=Rc,L.uniq=zc,L.uniqBy=Bc,L.uniqWith=Vc,L.unset=Hd,L.unzip=Hc,L.unzipWith=Uc,L.update=Ud,L.updateWith=Wd,L.values=Gd,L.valuesIn=Kd,L.without=Wc,L.words=Cf,L.wrap=iu,L.xor=Gc,L.xorBy=Kc,L.xorWith=qc,L.zip=Jc,L.zipObject=Yc,L.zipObjectDeep=Xc,L.zipWith=Zc,L.entries=zd,L.entriesIn=Bd,L.extend=ad,L.extendWith=od,Rf(L,L),L.add=rp,L.attempt=wf,L.camelCase=Xd,L.capitalize=Zd,L.ceil=ip,L.clamp=qd,L.clone=ou,L.cloneDeep=cu,L.cloneDeepWith=lu,L.cloneWith=su,L.conformsTo=uu,L.deburr=Qd,L.defaultTo=kf,L.divide=ap,L.endsWith=$d,L.eq=du,L.escape=ef,L.escapeRegExp=tf,L.every=ul,L.find=fl,L.findIndex=$s,L.findKey=fd,L.findLast=pl,L.findLastIndex=ec,L.findLastKey=pd,L.floor=op,L.forEach=_l,L.forEachRight=vl,L.forIn=md,L.forInRight=hd,L.forOwn=gd,L.forOwnRight=_d,L.get=bd,L.gt=fu,L.gte=pu,L.has=xd,L.hasIn=Sd,L.head=ac,L.identity=Mf,L.includes=bl,L.indexOf=oc,L.inRange=Jd,L.invoke=Td,L.isArguments=mu,L.isArray=J,L.isArrayBuffer=hu,L.isArrayLike=gu,L.isArrayLikeObject=_u,L.isBoolean=vu,L.isBuffer=yu,L.isDate=bu,L.isElement=xu,L.isEmpty=Su,L.isEqual=Cu,L.isEqualWith=wu,L.isError=Tu,L.isFinite=Eu,L.isFunction=Du,L.isInteger=Ou,L.isLength=ku,L.isMap=Mu,L.isMatch=Nu,L.isMatchWith=Pu,L.isNaN=Fu,L.isNative=Iu,L.isNil=Ru,L.isNull=Lu,L.isNumber=zu,L.isObject=Au,L.isObjectLike=ju,L.isPlainObject=Bu,L.isRegExp=Vu,L.isSafeInteger=Hu,L.isSet=Uu,L.isString=Wu,L.isSymbol=Gu,L.isTypedArray=Ku,L.isUndefined=qu,L.isWeakMap=Ju,L.isWeakSet=Yu,L.join=dc,L.kebabCase=nf,L.last=fc,L.lastIndexOf=pc,L.lowerCase=rf,L.lowerFirst=Z,L.lt=Xu,L.lte=Zu,L.max=sp,L.maxBy=cp,L.mean=lp,L.meanBy=up,L.min=dp,L.minBy=fp,L.stubArray=Yf,L.stubFalse=Xf,L.stubObject=Zf,L.stubString=Qf,L.stubTrue=$f,L.multiply=pp,L.nth=mc,L.noConflict=zf,L.noop=Bf,L.now=Fl,L.pad=af,L.padEnd=of,L.padStart=sf,L.parseInt=cf,L.random=Yd,L.reduce=El,L.reduceRight=Dl,L.repeat=lf,L.replace=uf,L.result=Id,L.round=mp,L.runInContext=e,L.sample=kl,L.size=Ml,L.snakeCase=df,L.some=Nl,L.sortedIndex=Cc,L.sortedIndexBy=wc,L.sortedIndexOf=Tc,L.sortedLastIndex=Ec,L.sortedLastIndexBy=Dc,L.sortedLastIndexOf=Oc,L.startCase=pf,L.startsWith=mf,L.subtract=hp,L.sum=gp,L.sumBy=_p,L.template=Q,L.times=ep,L.toFinite=$u,L.toInteger=Y,L.toLength=ed,L.toLower=$,L.toNumber=td,L.toSafeInteger=rd,L.toString=X,L.toUpper=hf,L.trim=gf,L.trimEnd=_f,L.trimStart=vf,L.truncate=yf,L.unescape=bf,L.uniqueId=np,L.upperCase=xf,L.upperFirst=Sf,L.each=_l,L.eachRight=vl,L.first=ac,Rf(L,function(){var e={};return Ki(L,function(t,n){M.call(L.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),L.VERSION=r,Fn([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){L[e].placeholder=L}),Fn([`drop`,`take`],function(e,t){R.prototype[e]=function(r){r=r===n?1:P(Y(r),0);var i=this.__filtered__&&!t?new R(this):this.clone();return i.__filtered__?i.__takeCount__=mn(r,i.__takeCount__):i.__views__.push({size:mn(r,ce),type:e+(i.__dir__<0?`Right`:``)}),i},R.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),Fn([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==ne||n==re;R.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:K(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Fn([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);R.prototype[e]=function(){return this[n](1).value()[0]}}),Fn([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);R.prototype[e]=function(){return this.__filtered__?new R(this):this[n](1)}}),R.prototype.compact=function(){return this.filter(Mf)},R.prototype.find=function(e){return this.filter(e).head()},R.prototype.findLast=function(e){return this.reverse().find(e)},R.prototype.invokeMap=V(function(e,t){return typeof e==`function`?new R(this):this.map(function(n){return ia(n,e,t)})}),R.prototype.reject=function(e){return this.filter(Jl(K(e)))},R.prototype.slice=function(e,t){e=Y(e);var r=this;return r.__filtered__&&(e>0||t<0)?new R(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=Y(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},R.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},R.prototype.toArray=function(){return this.take(ce)},Ki(R.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=L[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(L.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof R,l=s[0],u=c||J(t),d=function(e){var t=a.apply(L,Hn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new R(this);var g=e.apply(t,s);return g.__actions__.push({func:el,args:[d],thisArg:n}),new Ur(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),Fn([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=kt[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);L.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(J(i)?i:[],e)}return this[n](function(n){return t.apply(J(n)?n:[],e)})}}),Ki(R.prototype,function(e,t){var n=L[t];if(n){var r=n.name+``;M.call(nr,r)||(nr[r]=[]),nr[r].push({name:t,func:n})}}),nr[W(n,v).name]=[{name:`wrapper`,func:n}],R.prototype.clone=Wr,R.prototype.reverse=Gr,R.prototype.value=Kr,L.prototype.at=tl,L.prototype.chain=nl,L.prototype.commit=rl,L.prototype.next=il,L.prototype.plant=ol,L.prototype.reverse=sl,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=cl,L.prototype.first=L.prototype.head,Jt&&(L.prototype[Jt]=al),L})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(Sn._=Ir,define(function(){return Ir})):wn?((wn.exports=Ir)._=Ir,Cn._=Ir):Sn._=Ir}).call(e)})),Gr=[];for(let e=0;e<256;++e)Gr.push((e+256).toString(16).slice(1));function Kr(e,t=0){return(Gr[e[t+0]]+Gr[e[t+1]]+Gr[e[t+2]]+Gr[e[t+3]]+`-`+Gr[e[t+4]]+Gr[e[t+5]]+`-`+Gr[e[t+6]]+Gr[e[t+7]]+`-`+Gr[e[t+8]]+Gr[e[t+9]]+`-`+Gr[e[t+10]]+Gr[e[t+11]]+Gr[e[t+12]]+Gr[e[t+13]]+Gr[e[t+14]]+Gr[e[t+15]]).toLowerCase()}var qr=new Uint8Array(16);function Jr(){return crypto.getRandomValues(qr)}function Yr(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Xr(e,t,n)}function Xr(e,t,n){var r,i,a;e=e||{};let o=(r=(i=e.random)==null?(a=e.rng)==null?void 0:a.call(e):i)==null?Jr():r;if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return Kr(o)}var Zr=R(),Qr=Wr(),$r={MESSAGE:`MESSAGE`,ERROR:`ERROR`},z=function(e){return e.DEBUG=`DEBUG`,e.ERROR=`ERROR`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.CRITICAL=`CRITICAL`,e}({}),ei=function(e){return e.INFO=`INFO`,e}({}),ti=Object.values({DATA:`DATA`,QUESTIONARY:`QUESTIONARY`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,DEVICE_TRANSFER:`DEVICE_TRANSFER`}),ni={DATA:`DATA`,PROCESSING:`PROCESSING`,QUESTIONARY:`QUESTIONARY`,GEOLOCATION:`GEOLOCATION`,FILE_UPLOAD:`FILE_UPLOAD`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,LOGIN:`LOGIN`,IAM_CONSENT:`IAM_CONSENT`,IAM_AUTH_CODE:`IAM_AUTH_CODE`},ri=function(e){return e.DID_START_SESSION=`DID_START_SESSION`,e.DID_END_SESSION=`DID_END_SESSION`,e.DID_START_RESTORE_SESSION=`DID_START_RESTORE_SESSION`,e.DID_CONTINUE_REMOTE_SESSION=`DID_CONTINUE_REMOTE_SESSION`,e}({}),ii=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.CONNECTION_ISSUE=1]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=2]=`WORKFLOW_ISSUE`,e[e.INTERNAL_ISSUE=3]=`INTERNAL_ISSUE`,e[e.SCENARIO_IN_PROGRESS=4]=`SCENARIO_IN_PROGRESS`,e}({}),ai=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.CONFIG_MISSED_OR_INVALID=1]=`CONFIG_MISSED_OR_INVALID`,e[e.INITIALIZATION_REQUIRED=2]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),oi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.PREPARED_REQUIRED=1]=`PREPARED_REQUIRED`,e[e.START_SESSION_FAILED=2]=`START_SESSION_FAILED`,e[e.UNKNOWN_STEP=3]=`UNKNOWN_STEP`,e[e.MODULES_ISSUE=4]=`MODULES_ISSUE`,e[e.ALREADY_STARTED=5]=`ALREADY_STARTED`,e[e.INTERNAL_ISSUE=6]=`INTERNAL_ISSUE`,e}({}),si=function(e){return e[e.CONFIG_MISSED_OR_INVALID=0]=`CONFIG_MISSED_OR_INVALID`,e[e.MODULES_INSTANTIATION_FAILURE=1]=`MODULES_INSTANTIATION_FAILURE`,e[e.INITIALIZATION_IN_PROGRESS=2]=`INITIALIZATION_IN_PROGRESS`,e}({}),ci=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=1]=`WORKFLOW_ISSUE`,e}({}),li=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),ui=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.TOKEN_ERROR=3]=`TOKEN_ERROR`,e[e.CONNECTION_ISSUE=4]=`CONNECTION_ISSUE`,e}({}),di=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.SAME_STEP=3]=`SAME_STEP`,e[e.IS_PROCESSING=4]=`IS_PROCESSING`,e[e.NOT_DATA_TYPE=5]=`NOT_DATA_TYPE`,e}({}),fi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),pi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),mi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.ALREADY_IN_PROCESS=1]=`ALREADY_IN_PROCESS`,e[e.START_COMMAND_FAILURE=2]=`START_COMMAND_FAILURE`,e[e.MISSING_CONFIGURATION=3]=`MISSING_CONFIGURATION`,e[e.PREPARE_WORKFLOW_FAILURE=4]=`PREPARE_WORKFLOW_FAILURE`,e[e.EXECUTION_WORKFLOW_FAILURE=5]=`EXECUTION_WORKFLOW_FAILURE`,e[e.MISSING_AUTH_CODE=6]=`MISSING_AUTH_CODE`,e[e.AUTH_FAILURE=7]=`AUTH_FAILURE`,e}({}),hi=function(e){return e[e.SUCCESS=0]=`SUCCESS`,e[e.ERROR=1]=`ERROR`,e}({}),gi=`PROGRESS`,_i=`idv-session-data`,vi=`idv-session-auth-token`,yi=`rgl-uid`,bi=(e,t)=>xi(e,t),xi=(e,t)=>{let n=Si(e,t);for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let r=n[e];typeof r==`object`&&r&&!Array.isArray(r)?n[e]=xi(r,t):Array.isArray(r)&&(n[e]=r.map(e=>typeof e==`object`&&e?xi(e,t):e))}return n},Si=(e,t)=>{let n=Ci(e),r=e.layout;if(!r||r.length===0)return n;let i=null;if(r.forEach(e=>{let n=t[e];i?n&&wi(n,i):i=n}),i){let e=Si(i,t);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];Object.prototype.hasOwnProperty.call(n,t)||(n[t]=r)}}return n},Ci=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()!==`layout`&&(t[n]=e[n]);return t},wi=(e,t)=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function Ti(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return console.warn(`Failed to copy object:`,e),null}}var Ei=(e,t)=>{if(!e||!t)return null;let n=null;return n=Ti(e),n&&(n=bi(n,t)),n};function Di(e){return Oi.apply(this,arguments)}function Oi(){return Oi=b(function*(e){return new Promise(t=>setTimeout(t,e))}),Oi.apply(this,arguments)}function ki(e,t){return Ai.apply(this,arguments)}function Ai(){return Ai=b(function*(e,t,n=120,r=200){let i=0;for(;i<n;){let t=yield e();if(t!==null)return t;i++,i<n&&(yield Di(r))}return t()}),Ai.apply(this,arguments)}var ji=(e,t,n)=>{let r=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),i=t.find(e=>e.id===n);return r.includes(i==null?void 0:i.client.templateId)},Mi=e=>e?e.type===ni.PROCESSING:!1,Ni=e=>(e==null?void 0:e.isProcessingFiles)||Mi(e.workflow.steps[0]),Pi=(e,t)=>{let n=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),r=Array.from(new Set(t.filter(e=>!e.releaseClientApp&&ti.includes(e.type)).map(e=>e.client.templateId)));function i(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}let a=i(n,r);return{isAllTemplatesSupported:a.length===0,unsupportedSteps:a.length>0?a:void 0}},Fi={setAuthTokenToLs:({apiKey:e,authToken:t,tokenExpiresAt:n,sessionId:r,workflowId:i})=>{let a=localStorage.getItem(vi),o=a?JSON.parse(a):{};o[e]={authToken:t,tokenExpiresAt:n,workflowId:i,sessionId:r},localStorage.setItem(vi,JSON.stringify(o))},getAuthTokenLs:()=>{let e=localStorage.getItem(vi);if(!e)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch(e){return null}},removeAuthTokenLs:e=>{if(!e)return!1;let t=localStorage.getItem(vi);if(!t)return!1;try{let n=JSON.parse(t);return Object.prototype.hasOwnProperty.call(n,e)?(delete n[e],localStorage.setItem(vi,JSON.stringify(n)),!0):!1}catch(e){return!1}}},Ii=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Li=e=>/^[^:{}\s]+:[^:{}\s]+$/.test(e),Ri={setSessionIdWorkflowIdToLs:(e,t)=>{let n=localStorage.getItem(_i),r={};if(n)try{let e=JSON.parse(n);Ii(e)&&(r=e)}catch(e){if(Li(n)){let[e,t]=n.split(`:`);e&&t&&(r={[t]:e})}}r[t]=e,localStorage.setItem(_i,JSON.stringify(r))},getSessionIdWorkflowIdFromLS:()=>{let e=localStorage.getItem(_i);if(!e)return null;try{let t=JSON.parse(e);return Ii(t)?t:null}catch(t){if(Li(e)){let[t,n]=e.split(`:`);if(t&&n)return{[n]:t}}return null}},removeSessionIdWorkflowIdFromLS:e=>{let t=localStorage.getItem(_i);if(!t)return!1;if(!e)return localStorage.removeItem(_i),!0;try{let n=JSON.parse(t);if(!Ii(n))return!1;let r=n;return Object.prototype.hasOwnProperty.call(r,e)?(delete r[e],localStorage.setItem(_i,JSON.stringify(r)),!0):!1}catch(n){if(Li(t)){let[,n]=t.split(`:`);return n===e?(localStorage.removeItem(_i),!0):!1}return!1}}},zi=e=>{let t,n=Yr();try{var r;t=(r=window.localStorage.getItem(e))==null?n:r,window.localStorage.setItem(e,t)}catch(e){t=n}return t};function Bi(e){return Object.prototype.toString.call(e)===`[object Object]`&&Object.keys(e).length>0}function Vi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function Hi(){return typeof document>`u`?null:document.documentElement.getAttribute(`lang`)||null}function Ui(){return typeof navigator<`u`?navigator.language:null}var Wi=e=>{let t=typeof e==`string`?e:null,n=Hi(),r=Ui();return t||n||r||`en`},Gi=e=>{try{return new URL(e).searchParams.get(`sessionId`)}catch(e){return null}};function Ki(e){try{let t=e;!e.includes(`://`)&&e.includes(`.`)&&(t=`http://${e}`);let n=new URL(t);return{host:n.hostname,isSecure:n.protocol===`https:`,port:n.port?parseInt(n.port,10):void 0}}catch(e){return null}}var qi=()=>{if(typeof window>`u`)return`SERVER_SIDE_RENDERING`;if(!document.referrer)return window.location.origin;try{return new URL(document.referrer).origin}catch(e){return window.location.origin}},Ji=e=>{var t;let n=zi(yi),r={deviceId:n,metadata:{platform:`browser`,osVersion:`${Zr.osVersion}`,hostAppId:qi(),host:qi(),sdkVersion:(t=`3.6.433-nightly`)==null?void 0:t.trim(),name:navigator.userAgent,deviceModel:`${Zr.osName}/${Zr.osVersion} ${Zr.browserName}/${Zr.fullBrowserVersion}`,hostAppVersion:`${Zr.browserName}/${Zr.fullBrowserVersion}`,userID:n},deviceType:`browser`};return e&&e instanceof Object&&Object.keys(e).length>0&&(r.customMetadata=e),r};function Yi(){return Xi.apply(this,arguments)}function Xi(){return Xi=b(function*(){if(typeof navigator>`u`||!(`geolocation`in navigator))return null;try{return!(`permissions`in navigator)||(yield navigator.permissions.query({name:`geolocation`})).state!==`granted`?null:yield new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e({lat:t.coords.latitude,lon:t.coords.longitude})},()=>e(null))})}catch(e){return null}}),Xi.apply(this,arguments)}var Zi=(e,t)=>{let n={};for(let o=0;o<t.length;o++){var r;let s=t[o].property,c=e?`${e}.${s}`:s;if(t[o].children&&(r=t[o].children)!=null&&r.length){var i,a;n=(0,Qr.merge)(n,Zi(c,(i=(a=t[o])==null?void 0:a.children)==null?[]:i))}t[o].constraints&&(n[c]={errors:(0,Qr.values)((0,Qr.merge)(t[o].constraints,n[c])),value:t[o].value})}return n},Qi=e=>typeof e==`string`&&e.length>0,$i=e=>e instanceof Error?e.message:String(e);function ea(e,t){return e===4?t.HTTP_ISSUE:e===5?t.PROVIDER_ERROR:e===6?t.DECODING_FAILED:t.PROVIDER_ERROR}function ta(e){return na.apply(this,arguments)}function na(){return na=b(function*(e){let t=yield crypto.subtle.digest(`SHA-256`,e);return Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}),na.apply(this,arguments)}var ra=`********`,ia=/"([^"]+)"\s*:\s*"((?:[^"\\]|\\.)*)"/g,aa=[`password`,`token`,`secret`,`apikey`,`authorization`,`credential`,`privateKey`,`clientSecret`,`licenseId`,`serial`,`authHeader`];function oa(e){return aa.includes(e)}function sa(e){return e.replace(ia,(e,t)=>oa(t)?`"${t}":"${ra}"`:e)}var B=new class{constructor(){this._logsByStep={},this._tempCollectedLogs=``,this._events=[],this._publicListener=null}_formatEntry(e){var t,n;return[e.timestamp,(t=e.module)==null?`-`:t,`[${e.logLevel}]`,String((n=e.message)==null?`-`:n)].join(` `)}logSessionEvent(e,t=!1){let n=new Date().toISOString(),r=sa(e.message);if(this._publicListener&&this._publicListener({eventType:$r.MESSAGE,logLevel:e.logLevel,module:e.module,message:`${n} - ${r}`}),t)return;let i={timestamp:n,logLevel:e.logLevel,module:e.module,message:r};this._events.push(i);let a=this._formatEntry(i);this._tempCollectedLogs+=a+`
22
+ }`;var v=wf(function(){return wt(o,g+`return `+m).apply(n,l)});if(v.source=m,Tu(v))throw v;return v}function $(e){return X(e).toLowerCase()}function hf(e){return X(e).toUpperCase()}function gf(e,t,r){if(e=X(e),e&&(r||t===n))return cr(e);if(!e||!(t=Ga(t)))return e;var i=Ar(e),a=Ar(t);return ro(i,fr(i,a),pr(i,a)+1).join(``)}function _f(e,t,r){if(e=X(e),e&&(r||t===n))return e.slice(0,jr(e)+1);if(!e||!(t=Ga(t)))return e;var i=Ar(e);return ro(i,0,pr(i,Ar(t))+1).join(``)}function vf(e,t,r){if(e=X(e),e&&(r||t===n))return e.replace(ot,``);if(!e||!(t=Ga(t)))return e;var i=Ar(e);return ro(i,fr(i,Ar(t))).join(``)}function yf(e,t){var r=D,i=ee;if(Au(t)){var a=`separator`in t?t.separator:a;r=`length`in t?Y(t.length):r,i=`omission`in t?Ga(t.omission):i}e=X(e);var o=e.length;if(yr(e)){var s=Ar(e);o=s.length}if(r>=o)return e;var c=r-kr(i);if(c<1)return i;var l=s?ro(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),Vu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=Et(a.source,X(mt.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Ga(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function bf(e){return e=X(e),e&&Xe.test(e)?e.replace(Je,Mr):e}var xf=To(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),Sf=wo(`toUpperCase`);function Cf(e,t,r){return e=X(e),t=r?n:t,t===n?br(e)?Fr(e):Jn(e):e.match(t)||[]}var wf=V(function(e,t){try{return Nn(e,n,t)}catch(e){return Tu(e)?e:new Ct(e)}}),Tf=qo(function(e,t){return Fn(t,function(t){t=Rs(t),ki(e,t,zl(e[t],e))}),e});function Ef(e){var t=e==null?0:e.length,n=K();return e=t?Vn(e,function(e){if(typeof e[1]!=`function`)throw new Ot(o);return[n(e[0]),e[1]]}):[],V(function(n){for(var r=-1;++r<t;){var i=e[r];if(Nn(i[0],this,n))return Nn(i[1],this,n)}})}function Df(e){return Ni(Mi(e,f))}function Of(e){return function(){return e}}function kf(e,t){return e==null||e!==e?t:e}var Af=ko(),jf=ko(!0);function Mf(e){return e}function Nf(e){return ha(typeof e==`function`?e:Mi(e,f))}function Pf(e){return ba(Mi(e,f))}function Ff(e,t){return xa(e,Mi(t,f))}var If=V(function(e,t){return function(n){return ia(n,e,t)}}),Lf=V(function(e,t){return function(n){return ia(e,n,t)}});function Rf(e,t,n){var r=Ed(t),i=Ji(t,r);n==null&&!(Au(t)&&(i.length||!r.length))&&(n=t,t=e,e=this,i=Ji(t,Ed(t)));var a=!(Au(n)&&`chain`in n)||!!n.chain,o=Du(e);return Fn(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Hn([this.value()],arguments))})}),e}function zf(){return Sn._===this&&(Sn._=Rt),this}function Bf(){}function Vf(e){return e=Y(e),V(function(t){return wa(t,e)})}var Hf=Mo(Vn),Uf=Mo(Ln),Wf=Mo(Gn);function Gf(e){return gs(e)?tr(Rs(e)):Oa(e)}function Kf(e){return function(t){return e==null?n:Yi(e,t)}}var qf=Fo(),Jf=Fo(!0);function Yf(){return[]}function Xf(){return!1}function Zf(){return{}}function Qf(){return``}function $f(){return!0}function ep(e,t){if(e=Y(e),e<1||e>ae)return[];var n=ce,r=mn(e,ce);t=K(t),e-=ce;for(var i=or(r,t);++n<e;)t(n);return i}function tp(e){return J(e)?Vn(e,Rs):Gu(e)?[e]:go(Ls(X(e)))}function np(e){var t=++Pt;return X(e)+t}var rp=jo(function(e,t){return e+t},0),ip=Ro(`ceil`),ap=jo(function(e,t){return e/t},1),op=Ro(`floor`);function sp(e){return e&&e.length?Bi(e,Mf,Qi):n}function cp(e,t){return e&&e.length?Bi(e,K(t,2),Qi):n}function lp(e){return er(e,Mf)}function up(e,t){return er(e,K(t,2))}function dp(e){return e&&e.length?Bi(e,Mf,va):n}function fp(e,t){return e&&e.length?Bi(e,K(t,2),va):n}var pp=jo(function(e,t){return e*t},1),mp=Ro(`round`),hp=jo(function(e,t){return e-t},0);function gp(e){return e&&e.length?ar(e,Mf):0}function _p(e,t){return e&&e.length?ar(e,K(t,2)):0}return L.after=Il,L.ary=Ll,L.assign=id,L.assignIn=ad,L.assignInWith=od,L.assignWith=sd,L.at=cd,L.before=Rl,L.bind=zl,L.bindAll=Tf,L.bindKey=Bl,L.castArray=au,L.chain=Qc,L.chunk=Hs,L.compact=Us,L.concat=Ws,L.cond=Ef,L.conforms=Df,L.constant=Of,L.countBy=ll,L.create=ld,L.curry=Vl,L.curryRight=Hl,L.debounce=Ul,L.defaults=ud,L.defaultsDeep=dd,L.defer=Wl,L.delay=Gl,L.difference=Gs,L.differenceBy=Ks,L.differenceWith=qs,L.drop=Js,L.dropRight=Ys,L.dropRightWhile=Xs,L.dropWhile=Zs,L.fill=Qs,L.filter=dl,L.flatMap=ml,L.flatMapDeep=hl,L.flatMapDepth=gl,L.flatten=tc,L.flattenDeep=nc,L.flattenDepth=rc,L.flip=Kl,L.flow=Af,L.flowRight=jf,L.fromPairs=ic,L.functions=vd,L.functionsIn=yd,L.groupBy=yl,L.initial=sc,L.intersection=cc,L.intersectionBy=lc,L.intersectionWith=uc,L.invert=Cd,L.invertBy=wd,L.invokeMap=xl,L.iteratee=Nf,L.keyBy=Sl,L.keys=Ed,L.keysIn=Dd,L.map=Cl,L.mapKeys=Od,L.mapValues=kd,L.matches=Pf,L.matchesProperty=Ff,L.memoize=ql,L.merge=Ad,L.mergeWith=jd,L.method=If,L.methodOf=Lf,L.mixin=Rf,L.negate=Jl,L.nthArg=Vf,L.omit=Md,L.omitBy=Nd,L.once=Yl,L.orderBy=wl,L.over=Hf,L.overArgs=Xl,L.overEvery=Uf,L.overSome=Wf,L.partial=Zl,L.partialRight=Ql,L.partition=Tl,L.pick=Pd,L.pickBy=Fd,L.property=Gf,L.propertyOf=Kf,L.pull=hc,L.pullAll=gc,L.pullAllBy=_c,L.pullAllWith=vc,L.pullAt=yc,L.range=qf,L.rangeRight=Jf,L.rearg=$l,L.reject=Ol,L.remove=bc,L.rest=eu,L.reverse=xc,L.sampleSize=Al,L.set=Ld,L.setWith=Rd,L.shuffle=jl,L.slice=Sc,L.sortBy=Pl,L.sortedUniq=kc,L.sortedUniqBy=Ac,L.split=ff,L.spread=tu,L.tail=jc,L.take=Mc,L.takeRight=Nc,L.takeRightWhile=Pc,L.takeWhile=Fc,L.tap=$c,L.throttle=nu,L.thru=el,L.toArray=Qu,L.toPairs=zd,L.toPairsIn=Bd,L.toPath=tp,L.toPlainObject=nd,L.transform=Vd,L.unary=ru,L.union=Ic,L.unionBy=Lc,L.unionWith=Rc,L.uniq=zc,L.uniqBy=Bc,L.uniqWith=Vc,L.unset=Hd,L.unzip=Hc,L.unzipWith=Uc,L.update=Ud,L.updateWith=Wd,L.values=Gd,L.valuesIn=Kd,L.without=Wc,L.words=Cf,L.wrap=iu,L.xor=Gc,L.xorBy=Kc,L.xorWith=qc,L.zip=Jc,L.zipObject=Yc,L.zipObjectDeep=Xc,L.zipWith=Zc,L.entries=zd,L.entriesIn=Bd,L.extend=ad,L.extendWith=od,Rf(L,L),L.add=rp,L.attempt=wf,L.camelCase=Xd,L.capitalize=Zd,L.ceil=ip,L.clamp=qd,L.clone=ou,L.cloneDeep=cu,L.cloneDeepWith=lu,L.cloneWith=su,L.conformsTo=uu,L.deburr=Qd,L.defaultTo=kf,L.divide=ap,L.endsWith=$d,L.eq=du,L.escape=ef,L.escapeRegExp=tf,L.every=ul,L.find=fl,L.findIndex=$s,L.findKey=fd,L.findLast=pl,L.findLastIndex=ec,L.findLastKey=pd,L.floor=op,L.forEach=_l,L.forEachRight=vl,L.forIn=md,L.forInRight=hd,L.forOwn=gd,L.forOwnRight=_d,L.get=bd,L.gt=fu,L.gte=pu,L.has=xd,L.hasIn=Sd,L.head=ac,L.identity=Mf,L.includes=bl,L.indexOf=oc,L.inRange=Jd,L.invoke=Td,L.isArguments=mu,L.isArray=J,L.isArrayBuffer=hu,L.isArrayLike=gu,L.isArrayLikeObject=_u,L.isBoolean=vu,L.isBuffer=yu,L.isDate=bu,L.isElement=xu,L.isEmpty=Su,L.isEqual=Cu,L.isEqualWith=wu,L.isError=Tu,L.isFinite=Eu,L.isFunction=Du,L.isInteger=Ou,L.isLength=ku,L.isMap=Mu,L.isMatch=Nu,L.isMatchWith=Pu,L.isNaN=Fu,L.isNative=Iu,L.isNil=Ru,L.isNull=Lu,L.isNumber=zu,L.isObject=Au,L.isObjectLike=ju,L.isPlainObject=Bu,L.isRegExp=Vu,L.isSafeInteger=Hu,L.isSet=Uu,L.isString=Wu,L.isSymbol=Gu,L.isTypedArray=Ku,L.isUndefined=qu,L.isWeakMap=Ju,L.isWeakSet=Yu,L.join=dc,L.kebabCase=nf,L.last=fc,L.lastIndexOf=pc,L.lowerCase=rf,L.lowerFirst=Z,L.lt=Xu,L.lte=Zu,L.max=sp,L.maxBy=cp,L.mean=lp,L.meanBy=up,L.min=dp,L.minBy=fp,L.stubArray=Yf,L.stubFalse=Xf,L.stubObject=Zf,L.stubString=Qf,L.stubTrue=$f,L.multiply=pp,L.nth=mc,L.noConflict=zf,L.noop=Bf,L.now=Fl,L.pad=af,L.padEnd=of,L.padStart=sf,L.parseInt=cf,L.random=Yd,L.reduce=El,L.reduceRight=Dl,L.repeat=lf,L.replace=uf,L.result=Id,L.round=mp,L.runInContext=e,L.sample=kl,L.size=Ml,L.snakeCase=df,L.some=Nl,L.sortedIndex=Cc,L.sortedIndexBy=wc,L.sortedIndexOf=Tc,L.sortedLastIndex=Ec,L.sortedLastIndexBy=Dc,L.sortedLastIndexOf=Oc,L.startCase=pf,L.startsWith=mf,L.subtract=hp,L.sum=gp,L.sumBy=_p,L.template=Q,L.times=ep,L.toFinite=$u,L.toInteger=Y,L.toLength=ed,L.toLower=$,L.toNumber=td,L.toSafeInteger=rd,L.toString=X,L.toUpper=hf,L.trim=gf,L.trimEnd=_f,L.trimStart=vf,L.truncate=yf,L.unescape=bf,L.uniqueId=np,L.upperCase=xf,L.upperFirst=Sf,L.each=_l,L.eachRight=vl,L.first=ac,Rf(L,function(){var e={};return Ki(L,function(t,n){M.call(L.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),L.VERSION=r,Fn([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){L[e].placeholder=L}),Fn([`drop`,`take`],function(e,t){R.prototype[e]=function(r){r=r===n?1:P(Y(r),0);var i=this.__filtered__&&!t?new R(this):this.clone();return i.__filtered__?i.__takeCount__=mn(r,i.__takeCount__):i.__views__.push({size:mn(r,ce),type:e+(i.__dir__<0?`Right`:``)}),i},R.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),Fn([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==ne||n==re;R.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:K(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Fn([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);R.prototype[e]=function(){return this[n](1).value()[0]}}),Fn([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);R.prototype[e]=function(){return this.__filtered__?new R(this):this[n](1)}}),R.prototype.compact=function(){return this.filter(Mf)},R.prototype.find=function(e){return this.filter(e).head()},R.prototype.findLast=function(e){return this.reverse().find(e)},R.prototype.invokeMap=V(function(e,t){return typeof e==`function`?new R(this):this.map(function(n){return ia(n,e,t)})}),R.prototype.reject=function(e){return this.filter(Jl(K(e)))},R.prototype.slice=function(e,t){e=Y(e);var r=this;return r.__filtered__&&(e>0||t<0)?new R(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=Y(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},R.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},R.prototype.toArray=function(){return this.take(ce)},Ki(R.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=L[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(L.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof R,l=s[0],u=c||J(t),d=function(e){var t=a.apply(L,Hn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new R(this);var g=e.apply(t,s);return g.__actions__.push({func:el,args:[d],thisArg:n}),new Ur(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),Fn([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=kt[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);L.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(J(i)?i:[],e)}return this[n](function(n){return t.apply(J(n)?n:[],e)})}}),Ki(R.prototype,function(e,t){var n=L[t];if(n){var r=n.name+``;M.call(nr,r)||(nr[r]=[]),nr[r].push({name:t,func:n})}}),nr[W(n,v).name]=[{name:`wrapper`,func:n}],R.prototype.clone=Wr,R.prototype.reverse=Gr,R.prototype.value=Kr,L.prototype.at=tl,L.prototype.chain=nl,L.prototype.commit=rl,L.prototype.next=il,L.prototype.plant=ol,L.prototype.reverse=sl,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=cl,L.prototype.first=L.prototype.head,Jt&&(L.prototype[Jt]=al),L})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(Sn._=Ir,define(function(){return Ir})):wn?((wn.exports=Ir)._=Ir,Cn._=Ir):Sn._=Ir}).call(e)})),Gr=[];for(let e=0;e<256;++e)Gr.push((e+256).toString(16).slice(1));function Kr(e,t=0){return(Gr[e[t+0]]+Gr[e[t+1]]+Gr[e[t+2]]+Gr[e[t+3]]+`-`+Gr[e[t+4]]+Gr[e[t+5]]+`-`+Gr[e[t+6]]+Gr[e[t+7]]+`-`+Gr[e[t+8]]+Gr[e[t+9]]+`-`+Gr[e[t+10]]+Gr[e[t+11]]+Gr[e[t+12]]+Gr[e[t+13]]+Gr[e[t+14]]+Gr[e[t+15]]).toLowerCase()}var qr=new Uint8Array(16);function Jr(){return crypto.getRandomValues(qr)}function Yr(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Xr(e,t,n)}function Xr(e,t,n){var r,i,a;e=e||{};let o=(r=(i=e.random)==null?(a=e.rng)==null?void 0:a.call(e):i)==null?Jr():r;if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return Kr(o)}var Zr=R(),Qr=Wr(),$r={MESSAGE:`MESSAGE`,ERROR:`ERROR`},z=function(e){return e.DEBUG=`DEBUG`,e.ERROR=`ERROR`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.CRITICAL=`CRITICAL`,e}({}),ei=function(e){return e.INFO=`INFO`,e}({}),ti=Object.values({DATA:`DATA`,QUESTIONARY:`QUESTIONARY`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,DEVICE_TRANSFER:`DEVICE_TRANSFER`}),ni={DATA:`DATA`,PROCESSING:`PROCESSING`,QUESTIONARY:`QUESTIONARY`,GEOLOCATION:`GEOLOCATION`,FILE_UPLOAD:`FILE_UPLOAD`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,LOGIN:`LOGIN`,IAM_CONSENT:`IAM_CONSENT`,IAM_AUTH_CODE:`IAM_AUTH_CODE`},ri=function(e){return e.DID_START_SESSION=`DID_START_SESSION`,e.DID_END_SESSION=`DID_END_SESSION`,e.DID_START_RESTORE_SESSION=`DID_START_RESTORE_SESSION`,e.DID_CONTINUE_REMOTE_SESSION=`DID_CONTINUE_REMOTE_SESSION`,e}({}),ii=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.CONNECTION_ISSUE=1]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=2]=`WORKFLOW_ISSUE`,e[e.INTERNAL_ISSUE=3]=`INTERNAL_ISSUE`,e[e.SCENARIO_IN_PROGRESS=4]=`SCENARIO_IN_PROGRESS`,e}({}),ai=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.CONFIG_MISSED_OR_INVALID=1]=`CONFIG_MISSED_OR_INVALID`,e[e.INITIALIZATION_REQUIRED=2]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),oi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.PREPARED_REQUIRED=1]=`PREPARED_REQUIRED`,e[e.START_SESSION_FAILED=2]=`START_SESSION_FAILED`,e[e.UNKNOWN_STEP=3]=`UNKNOWN_STEP`,e[e.MODULES_ISSUE=4]=`MODULES_ISSUE`,e[e.ALREADY_STARTED=5]=`ALREADY_STARTED`,e[e.INTERNAL_ISSUE=6]=`INTERNAL_ISSUE`,e}({}),si=function(e){return e[e.CONFIG_MISSED_OR_INVALID=0]=`CONFIG_MISSED_OR_INVALID`,e[e.MODULES_INSTANTIATION_FAILURE=1]=`MODULES_INSTANTIATION_FAILURE`,e[e.INITIALIZATION_IN_PROGRESS=2]=`INITIALIZATION_IN_PROGRESS`,e}({}),ci=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=1]=`WORKFLOW_ISSUE`,e}({}),li=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),ui=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.TOKEN_ERROR=3]=`TOKEN_ERROR`,e[e.CONNECTION_ISSUE=4]=`CONNECTION_ISSUE`,e}({}),di=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.SAME_STEP=3]=`SAME_STEP`,e[e.IS_PROCESSING=4]=`IS_PROCESSING`,e[e.NOT_DATA_TYPE=5]=`NOT_DATA_TYPE`,e}({}),fi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),pi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),mi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.ALREADY_IN_PROCESS=1]=`ALREADY_IN_PROCESS`,e[e.START_COMMAND_FAILURE=2]=`START_COMMAND_FAILURE`,e[e.MISSING_CONFIGURATION=3]=`MISSING_CONFIGURATION`,e[e.PREPARE_WORKFLOW_FAILURE=4]=`PREPARE_WORKFLOW_FAILURE`,e[e.EXECUTION_WORKFLOW_FAILURE=5]=`EXECUTION_WORKFLOW_FAILURE`,e[e.MISSING_AUTH_CODE=6]=`MISSING_AUTH_CODE`,e[e.AUTH_FAILURE=7]=`AUTH_FAILURE`,e}({}),hi=function(e){return e[e.SUCCESS=0]=`SUCCESS`,e[e.ERROR=1]=`ERROR`,e}({}),gi=`PROGRESS`,_i=`idv-session-data`,vi=`idv-session-auth-token`,yi=`rgl-uid`,bi=(e,t)=>xi(e,t),xi=(e,t)=>{let n=Si(e,t);for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let r=n[e];typeof r==`object`&&r&&!Array.isArray(r)?n[e]=xi(r,t):Array.isArray(r)&&(n[e]=r.map(e=>typeof e==`object`&&e?xi(e,t):e))}return n},Si=(e,t)=>{let n=Ci(e),r=e.layout;if(!r||r.length===0)return n;let i=null;if(r.forEach(e=>{let n=t[e];i?n&&wi(n,i):i=n}),i){let e=Si(i,t);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];Object.prototype.hasOwnProperty.call(n,t)||(n[t]=r)}}return n},Ci=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()!==`layout`&&(t[n]=e[n]);return t},wi=(e,t)=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function Ti(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return console.warn(`Failed to copy object:`,e),null}}var Ei=(e,t)=>{if(!e||!t)return null;let n=null;return n=Ti(e),n&&(n=bi(n,t)),n};function Di(e){return Oi.apply(this,arguments)}function Oi(){return Oi=b(function*(e){return new Promise(t=>setTimeout(t,e))}),Oi.apply(this,arguments)}function ki(e,t){return Ai.apply(this,arguments)}function Ai(){return Ai=b(function*(e,t,n=120,r=200){let i=0;for(;i<n;){let t=yield e();if(t!==null)return t;i++,i<n&&(yield Di(r))}return t()}),Ai.apply(this,arguments)}var ji=(e,t,n)=>{let r=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),i=t.find(e=>e.id===n);return r.includes(i==null?void 0:i.client.templateId)},Mi=e=>e?e.type===ni.PROCESSING:!1,Ni=e=>(e==null?void 0:e.isProcessingFiles)||Mi(e.workflow.steps[0]),Pi=(e,t)=>{let n=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),r=Array.from(new Set(t.filter(e=>!e.releaseClientApp&&ti.includes(e.type)).map(e=>e.client.templateId)));function i(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}let a=i(n,r);return{isAllTemplatesSupported:a.length===0,unsupportedSteps:a.length>0?a:void 0}},Fi={setAuthTokenToLs:({apiKey:e,authToken:t,tokenExpiresAt:n,sessionId:r,workflowId:i})=>{let a=localStorage.getItem(vi),o=a?JSON.parse(a):{};o[e]={authToken:t,tokenExpiresAt:n,workflowId:i,sessionId:r},localStorage.setItem(vi,JSON.stringify(o))},getAuthTokenLs:()=>{let e=localStorage.getItem(vi);if(!e)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch(e){return null}},removeAuthTokenLs:e=>{if(!e)return!1;let t=localStorage.getItem(vi);if(!t)return!1;try{let n=JSON.parse(t);return Object.prototype.hasOwnProperty.call(n,e)?(delete n[e],localStorage.setItem(vi,JSON.stringify(n)),!0):!1}catch(e){return!1}}},Ii=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Li=e=>/^[^:{}\s]+:[^:{}\s]+$/.test(e),Ri={setSessionIdWorkflowIdToLs:(e,t)=>{let n=localStorage.getItem(_i),r={};if(n)try{let e=JSON.parse(n);Ii(e)&&(r=e)}catch(e){if(Li(n)){let[e,t]=n.split(`:`);e&&t&&(r={[t]:e})}}r[t]=e,localStorage.setItem(_i,JSON.stringify(r))},getSessionIdWorkflowIdFromLS:()=>{let e=localStorage.getItem(_i);if(!e)return null;try{let t=JSON.parse(e);return Ii(t)?t:null}catch(t){if(Li(e)){let[t,n]=e.split(`:`);if(t&&n)return{[n]:t}}return null}},removeSessionIdWorkflowIdFromLS:e=>{let t=localStorage.getItem(_i);if(!t)return!1;if(!e)return localStorage.removeItem(_i),!0;try{let n=JSON.parse(t);if(!Ii(n))return!1;let r=n;return Object.prototype.hasOwnProperty.call(r,e)?(delete r[e],localStorage.setItem(_i,JSON.stringify(r)),!0):!1}catch(n){if(Li(t)){let[,n]=t.split(`:`);return n===e?(localStorage.removeItem(_i),!0):!1}return!1}}},zi=e=>{let t,n=Yr();try{var r;t=(r=window.localStorage.getItem(e))==null?n:r,window.localStorage.setItem(e,t)}catch(e){t=n}return t};function Bi(e){return Object.prototype.toString.call(e)===`[object Object]`&&Object.keys(e).length>0}function Vi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function Hi(){return typeof document>`u`?null:document.documentElement.getAttribute(`lang`)||null}function Ui(){return typeof navigator<`u`?navigator.language:null}var Wi=e=>{let t=typeof e==`string`?e:null,n=Hi(),r=Ui();return t||n||r||`en`},Gi=e=>{try{return new URL(e).searchParams.get(`sessionId`)}catch(e){return null}};function Ki(e){try{let t=e;!e.includes(`://`)&&e.includes(`.`)&&(t=`http://${e}`);let n=new URL(t);return{host:n.hostname,isSecure:n.protocol===`https:`,port:n.port?parseInt(n.port,10):void 0}}catch(e){return null}}var qi=()=>{if(typeof window>`u`)return`SERVER_SIDE_RENDERING`;if(!document.referrer)return window.location.origin;try{return new URL(document.referrer).origin}catch(e){return window.location.origin}},Ji=e=>{var t;let n=zi(yi),r={deviceId:n,metadata:{platform:`browser`,osVersion:`${Zr.osVersion}`,hostAppId:qi(),host:qi(),sdkVersion:(t=`3.6.436-nightly`)==null?void 0:t.trim(),name:navigator.userAgent,deviceModel:`${Zr.osName}/${Zr.osVersion} ${Zr.browserName}/${Zr.fullBrowserVersion}`,hostAppVersion:`${Zr.browserName}/${Zr.fullBrowserVersion}`,userID:n},deviceType:`browser`};return e&&e instanceof Object&&Object.keys(e).length>0&&(r.customMetadata=e),r};function Yi(){return Xi.apply(this,arguments)}function Xi(){return Xi=b(function*(){if(typeof navigator>`u`||!(`geolocation`in navigator))return null;try{return!(`permissions`in navigator)||(yield navigator.permissions.query({name:`geolocation`})).state!==`granted`?null:yield new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e({lat:t.coords.latitude,lon:t.coords.longitude})},()=>e(null))})}catch(e){return null}}),Xi.apply(this,arguments)}var Zi=(e,t)=>{let n={};for(let o=0;o<t.length;o++){var r;let s=t[o].property,c=e?`${e}.${s}`:s;if(t[o].children&&(r=t[o].children)!=null&&r.length){var i,a;n=(0,Qr.merge)(n,Zi(c,(i=(a=t[o])==null?void 0:a.children)==null?[]:i))}t[o].constraints&&(n[c]={errors:(0,Qr.values)((0,Qr.merge)(t[o].constraints,n[c])),value:t[o].value})}return n},Qi=e=>typeof e==`string`&&e.length>0,$i=e=>e instanceof Error?e.message:String(e);function ea(e,t){return e===4?t.HTTP_ISSUE:e===5?t.PROVIDER_ERROR:e===6?t.DECODING_FAILED:t.PROVIDER_ERROR}function ta(e){return na.apply(this,arguments)}function na(){return na=b(function*(e){let t=yield crypto.subtle.digest(`SHA-256`,e);return Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}),na.apply(this,arguments)}var ra=`********`,ia=/"([^"]+)"\s*:\s*"((?:[^"\\]|\\.)*)"/g,aa=[`password`,`token`,`secret`,`apikey`,`authorization`,`credential`,`privateKey`,`clientSecret`,`licenseId`,`serial`,`authHeader`];function oa(e){return aa.includes(e)}function sa(e){return e.replace(ia,(e,t)=>oa(t)?`"${t}":"${ra}"`:e)}var B=new class{constructor(){this._logsByStep={},this._tempCollectedLogs=``,this._events=[],this._publicListener=null}_formatEntry(e){var t,n;return[e.timestamp,(t=e.module)==null?`-`:t,`[${e.logLevel}]`,String((n=e.message)==null?`-`:n)].join(` `)}logSessionEvent(e,t=!1){let n=new Date().toISOString(),r=sa(e.message);if(this._publicListener&&this._publicListener({eventType:$r.MESSAGE,logLevel:e.logLevel,module:e.module,message:`${n} - ${r}`}),t)return;let i={timestamp:n,logLevel:e.logLevel,module:e.module,message:r};this._events.push(i);let a=this._formatEntry(i);this._tempCollectedLogs+=a+`
23
23
  `}cutCurrentStepLogs(e){let t=this._tempCollectedLogs;return this._logsByStep[e]=t==null?`no-logs`:t,this._tempCollectedLogs=``,t==null?`no-logs`:t}getSessionLogBySteps(){return A({},this._logsByStep)}getSessionEventsObject(){return[...this._events]}setPublicListener(e){this._publicListener=e}clearSession(){this._events=[],this._logsByStep={}}getSessionLogAsJsonObject(){return JSON.stringify({logsByStep:this._logsByStep,exportedAt:new Date().toISOString()},null,2)}getSessionLogAsText(){let e=[];for(let[t,n]of Object.entries(this._logsByStep))n&&(e.push(`[${t}]`),e.push(n));return e.join(`
24
24
  `)}},ca={apiKeyAuthTokenCollection:{},sessionProperties:[],currentSessionData:null,sessionRestoreMode:!1,nonce:void 0,currentStepId:null,currentScreenConfig:null,modulesConfig:{},workflow:null,externalModules:[],serviceToken:void 0,startConfig:{},locale:``,listener:()=>{}},la=(e,t)=>A(A({},ca),{},{setApiKeyAuthTokenCollection:(t,n,r)=>{e({apiKeyAuthTokenCollection:{authToken:n,apiKey:t,tokenExpiresAt:r}})},setSessionProperties:t=>{e({sessionProperties:t})},setServiceSessionToken:t=>{e({serviceToken:t})},setListener:t=>{B.setPublicListener(t),e({listener:t})},getCurrentSessionDataLs:()=>{var e;let n=Ri.getSessionIdWorkflowIdFromLS(),r=(e=t().workflow)==null?void 0:e.id,i=n==null?void 0:n[r];return r&&i?{workflowId:r,sessionId:i}:null},setCurrentSessionDataLsAndStore:({isApiKeyConnection:n,sessionId:r,workflowId:i,locale:a})=>{if(e({currentSessionData:{sessionId:r,workflowId:i,locale:a}}),n){let{apiKey:e,authToken:n,tokenExpiresAt:a}=t().apiKeyAuthTokenCollection;if(!e||!n||!a)return;Fi.setAuthTokenToLs({apiKey:e,authToken:n,tokenExpiresAt:a,sessionId:r,workflowId:i})}else Ri.setSessionIdWorkflowIdToLs(r,i)},removeCurrentSessionDataLsAndStore:()=>{e({currentSessionData:null,_sessionIdFromUrl:null});let n=t().startConfig,r=typeof n.apiKey==`string`?n.apiKey:``;if(r)Fi.removeAuthTokenLs(r);else{var i;let e=(i=t().workflow)==null?void 0:i.id;Ri.removeSessionIdWorkflowIdFromLS(e)}},getCurrentSessionId(){let e=t().currentSessionData;return e?e.sessionId:null},setWorkflow:t=>{e(()=>({workflow:t}))},setCurrentStepId:t=>{e(()=>({currentStepId:t}))},setSessionRestoreMode:t=>{e(()=>({sessionRestoreMode:t}))},setNonce:t=>{e(()=>({nonce:t}))},getNonce:()=>t().nonce,resetProps:()=>e(()=>A({},ca)),setStartConfig:t=>{e(()=>({startConfig:t}))},setLocale:t=>{e(()=>({locale:t}))}}),ua=class e{constructor({errorCode:e,errorCodeKey:t,message:n,underlyingError:r,underlyingBaseError:i,domain:a,module:o,errorEnumName:s,shortDomainCode:c}){this.errorCode=e,this.errorCodeKey=t,this.message=n,this.underlyingError=r,this.underlyingBaseError=i,this.module=o,this.domain=a,this.errorEnumName=s,this.shortDomainCode=c}static getErrorKey(e,t){let n=Object.keys(t).find(n=>t[n]===e);if(!n)throw Error(`Invalid errorCode: ${e} in enum`);return n}get lastUnderlyingError(){let t=this.underlyingBaseError;for(;(t==null?void 0:t.underlyingBaseError)instanceof e;)t=t.underlyingBaseError;return t==null?void 0:t.underlyingError}toObject(){let t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}get shortChain(){let t=`${this.shortDomainCode}:${this.errorCode}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.shortChain}`),t}get fullChain(){let t=`${this.module}.${this.domain}:${this.errorCodeKey}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.fullChain}`),t}},da=class extends HTMLElement{};function fa(e,t){if(t.displayName?console.log(`Register module: ${t.displayName}`):console.error(`Missed "displayName" when register module`),t.getSupportedTemplates&&typeof t.getSupportedTemplates==`function`){let e=t.getSupportedTemplates();console.log(`${t==null?void 0:t.displayName} supported templates: ${e.join(`, `)}`)}else console.error(`Missed "getSupportedTemplates" method when register module`);if(t.initialize&&typeof t.initialize==`function`||console.error(`${t==null?void 0:t.displayName} "initialize" method was not implemented`),t.deinitialize&&typeof t.deinitialize==`function`||console.error(`${t==null?void 0:t.displayName} "deinitialize" method was not implemented`),t.isReady&&typeof t.isReady==`function`||console.error(`${t==null?void 0:t.displayName} "isReady" method was not implemented`),t.getIdentifier&&typeof t.getIdentifier==`function`){let e=t.getIdentifier();console.log(`Module id: ${e}`)}else console.error(`Missed "getIdentifier" when register module`);customElements.get(t.getIdentifier())?console.log(`Module ${e} has already registered`):customElements.define(e,t),console.log(`-------`)}var pa=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function ma(e){if(Array.isArray(e))return e.map(ma);if(pa(e)){let t=A({},e);if(delete t.ios,delete t.android,delete t.web,`web`in e)return pa(e.web)?A(A({},ma(t)),e.web):e.web;let n={};for(let[e,r]of Object.entries(t))n[e]=ma(r);return n}return e}var ha={FORM:`form`,DATA:`data`};function ga(e){return new Promise(t=>setTimeout(t,e))}var _a=function(e){return e.RTL=`rtl`,e.LTR=`ltr`,e}({}),va=[`ar`,`he`],ya=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return va.includes(n)?`rtl`:`ltr`},ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,si);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};ba=ja,ba.MODULE=`IDV`,ba.ERROR_ENUM_NAME=`InitializeError`,ba.SHORT_CODE=`IN`;var Ma=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,ci);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};xa=Ma,xa.MODULE=`IDV`,xa.ERROR_ENUM_NAME=`TokenInitializeError`,xa.SHORT_CODE=`TI`;var Na=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,ii);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Sa=Na,Sa.MODULE=`IDV`,Sa.ERROR_ENUM_NAME=`PrepareWorkflowError`,Sa.SHORT_CODE=`PW`;var V=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,ai);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ca=V,Ca.MODULE=`IDV`,Ca.ERROR_ENUM_NAME=`ConfigureError`,Ca.SHORT_CODE=`CFG`;var Pa=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,oi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};wa=Pa,wa.MODULE=`IDV`,wa.ERROR_ENUM_NAME=`WorkflowError`,wa.SHORT_CODE=`SC`;var Fa=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,pi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ta=Fa,Ta.MODULE=`IDV`,Ta.ERROR_ENUM_NAME=`ConnectionError`,Ta.SHORT_CODE=`CO`;var Ia=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,di);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ea=Ia,Ea.MODULE=`IDV`,Ea.ERROR_ENUM_NAME=`SessionError`,Ea.SHORT_CODE=`SE`;var La=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,ui);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Da=La,Da.MODULE=`IDV`,Da.ERROR_ENUM_NAME=`StartSessionError`,Da.SHORT_CODE=`ST`;var Ra=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,fi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Oa=Ra,Oa.MODULE=`IDV`,Oa.ERROR_ENUM_NAME=`DeinitializationError`,Oa.SHORT_CODE=`DE`;var za=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,mi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};ka=za,ka.MODULE=`IDV`,ka.ERROR_ENUM_NAME=`LoginError`,ka.SHORT_CODE=`LG`;var Ba=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,li);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Aa=Ba,Aa.MODULE=`IDV`,Aa.ERROR_ENUM_NAME=`WorkflowPlatformError`,Aa.SHORT_CODE=`WPE`;var Va=class e{constructor(){this.webSocket=null,this.messageCallbacks=new Set,this.reconnectCallbacks=new Set,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.reconnectAttempt=0,this.baseReconnectDelay=1e3,this.maxReconnectDelay=1e4,this.multiplier=1.5,this.reconnectAttemptThreshold=Math.log(this.maxReconnectDelay/this.baseReconnectDelay)/Math.log(this.multiplier),this.resetReconnectAttempt=()=>{this.reconnectAttempt=0},this.calculateReconnectDelay=()=>this.reconnectAttempt<this.reconnectAttemptThreshold?this.baseReconnectDelay*Math.pow(this.multiplier,this.reconnectAttempt):this.maxReconnectDelay}static getInstance(){return e.instance||(e.instance=new e),e.instance}send(e){if(!this.webSocket||!this.connected||this.webSocket.readyState!==WebSocket.OPEN)return{status:hi.ERROR,errorMessage:`WebSocket is not ready.`};let t=typeof e==`string`?e:JSON.stringify(e);try{return this.webSocket.send(t),{status:hi.SUCCESS}}catch(e){return{status:hi.ERROR,errorMessage:`Error while sending message to WebSocket: ${$i(e)}.`}}}isConnected(){return this.connected}connect(e,t){return B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`WebSocket is trying to ${t?`re`:``}connect...`}),this.connected?Promise.resolve():(this.lastConnectConfig=e,new Promise(t=>{let{host:n,isSecure:r=!0,token:i,port:a}=e,o=`ws${r?`s`:``}://${n}${a?`:${a}`:``}/ws/device?Authorization=Connection%20${i}`;this.webSocket=new WebSocket(o),this.webSocket.onopen=()=>{B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`WebSocket ${this.reconnectAttempt>0?`re`:``}connected successfully`}),this.connected=!0,this.wasEverConnected=!0,this.reconnectAttempt>0&&this.reconnectCallbacks.forEach(e=>e()),this.resetReconnectAttempt(),t()},this.webSocket.onerror=()=>{console.log(`Socket error`),t()},this.webSocket.onmessage=e=>{this.messageCallbacks.forEach(t=>t(e.data))},this.webSocket.onclose=()=>{if(B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`WebSocket connection closed.`}),this.connected=!1,this.webSocket=null,!this.wasEverConnected||!this.lastConnectConfig)return;this.reconnectAttempt++;let e=this.calculateReconnectDelay();setTimeout(()=>{this.connect(this.lastConnectConfig,!0)},e)}}))}sendSessionGetMessage({sessionId:e,locale:t}){let n=this.send({command:`sessionGet`,options:A({id:e},t&&{locale:t})});n.status===hi.SUCCESS&&B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Successfully sent sessionGet message to WebSocket.`}),n.status===hi.ERROR&&B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Failed to send sessionGet message to WebSocket: ${n.errorMessage}.`})}onMessage(e){this.messageCallbacks.add(e)}onReconnect(e){this.reconnectCallbacks.add(e)}clearSubscriptions(){this.messageCallbacks.clear(),this.reconnectCallbacks.clear()}close(){var e;(e=this.webSocket)==null||e.close(),this.webSocket=null,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.clearSubscriptions()}}.getInstance();on();var Ha=0;Array.isArray;function H(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ha,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return N.vnode&&N.vnode(l),l}on(),Rn();var Ua=Bt(void 0),Wa=({perform:e,children:t,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a})=>H(Ua.Provider,{value:{perform:e,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a},children:t}),Ga=()=>{let e=hn(Ua);if(!e)throw Error(`useDevSettings must be used within a Context Provider`);return{devSettings:e==null?void 0:e.devSettings}},Ka=()=>{let e=hn(Ua);if(!e)throw Error(`usePerform must be used within a PerformProvider`);return{perform:e.perform}},qa=()=>{let e=hn(Ua);if(!e)throw Error(`useSetIsProcessingCallback must be used within a Context Provider`);return{setIsProcessingCallback:e.setIsProcessingCallback}},Ja=()=>{let e=hn(Ua);if(!e)throw Error(`useFailedAssets must be used within a Context Provider`);return{failedAssets:e.failedAssets}},Ya=()=>{let e=hn(Ua);if(!e)throw Error(`useLayoutDirection must be used within a Context Provider`);return{layoutDirection:e.layoutDirection}},Xa={width:`86px`,height:`86px`,flex:`0 0 86px`,marginBottom:`16px`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`};Rn();var Za=({dataUrl:e})=>{let t=dn(null);return P(()=>{if(!t.current)return;let e=!0,n=0,r=performance.now();function i(a){if(!e)return;let o=a-r;r=a,n=(n+.36*o)%360,t.current&&(t.current.style.transform=`rotate(${n}deg)`),requestAnimationFrame(i)}return requestAnimationFrame(i),()=>{e=!1}},[]),H(`img`,{src:e,ref:t})},Qa={INFO:`INFO`,INFO_DETAILS:`INFO_DETAILS`,STATUS:`STATUS`,PROGRESS:`PROGRESS`,QUESTIONS:`QUESTIONS`,CAMERA:`CAMERA`,GALLERY:`GALLERY`,GEOLOCATION:`GEOLOCATION`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,GENERIC:`GENERIC`,UPLOAD_FILES:`UPLOAD_FILES`},$a={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`},eo={ASPECT_FILL:`ASPECT_FILL`,ASPECT_FIT:`ASPECT_FIT`,FILL:`FILL`},to={NORMAL:`NORMAL`,BOLD:`BOLD`},no={TEXT_EXPANDABLE:`text_expandable`,TEXT_SINGLE_LINE:`text_single_line`,SELECTOR_OPTIONS:`selector_options`,SELECTOR_BUTTONS:`selector_buttons`,SELECTOR_DROPDOWN:`selector_dropdown`,MULTI_SELECTOR_BUTTONS:`multi_selector_buttons`,MULTI_SELECTOR_OPTIONS:`multi_selector_options`,MULTI_SELECTOR_DROPDOWN:`multi_selector_dropdown`},ro={FREE_TEXT:`FREE_TEXT`,EMAIL:`EMAIL`,NUMBER:`NUMBER`,SECURE:`SECURE`},io={SCAFFOLD:`scaffold`},ao={LABEL:`label`,IMAGE:`image`,IMAGE_BUTTON:`imageButton`,BUTTON:`button`,COLUMN:`column`,ROW:`row`,SPACER:`spacer`},oo={TOP:`TOP`,CENTER:`CENTER`,BOTTOM:`BOTTOM`},so={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`};function co(e){let t=/\[([^\]]+)\]\(((https?:\/\/|www\.)?[^\s)]+\.[^\s)]+)\)/g,n=[],r=0;for(let a of e.matchAll(t)){var i;let[t,o,s]=a,c=(i=a.index)==null?0:i;c>r&&n.push(e.slice(r,c));let l=s.startsWith(`http`)?s:`https://${s}`;n.push(H(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,children:o},c)),r=c+t.length}return r<e.length&&n.push(e.slice(r)),n}function lo(e){let t=e.split(`
25
25
  `);return t.flatMap((e,n)=>{let r=co(e);return n===t.length-1?r:[...r,H(`br`,{},`br-`+n)]})}var uo=e=>{if(typeof e==`number`)return`${e}px`};function fo(e){return e?{paddingTop:uo(e.top),paddingRight:uo(e.right),paddingBottom:uo(e.bottom),paddingLeft:uo(e.left)}:{}}var po=(e,t)=>!!(e.base64&&!(t!=null&&t.base64.has(e.base64))||e.imageId&&e.imageId in _o||e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))),mo=(e,t)=>{let n=[],r=e==null?null:e;for(;r;)po(r,t)&&n.push(r),r=r.failurePolicy===`placeholderImage`&&r.placeholderImage||null;return n},ho=e=>{if(e===eo.ASPECT_FILL)return`cover`;if(e===eo.ASPECT_FIT)return`contain`;if(e===eo.FILL)return`fill`},go=e=>e===to.BOLD?700:(to.NORMAL,400),U={WARNING:`warning_icon`,SPINNER:`spinner`,LOADER:`loader`,ERROR:`failure`,AGE:`age`,ANDROID:`android`,ARROW:`arrow`,APPLE:`apple`,BACK:`back`,BIOMETRIC:`biometricIcon`,INFO:`info`,TO_MOBILE:`toMobile`,UNDERAGE:`underage`,CROSS:`cross`,REGULA_LOGO:`regulaLogo`,POWERED_BY:`signature`,SUCCESS:`success`,DEFAULT:`empty`,CIRCLE_SELECTED:`radio_selected`,CIRCLE_NORMAL:`radio_normal`,SQUARE_SELECTED:`square_selected`,SQUARE_NORMAL:`square_normal`,SELECTED:`selected`,CHEVRON_DOWN:`chevronDown`,CLOSE_ICON:`close_icon`,GALLERY_ICON:`gallery`,CAMERA_ICON:`camera`,OK:`ok`,FILE:`file`,RELOAD:`reload`},_o={[U.SPINNER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHlsZT0idHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7Ij4KICA8Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIyNy41IiBmaWxsPSJub25lIiBzdHJva2U9IiM3RTU3QzUiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTI5LjU5MDY5Njk2MDU3ODk4IDQzLjE5Njg5ODk4Njg1OTY2IiBzdHJva2UtZGFzaG9mZnNldD0iMCIgc3Ryb2tlLWxpbmVjYXA9ImJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAzMCAzMCkiLz4KPC9zdmc+Cg==`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="[^"]*"/g,`stroke="${e}"`);let i=btoa(r);return`${n[0]},${i}`},[U.LOADER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCAyMiAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMTAiIHRyYW5zZm9ybT0icm90YXRlKDkwIDExIDExKSIgc3Ryb2tlPSIjRkJGQkZCIiBzdHJva2Utd2lkdGg9IjEuODc1Ii8+CjxwYXRoIGQ9Ik0xMSAwLjk5OTk5OEM1LjQ3NzE2IDAuOTk5OTk3IDEgNS40NzcxNSAxIDExQzEgMTYuNTIyOCA1LjQ3NzE1IDIxIDExIDIxQzE2LjUyMjggMjEgMjEgMTYuNTIyOCAyMSAxMSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="[^"]*"/g,`stroke="${e}"`);let i=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IwLjUyMjZDMjQuOTkzNCAyMi4zMjM4IDIzLjc3NCAyMy44NTM1IDIyLjE1MTUgMjQuODM4NUMyMC41MjkxIDI1LjgyMzUgMTguNjA5MyAyNi4xOTk1IDE2LjczNTIgMjUuODk5NEMxNC44NjEgMjUuNTk5MyAxMy4xNTQ2IDI0LjY0MjcgMTEuOTIwOCAyMy4yMDA0QzEwLjY4NyAyMS43NTgxIDEwLjAwNjIgMTkuOTI0MSAxMCAxOC4wMjYxQzkuOTkzODYgMTYuMTI4MSAxMC42NjI3IDE0LjI4OTcgMTEuODg3MSAxMi44Mzk0QzEzLjExMTQgMTEuMzg5MSAxNC44MTE2IDEwLjQyMTMgMTYuNjgzNyAxMC4xMDkxQzE4LjU1NTggOS43OTY3NiAyMC40NzggMTAuMTYwMyAyMi4xMDY5IDExLjEzNDZDMjMuNzM1NyAxMi4xMDkgMjQuOTY1IDEzLjYzMDcgMjUuNTc1MyAxNS40MjgiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,[U.DEFAULT]:()=>``},vo=({type:e,color:t,contentMode:n=eo.ASPECT_FILL,cornerRadius:r,backgroundColor:i,isFullSize:a=!1})=>{let o=_o[e]||_o[U.DEFAULT],s=o==null?void 0:o(t);return e===U.SPINNER||e===U.LOADER?H(Za,{dataUrl:s}):H(`img`,{src:s,style:A(A({display:`block`},a?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`}),{},{objectFit:ho(n),borderRadius:r,backgroundColor:i})})},yo=`#005fcc`,bo=`idv-gui`,xo={DECODING_FAILED:0,IMAGE_LOADING_FAILED:1},So={text:`text`,selector:`selector`,multiSelector:`multiSelector`},Co={NOT_EMPTY:`notEmpty`,REGEX:`regex`},wo={APP_DENIED:`app_denied`,SYSTEM_RESTRICTED:`system_restricted`,FILES_NOT_SELECTED:`files_not_selected`,FILES_LIMIT_EXCEEDED:`files_limit_exceeded`};function To(e){return e===$a.CENTER?`center`:e===$a.RIGHT||e===$a.END?`end`:`start`}function Eo(e){return e===$a.CENTER?`center`:e===$a.END?`end`:e===$a.LEFT?`left`:e===$a.RIGHT?`right`:`start`}function Do(e){if(typeof e==`object`&&e)for(let t in e)typeof e[t]==`object`?Do(e[t]):e[t]===`true`?e[t]=!0:e[t]===`false`&&(e[t]=!1);return e}function Oo(e){return Object.entries(e).map(([e,t])=>({id:e,value:typeof t==`string`?t.trim():t})).filter(e=>!!e.value)}var ko=e=>Array.isArray(e)?e.length===0:e===0?!1:!e;function W(e){if(e)return/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)?e:void 0}var Ao=(e,t)=>e.reduce((e,n)=>{if(n.answerType===So.text){var r;if((r=n.property)!=null&&r.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.string)return A(A({},e),{},{[n.id]:r.string})}}if(n.answerType===So.selector){var i;if((i=n.property)!=null&&i.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.string)return A(A({},e),{},{[n.id]:r.string})}}if(n.answerType===So.multiSelector){var a;if((a=n.property)!=null&&a.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.array)return A(A({},e),{},{[n.id]:r.array})}}return e},{}),jo=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;if(typeof e==`string`){let n=e.split(`,`)[1];t(n)}else n(Error(`Unexpected result type`))},r.onerror=()=>n(r.error),r.readAsDataURL(e)}),Mo=function(){var e=b(function*(){try{return(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>e.stop()),`allowed`}catch(e){return(e==null?void 0:e.name)===`NotAllowedError`?`denied`:`error`}});return function(){return e.apply(this,arguments)}}(),No=()=>String.fromCharCode(Math.floor(Math.random()*26)+97)+Number(Math.random()).toString(16).slice(2)+Date.now().toString(16).slice(4);function Po(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Fo(e,t){if(e==null)return{};var n,r,i=Po(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}Rn();var Io=[`isFullSize`],Lo=e=>{let{isFullSize:t=!1}=e,n=Fo(e,Io),{failedAssets:r}=Ja(),i=mo(n,r),[a,o]=cn(0),s=i[a];if(!s)return null;let{imageId:c,imageURL:l,base64:u,contentMode:d=eo.ASPECT_FILL,cornerRadius:f,backgroundColor:p}=s,[m,h]=cn(!0),g=m&&l,_=()=>{h(!1)},v=()=>{o(e=>e+1)},y=t?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`};return u?H(`img`,{style:A(A({},y),{},{objectFit:ho(d),borderRadius:f,backgroundColor:W(p)||`transparent`,display:`block`}),src:u,onError:v}):c?H(vo,{type:c in _o?c:`default`,contentMode:d,cornerRadius:f,backgroundColor:W(p)||`transparent`,isFullSize:t}):l?H(gt,{children:[g&&H(`div`,{style:{width:`100%`,height:`100%`,backgroundColor:`#e0e0e0`,borderRadius:f}}),H(`img`,{style:A(A({},y),{},{objectFit:ho(d),borderRadius:f,backgroundColor:W(p)||`transparent`,display:g?`none`:`block`}),src:l,onLoad:_,onError:v})]}):null},Ro=({signature:e})=>H(`footer`,{"data-ui":`gui-footer`,part:`gui-footer`,style:{display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,height:`100%`,width:`100%`},children:H(`a`,{href:``,style:{display:`inline-block`,height:`16px`},children:H(Lo,A({},e))})});Rn();var zo={display:`flex`,justifyContent:`center`,alignItems:`center`,height:`36px`,minWidth:`36px`,border:`none`,cursor:`pointer`,padding:0},Bo=({dataTestId:e,responseBody:t,image:n,title:r,backgroundColor:i=`transparent`,cornerRadius:a,highlightColor:o})=>{var s;let[c,l]=cn(!1),u=c&&o?o:i,{perform:d}=Ka();return H(`button`,{"data-ui":`gui-close-button`,part:`gui-close-button`,"data-test":e,onClick:()=>{let e=JSON.parse(JSON.stringify(t));Do(e),d(e,ha.DATA)},className:`hover-button`,style:A(A(A({},zo),a&&{borderRadius:a}),{},{backgroundColor:(s=W(u))==null?`transparent`:s}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[n&&H(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:H(Lo,A({},n))}),r&&H(`div`,{style:{padding:`0 5px`},children:H(G,A({},r))})]})},Vo=({closeButton:e})=>H(`header`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`flex-end`,alignItems:`center`,paddingInlineEnd:`16px`},"data-ui":`gui-header`,part:`gui-header`,children:H(`div`,{children:e&&H(Bo,A({dataTestId:`close-btn`},e))})}),G=({text:e,fontName:t=``,fontSize:n=`17px`,fontColor:r,alignment:i,backgroundColor:a,cornerRadius:o=0,paddings:s,fontWeight:c=to.NORMAL,htmlFor:l,isGenericTemplate:u=!1})=>{let d=u?$a.START:$a.LEFT,f=i||d,p=u?Eo(f):To(f),m=A(A({fontFamily:[t,`-apple-system`,`BlinkMacSystemFont`,`sans-serif`].filter(Boolean).join(`, `),fontSize:n},u&&{fontWeight:go(c)}),{},{color:W(r)||`#000000`,textAlign:p,backgroundColor:W(a)||`transparent`,borderRadius:o,overflowWrap:`break-word`},u&&fo(s)),h=typeof e==`string`&&e.trim()&&lo(e);return l?H(`label`,{"data-ui":`gui-label`,part:`gui-label`,style:m,htmlFor:l,children:h}):H(`div`,{"data-ui":`gui-label`,part:`gui-label`,style:m,children:h})};Rn();var Ho=({title:e,image:t,responseBody:n,backgroundColor:r=`transparent`,cornerRadius:i,highlightColor:a,dataTestId:o,borderColor:s,borderWidth:c,type:l=`RESPONSE_BODY`,paddings:u,isGenericTemplate:d=!1,onClick:f})=>{var p;let[m,h]=cn(!1),[g,_]=cn(!1),v=(({isGenericTemplate:e,isPressed:t,isHovered:n,backgroundColor:r,highlightColor:i})=>{let a=W(r)||`transparent`,o=W(i);return e&&t?o||a:e&&n?a:!e&&n&&o||a})({isGenericTemplate:d,isPressed:g,isHovered:m,backgroundColor:r,highlightColor:a}),y=d?{onPointerDown:()=>_(!0),onPointerUp:()=>_(!1),onPointerLeave:()=>_(!1),onPointerCancel:()=>_(!1)}:{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1)},{perform:b}=Ka(),x=e=>{if(f&&f(e),l!==`RESPONSE_BODY`&&!(l===`FORM`&&n))return;let t=JSON.parse(JSON.stringify(n));Do(t),b(t,l===`FORM`?ha.FORM:ha.DATA)},S=d?A({},fo(u)):{padding:`10px 16px`,height:`50px`},C=A(A({width:`100%`,textAlign:`center`,fontSize:`16px`,fontWeight:`400`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:10,borderRadius:i||0,borderStyle:s&&c?`solid`:void 0,backgroundColor:v,borderColor:(p=W(s))==null?`none`:p,borderWidth:c==null?0:c,overflow:`hidden`,transition:`.3s`,outlineColor:yo},d&&{WebkitTapHighlightColor:`transparent`}),S);return H(`button`,A(A({"data-ui":`gui-button`,part:`gui-button`,type:l===`FORM`?`submit`:`button`,"data-test":o,onClick:x,style:C},y),{},{children:[t&&H(`div`,{style:{width:`auto`,maxWidth:`30px`,height:`30px`,display:`flex`,alignItems:`center`},children:H(Lo,A({},t))}),e&&H(`div`,{style:{flexGrow:+!t},children:H(G,A(A({},e),{},{isGenericTemplate:d}))})]}))},Uo=[`items`],Wo=e=>{let{items:t}=e,n=Fo(e,Uo);return H(`div`,{part:`gui-buttons`,"data-ui":`gui-buttons`,style:A(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`}),n),children:t.map(e=>{var t;return H(Ho,A({dataTestId:`button-`+((t=e.title)==null?void 0:t.text)},e),No())})})},Go=({children:e,header:t,footer:n,backgroundColor:r=`white`,buttons:i})=>{let a=t?60:10,o=n?66:32;return H(`div`,{part:`gui-base-container`,"data-ui":`gui-base-container`,id:`base-container`,style:A({},{position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,justifyContent:`center`,margin:`0 auto`,paddingTop:`${t?a+10:10}px`,paddingBottom:`${o}px`,paddingInline:`20px`,height:`100%`,width:`100%`,backgroundColor:W(r)}),children:[t&&H(`div`,{style:{position:`absolute`,top:0,insetInline:0,width:`100%`,height:a},children:H(Vo,{closeButton:t.closeButton})}),H(`div`,{style:{height:`100%`,width:`100%`,flex:`1 1 100%`,overflow:`hidden`},children:e}),(i==null?void 0:i.length)&&H(Wo,{items:i}),n&&H(`div`,{style:{position:`absolute`,bottom:0,insetInline:0,width:`100%`,height:o,padding:`16px 20px`},children:H(Ro,A({},n))})]})},Ko=({text:e,fontName:t=``,fontColor:n,alignment:r=$a.LEFT,fontSize:i=17,backgroundColor:a,cornerRadius:o=0})=>H(`div`,{"data-ui":`gui-description`,part:`gui-description`,style:{fontFamily:[t,`-apple-system`,`BlinkMacSystemFont`,`sans-serif`].filter(Boolean).join(`, `),fontSize:i,textAlign:To(r),color:W(n)||`#000000`,borderRadius:o,backgroundColor:W(a)||`transparent`,whiteSpace:`pre-line`,overflowWrap:`break-word`},children:e&&lo(e)});Rn();var qo=({header:e,footer:t,image:n,title:r,description:i,buttons:a,backgroundColor:o})=>{let s=dn(null),[c,l]=cn(!1);return P(()=>{s.current&&l(s.current.scrollHeight>s.current.clientHeight+2)},[]),H(Go,{header:e,buttons:a,footer:t,backgroundColor:o,children:H(`div`,{part:`gui-status-screen`,style:{display:`flex`,justifyContent:c?`flex-start`:`center`,alignItems:`center`,alignContent:`center`,flex:1,height:`100%`,flexDirection:`column`},children:[n&&H(`div`,{style:Xa,children:H(Lo,A({},n))}),(r==null?void 0:r.text)&&H(`div`,{ref:s,style:{width:`100%`,overflow:c?`auto`:`hidden`},children:H(`div`,{style:{margin:`0 auto`,fontSize:`20px`,fontWeight:700,maxWidth:`345px`,textAlign:`center`,lineHeight:`1.2`,display:`flex`,flexDirection:`column`,justifyContent:c?`flex-start`:`center`,alignItems:`center`,alignContent:`center`},children:r&&H(G,A({},r))})}),i&&H(`div`,{style:{lineHeight:`28px`,fontWeight:`400`,marginTop:`16px`},children:H(Ko,A({},i))})]})})},Jo={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:`1.68`},Yo={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},Xo=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o})=>H(Go,{header:t,footer:n,buttons:a,backgroundColor:o,children:H(gt,{children:H(`div`,{part:`gui-info-screen-container`,"data-ui":`gui-info-screen-container`,id:`info-screen-container`,style:A(A({},Yo),{},{justifyContent:r?`flex-start`:`center`}),children:[r&&H(`div`,{style:Jo,children:H(Lo,A({},r))}),e&&H(`div`,{style:{marginBottom:20,lineHeight:`39.2px`},children:H(G,A({},e))}),i&&H(`div`,{style:{lineHeight:`28px`,fontWeight:`400`},children:H(Ko,A({},i))})]})})}),Zo=({indicatorColor:e=`#7E57C5`})=>H(vo,{type:U.SPINNER,color:e}),Qo=({progressView:e,footer:t,backgroundColor:n})=>H(Go,{footer:t,backgroundColor:n,children:H(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`20px`,height:`100%`,width:`100%`},children:H(Zo,{indicatorColor:W(e==null?void 0:e.indicatorColor)||`#000000`})})}),K=({title:e,description:t,image:n,backgroundColor:r,cornerRadius:i=0,isLastChild:a})=>H(`div`,{className:`details-item`,style:A(A({},{display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,borderBottom:a?`none`:`1px solid #E0E0E0`,padding:`16px 0`,gap:16}),{},{backgroundColor:W(r)||`transparent`,borderRadius:i}),children:[H(`div`,{style:{flex:`0 1 auto`,minWidth:0},children:[H(`div`,{style:{marginBottom:5,fontWeight:`bold`,lineHeight:`21px`},children:H(G,A({},e))}),H(`div`,{style:{lineHeight:`21px`,fontWeight:`400`},children:H(Ko,A({},t))})]}),H(`div`,{style:{aspectRatio:`1 / 1`,width:120,height:120,flex:`0 0 120px`},children:H(Lo,A({},n))})]}),$o={display:`flex`,flexDirection:`column`,padding:`0 16px`},es=({items:e,backgroundColor:t,cornerRadius:n=16})=>H(`div`,{className:`details`,style:A(A({},$o),{},{backgroundColor:W(t)||`white`,borderRadius:n}),children:e.map((t,n)=>H(K,A({isLastChild:n===e.length-1},t),n))});Rn();var ts=({title:e,header:t,footer:n,details:r,buttons:i,backgroundColor:a})=>{let o=dn(null),[s,c]=cn(!1);return P(()=>{o.current&&c(o.current.scrollHeight>o.current.clientHeight)},[]),H(Go,{header:t,buttons:i,footer:n,backgroundColor:a,children:H(`div`,{style:{display:`flex`,flexDirection:`column`,justifyContent:s?`flex-start`:`center`,height:`100%`,minHeight:`100%`,overflow:`auto`},ref:o,children:[H(`div`,{style:{marginBottom:e?`16px`:`0`,fontWeight:400,fontSize:`28px`},children:e&&H(G,A({},e))}),r&&H(es,A({},r))]})})};zr();var ns=[`_f`],rs=[`name`],is=[`_f`],as=[`ref`,`message`,`type`],os=[`formControl`],ss=e=>e.type===`checkbox`,cs=e=>e instanceof Date,ls=e=>e==null,us=e=>typeof e==`object`,ds=e=>!ls(e)&&!Array.isArray(e)&&us(e)&&!cs(e),fs=e=>ds(e)&&e.target?ss(e.target)?e.target.checked:e.target.value:e,ps=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),ms=e=>{let t=e.constructor&&e.constructor.prototype;return ds(t)&&t.hasOwnProperty(`isPrototypeOf`)},hs=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function gs(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(hs&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(ds(e)&&ms(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=gs(e[t]));return r}var _s={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},vs={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},ys={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},bs=`form`,xs=`root`,Ss=[`__proto__`,`constructor`,`prototype`],Cs=e=>/^\w*$/.test(e),ws=e=>e===void 0,Ts=e=>e.split(/[.[\]'"]/g).filter(Boolean),q=(e,t,n)=>{if(!t||!ds(e))return n;let r=Cs(t)?[t]:Ts(t);if(r.some(e=>Ss.includes(e)))return n;let i=r.reduce((e,t)=>ls(e)?void 0:e[t],e);return ws(i)||i===e?ws(e[t])?n:e[t]:i},Es=e=>typeof e==`boolean`,Ds=e=>typeof e==`function`,Os=(e,t,n)=>{let r=-1,i=Cs(t)?[t]:Ts(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=ds(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(Ss.includes(t))return;e[t]=a,e=e[t]}},ks=I.createContext(null);ks.displayName=`HookFormControlContext`;var As=()=>I.useContext(ks),js=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==vs.all&&(t._proxyFormState[i]=!r||vs.all),n&&(n[i]=!0),e[i]}});return i},Ms=hs?I.useLayoutEffect:I.useEffect;function Ns(e){let t=As(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=I.useState(()=>A(A({},n._formState),{},{defaultValues:n._defaultValues})),c=I.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ms(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s(A(A(A({},n._formState),e),{},{defaultValues:n._defaultValues}))}}),[i,r,a]),I.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),I.useMemo(()=>js(o,n,c.current,!1),[o,n])}var Ps=e=>typeof e==`string`,Fs=(e,t,n,r,i)=>Ps(e)?(r&&t.watch.add(e),q(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),q(n,e))):(r&&(t.watchAll=!0),n),Is=e=>ls(e)||!us(e),Ls=(e,t)=>t.length===0&&!Array.isArray(e)&&!ms(e);function Rs(e,t,n=new WeakMap){if(e===t)return!0;if(Is(e)||Is(t))return Object.is(e,t);if(cs(e)&&cs(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(Ls(e,r)||Ls(t,i))return Object.is(e,t);let a=n.get(e);if(a&&a.has(t))return!0;a?a.add(t):n.set(e,new WeakSet([t]));for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(cs(r)&&cs(e)||(ds(r)||Array.isArray(r))&&(ds(e)||Array.isArray(e))?!Rs(r,e,n):!Object.is(r,e))return!1}}return!0}function zs(e){let t=As(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=I.useRef(i),l=I.useRef(s),u=I.useRef(void 0),d=I.useRef(n),f=I.useRef(r);l.current=s;let[p,m]=I.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=I.useCallback(e=>{let t=Fs(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=I.useCallback(e=>{if(!a){let t=Fs(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);Rs(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);Ms(()=>((d.current!==n||!Rs(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),I.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=I.useMemo(()=>{if(a)return null;let e=!_&&!Rs(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function Bs(e){let t=As(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=ps(i._names.array,n),l=zs({control:i,name:n,defaultValue:I.useMemo(()=>q(i._formValues,n,q(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=Ns({control:i,name:n,exact:s}),d=I.useRef(e),f=I.useRef(null),p=I.useRef(i.register(n,A(A({},e.rules),{},{value:l},Es(e.disabled)?{disabled:e.disabled}:{})));d.current=e;let m=I.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!q(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!q(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!q(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!q(u.validatingFields,n)},error:{enumerable:!0,get:()=>q(u.errors,n)}}),[u,n]),h=I.useCallback(e=>{let t=fs(e);return q(i._fields,n)||(p.current=i.register(n,A(A({},d.current.rules),{},{value:t}))),p.current.onChange({target:{value:fs(e),name:n},type:_s.CHANGE})},[n,i]),g=I.useCallback(()=>p.current.onBlur({target:{value:q(i._formValues,n),name:n},type:_s.BLUR}),[n,i._formValues]),_=I.useCallback(e=>{e&&(f.current={focus:()=>Ds(e.focus)&&e.focus(),select:()=>Ds(e.select)&&e.select(),setCustomValidity:t=>Ds(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>Ds(e.reportValidity)&&e.reportValidity()});let t=q(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current)},[i._fields,n]),v=I.useMemo(()=>A(A({name:n,value:l},Es(r)||u.disabled?{disabled:u.disabled||r}:{}),{},{onChange:h,onBlur:g,ref:_}),[n,r,u.disabled,h,g,_,l]);return I.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,A(A({},d.current.rules),Es(d.current.disabled)?{disabled:d.current.disabled}:{}));let t=(e,t)=>{let n=q(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=gs(q(a?i._defaultValues:i._options.values||i._defaultValues,n,q(i._options.defaultValues,n,d.current.defaultValue)));Os(i._defaultValues,n,e),ws(q(i._formValues,n))&&Os(i._formValues,n,e)}if(!c&&i.register(n),f.current){let e=q(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),I.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),I.useMemo(()=>({field:v,formState:u,fieldState:m}),[v,u,m])}var Vs=e=>e.render(Bs(e)),Hs=I.createContext(null);Hs.displayName=`HookFormContext`;var Us=(e,t,n,r,i)=>t?A(A({},n[e]),{},{types:A(A({},n[e]&&n[e].types?n[e].types:{}),{},{[r]:i||!0})}):{},Ws=e=>Array.isArray(e)?e.filter(Boolean):[],Gs=e=>Array.isArray(e)?e:[e],Ks=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function qs(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&ds(i)&&a){let e=qs(i,a);ds(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var Js=e=>ds(e)&&!Object.keys(e).length,Ys=e=>e.type===`file`,Xs=e=>{if(!hs)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zs=e=>e.type===`select-multiple`,Qs=e=>e.type===`radio`,$s=e=>Qs(e)||ss(e),ec=e=>Xs(e)&&e.isConnected;function tc(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(ls(e)){e=void 0;break}e=e[t[r]],r++}return e}function nc(e){for(let t in e)if(e.hasOwnProperty(t)&&!ws(e[t]))return!1;return!0}function rc(e,t){if(Ps(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:Cs(t)?[t]:Ts(t),r=n.length===1?e:tc(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(ds(r)&&Js(r)||Array.isArray(r)&&nc(r))&&rc(e,n.slice(0,-1)),e}var ic=e=>{for(let t in e)if(Ds(e[t]))return!0;return!1};function ac(e){return Array.isArray(e)||ds(e)&&!ic(e)}function oc(e,t={}){for(let n in e){let r=e[n];ac(r)?(t[n]=Array.isArray(r)?[]:{},oc(r,t[n])):ws(r)||(t[n]=!0)}return t}function sc(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){let t=e.map(e=>sc(e));return t.some(e=>e!==void 0)?t:void 0}if(ds(e)){let t={};for(let n in e){let r=sc(e[n]);ws(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function cc(e,t,n){n||(n=oc(t));for(let r in e){let i=e[r];if(ac(i))ws(t)||Is(n[r])?n[r]=oc(i,Array.isArray(i)?[]:{}):cc(i,ls(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!Rs(i,e)}}return sc(n)||{}}var lc={value:!1,isValid:!1},uc={value:!0,isValid:!0},dc=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ws(e[0].attributes.value)?ws(e[0].value)||e[0].value===``?uc:{value:e[0].value,isValid:!0}:uc:lc}return lc},fc=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ws(e)?e:t?e===``?NaN:e&&+e:n&&Ps(e)?new Date(e):r?r(e):e,pc={isValid:!1,value:null},mc=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,pc):pc;function hc(e){let t=e.ref;return Ys(t)?t.files:Qs(t)?mc(e.refs).value:Zs(t)?[...t.selectedOptions].map(({value:e})=>e):ss(t)?dc(e.refs).value:fc(ws(t.value)?e.ref.value:t.value,e)}var gc=(e,t,n,r)=>{let i={};for(let n of e){let e=q(t,n);e&&Os(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},_c=e=>e instanceof RegExp,vc=e=>ws(e)?e:_c(e)?e.source:ds(e)?_c(e.value)?e.value.source:e.value:e,yc=e=>({isOnSubmit:!e||e===vs.onSubmit,isOnBlur:e===vs.onBlur,isOnChange:e===vs.onChange,isOnAll:e===vs.all,isOnTouch:e===vs.onTouched}),bc=`AsyncFunction`,xc=e=>!!e&&!!e.validate&&!!(Ds(e.validate)&&e.validate.constructor.name===bc||ds(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===bc)),Sc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Cc=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(`${t}.`))),wc=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=q(e,i);if(n){let{_f:e}=n,a=Fo(n,ns);if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(wc(a,t))break}else if(ds(a)&&wc(a,t))break}}};function Tc(e,t,n){let r=q(e,n);if(r||Cs(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=q(t,r),o=q(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var Ec=(e,t,n,r)=>{n(e);let{name:i}=e,a=Fo(e,rs);return Js(a)||r&&Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||vs.all))},Dc=(e,t,n)=>!e||!t||e===t||Gs(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),Oc=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,kc=(e,t)=>!Ws(q(e,t)).length&&rc(e,t),Ac=(e,t,n)=>{let r=q(e,n),i=Array.isArray(r)?r:[];return Os(i,xs,t[n]),Os(e,n,i),e};function jc(e,t,n=`validate`){if(Ps(e)||Array.isArray(e)&&e.every(Ps)||Es(e)&&!e)return{type:n,message:Ps(e)?e:``,ref:t}}var Mc=e=>ds(e)&&!_c(e)?e:{value:e,message:``},Nc=function(){var e=b(function*(e,t,n,r,i,a){let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=q(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{if(i&&y.reportValidity){let t=Es(e)?``:e||``;s?s.forEach(e=>e.setCustomValidity(t)):y.setCustomValidity(t),y.reportValidity()}},x={},S=Qs(o),C=ss(o),w=S||C,T=(g||Ys(o))&&ws(o.value)&&ws(v)||Xs(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,E=Us.bind(null,h,r,x),D=(e,t,n,r=ys.maxLength,i=ys.minLength)=>{let a=e?t:n;x[h]=A({type:e?r:i,message:a,ref:o},E(e?r:i,a))};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||ls(v))||Es(v)&&!v||C&&!dc(s).isValid||S&&!mc(s).isValid)){let{value:e,message:t}=Ps(c)?{value:!!c,message:c}:Mc(c);if(e&&(x[h]=A({type:ys.required,message:t,ref:y},E(ys.required,t)),!r))return b(t),x}if(!T&&(!ls(d)||!ls(f))){let e,t,n=Mc(f),i=Mc(d);if(!ls(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;ls(n.value)||(e=r>n.value),ls(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;Ps(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),Ps(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(D(!!e,n.message,i.message,ys.max,ys.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(Ps(v)||a&&Array.isArray(v))){let e=Mc(l),t=Mc(u),n=!ls(e.value)&&v.length>+e.value,i=!ls(t.value)&&v.length<+t.value;if((n||i)&&(D(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&Ps(v)){let{value:e,message:t}=Mc(p);if(_c(e)&&!v.match(e)&&(x[h]=A({type:ys.pattern,message:t,ref:o},E(ys.pattern,t)),!r))return b(t),x}if(m){if(Ds(m)){let e=jc(yield m(v,n),y);if(e&&(x[h]=A(A({},e),E(ys.validate,e.message)),!r))return b(e.message),x}else if(ds(m)){let e={};for(let t in m){if(!Js(e)&&!r)break;let i=jc(yield m[t](v,n),y,t);i&&(e=A(A({},i),E(t,i.message)),b(i.message),r&&(x[h]=e))}if(!Js(e)&&(x[h]=A({ref:y},e),!r))return x}}return b(!0),x});return function(t,n,r,i,a,o){return e.apply(this,arguments)}}(),Pc={mode:vs.onSubmit,reValidateMode:vs.onChange,shouldFocusError:!0},Fc={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Ic(e={}){let t=A(A({},Pc),e),n=A(A({},gs(Fc)),{},{isLoading:Ds(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1}),r={},i=(ds(t.defaultValues)||ds(t.values))&&gs(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:gs(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d=A({},u),f=A({},d),p={array:Ks(),state:Ks()},m=t.criteriaMode===vs.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=function(){var e=b(function*(e){if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=Js((yield D()).errors),_()):e=yield O({fields:r,onlyCheckValid:!0,eventType:_s.VALID}),e!==n.isValid&&p.state.next({isValid:e})}});return function(t){return e.apply(this,arguments)}}(),_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?Os(n.validatingFields,e,r):rc(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Js(n.validatingFields)}))},v=()=>{n.dirtyFields=cc(i,a)},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(q(r,e))){let t=s(q(r,e),c.argA,c.argB);l&&Os(r,e,t)}if(u&&Array.isArray(q(n.errors,e))){let t=s(q(n.errors,e),c.argA,c.argB);l&&Os(n.errors,e,t),kc(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(q(n.touchedFields,e))){let t=s(q(n.touchedFields,e),c.argA,c.argB);l&&Os(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(),p.state.next({name:e,isDirty:k(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Os(a,e,i)},x=(e,t)=>{Os(n.errors,e,t),n.errors=A({},n.errors),p.state.next({errors:n.errors})},S=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},C=e=>{let t=Cs(e)?[e]:Ts(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=ls(n)?n:n[i],r=ls(r)?r:r[i],n===null&&r!==null)return!0}return!1},w=(t,c,l,u)=>{let m=q(r,t);if(m){if(C(t))return;let r=ws(q(a,t)),h=q(a,t,ws(l)?q(i,t):l);ws(h)||u&&u.defaultChecked||c?Os(a,t,c?h:hc(m._f)):ae(t,h),o.mount&&!o.action&&(g(),r&&n.isDirty&&(d.isDirty||f.isDirty)&&(k()||(n.isDirty=!1,p.state.next(A({},n)))),e.shouldUnregister&&r&&!ws(q(a,t))&&Cc(t,s)&&(o.watch=!0))}},T=(e,r,o,s,c)=>{let l=!1,u=!1,m={name:e};if(!t.disabled){if(!o||s){(d.isDirty||f.isDirty)&&(u=n.isDirty,n.isDirty=m.isDirty=k(),l=u!==m.isDirty);let t=Rs(q(i,e),r);u=!!q(n.dirtyFields,e),t===n.isDirty?t?rc(n.dirtyFields,e):Os(n.dirtyFields,e,!0):n.dirtyFields=cc(i,a),m.dirtyFields=n.dirtyFields,l=l||(d.dirtyFields||f.dirtyFields)&&u!==!t}if(o){let t=q(n.touchedFields,e);t||(Os(n.touchedFields,e,o),m.touchedFields=n.touchedFields,l=l||(d.touchedFields||f.touchedFields)&&t!==o)}l&&c&&p.state.next(m)}return l?m:{}},E=(e,r,i,a)=>{let o=q(n.errors,e),s=(d.isValid||f.isValid)&&Es(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>x(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?Os(n.errors,e,i):rc(n.errors,e),n.errors=A({},n.errors)),(i?!Rs(o,i):o)||!Js(a)||s){let t=A(A(A({},a),s&&Es(r)?{isValid:r}:{}),{},{errors:n.errors,name:e});n=A(A({},n),t),p.state.next(t)}},D=function(){var e=b(function*(e){return _(e,!0),yield t.resolver(a,t.context,gc(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))});return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=b(function*(e){let{errors:t}=yield D(e);if(_(e),e){for(let r of e){let e=q(t,r);e?s.array.has(r)&&ds(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e)))?Ac(n.errors,{[r]:e},r):Os(n.errors,r,e):rc(n.errors,r)}n.errors=A({},n.errors)}else n.errors=t;return t});return function(t){return e.apply(this,arguments)}}(),te=function(){var t=b(function*({name:t,eventType:r}){if(e.validate){let i=yield e.validate({formValues:a,formState:n,name:t,eventType:r});if(ds(i))for(let e in i){let t=i[e];t&&ge(`${bs}.${e}`,{message:Ps(t.message)?t.message:``,type:t.type||ys.validate})}else Ps(i)||!i?ge(bs,{message:i||``,type:ys.validate}):he(bs);return i}return!0});return function(e){return t.apply(this,arguments)}}(),O=function(){var r=b(function*({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}}){if(e.validate&&(l.runRootValidation=!0,!(yield te({name:o,eventType:c}))&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r}=u,p=Fo(u,is);if(r){let o=s.array.has(r.name),c=u._f&&xc(u._f),p=d.validatingFields||d.isValidating||f.validatingFields||f.isValidating;c&&p&&_([r.name],!0);let h=yield Nc(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&p&&_([r.name]),h[r.name]&&(l.valid=!1,i)||(!i&&(q(h,r.name)?o?Ac(n.errors,h,r.name):Os(n.errors,r.name,h[r.name]):rc(n.errors,r.name)),e.shouldUseNativeValidation&&h[r.name]))break}!Js(p)&&(yield O({context:l,onlyCheckValid:i,fields:p,name:o,eventType:c}))}}return l.valid});return function(e){return r.apply(this,arguments)}}(),ne=()=>{for(let e of s.unMount){let t=q(r,e);t&&(t._f.refs?t._f.refs.every(e=>!ec(e)):!ec(t._f.ref))&&be(e)}s.unMount=new Set},k=(e,n)=>!t.disabled&&(e&&n&&Os(a,e,n),!Rs(pe(),i)),re=(e,t,n)=>Fs(e,s,A({},o.mount?a:ws(t)?i:Ps(e)?{[e]:t}:t),n,t),ie=e=>Ws(q(o.mount?a:i,e,t.shouldUnregister?q(i,e,[]):[])),ae=(e,t,n={},i=!1)=>{let o=q(r,e),s=t;if(o){let n=o._f;n&&(!n.disabled&&Os(a,e,fc(t,n)),s=Xs(n.ref)&&ls(t)?``:t,Zs(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?ss(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):Ys(n.ref)?n.ref.value=``:(n.ref.value=s,n.ref.type||p.state.next({name:e,values:i?a:gs(a)})))}(n.shouldDirty||n.shouldTouch)&&T(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&fe(e)},oe=(e,t,n,i=!1)=>{for(let a in t){if(!t.hasOwnProperty(a))return;let o=t[a],c=e+`.`+a,l=q(r,c);(s.array.has(e)||ds(o)||l&&!l._f)&&!cs(o)?oe(c,o,n,i):ae(c,o,n,i)}},se=(e,t,i,c)=>{let l=q(r,e),u=s.array.has(e),m=c?t:gs(t),h=Rs(q(a,e),m);if(h||Os(a,e,m),u)p.array.next({name:e,values:c?a:gs(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&i.shouldDirty&&(v(),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:k(e,m)}));else{let t=Array.isArray(m)&&!m.length||Js(m);!l||l._f||ls(m)||t?ae(e,m,i,c):oe(e,m,i,c)}if(!h){let t=Cc(e,s),r=c?a:gs(a);p.state.next(A(A({},t&&n),{},{name:o.mount||t?e:void 0,values:r}))}},ce=(e,t,n={})=>se(e,t,n,!1),le=(e,t={})=>{let r=Ds(e)?e(a):e;if(!Rs(a,r)){a=A(A({},a),r);for(let e of s.mount)se(e,q(r,e),t,!0);p.state.next(A(A({},n),{},{name:void 0,type:void 0,values:a})),t.shouldValidate&&g()}},ue=function(){var i=b(function*(i){o.mount=!0;let l=i.target,u=l.name,h=!0,v=q(r,u),y=e=>{h=Number.isNaN(e)||cs(e)&&isNaN(e.getTime())||Rs(e,q(a,u,e))},b=yc(t.mode),x=yc(t.reValidateMode);if(v){let o,S,C=l.type?hc(v._f):fs(i),w=i.type===_s.BLUR||i.type===_s.FOCUS_OUT,ee=!Sc(v._f)&&!e.validate&&!t.resolver&&!q(n.errors,u)&&!v._f.deps||Oc(w,q(n.touchedFields,u),n.isSubmitted,x,b),ne=Cc(u,s,w);Os(a,u,C),w?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let k=T(u,C,w),re=!Js(k)||ne;if(!w&&p.state.next({name:u,type:i.type,values:gs(a)}),ee)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?w&&g():w||g()),re&&p.state.next(A({name:u},ne?{}:k));if(!t.resolver&&e.validate&&(yield te({name:u,eventType:i.type})),!w&&ne&&p.state.next(A({},n)),t.resolver){let{errors:e}=yield D([u]);if(_([u]),y(C),!h){!Js(k)&&p.state.next(k);return}let t=Tc(n.errors,r,u),i=Tc(e,r,t.name||u);o=i.error,u=i.name,S=Js(e)}else _([u],!0),o=(yield Nc(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(C),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=yield O({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&fe(v._f.deps),E(u,S,o,k))}});return function(e){return i.apply(this,arguments)}}(),de=(e,t)=>{if(q(n.errors,t)&&e.focus)return e.focus(),1},fe=function(){var e=b(function*(e,i={}){let a,o,c=Gs(e);if(t.resolver){let t=yield ee(ws(e)?e:c);a=Js(t),o=e?!c.some(e=>q(t,e)):a}else e?(o=(yield Promise.all(c.map(function(){var e=b(function*(e){let t=q(r,e);return yield O({fields:t&&t._f?{[e]:t}:t,eventType:_s.TRIGGER})});return function(t){return e.apply(this,arguments)}}()))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=yield O({fields:r,name:e,eventType:_s.TRIGGER});return p.state.next(A(A(A({},!Ps(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e}),t.resolver||!e?{isValid:a}:{}),{},{errors:n.errors})),i.shouldFocus&&!o&&wc(r,de,e?c:s.mount),o});return function(t){return e.apply(this,arguments)}}(),pe=(e,t)=>{let r=A({},o.mount?a:i);return t&&(r=qs(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),ws(e)?r:Ps(e)?q(r,e):e.map(e=>q(r,e))},me=(e,t)=>({invalid:!!q((t||n).errors,e),isDirty:!!q((t||n).dirtyFields,e),error:q((t||n).errors,e),isValidating:!!q(n.validatingFields,e),isTouched:!!q((t||n).touchedFields,e)}),he=e=>{let t=e?Gs(e):void 0;t==null||t.forEach(e=>rc(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},ge=(e,t,i)=>{let a=(q(r,e,{_f:{}})._f||{}).ref,o=q(n.errors,e)||{},{ref:s,message:c,type:l}=o,u=Fo(o,as);Os(n.errors,e,A(A(A({},u),t),{},{ref:a})),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},_e=(e,t)=>Ds(e)?p.state.subscribe({next:n=>`values`in n&&e(n.values||re(void 0,t),n)}):re(e,t,!0),ve=e=>p.state.subscribe({next:t=>{if(Dc(e.name,t.name,e.exact)&&Ec(t,e.formState||d,Ae,e.reRenderRoot)){let r=A({},a);e.callback(A(A(A({values:r},n),t),{},{defaultValues:i}))}}}).unsubscribe,ye=e=>(o.mount=!0,f=A(A({},f),e.formState),ve(A(A({},e),{},{formState:A(A({},u),e.formState)}))),be=(e,o={})=>{for(let c of e?Gs(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(rc(r,c),rc(a,c)),!o.keepError&&rc(n.errors,c),!o.keepDirty&&rc(n.dirtyFields,c),!o.keepTouched&&rc(n.touchedFields,c),!o.keepIsValidating&&rc(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&rc(i,c);p.state.next({values:gs(a)}),p.state.next(A(A({},n),o.keepDirty?{isDirty:k()}:{})),!o.keepIsValid&&g()},xe=({disabled:e,name:t})=>{if(Es(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},Se=(e,n={})=>{let a=q(r,e),c=Es(n.disabled)||Es(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return Os(r,e,A(A({},a||{}),{},{_f:A(A({},a&&a._f?a._f:{ref:{name:e}}),{},{name:e,mount:!0},n)})),s.mount.add(e),a&&!l?xe({disabled:Es(n.disabled)?n.disabled:t.disabled,name:e}):w(e,!0,n.value),A(A(A({},c?{disabled:n.disabled||t.disabled}:{}),t.progressive?{required:!!n.required,min:vc(n.min),max:vc(n.max),minLength:vc(n.minLength),maxLength:vc(n.maxLength),pattern:vc(n.pattern)}:{}),{},{name:e,onChange:ue,onBlur:ue,ref:c=>{if(c){s.registerName.add(e),Se(e,n),s.registerName.delete(e),a=q(r,e);let t=ws(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=$s(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;Os(r,e,{_f:A(A({},a._f),o?{refs:[...l.filter(ec),t,...Array.isArray(q(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t})}),w(e,!1,void 0,t)}else a=q(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(ps(s.array,e)&&o.action)&&s.unMount.add(e)}})},Ce=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&wc(r,de,s.mount),we=e=>{Es(e)&&(p.state.next({disabled:e}),wc(r,(t,n)=>{let i=q(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},Te=(e,i)=>function(){var o=b(function*(o){let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=gs(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=yield D();_(),n.errors=e,l=gs(t)}else yield O({fields:r,eventType:_s.SUBMIT});if(s.disabled.size)for(let e of s.disabled)rc(l,e);if(rc(n.errors,xs),Js(n.errors)){p.state.next({errors:{}});try{yield e(l,o)}catch(e){c=e}}else i&&(yield i(A({},n.errors),o)),Ce(),setTimeout(Ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Js(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c});return function(e){return o.apply(this,arguments)}}(),Ee=(e,t={})=>{q(r,e)&&(ws(t.defaultValue)?ce(e,gs(q(i,e))):(ce(e,t.defaultValue),Os(i,e,gs(t.defaultValue))),t.keepTouched||rc(n.touchedFields,e),t.keepDirty||(rc(n.dirtyFields,e),n.isDirty=t.defaultValue?k(e,gs(q(i,e))):k()),t.keepError||(rc(n.errors,e),d.isValid&&g()),p.state.next(A({},n)))},De=(e,c={})=>{let l=e?gs(e):i,u=gs(l),f=Js(e),m=u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(cc(i,a))]);for(let t of Array.from(e)){let e=q(n.dirtyFields,t),r=q(a,t),i=q(m,t);e&&!ws(r)?Os(m,t,r):!e&&!ws(i)&&ce(t,i)}}else{if(hs&&ws(e))for(let e of s.mount){let t=q(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Xs(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)ce(e,q(m,e));else r={}}if(t.shouldUnregister){if(a=c.keepDefaultValues?gs(i):{},c.keepFieldsRef)for(let e of s.mount)Os(a,e,q(m,e))}else a=gs(m);p.array.next({values:A({},m)}),p.state.next({values:A({},m)})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!Js(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:c.keepValues?k():!!(c.keepDefaultValues&&!Rs(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?cc(i,a):n.dirtyFields:c.keepDefaultValues&&e?cc(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Oe=(e,n)=>De(Ds(e)?e(a):e,A(A({},t.resetOptions),n)),ke=(e,t={})=>{let n=q(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&Ds(e.select)&&e.select()})}},Ae=e=>{n=A(A({},n),e)},je={control:{register:Se,unregister:be,getFieldState:me,handleSubmit:Te,setError:ge,_subscribe:ve,_runSchema:D,_updateIsValidating:_,_focusError:Ce,_getWatch:re,_getDirty:k,_setValid:g,_setFieldArray:y,_setDisabledField:xe,_setErrors:S,_getFieldArray:ie,_reset:De,_resetDefaultValues:()=>Ds(t.defaultValues)&&t.defaultValues().then(e=>{Oe(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:ne,_disableForm:we,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t=A(A({},t),e)}},subscribe:ye,trigger:fe,register:Se,handleSubmit:Te,watch:_e,setValue:ce,setValues:le,getValues:pe,reset:Oe,resetField:Ee,resetDefaultValues:(e,t={})=>{if(i=gs(e),!t.keepDirty){let e=cc(i,a);n.dirtyFields=e,n.isDirty=!Js(e)}t.keepIsValid||g(),p.state.next(A(A({},n),{},{defaultValues:i}))},clearErrors:he,unregister:be,setError:ge,setFocus:ke,getFieldState:me};return A(A({},je),{},{formControl:je})}function Lc(e={}){let t=I.useRef(void 0),n=I.useRef(void 0),r=I.useRef(e.formControl),[i,a]=I.useState(()=>A(A({},gs(Fc)),{},{isLoading:Ds(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ds(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current=A(A({},e.formControl),{},{formState:i}),e.defaultValues&&!Ds(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let n=Ic(e),{formControl:r}=n;t.current=A(A({},Fo(n,os)),{},{formState:i})}let o=t.current.control;return o._options=e,Ms(()=>{let e=o._subscribe({formState:o._proxyFormState,callback:()=>a(A(A({},o._formState),{},{defaultValues:o._defaultValues})),reRenderRoot:!0});return a(e=>A(A({},e),{},{isReady:!0})),o._formState.isReady=!0,e},[o]),I.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),I.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),I.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),I.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),I.useEffect(()=>{if(o._proxyFormState.isDirty){let e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),I.useEffect(()=>{var t;e.values&&!Rs(e.values,n.current)?(o._reset(e.values,A({keepFieldsRef:!0},o._options.resetOptions)),(t=o._options.resetOptions)!=null&&t.keepIsValid||o._setValid(),n.current=e.values,a(e=>A({},e))):o._resetDefaultValues()},[o,e.values]),I.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next(A({},o._formState))),o._removeUnmounted()}),t.current.formState=I.useMemo(()=>js(i,o),[o,i]),t.current}var Rc=(e,t)=>{let n={};return e.forEach((e,r)=>{if(e.type===Co.NOT_EMPTY&&(n.required=n=>t&&ko(n)?e.message:!0),e.type===Co.REGEX){let i=new RegExp(e.regex);n[`regex_${r}`]=n=>!t&&!n?!0:typeof n==`string`&&i.test(n)||e.message}}),n};Rn();var zc=({isOpen:e,image:t})=>H(`div`,{"data-ui":`gui-custom-select-chevron`,style:{width:`16px`,height:`16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,transform:e?`rotate(180deg)`:`none`,transformOrigin:`50% 50%`,transition:`.2s`,flexShrink:0},children:t?H(Lo,A({},t)):H(Lo,{imageId:`chevronDown`})}),Bc=({isChosen:e,option:t,onOptionClickCallback:n,isHovered:r,onHover:i,onHoverEnd:a})=>{let o=e?t.layoutSelected.image:t.layout.image;return H(`div`,{style:{padding:`5px 8px`,background:((e,n)=>{var r,i,a,o,s,c,l,u;if(!e&&!n)return(r=W((i=t.layout)==null?void 0:i.backgroundColor))==null?`transparent`:r;if(!e&&n)return(a=W((o=t.layoutSelected)==null?void 0:o.backgroundColor))==null?`transparent`:a;if(e&&!n)return(s=W((c=t.layout)==null?void 0:c.highlightColor))==null?`#F4F4F4`:s;if(e&&n)return(l=W((u=t.layoutSelected)==null?void 0:u.highlightColor))==null?`#F4F4F4`:l})(r,e),fontSize:13,display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:8,borderRadius:4,cursor:`pointer`},"data-select-id":t.value,onClick:n(t),onMouseEnter:i,onMouseLeave:a,children:[H(G,A(A({},t.layout.title),{},{text:t.label})),H(`div`,{style:{display:`flex`,flexShrink:0},children:H(Lo,A({},o))})]},t.value)},Vc=({name:e,options:t,isMulti:n=!1,isClearable:r=!1,value:i,onChange:a,placeholder:o,closeMenuOnSelect:s=!0,onBlur:c,parentElementRef:l,controlLayout:u,pickerLayout:d})=>{var f,p,m,h,g,_,v,y;let[b,x]=cn(!1),[S,C]=cn(i),[w,T]=cn(`down`),[E,D]=cn(null),ee=dn(null),te=dn(null);un(()=>{var e,t,n;if(!b)return;let r=(e=ee.current)==null?void 0:e.getBoundingClientRect(),i=(t=te.current)==null?void 0:t.getBoundingClientRect(),a=(n=l.current)==null?void 0:n.getBoundingClientRect();!r||!i||!a||T(r.bottom+i.height<a.bottom?`down`:`up`)},[b]),P(()=>{a(S)},[S]);let O=e=>t=>{var r,i;let a=t.target;!(a==null||(r=a.closest)==null)&&r.call(a,`a`)||(t.stopPropagation(),(t.type===`touchend`||((i=t.nativeEvent)==null?void 0:i.pointerType)===`touch`)&&D(null),s&&x(!1),C(t=>n?t.some(t=>t.value===e.value)?t.filter(t=>t.value!==e.value):[...t,e]:[e]))},ne=()=>{c&&c(),x(!1)},k=e=>{var t;let n=e.currentTarget,r=(t=e.relatedTarget)==null?null:t;r&&n.contains(r)||ne()},re=e=>t=>{t.stopPropagation(),C(t=>t.filter(t=>t.value!==e.value))},ie=e=>{e.stopPropagation(),C([])},ae=(f=W(u==null?void 0:u.borderColor))==null?`#D9D9D9`:f,oe=(p=W(u==null?void 0:u.highlightBorderColor))==null?`#7E57C5`:p;return H(`div`,{"data-ui":`gui-custom-select`,ref:ee,children:H(`div`,{"data-ui":`gui-select-name-`+e,style:{backgroundColor:W(u==null?void 0:u.backgroundColor),borderStyle:`solid`,borderColor:b?oe:ae,borderWidth:(m=u==null?void 0:u.borderWidth)==null?1:m,borderRadius:(h=u==null?void 0:u.cornerRadius)==null?8:h,minHeight:`41px`,position:`relative`,zIndex:`auto`,paddingTop:`8px`,paddingBottom:`8px`,paddingInlineStart:`8px`,paddingInlineEnd:`11px`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`end`,gap:10},tabIndex:0,onBlur:k,onClick:()=>x(!b),children:[H(`div`,{"data-ui":`gui-custom-select-multi-choose-container`,style:{display:`flex`,gap:8,alignItems:`flex-start`,alignContent:`center`,flexWrap:`wrap`,width:n?`calc(100% - 63px)`:`100%`},children:[!S.length&&H(`span`,{style:{fontSize:13,color:`#8C8C8C`},children:o}),S.map(e=>{if(n){var t,r,i,a;let n=u==null?void 0:u.chip;return H(`div`,{style:{padding:`0px 5px`,display:`flex`,gap:8,backgroundColor:(t=W(n==null?void 0:n.backgroundColor))==null?`#F2F2F2`:t,borderRadius:(r=n==null?void 0:n.cornerRadius)==null?4:r,userSelect:`none`,alignItems:`center`},children:[H(G,A(A({},n==null?void 0:n.title),{},{fontSize:(i=n==null||(a=n.title)==null?void 0:a.fontSize)==null?13:i,text:e.label})),H(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`},onClick:re(e),children:n!=null&&n.removeImage?H(Lo,A({},n.removeImage)):H(Lo,{imageId:`cross`})})]},e.value)}else{var o;let t=u==null?void 0:u.title;return H(`div`,{style:{display:`flex`,userSelect:`none`},children:H(G,A(A({},t),{},{fontSize:(o=t==null?void 0:t.fontSize)==null?13:o,text:e.label}))},e.value)}})]}),r&&S.length?H(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`,zIndex:1},onClick:ie,children:u!=null&&u.clearButton?H(Lo,A({},u.clearButton)):H(Lo,{imageId:`cross`})}):null,r?H(`div`,{style:{width:`1px`,alignSelf:`stretch`,backgroundColor:`#D9D9D9`}}):null,H(zc,{isOpen:b,image:u==null?void 0:u.expandButton}),b&&H(`div`,{"data-ui":`gui-custom-select-dropdown-menu`,ref:te,style:A(A({position:`absolute`},w===`down`?{top:`calc(100% + 1px)`}:{bottom:`calc(100% + 1px)`}),{},{insetInline:0,border:`1px solid #e8e8e8`,width:`100%`,backgroundColor:(g=W(d==null?void 0:d.backgroundColor))==null?`#ffffff`:g,borderRadius:(_=d==null?void 0:d.cornerRadius)==null?8:_,borderStyle:`solid`,borderColor:(v=W(d==null?void 0:d.borderColor))==null?`#D9D9D9`:v,borderWidth:(y=d==null?void 0:d.borderWidth)==null?1:y,maxHeight:`500px`,overflow:`auto`,zIndex:2,boxShadow:`0 3px 15px rgba(0,0,0,.2)`,padding:`8px`,display:`flex`,flexDirection:`column`,gap:`2px`,cursor:`default`}),onClick:e=>e.stopPropagation(),children:t.map(e=>H(Bc,{isChosen:S.some(t=>t.value===e.value),option:e,onOptionClickCallback:O,isHovered:E===e.value,onHover:()=>D(e.value),onHoverEnd:()=>D(null)},e.label))})]})})},Hc=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r})=>{let i=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),a=String(n.id);return H(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&H(G,A(A({},t.title),{},{text:n.text,htmlFor:a})),H(Vs,{name:a,control:e,rules:{required:!!n.required,validate:Rc(n.validators,!!n.required)},render:({field:e})=>{let a=i.find(t=>t.value===e.value);return H(Vc,{options:i,placeholder:n.placeholder,closeMenuOnSelect:!0,name:e.name,value:a?[a]:[],onChange:t=>{let n=t&&Array.isArray(t)&&t.length?t[0].value:null;e.onChange(n)},parentElementRef:r,isMulti:!1,isClearable:!1,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})},Uc=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r})=>{let i=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),a=String(n.id);return H(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&H(G,A(A({},t.title),{},{text:n.text,htmlFor:a})),H(Vs,{name:a,control:e,rules:{required:!!n.required,validate:Rc(n.validators,!!n.required)},render:({field:e})=>{let o=i.filter(t=>{var n;return(n=e.value)==null?void 0:n.includes(t.value)});return H(Vc,{name:a,options:i,placeholder:n.placeholder,closeMenuOnSelect:!1,value:o,onChange:t=>{let n=t.map(e=>e.value);e.onChange(n)},parentElementRef:r,isMulti:!0,isClearable:!0,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})};Rn();var Wc=()=>{let[e,t]=cn(!1);return P(()=>{let e=()=>t(!0),n=()=>t(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,n)}},[]),e};Rn();var Gc=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=cn(!1),s=Wc(),c=String(n.id),l=t.option,u=t.optionSelected,d={backgroundColor:W(u==null?void 0:u.backgroundColor),borderRadius:u.cornerRadius},f={backgroundColor:W(l==null?void 0:l.backgroundColor),borderRadius:l.cornerRadius},p=a&&s?{filter:`drop-shadow(0 0 1px ${yo})`}:{};return H(`div`,{children:H(`label`,{style:A({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},r?d:f),children:[H(`div`,{style:A({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},p),children:H(Lo,A({},r?u.image:l.image))}),H(G,A(A({},r?u.title:l.title),{},{text:e.text})),H(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)})]})},e.id)},Kc=({control:e,layout:t,dataSourceQuestion:n})=>{let r=String(n.id);return H(`div`,{style:{boxSizing:`border-box`},children:H(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[t.title&&H(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:H(G,A(A({},t.title),{},{text:n.text}))}),H(Vs,{name:r,control:e,rules:{required:!!n.required,validate:Rc(n.validators,!!n.required)},render:({field:e})=>{var r;let i=(r=e.value)==null?[]:r;return H(gt,{children:n.options.map(r=>{let a=String(r.id),o=i.includes(a);return H(Gc,{dataSourceQuestion:n,layout:t,option:r,isChosen:o,onToggle:()=>{let t=o?i.filter(e=>e!==a):[...i,a];e.onChange(t)}},r.id)})})}})]})})};Rn();var qc=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=cn(!1),s=Wc(),c=String(n.id),l=t.option,u=t.optionSelected,d={borderRadius:l==null?void 0:l.cornerRadius,background:W(l==null?void 0:l.backgroundColor),borderColor:W(l==null?void 0:l.borderColor),borderWidth:l==null?void 0:l.borderWidth},f={borderRadius:u==null?void 0:u.cornerRadius,background:W(u==null?void 0:u.backgroundColor),borderColor:W(u==null?void 0:u.borderColor),borderWidth:u==null?void 0:u.borderWidth},p=a&&s?{outline:`2px solid ${yo}`}:{};return H(`div`,{style:{display:`flex`,flexGrow:1},children:H(`label`,{style:A(A({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},r?f:d),p),children:[H(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)}),H(G,A(A({},r?u.title:l.title),{},{text:e.text}))]})})},Jc=({control:e,layout:t,dataSourceQuestion:n})=>{let r=String(n.id);return H(`div`,{style:{boxSizing:`border-box`},children:H(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[t.title&&H(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:H(G,A(A({},t.title),{},{text:n.text}))}),H(Vs,{name:r,control:e,rules:{required:!!n.required,validate:Rc(n.validators,!!n.required)},render:({field:e})=>{var r;let i=(r=e.value)==null?[]:r;return H(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:n.options.map(r=>{let a=String(r.id),o=i.includes(a);return H(qc,{dataSourceQuestion:n,layout:t,option:r,isChosen:o,onToggle:()=>{let t=o?i.filter(e=>e!==a):[...i,a];e.onChange(t)}},r.id)})})}})]})})};Rn();var Yc=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i})=>{let[a,o]=cn(!1),s=Wc(),c=String(n.id),l=i(c)===String(e.id),u=t.option,d=t.optionSelected,f={backgroundColor:W(d==null?void 0:d.backgroundColor),borderRadius:d.cornerRadius},p={backgroundColor:W(u==null?void 0:u.backgroundColor),borderRadius:u.cornerRadius},m=a&&s?{filter:`drop-shadow(0 0 1px ${yo})`}:{};return H(`div`,{children:H(`label`,{style:A({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},l?f:p),children:[H(`div`,{style:A({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},m),children:H(Lo,A({},l?d.image:u.image))}),H(G,A(A({},l?d.title:u.title),{},{text:e.text})),H(`input`,A(A({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},r(c,{required:!!n.required,validate:Rc(n.validators,!!n.required)})),{},{value:e.id,type:`radio`,onFocus:()=>o(!0),onBlur:()=>o(!1)}))]})},e.id)},Xc=({layout:e,register:t,watch:n,dataSourceQuestion:r})=>H(`div`,{style:{boxSizing:`border-box`},children:H(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[e.title&&H(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:H(G,A(A({},e.title),{},{text:r.text}))}),r.options.map(i=>H(Yc,{register:t,watch:n,layout:e,option:i,dataSourceQuestion:r},i.id))]})});Rn();var Zc=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i})=>{let[a,o]=cn(!1),s=Wc(),c=String(n.id),l=i(c)===String(e.id),u=t.option,d=t.optionSelected,f={borderRadius:u==null?void 0:u.cornerRadius,background:W(u==null?void 0:u.backgroundColor),borderColor:W(u==null?void 0:u.borderColor),borderWidth:u==null?void 0:u.borderWidth},p={borderRadius:d==null?void 0:d.cornerRadius,background:W(d==null?void 0:d.backgroundColor),borderColor:W(d==null?void 0:d.borderColor),borderWidth:d==null?void 0:d.borderWidth},m=a&&s?{outline:`2px solid ${yo}`}:{};return H(`div`,{style:{display:`flex`,flexGrow:1},children:H(`label`,{style:A(A({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},l?p:f),m),children:[H(`input`,A(A({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},r(c,{required:!!n.required,validate:Rc(n.validators,!!n.required)})),{},{value:e.id,type:`radio`,onFocus:()=>o(!0),onBlur:()=>o(!1)})),H(G,A(A({},l?d.title:u.title),{},{text:e.text}))]})},e.id)},Qc=({layout:e,watch:t,register:n,dataSourceQuestion:r})=>H(`div`,{style:{boxSizing:`border-box`},children:H(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[e.title&&H(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:H(G,A(A({},e.title),{},{text:r.text}))}),H(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:r.options.map(i=>H(Zc,{register:n,watch:t,layout:e,option:i,dataSourceQuestion:r},i.id))})]})}),$c=({children:e,backgroundColor:t,cornerRadius:n=0,isError:r,isRequired:i,validationBorderColor:a,validationBorderWidth:o})=>H(`div`,{style:A({position:`relative`,flexShrink:0,width:`100%`,fontWeight:300,lineHeight:`140%`,backgroundColor:W(t)||`transparent`,borderRadius:n,padding:`16px`,boxSizing:`border-box`,height:`auto`},r&&A(A({},W(a)&&{borderColor:a,borderStyle:`solid`}),o&&{borderWidth:o})),children:[i&&H(`span`,{style:{color:W(a),position:`absolute`,insetInlineStart:`6px`,top:`18px`},children:`*`}),e]}),el=({validationErrorsTypes:e,title:t})=>e?H(`div`,{style:{width:`100%`,fontSize:12},children:Object.entries(e).map(([e,n])=>H(G,A(A({},t),{},{text:n}),e))}):null,tl=({layout:e,dataSourceQuestion:t,register:n})=>{var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v;let y=String(t.id);return H(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[H(G,A(A({},e.title),{},{text:t.text,htmlFor:y})),H(`input`,A(A({},n(y,{required:!!t.required,validate:Rc(t.validators,!!t.required)})),{},{id:y,type:(e=>e?e===ro.EMAIL?`email`:e===ro.FREE_TEXT?`text`:e===ro.NUMBER?`number`:e===ro.SECURE?`password`:`text`:`text`)((r=e.textField)==null?void 0:r.inputType),style:{fontFamily:(i=e==null||(a=e.textField)==null?void 0:a.fontName)==null?`sans-serif`:i,fontSize:(o=e==null||(s=e.textField)==null?void 0:s.fontSize)==null?15:o,color:(c=W(e==null||(l=e.textField)==null?void 0:l.fontColor))==null?`#000000`:c,height:`42px`,borderWidth:(u=e==null||(d=e.textField)==null?void 0:d.borderWidth)==null?1:u,borderColor:(f=W(e==null||(p=e.textField)==null?void 0:p.borderColor))==null?`#d9d9d9`:f,borderStyle:`solid`,borderRadius:(m=e==null||(h=e.textField)==null?void 0:h.cornerRadius)==null?8:m,padding:`11px`,boxSizing:`border-box`,backgroundColor:(g=W(e==null||(_=e.textField)==null?void 0:_.backgroundColor))==null?`#FFFFFF`:g,outlineColor:yo},placeholder:(v=t.placeholder)==null?``:v,"data-id":y}))]})},nl=({layout:e,dataSourceQuestion:t,register:n})=>{var r,i,a,o,s,c,l,u,d,f,p,m,h;let g=String(t.id);return H(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[H(G,A(A({},e.title),{},{text:t.text,htmlFor:g})),H(`textarea`,A(A({},n(g,{required:!!t.required,validate:Rc(t.validators,!!t.required)})),{},{id:g,placeholder:(r=t.placeholder)==null?``:r,onInput:e=>{e.currentTarget.style.height=`auto`,e.currentTarget.style.height=`${e.currentTarget.scrollHeight-15}px`},"data-id":g,style:{fontFamily:`sans-serif`,fontSize:(i=e==null||(a=e.textField)==null?void 0:a.fontSize)==null?15:i,color:(o=W(e==null||(s=e.textField)==null?void 0:s.fontColor))==null?`#000000`:o,resize:`none`,overflow:`hidden`,height:`42px`,minHeight:`42px`,borderWidth:(c=e==null||(l=e.textField)==null?void 0:l.borderWidth)==null?1:c,borderColor:(u=W(e==null||(d=e.textField)==null?void 0:d.borderColor))==null?`#d9d9d9`:u,borderStyle:`solid`,borderRadius:(f=e==null||(p=e.textField)==null?void 0:p.cornerRadius)==null?8:f,padding:`11px`,boxSizing:`border-box`,backgroundColor:(m=W(e==null||(h=e.textField)==null?void 0:h.backgroundColor))==null?`#FFFFFF`:m,outlineColor:yo}}))]})},rl,il=class e extends ua{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=ua.getErrorKey(t,xo);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};rl=il,rl.MODULE=bo,rl.ERROR_ENUM_NAME=`GuiModuleError`,rl.SHORT_CODE=`GM`,on(),Rn();var al=({header:e,title:t,buttons:n,footer:r,questions:i,dataSource:a,properties:o,backgroundColor:s})=>{var c;let l=ha.FORM,{perform:u}=Ka();if(!a||(a==null?void 0:a.questions.length)===0)return u(new il({errorCode:xo.DECODING_FAILED,message:`No dataSource or no data for questions in the dataSource`})),null;if(!(i!=null&&i.itemTypes)||Array.isArray(i==null?void 0:i.itemTypes)&&(i==null||(c=i.itemTypes)==null?void 0:c.length)===0)return u(new il({errorCode:xo.DECODING_FAILED,message:`No questions in the itemTypes field or itemTypes is not an array`})),null;let d=o?Ao(a.questions,o):{},f=dn(null),{register:p,handleSubmit:m,formState:{errors:h},reset:g,watch:_,control:v}=Lc({criteriaMode:`all`,defaultValues:d});return H(Go,{header:e,footer:r,backgroundColor:s,children:H(`form`,{onSubmit:m(e=>{u(Oo(e),l),g()}),style:{height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},noValidate:!0,children:[H(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`,backgroundColor:W(i==null?void 0:i.backgroundColor)||`transparent`},ref:f,children:[t&&H(`div`,{style:{lineHeight:`39.2px`,width:`100%`},children:H(G,A({},t))}),H(`div`,{"data-ui":`gui-questions`,part:`gui-questions`,style:{width:`100%`,display:`flex`,gap:`10px`,flexDirection:`column`},children:a.questions.map(e=>{var t;let n=a.static?((e,t)=>t.find(t=>{var n;if((n=t.questionIds)!=null&&n.length)return t.questionIds.find(t=>e===t)}))(String(e.id),i.itemTypes)||((e,t)=>t.find(t=>!t.questionIds&&t.answerType===e))(e.answerType,i.itemTypes):i.itemTypes.find(t=>t.answerType===e.answerType);if(!n){u(new il({errorCode:xo.DECODING_FAILED,message:`The question template has not been found`}));return}let r=n==null?void 0:n.displayType,o=e.id in h&&((t=h[e.id])==null?void 0:t.types);return H(gt,{children:[H($c,{backgroundColor:n==null?void 0:n.backgroundColor,cornerRadius:n==null?void 0:n.cornerRadius,isError:!!o,isRequired:e.required,validationBorderColor:n==null?void 0:n.validationBorderColor,validationBorderWidth:n==null?void 0:n.validationBorderWidth,children:[r===no.TEXT_EXPANDABLE&&H(nl,{layout:n,dataSourceQuestion:e,register:p}),r===no.TEXT_SINGLE_LINE&&H(tl,{layout:n,dataSourceQuestion:e,register:p}),r===no.SELECTOR_OPTIONS&&H(Xc,{layout:n,dataSourceQuestion:e,watch:_,register:p}),r===no.SELECTOR_BUTTONS&&H(Qc,{layout:n,dataSourceQuestion:e,watch:_,register:p}),r===no.SELECTOR_DROPDOWN&&H(Hc,{control:v,layout:n,dataSourceQuestion:e,parentElementRef:f}),r===no.MULTI_SELECTOR_DROPDOWN&&H(Uc,{control:v,layout:n,dataSourceQuestion:e,parentElementRef:f}),r===no.MULTI_SELECTOR_OPTIONS&&H(Kc,{control:v,layout:n,dataSourceQuestion:e}),r===no.MULTI_SELECTOR_BUTTONS&&H(Jc,{control:v,layout:n,dataSourceQuestion:e})]}),o&&H(el,{validationErrorsTypes:o,title:n.validationMessage})]},e.id)})})]}),!!(n!=null&&n.length)&&H(`div`,{style:{display:`flex`,width:`100%`,flexGrow:0,flexShrink:0,justifyContent:`center`,alignItems:`flex-end`,padding:`2px`},children:n.map((e,t)=>H(Ho,A({dataTestId:`question-button`},e),t))})]})})},ol={display:`none`},sl={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,backgroundColor:`#7e57c5`,cursor:`pointer`},cl={position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};Rn();var ll=({header:e,footer:t,buttons:n,backgroundColor:r,selectionLimit:i})=>{var a;let{perform:o}=Ka(),s=dn(null),c=typeof i==`number`&&(i===0||i>1),l=function(){var e=b(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{o({cancel:!1,permissionDenied:!1,files:(yield Promise.allSettled(n.map(function(){var e=b(function*(e){return{content:yield jo(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value)})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}();return H(Go,{header:e,footer:t,backgroundColor:r,children:H(gt,{children:H(`div`,{style:A(A({},cl),{},{justifyContent:`center`}),children:[H(`input`,A(A({style:ol,ref:s,type:`file`,accept:`image/*`},c?{multiple:!0}:{}),{},{onInput:l})),H(`button`,{style:sl,onClick:()=>{var e;(e=s.current)==null||e.showPicker()},children:H(Lo,{imageId:n==null||(a=n[0])==null||(a=a.image)==null?void 0:a.imageId})})]})})})},ul={display:`none`},dl={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,background:`#7e57c5`,cursor:`pointer`},fl={position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};Rn();var pl=({header:e,footer:t,backgroundColor:n,buttons:r,selectionLimit:i})=>{var a;let{perform:o}=Ka(),s=dn(null),c=typeof i==`number`&&(i===0||i>1),l=function(){var e=b(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{o({cancel:!1,permissionDenied:!1,files:(yield Promise.allSettled(n.map(function(){var e=b(function*(e){return{content:yield jo(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value)})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}(),u=function(){var e=b(function*(){var e;(e=s.current)==null||e.showPicker()});return function(){return e.apply(this,arguments)}}();return P(()=>{b(function*(){if(Zr.isDesktop)return;let e=yield Mo();(e===`denied`||e===`error`)&&o({cancel:!1,permissionDenied:!0,files:[]})})()},[]),H(Go,{header:e,footer:t,backgroundColor:n,children:H(gt,{children:H(`div`,{style:A(A({},fl),{},{justifyContent:`center`}),children:[H(`input`,A(A({style:ul,ref:s,type:`file`,accept:`image/*`,capture:`user`},c?{multiple:!0}:{}),{},{onInput:l})),H(`button`,{style:dl,onClick:u,children:H(Lo,{imageId:r==null||(a=r[0])==null||(a=a.image)==null?void 0:a.imageId})})]})})})},ml=function(){var e=b(function*(){try{var e;let t=yield navigator.permissions.query({name:`geolocation`});return(e=t==null?void 0:t.state)==null?`unknown`:e}catch(e){return`unknown`}});return function(){return e.apply(this,arguments)}}(),hl=function(){var e=b(function*(){try{return yield navigator.permissions.query({name:`geolocation`})}catch(e){return null}});return function(){return e.apply(this,arguments)}}(),gl=function(){var e=b(function*(e){return new Promise(t=>{if(!navigator.geolocation)return t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}});navigator.geolocation.getCurrentPosition(e=>t({location:{locationState:`ok`,lat:e.coords.latitude,lon:e.coords.longitude,error:null}}),e=>{e.code===1?t({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}}):t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}})},e)})});return function(t){return e.apply(this,arguments)}}(),_l={height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},vl={flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`},yl={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},bl={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:1.61},xl={marginBottom:20,lineHeight:`39.2px`,width:`100%`},Sl={lineHeight:`28px`,fontWeight:`400`,width:`100%`},Cl={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},wl={marginBottom:`10px`,fontWeight:500,display:`-webkit-box`,"-webkit-box-orient":`vertical`,"-webkit-line-clamp":2,overflow:`hidden`,textOverflow:`ellipsis`,lineClamp:2},Tl={marginBottom:`84px`,fontWeight:400},El={height:`100%`,overflow:`scroll`,maxHeight:`calc(100dvh - 190px)`},Dl={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`};Rn();var Ol=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o,popups:s,askEveryTime:c,getLocationTimeout:l})=>{var u;let d=ha.FORM,{perform:f}=Ka(),{setIsProcessingCallback:p}=qa(),[m,h]=cn(!1),g=()=>{var e;!(v==null||(e=v.popups)==null)&&e.system_restricted||h(!0)},_=()=>{var e;!(v==null||(e=v.popups)==null)&&e.system_restricted||h(!1)},{devSettings:v}=Ga(),y=!!(!(v==null||(u=v.popups)==null||(u=u.system_restricted)==null)&&u.isOpen);P(()=>{v&&h(y)},[y,v]);let x={enableHighAccuracy:!0,timeout:typeof l==`number`&&l>0?l*1e3:15e3,maximumAge:6e4},S=s==null?void 0:s.find(e=>e.reason===wo.SYSTEM_RESTRICTED);un(()=>{Zr.isSafari||c||p==null||p(!0)},[]),P(()=>{if(Zr.isSafari||c)return;let e=!0;return b(function*(){if((yield ml())!==`granted`){p==null||p(!1);return}let t=yield gl(x);e&&f(t,d)})(),()=>{Zr.isSafari||c||(e=!1)}},[]),P(()=>{if(Zr.isSafari)return;let e=!0,t=null;return b(function*(){let n=yield hl();n&&(t=n,n.onchange=b(function*(){if(n.state===`denied`&&(p==null||p(!0),f({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}},d)),n.state===`granted`){p==null||p(!0);let t=yield gl(x);if(!e)return;f(t,d)}}))})(),()=>{Zr.isSafari||(e=!1,t&&(t.onchange=null))}},[]);let C=function(){var e=b(function*(e){e.preventDefault();let t=yield ml();if(t===`denied`){g();return}t===`prompt`&&(yield gl()),t===`granted`&&f(yield gl(x),d)});return function(t){return e.apply(this,arguments)}}(),w=function(){var e=b(function*(e){if(e.preventDefault(),(yield ml())===`denied`){g();return}p==null||p(!0),f(yield gl(x),d)});return function(t){return e.apply(this,arguments)}}();return H(Go,{header:t,footer:n,backgroundColor:o,children:[H(`div`,{style:_l,children:[H(`div`,{part:`gui-geolocation-screen-container`,"data-ui":`gui-geolocation-screen-container`,id:`geolocation-screen-container`,style:vl,children:[r&&H(`div`,{style:bl,children:H(Lo,A({},r))}),e&&H(`div`,{style:xl,children:H(G,A({},e))}),i&&H(`div`,{style:Sl,children:H(Ko,A({},i))})]}),!!(a!=null&&a.length)&&H(`div`,{style:{display:`flex`,flexDirection:`column`},children:a.map((e,t)=>H(`div`,{style:{padding:`5px`},children:H(Ho,A(A({dataTestId:`question-button`},e),e.type===`FORM`?{onClick:Zr.isSafari?w:C}:{}))},t))})]}),S&&m&&H(`div`,{style:yl,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),_()},children:H(`div`,{style:A(A({},Cl),{},{borderRadius:(S==null?void 0:S.cornerRadius)||`27px`,backgroundColor:(S==null?void 0:S.backgroundColor)||`#ffffff`}),children:[H(`div`,{style:wl,children:H(G,A({fontSize:`24px`},S.title))}),H(`div`,{style:Tl,children:H(`div`,{style:El,children:H(G,A({fontSize:`17px`},S.message))})}),S.actionButton1&&H(`div`,{style:Dl,children:H(Ho,A(A({dataTestId:`question-button`},S.actionButton1),S.actionButton1.type===`FORM`?{onClick:e=>{e.preventDefault(),_()}}:{}))})]})})]})},kl={[oo.TOP]:`flex-start`,[oo.CENTER]:`center`,[oo.BOTTOM]:`flex-end`},Al=kl[oo.TOP],jl=kl[oo.TOP],Ml=e=>({[so.START]:`flex-start`,[so.LEFT]:e===_a.RTL?`flex-end`:`flex-start`,[so.CENTER]:`center`,[so.RIGHT]:e===_a.RTL?`flex-start`:`flex-end`,[so.END]:`flex-end`}),Nl=({elements:e,verticalAlignment:t,horizontalAlignment:n,backgroundColor:r,cornerRadius:i,paddings:a})=>{let{layoutDirection:o}=Ya(),s=Ml(o),c=s[so.START];return H(`div`,{"data-ui":`gui-row`,part:`gui-row`,style:A({width:`100%`,display:`flex`,flexDirection:`row`,alignItems:t&&kl[t]||jl,justifyContent:n&&s[n]||c,backgroundColor:W(r)||`transparent`,borderRadius:i},fo(a)),children:e==null?void 0:e.map(e=>{let t=e.type===ao.IMAGE,n=e.type===ao.IMAGE_BUTTON,r=e.type===ao.SPACER,i=(t||n||r)&&e.content.width;return H(`div`,{"data-ui":`gui-row-item`,part:`gui-row-item`,style:A(A(A({flex:i?`0 0 auto`:`${e.content.weight||1} 1 0`},i&&{width:e.content.width}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),children:Ll(e)})})})},Pl=({backgroundColor:e,cornerRadius:t})=>H(`div`,{"data-ui":`gui-spacer`,part:`gui-spacer`,style:{width:`100%`,height:`100%`,backgroundColor:W(e)||`transparent`,borderRadius:t}});Rn();var Fl=e=>{let{image:t,responseBody:n,paddings:r}=e,{failedAssets:i}=Ja(),a=mo(t,i),[o,s]=cn(0),c=a[o];if(!c)return null;let{imageId:l,imageURL:u,base64:d,contentMode:f=eo.ASPECT_FILL,cornerRadius:p,backgroundColor:m}=c,{perform:h}=Ka(),[g,_]=cn(!0),v=g&&u,y=()=>{_(!1)},b=()=>{s(e=>e+1)},x=()=>{let e=JSON.parse(JSON.stringify(n));Do(e),h(e,ha.DATA)},S={width:`100%`,height:`100%`},C;return d&&(C=H(`img`,{style:A(A({},S),{},{objectFit:ho(f),borderRadius:p,backgroundColor:W(m)||`transparent`,display:`block`}),src:d,onError:b})),l&&(C=H(vo,{type:l in _o?l:`default`,contentMode:f,cornerRadius:p,backgroundColor:W(m)||`transparent`,isFullSize:!0})),u&&(C=H(gt,{children:[v&&H(`div`,{style:A(A({},S),{},{backgroundColor:`#e0e0e0`,borderRadius:p})}),H(`img`,{style:A(A({},S),{},{objectFit:ho(f),borderRadius:p,backgroundColor:W(m)||`transparent`,display:v?`none`:`block`}),src:u,onLoad:y,onError:b})]})),H(`button`,{type:`button`,style:A({width:`100%`,height:`100%`,appearance:`none`,background:`none`,border:0,padding:0,margin:0,display:`inline-flex`,cursor:`pointer`},fo(r)),onClick:x,children:C})},Il={[ao.LABEL]:e=>H(G,{text:e.content.text,fontName:e.content.fontName,fontSize:e.content.fontSize,fontColor:e.content.fontColor,alignment:e.content.alignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings,fontWeight:e.content.fontWeight,isGenericTemplate:!0}),[ao.IMAGE]:e=>H(Lo,{imageId:e.content.imageId,imageURL:e.content.imageURL,base64:e.content.base64,contentMode:e.content.contentMode,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,isFullSize:!0,prepareRequired:e.content.prepareRequired,failurePolicy:e.content.failurePolicy,timeout:e.content.timeout,placeholderImage:e.content.placeholderImage}),[ao.IMAGE_BUTTON]:e=>H(Fl,{image:{imageId:e.content.image.imageId,imageURL:e.content.image.imageURL,base64:e.content.image.base64,contentMode:e.content.image.contentMode,cornerRadius:e.content.image.cornerRadius,backgroundColor:e.content.image.backgroundColor,prepareRequired:e.content.image.prepareRequired,failurePolicy:e.content.image.failurePolicy,timeout:e.content.image.timeout,placeholderImage:e.content.image.placeholderImage},responseBody:e.content.responseBody,paddings:e.content.paddings}),[ao.BUTTON]:e=>H(Ho,{title:e.content.title,image:e.content.image,responseBody:e.content.responseBody,highlightColor:e.content.highlightColor,borderColor:e.content.borderColor,borderWidth:e.content.borderWidth,type:e.content.type,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings,isGenericTemplate:!0}),[ao.COLUMN]:e=>H(Rl,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[ao.ROW]:e=>H(Nl,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,verticalAlignment:e.content.verticalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[ao.SPACER]:e=>H(Pl,{backgroundColor:e.content.backgroundColor,cornerRadius:e.content.cornerRadius})};function Ll(e){let t=Il[e.type];return t?t(e):null}var Rl=({elements:e,horizontalAlignment:t,backgroundColor:n,cornerRadius:r,paddings:i})=>{let{layoutDirection:a}=Ya(),o=Ml(a),s=o[so.START];return H(`div`,{"data-ui":`gui-column`,part:`gui-column`,style:A({display:`flex`,flexDirection:`column`,alignItems:t&&o[t]||s,backgroundColor:W(n)||`transparent`,borderRadius:r},fo(i)),children:e==null?void 0:e.map(e=>{let t=e.type===ao.IMAGE,n=e.type===ao.IMAGE_BUTTON,r=e.type===ao.SPACER,i=(t||n||r)&&e.content.width;return H(`div`,{"data-ui":`gui-column-item`,part:`gui-column-item`,style:A(A(A(A({},!i&&{alignSelf:`stretch`}),i&&{width:e.content.width}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),children:Ll(e)})})})},zl=({topColumn:e,mainColumn:t,bottomColumn:n,backgroundColor:r=`#ffffff00`})=>H(`div`,{"data-ui":`gui-scaffold-container`,part:`gui-scaffold-container`,id:`scaffold-container`,style:{display:`flex`,flexDirection:`column`,height:`100%`,backgroundColor:W(r)||`transparent`},children:[e&&H(`div`,{"data-ui":`gui-top-column`,part:`gui-top-column`,style:{flex:`0 0 auto`},children:H(Rl,A({},e))}),t&&H(`div`,{"data-ui":`gui-main-column-container`,part:`gui-main-column-container`,style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`,overflowX:`hidden`,backgroundColor:W(t.backgroundColor)||`transparent`},children:H(`div`,{"data-ui":`gui-main-column`,part:`gui-main-column`,style:{display:`flex`,flexDirection:`column`,minHeight:`100%`,justifyContent:t.verticalAlignment&&kl[t.verticalAlignment]||Al},children:H(Rl,A(A({},t),{},{backgroundColor:`transparent`}))})}),n&&H(`div`,{"data-ui":`gui-bottom-column`,part:`gui-bottom-column`,style:{flex:`0 0 auto`},children:H(Rl,A({},n))})]}),Bl=({rootElement:e})=>{let{type:t,content:n}=e;if(t===io.SCAFFOLD){let{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i}=n;return H(zl,{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i})}return null};zr();var Vl=Object.defineProperty,Hl=Object.getOwnPropertySymbols,Ul=Object.prototype.hasOwnProperty,Wl=Object.prototype.propertyIsEnumerable,Gl=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kl=(e,t)=>{for(var n in t||(t={}))Ul.call(t,n)&&Gl(e,n,t[n]);if(Hl)for(var n of Hl(t))Wl.call(t,n)&&Gl(e,n,t[n]);return e},ql=(e,t)=>{var n={};for(var r in e)Ul.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hl)for(var r of Hl(e))t.indexOf(r)<0&&Wl.call(e,r)&&(n[r]=e[r]);return n},Jl;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i;for(i=0;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(Jl||(Jl={})),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||(e.QrCode={}))})(Jl||(Jl={})),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(Jl||(Jl={}));var Yl=Jl,Xl={L:Yl.QrCode.Ecc.LOW,M:Yl.QrCode.Ecc.MEDIUM,Q:Yl.QrCode.Ecc.QUARTILE,H:Yl.QrCode.Ecc.HIGH},Zl=128,Ql=`L`,$l=`#FFFFFF`,eu=`#000000`,tu=!1,nu=1,ru=4,iu=0,au=.1;function ou(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function su(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function cu(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*au),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function lu(e,t){return t==null?e?ru:iu:Math.max(Math.floor(t),0)}function uu({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=I.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...Yl.QrSegment.makeSegments(t)),e),[]);return Yl.QrCode.encodeSegments(r,Xl[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=I.useMemo(()=>{let e=c.getModules(),t=lu(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:cu(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var du=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}(),fu=I.forwardRef(function(e,t){let n=e,{value:r,size:i=Zl,level:a=Ql,bgColor:o=$l,fgColor:s=eu,includeMargin:c=tu,minVersion:l=nu,boostLevel:u,marginSize:d,imageSettings:f}=n,p=ql(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=ql(p,[`style`]),g=f==null?void 0:f.src,_=I.useRef(null),v=I.useRef(null),y=I.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=I.useState(!1),{margin:S,cells:C,numCells:w,calculatedImageSettings:T}=uu({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});I.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=C,r=v.current,a=T!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&T.excavation!=null&&(n=su(C,T.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/w*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,w,w),t.fillStyle=s,du?t.fill(new Path2D(ou(n,S))):C.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+S,n+S,1,1)})}),T&&(t.globalAlpha=T.opacity),a&&t.drawImage(r,T.x+S,T.y+S,T.w,T.h)}}),I.useEffect(()=>{x(!1)},[g]);let E=Kl({height:i,width:i},m),D=null;return g!=null&&(D=I.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:T==null?void 0:T.crossOrigin})),I.createElement(I.Fragment,null,I.createElement(`canvas`,Kl({style:E,height:i,width:i,ref:y,role:`img`},h)),D)});fu.displayName=`QRCodeCanvas`;var pu=I.forwardRef(function(e,t){let n=e,{value:r,size:i=Zl,level:a=Ql,bgColor:o=$l,fgColor:s=eu,includeMargin:c=tu,minVersion:l=nu,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=ql(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=uu({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=su(g,v.excavation)),b=I.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=ou(y,h);return I.createElement(`svg`,Kl({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&I.createElement(`title`,null,d),I.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),I.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});pu.displayName=`QRCodeSVG`;var mu={width:`100%`,height:`auto`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,marginBottom:`40px`},J={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},hu={marginBottom:20,lineHeight:`140%`},gu={fontWeight:`400`,lineHeight:`140%`},_u=({header:e,footer:t,buttons:n,title:r,description:i,qr:a,url:o,backgroundColor:s})=>{let{perform:c}=Ka();return!o&&typeof o!=`string`?(c(new il({errorCode:xo.DECODING_FAILED,message:`No QR URL in the client config`})),null):H(Go,{header:e,footer:t,buttons:n,backgroundColor:s,children:H(`div`,{part:`gui-device-transfer-screen-container`,"data-ui":`gui-device-transfer-screen-container`,id:`device-transfer-screen-container`,style:A(A({},J),{},{justifyContent:`flex-start`}),children:[H(`div`,{part:`gui-device-transfer-qr-container`,style:mu,children:H(pu,{value:o,size:300,fgColor:a==null?void 0:a.color})}),r&&H(`div`,{style:hu,children:H(G,A({},r))}),i&&H(`div`,{style:gu,children:H(Ko,A({},i))})]})})},vu=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.DONE=`done`,e}({}),yu=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.SUCCESS=`success`,e.ERROR=`error`,e}({}),bu=function(e){return e.OK=`ok`,e.SIZE=`size`,e.FORMAT=`format`,e}({});function xu(e){if(e<1024)return`${e} B`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)} kB`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)} MB`}function Su(e){let t=e.lastIndexOf(`.`);return t<0?``:e.slice(t).toLowerCase()}function Cu(e,t){let n=Su(e);return n?new Set(t.map(e=>e.startsWith(`.`)?e.toLowerCase():`.${e.toLowerCase()}`)).has(n):!1}function wu(e,t,n){return e.size>t?bu.SIZE:Cu(e.name,n)?bu.OK:bu.FORMAT}function Tu(e){return`${e.name}\0${e.size}\0${e.lastModified}`}var Eu=e=>{let t=getComputedStyle(e),n=parseFloat(t.lineHeight);if(!Number.isFinite(n)||n<=0){let e=parseFloat(t.fontSize);n=Number.isFinite(e)?e*1.35:20}return e.scrollHeight>n+2},Du={display:`grid`,gridTemplateColumns:`auto minmax(0, 1fr) auto auto`,columnGap:`8px`,minWidth:0,width:`100%`},Ou={width:`20px`,height:`20px`,color:`#555`},ku={fontSize:`15px`,wordBreak:`break-all`},Au={display:`flex`,gap:3},ju={display:`flex`,alignItems:`center`,justifyContent:`center`,height:`36px`,width:`36px`},Mu={border:`none`,background:`none`,cursor:`pointer`,padding:0};Rn();var Nu=({uploadFile:e,uploadPhase:t,onRetryFile:n,onRemoveFile:r})=>{let[i,a]=cn(!1),o=dn(null),s=mn(()=>{let e=o.current;e&&a(Eu(e))},[]);return un(()=>{s();let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>s());return t.observe(e),()=>t.disconnect()},[e.file.name,e.file.size,e.uploadState,t,s]),H(`div`,{style:A(A({},Du),{},{alignItems:i?`start`:`center`}),children:[H(`div`,{style:Ou,children:H(vo,{type:`file`})}),H(`div`,{ref:o,children:H(`span`,{style:ku,children:e.file.name})}),H(`div`,{children:H(`span`,{style:ku,children:[` (`,xu(e.file.size),`)`]})}),H(`div`,{style:Au,children:[H(`div`,{style:ju,children:e.uploadState===yu.ERROR&&t===vu.DONE&&H(`button`,{type:`button`,"aria-label":`Retry`,onClick:()=>n(e.id),style:Mu,children:H(vo,{type:`reload`})})}),H(`div`,{style:ju,children:[(t===vu.UPLOADING||e.uploadState===yu.UPLOADING)&&e.uploadState!==yu.SUCCESS&&H(vo,{type:`loader`}),e.uploadState===yu.SUCCESS&&H(vo,{type:`ok`}),t!==vu.UPLOADING&&(e.uploadState===yu.IDLE||e.uploadState===yu.ERROR)&&H(`button`,{type:`button`,"aria-label":`Remove`,onClick:()=>r(e.id),style:Mu,children:H(vo,{type:`close_icon`})})]})]})]})},Pu=({range:e,color:t=`#00A028`})=>H(`div`,{style:{position:`absolute`,bottom:`2px`,left:0,right:0,marginLeft:`8px`,marginRight:`8px`,height:`2px`,overflow:`hidden`},children:H(`div`,{style:{height:`100%`,width:`${Math.round(e*100)}%`,backgroundColor:t,transition:`width 0.15s ease-out`}})});Rn();var Fu=({settings:e,errorMessages:t,serviceToken:n,uploadFileToTemp:r,abortRequest:i})=>{var a;let{perform:o}=Ka(),[s,c]=cn([]),[l,u]=cn(vu.IDLE),d=dn([]),f=dn(!1);d.current=s;let p=s.some(e=>e.clientValidation!==bu.OK),m=s.filter(e=>e.clientValidation===bu.OK),h=m.length>0&&m.every(e=>e.uploadState===yu.SUCCESS&&e.tempFileId),g=l===vu.UPLOADING,_=l===vu.DONE&&h&&!p,{devSettings:v}=Ga(),y=v==null||(a=v.screens)==null||(a=a[Qa.UPLOAD_FILES])==null?void 0:a.files,x=!!y,S=e=>{x||g||c(t=>{let n=t.find(t=>t.id===e);return!n||n.uploadState===yu.UPLOADING||n.uploadState===yu.SUCCESS?t:t.filter(t=>t.id!==e)})},C=mn(function(){var e=b(function*(e){if(!n||!r)return c(n=>n.map(n=>n.id===e.id?A(A({},n),{},{uploadState:yu.ERROR,serverError:t.fileNotLoaded}):n)),null;try{var i;c(t=>t.map(t=>t.id===e.id?A(A({},t),{},{uploadState:yu.UPLOADING,progressBarRange:0}):t));let n=yield r(e.file,(t,n)=>{let r=n>0?t/n:0;c(t=>t.map(t=>t.id===e.id?A(A({},t),{},{progressBarRange:r,uploadState:yu.UPLOADING}):t))});if(n.code===0&&`tempFileId`in n.data){let t=n.data.tempFileId;return c(n=>n.map(n=>n.id===e.id?A(A({},n),{},{uploadState:yu.SUCCESS,progressBarRange:1,tempFileId:t}):n)),{tempFileId:t,name:e.file.name,size:e.file.size}}let a=n.data,o=`httpCode`in a?(i=a.what)==null?t.fileNotLoaded:i:t.fileNotLoaded;return c(t=>t.map(t=>t.id===e.id?A(A({},t),{},{uploadState:yu.ERROR,serverError:o}):t)),null}catch(n){return c(n=>n.map(n=>n.id===e.id?A(A({},n),{},{uploadState:yu.ERROR,serverError:t.fileNotLoaded}):n)),null}});return function(t){return e.apply(this,arguments)}}(),[n,r]),w=function(){var t=b(function*(t){var n;if(g||_)return;let r=Array.from((n=t.currentTarget.files)==null?[]:n);if(t.currentTarget.value=``,!r.length)return;let i=[];c(t=>{let n=new Set(t.map(e=>Tu(e.file))),a=Math.max(0,e.selectionLimit-t.length),o=[...t];for(let t of r){if(a<=0)break;let r=Tu(t);if(n.has(r))continue;n.add(r);let s=wu(t,e.fileMaxSize,e.supportedFileFormats),c={id:Yr(),file:t,clientValidation:s,uploadState:yu.IDLE,progressBarRange:0};o.push(c),s===bu.OK&&i.push(c),--a}return o}),i.length});return function(e){return t.apply(this,arguments)}}(),T=function(){var e=b(function*(){if(x||g||_||p)return;c(e=>e.map(e=>A(A({},e),{},{serverError:void 0})));let e=d.current.filter(e=>e.clientValidation===bu.OK).map(e=>e.id);if(!e.length)return;u(vu.UPLOADING),f.current=!1;let t=[],n=!1;for(let r of e){if(f.current)break;let e=d.current.find(e=>e.id===r);if(!e||e.clientValidation!==bu.OK)continue;if(e.uploadState===yu.SUCCESS&&e.tempFileId){t.push(e.tempFileId);continue}let i=yield C(e);if(f.current)break;i?t.push(i.tempFileId):n=!0}!n&&t.length===e.length&&o({files:t,upload_complete:!0},ha.DATA),u(vu.DONE)});return function(){return e.apply(this,arguments)}}(),E=function(){var e=b(function*(e){if(x||l===vu.UPLOADING||_)return;f.current=!1;let t;c(n=>{let r=n.map(t=>t.id===e?A(A({},t),{},{uploadState:yu.IDLE,serverError:void 0,progressBarRange:0}):t);return t=r.find(t=>t.id===e),r}),!(!t||t.clientValidation!==bu.OK)&&((yield C(t))&&!f.current&&c(e=>{let t=e.filter(e=>e.clientValidation===bu.OK);return t.length>0&&t.every(e=>e.uploadState===yu.SUCCESS&&e.tempFileId)&&o({files:t.map(e=>e.tempFileId),upload_complete:!0},ha.DATA),e}),u(vu.DONE))});return function(t){return e.apply(this,arguments)}}(),D=()=>{f.current=!0,i==null||i()};return P(()=>()=>D(),[]),P(()=>{v&&y&&(c(y.map((e,t)=>{var n,r;return{id:t.toString(),file:new File([],(n=e.name)==null?`test-file-${t}.jpg`:n),clientValidation:e.clientValidation,uploadState:e.uploadState,progressBarRange:(r=e.progressBarRange)==null?0:r}})),u(vu.DONE))},[v,y]),{uploadFileRows:s,uploadPhase:l,pickFiles:e=>{x||g||_||e()},removeFile:S,onChangeFileInput:w,submit:T,retryFile:E}},Iu={position:`relative`,display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,minHeight:0,fontFamily:`-apple-system, sans-serif`},Lu={flex:`1 1 auto`,minHeight:0,overflowY:`auto`,width:`100%`,display:`flex`,flexDirection:`column`,alignItems:`stretch`},Ru={marginBottom:`8px`},zu={minHeight:`54px`,position:`relative`,backgroundColor:`#fff`,borderRadius:`12px`,padding:`8px 16px`,marginBottom:`2px`},Bu={boxShadow:`inset 0 0 0 2px #d32f2f`},Vu={fontSize:`13px`,color:`#d32f2f`,marginTop:`4px`,marginBottom:`4px`,marginLeft:`2px`},Hu={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},Uu={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},Wu={marginBottom:`10px`,fontWeight:600},Gu={marginBottom:`84px`},Ku={maxHeight:`calc(100dvh - 190px)`,overflow:`auto`},qu={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`};Rn();var Ju=e=>{var t,n,r,i,a;let{title:o,description:s,header:c,buttons:l,footer:u,backgroundColor:d,popups:f,settings:p,errorMessages:m,serviceToken:h,uploadFileToTemp:g,abortRequest:_}=e,v=dn(null),[y,b]=cn(!1),[x,S]=cn(!1),{uploadFileRows:C,uploadPhase:w,pickFiles:T,removeFile:E,onChangeFileInput:D,submit:ee,retryFile:te}=Fu({serviceToken:h,settings:p,errorMessages:m,uploadFileToTemp:g,abortRequest:_}),{devSettings:O}=Ga(),ne=O==null||(t=O.popups)==null?void 0:t.files_not_selected,k=O==null||(n=O.popups)==null?void 0:n.files_limit_exceeded,re=!!ne||!!k||!!(!(O==null||(r=O.screens)==null)&&r[Qa.UPLOAD_FILES]),ie=!!(ne!=null&&ne.isOpen),ae=!!(k!=null&&k.isOpen),oe=f==null?void 0:f.find(e=>e.reason===wo.FILES_NOT_SELECTED),se=f==null?void 0:f.find(e=>e.reason===wo.FILES_LIMIT_EXCEEDED),ce=()=>{re||b(!1)},le=()=>{re||S(!1)},ue=e=>e===`size`?m.invalidFileSize:e===`format`?m.invalidFileFormat:null,de=e=>{if(!re&&e){if(e.actionId===`SELECT_FILES`){if(C.length>=p.selectionLimit)return S(!0);T(()=>{var e;return(e=v.current)==null?void 0:e.click()})}else if(e.actionId===`SUBMIT_FILES`){if(C.length===0)return b(!0);ee()}}};return P(()=>{O&&(b(ie),S(ae))},[ie,ae,O]),H(Go,{header:c,footer:u,backgroundColor:d==null?`#f5f5f5`:d,children:[H(`div`,{style:Iu,part:`gui-file-upload-root`,"data-ui":`gui-file-upload`,children:[H(`div`,{style:Lu,children:[H(`div`,{style:Ru,children:H(G,A({},o))}),C.length===0&&H(G,A({},s)),C.length>0&&C.map(e=>{var t;let n=e.clientValidation!==bu.OK||e.uploadState===yu.ERROR&&w!==vu.UPLOADING;return H(`div`,{style:{width:`100%`},children:[H(`div`,{"data-ui":`gui-file-card`,style:A(A({},zu),n?Bu:{}),children:[H(Nu,{uploadFile:e,uploadPhase:w,onRetryFile:te,onRemoveFile:E}),e.uploadState===yu.UPLOADING&&H(Pu,{range:e.progressBarRange})]}),e.clientValidation!==bu.OK&&H(`div`,{style:Vu,children:H(G,{text:ue(e.clientValidation),fontSize:`13px`,fontColor:`#d32f2f`})}),w!==vu.UPLOADING&&e.uploadState===yu.ERROR&&e.clientValidation===bu.OK&&H(`div`,{style:Vu,children:H(G,{text:(t=e.serverError)==null?m.fileNotLoaded:t,fontSize:`13px`,fontColor:`#d32f2f`})})]},e.id)})]}),!!(l!=null&&l.length)&&H(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`10px`,width:`100%`,paddingTop:`12px`},children:[H(`input`,{ref:v,type:`file`,multiple:!0,accept:p.supportedFileFormats.map(e=>e.toLowerCase()).join(`,`),style:{display:`none`},onChange:D}),l.map((e,t)=>H(Ho,A(A({dataTestId:`file-upload-button$-${t}`},e),{},{onClick:()=>de(e)}),t))]})]}),x&&se&&H(`div`,{style:Hu,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),le()},children:H(`div`,{style:A(A({},Uu),{},{borderRadius:(oe==null?void 0:oe.cornerRadius)||`27px`,backgroundColor:(oe==null?void 0:oe.backgroundColor)||`#ffffff`}),children:[H(`div`,{style:Wu,children:H(G,A({fontSize:`24px`},se.title))}),H(`div`,{style:Gu,children:H(`div`,{style:Ku,children:H(G,A({fontSize:`17px`},se.message))})}),se.actionButton1&&H(`div`,{style:qu,children:H(Ho,A(A({dataTestId:`files-limit-exceeded-modal-ok-button`},se.actionButton1),(se==null||(i=se.actionButton1)==null?void 0:i.type)===`FORM`?{onClick:le}:{}))})]})}),y&&oe&&H(`div`,{style:Hu,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),ce()},children:H(`div`,{style:A(A({},Uu),{},{borderRadius:(oe==null?void 0:oe.cornerRadius)||`27px`,backgroundColor:(oe==null?void 0:oe.backgroundColor)||`#ffffff`}),children:[H(`div`,{style:Wu,children:H(G,A({fontSize:`24px`},oe.title))}),H(`div`,{style:Gu,children:H(`div`,{style:Ku,children:H(G,A({fontSize:`17px`},oe.message))})}),oe.actionButton1&&H(`div`,{style:qu,children:H(Ho,A(A({dataTestId:`no-files-modal-ok-button`},oe.actionButton1),(oe==null||(a=oe.actionButton1)==null?void 0:a.type)===`FORM`?{onClick:ce}:{}))})]})})]})},Yu=({moduleProps:e})=>{let{templateId:t,templateLayout:n}=e,{perform:r}=Ka();if(!t||!n)return H(Qo,{});if(t===Qa.STATUS)return H(qo,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,description:n==null?void 0:n.description,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor});if(t===Qa.INFO)return H(Xo,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor});if(t===Qa.GEOLOCATION)return H(Ol,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,popups:n==null?void 0:n.popups,askEveryTime:n==null?void 0:n.askEveryTime,getLocationTimeout:e.getLocationTimeout});if(t===Qa.PROGRESS)return H(Qo,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor});if(t===Qa.INFO_DETAILS)return H(ts,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor});if(t===Qa.CAMERA)return H(pl,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit});if(t===Qa.GALLERY)return H(ll,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit});if(t===Qa.QUESTIONS){var i;let t=(i=e.properties)!=null&&i.length?JSON.stringify(e.properties):`default-key`;return H(al,{dataSource:e.dataSource,properties:e.properties,questions:n==null?void 0:n.questions,header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor},t)}return t===Qa.DEVICE_TRANSFER?H(_u,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,description:n==null?void 0:n.description,backgroundColor:n==null?void 0:n.backgroundColor,qr:n==null?void 0:n.qr,url:e==null?void 0:e.url}):t===Qa.GENERIC?H(Bl,{rootElement:n.rootElement}):t===Qa.UPLOAD_FILES?H(Ju,{title:n.title,description:n.description,header:n.header,buttons:n.buttons,footer:n.footer,backgroundColor:n.backgroundColor,popups:n.popups,errorMessages:n.errorMessages,settings:n.settings,serviceToken:e.serviceToken,uploadFileToTemp:e.uploadFileToTemp,abortRequest:e.abortRequest}):(r(new il({errorCode:xo.DECODING_FAILED,message:`Unsupported step template id`})),null)};on();var Xu,Zu=!1,Qu=({children:e,locale:t,direction:n})=>H(`div`,{part:`gui-idv`,id:`gui-idv-web-c`,dir:n,lang:t,style:{backgroundColor:`white`,height:`100%`,width:`100%`},children:e}),$u=({isProcessing:e,moduleProps:t,perform:n,devSettings:r})=>{let i=ya(t.locale);return H(Wa,{perform:(e,t)=>n==null?void 0:n(e,t),setIsProcessingCallback:e,devSettings:r,failedAssets:t.failedAssets,layoutDirection:i,children:H(Qu,{locale:t.locale,direction:i,children:H(Yu,{moduleProps:t})})})},Y=class extends da{constructor(){super(),this._mounted=!1,this._shadowRoot=this.attachShadow({mode:`open`}),this._renderVersion=0,this.props=null}setProps(e){let t=e.moduleProps.failedAssets;if(t&&t.blockingAssets.size>0){var n;let r=new il({errorCode:xo.IMAGE_LOADING_FAILED,message:`Failed to load image asset${t.blockingAssets.size>1?`s`:``}: ${[...t.blockingAssets].join(`, `)}`});(n=e.perform)==null||n.call(e,r)}this._renderVersion++,this.props={idvEventListener:e.idvEventListener,moduleProps:e.moduleProps,isProcessing:e.isProcessing,perform:e.perform,devSettings:e.devSettings},this.render()}connectedCallback(){this.render(),this._mounted=!0}render(){if(!this.props)return``;if(this.shadowRoot){let e=document.createElement(`style`);e.id=`idv-gui-styles`,e.textContent=`
@@ -44,7 +44,7 @@ function print() { __p += __j.call(arguments, '') }
44
44
  `};if(t){var l=Number.isInteger(+this.property)?`[${this.property}]`:`${n?`.`:``}${this.property}`;return this.constraints?c(l):this.children?this.children.map(function(t){return t.toString(e,!0,`${n}${l}`,r)}).join(``):``}else return`An instance of ${a}${this.target?this.target.constructor.name:`an object`}${o} has failed the validation:
45
45
  `+(this.constraints?c(this.property):``)+(this.children?this.children.map(function(t){return t.toString(e,!0,i.property,r)}).join(``):``)},e}(),ud=function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();function dd(e){return Array.isArray(e)?e.join(`, `):(typeof e==`symbol`&&(e=e.description),`${e}`)}var fd=function(){function e(){}return e.replaceMessageSpecialTokens=function(e,t){var n;return e instanceof Function?n=e(t):typeof e==`string`&&(n=e),n&&Array.isArray(t.constraints)&&t.constraints.forEach(function(e,t){n=n.replace(RegExp(`\\\$constraint${t+1}`,`g`),dd(e))}),n&&t.value!==void 0&&t.value!==null&&[`string`,`boolean`,`number`].includes(typeof t.value)&&(n=n.replace(/\$value/g,t.value)),n&&(n=n.replace(/\$property/g,t.property)),n&&(n=n.replace(/\$target/g,t.targetName)),n},e}(),pd=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},md=function(){function e(e,t){this.validator=e,this.validatorOptions=t,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=cd()}return e.prototype.execute=function(e,t,n){var r=this,i,a;!this.metadataStorage.hasValidationMetaData&&((i=this.validatorOptions)==null?void 0:i.enableDebugMessages)===!0&&console.warn(`No validation metadata found. No validation will be performed. There are multiple possible reasons:
46
46
  - There may be multiple class-validator versions installed. You will need to flatten your dependencies to fix the issue.
47
- - This validation runs before any file with validation decorator was parsed by NodeJS.`);var o=this.validatorOptions?this.validatorOptions.groups:void 0,s=this.validatorOptions&&this.validatorOptions.strictGroups||!1,c=this.validatorOptions&&this.validatorOptions.always||!1,l=((a=this.validatorOptions)==null?void 0:a.forbidUnknownValues)===void 0||this.validatorOptions.forbidUnknownValues!==!1,u=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,c,s,o),d=this.metadataStorage.groupByPropertyName(u);if(l&&!u.length){var f=new ld;(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(f.target=e),f.value=void 0,f.property=void 0,f.children=[],f.constraints={unknownValue:`an unknown value was passed to the validate function`},n.push(f);return}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,d,n),Object.keys(d).forEach(function(t){var i=e[t],a=d[t].filter(function(e){return e.type===ud.IS_DEFINED}),o=d[t].filter(function(e){return e.type!==ud.IS_DEFINED&&e.type!==ud.WHITELIST});i instanceof Promise&&o.find(function(e){return e.type===ud.PROMISE_VALIDATION})?r.awaitingPromises.push(i.then(function(i){r.performValidations(e,i,t,a,o,n)})):r.performValidations(e,i,t,a,o,n)})},e.prototype.whitelist=function(e,t,n){var r=this,i=[];Object.keys(e).forEach(function(e){(!t[e]||t[e].length===0)&&i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEach(function(t){var i,a=r.generateValidationError(e,e[t],t);a.constraints=(i={},i[ud.WHITELIST]=`property ${t} should not exist`,i),a.children=void 0,n.push(a)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),Object.keys(e.constraints).length===0){if(e.children.length===0)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,n,r,i,a){var o=i.filter(function(e){return e.type===ud.CUSTOM_VALIDATION}),s=i.filter(function(e){return e.type===ud.NESTED_VALIDATION}),c=i.filter(function(e){return e.type===ud.CONDITIONAL_VALIDATION}),l=this.generateValidationError(e,t,n);a.push(l),this.conditionalValidations(e,t,c)&&(this.customValidations(e,t,r,l),this.mapContexts(e,t,r,l),!(t===void 0&&this.validatorOptions&&this.validatorOptions.skipUndefinedProperties===!0)&&(t===null&&this.validatorOptions&&this.validatorOptions.skipNullProperties===!0||t==null&&this.validatorOptions&&this.validatorOptions.skipMissingProperties===!0||(this.customValidations(e,t,o,l),this.nestedValidations(t,s,l),this.mapContexts(e,t,i,l),this.mapContexts(e,t,o,l))))},e.prototype.generateValidationError=function(e,t,n){var r=new ld;return(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(r.target=e),(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.value===void 0||this.validatorOptions.validationError.value===!0)&&(r.value=t),r.property=n,r.children=[],r.constraints={},r},e.prototype.conditionalValidations=function(e,t,n){return n.map(function(n){return n.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,n,r){var i=this;n.forEach(function(n){var a=function(){return{targetName:e.constructor?e.constructor.name:void 0,property:n.propertyName,object:e,value:t,constraints:n.constraints}};n.validateIf&&!n.validateIf(e,t)||i.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations)&&!(i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var s=a();if(!n.each||!(Array.isArray(t)||t instanceof Set||t instanceof Map)){var c=o.instance.validate(t,s);if(X(c)){var l=c.then(function(a){if(!a){var s=pd(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(l)}else if(!c){var u=pd(i.createValidationError(e,t,n,o),2),d=u[0],f=u[1];r.constraints[d]=f}return}var p=nd(t).map(function(e){return o.instance.validate(e,s)});if(p.some(function(e){return X(e)})){var m=p.map(function(e){return X(e)?e:Promise.resolve(e)}),h=Promise.all(m).then(function(a){if(!a.every(function(e){return e})){var s=pd(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(h);return}if(!p.every(function(e){return e})){var g=pd(i.createValidationError(e,t,n,o),2),d=g[0],f=g[1];r.constraints[d]=f}}})})},e.prototype.nestedValidations=function(e,t,n){var r=this;e!==void 0&&t.forEach(function(i){if(!(i.type!==ud.NESTED_VALIDATION&&i.type!==ud.PROMISE_VALIDATION)&&!(r.validatorOptions&&r.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0))if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,a){r.performValidations(e,i,a.toString(),[],t,n.children)});else if(e instanceof Object){var a=typeof i.target==`string`?i.target:i.target.name;r.execute(e,a,n.children)}else{var o=pd(r.createValidationError(i.target,e,i),2),s=o[0],c=o[1];n.constraints[s]=c}})},e.prototype.mapContexts=function(e,t,n,r){var i=this;return n.forEach(function(e){if(e.context){var t=void 0;e.type===ud.CUSTOM_VALIDATION&&(t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0]);var n=i.getConstraintType(e,t);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},e.context))}})},e.prototype.createValidationError=function(e,t,n,r){var i=e.constructor?e.constructor.name:void 0,a=this.getConstraintType(n,r),o={targetName:i,property:n.propertyName,object:e,value:t,constraints:n.constraints},s=n.message||``;return!n.message&&(!this.validatorOptions||this.validatorOptions&&!this.validatorOptions.dismissDefaultMessages)&&r&&r.instance.defaultMessage instanceof Function&&(s=r.instance.defaultMessage(o)),[a,fd.replaceMessageSpecialTokens(s,o)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),hd=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},gd=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},_d=function(){function e(){}return e.prototype.validate=function(e,t,n){return this.coreValidate(e,t,n)},e.prototype.validateOrReject=function(e,t,n){return hd(this,void 0,void 0,function(){var r;return gd(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,n)];case 1:return r=i.sent(),r.length?[2,Promise.reject(r)]:[2]}})})},e.prototype.validateSync=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new md(this,i);o.ignoreAsyncValidations=!0;var s=[];return o.execute(r,a,s),o.stripEmptyErrors(s)},e.prototype.coreValidate=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new md(this,i),s=[];return o.execute(r,a,s),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(s)})},e}(),vd=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),yd,bd;function xd(e){if(yd)try{var t=yd.get(e);if(t||!bd||!bd.fallback)return t}catch(e){if(!bd||!bd.fallbackOnErrors)throw e}return vd.get(e)}var Sd=function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return xd(this.target)},enumerable:!1,configurable:!0}),e}();function Cd(e){var t;if(e.validator instanceof Function){if(t=e.validator,xd(sd).getTargetValidatorConstraints(e.validator).length>1)throw`More than one implementation of ValidatorConstraintInterface found for validator on: ${e.target.name}:${e.propertyName}`}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):``},e}(),cd().addConstraintMetadata(new Sd(t,e.name,e.async))}var r={type:e.name&&ud.isValid(e.name)?e.name:ud.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};cd().addValidationMetadata(new ed(r))}function wd(e,t){return function(n){return e(t&&t.each?`each value in `:``,n)}}function Td(e,t){return function(n,r){Cd({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}var Ed=ud.IS_DEFINED;function Dd(e){return e!=null}function Od(e){return Td({name:Ed,validator:{validate:function(e){return Dd(e)},defaultMessage:wd(function(e){return e+`$property should not be null or undefined`},e)}},e)}var kd=`isOptional`;function Ad(e){return function(t,n){var r={type:ud.CONDITIONAL_VALIDATION,name:kd,target:t.constructor,propertyName:n,constraints:[function(e,t){return e[n]!==null&&e[n]!==void 0}],validationOptions:e};cd().addValidationMetadata(new ed(r))}}function jd(e,t){return function(n,r){var i={type:ud.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:r,constraints:[e],validationOptions:t};cd().addValidationMetadata(new ed(i))}}var Md=function(){return Md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Md.apply(this,arguments)};function Nd(e){var t=Md({},e),n=t.each?`each value in `:``;return t.message=t.message||n+`nested property $property must be either object or array`,function(e,n){var r={type:ud.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};cd().addValidationMetadata(new ed(r))}}var Pd=`isNotEmpty`;function Fd(e){return e!==``&&e!=null}function Id(e){return Td({name:Pd,validator:{validate:function(e,t){return Fd(e)},defaultMessage:wd(function(e){return e+`$property should not be empty`},e)}},e)}var Ld=`isBoolean`;function Rd(e){return e instanceof Boolean||typeof e==`boolean`}function zd(e){return Td({name:Ld,validator:{validate:function(e,t){return Rd(e)},defaultMessage:wd(function(e){return e+`$property must be a boolean value`},e)}},e)}var Bd=`isNumber`;function Vd(e,t){if(t===void 0&&(t={}),typeof e!=`number`)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(t.maxDecimalPlaces!==void 0){var n=0;if(e%1!=0&&(n=e.toString().split(`.`)[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}function Hd(e,t){return e===void 0&&(e={}),Td({name:Bd,constraints:[e],validator:{validate:function(e,t){return Vd(e,t==null?void 0:t.constraints[0])},defaultMessage:wd(function(e){return e+`$property must be a number conforming to the specified constraints`},t)}},t)}var Ud=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Wd=`isEnum`;function Gd(e,t){return Object.keys(t).map(function(e){return t[e]}).includes(e)}function Kd(e){return Object.entries(e).filter(function(e){var t=Ud(e,2),n=t[0];return t[1],isNaN(parseInt(n))}).map(function(e){var t=Ud(e,2);return t[0],t[1]})}function qd(e,t){return Td({name:Wd,constraints:[e,Kd(e)],validator:{validate:function(e,t){return Gd(e,t==null?void 0:t.constraints[0])},defaultMessage:wd(function(e){return e+`$property must be one of the following values: $constraint2`},t)}},t)}var Jd=`isString`;function Yd(e){return e instanceof String||typeof e==`string`}function Xd(e){return Td({name:Jd,validator:{validate:function(e,t){return Yd(e)},defaultMessage:wd(function(e){return e+`$property must be a string`},e)}},e)}var Zd=`isArray`;function Qd(e){return Array.isArray(e)}function $d(e){return Td({name:Zd,validator:{validate:function(e,t){return Qd(e)},defaultMessage:wd(function(e){return e+`$property must be an array`},e)}},e)}var ef=`isObject`;function tf(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}function nf(e){return Td({name:ef,validator:{validate:function(e,t){return tf(e)},defaultMessage:wd(function(e){return e+`$property must be an object`},e)}},e)}function rf(e,t,n){return typeof e==`string`?xd(_d).validateSync(e,t,n):xd(_d).validateSync(e,t)}var Z;(function(e){e[e.PLAIN_TO_CLASS=0]=`PLAIN_TO_CLASS`,e[e.CLASS_TO_PLAIN=1]=`CLASS_TO_PLAIN`,e[e.CLASS_TO_CLASS=2]=`CLASS_TO_CLASS`})(Z||(Z={}));var af=new(function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?n===Z.CLASS_TO_CLASS||n===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?n===Z.CLASS_TO_PLAIN:!0})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?`none`:n?`excludeAll`:`exposeAll`},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?t===Z.CLASS_TO_PLAIN:!0}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?t===Z.CLASS_TO_PLAIN:!0}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n=e.get(t),r;n&&(r=Array.from(n.values()).filter(function(e){return e.propertyName!==void 0}));for(var i=[],a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=Array.from(c.values()).filter(function(e){return e.propertyName!==void 0});i.push.apply(i,l)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=c.get(n);if(l)return l}}},e.prototype.findMetadatas=function(e,t,n){var r=e.get(t),i;r&&(i=r.get(n));for(var a=[],o=0,s=this.getAncestors(t);o<s.length;o++){var c=s[o],l=e.get(c);l&&l.has(n)&&a.push.apply(a,l.get(n))}return a.slice().reverse().concat((i||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);n.prototype!==void 0;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}());function of(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function sf(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var cf=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function lf(e){var t=new e;return!(t instanceof Set)&&!(`push`in t)?[]:t}var uf=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,n,r,i,a){var o=this;if(a===void 0&&(a=0),Array.isArray(t)||t instanceof Set){var s=r&&this.transformationType===Z.PLAIN_TO_CLASS?lf(r):[];return t.forEach(function(t,r){var i=e?e[r]:void 0;if(!o.options.enableCircularCheck||!o.isCircular(t)){var c=void 0;if(typeof n!=`function`&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(o.transformationType===Z.PLAIN_TO_CLASS){c=n.options.discriminator.subTypes.find(function(e){return e.name===t[n.options.discriminator.property]});var l={newObject:s,object:t,property:void 0},u=n.typeFunction(l);c=c===void 0?u:c.value,n.options.keepDiscriminatorProperty||delete t[n.options.discriminator.property]}o.transformationType===Z.CLASS_TO_CLASS&&(c=t.constructor),o.transformationType===Z.CLASS_TO_PLAIN&&(t[n.options.discriminator.property]=n.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else c=n;var d=o.transform(i,t,c,void 0,t instanceof Map,a+1);s instanceof Set?s.add(d):s.push(d)}else o.transformationType===Z.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t))}),s}else if(n===String&&!i)return t==null?t:String(t);else if(n===Number&&!i)return t==null?t:Number(t);else if(n===Boolean&&!i)return t==null?t:!!t;else if((n===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):t==null?t:new Date(t);else if(of().Buffer&&(n===Buffer||t instanceof Buffer)&&!i)return t==null?t:Buffer.from(t);else if(sf(t)&&!i)return new Promise(function(e,r){t.then(function(t){return e(o.transform(void 0,t,n,void 0,void 0,a+1))},r)});else if(!i&&typeof t==`object`&&t&&typeof t.then==`function`)return t;else if(typeof t==`object`&&t){!n&&t.constructor!==Object&&(!Array.isArray(t)&&t.constructor===Array||(n=t.constructor)),!n&&e&&(n=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var c=this.getKeys(n,t,i),l=e||{};!e&&(this.transformationType===Z.PLAIN_TO_CLASS||this.transformationType===Z.CLASS_TO_CLASS)&&(l=i?new Map:n?new n:{});for(var u=function(r){if(r===`__proto__`||r===`constructor`)return`continue`;var o=r,s=r,c=r;if(!d.options.ignoreDecorators&&n){if(d.transformationType===Z.PLAIN_TO_CLASS){var u=af.findExposeMetadataByCustomName(n,r);u&&(c=u.propertyName,s=u.propertyName)}else if(d.transformationType===Z.CLASS_TO_PLAIN||d.transformationType===Z.CLASS_TO_CLASS){var u=af.findExposeMetadata(n,r);u&&u.options&&u.options.name&&(s=u.options.name)}}var f=void 0;f=d.transformationType===Z.PLAIN_TO_CLASS?t[o]:t instanceof Map?t.get(o):t[o]instanceof Function?t[o]():t[o];var p=void 0,m=f instanceof Map;if(n&&i)p=n;else if(n){var h=af.findTypeMetadata(n,c);if(h){var g={newObject:l,object:t,property:c},_=h.typeFunction?h.typeFunction(g):h.reflectedType;h.options&&h.options.discriminator&&h.options.discriminator.property&&h.options.discriminator.subTypes?t[o]instanceof Array?p=h:(d.transformationType===Z.PLAIN_TO_CLASS&&(p=h.options.discriminator.subTypes.find(function(e){if(f&&f instanceof Object&&h.options.discriminator.property in f)return e.name===f[h.options.discriminator.property]}),p=p===void 0?_:p.value,h.options.keepDiscriminatorProperty||f&&f instanceof Object&&h.options.discriminator.property in f&&delete f[h.options.discriminator.property]),d.transformationType===Z.CLASS_TO_CLASS&&(p=f.constructor),d.transformationType===Z.CLASS_TO_PLAIN&&f&&(f[h.options.discriminator.property]=h.options.discriminator.subTypes.find(function(e){return e.value===f.constructor}).name)):p=_,m=m||h.reflectedType===Map}else if(d.options.targetMaps)d.options.targetMaps.filter(function(e){return e.target===n&&!!e.properties[c]}).forEach(function(e){return p=e.properties[c]});else if(d.options.enableImplicitConversion&&d.transformationType===Z.PLAIN_TO_CLASS){var v=Reflect.getMetadata(`design:type`,n.prototype,c);v&&(p=v)}}var y=Array.isArray(t[o])?d.getReflectedType(n,c):void 0,b=e?e[o]:void 0;if(l.constructor.prototype){var x=Object.getOwnPropertyDescriptor(l.constructor.prototype,s);if((d.transformationType===Z.PLAIN_TO_CLASS||d.transformationType===Z.CLASS_TO_CLASS)&&(x&&!x.set||l[s]instanceof Function))return`continue`}if(!d.options.enableCircularCheck||!d.isCircular(f)){var S=d.transformationType===Z.PLAIN_TO_CLASS?s:r,C=void 0;d.transformationType===Z.CLASS_TO_PLAIN?(C=t[S],C=d.applyCustomTransformations(C,n,S,t,d.transformationType),C=t[S]===C?f:C,C=d.transform(b,C,p,y,m,a+1)):f===void 0&&d.options.exposeDefaultValues?C=l[s]:(C=d.transform(b,f,p,y,m,a+1),C=d.applyCustomTransformations(C,n,S,t,d.transformationType)),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}else if(d.transformationType===Z.CLASS_TO_CLASS){var C=f;C=d.applyCustomTransformations(C,n,r,t,d.transformationType),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}},d=this,f=0,p=c;f<p.length;f++){var m=p[f];u(m)}return this.options.enableCircularCheck&&this.recursionStack.delete(t),l}else return t},e.prototype.applyCustomTransformations=function(e,t,n,r,i){var a=this,o=af.findTransformMetadatas(t,n,this.transformationType);return this.options.version!==void 0&&(o=o.filter(function(e){return e.options?a.checkVersion(e.options.since,e.options.until):!0})),o=this.options.groups&&this.options.groups.length?o.filter(function(e){return e.options?a.checkGroups(e.options.groups):!0}):o.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length}),o.forEach(function(t){e=t.transformFn({value:e,key:n,obj:r,type:i,options:a.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var n=af.findTypeMetadata(e,t);return n?n.reflectedType:void 0}},e.prototype.getKeys=function(e,t,n){var r=this,i=af.getStrategy(e);i===`none`&&(i=this.options.strategy||`exposeAll`);var a=[];if((i===`exposeAll`||n)&&(a=t instanceof Map?Array.from(t.keys()):Object.keys(t)),n)return a;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var o=af.getExposedProperties(e,this.transformationType),s=af.getExcludedProperties(e,this.transformationType);a=cf(cf([],o,!0),s,!0)}if(!this.options.ignoreDecorators&&e){var o=af.getExposedProperties(e,this.transformationType);this.transformationType===Z.PLAIN_TO_CLASS&&(o=o.map(function(t){var n=af.findExposeMetadata(e,t);return n&&n.options&&n.options.name?n.options.name:t})),a=this.options.excludeExtraneousValues?o:a.concat(o);var c=af.getExcludedProperties(e,this.transformationType);c.length>0&&(a=a.filter(function(e){return!c.includes(e)})),this.options.version!==void 0&&(a=a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options?!0:r.checkVersion(n.options.since,n.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options?!0:r.checkGroups(n.options.groups)}):a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options||!n.options.groups||!n.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter(function(e){return r.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),a=a.filter(function(e,t,n){return n.indexOf(e)===t}),a},e.prototype.checkVersion=function(e,t){var n=!0;return n&&e&&(n=this.options.version>=e),n&&t&&(n=this.options.version<t),n},e.prototype.checkGroups=function(e){return e?this.options.groups.some(function(t){return e.includes(t)}):!0},e}(),df={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},ff=function(){return ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ff.apply(this,arguments)},pf=new(function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new uf(Z.CLASS_TO_PLAIN,ff(ff({},df),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,n){return new uf(Z.CLASS_TO_PLAIN,ff(ff({},df),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,n){return new uf(Z.PLAIN_TO_CLASS,ff(ff({},df),n)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,n){return new uf(Z.PLAIN_TO_CLASS,ff(ff({},df),n)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new uf(Z.CLASS_TO_CLASS,ff(ff({},df),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,n){return new uf(Z.CLASS_TO_CLASS,ff(ff({},df),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e.prototype.deserializeArray=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e}());function mf(e,t,n){return pf.plainToInstance(e,t,n)}function Q(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function $(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var hf=class{};$([Od(),Xd(),Q(`design:type`,String)],hf.prototype,`templateId`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],hf.prototype,`templateLayout`,void 0);var gf=class{};$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`id`,void 0),$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`name`,void 0),$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`type`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],gf.prototype,`final`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],gf.prototype,`releaseClientApp`,void 0),$([Ad(),nf(),Q(`design:type`,Object)],gf.prototype,`dataSource`,void 0),$([Ad(),nf(),jd((e,t)=>typeof t==`object`&&!!t&&Object.keys(t).length>0),Nd(),Q(`design:type`,hf===void 0?Object:hf)],gf.prototype,`client`,void 0);var _f=e=>Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&e.templateId===`PROGRESS`),vf=()=>Td({name:`hasProgressStep`,validator:{validate(e){return _f(e)},defaultMessage(){return`Workflow client must have at least one step with templateId "${gi}"`}}}),yf=class{};$([Od(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],yf.prototype,`layout`,void 0),$([$d(),Od(),Nd({each:!0}),vf(),Q(`design:type`,typeof Array>`u`?Object:Array)],yf.prototype,`steps`,void 0);var bf,xf=class{static isWorkflowModel(e){return typeof e==`object`&&!!e&&`id`in e&&`steps`in e&&`client`in e&&!(`error`in e)}};bf=xf,bf.fromPlain=e=>{let t=e.steps.map(e=>mf(gf,A(A({},e),{},{client:e.client!==null&&typeof e.client==`object`&&Object.keys(e.client).length>0?mf(hf,e.client):void 0}))),n=mf(yf,A(A({},e.client),{},{steps:e.client.steps.map(e=>mf(hf,e))})),r=mf(bf,A(A({},e),{},{steps:t,client:n})),i=rf(r);return i.length?{validationErrorMessage:JSON.stringify(Zi(``,i))}:r},$([Od(),Xd(),Q(`design:type`,String)],xf.prototype,`id`,void 0),$([Od(),$d(),Nd({each:!0}),Q(`design:type`,Array)],xf.prototype,`steps`,void 0),$([Od(),nf(),Nd(),Q(`design:type`,yf===void 0?Object:yf)],xf.prototype,`client`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],xf.prototype,`name`,void 0),$([Ad(),nf(),Q(`design:type`,Object)],xf.prototype,`logging`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],xf.prototype,`error`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],xf.prototype,`defaultLocale`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],xf.prototype,`config`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],xf.prototype,`metadata`,void 0),$([Ad(),Hd(),Q(`design:type`,Number)],xf.prototype,`sessionUpdateTimeout`,void 0),$([Ad(),zd(),Q(`design:type`,Boolean)],xf.prototype,`trackLocation`,void 0);var Sf=class{};$([Ad(),qd(ei),Q(`design:type`,ei===void 0?Object:ei)],Sf.prototype,`level`,void 0);var Cf=class{};$([Od(),Id(),Xd(),Q(`design:type`,String)],Cf.prototype,`id`,void 0),$([Od(),Xd(),Id(),Q(`design:type`,String)],Cf.prototype,`name`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`createdAt`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`updatedAt`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`string`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`createdBy`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`updatedBy`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`step`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`action`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`path`,void 0),$([Ad(),Hd(),Q(`design:type`,Object)],Cf.prototype,`integer`,void 0),$([Ad(),Hd(),Q(`design:type`,Object)],Cf.prototype,`decimal`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`object`,void 0);var wf,Tf=class{static isSessionModel(e){return typeof e==`object`&&!!e&&`id`in e&&`currentStep`in e&&`workflow`in e&&`properties`in e&&`isProcessingFiles`in e&&!(`error`in e)}};wf=Tf,wf.fromPlain=e=>{var t,n;if(!e)return{validationErrorMessage:`Session data is not defined`};let r=A(A({},e),{},{workflow:mf(xf,A(A({},e.workflow),{},{steps:e.workflow.steps.map(e=>mf(gf,A(A({},e),{},{client:e.client==null?void 0:mf(hf,e.client)}))),client:mf(yf,A(A({},e.workflow.client),{},{steps:(t=e.workflow.client.steps.map(e=>mf(hf,e)))==null?[]:t}))})),properties:((n=e.properties)==null?[]:n).map(e=>mf(Cf,e))}),i=mf(wf,r),a=rf(i);return a.length?{validationErrorMessage:JSON.stringify(Zi(``,a))}:i},$([Od(),Id(),Xd(),Q(`design:type`,String)],Tf.prototype,`id`,void 0),$([Od(),Xd(),Q(`design:type`,String)],Tf.prototype,`currentStep`,void 0),$([Od(),Nd(),Q(`design:type`,xf===void 0?Object:xf)],Tf.prototype,`workflow`,void 0),$([Od(),Nd({each:!0}),Q(`design:type`,Array)],Tf.prototype,`properties`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],Tf.prototype,`isProcessingFiles`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`locale`,void 0),$([Ad(),zd(),Q(`design:type`,Boolean)],Tf.prototype,`isErrorFiles`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`shortId`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`deviceId`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],Tf.prototype,`deviceMetadata`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],Tf.prototype,`metadata`,void 0);var Ef=(e,t)=>({_isInitialized:!1,_initializationInProgress:!1,_isConnectedToPlatform:!1,_sessionIdFromUrl:null,_ttl:86400,_runSocketConnection:function(){var e=b(function*(e){let{host:n,isSecure:r,port:i}=t().startConfig;if(n&&e&&(yield Va.connect({host:n,isSecure:r,port:i,token:e})),!n||!e||!Va.isConnected()){let e=new La({errorCode:ui.CONNECTION_ISSUE,message:`WebSocket connection issue`}),t=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`WebSocket connection issue`}),{error:t}}return{}});return function(t){return e.apply(this,arguments)}}(),_continueSession:function(){var e=b(function*(e){var n;let r=t()._sessionIdFromUrl,i=t().startConfig,a=Qi(i.apiKey),o=(n=t().workflow)==null?void 0:n.id,s=r?`Session continued from force session id`:`Session restored from local storage`,c;if(r)B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with force session id: ${r}`}),c=r;else if(a){var l;if(!t().sessionRestoreMode)return{};let e=i.apiKey,n=Fi.getAuthTokenLs(),r=n&&((l=n[e])==null?void 0:l.sessionId);if(!r)return{};r&&(c=r),B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with api key: ${e}`})}else{if(!t().sessionRestoreMode)return{};let e=t().getCurrentSessionDataLs();if(!e)return{};let n=e.sessionId,r=e.workflowId;if(!n||r!==o)return{};c=n,B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with session id from LS: ${n}`})}let u=yield t().waitForContinueSession({sessionId:c,locale:e});return u.error?{error:u.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:a,sessionId:u.sessionData.id,workflowId:o,locale:u.sessionData.locale}),yield t().setNextStep({workflow:u.sessionData.workflow,properties:u.sessionData.properties,nextStepId:u.sessionData.currentStep,locale:u.sessionData.locale}),t().listener({eventType:$r.MESSAGE,module:`IDV`,logLevel:z.INFO,message:s}),u)});return function(t){return e.apply(this,arguments)}}(),initialize(n){return b(function*(){if(t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Already initialized`}),{};if(t()._initializationInProgress)return{error:new ja({errorCode:si.INITIALIZATION_IN_PROGRESS})};e({_initializationInProgress:!0}),yield t().setAndInitFetchService(),e({modulesConfig:n.modulesConfig||{}});let r=[Y];if(Array.isArray(n==null?void 0:n.includedModules)){let e=n.includedModules.filter(e=>typeof e==`function`&&e.displayName&&!r.some(t=>t.displayName===e.displayName));r=[...r,...e]}let i=yield t().loadModules(r);return i.error?{error:i.error}:(B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully load modules: ${r.map(e=>e.displayName).join(`, `)}`}),e({_initializationInProgress:!1,_isInitialized:!0}),{})})()},configureByApiKey(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by api key)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by api key)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=[`apiKey`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=Ki(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a=Number(n.ttl);!Number.isNaN(a)&&a>0&&e({_ttl:a});let o=t()._ttl,s={host:i.host,isSecure:i.isSecure,port:i.port,apiKey:n.apiKey,deviceDescriptor:{ttl:o}},c=Fi.getAuthTokenLs(),l=c&&c[n.apiKey]&&c[n.apiKey].authToken?c[n.apiKey]:null,u=l&&l.authToken,d=yield t().connectByApiKey(s);if(d.error){let e=new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:d.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by api key`}),{error:e}}u&&d.authToken!==u&&(Fi.removeAuthTokenLs(n.apiKey),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Removed old session from LS because new api token will not work with old session id`}));let f=l&&d.authToken===l.authToken&&l,p=f?f.tokenExpiresAt:Date.now()+o*1e3;return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure by api key. Token expires at: ${p}`}),t().setApiKeyAuthTokenCollection(n.apiKey,d.authToken,p),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,apiKey:n.apiKey,port:i.port}),d})()},configureWithUrl(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by url)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by url)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=Gi(n);r&&(t().removeCurrentSessionDataLsAndStore(),e({_sessionIdFromUrl:r}));let i=yield t().connectByUrl(n);if(i.error)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by url: ${i.error.message}`}),{error:new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:i.error})};e({_isConnectedToPlatform:!0});try{let e=Ki(n);if(!e)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n}`})};t().setStartConfig({host:e.host,isSecure:e.isSecure,port:e.port})}catch(e){B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid urlWithToken`})}return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure with url. URL: ${n}`}),i})()},configureByUserPass(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by user pass)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by user pass)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=[`password`,`userName`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=Ki(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a={host:i.host,isSecure:i.isSecure,password:n.password,port:i.port,userName:n.userName},o=yield t().connectByUserPass(a);if(o.error){let e=new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:o.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by user pass: ${o.error.message}`}),{error:e}}return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure by user pass`}),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,port:i.port}),o})()},getWorkflows(){return b(function*(e={limit:100,skip:0}){if(!t()._isInitialized){let e=new Na({errorCode:ii.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (get workflows)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Na({errorCode:ii.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue (get workflows)`}),{error:e}}let n=yield t().fetchService.listWorkflows(e);if(n.code!==0){let e=ea(n.code,li),t=n.data.what,r=new Ba({errorCode:e}),i=new Na({errorCode:ii.WORKFLOW_ISSUE,message:`No workflow list${Qi(t)&&`: ${t}`}.`,underlyingBaseError:r});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`No workflow list`}),{error:i}}return{results:n.data.items}}).apply(this,arguments)},prepareWorkflowAndPrepareUi(e){return b(function*(){var n;if(!t()._isInitialized){let e=new Na({errorCode:ii.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (prepare workflow and prepare ui)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Na({errorCode:ii.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue (prepare workflow and prepare ui)`}),{error:e}}if(t().currentScreenConfig){let e=new Na({errorCode:ii.SCENARIO_IN_PROGRESS});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (prepare workflow and prepare ui)`}),{error:e}}let r=t()._sessionIdFromUrl,i=yield t().fetchService.getWorkflow(e,r);if(i.code!==0){let e=i.data.what,t=new Ba(A({errorCode:ea(i.code,li)},Qi(e)&&{message:e})),n=new Na({errorCode:ii.INTERNAL_ISSUE,underlyingBaseError:t});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Workflow issue${Qi(e)&&`: ${e}`}.`}),{error:n}}let a=xf.fromPlain(i.data);if(`validationErrorMessage`in a){let e=new Ba({errorCode:li.DECODING_FAILED,message:a.validationErrorMessage}),t=new Na({errorCode:ii.WORKFLOW_ISSUE,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Workflow decoding failed: ${a.validationErrorMessage}`}),{error:t}}let o=t().externalModules,s=a.steps,{isAllTemplatesSupported:c,unsupportedSteps:l}=Pi(o,s);c||B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Warning. Unsupported steps found: ${l}`});let u=(n=t().workflow)==null?void 0:n.id;u&&e!==u&&o.forEach(e=>{e.component.deinitialize()});let d=t().modulesConfig;return o.forEach(e=>{e.component.isReady()||e.component.initialize(d)}),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully prepare workflow and prepare ui. Workflow id: ${e}`}),t().setWorkflow(a),{workflow:a}})()},startNewSession({completion:e,locale:n,metadata:r,location:i}){return b(function*(){var a;if(B.clearSession(),!t()._isInitialized){let e=new Pa({errorCode:oi.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (start new session)`}),{error:e}}let o=(a=t().workflow)==null?void 0:a.id;if(!o){let e=new Pa({errorCode:oi.PREPARED_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Prepared required (start new session)`}),{error:e}}if(t().currentScreenConfig){let e=new Pa({errorCode:oi.ALREADY_STARTED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (start new session)`}),{error:e}}t().setWorkflowSessionCompletion(t=>{Va&&Va.close(),e(t)});let s=t().startConfig,c=Qi(s.apiKey),l=t().apiKeyAuthTokenCollection;if(c&&`tokenExpiresAt`in l){let e=l.tokenExpiresAt&&typeof l.tokenExpiresAt==`number`?l.tokenExpiresAt:0;if(Date.now()>e){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`API key TTL expired. Trying to connect by api key`});let e=yield t().connectByApiKey({apiKey:s.apiKey,host:s.host,deviceDescriptor:{ttl:t()._ttl},isSecure:s.isSecure,port:s.port});if(Fi.removeAuthTokenLs(s.apiKey),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Removed old session from LS because new api token will not work with old session id`}),e.error){let t=new La({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:e.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by api key`}),{error:t}}if(e&&`authToken`in e){let n=Date.now()+t()._ttl*1e3;t().setApiKeyAuthTokenCollection(s.apiKey,e.authToken,n),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully connect by api key`})}}}t().setIsProcessing(!0);let u=yield t().fetchService.getConnectionToken(!1);if(!u||typeof u!=`string`){let e=new La({errorCode:ui.TOKEN_ERROR}),t=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Token error`}),{error:t}}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Successfully get service token`}),t().setServiceSessionToken(u);let d=yield t()._runSocketConnection(u);if(d.error)return{error:d.error};let f=yield t()._continueSession(n);if(`error`in f)return{error:f.error};if(`sessionData`in f)return{};let p=yield t().waitForStartSession({workflowId:o,locale:n,metadata:r,location:i});return p.error?{error:p.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:c,sessionId:p.sessionData.id,workflowId:o,locale:p.sessionData.locale}),yield t().setNextStep({workflow:p.sessionData.workflow,properties:p.sessionData.properties,nextStepId:p.sessionData.currentStep,locale:p.sessionData.locale}),t().listener({eventType:$r.MESSAGE,module:`IDV`,logLevel:z.INFO,message:ri.DID_START_SESSION}),{})})()},deinitialize(){return b(function*(){if(!t()._isInitialized)return{error:new Ra({errorCode:fi.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return{error:new Ra({errorCode:fi.SCENARIO_IN_PROGRESS})};let n=yield t().deinitializationIdv();return t().resetProps(),e({_isInitialized:!1}),n})()},startIamAuth(e){return b(function*(){return yield t().fetchService.startIamAuth(e)})()}});function Df(e,t,n){let r=n.value;n.value=function(){var e=b(function*(e,t){var n,i;let a=((n=t==null?void 0:t.method)==null?`GET`:n).toUpperCase(),o=t==null||(i=t.headers)==null?void 0:i.authorization,s=yield r.call(this,e,t),c=s.status,l={method:a,url:e,statusCode:c,authHeader:o,response:s.statusText};if(c!==200)return B.logSessionEvent({logLevel:z.ERROR,module:`IDV`,message:JSON.stringify(l)},!0),s;let u=yield s.clone().json();return l=A(A({},l),{},{response:u}),B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:JSON.stringify(l)},!0),s});return function(t,n){return e.apply(this,arguments)}}()}var Of=class{constructor(){this._connectionTokenExpirationBufferMs=6e4,this._origin=``,this._apiKeyAuthToken={token:``,expiresAt:0},this._connectionToken={token:``,expiresAt:0},this._connect=null,this.abortController=null,this.abortController=null}_setApiKeyAuthToken(e){this._apiKeyAuthToken=e}_setConnectionToken(e){this._connectionToken=e}_getOriginFromConfig(e){return`http${e.isSecure?`s`:``}://${e.host}${e.port?`:${e.port}`:``}`}_getOriginFromUrl(e){try{return new URL(e).origin}catch(e){return``}}_getSessionIdFromUrl(e){try{var t;return(t=new URL(e).searchParams.get(`sessionId`))==null?``:t}catch(e){return``}}_getExpiresAtFromTtl(e){return Date.now()+1e3*e}_getAuthorizationHeaderFromConnectionToken(e){return`Connection ${e}`}_getAuthorizationHeaderFromBasicToken(e){return`Basic ${e}`}_getAuthorizationHeaderFromAuthToken(e){return`Token ${e}`}_getApiKeyAuthTokenFromLs(e){var t,n;let r=Fi.getAuthTokenLs(),i=r==null||(t=r[e])==null?void 0:t.authToken,a=Number((r==null||(n=r[e])==null?void 0:n.tokenExpiresAt)||0);return!i||!a||Number.isNaN(a)||a<=Date.now()?null:{token:i,expiresAt:a}}_getApiKeyAuthTokenFromHeader(e){return e.replace(/^Token\s+/i,``)}_getValidApiKeyAuthToken(e,t){var n=this;return b(function*(){if(n._apiKeyAuthToken.token){if(t||Date.now()<n._apiKeyAuthToken.expiresAt)return{code:0,data:n._apiKeyAuthToken};let r=yield n._fetchEphemeral(e.apiKey,e.deviceDescriptor.ttl);return r.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(r.data.authorization),expiresAt:n._getExpiresAtFromTtl(e.deviceDescriptor.ttl)}}:r}let r=n._getApiKeyAuthTokenFromLs(e.apiKey);if(r)return{code:0,data:r};let i=yield n._fetchEphemeral(e.apiKey,e.deviceDescriptor.ttl);return i.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(i.data.authorization),expiresAt:n._getExpiresAtFromTtl(e.deviceDescriptor.ttl)}}:i})()}_getAuthorizationSearchParam(e){try{var t;return(t=new URL(e).searchParams.get(`authorization`))==null?``:t}catch(e){return``}}_getResponseTextFromBadResponse(e){return b(function*(){return yield e.text().catch(()=>``)})()}_httpFetch(e,t){return b(function*(){return fetch(e,t)})()}_fetchPing(){var e=this;return b(function*(){let t=`${e._origin}/api/ping`;try{let n=yield e._httpFetch(t,{method:`GET`}),r={httpCode:n.status,method:`GET`,url:t};if(!n.ok){let t=yield e._getResponseTextFromBadResponse(n);return t&&(r.what=t),{code:5,data:r}}let i;try{if(i=yield n.json(),(i==null?void 0:i.status)!==`OK`)return{code:6,data:r}}catch(e){return r.what=$i(e),{code:6,data:r}}return{code:0,data:i}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:t,what:$i(e)}}}})()}_fetchMe(e){var t=this;return b(function*(){let n=`${t._origin}/api/user/me`;try{let r=yield t._httpFetch(n,{headers:{authorization:e},method:`GET`}),i={httpCode:r.status,method:`GET`,url:n};if(!r.ok){let e=yield t._getResponseTextFromBadResponse(r);return e&&(i.what=e),{code:5,data:i}}let a;try{if(a=yield r.json(),!a)return{code:6,data:i}}catch(e){return i.what=$i(e),{code:6,data:i}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:n,what:$i(e)}}}})()}_fetchConnection(e,t){var n=this;return b(function*(){let r=`POST`,i=`${n._origin}/api/device/connection`;try{let a=yield n._httpFetch(i,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(A(A({},Ji()),t&&{sessionId:t})),method:r}),o={httpCode:a.status,method:r,url:i};if(!a.ok){let e=yield n._getResponseTextFromBadResponse(a);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield a.json(),!(s!=null&&s.token)||!(s!=null&&s.expiresAt))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:{token:s.token,expiresAt:+new Date(s.expiresAt),workflows:s.workflows}}}catch(e){return{code:4,data:{httpCode:0,method:r,url:i,what:$i(e)}}}})()}_fetchEphemeral(e,t){var n=this;return b(function*(){let r=`POST`,i=`${n._origin}/api/device/ephemeral`;try{let a=yield n._httpFetch(i,{headers:{authorization:`ApiKey ${e}`,"content-type":`application/json`},body:JSON.stringify({ttl:t}),method:r}),o={httpCode:a.status,method:r,url:i};if(!a.ok){let e=yield n._getResponseTextFromBadResponse(a);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield a.json(),!(s!=null&&s.authorization))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:r,url:i,what:$i(e)}}}})()}_fetchSessionByWorkflowId(e,t,n){var r=this;return b(function*(){let i=`POST`,a=`${r._origin}/api/sessions?workflowId=${t}`;try{let t=yield r._httpFetch(a,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(n),method:i}),o={httpCode:t.status,method:i,url:a};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield t.json(),!(s!=null&&s.id))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_fetchSessionState(e,t,n){var r=this;return b(function*(){let i=`${`${r._origin}/api/sessions/${t}`}${n?`?locale=${n}`:``}`;try{let t=yield r._httpFetch(i,{headers:{authorization:e,"content-type":`application/json`},method:`GET`}),n={httpCode:t.status,method:`GET`,url:i};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(n.what=e),{code:5,data:n}}let a;try{if(a=yield t.json(),!(a!=null&&a.id))return{code:6,data:n}}catch(e){return n.what=$i(e),{code:6,data:n}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:i,what:$i(e)}}}})()}_fetchWorkflows(e){var t=this;return b(function*(e,n={limit:0,skip:0}){let r=new URL(`${t._origin}/api/workflows`);typeof n.limit==`number`&&n.limit>=0&&r.searchParams.set(`limit`,String(n.limit)),typeof n.skip==`number`&&n.skip>=0&&r.searchParams.set(`skip`,String(n.skip));let i=r.toString();try{let n=yield t._httpFetch(i,{headers:{authorization:e},method:`GET`}),r={httpCode:n.status,method:`GET`,url:i};if(!n.ok){let e=yield t._getResponseTextFromBadResponse(n);return e&&(r.what=e),{code:5,data:r}}let a;try{if(a=yield n.json(),!a)return{code:6,data:r}}catch(e){return r.what=$i(e),{code:6,data:r}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:i,what:$i(e)}}}}).apply(this,arguments)}_fetchWorkflow(e,t){var n=this;return b(function*(){let r=`${n._origin}/api/workflows/${t}?renderClient=true`;try{let t=yield n._httpFetch(r,{headers:{authorization:e},method:`GET`}),i={httpCode:t.status,method:`GET`,url:r};if(!t.ok){let e=yield n._getResponseTextFromBadResponse(t);return e&&(i.what=e),{code:5,data:i}}let a;try{if(a=yield t.json(),!a)return{code:6,data:i}}catch(e){return i.what=$i(e),{code:6,data:i}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:r,what:$i(e)}}}})()}_fetchStep({authorizationHeader:e,sessionId:t,stepId:n,data:r,type:i}){var a=this;return b(function*(){let o=`POST`,s=A({},i&&{type:i}),c=new URLSearchParams(s).toString(),l=`${a._origin}/api/sessions/${t}/step/${n}${c?`?${c}`:``}`;try{let t=yield a._httpFetch(l,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(r),method:o}),n={httpCode:t.status,method:o,url:l};if(!t.ok){let e=yield a._getResponseTextFromBadResponse(t);return e&&(n.what=e),{code:5,data:n}}let i;try{if(i=yield t.json(),!i)return{code:6,data:n}}catch(e){return n.what=$i(e),{code:6,data:n}}return{code:0,data:i}}catch(e){return{code:4,data:{httpCode:0,method:o,url:l,what:$i(e)}}}})()}_fetchSessionLogs(e,t,n){var r=this;return b(function*(){let i=`POST`,a=`${r._origin}/api/sessions/${t}/logs`;try{let t=yield fetch(a,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(n.body),method:i}),o={httpCode:t.status,method:i,url:a};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield t.json(),!s)return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_fetchStartIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r}){var i=this;return b(function*(){let a=`POST`,o=`${t}/api/v1/iam/auth/start`,s={applicationId:e};Bi(n)&&(s.metadata=n),r&&(s.locale=r);try{let e=yield fetch(o,{headers:{"content-type":`application/json`},body:JSON.stringify(s),method:a}),t={httpCode:e.status,method:a,url:o};if(!e.ok){let n=yield i._getResponseTextFromBadResponse(e);return n&&(t.what=n),{code:5,data:t}}let n;try{if(n=yield e.json(),!n)return{code:6,data:t}}catch(e){return t.what=$i(e),{code:6,data:t}}return{code:0,data:n}}catch(e){return{code:4,data:{httpCode:0,method:a,url:o,what:$i(e)}}}})()}connectByUserPass(e){var t=this;return b(function*(){!e.userName||e.password,t._connect={type:`byUserPass`,arg:e},t._origin=t._getOriginFromConfig(e);let n=yield t._fetchPing();if(n.code!==0)return n;let r=`${btoa(`${e.userName}:${e.password}`)}`,i=t._getAuthorizationHeaderFromBasicToken(r),a=yield t._fetchMe(i);if(a.code!==0)return a;let o=yield t._fetchConnection(i);return o.code===0?(t._setConnectionToken(o.data),i=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(i),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}connectByApiKey(e,t){var n=this;return b(function*(){e.apiKey,n._connect={type:`byApiKey`,arg:e},n._origin=n._getOriginFromConfig(e);let r=yield n._fetchPing();if(r.code!==0)return r;let i=yield n._getValidApiKeyAuthToken(e,t);if(i.code!==0)return i;n._setApiKeyAuthToken(i.data);let a=n._getAuthorizationHeaderFromAuthToken(i.data.token),o=yield n._fetchMe(a);if(o.code!==0)return o;let s=yield n._fetchConnection(a);return s.code===0?(n._setConnectionToken(s.data),a=n._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield n._fetchMe(a),o.code===0?{code:0,data:{authToken:i.data.token,workflows:s.data.workflows}}:o):s})()}connectByUrl(e){var t=this;return b(function*(){t._connect={type:`byUrl`,arg:e};let n=t._getOriginFromUrl(e),r=t._getSessionIdFromUrl(e);t._origin=n;let i=t._getAuthorizationSearchParam(e),a=yield t._fetchPing();if(a.code!==0)return a;let o=yield t._fetchMe(i);if(o.code!==0)return o;let s=yield t._fetchConnection(i,r);return s.code===0?(t._setConnectionToken(s.data),i=t._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield t._fetchMe(i),o.code===0?{code:0,data:{workflows:s.data.workflows}}:o):s})()}getConnectionToken(e){var t=this;return b(function*(){var n,r,i;return+new Date<+new Date(t._connectionToken.expiresAt)-t._connectionTokenExpirationBufferMs?t._connectionToken.token:((n=t._connect)==null?void 0:n.type)===`byUserPass`?(yield t.connectByUserPass(t._connect.arg),t._connectionToken.token):((r=t._connect)==null?void 0:r.type)===`byApiKey`?(yield t.connectByApiKey(t._connect.arg,e),t._connectionToken.token):((i=t._connect)==null?void 0:i.type)===`byUrl`?(yield t.connectByUrl(t._connect.arg),t._connectionToken.token):``})()}startSession({workflowId:e,locale:t,metadata:n,location:r}){var i=this;return b(function*(){let a={locale:t};Bi(n)&&(a.metadata=n),r&&(a.location=r);let o=yield i.getConnectionToken(!1),s=i._getAuthorizationHeaderFromConnectionToken(o);return yield i._fetchSessionByWorkflowId(s,e,a)})()}continueSession({sessionId:e,locale:t}){var n=this;return b(function*(){let r=yield n.getConnectionToken(!1),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}listWorkflows(){var e=this;return b(function*(t={limit:0,skip:0}){let n=yield e.getConnectionToken(!1),r=e._getAuthorizationHeaderFromConnectionToken(n);return yield e._fetchWorkflows(r,t)}).apply(this,arguments)}getWorkflow(e,t,n){var r=this;return b(function*(){let i=yield r.getConnectionToken(!1),a=r._getAuthorizationHeaderFromConnectionToken(i),o;if(t){let e=yield r._fetchSessionState(a,t,n);o=e.code===0?{data:e.data.workflow,code:e.code}:e}else o=yield r._fetchWorkflow(a,e);return o})()}pushData({sessionId:e,stepId:t,data:n,type:r}){var i=this;return b(function*(){let a=yield i.getConnectionToken(!0),o=i._getAuthorizationHeaderFromConnectionToken(a);return yield i._fetchStep({authorizationHeader:o,sessionId:e,stepId:t,data:n,type:r})})()}getSessionState(e,t){var n=this;return b(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}pushLogs(e,t){var n=this;return b(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionLogs(i,e,t)})()}startIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r}){var i=this;return b(function*(){return yield i._fetchStartIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r})})()}_postStartUpload({authorizationHeader:e,body:t}){var n=this;return b(function*(){n.abortController||(n.abortController=new AbortController);let r=n.abortController.signal,i=`POST`,a=`${n._origin}/api/v1/files/start-upload`,o={"Content-Type":`application/json`,authorization:e};try{let e=yield fetch(a,{method:i,headers:o,body:JSON.stringify(t),signal:r}),n={httpCode:e.status,method:i,url:a};if(!e.ok){let t=yield e.text();return t&&(n.what=t),{code:5,data:n}}try{return{code:0,data:yield e.json()}}catch(e){return n.what=$i(e),{code:6,data:n}}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_postFileChunk({authorizationHeader:e,uploadId:t,sha256:n,contentRange:r,body:i}){var a=this;return b(function*(){var o;let s=(o=a.abortController)==null?void 0:o.signal,c=`POST`,l=new URL(`${a._origin}/api/v1/files`);l.searchParams.set(`uploadId`,t),l.searchParams.set(`sha256`,n);let u=l.toString(),d={"Content-Type":`application/octet-stream`,"Content-Range":r,authorization:e};try{let e=yield fetch(u,{method:c,signal:s,headers:d,body:i}),t={httpCode:e.status,method:c,url:u};if(e.status===204)return{code:0,data:{}};if(e.status===200)try{let t=yield e.json();return{code:0,data:t==null?{}:t}}catch(e){return t.what=$i(e),{code:6,data:t}}let n=yield e.text();return n&&(t.what=n),{code:5,data:t}}catch(e){return{code:4,data:{httpCode:0,method:c,url:u,what:$i(e)}}}})()}_uploadFileInChunks({authorizationHeader:e,file:t,chunkSize:n,uploadId:r,onProgress:i}){var a=this;return b(function*(){let o=t.size,s=0,c=``,l=`POST`,u=`${a._origin}/api/v1/files`;try{for(;s<o;){var d;if(!((d=a.abortController)==null||(d=d.signal)==null)&&d.aborted)return{code:4,data:{httpCode:0,method:l,url:u,what:`Aborted`}};let f=Math.min(s+n,o),p=yield t.slice(s,f).arrayBuffer(),m=yield ta(p),h=`bytes ${s}-${f-1}/${o}`,g=yield a._postFileChunk({authorizationHeader:e,uploadId:r,sha256:m,contentRange:h,body:p});if(g.code!==0)return g;s=f,i(s,o),g.data.tempFileId&&(c=g.data.tempFileId)}return c?{code:0,data:{tempFileId:c}}:{code:5,data:{httpCode:0,method:l,url:u,what:`upload finished without tempFileId`}}}catch(e){return{code:4,data:{httpCode:0,method:l,url:u,what:$i(e)}}}})()}uploadFileToTemp(e,t){var n=this;return b(function*(){try{let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r),a={name:e.name,size:e.size},o=yield n._postStartUpload({authorizationHeader:i,body:a});if(o.code!==0)return o;let{uploadId:s,chunkSize:c}=o.data;return yield n._uploadFileInChunks({authorizationHeader:i,file:e,chunkSize:c,uploadId:s,onProgress:t})}finally{n.abortController=null}})()}abortRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};$([Df,Q(`design:type`,Function),Q(`design:paramtypes`,[Object,typeof RequestInit>`u`?Object:RequestInit]),Q(`design:returntype`,Promise)],Of.prototype,`_httpFetch`,null);var kf,Af=3e4,jf=class e{static isImageLike(e){return typeof e.imageURL==`string`||typeof e.imageId==`string`||typeof e.base64==`string`}static collectAssets(e,t){let n=[],r=e=>{if(!e||typeof e!=`object`)return;if(Array.isArray(e)){for(let t of e)r(t);return}let i=e,a=t(i);if(a){n.push(a);return}for(let e of Object.values(i))r(e)};return r(e),n}static collectAssetsOfGuiModule(e){return this.collectAssets(e,e=>e.prepareRequired&&this.isImageLike(e)?e:null)}static collectAssetsOfExternalModule(e){return this.collectAssets(e,e=>{let t=e.idvAsset;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t;if(this.isImageLike(e))return e}return null})}static checkImage(e,t){var n=this;return b(function*(){if(!(t&&!e.prepareRequired)){if(e.base64){if(yield n.checkImageBySrc(e.base64,e.timeout))return;if(n.failedAssets.base64.add(e.base64),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(`base64 string`);return}}if(!e.imageId){if(e.imageURL){if(yield n.checkImageBySrc(e.imageURL,e.timeout))return;if(n.failedAssets.imageURL.add(e.imageURL),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(e.imageURL);return}}if(e.failurePolicy===`placeholderImage`){let r=e.placeholderImage;r&&(yield n.checkImage(r,t))}}}})()}static checkImageBySrc(t,n){return b(function*(){return new Promise(r=>{let i=null,a=null,o=!1,s=n?n*1e3:Af,c=e=>{o||(o=!0,l(),r(e))},l=()=>{a!==null&&(clearTimeout(a),a=null),i&&(i.onload=null,i.onerror=null,i=null)};try{if(t.length===0)return c(!1);a=setTimeout(()=>c(!1),s),i=new Image,i.onload=b(function*(){if(!(i!=null&&i.decode))return c(!0);try{yield i.decode()}catch(e){}e.decodedImages.set(t,i),c(!0)}),i.onerror=()=>c(!1),i.src=t}catch(e){c(!1)}})})()}static warmupModuleImages(t,n){var r=this;return b(function*(){if(!t)return r.failedAssets;let i;n?i=e.collectAssetsOfGuiModule(t):(t.preloadAssetsRequired!==!0&&(i=[]),i=e.collectAssetsOfExternalModule(t));let a=i.map(t=>e.checkImage(t,n));return yield Promise.allSettled(a),r.failedAssets})()}static clearFailedAssets(){this.decodedImages.clear(),this.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set}}};kf=jf,kf.decodedImages=new Map,kf.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set};var Mf=(e,t)=>({fetchService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitFetchService:function(){var t=b(function*(){e({fetchService:new Of})});return function(){return t.apply(this,arguments)}}(),setFinalWaitingUi:t=>{e({isFinalWaitingUi:t})},connectByApiKey(e){return b(function*(){let n=yield t().fetchService.connectByApiKey(e,!1);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what,r=new Fa(A({errorCode:e},Qi(t)&&{message:t}));return{error:new Ma({errorCode:ci.CONNECTION_ISSUE,underlyingBaseError:r})}}return n.data})()},connectByUserPass(e){return b(function*(){let n=yield t().fetchService.connectByUserPass(e);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what;return{error:new Fa(A({errorCode:e},Qi(t)&&{message:t}))}}return{workflows:n.data.workflows}})()},connectByUrl(e){return b(function*(){let n=yield t().fetchService.connectByUrl(e);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what,r=new Fa(A({errorCode:e},Qi(t)&&{message:t}));return{workflows:[],error:new Ma({errorCode:ci.CONNECTION_ISSUE,underlyingBaseError:r})}}return{workflows:n.data.workflows}})()},workflowSessionCompletion:()=>{},setWorkflowSessionCompletion:n=>{let r=e=>{var r;let i=(r=t().currentSessionData)==null?void 0:r.sessionId,a=A({results:A(A({},e.results),{},{sessionId:i})},e.error&&{error:e.error});if(t().removeCurrentSessionDataLsAndStore(),n(a),e.error){let n=JSON.stringify(e.error);t().fetchService.pushLogs(i,{body:{log:n,errorCode:e.error.shortChain,deviceInfo:{platform:`Web`}}})}};e(()=>({workflowSessionCompletion:r}))},loadModules:function(){var n=b(function*(n){try{let t=yield Nf(n);return e(()=>({externalModules:t})),{}}catch(e){return t().resetFetchService(),t().resetProps(),{error:new ja({errorCode:si.MODULES_INSTANTIATION_FAILURE})}}});return function(e){return n.apply(this,arguments)}}(),setIsProcessing:t=>{e({isProcessing:t})},getProcessingTemplate:()=>{let e=t().workflow;if(!e)return null;let n=e.client.steps,r=Ti(n.find(e=>e.templateId===gi));if(!r)return null;let i=e.client.layout,a=Ei(r.templateLayout,i);return a&&(r.templateLayout=a),r},_pushStep:function(){var e=b(function*(e,n,r){let i=null;return yield ki(function(){var a=b(function*(){var a;let o=(a=t().currentSessionData)==null?void 0:a.sessionId,s=yield t().fetchService.pushData({sessionId:o,stepId:e,data:n,type:r}),c=null;if(s.code===4&&(c=di.HTTP_ISSUE),s.code!==0&&s.code!==4&&(c=di.PROVIDER_ERROR),c!==null){let e=new Ia({errorCode:di.HTTP_ISSUE});i=new Pa({errorCode:oi.INTERNAL_ISSUE,message:`Error from external module`,underlyingBaseError:e})}return s.code===0?(i=null,s):null});return function(){return a.apply(this,arguments)}}(),()=>null),i?{error:i}:{}});return function(t,n,r){return e.apply(this,arguments)}}(),_findStepById:e=>{let n=t().workflow;if(!n||!e)return null;let r=n.steps.find(t=>t.id===e);return r==null?null:r},_getSessionStateNextStepConditionResult:function(){var e=b(function*(){let e=t().currentSessionData,n=e==null?void 0:e.sessionId,r=e==null?void 0:e.locale,i=yield t().fetchService.getSessionState(n,r),a=i.code;if(a!==0){let e=ea(a,di),t=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Get session: Failed to get session (from HTTP Get)${Qi(t)&&`: ${t}`}.`});let n=new Ia(A({errorCode:e},Qi(t)&&{message:t}));return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:n}),shouldRetry:!0}}B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Get session: Session data successfully received (from HTTP Get).`});let o=t()._validateSession(i.data);if(`validationErrorMessage`in o){let e=new Ia({errorCode:di.DECODING_FAILED});return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}let s=o.workflow.steps[0],c=o.isProcessingFiles,l=Mi(s),u=null;if(l&&(u=di.NOT_DATA_TYPE),c&&(u=di.IS_PROCESSING),u!==null){(l||c)&&B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Get session: Session is still in processing state (from HTTP Get).`});let e=new Ia({errorCode:u});return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}return o});return function(){return e.apply(this,arguments)}}(),waitForStartSession(e){return b(function*(){let n,r;if(yield new Promise(i=>{let a=!1,o=()=>{a||(a=!0,Va.clearSubscriptions(),i())},s=function(){var i=b(function*(){let i=yield t().fetchService.startSession(e);if(!a){if(i.code!==0){let e=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Start session failed (from HTTP Post)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ea(i.code,ui)},Qi(e)&&{message:e}));r=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),o();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Start session: session data successfully received (from HTTP Post).`}),n=i.data,o()}});return function(){return i.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var i;if(a)return;let s=t()._decodeMessageFromWebSocket(e);if(s&&(s==null?void 0:s.eventType)===`SESSION_STARTED`){if(s.error){let e=s.error.message;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Start session failed (from WebSocket)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ui.PROVIDER_ERROR,underlyingError:JSON.stringify(s.error)},Qi(e)&&{message:e}));r=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),o();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Start session: session data successfully received (from WebSocket).`}),n=(i=s.options)==null?void 0:i.session,o()}}),s()}),r)return{error:r};let i=t()._validateSession(n);if(`validationErrorMessage`in i){let e=new La({errorCode:ui.DECODING_FAILED,message:i.validationErrorMessage});return{error:new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:i}})()},waitForContinueSession({sessionId:e,locale:n}){return b(function*(){let r,i;if(yield new Promise(a=>{let o=!1,s=()=>{o||(o=!0,Va.clearSubscriptions(),a())},c=function(){var a=b(function*(){let a=yield t().fetchService.continueSession({sessionId:e,locale:n});if(!o){if(a.code!==0){let e=a.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Continue session failed (from HTTP Get)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ea(a.code,ui)},Qi(e)&&{message:e}));i=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),s();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session: session data successfully received (from HTTP Get).`}),r=a.data,s()}});return function(){return a.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var n;if(o)return;let a=t()._decodeMessageFromWebSocket(e);if(a&&[`SESSION_STATE`,`SESSION_UPDATED`].includes(a==null?void 0:a.eventType)){if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Continue session failed (from WebSocket)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ui.PROVIDER_ERROR,underlyingError:JSON.stringify(a.error)},Qi(e)&&{message:e}));i=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),s();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session: session data successfully received (from WebSocket).`}),r=(n=a.options)==null?void 0:n.session,s()}}),Va.onReconnect(()=>{Va.sendSessionGetMessage({sessionId:e,locale:n})}),Va.sendSessionGetMessage({sessionId:e,locale:n}),c()}),i)return{error:i};let a=t()._validateSession(r);if(`validationErrorMessage`in a){let e=new La({errorCode:ui.DECODING_FAILED,message:a.validationErrorMessage});return{error:new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:a}})()},_waitForNextStep:function(){var e=b(function*(){var e;let n,r,i=((e=t().workflow)==null||(e=e.client)==null?void 0:e.sessionUpdateTimeout)||60,a=e=>e===t().currentStepId;if(yield new Promise(e=>{let o=1e4,s=Math.round(i*1e3/o),c=0,l,u=!1,d=()=>{u||(u=!0,clearTimeout(l),Va.clearSubscriptions(),e())},f=function(){var e=b(function*({isDeferred:e}){if(u)return;if(e){l=window.setTimeout(()=>{B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: no WebSocket message received, falling back to HTTP Get.`}),f({isDeferred:!1})},o);return}let i=yield t()._getSessionStateNextStepConditionResult();if(u)return;c++;let p=Tf.isSessionModel(i)&&a(i.currentStep);if((`shouldRetry`in i||p)&&c<s){l=window.setTimeout(()=>{f({isDeferred:!1})},o);return}Tf.isSessionModel(i)?n=i:i.error&&(r=i.error),d()});return function(t){return e.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var r;if(u)return;let i=t()._decodeMessageFromWebSocket(e);if(!i||![`SESSION_UPDATED`,`SESSION_STATE`].includes(i==null?void 0:i.eventType))return;let o=(r=i.options)==null?void 0:r.session;if(!o)return;let s=t()._validateSession(o);if(`validationErrorMessage`in s){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: invalid session from WebSocket, falling back to HTTP Get.`}),clearTimeout(l),f({isDeferred:!1});return}Ni(s)||a(s.currentStep)||(B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: session data successfully received (from WebSocket).`}),n=s,d())}),Va.onReconnect(()=>{var e,n;B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: WebSocket reconnected, requesting session via WebSocket.`});let r=(e=t().currentSessionData)==null?void 0:e.sessionId,i=(n=t().currentSessionData)==null?void 0:n.locale;Va.sendSessionGetMessage({sessionId:r,locale:i})}),f({isDeferred:!0})}),r){t().workflowSessionCompletion({error:r}),t().resetSession();return}if(n){let{workflow:e,properties:r,currentStep:i,locale:a}=n;yield t().setNextStep({workflow:e,properties:r,nextStepId:i,locale:a});return}});return function(){return e.apply(this,arguments)}}(),_setFinalStepAndStopProcess:e=>{let n=e||t().currentStepId;if(!n)return;let r=t()._findStepById(n);r&&(t().workflowSessionCompletion({results:{finalStep:{id:r.id,name:r.name,final:r.releaseClientApp}}}),t().resetSession(),t().listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:ri.DID_END_SESSION,module:`IDV`}))},_setIamAuthCodeAndStopProcess:e=>{var n,r;let i=e=>{if(!Vi(e))return null;let{message:t,code:n}=e;return typeof t==`string`&&t.toLowerCase()!==`none`?t:typeof n==`string`&&n.toLowerCase()!==`none`?n:null},a=(n=e.dataSource)==null?void 0:n.code,o=i((r=e.dataSource)==null?void 0:r.error);t().workflowSessionCompletion({results:{iamAuthCode:{code:a,error:o}}}),t().resetSession(),t().listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:ri.DID_END_SESSION,module:`IDV`})},_stepSocketListenerWhenStepIsRunning:e=>{if(!e){Va.clearSubscriptions();return}let n=e=>e===t().currentStepId,r=function(){var e=b(function*(){let e={},r=0;for(;r<5&&(r>0&&(yield ga(1e3*r)),r++,e=yield t()._getSessionStateNextStepConditionResult(),!(!(`shouldRetry`in e)||!e.shouldRetry)););if(`error`in e&&e.error){Va.clearSubscriptions(),t().workflowSessionCompletion({error:e.error}),t().resetSession();return}if(Tf.isSessionModel(e)&&!n(e.currentStep)){Va.clearSubscriptions();let{workflow:n,properties:r,currentStep:i,locale:a}=e;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a})}});return function(){return e.apply(this,arguments)}}(),i=function(){var e=b(function*(e){let i=t()._decodeMessageFromWebSocket(e);if(!i)return;let{eventType:a}=i;if([`SESSION_UPDATED`,`DEVICE_TRANSFERRED`].includes(a)){var o;Va.clearSubscriptions();let e=(o=i.options)==null?void 0:o.session;if(e){let r=t()._validateSession(e);if(!(`validationErrorMessage`in r)&&!Ni(r)&&!n(r.currentStep)){let{workflow:e,properties:n,currentStep:i,locale:a}=r;yield t().setNextStep({workflow:e,properties:n,nextStepId:i,locale:a});return}}yield r()}});return function(t){return e.apply(this,arguments)}}(),a=function(){var e=b(function*(){yield r()});return function(){return e.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(i),Va.onReconnect(a)},setNextStep:function(){var e=b(function*({workflow:e,properties:n,nextStepId:r,locale:i}){t().setWorkflow(e),t().setSessionProperties(n),i&&t().setLocale(i),t().setCurrentStepId(r),B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Attempting to set next step: ${r}`});let a=e.steps[0];if(Mi(a)){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Step type is PROCESSING, stepId: ${r}, waiting for next step...`}),t()._waitForNextStep();return}let o=e=>!!e&&Object.prototype.toString.call(e)===`[object Object]`&&e.templateId;if(a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===ni.IAM_AUTH_CODE){t()._setIamAuthCodeAndStopProcess(a);return}if(a!=null&&a.releaseClientApp&&!o(a.client)){t()._setFinalStepAndStopProcess(a.id);return}a!=null&&a.releaseClientApp&&o(a.client)&&t().setFinalWaitingUi(!0),yield t()._prepareScreenConfigAndShowStep(r),t().setIsProcessing(!1),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Next step successfully set: ${r}`}),t()._stepSocketListenerWhenStepIsRunning(!0)});return function(t){return e.apply(this,arguments)}}(),pushStepWaitNextStepAndSet:function(){var e=b(function*(e,n){var r;t()._stepSocketListenerWhenStepIsRunning(!1);let i=t().currentStepId;if(!i)return;if(t().setIsProcessing(!0),((r=t().workflow)==null||(r=r.logging)==null?void 0:r.level)===ei.INFO){var a;let e=B.cutCurrentStepLogs(i),n=(a=t().currentSessionData)==null?void 0:a.sessionId;t().fetchService.pushLogs(n,{body:{step:i,log:e,deviceInfo:{platform:`Web`}}}).catch(()=>{})}if(t().isFinalWaitingUi){t()._setFinalStepAndStopProcess();return}if(e.errorEnumName){let n=e,r=new Pa({errorCode:oi.MODULES_ISSUE,message:`Error from external module`,underlyingBaseError:n});t().workflowSessionCompletion({error:r}),t().resetSession();return}t()._waitForNextStep();let o=yield t()._pushStep(i,e,n);if(o.error){t().workflowSessionCompletion({error:o.error}),t().resetSession();return}});return function(t,n){return e.apply(this,arguments)}}(),_prepareScreenConfigAndShowStep:function(){var n=b(function*(n){var r;if(!n)return e(()=>({currentScreenConfig:null}));let i=t().workflow;if(!i)return e(()=>({currentScreenConfig:null}));let a=t().sessionProperties,o=null;if(n===`PROGRESS`&&t().getProcessingTemplate()!==null){let e=t().getProcessingTemplate();e&&(o={templateId:e.templateId,templateLayout:e.templateLayout,dataSource:null,locale:t().locale})}else{var s,c;let e=t()._findStepById(n);if(typeof(e==null||(s=e.client)==null?void 0:s.templateId)==`string`){var l;o=A(A({},e.client),{},{templateId:e.client.templateId,dataSource:(l=e.dataSource)==null?null:l,properties:a,stepType:e.type,locale:t().locale})}if(o){var u;o.sessionId=(u=t().currentSessionData)==null?void 0:u.sessionId,o.serviceToken=t().serviceToken}if(o&&Vi(e==null||(c=e.client)==null?void 0:c.templateLayout)){let t=i.client.layout,n=Ei(e.client.templateLayout,t);n&&(o.templateLayout=n)}}let d=ji(t().externalModules,i.steps,n);if(o===null||!d){let n=new Pa({errorCode:oi.UNKNOWN_STEP,message:`Unsupported step template`});t().workflowSessionCompletion({error:n}),e(()=>({currentScreenConfig:null})),t().resetSession();return}jf.clearFailedAssets(),o=ma(o);let f=t().externalModules.find(e=>e.id===`idv-gui`),p=!!(!(f==null||(r=f.supportedTemplates)==null)&&r.includes(o.templateId)),m=yield jf.warmupModuleImages(o,p);if(p){let e=t().fetchService;o=A(A({},o),{},{uploadFileToTemp:e==null?void 0:e.uploadFileToTemp.bind(e),abortRequest:e==null?void 0:e.abortRequest.bind(e)})}o=A(A({},o),{},{failedAssets:m}),e(()=>({currentScreenConfig:o}))});return function(e){return n.apply(this,arguments)}}(),deinitializationIdv:function(){var e=b(function*(){return t().resetFetchService(),t().externalModules.forEach(e=>{e.component.deinitialize&&e.component.isReady&&e.component.deinitialize()}),{}});return function(){return e.apply(this,arguments)}}(),resetSession:()=>e(()=>({isFinalWaitingUi:!1,isProcessing:!1,currentStepId:null,currentScreenConfig:null,workflow:null,serviceToken:void 0})),resetFetchService:()=>e(()=>({fetchService:null})),_decodeMessageFromWebSocket:e=>{try{return JSON.parse(atob(JSON.parse(e).payload))}catch(e){return B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Failed to decode message from WebSocket: ${$i(e)}`}),null}},_validateSession:e=>{let t=Tf.fromPlain(e);return`validationErrorMessage`in t?B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:`Session data validation failed: ${JSON.stringify(t.validationErrorMessage)}`}):B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:`Session data validated successfully.`}),t}});function Nf(e){return Pf.apply(this,arguments)}function Pf(){return Pf=b(function*(e){let t=[];for(let n of e)n&&t.push({id:n.getIdentifier(),supportedTemplates:n.getSupportedTemplates(),component:n});return t.filter(e=>e!==null)}),Pf.apply(this,arguments)}var Ff=Hr((...e)=>A(A(A({},la(...e)),Ef(...e)),Mf(...e))),If=e=>/^[a-z][a-z0-9]*-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)&&e.length<=100,Lf=(e,t)=>{if(!If(e))throw Error(`Invalid component name: ${e}`);let n=document.createElement(e);return n.style.width=`100%`,n.style.height=`100%`,n.setProps(t),n},Rf=e=>{if(typeof e!=`object`||!e||Array.isArray(e))return{};let t=e,n={};for(let e of Object.keys(t)){let r=t[e];typeof r!=`function`&&(n[e]=r)}return n},zf=class{constructor(e){this.isPortrait=!1,this.isLandscape=!1,this.orientation=`portrait`,this._handleOrientationChange=()=>{let e=this._getOrientation();this.orientation!==e&&(this.orientation=e,this.isPortrait=this.orientation===`portrait`,this.isLandscape=this.orientation===`landscape`,this.host.requestUpdate())},(this.host=e).addController(this)}_getOrientation(){return window.matchMedia(`(orientation: landscape)`).matches?`landscape`:`portrait`}hostConnected(){typeof window<`u`&&(this._handleOrientationChange(),window.addEventListener(`load`,this._handleOrientationChange),window.addEventListener(`resize`,this._handleOrientationChange))}hostDisconnected(){typeof window<`u`&&(window.removeEventListener(`load`,this._handleOrientationChange),window.removeEventListener(`resize`,this._handleOrientationChange))}},Bf=o(((e,t)=>{t.exports=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(e,t,n){"use strict";e.exports={BROWSER_TYPES:{CHROME:`Chrome`,FIREFOX:`Firefox`,OPERA:`Opera`,YANDEX:`Yandex`,SAFARI:`Safari`,INTERNET_EXPLORER:`Internet Explorer`,EDGE:`Edge`,CHROMIUM:`Chromium`,IE:`IE`,MOBILE_SAFARI:`Mobile Safari`,EDGE_CHROMIUM:`Edge Chromium`},DEVICE_TYPES:{MOBILE:`mobile`,TABLET:`tablet`,SMART_TV:`smarttv`,CONSOLE:`console`,WEARABLE:`wearable`,BROWSER:void 0},OS_TYPES:{IOS:`iOS`,ANDROID:`Android`,WINDOWS_PHONE:`Windows Phone`,WINDOWS:`Windows`,MAC_OS:`Mac OS`},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}}),(function(e,t,n){"use strict";var r=n(2),i=n(0),a=i.BROWSER_TYPES,o=i.OS_TYPES,s=i.DEVICE_TYPES,c=n(4),l=c.checkType,u=c.broPayload,d=c.mobilePayload,f=c.wearPayload,p=c.consolePayload,m=c.stvPayload,h=c.getNavigatorInstance,g=c.isIOS13Check,_=new r,v=_.getBrowser(),y=_.getDevice(),b=_.getEngine(),x=_.getOS(),S=_.getUA(),C=a.CHROME,w=a.CHROMIUM,T=a.IE,E=a.INTERNET_EXPLORER,D=a.OPERA,ee=a.FIREFOX,te=a.SAFARI,O=a.EDGE,ne=a.YANDEX,k=a.MOBILE_SAFARI,re=s.MOBILE,ie=s.TABLET,ae=s.SMART_TV,oe=s.BROWSER,se=s.WEARABLE,ce=s.CONSOLE,le=o.ANDROID,ue=o.WINDOWS_PHONE,de=o.IOS,fe=o.WINDOWS,pe=o.MAC_OS,me=function(){return y.type===re},he=function(){return y.type===ie},ge=function(){switch(y.type){case re:case ie:return!0;default:return!1}},_e=function(){return x.name===o.WINDOWS&&x.version===`10`?typeof S==`string`&&S.indexOf(`Edg/`)!==-1:!1},ve=function(){return y.type===ae},ye=function(){return y.type===oe},be=function(){return y.type===se},xe=function(){return y.type===ce},Se=function(){return x.name===le},Ce=function(){return x.name===fe},we=function(){return x.name===pe},Te=function(){return x.name===ue},Ee=function(){return x.name===de},De=function(){return v.name===C},Oe=function(){return v.name===ee},ke=function(){return v.name===w},Ae=function(){return v.name===O},je=function(){return v.name===ne},Me=function(){return v.name===te||v.name===k},Ne=function(){return v.name===k},Pe=function(){return v.name===D},Fe=function(){return v.name===E||v.name===T},Ie=function(){var e=h(),t=e&&e.userAgent.toLowerCase();return typeof t==`string`?/electron/.test(t):!1},Le=function(){var e=h();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Re=function(){return g(`iPad`)},ze=function(){return g(`iPhone`)},Be=function(){return g(`iPod`)},Ve=function(){return v.major},He=function(){return v.version},Ue=function(){return x.version?x.version:`none`},We=function(){return x.name?x.name:`none`},Ge=function(){return v.name},Ke=function(){return y.vendor?y.vendor:`none`},qe=function(){return y.model?y.model:`none`},Je=function(){return b.name},Ye=function(){return b.version},Xe=function(){return S},Ze=function(){return y.type},Qe=ve(),$e=xe(),et=be(),tt=Ne()||Re(),nt=ke(),rt=ge()||Re(),it=me(),at=he()||Re(),ot=ye(),A=Se(),st=Te(),ct=Ee()||Re(),lt=De(),ut=Oe(),dt=Me(),ft=Pe(),pt=Fe(),mt=Ue(),ht=We(),gt=Ve(),_t=He(),vt=Ge(),yt=Ke(),bt=qe(),xt=Je(),St=Ye(),Ct=Xe(),wt=Ae()||_e(),Tt=je(),j=Ze(),Et=Le(),Dt=Re(),Ot=ze(),kt=Be(),At=Ie(),jt=_e(),Mt=Ae(),Nt=Ce(),M=we(),Pt=l(y.type);function Ft(){var e=Pt.isBrowser,t=Pt.isMobile,n=Pt.isTablet,r=Pt.isSmartTV,i=Pt.isConsole,a=Pt.isWearable;if(e)return u(e,v,b,x,S);if(r)return m(r,b,x,S);if(i)return p(i,b,x,S);if(t||n)return d(Pt,y,x,S);if(a)return f(a,b,x,S)}e.exports={deviceDetect:Ft,isSmartTV:Qe,isConsole:$e,isWearable:et,isMobileSafari:tt,isChromium:nt,isMobile:rt,isMobileOnly:it,isTablet:at,isBrowser:ot,isAndroid:A,isWinPhone:st,isIOS:ct,isChrome:lt,isFirefox:ut,isSafari:dt,isOpera:ft,isIE:pt,osVersion:mt,osName:ht,fullBrowserVersion:gt,browserVersion:_t,browserName:vt,mobileVendor:yt,mobileModel:bt,engineName:xt,engineVersion:St,getUA:Ct,isEdge:wt,isYandex:Tt,deviceType:j,isIOS13:Et,isIPad13:Dt,isIPhone13:Ot,isIPod13:kt,isElectron:At,isEdgeChromium:jt,isLegacyEdge:Mt,isWindows:Nt,isMacOs:M}}),(function(e,t,n){var r;(function(i,a){"use strict";var o=`0.7.18`,s=``,c=`?`,l=`function`,u=`undefined`,d=`object`,f=`string`,p=`major`,m=`model`,h=`name`,g=`type`,_=`vendor`,v=`version`,y=`architecture`,b=`console`,x=`mobile`,S=`tablet`,C=`smarttv`,w=`wearable`,T=`embedded`,E={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return typeof e==`string`?t.toLowerCase().indexOf(e.toLowerCase())!==-1:!1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.replace(/[^\d\.]/g,``).split(`.`)[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}},D={rgx:function(e,t){for(var n=0,r,i,o,s,c,u;n<t.length&&!c;){var f=t[n],p=t[n+1];for(r=i=0;r<f.length&&!c;)if(c=f[r++].exec(e),c)for(o=0;o<p.length;o++)u=c[++i],s=p[o],typeof s===d&&s.length>0?s.length==2?typeof s[1]==l?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?typeof s[1]===l&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):a:this[s[0]]=u?u.replace(s[1],s[2]):a:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):a):this[s]=u||a;n+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===d&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(E.has(t[n][r],e))return n===c?a:n}else if(E.has(t[n],e))return n===c?a:n;return e}},ee={browser:{oldsafari:{version:{"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`}}},device:{amazon:{model:{"Fire Phone":[`SD`,`KF`]}},sprint:{model:{"Evo Shift 4G":`7373KT`},vendor:{HTC:`APA`,Sprint:`Sprint`}}},os:{windows:{version:{ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,8.1:`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`}}}},te={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[h,v],[/(opios)[\/\s]+([\w\.]+)/i],[[h,`Opera Mini`],v],[/\s(opr)\/([\w\.]+)/i],[[h,`Opera`],v],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[h,v],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[h,`IE`],v],[/(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i],[[h,`Edge`],v],[/(yabrowser)\/([\w\.]+)/i],[[h,`Yandex`],v],[/(puffin)\/([\w\.]+)/i],[[h,`Puffin`],v],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[h,`UCBrowser`],v],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g,` `],v],[/(micromessenger)\/([\w\.]+)/i],[[h,`WeChat`],v],[/(qqbrowserlite)\/([\w\.]+)/i],[h,v],[/(QQ)\/([\d\.]+)/i],[h,v],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[h,v],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[h,v],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[h,v],[/(MetaSr)[\/\s]?([\w\.]+)/i],[h],[/(LBBROWSER)/i],[h],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[v,[h,`MIUI Browser`]],[/;fbav\/([\w\.]+);/i],[v,[h,`Facebook`]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[v,[h,`Chrome Headless`]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[h,/(.+)/,`$1 WebView`],v],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[h,/(.+(?:g|us))(.+)/,`$1 $2`],v],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[v,[h,`Android Browser`]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[h,v],[/(dolfin)\/([\w\.]+)/i],[[h,`Dolphin`],v],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[h,`Chrome`],v],[/(coast)\/([\w\.]+)/i],[[h,`Opera Coast`],v],[/fxios\/([\w\.-]+)/i],[v,[h,`Firefox`]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[v,[h,`Mobile Safari`]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[v,h],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[h,`GSA`],v],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[h,[v,D.str,ee.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape)\/([\w\.-]+)/i],[[h,`Netscape`],v],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[h,v]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[y,`amd64`]],[/(ia32(?=;))/i],[[y,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[y,`ia32`]],[/windows\s(ce|mobile);\sppc;/i],[[y,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[y,/ower/,``,E.lowerize]],[/(sun4\w)[;\)]/i],[[y,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[y,E.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[m,_,[g,S]],[/applecoremedia\/[\w\.]+ \((ipad)/],[m,[_,`Apple`],[g,S]],[/(apple\s{0,1}tv)/i],[[m,`Apple TV`],[_,`Apple`]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[_,m,[g,S]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[m,[_,`Amazon`],[g,S]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[m,D.str,ee.device.amazon.model],[_,`Amazon`],[g,x]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[m,_,[g,x]],[/\((ip[honed|\s\w*]+);/i],[m,[_,`Apple`],[g,x]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[_,m,[g,x]],[/\(bb10;\s(\w+)/i],[m,[_,`BlackBerry`],[g,x]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[m,[_,`Asus`],[g,S]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[_,`Sony`],[m,`Xperia Tablet`],[g,S]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[m,[_,`Sony`],[g,x]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[_,m,[g,b]],[/android.+;\s(shield)\sbuild/i],[m,[_,`Nvidia`],[g,b]],[/(playstation\s[34portablevi]+)/i],[m,[_,`Sony`],[g,b]],[/(sprint\s(\w+))/i],[[_,D.str,ee.device.sprint.vendor],[m,D.str,ee.device.sprint.model],[g,x]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[_,m,[g,S]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[_,[m,/_/g,` `],[g,x]],[/(nexus\s9)/i],[m,[_,`HTC`],[g,S]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[m,[_,`Huawei`],[g,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[_,m,[g,x]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[m,[_,`Microsoft`],[g,b]],[/(kin\.[onetw]{3})/i],[[m,/\./g,` `],[_,`Microsoft`],[g,x]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[m,[_,`Motorola`],[g,x]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[m,[_,`Motorola`],[g,S]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[_,E.trim],[m,E.trim],[g,C]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,`SmartTV`],[_,`Samsung`],[g,C]],[/\(dtv[\);].+(aquos)/i],[m,[_,`Sharp`],[g,C]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[_,`Samsung`],m,[g,S]],[/smart-tv.+(samsung)/i],[_,[g,C],m],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[_,`Samsung`],m,[g,x]],[/sie-(\w*)/i],[m,[_,`Siemens`],[g,x]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[_,`Nokia`],m,[g,x]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[m,[_,`Acer`],[g,S]],[/android.+([vl]k\-?\d{3})\s+build/i],[m,[_,`LG`],[g,S]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[_,`LG`],m,[g,S]],[/(lg) netcast\.tv/i],[_,m,[g,C]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[m,[_,`LG`],[g,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[m,[_,`Lenovo`],[g,S]],[/linux;.+((jolla));/i],[_,m,[g,x]],[/((pebble))app\/[\d\.]+\s/i],[_,m,[g,w]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[_,m,[g,x]],[/crkey/i],[[m,`Chromecast`],[_,`Google`]],[/android.+;\s(glass)\s\d/i],[m,[_,`Google`],[g,w]],[/android.+;\s(pixel c)\s/i],[m,[_,`Google`],[g,S]],[/android.+;\s(pixel xl|pixel)\s/i],[m,[_,`Google`],[g,x]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[m,/_/g,` `],[_,`Xiaomi`],[g,x]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[m,/_/g,` `],[_,`Xiaomi`],[g,S]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[m,[_,`Meizu`],[g,S]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[m,[_,`OnePlus`],[g,x]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[m,[_,`RCA`],[g,S]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[m,[_,`Dell`],[g,S]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[m,[_,`Verizon`],[g,S]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[_,`Barnes & Noble`],m,[g,S]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[m,[_,`NuVision`],[g,S]],[/android.+;\s(k88)\sbuild/i],[m,[_,`ZTE`],[g,S]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[m,[_,`Swiss`],[g,x]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[m,[_,`Swiss`],[g,S]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[m,[_,`Zeki`],[g,S]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[_,`Dragon Touch`],m,[g,S]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[m,[_,`Insignia`],[g,S]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[m,[_,`NextBook`],[g,S]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[_,`Voice`],m,[g,x]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[_,`LvTel`],m,[g,x]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[m,[_,`Envizen`],[g,S]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[_,m,[g,S]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[m,[_,`MachSpeed`],[g,S]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[_,m,[g,S]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[m,[_,`Rotor`],[g,S]],[/android.+(KS(.+))\s+build/i],[m,[_,`Amazon`],[g,S]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[_,m,[g,S]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[g,E.lowerize],_,m],[/(android[\w\.\s\-]{0,9});.+build/i],[m,[_,`Generic`]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[v,[h,`EdgeHTML`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[h,v],[/rv\:([\w\.]{1,9}).+(gecko)/i],[v,h]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[h,v],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[h,[v,D.str,ee.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[h,`Windows`],[v,D.str,ee.os.windows.version]],[/\((bb)(10);/i],[[h,`BlackBerry`],v],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[h,v],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[h,`Symbian`],v],[/\((series40);/i],[h],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[h,`Firefox OS`],v],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[h,v],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[h,`Chromium OS`],v],[/(sunos)\s?([\w\.\d]*)/i],[[h,`Solaris`],v],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[h,v],[/(haiku)\s(\w+)/i],[h,v],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[v,/_/g,`.`],[h,`iOS`]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[h,`Mac OS`],[v,/_/g,`.`]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]*)/i],[h,v]]},O=function(e,t){if(typeof e==`object`&&(t=e,e=a),!(this instanceof O))return new O(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:s),r=t?E.extend(te,t):te;return this.getBrowser=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.browser),e.major=E.major(e.version),e},this.getCPU=function(){var e={architecture:a};return D.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:a,model:a,type:a};return D.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};O.VERSION=o,O.BROWSER={NAME:h,MAJOR:p,VERSION:v},O.CPU={ARCHITECTURE:y},O.DEVICE={MODEL:m,VENDOR:_,TYPE:g,CONSOLE:b,MOBILE:x,SMARTTV:C,TABLET:S,WEARABLE:w,EMBEDDED:T},O.ENGINE={NAME:h,VERSION:v},O.OS={NAME:h,VERSION:v},typeof t===u?l===`function`&&n(3)?(r=(function(){return O}).call(t,n,t,e),r!==a&&(e.exports=r)):i&&(i.UAParser=O):(typeof e!==u&&e.exports&&(t=e.exports=O),t.UAParser=O);var ne=i&&(i.jQuery||i.Zepto);if(typeof ne!==u){var k=new O;ne.ua=k.getResult(),ne.ua.get=function(){return k.getUA()},ne.ua.set=function(e){k.setUA(e);var t=k.getResult();for(var n in t)ne.ua[n]=t[n]}}})(typeof window==`object`?window:this)}),(function(e,t){(function(t){e.exports=t}).call(t,{})}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=i.DEVICE_TYPES,o=i.defaultData,s=function(e){switch(e){case a.MOBILE:return{isMobile:!0};case a.TABLET:return{isTablet:!0};case a.SMART_TV:return{isSmartTV:!0};case a.CONSOLE:return{isConsole:!0};case a.WEARABLE:return{isWearable:!0};case a.BROWSER:return{isBrowser:!0};default:return o}},c=function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:n.name||!1,engineVersion:n.version,osName:r.name,osVersion:r.version,userAgent:i}},l=function(e,t,n,i){return r({},e,{vendor:t.vendor,model:t.model,os:n.name,osVersion:n.version,ua:i})},u=function(e,t,n,r){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},d=function(e,t,n,r){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},f=function(e,t,n,r){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},p=t.getNavigatorInstance=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1};e.exports={checkType:s,broPayload:c,mobilePayload:l,stvPayload:u,consolePayload:d,wearPayload:f,getNavigatorInstance:p,isIOS13Check:t.isIOS13Check=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)}}})])}))(),Vf=g`
47
+ - This validation runs before any file with validation decorator was parsed by NodeJS.`);var o=this.validatorOptions?this.validatorOptions.groups:void 0,s=this.validatorOptions&&this.validatorOptions.strictGroups||!1,c=this.validatorOptions&&this.validatorOptions.always||!1,l=((a=this.validatorOptions)==null?void 0:a.forbidUnknownValues)===void 0||this.validatorOptions.forbidUnknownValues!==!1,u=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,c,s,o),d=this.metadataStorage.groupByPropertyName(u);if(l&&!u.length){var f=new ld;(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(f.target=e),f.value=void 0,f.property=void 0,f.children=[],f.constraints={unknownValue:`an unknown value was passed to the validate function`},n.push(f);return}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,d,n),Object.keys(d).forEach(function(t){var i=e[t],a=d[t].filter(function(e){return e.type===ud.IS_DEFINED}),o=d[t].filter(function(e){return e.type!==ud.IS_DEFINED&&e.type!==ud.WHITELIST});i instanceof Promise&&o.find(function(e){return e.type===ud.PROMISE_VALIDATION})?r.awaitingPromises.push(i.then(function(i){r.performValidations(e,i,t,a,o,n)})):r.performValidations(e,i,t,a,o,n)})},e.prototype.whitelist=function(e,t,n){var r=this,i=[];Object.keys(e).forEach(function(e){(!t[e]||t[e].length===0)&&i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEach(function(t){var i,a=r.generateValidationError(e,e[t],t);a.constraints=(i={},i[ud.WHITELIST]=`property ${t} should not exist`,i),a.children=void 0,n.push(a)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),Object.keys(e.constraints).length===0){if(e.children.length===0)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,n,r,i,a){var o=i.filter(function(e){return e.type===ud.CUSTOM_VALIDATION}),s=i.filter(function(e){return e.type===ud.NESTED_VALIDATION}),c=i.filter(function(e){return e.type===ud.CONDITIONAL_VALIDATION}),l=this.generateValidationError(e,t,n);a.push(l),this.conditionalValidations(e,t,c)&&(this.customValidations(e,t,r,l),this.mapContexts(e,t,r,l),!(t===void 0&&this.validatorOptions&&this.validatorOptions.skipUndefinedProperties===!0)&&(t===null&&this.validatorOptions&&this.validatorOptions.skipNullProperties===!0||t==null&&this.validatorOptions&&this.validatorOptions.skipMissingProperties===!0||(this.customValidations(e,t,o,l),this.nestedValidations(t,s,l),this.mapContexts(e,t,i,l),this.mapContexts(e,t,o,l))))},e.prototype.generateValidationError=function(e,t,n){var r=new ld;return(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(r.target=e),(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.value===void 0||this.validatorOptions.validationError.value===!0)&&(r.value=t),r.property=n,r.children=[],r.constraints={},r},e.prototype.conditionalValidations=function(e,t,n){return n.map(function(n){return n.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,n,r){var i=this;n.forEach(function(n){var a=function(){return{targetName:e.constructor?e.constructor.name:void 0,property:n.propertyName,object:e,value:t,constraints:n.constraints}};n.validateIf&&!n.validateIf(e,t)||i.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations)&&!(i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var s=a();if(!n.each||!(Array.isArray(t)||t instanceof Set||t instanceof Map)){var c=o.instance.validate(t,s);if(X(c)){var l=c.then(function(a){if(!a){var s=pd(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(l)}else if(!c){var u=pd(i.createValidationError(e,t,n,o),2),d=u[0],f=u[1];r.constraints[d]=f}return}var p=nd(t).map(function(e){return o.instance.validate(e,s)});if(p.some(function(e){return X(e)})){var m=p.map(function(e){return X(e)?e:Promise.resolve(e)}),h=Promise.all(m).then(function(a){if(!a.every(function(e){return e})){var s=pd(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(h);return}if(!p.every(function(e){return e})){var g=pd(i.createValidationError(e,t,n,o),2),d=g[0],f=g[1];r.constraints[d]=f}}})})},e.prototype.nestedValidations=function(e,t,n){var r=this;e!==void 0&&t.forEach(function(i){if(!(i.type!==ud.NESTED_VALIDATION&&i.type!==ud.PROMISE_VALIDATION)&&!(r.validatorOptions&&r.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0))if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,a){r.performValidations(e,i,a.toString(),[],t,n.children)});else if(e instanceof Object){var a=typeof i.target==`string`?i.target:i.target.name;r.execute(e,a,n.children)}else{var o=pd(r.createValidationError(i.target,e,i),2),s=o[0],c=o[1];n.constraints[s]=c}})},e.prototype.mapContexts=function(e,t,n,r){var i=this;return n.forEach(function(e){if(e.context){var t=void 0;e.type===ud.CUSTOM_VALIDATION&&(t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0]);var n=i.getConstraintType(e,t);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},e.context))}})},e.prototype.createValidationError=function(e,t,n,r){var i=e.constructor?e.constructor.name:void 0,a=this.getConstraintType(n,r),o={targetName:i,property:n.propertyName,object:e,value:t,constraints:n.constraints},s=n.message||``;return!n.message&&(!this.validatorOptions||this.validatorOptions&&!this.validatorOptions.dismissDefaultMessages)&&r&&r.instance.defaultMessage instanceof Function&&(s=r.instance.defaultMessage(o)),[a,fd.replaceMessageSpecialTokens(s,o)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),hd=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},gd=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},_d=function(){function e(){}return e.prototype.validate=function(e,t,n){return this.coreValidate(e,t,n)},e.prototype.validateOrReject=function(e,t,n){return hd(this,void 0,void 0,function(){var r;return gd(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,n)];case 1:return r=i.sent(),r.length?[2,Promise.reject(r)]:[2]}})})},e.prototype.validateSync=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new md(this,i);o.ignoreAsyncValidations=!0;var s=[];return o.execute(r,a,s),o.stripEmptyErrors(s)},e.prototype.coreValidate=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new md(this,i),s=[];return o.execute(r,a,s),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(s)})},e}(),vd=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),yd,bd;function xd(e){if(yd)try{var t=yd.get(e);if(t||!bd||!bd.fallback)return t}catch(e){if(!bd||!bd.fallbackOnErrors)throw e}return vd.get(e)}var Sd=function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return xd(this.target)},enumerable:!1,configurable:!0}),e}();function Cd(e){var t;if(e.validator instanceof Function){if(t=e.validator,xd(sd).getTargetValidatorConstraints(e.validator).length>1)throw`More than one implementation of ValidatorConstraintInterface found for validator on: ${e.target.name}:${e.propertyName}`}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):``},e}(),cd().addConstraintMetadata(new Sd(t,e.name,e.async))}var r={type:e.name&&ud.isValid(e.name)?e.name:ud.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};cd().addValidationMetadata(new ed(r))}function wd(e,t){return function(n){return e(t&&t.each?`each value in `:``,n)}}function Td(e,t){return function(n,r){Cd({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}var Ed=ud.IS_DEFINED;function Dd(e){return e!=null}function Od(e){return Td({name:Ed,validator:{validate:function(e){return Dd(e)},defaultMessage:wd(function(e){return e+`$property should not be null or undefined`},e)}},e)}var kd=`isOptional`;function Ad(e){return function(t,n){var r={type:ud.CONDITIONAL_VALIDATION,name:kd,target:t.constructor,propertyName:n,constraints:[function(e,t){return e[n]!==null&&e[n]!==void 0}],validationOptions:e};cd().addValidationMetadata(new ed(r))}}function jd(e,t){return function(n,r){var i={type:ud.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:r,constraints:[e],validationOptions:t};cd().addValidationMetadata(new ed(i))}}var Md=function(){return Md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Md.apply(this,arguments)};function Nd(e){var t=Md({},e),n=t.each?`each value in `:``;return t.message=t.message||n+`nested property $property must be either object or array`,function(e,n){var r={type:ud.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};cd().addValidationMetadata(new ed(r))}}var Pd=`isNotEmpty`;function Fd(e){return e!==``&&e!=null}function Id(e){return Td({name:Pd,validator:{validate:function(e,t){return Fd(e)},defaultMessage:wd(function(e){return e+`$property should not be empty`},e)}},e)}var Ld=`isBoolean`;function Rd(e){return e instanceof Boolean||typeof e==`boolean`}function zd(e){return Td({name:Ld,validator:{validate:function(e,t){return Rd(e)},defaultMessage:wd(function(e){return e+`$property must be a boolean value`},e)}},e)}var Bd=`isNumber`;function Vd(e,t){if(t===void 0&&(t={}),typeof e!=`number`)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(t.maxDecimalPlaces!==void 0){var n=0;if(e%1!=0&&(n=e.toString().split(`.`)[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}function Hd(e,t){return e===void 0&&(e={}),Td({name:Bd,constraints:[e],validator:{validate:function(e,t){return Vd(e,t==null?void 0:t.constraints[0])},defaultMessage:wd(function(e){return e+`$property must be a number conforming to the specified constraints`},t)}},t)}var Ud=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Wd=`isEnum`;function Gd(e,t){return Object.keys(t).map(function(e){return t[e]}).includes(e)}function Kd(e){return Object.entries(e).filter(function(e){var t=Ud(e,2),n=t[0];return t[1],isNaN(parseInt(n))}).map(function(e){var t=Ud(e,2);return t[0],t[1]})}function qd(e,t){return Td({name:Wd,constraints:[e,Kd(e)],validator:{validate:function(e,t){return Gd(e,t==null?void 0:t.constraints[0])},defaultMessage:wd(function(e){return e+`$property must be one of the following values: $constraint2`},t)}},t)}var Jd=`isString`;function Yd(e){return e instanceof String||typeof e==`string`}function Xd(e){return Td({name:Jd,validator:{validate:function(e,t){return Yd(e)},defaultMessage:wd(function(e){return e+`$property must be a string`},e)}},e)}var Zd=`isArray`;function Qd(e){return Array.isArray(e)}function $d(e){return Td({name:Zd,validator:{validate:function(e,t){return Qd(e)},defaultMessage:wd(function(e){return e+`$property must be an array`},e)}},e)}var ef=`isObject`;function tf(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}function nf(e){return Td({name:ef,validator:{validate:function(e,t){return tf(e)},defaultMessage:wd(function(e){return e+`$property must be an object`},e)}},e)}function rf(e,t,n){return typeof e==`string`?xd(_d).validateSync(e,t,n):xd(_d).validateSync(e,t)}var Z;(function(e){e[e.PLAIN_TO_CLASS=0]=`PLAIN_TO_CLASS`,e[e.CLASS_TO_PLAIN=1]=`CLASS_TO_PLAIN`,e[e.CLASS_TO_CLASS=2]=`CLASS_TO_CLASS`})(Z||(Z={}));var af=new(function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?n===Z.CLASS_TO_CLASS||n===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?n===Z.CLASS_TO_PLAIN:!0})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?`none`:n?`excludeAll`:`exposeAll`},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?t===Z.CLASS_TO_PLAIN:!0}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly===!0?t===Z.CLASS_TO_PLAIN:!0}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n=e.get(t),r;n&&(r=Array.from(n.values()).filter(function(e){return e.propertyName!==void 0}));for(var i=[],a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=Array.from(c.values()).filter(function(e){return e.propertyName!==void 0});i.push.apply(i,l)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=c.get(n);if(l)return l}}},e.prototype.findMetadatas=function(e,t,n){var r=e.get(t),i;r&&(i=r.get(n));for(var a=[],o=0,s=this.getAncestors(t);o<s.length;o++){var c=s[o],l=e.get(c);l&&l.has(n)&&a.push.apply(a,l.get(n))}return a.slice().reverse().concat((i||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);n.prototype!==void 0;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}());function of(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function sf(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var cf=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function lf(e){var t=new e;return!(t instanceof Set)&&!(`push`in t)?[]:t}var uf=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,n,r,i,a){var o=this;if(a===void 0&&(a=0),Array.isArray(t)||t instanceof Set){var s=r&&this.transformationType===Z.PLAIN_TO_CLASS?lf(r):[];return t.forEach(function(t,r){var i=e?e[r]:void 0;if(!o.options.enableCircularCheck||!o.isCircular(t)){var c=void 0;if(typeof n!=`function`&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(o.transformationType===Z.PLAIN_TO_CLASS){c=n.options.discriminator.subTypes.find(function(e){return e.name===t[n.options.discriminator.property]});var l={newObject:s,object:t,property:void 0},u=n.typeFunction(l);c=c===void 0?u:c.value,n.options.keepDiscriminatorProperty||delete t[n.options.discriminator.property]}o.transformationType===Z.CLASS_TO_CLASS&&(c=t.constructor),o.transformationType===Z.CLASS_TO_PLAIN&&(t[n.options.discriminator.property]=n.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else c=n;var d=o.transform(i,t,c,void 0,t instanceof Map,a+1);s instanceof Set?s.add(d):s.push(d)}else o.transformationType===Z.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t))}),s}else if(n===String&&!i)return t==null?t:String(t);else if(n===Number&&!i)return t==null?t:Number(t);else if(n===Boolean&&!i)return t==null?t:!!t;else if((n===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):t==null?t:new Date(t);else if(of().Buffer&&(n===Buffer||t instanceof Buffer)&&!i)return t==null?t:Buffer.from(t);else if(sf(t)&&!i)return new Promise(function(e,r){t.then(function(t){return e(o.transform(void 0,t,n,void 0,void 0,a+1))},r)});else if(!i&&typeof t==`object`&&t&&typeof t.then==`function`)return t;else if(typeof t==`object`&&t){!n&&t.constructor!==Object&&(!Array.isArray(t)&&t.constructor===Array||(n=t.constructor)),!n&&e&&(n=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var c=this.getKeys(n,t,i),l=e||{};!e&&(this.transformationType===Z.PLAIN_TO_CLASS||this.transformationType===Z.CLASS_TO_CLASS)&&(l=i?new Map:n?new n:{});for(var u=function(r){if(r===`__proto__`||r===`constructor`)return`continue`;var o=r,s=r,c=r;if(!d.options.ignoreDecorators&&n){if(d.transformationType===Z.PLAIN_TO_CLASS){var u=af.findExposeMetadataByCustomName(n,r);u&&(c=u.propertyName,s=u.propertyName)}else if(d.transformationType===Z.CLASS_TO_PLAIN||d.transformationType===Z.CLASS_TO_CLASS){var u=af.findExposeMetadata(n,r);u&&u.options&&u.options.name&&(s=u.options.name)}}var f=void 0;f=d.transformationType===Z.PLAIN_TO_CLASS?t[o]:t instanceof Map?t.get(o):t[o]instanceof Function?t[o]():t[o];var p=void 0,m=f instanceof Map;if(n&&i)p=n;else if(n){var h=af.findTypeMetadata(n,c);if(h){var g={newObject:l,object:t,property:c},_=h.typeFunction?h.typeFunction(g):h.reflectedType;h.options&&h.options.discriminator&&h.options.discriminator.property&&h.options.discriminator.subTypes?t[o]instanceof Array?p=h:(d.transformationType===Z.PLAIN_TO_CLASS&&(p=h.options.discriminator.subTypes.find(function(e){if(f&&f instanceof Object&&h.options.discriminator.property in f)return e.name===f[h.options.discriminator.property]}),p=p===void 0?_:p.value,h.options.keepDiscriminatorProperty||f&&f instanceof Object&&h.options.discriminator.property in f&&delete f[h.options.discriminator.property]),d.transformationType===Z.CLASS_TO_CLASS&&(p=f.constructor),d.transformationType===Z.CLASS_TO_PLAIN&&f&&(f[h.options.discriminator.property]=h.options.discriminator.subTypes.find(function(e){return e.value===f.constructor}).name)):p=_,m=m||h.reflectedType===Map}else if(d.options.targetMaps)d.options.targetMaps.filter(function(e){return e.target===n&&!!e.properties[c]}).forEach(function(e){return p=e.properties[c]});else if(d.options.enableImplicitConversion&&d.transformationType===Z.PLAIN_TO_CLASS){var v=Reflect.getMetadata(`design:type`,n.prototype,c);v&&(p=v)}}var y=Array.isArray(t[o])?d.getReflectedType(n,c):void 0,b=e?e[o]:void 0;if(l.constructor.prototype){var x=Object.getOwnPropertyDescriptor(l.constructor.prototype,s);if((d.transformationType===Z.PLAIN_TO_CLASS||d.transformationType===Z.CLASS_TO_CLASS)&&(x&&!x.set||l[s]instanceof Function))return`continue`}if(!d.options.enableCircularCheck||!d.isCircular(f)){var S=d.transformationType===Z.PLAIN_TO_CLASS?s:r,C=void 0;d.transformationType===Z.CLASS_TO_PLAIN?(C=t[S],C=d.applyCustomTransformations(C,n,S,t,d.transformationType),C=t[S]===C?f:C,C=d.transform(b,C,p,y,m,a+1)):f===void 0&&d.options.exposeDefaultValues?C=l[s]:(C=d.transform(b,f,p,y,m,a+1),C=d.applyCustomTransformations(C,n,S,t,d.transformationType)),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}else if(d.transformationType===Z.CLASS_TO_CLASS){var C=f;C=d.applyCustomTransformations(C,n,r,t,d.transformationType),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}},d=this,f=0,p=c;f<p.length;f++){var m=p[f];u(m)}return this.options.enableCircularCheck&&this.recursionStack.delete(t),l}else return t},e.prototype.applyCustomTransformations=function(e,t,n,r,i){var a=this,o=af.findTransformMetadatas(t,n,this.transformationType);return this.options.version!==void 0&&(o=o.filter(function(e){return e.options?a.checkVersion(e.options.since,e.options.until):!0})),o=this.options.groups&&this.options.groups.length?o.filter(function(e){return e.options?a.checkGroups(e.options.groups):!0}):o.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length}),o.forEach(function(t){e=t.transformFn({value:e,key:n,obj:r,type:i,options:a.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var n=af.findTypeMetadata(e,t);return n?n.reflectedType:void 0}},e.prototype.getKeys=function(e,t,n){var r=this,i=af.getStrategy(e);i===`none`&&(i=this.options.strategy||`exposeAll`);var a=[];if((i===`exposeAll`||n)&&(a=t instanceof Map?Array.from(t.keys()):Object.keys(t)),n)return a;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var o=af.getExposedProperties(e,this.transformationType),s=af.getExcludedProperties(e,this.transformationType);a=cf(cf([],o,!0),s,!0)}if(!this.options.ignoreDecorators&&e){var o=af.getExposedProperties(e,this.transformationType);this.transformationType===Z.PLAIN_TO_CLASS&&(o=o.map(function(t){var n=af.findExposeMetadata(e,t);return n&&n.options&&n.options.name?n.options.name:t})),a=this.options.excludeExtraneousValues?o:a.concat(o);var c=af.getExcludedProperties(e,this.transformationType);c.length>0&&(a=a.filter(function(e){return!c.includes(e)})),this.options.version!==void 0&&(a=a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options?!0:r.checkVersion(n.options.since,n.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options?!0:r.checkGroups(n.options.groups)}):a.filter(function(t){var n=af.findExposeMetadata(e,t);return!n||!n.options||!n.options.groups||!n.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter(function(e){return r.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),a=a.filter(function(e,t,n){return n.indexOf(e)===t}),a},e.prototype.checkVersion=function(e,t){var n=!0;return n&&e&&(n=this.options.version>=e),n&&t&&(n=this.options.version<t),n},e.prototype.checkGroups=function(e){return e?this.options.groups.some(function(t){return e.includes(t)}):!0},e}(),df={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},ff=function(){return ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ff.apply(this,arguments)},pf=new(function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new uf(Z.CLASS_TO_PLAIN,ff(ff({},df),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,n){return new uf(Z.CLASS_TO_PLAIN,ff(ff({},df),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,n){return new uf(Z.PLAIN_TO_CLASS,ff(ff({},df),n)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,n){return new uf(Z.PLAIN_TO_CLASS,ff(ff({},df),n)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new uf(Z.CLASS_TO_CLASS,ff(ff({},df),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,n){return new uf(Z.CLASS_TO_CLASS,ff(ff({},df),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e.prototype.deserializeArray=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e}());function mf(e,t,n){return pf.plainToInstance(e,t,n)}function Q(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function $(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var hf=class{};$([Od(),Xd(),Q(`design:type`,String)],hf.prototype,`templateId`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],hf.prototype,`templateLayout`,void 0);var gf=class{};$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`id`,void 0),$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`name`,void 0),$([Od(),Xd(),Q(`design:type`,String)],gf.prototype,`type`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],gf.prototype,`final`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],gf.prototype,`releaseClientApp`,void 0),$([Ad(),nf(),Q(`design:type`,Object)],gf.prototype,`dataSource`,void 0),$([Ad(),nf(),jd((e,t)=>typeof t==`object`&&!!t&&Object.keys(t).length>0),Nd(),Q(`design:type`,hf===void 0?Object:hf)],gf.prototype,`client`,void 0);var _f=e=>Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&e.templateId===`PROGRESS`),vf=()=>Td({name:`hasProgressStep`,validator:{validate(e){return _f(e)},defaultMessage(){return`Workflow client must have at least one step with templateId "${gi}"`}}}),yf=class{};$([Od(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],yf.prototype,`layout`,void 0),$([$d(),Od(),Nd({each:!0}),vf(),Q(`design:type`,typeof Array>`u`?Object:Array)],yf.prototype,`steps`,void 0);var bf,xf=class{static isWorkflowModel(e){return typeof e==`object`&&!!e&&`id`in e&&`steps`in e&&`client`in e&&!(`error`in e)}};bf=xf,bf.fromPlain=e=>{let t=e.steps.map(e=>mf(gf,A(A({},e),{},{client:e.client!==null&&typeof e.client==`object`&&Object.keys(e.client).length>0?mf(hf,e.client):void 0}))),n=mf(yf,A(A({},e.client),{},{steps:e.client.steps.map(e=>mf(hf,e))})),r=mf(bf,A(A({},e),{},{steps:t,client:n})),i=rf(r);return i.length?{validationErrorMessage:JSON.stringify(Zi(``,i))}:r},$([Od(),Xd(),Q(`design:type`,String)],xf.prototype,`id`,void 0),$([Od(),$d(),Nd({each:!0}),Q(`design:type`,Array)],xf.prototype,`steps`,void 0),$([Od(),nf(),Nd(),Q(`design:type`,yf===void 0?Object:yf)],xf.prototype,`client`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],xf.prototype,`name`,void 0),$([Ad(),nf(),Q(`design:type`,Object)],xf.prototype,`logging`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],xf.prototype,`error`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],xf.prototype,`defaultLocale`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],xf.prototype,`config`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],xf.prototype,`metadata`,void 0),$([Ad(),Hd(),Q(`design:type`,Number)],xf.prototype,`sessionUpdateTimeout`,void 0),$([Ad(),zd(),Q(`design:type`,Boolean)],xf.prototype,`trackLocation`,void 0);var Sf=class{};$([Ad(),qd(ei),Q(`design:type`,ei===void 0?Object:ei)],Sf.prototype,`level`,void 0);var Cf=class{};$([Od(),Id(),Xd(),Q(`design:type`,String)],Cf.prototype,`id`,void 0),$([Od(),Xd(),Id(),Q(`design:type`,String)],Cf.prototype,`name`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`createdAt`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`updatedAt`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Cf.prototype,`string`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`createdBy`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`updatedBy`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`step`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`action`,void 0),$([Ad(),Xd(),Q(`design:type`,Object)],Cf.prototype,`path`,void 0),$([Ad(),Hd(),Q(`design:type`,Object)],Cf.prototype,`integer`,void 0),$([Ad(),Hd(),Q(`design:type`,Object)],Cf.prototype,`decimal`,void 0),$([Ad(),Q(`design:type`,Object)],Cf.prototype,`object`,void 0);var wf,Tf=class{static isSessionModel(e){return typeof e==`object`&&!!e&&`id`in e&&`currentStep`in e&&`workflow`in e&&`properties`in e&&`isProcessingFiles`in e&&!(`error`in e)}};wf=Tf,wf.fromPlain=e=>{var t,n;if(!e)return{validationErrorMessage:`Session data is not defined`};let r=A(A({},e),{},{workflow:mf(xf,A(A({},e.workflow),{},{steps:e.workflow.steps.map(e=>mf(gf,A(A({},e),{},{client:e.client==null?void 0:mf(hf,e.client)}))),client:mf(yf,A(A({},e.workflow.client),{},{steps:(t=e.workflow.client.steps.map(e=>mf(hf,e)))==null?[]:t}))})),properties:((n=e.properties)==null?[]:n).map(e=>mf(Cf,e))}),i=mf(wf,r),a=rf(i);return a.length?{validationErrorMessage:JSON.stringify(Zi(``,a))}:i},$([Od(),Id(),Xd(),Q(`design:type`,String)],Tf.prototype,`id`,void 0),$([Od(),Xd(),Q(`design:type`,String)],Tf.prototype,`currentStep`,void 0),$([Od(),Nd(),Q(`design:type`,xf===void 0?Object:xf)],Tf.prototype,`workflow`,void 0),$([Od(),Nd({each:!0}),Q(`design:type`,Array)],Tf.prototype,`properties`,void 0),$([Od(),zd(),Q(`design:type`,Boolean)],Tf.prototype,`isProcessingFiles`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`locale`,void 0),$([Ad(),zd(),Q(`design:type`,Boolean)],Tf.prototype,`isErrorFiles`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`shortId`,void 0),$([Ad(),Xd(),Q(`design:type`,String)],Tf.prototype,`deviceId`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],Tf.prototype,`deviceMetadata`,void 0),$([Ad(),nf(),Q(`design:type`,typeof Record>`u`?Object:Record)],Tf.prototype,`metadata`,void 0);var Ef=(e,t)=>({_isInitialized:!1,_initializationInProgress:!1,_isConnectedToPlatform:!1,_sessionIdFromUrl:null,_ttl:86400,_runSocketConnection:function(){var e=b(function*(e){let{host:n,isSecure:r,port:i}=t().startConfig;if(n&&e&&(yield Va.connect({host:n,isSecure:r,port:i,token:e})),!n||!e||!Va.isConnected()){let e=new La({errorCode:ui.CONNECTION_ISSUE,message:`WebSocket connection issue`}),t=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`WebSocket connection issue`}),{error:t}}return{}});return function(t){return e.apply(this,arguments)}}(),_continueSession:function(){var e=b(function*(e){var n;let r=t()._sessionIdFromUrl,i=t().startConfig,a=Qi(i.apiKey),o=(n=t().workflow)==null?void 0:n.id,s=r?`Session continued from force session id`:`Session restored from local storage`,c;if(r)B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with force session id: ${r}`}),c=r;else if(a){var l;if(!t().sessionRestoreMode)return{};let e=i.apiKey,n=Fi.getAuthTokenLs(),r=n&&((l=n[e])==null?void 0:l.sessionId);if(!r)return{};r&&(c=r),B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with api key: ${e}`})}else{if(!t().sessionRestoreMode)return{};let e=t().getCurrentSessionDataLs();if(!e)return{};let n=e.sessionId,r=e.workflowId;if(!n||r!==o)return{};c=n,B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session with session id from LS: ${n}`})}let u=yield t().waitForContinueSession({sessionId:c,locale:e});return u.error?{error:u.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:a,sessionId:u.sessionData.id,workflowId:o,locale:u.sessionData.locale}),yield t().setNextStep({workflow:u.sessionData.workflow,properties:u.sessionData.properties,nextStepId:u.sessionData.currentStep,locale:u.sessionData.locale}),t().listener({eventType:$r.MESSAGE,module:`IDV`,logLevel:z.INFO,message:s}),u)});return function(t){return e.apply(this,arguments)}}(),initialize(n){return b(function*(){if(t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Already initialized`}),{};if(t()._initializationInProgress)return{error:new ja({errorCode:si.INITIALIZATION_IN_PROGRESS})};e({_initializationInProgress:!0}),yield t().setAndInitFetchService(),e({modulesConfig:n.modulesConfig||{}});let r=[Y];if(Array.isArray(n==null?void 0:n.includedModules)){let e=n.includedModules.filter(e=>typeof e==`function`&&e.displayName&&!r.some(t=>t.displayName===e.displayName));r=[...r,...e]}let i=yield t().loadModules(r);return i.error?{error:i.error}:(B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully load modules: ${r.map(e=>e.displayName).join(`, `)}`}),e({_initializationInProgress:!1,_isInitialized:!0}),{})})()},configureByApiKey(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by api key)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by api key)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=[`apiKey`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=Ki(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a=Number(n.ttl);!Number.isNaN(a)&&a>0&&e({_ttl:a});let o=t()._ttl,s={host:i.host,isSecure:i.isSecure,port:i.port,apiKey:n.apiKey,deviceDescriptor:{ttl:o}},c=Fi.getAuthTokenLs(),l=c&&c[n.apiKey]&&c[n.apiKey].authToken?c[n.apiKey]:null,u=l&&l.authToken,d=yield t().connectByApiKey(s);if(d.error){let e=new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:d.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by api key`}),{error:e}}u&&d.authToken!==u&&(Fi.removeAuthTokenLs(n.apiKey),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Removed old session from LS because new api token will not work with old session id`}));let f=l&&d.authToken===l.authToken&&l,p=f?f.tokenExpiresAt:Date.now()+o*1e3;return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure by api key. Token expires at: ${p}`}),t().setApiKeyAuthTokenCollection(n.apiKey,d.authToken,p),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,apiKey:n.apiKey,port:i.port}),d})()},configureWithUrl(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by url)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by url)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=Gi(n);r&&(t().removeCurrentSessionDataLsAndStore(),e({_sessionIdFromUrl:r}));let i=yield t().connectByUrl(n);if(i.error)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by url: ${i.error.message}`}),{error:new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:i.error})};e({_isConnectedToPlatform:!0});try{let e=Ki(n);if(!e)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n}`})};t().setStartConfig({host:e.host,isSecure:e.isSecure,port:e.port})}catch(e){B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid urlWithToken`})}return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure with url. URL: ${n}`}),i})()},configureByUserPass(n){return b(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (configure by user pass)`}),{error:new V({errorCode:ai.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (configure by user pass)`}),{error:new V({errorCode:ai.SCENARIO_IN_PROGRESS})};let r=[`password`,`userName`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=Ki(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a={host:i.host,isSecure:i.isSecure,password:n.password,port:i.port,userName:n.userName},o=yield t().connectByUserPass(a);if(o.error){let e=new V({errorCode:ai.CONNECTION_ISSUE,underlyingBaseError:o.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by user pass: ${o.error.message}`}),{error:e}}return B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully configure by user pass`}),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,port:i.port}),o})()},getWorkflows(){return b(function*(e={limit:100,skip:0}){if(!t()._isInitialized){let e=new Na({errorCode:ii.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (get workflows)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Na({errorCode:ii.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue (get workflows)`}),{error:e}}let n=yield t().fetchService.listWorkflows(e);if(n.code!==0){let e=ea(n.code,li),t=n.data.what,r=new Ba({errorCode:e}),i=new Na({errorCode:ii.WORKFLOW_ISSUE,message:`No workflow list${Qi(t)&&`: ${t}`}.`,underlyingBaseError:r});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`No workflow list`}),{error:i}}return{results:n.data.items}}).apply(this,arguments)},prepareWorkflowAndPrepareUi(e){return b(function*(){var n;if(!t()._isInitialized){let e=new Na({errorCode:ii.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (prepare workflow and prepare ui)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Na({errorCode:ii.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue (prepare workflow and prepare ui)`}),{error:e}}if(t().currentScreenConfig){let e=new Na({errorCode:ii.SCENARIO_IN_PROGRESS});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (prepare workflow and prepare ui)`}),{error:e}}let r=t()._sessionIdFromUrl,i=yield t().fetchService.getWorkflow(e,r);if(i.code!==0){let e=i.data.what,t=new Ba(A({errorCode:ea(i.code,li)},Qi(e)&&{message:e})),n=new Na({errorCode:ii.INTERNAL_ISSUE,underlyingBaseError:t});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Workflow issue${Qi(e)&&`: ${e}`}.`}),{error:n}}let a=xf.fromPlain(i.data);if(`validationErrorMessage`in a){let e=new Ba({errorCode:li.DECODING_FAILED,message:a.validationErrorMessage}),t=new Na({errorCode:ii.WORKFLOW_ISSUE,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Workflow decoding failed: ${a.validationErrorMessage}`}),{error:t}}let o=t().externalModules,s=a.steps,{isAllTemplatesSupported:c,unsupportedSteps:l}=Pi(o,s);c||B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Warning. Unsupported steps found: ${l}`});let u=(n=t().workflow)==null?void 0:n.id;u&&e!==u&&o.forEach(e=>{e.component.deinitialize()});let d=t().modulesConfig;return o.forEach(e=>{e.component.isReady()||e.component.initialize(d)}),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully prepare workflow and prepare ui. Workflow id: ${e}`}),t().setWorkflow(a),{workflow:a}})()},startNewSession({completion:e,locale:n,metadata:r,location:i}){return b(function*(){var a;if(B.clearSession(),!t()._isInitialized){let e=new Pa({errorCode:oi.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Initialization required (start new session)`}),{error:e}}let o=(a=t().workflow)==null?void 0:a.id;if(!o){let e=new Pa({errorCode:oi.PREPARED_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Prepared required (start new session)`}),{error:e}}if(t().currentScreenConfig){let e=new Pa({errorCode:oi.ALREADY_STARTED});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Scenario in progress (start new session)`}),{error:e}}t().setWorkflowSessionCompletion(t=>{Va&&Va.close(),e(t)});let s=t().startConfig,c=Qi(s.apiKey),l=t().apiKeyAuthTokenCollection;if(c&&`tokenExpiresAt`in l){let e=l.tokenExpiresAt&&typeof l.tokenExpiresAt==`number`?l.tokenExpiresAt:0;if(Date.now()>e){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`API key TTL expired. Trying to connect by api key`});let e=yield t().connectByApiKey({apiKey:s.apiKey,host:s.host,deviceDescriptor:{ttl:t()._ttl},isSecure:s.isSecure,port:s.port});if(Fi.removeAuthTokenLs(s.apiKey),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Removed old session from LS because new api token will not work with old session id`}),e.error){let t=new La({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:e.error});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Connection issue by api key`}),{error:t}}if(e&&`authToken`in e){let n=Date.now()+t()._ttl*1e3;t().setApiKeyAuthTokenCollection(s.apiKey,e.authToken,n),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Successfully connect by api key`})}}}t().setIsProcessing(!0);let u=yield t().fetchService.getConnectionToken(!1);if(!u||typeof u!=`string`){let e=new La({errorCode:ui.TOKEN_ERROR}),t=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Token error`}),{error:t}}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Successfully get service token`}),t().setServiceSessionToken(u);let d=yield t()._runSocketConnection(u);if(d.error)return{error:d.error};let f=yield t()._continueSession(n);if(`error`in f)return{error:f.error};if(`sessionData`in f)return{};let p=yield t().waitForStartSession({workflowId:o,locale:n,metadata:r,location:i});return p.error?{error:p.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:c,sessionId:p.sessionData.id,workflowId:o,locale:p.sessionData.locale}),yield t().setNextStep({workflow:p.sessionData.workflow,properties:p.sessionData.properties,nextStepId:p.sessionData.currentStep,locale:p.sessionData.locale}),t().listener({eventType:$r.MESSAGE,module:`IDV`,logLevel:z.INFO,message:ri.DID_START_SESSION}),{})})()},deinitialize(){return b(function*(){if(!t()._isInitialized)return{error:new Ra({errorCode:fi.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return{error:new Ra({errorCode:fi.SCENARIO_IN_PROGRESS})};let n=yield t().deinitializationIdv();return t().resetProps(),e({_isInitialized:!1}),n})()},startIamAuth(e){return b(function*(){return yield t().fetchService.startIamAuth(e)})()}});function Df(e,t,n){let r=n.value;n.value=function(){var e=b(function*(e,t){var n,i;let a=((n=t==null?void 0:t.method)==null?`GET`:n).toUpperCase(),o=t==null||(i=t.headers)==null?void 0:i.authorization,s=yield r.call(this,e,t),c=s.status,l={method:a,url:e,statusCode:c,authHeader:o,response:s.statusText};if(c!==200)return B.logSessionEvent({logLevel:z.ERROR,module:`IDV`,message:JSON.stringify(l)},!0),s;let u=yield s.clone().json();return l=A(A({},l),{},{response:u}),B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:JSON.stringify(l)},!0),s});return function(t,n){return e.apply(this,arguments)}}()}var Of=class{constructor(){this._connectionTokenExpirationBufferMs=6e4,this._origin=``,this._apiKeyAuthToken={token:``,expiresAt:0},this._connectionToken={token:``,expiresAt:0},this._connect=null,this.abortController=null,this.abortController=null}_setApiKeyAuthToken(e){this._apiKeyAuthToken=e}_setConnectionToken(e){this._connectionToken=e}_getOriginFromConfig(e){return`http${e.isSecure?`s`:``}://${e.host}${e.port?`:${e.port}`:``}`}_getOriginFromUrl(e){try{return new URL(e).origin}catch(e){return``}}_getSessionIdFromUrl(e){try{var t;return(t=new URL(e).searchParams.get(`sessionId`))==null?``:t}catch(e){return``}}_getExpiresAtFromTtl(e){return Date.now()+1e3*e}_getAuthorizationHeaderFromConnectionToken(e){return`Connection ${e}`}_getAuthorizationHeaderFromBasicToken(e){return`Basic ${e}`}_getAuthorizationHeaderFromAuthToken(e){return`Token ${e}`}_getApiKeyAuthTokenFromLs(e){var t,n;let r=Fi.getAuthTokenLs(),i=r==null||(t=r[e])==null?void 0:t.authToken,a=Number((r==null||(n=r[e])==null?void 0:n.tokenExpiresAt)||0);return!i||!a||Number.isNaN(a)||a<=Date.now()?null:{token:i,expiresAt:a}}_getApiKeyAuthTokenFromHeader(e){return e.replace(/^Token\s+/i,``)}_getValidApiKeyAuthToken(e,t){var n=this;return b(function*(){if(n._apiKeyAuthToken.token){if(t||Date.now()<n._apiKeyAuthToken.expiresAt)return{code:0,data:n._apiKeyAuthToken};let r=yield n._fetchEphemeral(e.apiKey,e.deviceDescriptor.ttl);return r.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(r.data.authorization),expiresAt:n._getExpiresAtFromTtl(e.deviceDescriptor.ttl)}}:r}let r=n._getApiKeyAuthTokenFromLs(e.apiKey);if(r)return{code:0,data:r};let i=yield n._fetchEphemeral(e.apiKey,e.deviceDescriptor.ttl);return i.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(i.data.authorization),expiresAt:n._getExpiresAtFromTtl(e.deviceDescriptor.ttl)}}:i})()}_getAuthorizationSearchParam(e){try{var t;return(t=new URL(e).searchParams.get(`authorization`))==null?``:t}catch(e){return``}}_getResponseTextFromBadResponse(e){return b(function*(){return yield e.text().catch(()=>``)})()}_httpFetch(e,t){return b(function*(){return fetch(e,t)})()}_fetchPing(){var e=this;return b(function*(){let t=`${e._origin}/api/ping`;try{let n=yield e._httpFetch(t,{method:`GET`}),r={httpCode:n.status,method:`GET`,url:t};if(!n.ok){let t=yield e._getResponseTextFromBadResponse(n);return t&&(r.what=t),{code:5,data:r}}let i;try{if(i=yield n.json(),(i==null?void 0:i.status)!==`OK`)return{code:6,data:r}}catch(e){return r.what=$i(e),{code:6,data:r}}return{code:0,data:i}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:t,what:$i(e)}}}})()}_fetchMe(e){var t=this;return b(function*(){let n=`${t._origin}/api/user/me`;try{let r=yield t._httpFetch(n,{headers:{authorization:e},method:`GET`}),i={httpCode:r.status,method:`GET`,url:n};if(!r.ok){let e=yield t._getResponseTextFromBadResponse(r);return e&&(i.what=e),{code:5,data:i}}let a;try{if(a=yield r.json(),!a)return{code:6,data:i}}catch(e){return i.what=$i(e),{code:6,data:i}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:n,what:$i(e)}}}})()}_fetchConnection(e,t){var n=this;return b(function*(){let r=`POST`,i=`${n._origin}/api/device/connection`;try{let a=yield n._httpFetch(i,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(A(A({},Ji()),t&&{sessionId:t})),method:r}),o={httpCode:a.status,method:r,url:i};if(!a.ok){let e=yield n._getResponseTextFromBadResponse(a);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield a.json(),!(s!=null&&s.token)||!(s!=null&&s.expiresAt))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:{token:s.token,expiresAt:+new Date(s.expiresAt),workflows:s.workflows}}}catch(e){return{code:4,data:{httpCode:0,method:r,url:i,what:$i(e)}}}})()}_fetchEphemeral(e,t){var n=this;return b(function*(){let r=`POST`,i=`${n._origin}/api/device/ephemeral`;try{let a=yield n._httpFetch(i,{headers:{authorization:`ApiKey ${e}`,"content-type":`application/json`},body:JSON.stringify({ttl:t}),method:r}),o={httpCode:a.status,method:r,url:i};if(!a.ok){let e=yield n._getResponseTextFromBadResponse(a);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield a.json(),!(s!=null&&s.authorization))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:r,url:i,what:$i(e)}}}})()}_fetchSessionByWorkflowId(e,t,n){var r=this;return b(function*(){let i=`POST`,a=`${r._origin}/api/sessions?workflowId=${t}`;try{let t=yield r._httpFetch(a,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(n),method:i}),o={httpCode:t.status,method:i,url:a};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield t.json(),!(s!=null&&s.id))return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_fetchSessionState(e,t,n){var r=this;return b(function*(){let i=`${`${r._origin}/api/sessions/${t}`}${n?`?locale=${n}`:``}`;try{let t=yield r._httpFetch(i,{headers:{authorization:e,"content-type":`application/json`},method:`GET`}),n={httpCode:t.status,method:`GET`,url:i};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(n.what=e),{code:5,data:n}}let a;try{if(a=yield t.json(),!(a!=null&&a.id))return{code:6,data:n}}catch(e){return n.what=$i(e),{code:6,data:n}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:i,what:$i(e)}}}})()}_fetchWorkflows(e){var t=this;return b(function*(e,n={limit:0,skip:0}){let r=new URL(`${t._origin}/api/workflows`);typeof n.limit==`number`&&n.limit>=0&&r.searchParams.set(`limit`,String(n.limit)),typeof n.skip==`number`&&n.skip>=0&&r.searchParams.set(`skip`,String(n.skip));let i=r.toString();try{let n=yield t._httpFetch(i,{headers:{authorization:e},method:`GET`}),r={httpCode:n.status,method:`GET`,url:i};if(!n.ok){let e=yield t._getResponseTextFromBadResponse(n);return e&&(r.what=e),{code:5,data:r}}let a;try{if(a=yield n.json(),!a)return{code:6,data:r}}catch(e){return r.what=$i(e),{code:6,data:r}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:i,what:$i(e)}}}}).apply(this,arguments)}_fetchWorkflow(e,t){var n=this;return b(function*(){let r=`${n._origin}/api/workflows/${t}?renderClient=true`;try{let t=yield n._httpFetch(r,{headers:{authorization:e},method:`GET`}),i={httpCode:t.status,method:`GET`,url:r};if(!t.ok){let e=yield n._getResponseTextFromBadResponse(t);return e&&(i.what=e),{code:5,data:i}}let a;try{if(a=yield t.json(),!a)return{code:6,data:i}}catch(e){return i.what=$i(e),{code:6,data:i}}return{code:0,data:a}}catch(e){return{code:4,data:{httpCode:0,method:`GET`,url:r,what:$i(e)}}}})()}_fetchStep({authorizationHeader:e,sessionId:t,stepId:n,data:r,type:i}){var a=this;return b(function*(){let o=`POST`,s=A({},i&&{type:i}),c=new URLSearchParams(s).toString(),l=`${a._origin}/api/sessions/${t}/step/${n}${c?`?${c}`:``}`;try{let t=yield a._httpFetch(l,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(r),method:o}),n={httpCode:t.status,method:o,url:l};if(!t.ok){let e=yield a._getResponseTextFromBadResponse(t);return e&&(n.what=e),{code:5,data:n}}let i;try{if(i=yield t.json(),!i)return{code:6,data:n}}catch(e){return n.what=$i(e),{code:6,data:n}}return{code:0,data:i}}catch(e){return{code:4,data:{httpCode:0,method:o,url:l,what:$i(e)}}}})()}_fetchSessionLogs(e,t,n){var r=this;return b(function*(){let i=`POST`,a=`${r._origin}/api/sessions/${t}/logs`;try{let t=yield fetch(a,{headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(n.body),method:i}),o={httpCode:t.status,method:i,url:a};if(!t.ok){let e=yield r._getResponseTextFromBadResponse(t);return e&&(o.what=e),{code:5,data:o}}let s;try{if(s=yield t.json(),!s)return{code:6,data:o}}catch(e){return o.what=$i(e),{code:6,data:o}}return{code:0,data:s}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_fetchStartIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r}){var i=this;return b(function*(){let a=`POST`,o=`${t}/api/v1/iam/auth/start`,s={applicationId:e};Bi(n)&&(s.metadata=n),r&&(s.locale=r);try{let e=yield fetch(o,{headers:{"content-type":`application/json`},body:JSON.stringify(s),method:a}),t={httpCode:e.status,method:a,url:o};if(!e.ok){let n=yield i._getResponseTextFromBadResponse(e);return n&&(t.what=n),{code:5,data:t}}let n;try{if(n=yield e.json(),!n)return{code:6,data:t}}catch(e){return t.what=$i(e),{code:6,data:t}}return{code:0,data:n}}catch(e){return{code:4,data:{httpCode:0,method:a,url:o,what:$i(e)}}}})()}connectByUserPass(e){var t=this;return b(function*(){!e.userName||e.password,t._connect={type:`byUserPass`,arg:e},t._origin=t._getOriginFromConfig(e);let n=yield t._fetchPing();if(n.code!==0)return n;let r=`${btoa(`${e.userName}:${e.password}`)}`,i=t._getAuthorizationHeaderFromBasicToken(r),a=yield t._fetchMe(i);if(a.code!==0)return a;let o=yield t._fetchConnection(i);return o.code===0?(t._setConnectionToken(o.data),i=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(i),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}connectByApiKey(e,t){var n=this;return b(function*(){e.apiKey,n._connect={type:`byApiKey`,arg:e},n._origin=n._getOriginFromConfig(e);let r=yield n._fetchPing();if(r.code!==0)return r;let i=yield n._getValidApiKeyAuthToken(e,t);if(i.code!==0)return i;n._setApiKeyAuthToken(i.data);let a=n._getAuthorizationHeaderFromAuthToken(i.data.token),o=yield n._fetchMe(a);if(o.code!==0)return o;let s=yield n._fetchConnection(a);return s.code===0?(n._setConnectionToken(s.data),a=n._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield n._fetchMe(a),o.code===0?{code:0,data:{authToken:i.data.token,workflows:s.data.workflows}}:o):s})()}connectByUrl(e){var t=this;return b(function*(){t._connect={type:`byUrl`,arg:e};let n=t._getOriginFromUrl(e),r=t._getSessionIdFromUrl(e);t._origin=n;let i=t._getAuthorizationSearchParam(e),a=yield t._fetchPing();if(a.code!==0)return a;let o=yield t._fetchMe(i);if(o.code!==0)return o;let s=yield t._fetchConnection(i,r);return s.code===0?(t._setConnectionToken(s.data),i=t._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield t._fetchMe(i),o.code===0?{code:0,data:{workflows:s.data.workflows}}:o):s})()}getConnectionToken(e){var t=this;return b(function*(){var n,r,i;return+new Date<+new Date(t._connectionToken.expiresAt)-t._connectionTokenExpirationBufferMs?t._connectionToken.token:((n=t._connect)==null?void 0:n.type)===`byUserPass`?(yield t.connectByUserPass(t._connect.arg),t._connectionToken.token):((r=t._connect)==null?void 0:r.type)===`byApiKey`?(yield t.connectByApiKey(t._connect.arg,e),t._connectionToken.token):((i=t._connect)==null?void 0:i.type)===`byUrl`?(yield t.connectByUrl(t._connect.arg),t._connectionToken.token):``})()}startSession({workflowId:e,locale:t,metadata:n,location:r}){var i=this;return b(function*(){let a={locale:t};Bi(n)&&(a.metadata=n),r&&(a.location=r);let o=yield i.getConnectionToken(!1),s=i._getAuthorizationHeaderFromConnectionToken(o);return yield i._fetchSessionByWorkflowId(s,e,a)})()}continueSession({sessionId:e,locale:t}){var n=this;return b(function*(){let r=yield n.getConnectionToken(!1),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}listWorkflows(){var e=this;return b(function*(t={limit:0,skip:0}){let n=yield e.getConnectionToken(!1),r=e._getAuthorizationHeaderFromConnectionToken(n);return yield e._fetchWorkflows(r,t)}).apply(this,arguments)}getWorkflow(e,t,n){var r=this;return b(function*(){let i=yield r.getConnectionToken(!1),a=r._getAuthorizationHeaderFromConnectionToken(i),o;if(t){let e=yield r._fetchSessionState(a,t,n);o=e.code===0?{data:e.data.workflow,code:e.code}:e}else o=yield r._fetchWorkflow(a,e);return o})()}pushData({sessionId:e,stepId:t,data:n,type:r}){var i=this;return b(function*(){let a=yield i.getConnectionToken(!0),o=i._getAuthorizationHeaderFromConnectionToken(a);return yield i._fetchStep({authorizationHeader:o,sessionId:e,stepId:t,data:n,type:r})})()}getSessionState(e,t){var n=this;return b(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}pushLogs(e,t){var n=this;return b(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionLogs(i,e,t)})()}startIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r}){var i=this;return b(function*(){return yield i._fetchStartIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r})})()}_postStartUpload({authorizationHeader:e,body:t}){var n=this;return b(function*(){n.abortController||(n.abortController=new AbortController);let r=n.abortController.signal,i=`POST`,a=`${n._origin}/api/v1/files/start-upload`,o={"Content-Type":`application/json`,authorization:e};try{let e=yield fetch(a,{method:i,headers:o,body:JSON.stringify(t),signal:r}),n={httpCode:e.status,method:i,url:a};if(!e.ok){let t=yield e.text();return t&&(n.what=t),{code:5,data:n}}try{return{code:0,data:yield e.json()}}catch(e){return n.what=$i(e),{code:6,data:n}}}catch(e){return{code:4,data:{httpCode:0,method:i,url:a,what:$i(e)}}}})()}_postFileChunk({authorizationHeader:e,uploadId:t,sha256:n,contentRange:r,body:i}){var a=this;return b(function*(){var o;let s=(o=a.abortController)==null?void 0:o.signal,c=`POST`,l=new URL(`${a._origin}/api/v1/files`);l.searchParams.set(`uploadId`,t),l.searchParams.set(`sha256`,n);let u=l.toString(),d={"Content-Type":`application/octet-stream`,"Content-Range":r,authorization:e};try{let e=yield fetch(u,{method:c,signal:s,headers:d,body:i}),t={httpCode:e.status,method:c,url:u};if(e.status===204)return{code:0,data:{}};if(e.status===200)try{let t=yield e.json();return{code:0,data:t==null?{}:t}}catch(e){return t.what=$i(e),{code:6,data:t}}let n=yield e.text();return n&&(t.what=n),{code:5,data:t}}catch(e){return{code:4,data:{httpCode:0,method:c,url:u,what:$i(e)}}}})()}_uploadFileInChunks({authorizationHeader:e,file:t,chunkSize:n,uploadId:r,onProgress:i}){var a=this;return b(function*(){let o=t.size,s=0,c=``,l=`POST`,u=`${a._origin}/api/v1/files`;try{for(;s<o;){var d;if(!((d=a.abortController)==null||(d=d.signal)==null)&&d.aborted)return{code:4,data:{httpCode:0,method:l,url:u,what:`Aborted`}};let f=Math.min(s+n,o),p=yield t.slice(s,f).arrayBuffer(),m=yield ta(p),h=`bytes ${s}-${f-1}/${o}`,g=yield a._postFileChunk({authorizationHeader:e,uploadId:r,sha256:m,contentRange:h,body:p});if(g.code!==0)return g;s=f,i(s,o),g.data.tempFileId&&(c=g.data.tempFileId)}return c?{code:0,data:{tempFileId:c}}:{code:5,data:{httpCode:0,method:l,url:u,what:`upload finished without tempFileId`}}}catch(e){return{code:4,data:{httpCode:0,method:l,url:u,what:$i(e)}}}})()}uploadFileToTemp(e,t){var n=this;return b(function*(){try{let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r),a={name:e.name,size:e.size},o=yield n._postStartUpload({authorizationHeader:i,body:a});if(o.code!==0)return o;let{uploadId:s,chunkSize:c}=o.data;return yield n._uploadFileInChunks({authorizationHeader:i,file:e,chunkSize:c,uploadId:s,onProgress:t})}finally{n.abortController=null}})()}abortRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};$([Df,Q(`design:type`,Function),Q(`design:paramtypes`,[Object,typeof RequestInit>`u`?Object:RequestInit]),Q(`design:returntype`,Promise)],Of.prototype,`_httpFetch`,null);var kf,Af=3e4,jf=class e{static isImageLike(e){return typeof e.imageURL==`string`||typeof e.imageId==`string`||typeof e.base64==`string`}static collectAssets(e,t){let n=[],r=e=>{if(!e||typeof e!=`object`)return;if(Array.isArray(e)){for(let t of e)r(t);return}let i=e,a=t(i);if(a){n.push(a);return}for(let e of Object.values(i))r(e)};return r(e),n}static collectAssetsOfGuiModule(e){return this.collectAssets(e,e=>e.prepareRequired&&this.isImageLike(e)?e:null)}static collectAssetsOfExternalModule(e){return this.collectAssets(e,e=>{let t=e.idvAsset;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t;if(this.isImageLike(e))return e}return null})}static checkImage(e,t){var n=this;return b(function*(){if(!(t&&!e.prepareRequired)){if(e.base64){if(yield n.checkImageBySrc(e.base64,e.timeout))return;if(n.failedAssets.base64.add(e.base64),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(`base64 string`);return}}if(!e.imageId){if(e.imageURL){if(yield n.checkImageBySrc(e.imageURL,e.timeout))return;if(n.failedAssets.imageURL.add(e.imageURL),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(e.imageURL);return}}if(e.failurePolicy===`placeholderImage`){let r=e.placeholderImage;r&&(yield n.checkImage(r,t))}}}})()}static checkImageBySrc(t,n){return b(function*(){return new Promise(r=>{let i=null,a=null,o=!1,s=n?n*1e3:Af,c=e=>{o||(o=!0,l(),r(e))},l=()=>{a!==null&&(clearTimeout(a),a=null),i&&(i.onload=null,i.onerror=null,i=null)};try{if(t.length===0)return c(!1);a=setTimeout(()=>c(!1),s),i=new Image,i.onload=b(function*(){if(!(i!=null&&i.decode))return c(!0);try{yield i.decode()}catch(e){}e.decodedImages.set(t,i),c(!0)}),i.onerror=()=>c(!1),i.src=t}catch(e){c(!1)}})})()}static warmupModuleImages(t,n){var r=this;return b(function*(){if(!t)return r.failedAssets;let i;n?i=e.collectAssetsOfGuiModule(t):(t.preloadAssetsRequired!==!0&&(i=[]),i=e.collectAssetsOfExternalModule(t));let a=i.map(t=>e.checkImage(t,n));return yield Promise.allSettled(a),r.failedAssets})()}static clearFailedAssets(){this.decodedImages.clear(),this.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set}}};kf=jf,kf.decodedImages=new Map,kf.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set};var Mf=(e,t)=>({fetchService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitFetchService:function(){var t=b(function*(){e({fetchService:new Of})});return function(){return t.apply(this,arguments)}}(),setFinalWaitingUi:t=>{e({isFinalWaitingUi:t})},connectByApiKey(e){return b(function*(){let n=yield t().fetchService.connectByApiKey(e,!1);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what,r=new Fa(A({errorCode:e},Qi(t)&&{message:t}));return{error:new Ma({errorCode:ci.CONNECTION_ISSUE,underlyingBaseError:r})}}return n.data})()},connectByUserPass(e){return b(function*(){let n=yield t().fetchService.connectByUserPass(e);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what;return{error:new Fa(A({errorCode:e},Qi(t)&&{message:t}))}}return{workflows:n.data.workflows}})()},connectByUrl(e){return b(function*(){let n=yield t().fetchService.connectByUrl(e);if(n.code!==0){let e=ea(n.code,pi),t=n.data.what,r=new Fa(A({errorCode:e},Qi(t)&&{message:t}));return{workflows:[],error:new Ma({errorCode:ci.CONNECTION_ISSUE,underlyingBaseError:r})}}return{workflows:n.data.workflows}})()},workflowSessionCompletion:()=>{},setWorkflowSessionCompletion:n=>{let r=e=>{var r;let i=(r=t().currentSessionData)==null?void 0:r.sessionId,a=A({results:A(A({},e.results),{},{sessionId:i})},e.error&&{error:e.error});if(t().removeCurrentSessionDataLsAndStore(),n(a),e.error){let n=JSON.stringify(e.error);t().fetchService.pushLogs(i,{body:{log:n,errorCode:e.error.shortChain,deviceInfo:{platform:`Web`}}})}};e(()=>({workflowSessionCompletion:r}))},loadModules:function(){var n=b(function*(n){try{let t=yield Nf(n);return e(()=>({externalModules:t})),{}}catch(e){return t().resetFetchService(),t().resetProps(),{error:new ja({errorCode:si.MODULES_INSTANTIATION_FAILURE})}}});return function(e){return n.apply(this,arguments)}}(),setIsProcessing:t=>{e({isProcessing:t})},getProcessingTemplate:()=>{let e=t().workflow;if(!e)return null;let n=e.client.steps,r=Ti(n.find(e=>e.templateId===gi));if(!r)return null;let i=e.client.layout,a=Ei(r.templateLayout,i);return a&&(r.templateLayout=a),r},_pushStep:function(){var e=b(function*(e,n,r){let i=null;return yield ki(function(){var a=b(function*(){var a;let o=(a=t().currentSessionData)==null?void 0:a.sessionId,s=yield t().fetchService.pushData({sessionId:o,stepId:e,data:n,type:r}),c=null;if(s.code===4&&(c=di.HTTP_ISSUE),s.code!==0&&s.code!==4&&(c=di.PROVIDER_ERROR),c!==null){let e=new Ia({errorCode:di.HTTP_ISSUE});i=new Pa({errorCode:oi.INTERNAL_ISSUE,message:`Error from external module`,underlyingBaseError:e})}return s.code===0?(i=null,s):null});return function(){return a.apply(this,arguments)}}(),()=>null),i?{error:i}:{}});return function(t,n,r){return e.apply(this,arguments)}}(),_findStepById:e=>{let n=t().workflow;if(!n||!e)return null;let r=n.steps.find(t=>t.id===e);return r==null?null:r},_getSessionStateNextStepConditionResult:function(){var e=b(function*(){let e=t().currentSessionData,n=e==null?void 0:e.sessionId,r=e==null?void 0:e.locale,i=yield t().fetchService.getSessionState(n,r),a=i.code;if(a!==0){let e=ea(a,di),t=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Get session: Failed to get session (from HTTP Get)${Qi(t)&&`: ${t}`}.`});let n=new Ia(A({errorCode:e},Qi(t)&&{message:t}));return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:n}),shouldRetry:!0}}B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Get session: Session data successfully received (from HTTP Get).`});let o=t()._validateSession(i.data);if(`validationErrorMessage`in o){let e=new Ia({errorCode:di.DECODING_FAILED});return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}let s=o.workflow.steps[0],c=o.isProcessingFiles,l=Mi(s),u=null;if(l&&(u=di.NOT_DATA_TYPE),c&&(u=di.IS_PROCESSING),u!==null){(l||c)&&B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Get session: Session is still in processing state (from HTTP Get).`});let e=new Ia({errorCode:u});return{error:new Pa({errorCode:oi.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}return o});return function(){return e.apply(this,arguments)}}(),waitForStartSession(e){return b(function*(){let n,r;if(yield new Promise(i=>{let a=!1,o=()=>{a||(a=!0,Va.clearSubscriptions(),i())},s=function(){var i=b(function*(){let i=yield t().fetchService.startSession(e);if(!a){if(i.code!==0){let e=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Start session failed (from HTTP Post)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ea(i.code,ui)},Qi(e)&&{message:e}));r=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),o();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Start session: session data successfully received (from HTTP Post).`}),n=i.data,o()}});return function(){return i.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var i,s;if(a)return;let c=t()._decodeMessageFromWebSocket(e);if(c&&(c==null?void 0:c.eventType)===`SESSION_STARTED`){if(c.error){let e=c.error.message;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Start session failed (from WebSocket)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ui.PROVIDER_ERROR,underlyingError:JSON.stringify(c.error)},Qi(e)&&{message:e}));r=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),o();return}(i=c.options)!=null&&i.session&&(B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Start session: session data successfully received (from WebSocket).`}),n=(s=c.options)==null?void 0:s.session,o())}}),s()}),r)return{error:r};let i=t()._validateSession(n);if(`validationErrorMessage`in i){let e=new La({errorCode:ui.DECODING_FAILED,message:i.validationErrorMessage});return{error:new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:i}})()},waitForContinueSession({sessionId:e,locale:n}){return b(function*(){let r,i;if(yield new Promise(a=>{let o=!1,s=()=>{o||(o=!0,Va.clearSubscriptions(),a())},c=function(){var a=b(function*(){let a=yield t().fetchService.continueSession({sessionId:e,locale:n});if(!o){if(a.code!==0){let e=a.data.what;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Continue session failed (from HTTP Get)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ea(a.code,ui)},Qi(e)&&{message:e}));i=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),s();return}B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session: session data successfully received (from HTTP Get).`}),r=a.data,s()}});return function(){return a.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var n,a;if(o)return;let c=t()._decodeMessageFromWebSocket(e);if(c&&[`SESSION_STATE`,`SESSION_UPDATED`].includes(c==null?void 0:c.eventType)){if(c.error){let e=c.error.message;B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`Continue session failed (from WebSocket)${Qi(e)&&`: ${e}`}.`});let t=new La(A({errorCode:ui.PROVIDER_ERROR,underlyingError:JSON.stringify(c.error)},Qi(e)&&{message:e}));i=new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:t}),s();return}(n=c.options)!=null&&n.session&&(B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Continue session: session data successfully received (from WebSocket).`}),r=(a=c.options)==null?void 0:a.session,s())}}),Va.onReconnect(()=>{Va.sendSessionGetMessage({sessionId:e,locale:n})}),Va.sendSessionGetMessage({sessionId:e,locale:n}),c()}),i)return{error:i};let a=t()._validateSession(r);if(`validationErrorMessage`in a){let e=new La({errorCode:ui.DECODING_FAILED,message:a.validationErrorMessage});return{error:new Pa({errorCode:oi.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:a}})()},_waitForNextStep:function(){var e=b(function*(){var e;let n,r,i=((e=t().workflow)==null||(e=e.client)==null?void 0:e.sessionUpdateTimeout)||60,a=e=>e===t().currentStepId;if(yield new Promise(e=>{let o=1e4,s=Math.round(i*1e3/o),c=0,l,u=!1,d=()=>{u||(u=!0,clearTimeout(l),Va.clearSubscriptions(),e())},f=function(){var e=b(function*({isDeferred:e}){if(u)return;if(e){l=window.setTimeout(()=>{B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: no WebSocket message received, falling back to HTTP Get.`}),f({isDeferred:!1})},o);return}let i=yield t()._getSessionStateNextStepConditionResult();if(u)return;c++;let p=Tf.isSessionModel(i)&&a(i.currentStep);if((`shouldRetry`in i||p)&&c<s){l=window.setTimeout(()=>{f({isDeferred:!1})},o);return}Tf.isSessionModel(i)?n=i:i.error&&(r=i.error),d()});return function(t){return e.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(e=>{var r;if(u)return;let i=t()._decodeMessageFromWebSocket(e);if(!i||![`SESSION_UPDATED`,`SESSION_STATE`].includes(i==null?void 0:i.eventType))return;let o=(r=i.options)==null?void 0:r.session;if(!o)return;let s=t()._validateSession(o);if(`validationErrorMessage`in s){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: invalid session from WebSocket, falling back to HTTP Get.`}),clearTimeout(l),f({isDeferred:!1});return}Ni(s)||a(s.currentStep)||(B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: session data successfully received (from WebSocket).`}),n=s,d())}),Va.onReconnect(()=>{var e,n;B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Wait for next step: WebSocket reconnected, requesting session via WebSocket.`});let r=(e=t().currentSessionData)==null?void 0:e.sessionId,i=(n=t().currentSessionData)==null?void 0:n.locale;Va.sendSessionGetMessage({sessionId:r,locale:i})}),f({isDeferred:!0})}),r){t().workflowSessionCompletion({error:r}),t().resetSession();return}if(n){let{workflow:e,properties:r,currentStep:i,locale:a}=n;yield t().setNextStep({workflow:e,properties:r,nextStepId:i,locale:a});return}});return function(){return e.apply(this,arguments)}}(),_setFinalStepAndStopProcess:e=>{let n=e||t().currentStepId;if(!n)return;let r=t()._findStepById(n);r&&(t().workflowSessionCompletion({results:{finalStep:{id:r.id,name:r.name,final:r.releaseClientApp}}}),t().resetSession(),t().listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:ri.DID_END_SESSION,module:`IDV`}))},_setIamAuthCodeAndStopProcess:e=>{var n,r;let i=e=>{if(!Vi(e))return null;let{message:t,code:n}=e;return typeof t==`string`&&t.toLowerCase()!==`none`?t:typeof n==`string`&&n.toLowerCase()!==`none`?n:null},a=(n=e.dataSource)==null?void 0:n.code,o=i((r=e.dataSource)==null?void 0:r.error);t().workflowSessionCompletion({results:{iamAuthCode:{code:a,error:o}}}),t().resetSession(),t().listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:ri.DID_END_SESSION,module:`IDV`})},_stepSocketListenerWhenStepIsRunning:e=>{if(!e){Va.clearSubscriptions();return}let n=e=>e===t().currentStepId,r=function(){var e=b(function*(){let e={},r=0;for(;r<5&&(r>0&&(yield ga(1e3*r)),r++,e=yield t()._getSessionStateNextStepConditionResult(),!(!(`shouldRetry`in e)||!e.shouldRetry)););if(`error`in e&&e.error){Va.clearSubscriptions(),t().workflowSessionCompletion({error:e.error}),t().resetSession();return}if(Tf.isSessionModel(e)&&!n(e.currentStep)){Va.clearSubscriptions();let{workflow:n,properties:r,currentStep:i,locale:a}=e;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a})}});return function(){return e.apply(this,arguments)}}(),i=function(){var e=b(function*(e){let i=t()._decodeMessageFromWebSocket(e);if(!i)return;let{eventType:a}=i;if([`SESSION_UPDATED`,`DEVICE_TRANSFERRED`].includes(a)){var o;Va.clearSubscriptions();let e=(o=i.options)==null?void 0:o.session;if(e){let r=t()._validateSession(e);if(!(`validationErrorMessage`in r)&&!Ni(r)&&!n(r.currentStep)){let{workflow:e,properties:n,currentStep:i,locale:a}=r;yield t().setNextStep({workflow:e,properties:n,nextStepId:i,locale:a});return}}yield r()}});return function(t){return e.apply(this,arguments)}}(),a=function(){var e=b(function*(){yield r()});return function(){return e.apply(this,arguments)}}();Va.clearSubscriptions(),Va.onMessage(i),Va.onReconnect(a)},setNextStep:function(){var e=b(function*({workflow:e,properties:n,nextStepId:r,locale:i}){t().setWorkflow(e),t().setSessionProperties(n),i&&t().setLocale(i),t().setCurrentStepId(r),B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Attempting to set next step: ${r}`});let a=e.steps[0];if(Mi(a)){B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Step type is PROCESSING, stepId: ${r}, waiting for next step...`}),t()._waitForNextStep();return}let o=e=>!!e&&Object.prototype.toString.call(e)===`[object Object]`&&e.templateId;if(a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===ni.IAM_AUTH_CODE){t()._setIamAuthCodeAndStopProcess(a);return}if(a!=null&&a.releaseClientApp&&!o(a.client)){t()._setFinalStepAndStopProcess(a.id);return}a!=null&&a.releaseClientApp&&o(a.client)&&t().setFinalWaitingUi(!0),yield t()._prepareScreenConfigAndShowStep(r),t().setIsProcessing(!1),B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`Next step successfully set: ${r}`}),t()._stepSocketListenerWhenStepIsRunning(!0)});return function(t){return e.apply(this,arguments)}}(),pushStepWaitNextStepAndSet:function(){var e=b(function*(e,n){var r;t()._stepSocketListenerWhenStepIsRunning(!1);let i=t().currentStepId;if(!i)return;if(t().setIsProcessing(!0),((r=t().workflow)==null||(r=r.logging)==null?void 0:r.level)===ei.INFO){var a;let e=B.cutCurrentStepLogs(i),n=(a=t().currentSessionData)==null?void 0:a.sessionId;t().fetchService.pushLogs(n,{body:{step:i,log:e,deviceInfo:{platform:`Web`}}}).catch(()=>{})}if(t().isFinalWaitingUi){t()._setFinalStepAndStopProcess();return}if(e.errorEnumName){let n=e,r=new Pa({errorCode:oi.MODULES_ISSUE,message:`Error from external module`,underlyingBaseError:n});t().workflowSessionCompletion({error:r}),t().resetSession();return}t()._waitForNextStep();let o=yield t()._pushStep(i,e,n);if(o.error){t().workflowSessionCompletion({error:o.error}),t().resetSession();return}});return function(t,n){return e.apply(this,arguments)}}(),_prepareScreenConfigAndShowStep:function(){var n=b(function*(n){var r;if(!n)return e(()=>({currentScreenConfig:null}));let i=t().workflow;if(!i)return e(()=>({currentScreenConfig:null}));let a=t().sessionProperties,o=null;if(n===`PROGRESS`&&t().getProcessingTemplate()!==null){let e=t().getProcessingTemplate();e&&(o={templateId:e.templateId,templateLayout:e.templateLayout,dataSource:null,locale:t().locale})}else{var s,c;let e=t()._findStepById(n);if(typeof(e==null||(s=e.client)==null?void 0:s.templateId)==`string`){var l;o=A(A({},e.client),{},{templateId:e.client.templateId,dataSource:(l=e.dataSource)==null?null:l,properties:a,stepType:e.type,locale:t().locale})}if(o){var u;o.sessionId=(u=t().currentSessionData)==null?void 0:u.sessionId,o.serviceToken=t().serviceToken}if(o&&Vi(e==null||(c=e.client)==null?void 0:c.templateLayout)){let t=i.client.layout,n=Ei(e.client.templateLayout,t);n&&(o.templateLayout=n)}}let d=ji(t().externalModules,i.steps,n);if(o===null||!d){let n=new Pa({errorCode:oi.UNKNOWN_STEP,message:`Unsupported step template`});t().workflowSessionCompletion({error:n}),e(()=>({currentScreenConfig:null})),t().resetSession();return}jf.clearFailedAssets(),o=ma(o);let f=t().externalModules.find(e=>e.id===`idv-gui`),p=!!(!(f==null||(r=f.supportedTemplates)==null)&&r.includes(o.templateId)),m=yield jf.warmupModuleImages(o,p);if(p){let e=t().fetchService;o=A(A({},o),{},{uploadFileToTemp:e==null?void 0:e.uploadFileToTemp.bind(e),abortRequest:e==null?void 0:e.abortRequest.bind(e)})}o=A(A({},o),{},{failedAssets:m}),e(()=>({currentScreenConfig:o}))});return function(e){return n.apply(this,arguments)}}(),deinitializationIdv:function(){var e=b(function*(){return t().resetFetchService(),t().externalModules.forEach(e=>{e.component.deinitialize&&e.component.isReady&&e.component.deinitialize()}),{}});return function(){return e.apply(this,arguments)}}(),resetSession:()=>e(()=>({isFinalWaitingUi:!1,isProcessing:!1,currentStepId:null,currentScreenConfig:null,workflow:null,serviceToken:void 0})),resetFetchService:()=>e(()=>({fetchService:null})),_decodeMessageFromWebSocket:e=>{try{return JSON.parse(atob(JSON.parse(e).payload))}catch(e){return B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`Failed to decode message from WebSocket: ${$i(e)}`}),null}},_validateSession:e=>{let t=Tf.fromPlain(e);return`validationErrorMessage`in t?B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:`Session data validation failed: ${JSON.stringify(t.validationErrorMessage)}`}):B.logSessionEvent({logLevel:z.DEBUG,module:`IDV`,message:`Session data validated successfully.`}),t}});function Nf(e){return Pf.apply(this,arguments)}function Pf(){return Pf=b(function*(e){let t=[];for(let n of e)n&&t.push({id:n.getIdentifier(),supportedTemplates:n.getSupportedTemplates(),component:n});return t.filter(e=>e!==null)}),Pf.apply(this,arguments)}var Ff=Hr((...e)=>A(A(A({},la(...e)),Ef(...e)),Mf(...e))),If=e=>/^[a-z][a-z0-9]*-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)&&e.length<=100,Lf=(e,t)=>{if(!If(e))throw Error(`Invalid component name: ${e}`);let n=document.createElement(e);return n.style.width=`100%`,n.style.height=`100%`,n.setProps(t),n},Rf=e=>{if(typeof e!=`object`||!e||Array.isArray(e))return{};let t=e,n={};for(let e of Object.keys(t)){let r=t[e];typeof r!=`function`&&(n[e]=r)}return n},zf=class{constructor(e){this.isPortrait=!1,this.isLandscape=!1,this.orientation=`portrait`,this._handleOrientationChange=()=>{let e=this._getOrientation();this.orientation!==e&&(this.orientation=e,this.isPortrait=this.orientation===`portrait`,this.isLandscape=this.orientation===`landscape`,this.host.requestUpdate())},(this.host=e).addController(this)}_getOrientation(){return window.matchMedia(`(orientation: landscape)`).matches?`landscape`:`portrait`}hostConnected(){typeof window<`u`&&(this._handleOrientationChange(),window.addEventListener(`load`,this._handleOrientationChange),window.addEventListener(`resize`,this._handleOrientationChange))}hostDisconnected(){typeof window<`u`&&(window.removeEventListener(`load`,this._handleOrientationChange),window.removeEventListener(`resize`,this._handleOrientationChange))}},Bf=o(((e,t)=>{t.exports=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(e,t,n){"use strict";e.exports={BROWSER_TYPES:{CHROME:`Chrome`,FIREFOX:`Firefox`,OPERA:`Opera`,YANDEX:`Yandex`,SAFARI:`Safari`,INTERNET_EXPLORER:`Internet Explorer`,EDGE:`Edge`,CHROMIUM:`Chromium`,IE:`IE`,MOBILE_SAFARI:`Mobile Safari`,EDGE_CHROMIUM:`Edge Chromium`},DEVICE_TYPES:{MOBILE:`mobile`,TABLET:`tablet`,SMART_TV:`smarttv`,CONSOLE:`console`,WEARABLE:`wearable`,BROWSER:void 0},OS_TYPES:{IOS:`iOS`,ANDROID:`Android`,WINDOWS_PHONE:`Windows Phone`,WINDOWS:`Windows`,MAC_OS:`Mac OS`},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}}),(function(e,t,n){"use strict";var r=n(2),i=n(0),a=i.BROWSER_TYPES,o=i.OS_TYPES,s=i.DEVICE_TYPES,c=n(4),l=c.checkType,u=c.broPayload,d=c.mobilePayload,f=c.wearPayload,p=c.consolePayload,m=c.stvPayload,h=c.getNavigatorInstance,g=c.isIOS13Check,_=new r,v=_.getBrowser(),y=_.getDevice(),b=_.getEngine(),x=_.getOS(),S=_.getUA(),C=a.CHROME,w=a.CHROMIUM,T=a.IE,E=a.INTERNET_EXPLORER,D=a.OPERA,ee=a.FIREFOX,te=a.SAFARI,O=a.EDGE,ne=a.YANDEX,k=a.MOBILE_SAFARI,re=s.MOBILE,ie=s.TABLET,ae=s.SMART_TV,oe=s.BROWSER,se=s.WEARABLE,ce=s.CONSOLE,le=o.ANDROID,ue=o.WINDOWS_PHONE,de=o.IOS,fe=o.WINDOWS,pe=o.MAC_OS,me=function(){return y.type===re},he=function(){return y.type===ie},ge=function(){switch(y.type){case re:case ie:return!0;default:return!1}},_e=function(){return x.name===o.WINDOWS&&x.version===`10`?typeof S==`string`&&S.indexOf(`Edg/`)!==-1:!1},ve=function(){return y.type===ae},ye=function(){return y.type===oe},be=function(){return y.type===se},xe=function(){return y.type===ce},Se=function(){return x.name===le},Ce=function(){return x.name===fe},we=function(){return x.name===pe},Te=function(){return x.name===ue},Ee=function(){return x.name===de},De=function(){return v.name===C},Oe=function(){return v.name===ee},ke=function(){return v.name===w},Ae=function(){return v.name===O},je=function(){return v.name===ne},Me=function(){return v.name===te||v.name===k},Ne=function(){return v.name===k},Pe=function(){return v.name===D},Fe=function(){return v.name===E||v.name===T},Ie=function(){var e=h(),t=e&&e.userAgent.toLowerCase();return typeof t==`string`?/electron/.test(t):!1},Le=function(){var e=h();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Re=function(){return g(`iPad`)},ze=function(){return g(`iPhone`)},Be=function(){return g(`iPod`)},Ve=function(){return v.major},He=function(){return v.version},Ue=function(){return x.version?x.version:`none`},We=function(){return x.name?x.name:`none`},Ge=function(){return v.name},Ke=function(){return y.vendor?y.vendor:`none`},qe=function(){return y.model?y.model:`none`},Je=function(){return b.name},Ye=function(){return b.version},Xe=function(){return S},Ze=function(){return y.type},Qe=ve(),$e=xe(),et=be(),tt=Ne()||Re(),nt=ke(),rt=ge()||Re(),it=me(),at=he()||Re(),ot=ye(),A=Se(),st=Te(),ct=Ee()||Re(),lt=De(),ut=Oe(),dt=Me(),ft=Pe(),pt=Fe(),mt=Ue(),ht=We(),gt=Ve(),_t=He(),vt=Ge(),yt=Ke(),bt=qe(),xt=Je(),St=Ye(),Ct=Xe(),wt=Ae()||_e(),Tt=je(),j=Ze(),Et=Le(),Dt=Re(),Ot=ze(),kt=Be(),At=Ie(),jt=_e(),Mt=Ae(),Nt=Ce(),M=we(),Pt=l(y.type);function Ft(){var e=Pt.isBrowser,t=Pt.isMobile,n=Pt.isTablet,r=Pt.isSmartTV,i=Pt.isConsole,a=Pt.isWearable;if(e)return u(e,v,b,x,S);if(r)return m(r,b,x,S);if(i)return p(i,b,x,S);if(t||n)return d(Pt,y,x,S);if(a)return f(a,b,x,S)}e.exports={deviceDetect:Ft,isSmartTV:Qe,isConsole:$e,isWearable:et,isMobileSafari:tt,isChromium:nt,isMobile:rt,isMobileOnly:it,isTablet:at,isBrowser:ot,isAndroid:A,isWinPhone:st,isIOS:ct,isChrome:lt,isFirefox:ut,isSafari:dt,isOpera:ft,isIE:pt,osVersion:mt,osName:ht,fullBrowserVersion:gt,browserVersion:_t,browserName:vt,mobileVendor:yt,mobileModel:bt,engineName:xt,engineVersion:St,getUA:Ct,isEdge:wt,isYandex:Tt,deviceType:j,isIOS13:Et,isIPad13:Dt,isIPhone13:Ot,isIPod13:kt,isElectron:At,isEdgeChromium:jt,isLegacyEdge:Mt,isWindows:Nt,isMacOs:M}}),(function(e,t,n){var r;(function(i,a){"use strict";var o=`0.7.18`,s=``,c=`?`,l=`function`,u=`undefined`,d=`object`,f=`string`,p=`major`,m=`model`,h=`name`,g=`type`,_=`vendor`,v=`version`,y=`architecture`,b=`console`,x=`mobile`,S=`tablet`,C=`smarttv`,w=`wearable`,T=`embedded`,E={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return typeof e==`string`?t.toLowerCase().indexOf(e.toLowerCase())!==-1:!1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.replace(/[^\d\.]/g,``).split(`.`)[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}},D={rgx:function(e,t){for(var n=0,r,i,o,s,c,u;n<t.length&&!c;){var f=t[n],p=t[n+1];for(r=i=0;r<f.length&&!c;)if(c=f[r++].exec(e),c)for(o=0;o<p.length;o++)u=c[++i],s=p[o],typeof s===d&&s.length>0?s.length==2?typeof s[1]==l?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?typeof s[1]===l&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):a:this[s[0]]=u?u.replace(s[1],s[2]):a:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):a):this[s]=u||a;n+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===d&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(E.has(t[n][r],e))return n===c?a:n}else if(E.has(t[n],e))return n===c?a:n;return e}},ee={browser:{oldsafari:{version:{"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`}}},device:{amazon:{model:{"Fire Phone":[`SD`,`KF`]}},sprint:{model:{"Evo Shift 4G":`7373KT`},vendor:{HTC:`APA`,Sprint:`Sprint`}}},os:{windows:{version:{ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,8.1:`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`}}}},te={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[h,v],[/(opios)[\/\s]+([\w\.]+)/i],[[h,`Opera Mini`],v],[/\s(opr)\/([\w\.]+)/i],[[h,`Opera`],v],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[h,v],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[h,`IE`],v],[/(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i],[[h,`Edge`],v],[/(yabrowser)\/([\w\.]+)/i],[[h,`Yandex`],v],[/(puffin)\/([\w\.]+)/i],[[h,`Puffin`],v],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[h,`UCBrowser`],v],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g,` `],v],[/(micromessenger)\/([\w\.]+)/i],[[h,`WeChat`],v],[/(qqbrowserlite)\/([\w\.]+)/i],[h,v],[/(QQ)\/([\d\.]+)/i],[h,v],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[h,v],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[h,v],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[h,v],[/(MetaSr)[\/\s]?([\w\.]+)/i],[h],[/(LBBROWSER)/i],[h],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[v,[h,`MIUI Browser`]],[/;fbav\/([\w\.]+);/i],[v,[h,`Facebook`]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[v,[h,`Chrome Headless`]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[h,/(.+)/,`$1 WebView`],v],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[h,/(.+(?:g|us))(.+)/,`$1 $2`],v],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[v,[h,`Android Browser`]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[h,v],[/(dolfin)\/([\w\.]+)/i],[[h,`Dolphin`],v],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[h,`Chrome`],v],[/(coast)\/([\w\.]+)/i],[[h,`Opera Coast`],v],[/fxios\/([\w\.-]+)/i],[v,[h,`Firefox`]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[v,[h,`Mobile Safari`]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[v,h],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[h,`GSA`],v],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[h,[v,D.str,ee.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape)\/([\w\.-]+)/i],[[h,`Netscape`],v],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[h,v]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[y,`amd64`]],[/(ia32(?=;))/i],[[y,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[y,`ia32`]],[/windows\s(ce|mobile);\sppc;/i],[[y,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[y,/ower/,``,E.lowerize]],[/(sun4\w)[;\)]/i],[[y,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[y,E.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[m,_,[g,S]],[/applecoremedia\/[\w\.]+ \((ipad)/],[m,[_,`Apple`],[g,S]],[/(apple\s{0,1}tv)/i],[[m,`Apple TV`],[_,`Apple`]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[_,m,[g,S]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[m,[_,`Amazon`],[g,S]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[m,D.str,ee.device.amazon.model],[_,`Amazon`],[g,x]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[m,_,[g,x]],[/\((ip[honed|\s\w*]+);/i],[m,[_,`Apple`],[g,x]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[_,m,[g,x]],[/\(bb10;\s(\w+)/i],[m,[_,`BlackBerry`],[g,x]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[m,[_,`Asus`],[g,S]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[_,`Sony`],[m,`Xperia Tablet`],[g,S]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[m,[_,`Sony`],[g,x]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[_,m,[g,b]],[/android.+;\s(shield)\sbuild/i],[m,[_,`Nvidia`],[g,b]],[/(playstation\s[34portablevi]+)/i],[m,[_,`Sony`],[g,b]],[/(sprint\s(\w+))/i],[[_,D.str,ee.device.sprint.vendor],[m,D.str,ee.device.sprint.model],[g,x]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[_,m,[g,S]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[_,[m,/_/g,` `],[g,x]],[/(nexus\s9)/i],[m,[_,`HTC`],[g,S]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[m,[_,`Huawei`],[g,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[_,m,[g,x]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[m,[_,`Microsoft`],[g,b]],[/(kin\.[onetw]{3})/i],[[m,/\./g,` `],[_,`Microsoft`],[g,x]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[m,[_,`Motorola`],[g,x]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[m,[_,`Motorola`],[g,S]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[_,E.trim],[m,E.trim],[g,C]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,`SmartTV`],[_,`Samsung`],[g,C]],[/\(dtv[\);].+(aquos)/i],[m,[_,`Sharp`],[g,C]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[_,`Samsung`],m,[g,S]],[/smart-tv.+(samsung)/i],[_,[g,C],m],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[_,`Samsung`],m,[g,x]],[/sie-(\w*)/i],[m,[_,`Siemens`],[g,x]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[_,`Nokia`],m,[g,x]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[m,[_,`Acer`],[g,S]],[/android.+([vl]k\-?\d{3})\s+build/i],[m,[_,`LG`],[g,S]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[_,`LG`],m,[g,S]],[/(lg) netcast\.tv/i],[_,m,[g,C]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[m,[_,`LG`],[g,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[m,[_,`Lenovo`],[g,S]],[/linux;.+((jolla));/i],[_,m,[g,x]],[/((pebble))app\/[\d\.]+\s/i],[_,m,[g,w]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[_,m,[g,x]],[/crkey/i],[[m,`Chromecast`],[_,`Google`]],[/android.+;\s(glass)\s\d/i],[m,[_,`Google`],[g,w]],[/android.+;\s(pixel c)\s/i],[m,[_,`Google`],[g,S]],[/android.+;\s(pixel xl|pixel)\s/i],[m,[_,`Google`],[g,x]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[m,/_/g,` `],[_,`Xiaomi`],[g,x]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[m,/_/g,` `],[_,`Xiaomi`],[g,S]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[m,[_,`Meizu`],[g,S]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[m,[_,`OnePlus`],[g,x]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[m,[_,`RCA`],[g,S]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[m,[_,`Dell`],[g,S]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[m,[_,`Verizon`],[g,S]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[_,`Barnes & Noble`],m,[g,S]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[m,[_,`NuVision`],[g,S]],[/android.+;\s(k88)\sbuild/i],[m,[_,`ZTE`],[g,S]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[m,[_,`Swiss`],[g,x]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[m,[_,`Swiss`],[g,S]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[m,[_,`Zeki`],[g,S]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[_,`Dragon Touch`],m,[g,S]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[m,[_,`Insignia`],[g,S]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[m,[_,`NextBook`],[g,S]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[_,`Voice`],m,[g,x]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[_,`LvTel`],m,[g,x]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[m,[_,`Envizen`],[g,S]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[_,m,[g,S]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[m,[_,`MachSpeed`],[g,S]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[_,m,[g,S]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[m,[_,`Rotor`],[g,S]],[/android.+(KS(.+))\s+build/i],[m,[_,`Amazon`],[g,S]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[_,m,[g,S]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[g,E.lowerize],_,m],[/(android[\w\.\s\-]{0,9});.+build/i],[m,[_,`Generic`]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[v,[h,`EdgeHTML`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[h,v],[/rv\:([\w\.]{1,9}).+(gecko)/i],[v,h]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[h,v],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[h,[v,D.str,ee.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[h,`Windows`],[v,D.str,ee.os.windows.version]],[/\((bb)(10);/i],[[h,`BlackBerry`],v],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[h,v],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[h,`Symbian`],v],[/\((series40);/i],[h],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[h,`Firefox OS`],v],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[h,v],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[h,`Chromium OS`],v],[/(sunos)\s?([\w\.\d]*)/i],[[h,`Solaris`],v],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[h,v],[/(haiku)\s(\w+)/i],[h,v],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[v,/_/g,`.`],[h,`iOS`]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[h,`Mac OS`],[v,/_/g,`.`]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]*)/i],[h,v]]},O=function(e,t){if(typeof e==`object`&&(t=e,e=a),!(this instanceof O))return new O(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:s),r=t?E.extend(te,t):te;return this.getBrowser=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.browser),e.major=E.major(e.version),e},this.getCPU=function(){var e={architecture:a};return D.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:a,model:a,type:a};return D.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:a,version:a};return D.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};O.VERSION=o,O.BROWSER={NAME:h,MAJOR:p,VERSION:v},O.CPU={ARCHITECTURE:y},O.DEVICE={MODEL:m,VENDOR:_,TYPE:g,CONSOLE:b,MOBILE:x,SMARTTV:C,TABLET:S,WEARABLE:w,EMBEDDED:T},O.ENGINE={NAME:h,VERSION:v},O.OS={NAME:h,VERSION:v},typeof t===u?l===`function`&&n(3)?(r=(function(){return O}).call(t,n,t,e),r!==a&&(e.exports=r)):i&&(i.UAParser=O):(typeof e!==u&&e.exports&&(t=e.exports=O),t.UAParser=O);var ne=i&&(i.jQuery||i.Zepto);if(typeof ne!==u){var k=new O;ne.ua=k.getResult(),ne.ua.get=function(){return k.getUA()},ne.ua.set=function(e){k.setUA(e);var t=k.getResult();for(var n in t)ne.ua[n]=t[n]}}})(typeof window==`object`?window:this)}),(function(e,t){(function(t){e.exports=t}).call(t,{})}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=i.DEVICE_TYPES,o=i.defaultData,s=function(e){switch(e){case a.MOBILE:return{isMobile:!0};case a.TABLET:return{isTablet:!0};case a.SMART_TV:return{isSmartTV:!0};case a.CONSOLE:return{isConsole:!0};case a.WEARABLE:return{isWearable:!0};case a.BROWSER:return{isBrowser:!0};default:return o}},c=function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:n.name||!1,engineVersion:n.version,osName:r.name,osVersion:r.version,userAgent:i}},l=function(e,t,n,i){return r({},e,{vendor:t.vendor,model:t.model,os:n.name,osVersion:n.version,ua:i})},u=function(e,t,n,r){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},d=function(e,t,n,r){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},f=function(e,t,n,r){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},p=t.getNavigatorInstance=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1};e.exports={checkType:s,broPayload:c,mobilePayload:l,stvPayload:u,consolePayload:d,wearPayload:f,getNavigatorInstance:p,isIOS13Check:t.isIOS13Check=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)}}})])}))(),Vf=g`
48
48
  *,
49
49
  ::after,
50
50
  ::before {
@@ -103,7 +103,7 @@ function print() { __p += __j.call(arguments, '') }
103
103
  background: white;
104
104
  z-index: 1000;
105
105
  }
106
- `,Hf,Uf=class extends Ze{constructor(...e){super(...e),this._currentProgressElement=null,this._currentScreenElement=null,this._currentScreenModuleId=``,this._currentScreenConfig=null,this.orientation=new zf(this),this.store=Ff.getInitialState(),this.currentScreenConfig=this.store.currentScreenConfig,this.processingScreenFromWorkflow=this.store.getProcessingTemplate(),this.isProcessing=this.store.isProcessing,this.loadedModules=this.store.externalModules,this.modulesConfig=this.store.modulesConfig,this.storeNonce=this.store.nonce,this._listenerFromModule=(e,t)=>{let n=JSON.stringify(t);B.logSessionEvent({module:e,logLevel:z.INFO,message:n}),this.store.listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:n,module:e})},this._isProcessingCallback=e=>{this.store.setIsProcessing(e)},this._performFromModule=(e,t)=>{this.store.setIsProcessing(!1),this.store.pushStepWaitNextStepAndSet(e,t)}}connectedCallback(){super.connectedCallback(),this.unsubscribeFromStore=Ff.subscribe(e=>{this.currentScreenConfig=e.currentScreenConfig,this.processingScreenFromWorkflow=e.getProcessingTemplate(),this.isProcessing=e.isProcessing,this.loadedModules=e.externalModules,this.modulesConfig=e.modulesConfig,this.storeNonce=e.nonce})}_processingScreen(){let e=this.loadedModules.find(e=>e.supportedTemplates.includes(`PROGRESS`));if(!e||!this.processingScreenFromWorkflow)return Ae`Processing...`;let t={perform:this._performFromModule,moduleProps:A(A({},this.processingScreenFromWorkflow),{},{templateId:`PROGRESS`}),modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback};return this._currentProgressElement||(this._currentProgressElement=Lf(e.id,t)),this._currentProgressElement}_isTheSameModuleAndScreen(e){return this._currentScreenModuleId===e.id&&JSON.stringify(Rf(this._currentScreenConfig))===JSON.stringify(Rf(this.currentScreenConfig))}_currentScreen(){if(!this.currentScreenConfig)return Me;let e=this.loadedModules.find(e=>e.supportedTemplates.includes(this.currentScreenConfig.templateId));if(!e)return Me;let t={perform:this._performFromModule,moduleProps:this.currentScreenConfig,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback,nonce:this.storeNonce};return(!this._currentScreenElement||!this._isTheSameModuleAndScreen(e))&&(this._currentScreenElement=Lf(e.id,t),this._currentScreenModuleId=e.id,this._currentScreenConfig=this.currentScreenConfig),this._currentScreenElement}get version(){return`3.6.433-nightly`}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.unsubscribeFromStore)==null||e.call(this),ct.clearLogs()}render(){return!this.currentScreenConfig&&!this.processingScreenFromWorkflow?null:Ae`<div
106
+ `,Hf,Uf=class extends Ze{constructor(...e){super(...e),this._currentProgressElement=null,this._currentScreenElement=null,this._currentScreenModuleId=``,this._currentScreenConfig=null,this.orientation=new zf(this),this.store=Ff.getInitialState(),this.currentScreenConfig=this.store.currentScreenConfig,this.processingScreenFromWorkflow=this.store.getProcessingTemplate(),this.isProcessing=this.store.isProcessing,this.loadedModules=this.store.externalModules,this.modulesConfig=this.store.modulesConfig,this.storeNonce=this.store.nonce,this._listenerFromModule=(e,t)=>{let n=JSON.stringify(t);B.logSessionEvent({module:e,logLevel:z.INFO,message:n}),this.store.listener({eventType:$r.MESSAGE,logLevel:z.INFO,message:n,module:e})},this._isProcessingCallback=e=>{this.store.setIsProcessing(e)},this._performFromModule=(e,t)=>{this.store.setIsProcessing(!1),this.store.pushStepWaitNextStepAndSet(e,t)}}connectedCallback(){super.connectedCallback(),this.unsubscribeFromStore=Ff.subscribe(e=>{this.currentScreenConfig=e.currentScreenConfig,this.processingScreenFromWorkflow=e.getProcessingTemplate(),this.isProcessing=e.isProcessing,this.loadedModules=e.externalModules,this.modulesConfig=e.modulesConfig,this.storeNonce=e.nonce})}_processingScreen(){let e=this.loadedModules.find(e=>e.supportedTemplates.includes(`PROGRESS`));if(!e||!this.processingScreenFromWorkflow)return Ae`Processing...`;let t={perform:this._performFromModule,moduleProps:A(A({},this.processingScreenFromWorkflow),{},{templateId:`PROGRESS`}),modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback};return this._currentProgressElement||(this._currentProgressElement=Lf(e.id,t)),this._currentProgressElement}_isTheSameModuleAndScreen(e){return this._currentScreenModuleId===e.id&&JSON.stringify(Rf(this._currentScreenConfig))===JSON.stringify(Rf(this.currentScreenConfig))}_currentScreen(){if(!this.currentScreenConfig)return Me;let e=this.loadedModules.find(e=>e.supportedTemplates.includes(this.currentScreenConfig.templateId));if(!e)return Me;let t={perform:this._performFromModule,moduleProps:this.currentScreenConfig,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback,nonce:this.storeNonce};return(!this._currentScreenElement||!this._isTheSameModuleAndScreen(e))&&(this._currentScreenElement=Lf(e.id,t),this._currentScreenModuleId=e.id,this._currentScreenConfig=this.currentScreenConfig),this._currentScreenElement}get version(){return`3.6.436-nightly`}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.unsubscribeFromStore)==null||e.call(this),ct.clearLogs()}render(){return!this.currentScreenConfig&&!this.processingScreenFromWorkflow?null:Ae`<div
107
107
  part="idv"
108
108
  class="idv"
109
109
  data-device="${Bf.isMobile&&this.orientation.isPortrait?`mobile`:`desktop`}"
@@ -112,4 +112,4 @@ function print() { __p += __j.call(arguments, '') }
112
112
  ${this.isProcessing?Ae`<div class="processing-overlay">${this._processingScreen()}</div>`:``}
113
113
  ${this._currentScreen()}
114
114
  </div>
115
- </div>`}};Hf=Uf,Hf.styles=[Vf],$([st(),Q(`design:type`,Object)],Uf.prototype,`store`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`currentScreenConfig`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`processingScreenFromWorkflow`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`isProcessing`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`loadedModules`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`modulesConfig`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`storeNonce`,void 0);var Wf=class{initialize(e){return b(function*(){return Ff.getState().initialize(e)})()}configure(e){return b(function*(){return`userName`in e?yield Ff.getState().configureByUserPass(e):`apiKey`in e?yield Ff.getState().configureByApiKey(e):`url`in e&&Object.keys(e).length===1?yield Ff.getState().configureWithUrl(e.url):{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`No valid config found`})}})()}getWorkFlows(e){return b(function*(){return yield Ff.getState().getWorkflows(e)})()}prepareWorkflow({workflowId:e}){return b(function*(){return yield Ff.getState().prepareWorkflowAndPrepareUi(e)})()}startWorkflow(e){return b(function*(){var t;let n=(t=Ff.getState().workflow)!=null&&t.trackLocation?yield Yi():null;return new Promise(t=>{let r=e=>{t(e)},i=e==null?void 0:e.locale,a=e==null?void 0:e.metadata,o=Wi(i);Ff.getState().startNewSession({completion:r,locale:o,metadata:a,location:n}).then(e=>{(e.error||e.results)&&(Ff.getState().removeCurrentSessionDataLsAndStore(),r(e))})})})()}deinitialize(){return b(function*(){return yield Ff.getState().deinitialize()})()}startLogin(e){var t=this;return b(function*(){var n,r,i;let{applicationId:a,baseUrl:o,metadata:s,locale:c}=e,l=(e,t)=>(B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`StartLogin: error. Code: ${e}.${t?` Message: ${t}.`:``}`}),new za(A({errorCode:e},!!t&&{message:t}))),u=yield Ff.getState().startIamAuth({applicationId:a,baseUrl:o,metadata:s,locale:c});if(u.code!==0||!Ii(u.data)||!Qi(u.data.url))return l(mi.START_COMMAND_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: startIamAuth success. URL: ${u.data.url}`});let d=yield t.configure({url:u.data.url});if(((n=d.error)==null?void 0:n.errorCode)===ai.INITIALIZATION_REQUIRED)return l(mi.INITIALIZATION_REQUIRED);if(((r=d.error)==null?void 0:r.errorCode)===ai.SCENARIO_IN_PROGRESS)return l(mi.ALREADY_IN_PROCESS);if(!(`workflows`in d)||!d.workflows[0]||d.error)return l(mi.MISSING_CONFIGURATION);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: configure success. Workflow ID: ${d.workflows[0]}`});let f=yield t.prepareWorkflow({workflowId:d.workflows[0]});if(console.log(`prepareResult`,f),f.error)return l(mi.PREPARE_WORKFLOW_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: prepareWorkflow success.`});let p=yield t.startWorkflow({locale:c});if(p.error)return l(mi.EXECUTION_WORKFLOW_FAILURE);let m=(i=p.results)==null?void 0:i.iamAuthCode;return m!=null&&m.error?l(mi.AUTH_FAILURE,m.error):Qi(m==null?void 0:m.code)?(B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`StartLogin: startWorkflow success. IAM Auth Code: ${m.code}.`}),m.code):l(mi.MISSING_AUTH_CODE)})()}get version(){var e;return(e=`3.6.433-nightly`)==null?`Version unavailable. Something went wrong`:e}get currentSessionId(){return Ff.getState().getCurrentSessionId()}set nonce(e){Ff.getState().setNonce(e)}set eventListener(e){if(!e||typeof e!=`function`){console.warn(`IdvIntegrationService:: listener is not a function`);return}Ff.getState().setListener(e)}set sessionRestoreMode(e){Ff.getState().setSessionRestoreMode(e)}};return window.customElements.get(`idv-flow`)||window.customElements.define(`idv-flow`,Uf),e.BaseError=ua,e.BaseLoginError=za,e.BaseModule=da,e.ConnectionError=pi,e.DeinitializationError=fi,e.IdvEventTypesEnum=$r,e.IdvIntegrationService=Wf,e.IdvServiceMessages=ri,e.IdvWebComponent=Uf,e.InitializeError=si,e.LoginError=mi,e.PrepareWorkflowError=ii,e.SessionError=di,e.StartSessionError=ui,e.WorkflowError=oi,e.WorkflowPlatformError=li,e.registerModule=fa,e})({});
115
+ </div>`}};Hf=Uf,Hf.styles=[Vf],$([st(),Q(`design:type`,Object)],Uf.prototype,`store`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`currentScreenConfig`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`processingScreenFromWorkflow`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`isProcessing`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`loadedModules`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`modulesConfig`,void 0),$([st(),Q(`design:type`,Object)],Uf.prototype,`storeNonce`,void 0);var Wf=class{initialize(e){return b(function*(){return Ff.getState().initialize(e)})()}configure(e){return b(function*(){return`userName`in e?yield Ff.getState().configureByUserPass(e):`apiKey`in e?yield Ff.getState().configureByApiKey(e):`url`in e&&Object.keys(e).length===1?yield Ff.getState().configureWithUrl(e.url):{error:new V({errorCode:ai.CONFIG_MISSED_OR_INVALID,message:`No valid config found`})}})()}getWorkFlows(e){return b(function*(){return yield Ff.getState().getWorkflows(e)})()}prepareWorkflow({workflowId:e}){return b(function*(){return yield Ff.getState().prepareWorkflowAndPrepareUi(e)})()}startWorkflow(e){return b(function*(){var t;let n=(t=Ff.getState().workflow)!=null&&t.trackLocation?yield Yi():null;return new Promise(t=>{let r=e=>{t(e)},i=e==null?void 0:e.locale,a=e==null?void 0:e.metadata,o=Wi(i);Ff.getState().startNewSession({completion:r,locale:o,metadata:a,location:n}).then(e=>{(e.error||e.results)&&(Ff.getState().removeCurrentSessionDataLsAndStore(),r(e))})})})()}deinitialize(){return b(function*(){return yield Ff.getState().deinitialize()})()}startLogin(e){var t=this;return b(function*(){var n,r,i;let{applicationId:a,baseUrl:o,metadata:s,locale:c}=e,l=(e,t)=>(B.logSessionEvent({module:`IDV`,logLevel:z.ERROR,message:`StartLogin: error. Code: ${e}.${t?` Message: ${t}.`:``}`}),new za(A({errorCode:e},!!t&&{message:t}))),u=yield Ff.getState().startIamAuth({applicationId:a,baseUrl:o,metadata:s,locale:c});if(u.code!==0||!Ii(u.data)||!Qi(u.data.url))return l(mi.START_COMMAND_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: startIamAuth success. URL: ${u.data.url}`});let d=yield t.configure({url:u.data.url});if(((n=d.error)==null?void 0:n.errorCode)===ai.INITIALIZATION_REQUIRED)return l(mi.INITIALIZATION_REQUIRED);if(((r=d.error)==null?void 0:r.errorCode)===ai.SCENARIO_IN_PROGRESS)return l(mi.ALREADY_IN_PROCESS);if(!(`workflows`in d)||!d.workflows[0]||d.error)return l(mi.MISSING_CONFIGURATION);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: configure success. Workflow ID: ${d.workflows[0]}`});let f=yield t.prepareWorkflow({workflowId:d.workflows[0]});if(console.log(`prepareResult`,f),f.error)return l(mi.PREPARE_WORKFLOW_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:z.DEBUG,message:`StartLogin: prepareWorkflow success.`});let p=yield t.startWorkflow({locale:c});if(p.error)return l(mi.EXECUTION_WORKFLOW_FAILURE);let m=(i=p.results)==null?void 0:i.iamAuthCode;return m!=null&&m.error?l(mi.AUTH_FAILURE,m.error):Qi(m==null?void 0:m.code)?(B.logSessionEvent({module:`IDV`,logLevel:z.INFO,message:`StartLogin: startWorkflow success. IAM Auth Code: ${m.code}.`}),m.code):l(mi.MISSING_AUTH_CODE)})()}get version(){var e;return(e=`3.6.436-nightly`)==null?`Version unavailable. Something went wrong`:e}get currentSessionId(){return Ff.getState().getCurrentSessionId()}set nonce(e){Ff.getState().setNonce(e)}set eventListener(e){if(!e||typeof e!=`function`){console.warn(`IdvIntegrationService:: listener is not a function`);return}Ff.getState().setListener(e)}set sessionRestoreMode(e){Ff.getState().setSessionRestoreMode(e)}};return window.customElements.get(`idv-flow`)||window.customElements.define(`idv-flow`,Uf),e.BaseError=ua,e.BaseLoginError=za,e.BaseModule=da,e.ConnectionError=pi,e.DeinitializationError=fi,e.IdvEventTypesEnum=$r,e.IdvIntegrationService=Wf,e.IdvServiceMessages=ri,e.IdvWebComponent=Uf,e.InitializeError=si,e.LoginError=mi,e.PrepareWorkflowError=ii,e.SessionError=di,e.StartSessionError=ui,e.WorkflowError=oi,e.WorkflowPlatformError=li,e.registerModule=fa,e})({});