@regulaforensics/idv-document 4.0.675-nightly → 4.0.676-rc

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
@@ -5,9 +5,9 @@ var RegulaIdvDocument=(function(e){Object.defineProperty(e,Symbol.toStringTag,{v
5
5
  `)&&(A=`(?: `+A+`)`,M=` `+M,j++),x=RegExp(`^(?:`+A+`)`,k)),y&&(x=RegExp(`^`+A+`$(?!\\s)`,k)),_&&(S=i.lastIndex),C=e(d,O?x:i,M),O?C?(C.input=g(C.input,j),C[0]=g(C[0],j),C.index=i.lastIndex,i.lastIndex+=C[0].length):i.lastIndex=0:_&&C&&(i.lastIndex=i.global?C.index+C[0].length:S),y&&C&&C.length>1&&e(u,C[0],x,function(){for(w=1;w<arguments.length-2;w++)arguments[w]===void 0&&(C[w]=void 0)}),C&&D)for(C.groups=T=o(null),w=0;w<D.length;w++)E=D[w],T[E[0]]=C[E[1]];return C}),em=f,em}var rm;function im(){if(rm)return Vp;rm=1;var e=ca(),t=nm();return e({target:`RegExp`,proto:!0,forced:/./.exec!==t},{exec:t}),Vp}im();var am={},om={},sm={},cm,lm;function um(){if(lm)return cm;lm=1;var e=jt(),t=Dr(),n=fo(),r=Ut(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return cm={codeAt:s(!1),charAt:s(!0)},cm}var dm;function fm(){if(dm)return sm;dm=1;var e=um().charAt,t=fo(),n=Ei(),r=Ra(),i=Va(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),sm}var pm,mm;function hm(){if(mm)return pm;mm=1;var e=Tt(),t=kn(),n=In(),r=Xt(),i=t(`iterator`);return pm=!e(function(){var e=new URL(`b?a=1&b=2&c=3`,`https://a`),t=e.searchParams,a=new URLSearchParams(`a=1&a=2&b=3`),o=``;return e.pathname=`c%20d`,t.forEach(function(e,n){t.delete(`b`),o+=n+e}),a.delete(`a`,2),a.delete(`b`,void 0),r&&(!e.toJSON||!a.has(`a`,1)||a.has(`a`,2)||!a.has(`a`,void 0)||a.has(`b`))||!t.size&&(r||!n)||!t.sort||e.href!==`https://a/c%20d?a=1&c=3`||t.get(`c`)!==`3`||String(new URLSearchParams(`?a=1`))!==`a=1`||!t[i]||new URL(`https://a@b`).username!==`a`||new URLSearchParams(new URLSearchParams(`a=b`)).get(`a`)!==`b`||new URL(`https://тест`).host!==`xn--e1aybc`||new URL(`https://a#б`).hash!==`#%D0%B1`||o!==`a1c3`||new URL(`https://x`,void 0).host!==`x`}),pm}var gm,_m;function vm(){if(_m)return gm;_m=1;var e=In(),t=jt(),n=Kn(),r=Tt(),i=Zr(),a=Xi(),o=Ai(),s=cn(),c=Lt(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return gm=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,gm}var ym,bm;function xm(){if(bm)return ym;bm=1;var e=Is(),t=Kn(),n=cn(),r=xs(),i=zs(),a=Ju(),o=Ir(),s=es(),c=zo(),l=Gs(),u=Hs(),d=Array;return ym=function(f){var p=n(f),m=a(this),h=arguments.length,g=h>1?arguments[1]:void 0,_=g!==void 0;_&&(g=e(g,h>2?arguments[2]:void 0));var v=u(p),y=0,b,x,S,C,w,T;if(v&&!(this===d&&i(v)))for(x=m?new this:[],C=l(p,v),w=C.next;!(S=t(w,C)).done;y++)T=_?r(C,g,[S.value,y],!0):S.value,s(x,y,T);else for(b=o(p),x=m?new this(b):d(b);b>y;y++)T=_?g(p[y],y):p[y],s(x,y,T);return c(x,y),x},ym}var Sm,Cm;function wm(){if(Cm)return Sm;Cm=1;var e=jt(),t=2147483647,n=36,r=1,i=26,a=38,o=700,s=72,c=128,l=`-`,u=/[^\0-\u007E]/,d=/[.\u3002\uFF0E\uFF61]/g,f=`Overflow: input needs wider integers to process`,p=n-r,m=RangeError,h=e(d.exec),g=Math.floor,_=String.fromCharCode,v=e(``.charCodeAt),y=e([].join),b=e([].push),x=e(``.replace),S=e(``.split),C=e(``.toLowerCase),w=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=v(e,n++);if(i>=55296&&i<=56319&&n<r){var a=v(e,n++);(a&64512)==56320?b(t,((i&1023)<<10)+(a&1023)+65536):(b(t,i),n--)}else b(t,i)}return t},T=function(e){return e+22+75*(e<26)},E=function(e,t,r){var s=0;for(e=r?g(e/o):e>>1,e+=g(e/t);e>p*i>>1;)e=g(e/p),s+=n;return g(s+(p+1)*e/(e+a))},D=function(e){var a=[];e=w(e);for(var o=e.length,u=c,d=0,p=s,h=0,v;h<e.length;h++)v=e[h],v<128&&b(a,_(v));var x=a.length,S=x;for(x&&b(a,l);S<o;){var C=t;for(h=0;h<e.length;h++)v=e[h],v>=u&&v<C&&(C=v);var D=S+1;if(C-u>g((t-d)/D))throw new m(f);for(d+=(C-u)*D,u=C,h=0;h<e.length;h++){if(v=e[h],v<u&&++d>t)throw new m(f);if(v===u){for(var O=d,k=n;;){var A=k<=p?r:k>=p+i?i:k-p;if(O<A)break;var j=O-A,M=n-A;b(a,_(T(A+j%M))),O=g(j/M),k+=n}b(a,_(T(O))),p=E(d,D,S===x),d=0,S++}}d++,u++}return y(a,``)};return Sm=function(e){for(var t=[],n=S(x(C(e),d,`.`),`.`),r=0,i;r<n.length;r++)i=n[r],b(t,h(u,i)?`xn--`+D(i):i);return y(t,`.`)},Sm}var Tm,Em;function Dm(){if(Em)return Tm;Em=1;var e=TypeError;return Tm=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},Tm}var Om={},km;function Am(){if(km)return Om;km=1;var e=ca(),t=jt(),n=Ar(),r=RangeError,i=String.fromCharCode,a=String.fromCodePoint,o=t([].join);return e({target:`String`,stat:!0,arity:1,forced:!!a&&a.length!==1},{fromCodePoint:function(e){for(var t=[],a=arguments.length,s=0,c;a>s;){if(c=+arguments[s++],n(c,1114111)!==c)throw new r(c+` is not a valid code point`);t[s]=c<65536?i(c):i(((c-=65536)>>10)+55296,c%1024+56320)}return o(t,``)}}),Om}var jm,Mm;function Nm(){if(Mm)return jm;Mm=1;var e=H(),t=In(),n=Object.getOwnPropertyDescriptor;return jm=function(r){if(!t)return e[r];var i=n(e,r);return i&&i.value},jm}var Pm,Fm;function Im(){if(Fm)return Pm;Fm=1,Wa(),Am();var e=ca(),t=H(),n=Nm(),r=Yn(),i=Kn(),a=jt(),o=In(),s=hm(),c=Wi(),l=Zo(),u=ls(),d=ba(),f=Ca(),p=Ei(),m=Jo(),h=pt(),g=dn(),_=Is(),v=co(),y=Mn(),b=gt(),x=fo(),S=ci(),C=bi(),w=Gs(),T=Hs(),E=Va(),D=Dm(),O=kn(),k=Wd(),A=O(`iterator`),j=`URLSearchParams`,M=j+`Iterator`,N=p.set,P=p.getterFor(j),F=p.getterFor(M),I=n(`fetch`),L=n(`Request`),ee=n(`Headers`),te=L&&L.prototype,ne=ee&&ee.prototype,R=t.TypeError,re=t.encodeURIComponent,ie=String.fromCharCode,ae=r(`String`,`fromCodePoint`),oe=parseInt,se=a(``.charAt),ce=a([].join),le=a([].push),ue=a(``.replace),de=a([].shift),fe=a([].splice),pe=a(``.split),z=a(``.slice),me=a(/./.exec),he=/\+/g,ge=`�`,_e=/^[0-9a-f]+$/i,ve=function(e,t){var n=z(e,t,t+2);return me(_e,n)?oe(n,16):NaN},ye=function(e){for(var t=0,n=128;n>0&&(e&n)!==0;n>>=1)t++;return t},be=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63}return t>1114111?null:t},xe=function(e){e=ue(e,he,` `);for(var t=e.length,n=``,r=0;r<t;){var i=se(e,r);if(i===`%`){if(se(e,r+1)===`%`||r+3>t){n+=`%`,r++;continue}var a=ve(e,r+1);if(a!==a){n+=i,r++;continue}r+=2;var o=ye(a);if(o===0)i=ie(a);else{if(o===1||o>4){n+=ge,r++;continue}for(var s=[a],c=1;c<o&&(r++,!(r+3>t||se(e,r)!==`%`));){var l=ve(e,r+1);if(l!==l){r+=3;break}if(l>191||l<128)break;le(s,l),r+=2,c++}if(s.length!==o){n+=ge;continue}var u=be(s);u===null?n+=ge:i=ae(u)}}n+=i,r++}return n},Se=/[!'()~]|%20/g,Ce={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`},we=function(e){return Ce[e]},Te=function(e){return ue(re(e),Se,we)},Ee=f(function(e,t){N(this,{type:M,target:P(e).entries,index:0,kind:t})},j,function(){var e=F(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,E(void 0,!0);var r=t[n];switch(e.kind){case`keys`:return E(r.key,!1);case`values`:return E(r.value,!1)}return E([r.key,r.value],!1)},!0),De=function(e){this.entries=[],this.url=null,e!==void 0&&(b(e)?this.parseObject(e):this.parseQuery(typeof e==`string`?se(e,0)===`?`?z(e,1):e:x(e)))};De.prototype={type:j,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,n=T(e),r,a,o,s,c,l,u;if(n)for(r=w(e,n),a=r.next;!(o=i(a,r)).done;){if(s=w(y(o.value)),c=s.next,(l=i(c,s)).done||(u=i(c,s)).done||!i(c,s).done)throw new R(`Expected sequence with length 2`);le(t,{key:x(l.value),value:x(u.value)})}else for(var d in e)g(e,d)&&le(t,{key:d,value:x(e[d])})},parseQuery:function(e){if(e)for(var t=this.entries,n=pe(e,`&`),r=0,i,a;r<n.length;)i=n[r++],i.length&&(a=pe(i,`=`),le(t,{key:xe(de(a)),value:xe(ce(a,`=`))}))},serialize:function(){for(var e=this.entries,t=[],n=0,r;n<e.length;)r=e[n++],le(t,Te(r.key)+`=`+Te(r.value));return ce(t,`&`)},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Oe=function(){m(this,ke);var e=arguments.length>0?arguments[0]:void 0,t=N(this,new De(e));o||(this.size=t.entries.length)},ke=Oe.prototype;if(u(ke,{append:function(e,t){var n=P(this);D(arguments.length,2),le(n.entries,{key:x(e),value:x(t)}),o||this.size++,n.updateURL()},delete:function(e){for(var t=P(this),n=D(arguments.length,1),r=t.entries,i=x(e),a=n<2?void 0:arguments[1],s=a===void 0?a:x(a),c=0;c<r.length;){var l=r[c];if(l.key===i&&(s===void 0||l.value===s)){if(fe(r,c,1),s!==void 0)break}else c++}o||(this.size=r.length),t.updateURL()},get:function(e){var t=P(this).entries;D(arguments.length,1);for(var n=x(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=P(this).entries;D(arguments.length,1);for(var n=x(e),r=[],i=0;i<t.length;i++)t[i].key===n&&le(r,t[i].value);return r},has:function(e){for(var t=P(this).entries,n=D(arguments.length,1),r=x(e),i=n<2?void 0:arguments[1],a=i===void 0?i:x(i),o=0;o<t.length;){var s=t[o++];if(s.key===r&&(a===void 0||s.value===a))return!0}return!1},set:function(e,t){var n=P(this);D(arguments.length,1);for(var r=n.entries,i=!1,a=x(e),s=x(t),c=0,l;c<r.length;c++)l=r[c],l.key===a&&(i?fe(r,c--,1):(i=!0,l.value=s));i||le(r,{key:a,value:s}),o||(this.size=r.length),n.updateURL()},sort:function(){var e=P(this);k(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t=P(this).entries,n=_(e,arguments.length>1?arguments[1]:void 0),r=0,i;r<t.length;)i=t[r++],n(i.value,i.key,this)},keys:function(){return new Ee(this,`keys`)},values:function(){return new Ee(this,`values`)},entries:function(){return new Ee(this,`entries`)}},{enumerable:!0}),c(ke,A,ke.entries,{name:`entries`}),c(ke,`toString`,function(){return P(this).serialize()},{enumerable:!0}),o&&l(ke,`size`,{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),d(Oe,j),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Oe}),!s&&h(ee)){var Ae=a(ne.has),je=a(ne.set),Me=function(e){if(b(e)){var t=e.body,n;if(v(t)===j)return n=e.headers?new ee(e.headers):new ee,Ae(n,`content-type`)||je(n,`content-type`,`application/x-www-form-urlencoded;charset=UTF-8`),S(e,{body:C(0,x(t)),headers:C(0,n)})}return e};if(h(I)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return I(e,arguments.length>1?Me(arguments[1]):{})}}),h(L)){var Ne=function(e){return m(this,te),new L(e,arguments.length>1?Me(arguments[1]):{})};te.constructor=Ne,Ne.prototype=te,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ne})}}return Pm={URLSearchParams:Oe,getState:P},Pm}var Lm;function Rm(){if(Lm)return om;Lm=1,fm();var e=ca(),t=In(),n=hm(),r=H(),i=Is(),a=jt(),o=Wi(),s=Zo(),c=Jo(),l=dn(),u=vm(),d=xm(),f=rc(),p=um().codeAt,m=wm(),h=fo(),g=ba(),_=Dm(),v=Im(),y=Ei(),b=y.set,x=y.getterFor(`URL`),S=v.URLSearchParams,C=v.getState,w=r.URL,T=r.TypeError,E=r.parseInt,D=Math.floor,O=Math.pow,k=a(``.charAt),A=a(/./.exec),j=a([].join),M=a(1.1.toString),N=a([].pop),P=a([].push),F=a(``.replace),I=a([].shift),L=a(``.split),ee=a(``.slice),te=a(``.toLowerCase),ne=a([].unshift),R=`Invalid authority`,re=`Invalid scheme`,ie=`Invalid host`,ae=`Invalid port`,oe=/[a-z]/i,se=/[\d+-.a-z]/i,ce=/\d/,le=/^0x/i,ue=/^[0-7]+$/,de=/^\d+$/,fe=/^[\da-f]+$/i,pe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,z=/[\0\t\n\r #/:<>?@[\\\]^|]/,me=/^[\u0000-\u0020]+/,he=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ge=/[\t\n\r]/g,_e,ve=function(e){var t=L(e,`.`),n,r,i,a,o,s,c;if(t.length&&t[t.length-1]===``&&t.length--,n=t.length,n>4)return e;for(r=[],i=0;i<n;i++){if(a=t[i],a===``)return e;if(o=10,a.length>1&&k(a,0)===`0`&&(o=A(le,a)?16:8,a=ee(a,o===8?1:2)),a===``)s=0;else{if(!A(o===10?de:o===8?ue:fe,a))return e;s=E(a,o)}P(r,s)}for(i=0;i<n;i++)if(s=r[i],i===n-1){if(s>=O(256,5-n))return null}else if(s>255)return null;for(c=N(r),i=0;i<r.length;i++)c+=r[i]*O(256,3-i);return c},ye=function(e){var t=[0,0,0,0,0,0,0,0],n=0,r=null,i=0,a,o,s,c,l,u,d,f=function(){return k(e,i)};if(f()===`:`){if(k(e,1)!==`:`)return;i+=2,n++,r=n}for(;f();){if(n===8)return;if(f()===`:`){if(r!==null)return;i++,n++,r=n}else{for(a=o=0;o<4&&A(fe,f());)a=a*16+E(f(),16),i++,o++;if(f()===`.`){if(o===0||(i-=o,n>6))return;for(s=0;f();){if(c=null,s>0){if(f()===`.`&&s<4)i++;else return}if(!A(ce,f()))return;for(;A(ce,f());){if(l=E(f(),10),c===null)c=l;else{if(c===0)return;c=c*10+l}if(c>255)return;i++}t[n]=t[n]*256+c,s++,(s===2||s===4)&&n++}if(s!==4)return;break}if(f()===`:`){if(i++,!f())return}else if(f())return;t[n++]=a}}if(r!==null)for(u=n-r,n=7;n!==0&&u>0;)d=t[n],t[n--]=t[r+u-1],t[r+--u]=d;else if(n!==8)return;return t},be=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)e[a]===0?(r===null&&(r=a),++i):(i>n&&(t=r,n=i),r=null,i=0);return i>n?r:t},xe=function(e){var t,n,r,i;if(typeof e==`number`){for(t=[],n=0;n<4;n++)ne(t,e%256),e=D(e/256);return j(t,`.`)}if(typeof e==`object`){for(t=``,r=be(e),n=0;n<8;n++)i&&e[n]===0||(i&&(i=!1),r===n?(t+=n?`:`:`::`,i=!0):(t+=M(e[n],16),n<7&&(t+=`:`)));return`[`+t+`]`}return e},Se={},Ce=u({},Se,{" ":1,'"':1,"<":1,">":1,"`":1}),we=u({},Ce,{"#":1,"?":1,"{":1,"}":1}),Te=u({},we,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ee=function(e,t){var n=p(e,0);return n>32&&n<127&&!l(t,e)?e:encodeURIComponent(e)},De={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Oe=function(e,t){var n;return e.length===2&&A(oe,k(e,0))&&((n=k(e,1))===`:`||!t&&n===`|`)},ke=function(e){var t;return e.length>1&&Oe(ee(e,0,2))&&(e.length===2||(t=k(e,2))===`/`||t===`\\`||t===`?`||t===`#`)},Ae=function(e){return e===`.`||te(e)===`%2e`},je=function(e){return e=te(e),e===`..`||e===`%2e.`||e===`.%2e`||e===`%2e%2e`},Me={},Ne={},Pe={},Fe={},Ie={},Le={},Re={},ze={},Be={},Ve={},He={},Ue={},We={},Ge={},Ke={},qe={},Je={},Ye={},B={},Xe={},Ze={},V=function(e,t,n){var r=h(e),i,a,o;if(t){if(a=this.parse(r),a)throw new T(a);this.searchParams=null}else{if(n!==void 0&&(i=new V(n,!0)),a=this.parse(r,null,i),a)throw new T(a);o=C(new S),o.bindURL(this),this.searchParams=o}};V.prototype={type:`URL`,parse:function(e,t,n){var r=this,i=t||Me,a=0,o=``,s=!1,c=!1,u=!1,p,m,g,_;for(e=h(e),t||(r.scheme=``,r.username=``,r.password=``,r.host=null,r.port=null,r.path=[],r.query=null,r.fragment=null,r.cannotBeABaseURL=!1,e=F(e,me,``),e=F(e,he,`$1`)),e=F(e,ge,``),p=d(e);a<=p.length;){switch(m=p[a],i){case Me:if(m&&A(oe,m))o+=te(m),i=Ne;else{if(t)return re;i=Pe;continue}break;case Ne:if(m&&(A(se,m)||m===`+`||m===`-`||m===`.`))o+=te(m);else if(m===`:`){if(t&&(r.isSpecial()!==l(De,o)||o===`file`&&(r.includesCredentials()||r.port!==null)||r.scheme===`file`&&!r.host))return;if(r.scheme=o,t){r.isSpecial()&&De[r.scheme]===r.port&&(r.port=null);return}o=``,r.scheme===`file`?i=Ge:r.isSpecial()&&n&&n.scheme===r.scheme?i=Fe:r.isSpecial()?i=ze:p[a+1]===`/`?(i=Ie,a++):(r.cannotBeABaseURL=!0,P(r.path,``),i=B)}else{if(t)return re;o=``,i=Pe,a=0;continue}break;case Pe:if(!n||n.cannotBeABaseURL&&m!==`#`)return re;if(n.cannotBeABaseURL&&m===`#`){r.scheme=n.scheme,r.path=f(n.path),r.query=n.query,r.fragment=``,r.cannotBeABaseURL=!0,i=Ze;break}i=n.scheme===`file`?Ge:Le;continue;case Fe:if(m===`/`&&p[a+1]===`/`)i=Be,a++;else{i=Le;continue}break;case Ie:if(m===`/`){i=Ve;break}i=Ye;continue;case Le:if(r.scheme=n.scheme,m===_e)r.username=n.username,r.password=n.password,r.host=n.host,r.port=n.port,r.path=f(n.path),r.query=n.query;else if(m===`/`||m===`\\`&&r.isSpecial())i=Re;else if(m===`?`)r.username=n.username,r.password=n.password,r.host=n.host,r.port=n.port,r.path=f(n.path),r.query=``,i=Xe;else if(m===`#`)r.username=n.username,r.password=n.password,r.host=n.host,r.port=n.port,r.path=f(n.path),r.query=n.query,r.fragment=``,i=Ze;else{r.username=n.username,r.password=n.password,r.host=n.host,r.port=n.port,r.path=f(n.path),r.path.length--,i=Ye;continue}break;case Re:if(r.isSpecial()&&(m===`/`||m===`\\`))i=Be;else if(m===`/`)i=Ve;else{r.username=n.username,r.password=n.password,r.host=n.host,r.port=n.port,i=Ye;continue}break;case ze:if(i=Be,m!==`/`||k(o,a+1)!==`/`)continue;a++;break;case Be:if(m!==`/`&&m!==`\\`){i=Ve;continue}break;case Ve:if(m===`@`){s&&(o=`%40`+o),s=!0,g=d(o);for(var v=0;v<g.length;v++){var y=g[v];if(y===`:`&&!u)u=!0;else{var b=Ee(y,Te);u?r.password+=b:r.username+=b}}o=``}else if(m===_e||m===`/`||m===`?`||m===`#`||m===`\\`&&r.isSpecial()){if(s&&o===``)return R;a-=d(o).length+1,o=``,i=He}else o+=m;break;case He:case Ue:if(t&&r.scheme===`file`){i=qe;continue}if(m===`:`&&!c){if(o===``)return ie;if(_=r.parseHost(o),_)return _;if(o=``,i=We,t===Ue)return}else if(m===_e||m===`/`||m===`?`||m===`#`||m===`\\`&&r.isSpecial()){if(r.isSpecial()&&o===``)return ie;if(t&&o===``&&(r.includesCredentials()||r.port!==null))return;if(_=r.parseHost(o),_)return _;if(o=``,i=Je,t)return;continue}else m===`[`?c=!0:m===`]`&&(c=!1),o+=m;break;case We:if(A(ce,m))o+=m;else if(m===_e||m===`/`||m===`?`||m===`#`||m===`\\`&&r.isSpecial()||t){if(o!==``){var x=E(o,10);if(x>65535)return ae;r.port=r.isSpecial()&&x===De[r.scheme]?null:x,o=``}if(t)return;i=Je;continue}else return ae;break;case Ge:if(r.scheme=`file`,m===`/`||m===`\\`)i=Ke;else if(n&&n.scheme===`file`)switch(m){case _e:r.host=n.host,r.path=f(n.path),r.query=n.query;break;case`?`:r.host=n.host,r.path=f(n.path),r.query=``,i=Xe;break;case`#`:r.host=n.host,r.path=f(n.path),r.query=n.query,r.fragment=``,i=Ze;break;default:ke(j(f(p,a),``))||(r.host=n.host,r.path=f(n.path),r.shortenPath()),i=Ye;continue}else{i=Ye;continue}break;case Ke:if(m===`/`||m===`\\`){i=qe;break}n&&n.scheme===`file`&&!ke(j(f(p,a),``))&&(Oe(n.path[0],!0)?P(r.path,n.path[0]):r.host=n.host),i=Ye;continue;case qe:if(m===_e||m===`/`||m===`\\`||m===`?`||m===`#`){if(!t&&Oe(o))i=Ye;else if(o===``){if(r.host=``,t)return;i=Je}else{if(_=r.parseHost(o),_)return _;if(r.host===`localhost`&&(r.host=``),t)return;o=``,i=Je}continue}o+=m;break;case Je:if(r.isSpecial()){if(i=Ye,m!==`/`&&m!==`\\`)continue}else if(!t&&m===`?`)r.query=``,i=Xe;else if(!t&&m===`#`)r.fragment=``,i=Ze;else if(m!==_e&&(i=Ye,m!==`/`))continue;break;case Ye:if(m===_e||m===`/`||m===`\\`&&r.isSpecial()||!t&&(m===`?`||m===`#`)){if(je(o)?(r.shortenPath(),m!==`/`&&!(m===`\\`&&r.isSpecial())&&P(r.path,``)):Ae(o)?m!==`/`&&!(m===`\\`&&r.isSpecial())&&P(r.path,``):(r.scheme===`file`&&!r.path.length&&Oe(o)&&(r.host&&(r.host=``),o=k(o,0)+`:`),P(r.path,o)),o=``,r.scheme===`file`&&(m===_e||m===`?`||m===`#`))for(;r.path.length>1&&r.path[0]===``;)I(r.path);m===`?`?(r.query=``,i=Xe):m===`#`&&(r.fragment=``,i=Ze)}else o+=Ee(m,we);break;case B:m===`?`?(r.query=``,i=Xe):m===`#`?(r.fragment=``,i=Ze):m!==_e&&(r.path[0]+=Ee(m,Se));break;case Xe:!t&&m===`#`?(r.fragment=``,i=Ze):m!==_e&&(m===`'`&&r.isSpecial()?r.query+=`%27`:m===`#`?r.query+=`%23`:r.query+=Ee(m,Se));break;case Ze:m!==_e&&(r.fragment+=Ee(m,Ce))}a++}},parseHost:function(e){var t,n,r;if(k(e,0)===`[`){if(k(e,e.length-1)!==`]`||(t=ye(ee(e,1,-1)),!t))return ie;this.host=t}else if(this.isSpecial()){if(e=m(e),A(pe,e)||(t=ve(e),t===null))return ie;this.host=t}else{if(A(z,e))return ie;for(t=``,n=d(e),r=0;r<n.length;r++)t+=Ee(n[r],Se);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme===`file`},includesCredentials:function(){return this.username!==``||this.password!==``},isSpecial:function(){return l(De,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!==`file`||t!==1||!Oe(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,l=t+`:`;return i===null?t===`file`&&(l+=`//`):(l+=`//`,e.includesCredentials()&&(l+=n+(r?`:`+r:``)+`@`),l+=xe(i),a!==null&&(l+=`:`+a)),l+=e.cannotBeABaseURL?o[0]:o.length?`/`+j(o,`/`):``,s!==null&&(l+=`?`+s),c!==null&&(l+=`#`+c),l},setHref:function(e){var t=this.parse(e);if(t)throw new T(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e===`blob`)try{return new Qe(e.path[0]).origin}catch(e){return`null`}return e===`file`||!this.isSpecial()?`null`:e+`://`+xe(this.host)+(t===null?``:`:`+t)},getProtocol:function(){return this.scheme+`:`},setProtocol:function(e){this.parse(h(e)+`:`,Me)},getUsername:function(){return this.username},setUsername:function(e){var t=d(h(e));if(!this.cannotHaveUsernamePasswordPort()){this.username=``;for(var n=0;n<t.length;n++)this.username+=Ee(t[n],Te)}},getPassword:function(){return this.password},setPassword:function(e){var t=d(h(e));if(!this.cannotHaveUsernamePasswordPort()){this.password=``;for(var n=0;n<t.length;n++)this.password+=Ee(t[n],Te)}},getHost:function(){var e=this.host,t=this.port;return e===null?``:t===null?xe(e):xe(e)+`:`+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,He)},getHostname:function(){var e=this.host;return e===null?``:xe(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ue)},getPort:function(){var e=this.port;return e===null?``:h(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=h(e),e===``?this.port=null:this.parse(e,We))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?`/`+j(e,`/`):``},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Je))},getSearch:function(){var e=this.query;return e?`?`+e:``},setSearch:function(e){e=h(e),e===``?this.query=null:(k(e,0)===`?`&&(e=ee(e,1)),this.query=``,this.parse(e,Xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?`#`+e:``},setHash:function(e){e=h(e),e===``?this.fragment=null:(k(e,0)===`#`&&(e=ee(e,1)),this.fragment=``,this.parse(e,Ze))},update:function(){this.query=this.searchParams.serialize()||null}};var Qe=function(e){var n=c(this,$e),r=b(n,new V(e,!1,_(arguments.length,1)>1?arguments[1]:void 0));t||(n.href=r.serialize(),n.origin=r.getOrigin(),n.protocol=r.getProtocol(),n.username=r.getUsername(),n.password=r.getPassword(),n.host=r.getHost(),n.hostname=r.getHostname(),n.port=r.getPort(),n.pathname=r.getPathname(),n.search=r.getSearch(),n.searchParams=r.getSearchParams(),n.hash=r.getHash())},$e=Qe.prototype,et=function(e,t){return{get:function(){return x(this)[e]()},set:t&&function(e){return x(this)[t](e)},configurable:!0,enumerable:!0}};if(t&&(s($e,`href`,et(`serialize`,`setHref`)),s($e,`origin`,et(`getOrigin`)),s($e,`protocol`,et(`getProtocol`,`setProtocol`)),s($e,`username`,et(`getUsername`,`setUsername`)),s($e,`password`,et(`getPassword`,`setPassword`)),s($e,`host`,et(`getHost`,`setHost`)),s($e,`hostname`,et(`getHostname`,`setHostname`)),s($e,`port`,et(`getPort`,`setPort`)),s($e,`pathname`,et(`getPathname`,`setPathname`)),s($e,`search`,et(`getSearch`,`setSearch`)),s($e,`searchParams`,et(`getSearchParams`)),s($e,`hash`,et(`getHash`,`setHash`))),o($e,`toJSON`,function(){return x(this).serialize()},{enumerable:!0}),o($e,`toString`,function(){return x(this).serialize()},{enumerable:!0}),w){var tt=w.createObjectURL,nt=w.revokeObjectURL;tt&&o(Qe,`createObjectURL`,i(tt,w)),nt&&o(Qe,`revokeObjectURL`,i(nt,w))}return g(Qe,`URL`),e({global:!0,constructor:!0,forced:!n,sham:!t},{URL:Qe}),om}var zm;function Bm(){return zm||(zm=1,Rm()),am}Bm();var Vm={},Hm;function Um(){if(Hm)return Vm;Hm=1;var e=ca(),t=Kn();return e({target:`URL`,proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}}),Vm}Um();var Wm={},Gm;function Km(){return Gm||(Gm=1,Im()),Wm}Km();var qm={},Jm;function Ym(){if(Jm)return qm;Jm=1;var e=Wi(),t=jt(),n=fo(),r=Dm(),i=URLSearchParams,a=i.prototype,o=t(a.append),s=t(a.delete),c=t(a.forEach),l=t([].push),u=new i(`a=1&a=2&b=3`);return u.delete(`a`,1),u.delete(`b`,void 0),u+``!=`a=2`&&e(a,`delete`,function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&i===void 0)return s(this,e);var a=[];c(this,function(e,t){l(a,{key:t,value:e})}),r(t,1);for(var u=n(e),d=n(i),f=0,p=0,m=!1,h=a.length,g;f<h;)g=a[f++],m||g.key===u?(m=!0,s(this,g.key)):p++;for(;p<h;)g=a[p++],g.key===u&&g.value===d||o(this,g.key,g.value)},{enumerable:!0,unsafe:!0}),qm}Ym();var Xm={},Zm;function Qm(){if(Zm)return Xm;Zm=1;var e=Wi(),t=jt(),n=fo(),r=Dm(),i=URLSearchParams,a=i.prototype,o=t(a.getAll),s=t(a.has),c=new i(`a=1`);return(c.has(`a`,2)||!c.has(`a`,void 0))&&e(a,`has`,function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&i===void 0)return s(this,e);var a=o(this,e);r(t,1);for(var c=n(i),l=0;l<a.length;)if(a[l++]===c)return!0;return!1},{enumerable:!0,unsafe:!0}),Xm}Qm();var $m={},eh;function th(){if(eh)return $m;eh=1;var e=In(),t=jt(),n=Zo(),r=URLSearchParams.prototype,i=t(r.forEach);return e&&!(`size`in r)&&n(r,`size`,{get:function(){var e=0;return i(this,function(){e++}),e},configurable:!0,enumerable:!0}),$m}th();function nh(e,t,n){return(t=rh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rh(e){var t=ih(e,`string`);return typeof t==`symbol`?t:t+``}function ih(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ah=class{constructor(e,t){nh(this,`deviceId`,void 0),nh(this,`facing`,void 0),nh(this,`groupId`,void 0),nh(this,`label`,void 0),this.deviceId=e.deviceId,this.facing=t,this.groupId=e.groupId,this.label=e.label}},q={},oh,sh,ch,lh,uh=0,dh=[],fh=U,ph=fh.__b,mh=fh.__r,hh=fh.diffed,gh=fh.__c,_h=fh.unmount,vh=fh.__;function yh(e,t){fh.__h&&fh.__h(sh,e,uh||t),uh=0;var n=sh.__H||(sh.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function J(e){return uh=1,bh(Ih,e)}function bh(e,t,n){var r=yh(oh++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ih(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=sh,!sh.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};sh.__f=!0;var a=sh.shouldComponentUpdate,o=sh.componentWillUpdate;sh.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},sh.shouldComponentUpdate=i}return r.__N||r.__}function Y(e,t){var n=yh(oh++,3);!fh.__s&&Fh(n.__H,t)&&(n.__=e,n.u=t,sh.__H.__h.push(n))}function xh(e,t){var n=yh(oh++,4);!fh.__s&&Fh(n.__H,t)&&(n.__=e,n.u=t,sh.__h.push(n))}function Sh(e){return uh=5,wh(function(){return{current:e}},[])}function Ch(e,t,n){uh=6,xh(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function wh(e,t){var n=yh(oh++,7);return Fh(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Th(e,t){return uh=8,wh(function(){return e},t)}function Eh(e){var t=sh.context[e.__c],n=yh(oh++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(sh)),t.props.value):e.__}function Dh(e,t){fh.useDebugValue&&fh.useDebugValue(t?t(e):e)}function Oh(e){var t=yh(oh++,10),n=J();return t.__=e,sh.componentDidCatch||(sh.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function kh(){var e=yh(oh++,11);if(!e.__){for(var t=sh.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Ah(){for(var e;e=dh.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Nh),t.__h.some(Ph),t.__h=[]}catch(n){t.__h=[],fh.__e(n,e.__v)}}}fh.__b=function(e){sh=null,ph&&ph(e)},fh.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vh&&vh(e,t)},fh.__r=function(e){mh&&mh(e),oh=0;var t=(sh=e.__c).__H;t&&(ch===sh?(t.__h=[],sh.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Nh),t.__h.some(Ph),t.__h=[],oh=0)),ch=sh},fh.diffed=function(e){hh&&hh(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(dh.push(t)!==1&&lh===fh.requestAnimationFrame||((lh=fh.requestAnimationFrame)||Mh)(Ah)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),ch=sh=null},fh.__c=function(e,t){t.some(function(e){try{e.__h.some(Nh),e.__h=e.__h.filter(function(e){return!e.__||Ph(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],fh.__e(n,e.__v)}}),gh&&gh(e,t)},fh.unmount=function(e){_h&&_h(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Nh(e)}catch(e){t=e}}),n.__H=void 0,t&&fh.__e(t,n.__v))};var jh=typeof requestAnimationFrame==`function`;function Mh(e){var t,n=function(){clearTimeout(r),jh&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);jh&&(t=requestAnimationFrame(n))}function Nh(e){var t=sh,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),sh=t}function Ph(e){var t=sh;e.__c=e.__(),sh=t}function Fh(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ih(e,t){return typeof t==`function`?t(e):t}function Lh(e,t){for(var n in t)e[n]=t[n];return e}function Rh(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function zh(e,t){var n=t(),r=J({t:{__:n,u:t}}),i=r[0].t,a=r[1];return xh(function(){i.__=n,i.u=t,Bh(i)&&a({t:i})},[e,n,t]),Y(function(){return Bh(i)&&a({t:i}),e(function(){Bh(i)&&a({t:i})})},[e]),n}function Bh(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}var t,n}function Vh(e){e()}function Hh(e){return e}function Uh(){return[!1,Vh]}var Wh=xh;function Gh(e,t){this.props=e,this.context=t}function Kh(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Rh(this.props,e)}function r(t){return this.shouldComponentUpdate=n,kc(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Gh.prototype=new Nc).isPureReactComponent=!0,Gh.prototype.shouldComponentUpdate=function(e,t){return Rh(this.props,e)||Rh(this.state,t)};var qh=U.__b;U.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),qh&&qh(e)};var Jh=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function Yh(e){function t(t){var n=Lh({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Jh,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var Xh=function(e,t){return e==null?null:Hc(Hc(e).map(t))},Zh={map:Xh,forEach:Xh,count:function(e){return e?Hc(e).length:0},only:function(e){var t=Hc(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:Hc},Qh=U.__e;U.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Qh(e,t,n,r)};var $h=U.unmount;function eg(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Lh({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return eg(e,t,n)})),e}function tg(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return tg(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ng(){this.__u=0,this.o=null,this.__b=null}function rg(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ig(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?kc(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function ag(){this.i=null,this.l=null}U.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),$h&&$h(e)},(ng.prototype=new Nc).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=rg(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=tg(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ng.prototype.componentWillUnmount=function(){this.o=[]},ng.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=eg(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&kc(Mc,null,e.fallback);return i&&(i.__u&=-33),[kc(Mc,null,t.__a?null:e.children),i]};var og=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function sg(e){return this.getChildContext=function(){return e.context},e.children}function cg(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){tl(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}tl(kc(sg,{context:t.context},e.__v),t.v)}function lg(e,t){var n=kc(cg,{__v:e,h:t});return n.containerInfo=t,n}(ag.prototype=new Nc).__a=function(e){var t=this,n=rg(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),og(t,e,r)):i()};n?n(a):a()}},ag.prototype.render=function(e){this.i=null,this.l=new Map;var t=Hc(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ag.prototype.componentDidUpdate=ag.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){og(e,n,t)})};var ug=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,dg=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,fg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,pg=/[A-Z0-9]/g,mg=typeof document<`u`,hg=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};function gg(e,t,n){return t.__k==null&&(t.textContent=``),tl(e,t),typeof n==`function`&&n(),e?e.__c:null}function _g(e,t,n){return nl(e,t),typeof n==`function`&&n(),e?e.__c:null}Nc.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(Nc.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var vg=U.event;function yg(){}function bg(){return this.cancelBubble}function xg(){return this.defaultPrevented}U.event=function(e){return vg&&(e=vg(e)),e.persist=yg,e.isPropagationStopped=bg,e.isDefaultPrevented=xg,e.nativeEvent=e};var Sg,Cg={enumerable:!1,configurable:!0,get:function(){return this.class}},wg=U.vnode;U.vnode=function(e){typeof e.type==`string`&&(function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||mg&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&o===!0?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||hg(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:fg.test(a)&&(a=s):s=a=`oninput`:i&&dg.test(a)?a=a.replace(pg,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=Hc(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=Hc(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Cg)):t.className&&(r.class=r.className=t.className),e.props=r})(e),e.$$typeof=ug,wg&&wg(e)};var Tg=U.__r;U.__r=function(e){Tg&&Tg(e),Sg=e.__c};var Eg=U.diffed;U.diffed=function(e){Eg&&Eg(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),Sg=null};var Dg={ReactCurrentDispatcher:{current:{readContext:function(e){return Sg.__n[e.__c].props.value},useCallback:Th,useContext:Eh,useDebugValue:Dh,useDeferredValue:Hh,useEffect:Y,useId:kh,useImperativeHandle:Ch,useInsertionEffect:Wh,useLayoutEffect:xh,useMemo:wh,useReducer:bh,useRef:Sh,useState:J,useSyncExternalStore:zh,useTransition:Uh}}},Og=`18.3.1`;function kg(e){return kc.bind(null,e)}function Ag(e){return!!e&&e.$$typeof===ug}function jg(e){return Ag(e)&&e.type===Mc}function Mg(e){return!!e&&typeof e.displayName==`string`&&e.displayName.startsWith(`Memo(`)}function Ng(e){return Ag(e)?rl.apply(null,arguments):e}function Pg(e){return!!e.__k&&(tl(null,e),!0)}function Fg(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ig=function(e,t){return e(t)},Lg=function(e,t){return e(t)},Rg=Mc,zg=Ag,X={useState:J,useId:kh,useReducer:bh,useEffect:Y,useLayoutEffect:xh,useInsertionEffect:Wh,useTransition:Uh,useDeferredValue:Hh,useSyncExternalStore:zh,startTransition:Vh,useRef:Sh,useImperativeHandle:Ch,useMemo:wh,useCallback:Th,useContext:Eh,useDebugValue:Dh,version:`18.3.1`,Children:Zh,render:gg,hydrate:_g,unmountComponentAtNode:Pg,createPortal:lg,createElement:kc,createContext:il,createFactory:kg,cloneElement:Ng,createRef:jc,Fragment:Mc,isValidElement:Ag,isElement:zg,isFragment:jg,isMemo:Mg,findDOMNode:Fg,Component:Nc,PureComponent:Gh,memo:Kh,forwardRef:Yh,flushSync:Lg,unstable_batchedUpdates:Ig,StrictMode:Rg,Suspense:ng,SuspenseList:ag,lazy:ig,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Dg},Bg=it(Object.freeze(Object.defineProperty({__proto__:null,Children:Zh,Component:Nc,Fragment:Mc,PureComponent:Gh,StrictMode:Rg,Suspense:ng,SuspenseList:ag,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Dg,cloneElement:Ng,createContext:il,createElement:kc,createFactory:kg,createPortal:lg,createRef:jc,default:X,findDOMNode:Fg,flushSync:Lg,forwardRef:Yh,hydrate:_g,isElement:zg,isFragment:jg,isMemo:Mg,isValidElement:Ag,lazy:ig,memo:Kh,render:gg,startTransition:Vh,unmountComponentAtNode:Pg,unstable_batchedUpdates:Ig,useCallback:Th,useContext:Eh,useDebugValue:Dh,useDeferredValue:Hh,useEffect:Y,useErrorBoundary:Oh,useId:kh,useImperativeHandle:Ch,useInsertionEffect:Wh,useLayoutEffect:xh,useMemo:wh,useReducer:bh,useRef:Sh,useState:J,useSyncExternalStore:zh,useTransition:Uh,version:Og},Symbol.toStringTag,{value:`Module`}))),Vg={exports:{}},Hg=Vg.exports,Ug;function Wg(){return Ug||(Ug=1,(function(e,t){(function(n,r){var i=`1.0.41`,a=``,o=`function`,s=`undefined`,c=`object`,l=`string`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C=`Amazon`,w=`Apple`,T=`ASUS`,E=`BlackBerry`,D=`Browser`,O=`Chrome`,k=`Edge`,A=`Firefox`,j=`Google`,M=`Honor`,N=`Huawei`,P=`Lenovo`,F=`LG`,I=`Microsoft`,L=`Motorola`,ee=`Nvidia`,te=`OnePlus`,ne=`Opera`,R=`OPPO`,re=`Samsung`,ie=`Sharp`,ae=`Sony`,oe=`Xiaomi`,se=`Zebra`,ce=`Facebook`,le=`Chromium OS`,ue=`Mac OS`,de=` Browser`,fe=function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},pe=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},z=function(e,t){return typeof e==l&&me(t).indexOf(me(e))!==-1},me=function(e){return e.toLowerCase()},he=function(e){return typeof e==l?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},ge=function(e,t){if(typeof e==l)return e=e.replace(/^\s\s*/,a),typeof t===s?e:e.substring(0,500)},_e=function(e,t){for(var n=0,i,a,s,l,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(s=0;s<p.length;s++)d=u[++a],l=p[s],typeof l==c&&l.length>0?l.length===2?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:l.length===3?typeof l[1]==o&&!(l[1].exec&&l[1].test)?this[l[0]]=d?l[1].call(this,d,l[2]):r:this[l[0]]=d?d.replace(l[1],l[2]):r:l.length===4&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;n+=2}},ve=function(e,t){for(var n in t)if(typeof t[n]==c&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(z(t[n][i],e))return n===`?`?r:n}else if(z(t[n],e))return n===`?`?r:n;return t.hasOwnProperty(`*`)?t[`*`]:e},ye={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},be={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`},xe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[f,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[f,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,h],[/opios[\/ ]+([\w\.]+)/i],[h,[f,ne+` Mini`]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[f,ne+` GX`]],[/\bopr\/([\w\.]+)/i],[h,[f,ne]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[f,`Baidu`]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[f,`Maxthon`]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[f,`Quark`]],[/\bddg\/([\w\.]+)/i],[h,[f,`DuckDuckGo`]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[f,`UC`+D]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[f,`WeChat`]],[/konqueror\/([\w\.]+)/i],[h,[f,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[f,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[f,`Yandex`]],[/slbrowser\/([\w\.]+)/i],[h,[f,`Smart Lenovo `+D]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,`$1 Secure `+D],h],[/\bfocus\/([\w\.]+)/i],[h,[f,A+` Focus`]],[/\bopt\/([\w\.]+)/i],[h,[f,ne+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[h,[f,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[h,[f,`Dolphin`]],[/coast\/([\w\.]+)/i],[h,[f,ne+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI`+de]],[/fxios\/([\w\.-]+)/i],[h,[f,A]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[f,`360`]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,`$1Browser`],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,`$1`+de],h],[/samsungbrowser\/([\w\.]+)/i],[h,[f,re+` Internet`]],[/metasr[\/ ]?([\d\.]+)/i],[h,[f,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,`Sogou Mobile`],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,ce],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[f,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[f,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[f,O+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,O+` WebView`],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[f,`Android `+D]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[h,ve,ye]],[/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,`Netscape`],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[f,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[f,A+` Reality`]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[f,[h,/_/g,`.`]],[/(cobalt)\/([\w\.]+)/i],[f,[h,/master.|lts./,``]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[g,`amd64`]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[g,`ia32`]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[g,`arm64`]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[g,`armhf`]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[g,`arm`]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[g,/ower/,a,me]],[/ sun4\w[;\)]/i],[[g,`sparc`]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[g,me]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[m,re],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,re],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,w],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,w],[p,y]],[/(macintosh);/i],[d,[m,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,ie],[p,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,M],[p,y]],[/honor([-\w ]+)[;\)]/i],[d,[m,M],[p,v]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,N],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,N],[p,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g,` `],[m,oe],[p,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g,` `],[m,oe],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,R],[p,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,ve,{OnePlus:[`304`,`403`,`203`],"*":R}],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,`Vivo`],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,`Realme`],[p,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,L],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,L],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,F],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,F],[p,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,P],[p,y]],[/(nokia) (t[12][01])/i],[m,d,[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g,` `],[p,v],[m,`Nokia`]],[/(pixel (c|tablet))\b/i],[d,[m,j],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,j],[p,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[m,ae],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,`Xperia Tablet`],[m,ae],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,te],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,C],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,`Fire Phone $1`],[m,C],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,E],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,T],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,T],[p,v]],[/(nexus 9)/i],[d,[m,`HTC`],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g,` `],[p,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[m,`TCL`],[p,y]],[/(itel) ((\w+))/i],[[m,me],d,[p,ve,{tablet:[`p10001l`,`w7001`],"*":`mobile`}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,`Acer`],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,`Meizu`],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,`Ulefone`],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,`Energizer`],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,`Cat`],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,`Smartfren`],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,`Nothing`],[p,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,`Archos`],[p,y]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,`Archos`],[p,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[p,v]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,d,[p,y]],[/(surface duo)/i],[d,[m,I],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,`Fairphone`],[p,v]],[/(u304aa)/i],[d,[m,`AT&T`],[p,v]],[/\bsie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/\b(rct\w+) b/i],[d,[m,`RCA`],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,`Dell`],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,`Verizon`],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,`Barnes & Noble`],[p,y]],[/\b(tm\d{3}\w+) b/i],[d,[m,`NuVision`],[p,y]],[/\b(k88) b/i],[d,[m,`ZTE`],[p,y]],[/\b(nx\d{3}j) b/i],[d,[m,`ZTE`],[p,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,`Swiss`],[p,v]],[/\b(zur\d{3}) b/i],[d,[m,`Swiss`],[p,y]],[/\b((zeki)?tb.*\b) b/i],[d,[m,`Zeki`],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,`Dragon Touch`],d,[p,y]],[/\b(ns-?\w{0,9}) b/i],[d,[m,`Insignia`],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,`NextBook`],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,`Voice`],d,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,`LvTel`],d,[p,v]],[/\b(ph-1) /i],[d,[m,`Essential`],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,`Envizen`],[p,y]],[/\b(trio[-\w\. ]+) b/i],[d,[m,`MachSpeed`],[p,y]],[/\btu_(1491) b/i],[d,[m,`Rotor`],[p,y]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,ee],[p,y]],[/(sprint) (\w+)/i],[m,d,[p,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,I],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,se],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,se],[p,v]],[/smart-tv.+(samsung)/i],[m,[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,re],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,F],[p,b]],[/(apple) ?tv/i],[m,[d,w+` TV`],[p,b]],[/crkey/i],[[d,O+`cast`],[m,j],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,C],[p,b]],[/(shield \w+ tv)/i],[d,[m,ee],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,ie],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,ae],[p,b]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,oe],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,ge],[d,ge],[p,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[p,_]],[/droid.+; (shield)( bui|\))/i],[d,[m,ee],[p,_]],[/(playstation \w+)/i],[d,[m,ae],[p,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,I],[p,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,re],[p,x]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[p,x]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,R],[p,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,w],[p,x]],[/(opwwe\d{3})/i],[d,[m,te],[p,x]],[/(moto 360)/i],[d,[m,L],[p,x]],[/(smartwatch 3)/i],[d,[m,ae],[p,x]],[/(g watch r)/i],[d,[m,F],[p,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,se],[p,x]],[/droid.+; (glass) \d/i],[d,[m,j],[p,x]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[p,x]],[/; (quest( \d| pro)?)/i],[d,[m,ce],[p,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,S]],[/(aeobc)\b/i],[d,[m,C],[p,S]],[/(homepod).+mac os/i],[d,[m,w],[p,S]],[/windows iot/i],[[p,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[f,k+`HTML`]],[/(arkweb)\/([\w\.]+)/i],[f,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[f,`Blink`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,h],[/ladybird\//i],[[f,`LibWeb`]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[f,[h,ve,be]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,ve,be],[f,`Windows`]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,ue],[h,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,f],[/(ubuntu) ([\w\.]+) like android/i],[[f,/(.+)/,`$1 Touch`],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[f,h],[/\(bb(10);/i],[h,[f,E]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[f,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[f,A+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[f,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[f,`watchOS`]],[/crkey\/([\d\.]+)/i],[h,[f,O+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,le],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,h],[/(sunos) ?([\w\.\d]*)/i],[[f,`Solaris`],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,h]]},Se=function(e,t){if(typeof e==c&&(t=e,e=r),!(this instanceof Se))return new Se(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,_=e||(i&&i.userAgent?i.userAgent:a),b=i&&i.userAgentData?i.userAgentData:r,x=t?fe(xe,t):xe,S=i&&i.userAgent==_;return this.getBrowser=function(){var e={};return e[f]=r,e[h]=r,_e.call(e,_,x.browser),e[u]=he(e[h]),S&&i&&i.brave&&typeof i.brave.isBrave==o&&(e[f]=`Brave`),e},this.getCPU=function(){var e={};return e[g]=r,_e.call(e,_,x.cpu),e},this.getDevice=function(){var e={};return e[m]=r,e[d]=r,e[p]=r,_e.call(e,_,x.device),S&&!e[p]&&b&&b.mobile&&(e[p]=v),S&&e[d]==`Macintosh`&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[d]=`iPad`,e[p]=y),e},this.getEngine=function(){var e={};return e[f]=r,e[h]=r,_e.call(e,_,x.engine),e},this.getOS=function(){var e={};return e[f]=r,e[h]=r,_e.call(e,_,x.os),S&&!e[f]&&b&&b.platform&&b.platform!=`Unknown`&&(e[f]=b.platform.replace(/chrome os/i,le).replace(/macos/i,ue)),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 _},this.setUA=function(e){return _=typeof e==l&&e.length>500?ge(e,500):e,this},this.setUA(_),this};Se.VERSION=i,Se.BROWSER=pe([f,h,u]),Se.CPU=pe([g]),Se.DEVICE=pe([d,m,p,_,v,b,y,x,S]),Se.ENGINE=Se.OS=pe([f,h]),e.exports&&(t=e.exports=Se),t.UAParser=Se;var Ce=typeof n!==s&&(n.jQuery||n.Zepto);if(Ce&&!Ce.ua){var we=new Se;Ce.ua=we.getResult(),Ce.ua.get=function(){return we.getUA()},Ce.ua.set=function(e){we.setUA(e);var t=we.getResult();for(var n in t)Ce.ua[n]=t[n]}}})(typeof window==`object`?window:Hg)})(Vg,Vg.exports)),Vg.exports}var Gg;function Kg(){if(Gg)return q;Gg=1,Object.defineProperty(q,"__esModule",{value:!0});function e(e){return e&&typeof e==`object`&&`default`in e?e.default:e}var t=Bg,n=e(t),r=Wg(),i=new r,a=i.getBrowser(),o=i.getCPU(),s=i.getDevice(),c=i.getEngine(),l=i.getOS(),u=i.getUA(),d=function(e){return i.setUA(e)},f=function(e){if(!e)console.error(`No userAgent string was provided`);else{var t=new r(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},p=Object.freeze({ClientUAInstance:i,browser:a,cpu:o,device:s,engine:c,os:l,ua:u,setUa:d,parseUserAgent:f});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?m(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&v(e.prototype,t),e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(){return x=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},x.apply(this,arguments)}function S(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function T(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function E(e,t){if(e==null)return{};var n=T(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function O(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return D(e)}function k(e,t){return A(e)||j(e,t)||M(e,t)||P()}function A(e){if(Array.isArray(e))return e}function j(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function M(e,t){if(e){if(typeof e==`string`)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}}function N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
6
6
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F={Mobile:`mobile`,Tablet:`tablet`,SmartTv:`smarttv`,Console:`console`,Wearable:`wearable`,Embedded:`embedded`,Browser:void 0},I={Chrome:`Chrome`,Firefox:`Firefox`,Opera:`Opera`,Yandex:`Yandex`,Safari:`Safari`,InternetExplorer:`Internet Explorer`,Edge:`Edge`,Chromium:`Chromium`,Ie:`IE`,MobileSafari:`Mobile Safari`,EdgeChromium:`Edge Chromium`,MIUI:`MIUI Browser`,SamsungBrowser:`Samsung Browser`},L={IOS:`iOS`,Android:`Android`,WindowsPhone:`Windows Phone`,Windows:`Windows`,MAC_OS:`Mac OS`},ee={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},te=function(e){switch(e){case F.Mobile:return{isMobile:!0};case F.Tablet:return{isTablet:!0};case F.SmartTv:return{isSmartTV:!0};case F.Console:return{isConsole:!0};case F.Wearable:return{isWearable:!0};case F.Browser:return{isBrowser:!0};case F.Embedded:return{isEmbedded:!0};default:return ee}},ne=function(e){return d(e)},R=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`none`;return e||t},re=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1},ie=function(e){var t=re();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)},ae=function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:R(t.major),browserFullVersion:R(t.version),browserName:R(t.name),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(i)}},oe=function(e,t,n,r){return h({},e,{vendor:R(t.vendor),model:R(t.model),os:R(n.name),osVersion:R(n.version),ua:R(r)})},se=function(e,t,n,r){return{isSmartTV:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}},ce=function(e,t,n,r){return{isConsole:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}},le=function(e,t,n,r){return{isWearable:e,engineName:R(t.name),engineVersion:R(t.version),osName:R(n.name),osVersion:R(n.version),userAgent:R(r)}},ue=function(e,t,n,r,i){return{isEmbedded:e,vendor:R(t.vendor),model:R(t.model),engineName:R(n.name),engineVersion:R(n.version),osName:R(r.name),osVersion:R(r.version),userAgent:R(i)}};function de(e){var t=e?f(e):p,n=t.device,r=t.browser,i=t.engine,a=t.os,o=t.ua,s=te(n.type),c=s.isBrowser,l=s.isMobile,u=s.isTablet,d=s.isSmartTV,m=s.isConsole,h=s.isWearable,g=s.isEmbedded;if(c)return ae(c,r,i,a,o);if(d)return se(d,i,a,o);if(m)return ce(m,i,a,o);if(l||u)return oe(s,n,a,o);if(h)return le(h,i,a,o);if(g)return ue(g,n,i,a,o)}var fe=function(e){return e.type===F.Mobile},pe=function(e){return e.type===F.Tablet},z=function(e){var t=e.type;return t===F.Mobile||t===F.Tablet},me=function(e){return e.type===F.SmartTv},he=function(e){return e.type===F.Browser},ge=function(e){return e.type===F.Wearable},_e=function(e){return e.type===F.Console},ve=function(e){return e.type===F.Embedded},ye=function(e){var t=e.vendor;return R(t)},be=function(e){var t=e.model;return R(t)},xe=function(e){var t=e.type;return R(t,`browser`)},Se=function(e){return e.name===L.Android},Ce=function(e){return e.name===L.Windows},we=function(e){return e.name===L.MAC_OS},Te=function(e){return e.name===L.WindowsPhone},Ee=function(e){return e.name===L.IOS},De=function(e){var t=e.version;return R(t)},Oe=function(e){var t=e.name;return R(t)},ke=function(e){return e.name===I.Chrome},Ae=function(e){return e.name===I.Firefox},je=function(e){return e.name===I.Chromium},Me=function(e){return e.name===I.Edge},Ne=function(e){return e.name===I.Yandex},Pe=function(e){var t=e.name;return t===I.Safari||t===I.MobileSafari},Fe=function(e){return e.name===I.MobileSafari},Ie=function(e){return e.name===I.Opera},Le=function(e){var t=e.name;return t===I.InternetExplorer||t===I.Ie},Re=function(e){return e.name===I.MIUI},ze=function(e){return e.name===I.SamsungBrowser},Be=function(e){var t=e.version;return R(t)},Ve=function(e){var t=e.major;return R(t)},He=function(e){var t=e.name;return R(t)},Ue=function(e){var t=e.name;return R(t)},We=function(e){var t=e.version;return R(t)},Ge=function(){var e=re(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof t==`string`&&/electron/.test(t)},Ke=function(e){return typeof e==`string`&&e.indexOf(`Edg/`)!==-1},qe=function(){var e=re();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Je=function(){return ie(`iPad`)},Ye=function(){return ie(`iPhone`)},B=function(){return ie(`iPod`)},Xe=function(e){return R(e)};function Ze(e){var t=e||p,n=t.device,r=t.browser,i=t.os,a=t.engine,o=t.ua;return{isSmartTV:me(n),isConsole:_e(n),isWearable:ge(n),isEmbedded:ve(n),isMobileSafari:Fe(r)||Je(),isChromium:je(r),isMobile:z(n)||Je(),isMobileOnly:fe(n),isTablet:pe(n)||Je(),isBrowser:he(n),isDesktop:he(n),isAndroid:Se(i),isWinPhone:Te(i),isIOS:Ee(i)||Je(),isChrome:ke(r),isFirefox:Ae(r),isSafari:Pe(r),isOpera:Ie(r),isIE:Le(r),osVersion:De(i),osName:Oe(i),fullBrowserVersion:Be(r),browserVersion:Ve(r),browserName:He(r),mobileVendor:ye(n),mobileModel:be(n),engineName:Ue(a),engineVersion:We(a),getUA:Xe(o),isEdge:Me(r)||Ke(o),isYandex:Ne(r),deviceType:xe(n),isIOS13:qe(),isIPad13:Je(),isIPhone13:Ye(),isIPod13:B(),isElectron:Ge(),isEdgeChromium:Ke(o),isLegacyEdge:Me(r)&&!Ke(o),isWindows:Ce(i),isMacOs:we(i),isMIUI:Re(r),isSamsungBrowser:ze(r)}}var V=me(s),Qe=_e(s),$e=ge(s),et=ve(s),tt=Fe(a)||Je(),nt=je(a),rt=z(s)||Je(),it=fe(s),at=pe(s)||Je(),ot=he(s),st=he(s),H=Se(l),ct=Te(l),lt=Ee(l)||Je(),ut=ke(a),dt=Ae(a),ft=Pe(a),pt=Ie(a),mt=Le(a),ht=De(l),gt=Oe(l),_t=Be(a),vt=Ve(a),yt=He(a),bt=ye(s),xt=be(s),St=Ue(c),Ct=We(c),wt=Xe(u),Tt=Me(a)||Ke(u),Et=Ne(a),Dt=xe(s),Ot=qe(),kt=Je(),At=Ye(),jt=B(),Mt=Ge(),Nt=Ke(u),Pt=Me(a)&&!Ke(u),Ft=Ce(l),It=we(l),Lt=Re(a),Rt=ze(a),zt=function(e){if(!e||typeof e!=`string`)console.error(`No valid user agent string was provided`);else{var t=f(e),n=t.device,r=t.browser,i=t.os,a=t.engine,o=t.ua;return Ze({device:n,browser:r,os:i,engine:a,ua:o})}},Bt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return H?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Vt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return ot?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Ht=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return mt?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Ut=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return lt?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Wt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return rt?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Gt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return at?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Kt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return ct?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},qt=function(e){var r=e.renderWithFragment,i=e.children;e.viewClassName,e.style;var a=E(e,[`renderWithFragment`,`children`,`viewClassName`,`style`]);return it?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Jt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return V?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Yt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return Qe?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Xt=function(e){var r=e.renderWithFragment,i=e.children,a=E(e,[`renderWithFragment`,`children`]);return $e?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,a,i):null},Zt=function(e){var r=e.renderWithFragment,i=e.children;e.viewClassName,e.style;var a=e.condition,o=E(e,[`renderWithFragment`,`children`,`viewClassName`,`style`,`condition`]);return a?r?n.createElement(t.Fragment,null,i):n.createElement(`div`,o,i):null};function Qt(e){return(function(t){S(r,t);function r(e){var t;return _(this,r),t=O(this,C(r).call(this,e)),t.isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(D(t)),t.onOrientationChange=t.onOrientationChange.bind(D(t)),t.onPageLoad=t.onPageLoad.bind(D(t)),t.state={isLandscape:!1,isPortrait:!1},t}return y(r,[{key:`handleOrientationChange`,value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:e===0,isLandscape:e===90})}},{key:`onOrientationChange`,value:function(){this.handleOrientationChange()}},{key:`onPageLoad`,value:function(){this.handleOrientationChange()}},{key:`componentDidMount`,value:function(){(typeof window>`u`?`undefined`:g(window))!==void 0&&rt&&(this.isEventListenerAdded?window.removeEventListener(`load`,this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener(`load`,this.onPageLoad,!1)),window.addEventListener(`resize`,this.onOrientationChange,!1))}},{key:`componentWillUnmount`,value:function(){window.removeEventListener(`resize`,this.onOrientationChange,!1)}},{key:`render`,value:function(){return n.createElement(e,x({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),r})(n.Component)}function $t(){var e=k(t.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:e===0,isLandscape:e===90,orientation:e===0?`portrait`:`landscape`}}),2),n=e[0],r=e[1],i=t.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:e===0,isLandscape:e===90,orientation:e===0?`portrait`:`landscape`};n.orientation!==t.orientation&&r(t)},[n.orientation]);return t.useEffect(function(){return(typeof window>`u`?`undefined`:g(window))!==void 0&&rt&&(i(),window.addEventListener(`load`,i,!1),window.addEventListener(`resize`,i,!1)),function(){window.removeEventListener(`resize`,i,!1),window.removeEventListener(`load`,i,!1)}},[i]),n}function en(e){return f(e||window.navigator.userAgent)}function tn(e){var t=en(e||window.navigator.userAgent);return[Ze(t),t]}return q.AndroidView=Bt,q.BrowserTypes=I,q.BrowserView=Vt,q.ConsoleView=Yt,q.CustomView=Zt,q.IEView=Ht,q.IOSView=Ut,q.MobileOnlyView=qt,q.MobileView=Wt,q.OsTypes=L,q.SmartTVView=Jt,q.TabletView=Gt,q.WearableView=Xt,q.WinPhoneView=Kt,q.browserName=yt,q.browserVersion=vt,q.deviceDetect=de,q.deviceType=Dt,q.engineName=St,q.engineVersion=Ct,q.fullBrowserVersion=_t,q.getSelectorsByUserAgent=zt,q.getUA=wt,q.isAndroid=H,q.isBrowser=ot,q.isChrome=ut,q.isChromium=nt,q.isConsole=Qe,q.isDesktop=st,q.isEdge=Tt,q.isEdgeChromium=Nt,q.isElectron=Mt,q.isEmbedded=et,q.isFirefox=dt,q.isIE=mt,q.isIOS=lt,q.isIOS13=Ot,q.isIPad13=kt,q.isIPhone13=At,q.isIPod13=jt,q.isLegacyEdge=Pt,q.isMIUI=Lt,q.isMacOs=It,q.isMobile=rt,q.isMobileOnly=it,q.isMobileSafari=tt,q.isOpera=pt,q.isSafari=ft,q.isSamsungBrowser=Rt,q.isSmartTV=V,q.isTablet=at,q.isWearable=$e,q.isWinPhone=ct,q.isWindows=Ft,q.isYandex=Et,q.mobileModel=xt,q.mobileVendor=bt,q.osName=gt,q.osVersion=ht,q.parseUserAgent=f,q.setUserAgent=ne,q.useDeviceData=en,q.useDeviceSelectors=tn,q.useMobileOrientation=$t,q.withOrientationChange=Qt,q}var qg=Kg(),Jg=[];for(let e=0;e<256;++e)Jg.push((e+256).toString(16).slice(1));function Yg(e,t=0){return(Jg[e[t+0]]+Jg[e[t+1]]+Jg[e[t+2]]+Jg[e[t+3]]+`-`+Jg[e[t+4]]+Jg[e[t+5]]+`-`+Jg[e[t+6]]+Jg[e[t+7]]+`-`+Jg[e[t+8]]+Jg[e[t+9]]+`-`+Jg[e[t+10]]+Jg[e[t+11]]+Jg[e[t+12]]+Jg[e[t+13]]+Jg[e[t+14]]+Jg[e[t+15]]).toLowerCase()}var Xg=new Uint8Array(16);function Zg(){return crypto.getRandomValues(Xg)}function Qg(e,t,n){return crypto.randomUUID?crypto.randomUUID():$g(e)}function $g(e,t,n){var r,i,a;e=e||{};let o=(a=(i=e.random)==null?(r=e.rng)==null?void 0:r.call(e):i)==null?Zg():a;if(o.length<16)throw Error(`Random bytes length must be >= 16`);return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Yg(o)}var e_=e=>{switch(e){case``:case`true`:return!0;case`false`:return!1;default:return}};function t_(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=[...t];return r.length===0?function(e){return e}:r.length===1?r[0]:r.reduce(function(e,t){return function(){return e(t(...arguments))}})}function n_(e,t,n,r,i,a,o,s,c){let l=e/t,u=n/r,d=(c===sp.contain?u<l:u>l)?e/n:t/r,f=(e/d-n)/2,p=(t/d-r)/2,m=Math.round(i/d),h=Math.round(a/d),g=Math.round(o/d-f);return{width:m,height:h,left:g,right:Math.round(n-(g+m)),top:Math.round(s/d-p)}}function r_(e,t){return new CustomEvent(e,{bubbles:!0,composed:!0,detail:t})}function i_(){return V(this,null,function*(){let e=(yield navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`videoinput`);return{videoDevices:e,isCameraAllowed:e.every(e=>e.label!==``)}})}function a_(e,t){let n=e.toLowerCase();return t.some(e=>n.includes(e))}function o_(e){return V(this,null,function*(){let t={frontCameras:[],backCameras:[]},n=e.videoDevices;if(!e.isCameraAllowed){let e=yield navigator.mediaDevices.getUserMedia({video:!0,audio:!1});n=(yield navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`videoinput`),e.getTracks().forEach(e=>e.stop())}for(let e of n)a_(e.label,bp)?t.backCameras.push(new ah(e,op.environment)):t.frontCameras.push(new ah(e,op.user));return t})}function s_(e,t,n){let r=[...t.frontCameras,...t.backCameras];if(!r.length)return{deviceId:``,facing:void 0,groupId:``,label:``};if(n)return r.find(e=>e.deviceId===n)||{deviceId:``,facing:void 0,groupId:``,label:``};if(e===op.environment&&t.backCameras.length){let e=t.backCameras.map(e=>{let t=e.label.match(/\b([0-9]+)MP?\b/i);return t===null?NaN:parseInt(t[1],10)});if(e.every(e=>!isNaN(e))){let n=e.lastIndexOf(Math.max(...e));return t.backCameras[n]}return qg.isIOS?{deviceId:``,facing:op.environment,groupId:``,label:``}:t.backCameras.sort((e,t)=>e.label.localeCompare(t.label))[0]}return{deviceId:``,facing:op.user,groupId:``,label:``}}var c_=e=>{e.getTracks().forEach(e=>e.stop())};function l_(e,t,n){return V(this,null,function*(){let r={status:ap.PREPARING,stream:null,camera:{deviceId:``,facing:void 0,groupId:``,label:``}};if(!navigator.mediaDevices)return r.status=ap.NOT_SUPPORTED,r;if(!t.deviceId&&!t.facing)return n?(r.status=ap.INCORRECT_CAMERA_ID,r):(r.status=ap.NO_CAMERA,r);try{let n=e.width>vp?yp.FULL_HD.width:e.width,r=e.height>vp?yp.FULL_HD.height:e.height,i={ideal:n},a={ideal:r};qg.isFirefox&&qg.browserVersion>=`145`&&(i.min=n,a.min=r);let o={width:i,height:a,frameRate:{ideal:30}};t.deviceId?o.deviceId={exact:t.deviceId}:o.facingMode={ideal:t.facing};let s=yield navigator.mediaDevices.getUserMedia({video:o,audio:!1}),c=s.getVideoTracks()[0],{deviceId:l,groupId:u,facingMode:d}=c.getSettings(),f={deviceId:l||t.deviceId,label:c.label||t.label,groupId:u||t.groupId,facing:d||t.facing};return{status:ap.READY,stream:s,camera:f}}catch(e){return r.status=ap.UNKNOWN_ERROR,r}})}function u_(e,t){let n=[...e.frontCameras,...e.backCameras];return n[(n.findIndex(e=>e.deviceId===t)+1)%n.length].deviceId}function d_(e,t){let n=e=>typeof e==`object`&&!!e&&!Array.isArray(e),r=Object.assign({},e);if(n(e)&&n(t))for(let i of Object.keys(t)){let a=e[i],o=t[i];r[i]=n(o)?a===void 0?o:d_(a,o):o}return r}function f_(e){return V(this,null,function*(){return new Promise(t=>setTimeout(t,e))})}var p_=e=>{let t;try{var n;t=(n=window.localStorage.getItem(e))==null?Qg():n,window.localStorage.setItem(e,t)}catch(e){t=Qg()}return t},m_=()=>[`localhost`,`127.0.0.1`,``,`::1`].includes(window.location.hostname),h_=()=>!m_()&&window.location.protocol===`http:`,g_=()=>{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}},__=e=>V(null,null,function*(){var t;let{cameras:n,cameraID:r,sdkVersion:i,serviceUrl:a,customMetadata:o}=e,s=navigator,c=qg.osName,l=qg.osVersion,u=null;if((t=s.userAgentData)!=null&&t.getHighEntropyValues)try{var d,f;let e=yield s.userAgentData.getHighEntropyValues([`platform`,`platformVersion`]);c=String((d=(f=e.platform)==null?s.userAgentData.platform:f)==null?qg.osName:d),l=e.platformVersion?String(e.platformVersion):qg.osVersion,u=e}catch(e){u=null}let p={platform:`Web`,osVersion:`${l}`,sdkVersion:i,hostAppId:g_(),userID:p_(Sp),deviceModel:`${c}/${l} ${qg.browserName}/${qg.fullBrowserVersion}`,hostAppVersion:`${qg.browserName}/${qg.fullBrowserVersion}`};if(u&&(p.rawCH=u),n&&(p.cameraState=n.map(e=>({cameraID:e.deviceId,label:e.label,groupId:e.groupId,facing:e.facing===op.user?`front`:`back`}))),a&&(p.serviceUrl=a),r&&(p.currentCameraInfo={cameraID:r}),s){p.rawUA=s.userAgent;let e=s.deviceMemory;typeof e==`number`&&(p.ramTotalGB=e)}return o&&o instanceof Object&&Object.keys(o).length>0&&(p.customMetadata=o),p});function v_(e,t,n){return(t=y_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y_(e){var t=b_(e,`string`);return typeof t==`symbol`?t:t+``}function b_(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var x_=new class{constructor(){v_(this,`_levels`,[]),v_(this,`_transports`,[]),v_(this,`_logs`,[]),v_(this,`_prevTime`,0),v_(this,`logListener`,null);try{if(!window.localStorage)return;let e=window.localStorage.getItem(`logger`);if(!e)return;let[t,n]=e.split(`>`);this._levels=t.split(`,`),n&&(this._transports=n.split(`,`))}catch(e){return}}create(e,t){return n=>{if(!this._levels.includes(e)&&!this._levels.includes(`all`)&&!this.logListener)return;let r=Date.now(),i=0;if(this._prevTime&&(i=r-this._prevTime),this._prevTime=r,this.logListener&&this.logListener(`${e}: ${n} +${i}ms`),this._transports.includes(`console`)){let r=(t==null?void 0:t.color)||`blue`;console.log(`%c%s: %c%s %c+%dms`,`color: ${r};`,e,``,n,`color: ${r};`,i)}this._transports.includes(`file`)&&this._logs.push(`${e}: ${n} +${i}ms`)}}saveLogs(){if(!this._logs.length)return;let e=this._logs.join(`
7
7
  `),t=new Blob([e],{type:`text/plain`}),n=window.URL.createObjectURL(t),r=document.createElement(`a`);r.download=`log.txt`,r.href=n,r.click(),window.URL.revokeObjectURL(n),this._logs=[]}};function S_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?S_(Object(n),!0).forEach(function(t){w_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w_(e,t,n){return(t=T_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T_(e){var t=E_(e,`string`);return typeof t==`symbol`?t:t+``}function E_(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var D_=x_.create(`main`);function O_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:op.environment,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yp.VGA,n=arguments.length>2?arguments[2]:void 0,[{status:r,stream:i,camera:a},o]=J({status:ap.PREPARING,stream:null,camera:{deviceId:``,facing:void 0,groupId:``,label:``}}),[s,c]=J(null),[l,u]=J(null),d=Sh(``),f=Sh(!0),p=Th(()=>{o(e=>C_(C_({},e),{},{status:ap.PLAY}))},[]);return Y(()=>{if(f.current)f.current=!1;else try{let e=t.width>vp?yp.FULL_HD.width:t.width,n=t.height>vp?yp.FULL_HD.height:t.height,r={ideal:e},o={ideal:n},s=t.width<900?18:30;qg.isFirefox&&qg.browserVersion>=`145`&&(r.min=e,o.min=n);let c={width:r,height:o,frameRate:{ideal:s}};a.deviceId?c.deviceId={exact:a.deviceId}:c.facingMode={ideal:a.facing},i==null||i.getVideoTracks()[0].applyConstraints(c)}catch(e){D_(`Get video error: ${e}`),o(e=>C_(C_({},e),{},{status:ap.UNKNOWN_ERROR}))}},[t]),Y(()=>{let e=!0;return i_().then(t=>{D_(`Video devices: ${JSON.stringify(t)}`),e&&(D_(t.isCameraAllowed?`Preparing the camera`:`Requesting the camera`),o(e=>C_(C_({},e),{},{status:t.isCameraAllowed?ap.PREPARING:ap.REQUESTING})),c(t))}).catch(t=>{D_(`Error in receiving media devices: ${t}`),e&&o(e=>C_(C_({},e),{},{status:h_()?ap.HTTP_NOT_SUPPORTED:window.isSecureContext?ap.NOT_SUPPORTED:ap.INSECURE_PAGE_CONTEXT}))}),()=>{e=!1}},[]),Y(()=>{let e=!0;if(s&&!l)return o_(s).then(t=>{D_(`Sorted cameras: ${JSON.stringify(t)}`),e&&u(t)}).catch(t=>{if(D_(`Error sorting cameras: ${t}`),e){if(t instanceof Error&&t.name===fp)return o(e=>C_(C_({},e),{},{status:ap.PERMISSION_DENIED}));o(e=>C_(C_({},e),{},{status:ap.UNKNOWN_ERROR}))}}),()=>{e=!1}},[s]),Y(()=>{let i=!0,a=r===ap.PREPARING||r===ap.REQUESTING;return!l||!a?void 0:(V(null,null,function*(){try{yield f_(qg.isFirefox?gp:0);let r=s_(e,l,n),a=yield l_(t,r,n);if(D_(`Selected camera: ${JSON.stringify(r)}`),i)d.current=a.camera.deviceId,o(a);else{if(!a.stream)return;c_(a.stream)}}catch(e){if(D_(`Get video error: ${e}`),!i)return;o(e=>C_(C_({},e),{},{status:ap.UNKNOWN_ERROR}))}}),()=>{i=!1})},[l,e,n,r,t.width,t.height]),Y(()=>()=>{i&&c_(i)},[i]),Y(()=>{if(!n||!d.current)return;let e=n!==d.current;r!==ap.PLAY||!e||o({status:ap.PREPARING,stream:null,camera:{deviceId:``,facing:void 0,groupId:``,label:``}})},[n,r]),{status:r,stream:i,camera:a,sortedDevices:l,onPlay:p}}var k_={container:`_container_17sg4_1`,video:`_video_17sg4_8`};function A_(e,t,n){return(t=j_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j_(e){var t=M_(e,`string`);return typeof t==`symbol`?t:t+``}function M_(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var N_=x_.create(`main`),P_=class{constructor(){A_(this,`chunks`,[]),A_(this,`recorder`,null),A_(this,`mimeType`,`video/webm`),A_(this,`record`,null),A_(this,`delayTimeout`,null),A_(this,`durationTimeout`,null),A_(this,`isRecording`,!1),A_(this,`debug`,!1),A_(this,`delay`,0),A_(this,`bitrate`,12e5),A_(this,`duration`,void 0)}init(e){`MediaRecorder`in window?(this.mimeType=MediaRecorder.isTypeSupported(`video/webm`)?`video/webm`:`video/mp4;codecs=avc1`,this.recorder=new MediaRecorder(e,{mimeType:this.mimeType,videoBitsPerSecond:this.bitrate}),this.recorder.addEventListener(`dataavailable`,this.setChunk.bind(this)),this.recorder.addEventListener(`error`,this.errorHandle.bind(this)),this.delay?this.delayTimeout=setTimeout(()=>{this.delayTimeout=null,this.startRecording()},this.delay):this.startRecording(),this.duration&&(this.durationTimeout=setTimeout(()=>V(this,null,function*(){this.durationTimeout=null,this.record=yield this.getRecord()}),this.delay+this.duration)),N_(`MediaRecorder initialized: { duration: ${this.duration}, delay: ${this.delay}, mimeType: ${this.mimeType} }`)):N_(`MediaRecorder is missing`)}startRecording(){this.recorder&&(this.recorder.start(),this.isRecording=!0,N_(`Recording has started`))}clearTimeouts(){this.delayTimeout&&clearTimeout(this.delayTimeout),this.durationTimeout&&clearTimeout(this.durationTimeout)}getRecord(){return V(this,null,function*(){if(this.record){let e=this.record;return this.record=null,e}return!this.recorder||this.recorder.state===`inactive`?null:(this.stopRecord(),new Promise(e=>{if(!this.recorder)return e(null);this.recorder.onstop=()=>V(this,null,function*(){let t=yield this.getVideoData();N_(`Video record resolved`),e(t)})}))})}stopRecord(){var e,t,n;!this.recorder||this.recorder.state===`inactive`?this.clearTimeouts():((e=this.recorder)==null||e.stop(),(t=this.recorder)==null||t.removeEventListener(`dataavailable`,this.setChunk),(n=this.recorder)==null||n.removeEventListener(`error`,this.errorHandle),this.clearTimeouts(),this.isRecording=!1,N_(`Recording stopped`))}errorHandle(e){N_(`Stream recorder service error: ${JSON.stringify(e)}`)}setChunk(e){this.chunks.push(e.data)}getVideoData(){return V(this,null,function*(){let e=new Blob(this.chunks,{type:this.mimeType});if(this.debug){let t=document.createElement(`a`),n=URL.createObjectURL(e);t.href=n,t.download=`video`,t.click(),URL.revokeObjectURL(n)}return new Promise(t=>{t({data:e,mimeType:e.type})})})}},F_=0;function Z(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:--F_,__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 U.vnode&&U.vnode(l),l}var I_=Yh(function(e,t){let{onVideoStatusChange:n,onVideoSizeChange:r,mode:i,resolution:a,onFailStatus:o,cameraId:s,onRecordService:c,videoRecord:l,onVideoStarted:u,onVideoStopped:d,onMirroringChange:f,mirrorType:p=dp.mirror}=e,{status:m,stream:h,camera:g,sortedDevices:_,onPlay:v}=O_(i,a,s),[y,b]=J(!1),x=Sh(null),S=Sh(null),C=Sh(null);return Y(()=>{b(g.facing===op.user&&p===dp.mirror)},[g.facing,p]),Y(()=>{f==null||f(y)},[y]),Ch(t,()=>({changeMirror:()=>{b(e=>!e)}})),Y(()=>{let e=S.current,t=C.current,n=()=>{!e||!t||r==null||r({videoElement:e,videoParams:{width:e.videoWidth,height:e.videoHeight},videoContainerParams:{width:t.clientWidth,height:t.clientHeight}})};return e&&(window.addEventListener(`resize`,n),e.addEventListener(`resize`,n)),()=>{var t;e&&(window.removeEventListener(`resize`,n),e.removeEventListener(`resize`,n)),(t=x.current)==null||t.stopRecord()}},[]),Y(()=>{let e=S.current;if(m===ap.READY&&e&&h&&(e.srcObject=h,qg.isIOS?setTimeout(()=>e.play(),_p):e.play(),l)){if(x.current){var t;(t=x.current)==null||t.stopRecord()}else{let e=new P_;if(typeof l!=`boolean`){var r,i;e.delay=(r=l.delay)==null?e.delay:r,e.duration=l.duration,e.bitrate=(i=l.bitrate)==null?e.bitrate:i,e.debug=!!l.debug}x.current=e,c==null||c(e)}x.current.init(h)}let a=xp[m];o&&a&&o(a),n({videoStatus:m,camera:g,sortedDevices:_})},[m,g,h,_,l]),Z(`div`,{part:`webcamera-container`,ref:C,className:k_.container,children:Z(`video`,{part:`webcamera-video`,onAbort:d,onLoadedData:()=>{v(),u==null||u()},className:k_.video,style:{transform:`scaleX(${y?-1:1})`},ref:S,playsInline:!0,disablePictureInPicture:!0})})});function L_(e){switch(e){case G.SHAKING:return{icon:`processing-error-icon`,title:`keepDeviceStill`};case G.FINDING:return{icon:`search-icon`,title:`placeDocumentIntoFrame`};case G.SNAPSHOT:return{icon:`square-icon`,title:`positionDocumentCenter`};case G.FOCUS:return{icon:`processing-error-icon`,title:`noFocus`};case G.RESOLUTION:return{icon:`processing-error-icon`,title:`moveCloser`};case G.GLARE:return{icon:`processing-error-icon`,title:`glaresOnDocument`};case G.HOLD:return{icon:`processing-error-icon`,title:`holdDocumentStraight`};case G.START_NEXT_PAGE:return{icon:`search-icon`,title:`flipTheDocument`};case G.LIVENESS:return{icon:`search-icon`,title:`tiltTheDocument`};default:return{icon:null,title:null}}}var R_={svg:`_svg_68emc_1`},z_=x_.create(`main`),B_=il({onEvent:()=>z_(`Function "onEvent" not defined.`)}),V_=()=>Eh(B_);function H_(e){let{maskParams:t,borderColor:n,strokeWidth:r,adjustment:i}=e,{cameraFrameShapeType:a=yf.line,cameraFrameLineCap:o=bf.butt,cameraFrameLineLength:s=If,cameraFrameCornerRadius:c=Ff}=V_(),[l,u]=J(null);return xh(()=>{if(a!==yf.corners)return;let e=t.width/100*s,n=c+r/2+i,o=r/2,l=t.left+t.width-e-n+o+i,d=t.top-o-i,f=t.left+t.width+o+i,p=t.top+t.height-e-n+o+i,m=t.left+e+n-o-i,h=t.top+t.height+o+i,g=t.left-o-i,_=t.top+e+n-o-i;u({topRight:{x:l,y:d},bottomRight:{x:f,y:p},bottomLeft:{x:m,y:h},topLeft:{x:g,y:_},pathWidth:e,radius:n})},[a,t,s,c,i,r]),l?Z(Mc,{children:[Z(`path`,{d:`M${l.topRight.x},${l.topRight.y} h${l.pathWidth} a${l.radius},${l.radius} 0 0 1 ${l.radius},${l.radius} v${l.pathWidth}`,fill:`none`,stroke:n,strokeWidth:r,strokeLinecap:o,part:`frame-top-right-corner`}),Z(`path`,{d:`M${l.bottomRight.x},${l.bottomRight.y} v${l.pathWidth} a${l.radius},${l.radius} 0 0 1 ${-l.radius},${l.radius} h-${l.pathWidth}`,fill:`none`,stroke:n,strokeWidth:r,strokeLinecap:o,part:`frame-bottom-right-corner`}),Z(`path`,{d:`M${l.bottomLeft.x},${l.bottomLeft.y} h-${l.pathWidth} a${l.radius},${l.radius} 0 0 1 ${-l.radius},${-l.radius} v-${l.pathWidth}`,fill:`none`,stroke:n,strokeWidth:r,strokeLinecap:o,part:`frame-bottom-left-corner`}),Z(`path`,{d:`M${l.topLeft.x},${l.topLeft.y} v-${l.pathWidth} a${l.radius},${-l.radius} 0 0 1 ${l.radius},${-l.radius} h${l.pathWidth}`,fill:`none`,stroke:n,strokeWidth:r,strokeLinecap:o,part:`frame-top-left-corner`})]}):null}function U_(e){let{maskParams:t,strokeWidth:n,adjustment:r,borderColor:i}=e,{cameraFrameCornerRadius:a=Ff}=V_(),o=t.left-n/2-r,s=t.top-n/2-r,c=a+n/2+r;return Z(`rect`,{x:o,y:s,rx:c,ry:c,width:t.width+n+r*2,height:t.height+n+r*2,fill:`none`,stroke:i,strokeWidth:n,part:`frame-line`})}function W_(e){let{layoutParams:t,maskParams:n,isDocumentAvailable:r}=e,{cameraFrameShapeType:i=yf.line,cameraFrameCornerRadius:a=Ff,cameraFrameActiveColor:o,cameraFrameDefaultColor:s,newLayout:c}=V_(),l=r?o==null?c?Bf:zf:o:s==null?c?Rf:Lf:s,u=c?r?0:Vf:0,d=n.stroke||0,f=c&&r?d+Vf:d;return Z(`svg`,{part:`frame`,className:R_.svg,xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`xMidYMid slice`,viewBox:`0 0 ${t.width} ${t.height}`,role:`img`,"aria-label":`Document frame`,children:[Z(`defs`,{children:Z(`mask`,{id:`bgClip`,children:[Z(`rect`,{x:`0`,y:`0`,width:t.width,height:t.height,fill:`#fff`,part:`frame-mask-background`}),Z(`rect`,{x:n.left,y:n.top,rx:a,ry:a,width:n.width,height:n.height,stroke:`black`,part:`frame-mask-background-clip`})]})}),Z(`rect`,{mask:`url(#bgClip)`,x:`0`,y:`0`,width:t.width,height:t.height,part:`frame-external-background`}),i===yf.line&&Z(U_,{maskParams:n,borderColor:l,strokeWidth:f,adjustment:u}),i===yf.corners&&Z(H_,{maskParams:n,borderColor:l,strokeWidth:f,adjustment:u})]})}function G_(){return G_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G_.apply(null,arguments)}function K_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function q_(e,t){return q_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q_(e,t)}function J_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q_(e,t)}function Y_(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function X_(e,t){e.classList?e.classList.add(t):Y_(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Z_(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Q_(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Z_(e.className,t):e.setAttribute(`class`,Z_(e.className&&e.className.baseVal||``,t))}var $_={disabled:!1},ev=X.createContext(null),tv=function(e){return e.scrollTop},nv=`unmounted`,rv=`exited`,iv=`entering`,av=`entered`,ov=`exiting`,sv=(function(e){J_(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=rv,r.appearStatus=iv):o=av:o=t.unmountOnExit||t.mountOnEnter?nv:rv,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===nv?{status:rv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==iv&&n!==av&&(t=iv):(n===iv||n===av)&&(t=ov)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===iv){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:X.findDOMNode(this);n&&tv(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===rv&&this.setState({status:nv})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[X.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||$_.disabled?this.safeSetState({status:av},function(){t.props.onEntered(a)}):(this.props.onEnter(a,o),this.safeSetState({status:iv},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:av},function(){t.props.onEntered(a,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:X.findDOMNode(this);!t||$_.disabled?this.safeSetState({status:rv},function(){e.props.onExited(r)}):(this.props.onExit(r),this.safeSetState({status:ov},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:rv},function(){e.props.onExited(r)})})}))},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:X.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r)setTimeout(this.nextCallback,0);else{if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)}},n.render=function(){var e=this.state.status;if(e===nv)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=K_(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return X.createElement(ev.Provider,{value:null},typeof n==`function`?n(e,r):X.cloneElement(X.Children.only(n),r))},t})(X.Component);sv.contextType=ev,sv.propTypes={};function cv(){}sv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:cv,onEntering:cv,onEntered:cv,onExit:cv,onExiting:cv,onExited:cv},sv.UNMOUNTED=nv,sv.EXITED=rv,sv.ENTERING=iv,sv.ENTERED=av,sv.EXITING=ov;var lv=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return X_(e,t)})},uv=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Q_(e,t)})},dv=(function(e){J_(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&tv(e),r&&(this.appliedClasses[t][n]=r,lv(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&uv(e,r),i&&uv(e,i),a&&uv(e,a)},n.render=function(){var e=this.props;e.classNames;var t=K_(e,[`classNames`]);return X.createElement(sv,G_({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(X.Component);dv.defaultProps={classNames:``},dv.propTypes={};var fv,pv;function mv(e,t){return!(e===t||X.isValidElement(e)&&X.isValidElement(t)&&e.key!=null&&e.key===t.key)}var hv={out:`out-in`,in:`in-out`},gv=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},_v=(fv={},fv[hv.out]=function(e){var t=e.current,n=e.changeState;return X.cloneElement(t,{in:!1,onExited:gv(t,`onExited`,function(){n(iv,null)})})},fv[hv.in]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,X.cloneElement(r,{in:!0,onEntered:gv(r,`onEntered`,function(){n(iv)})})]},fv),vv=(pv={},pv[hv.out]=function(e){var t=e.children,n=e.changeState;return X.cloneElement(t,{in:!0,onEntered:gv(t,`onEntered`,function(){n(av,X.cloneElement(t,{in:!0}))})})},pv[hv.in]=function(e){var t=e.current,n=e.children,r=e.changeState;return[X.cloneElement(t,{in:!1,onExited:gv(t,`onExited`,function(){r(av,X.cloneElement(n,{in:!0}))})}),X.cloneElement(n,{in:!0})]},pv),yv=(function(e){J_(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.state={status:av,current:null},t.appeared=!1,t.changeState=function(e,n){n===void 0&&(n=t.state.current),t.setState({status:e,current:n})},t}var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return e.children==null?{current:null}:t.status===iv&&e.mode===hv.in?{status:iv}:t.current&&mv(t.current,e.children)?{status:ov}:{current:X.cloneElement(e.children,{in:!0})}},n.render=function(){var e=this.props,t=e.children,n=e.mode,r=this.state,i=r.status,a=r.current,o={children:t,current:a,changeState:this.changeState,status:i},s;switch(i){case iv:s=vv[n](o);break;case ov:s=_v[n](o);break;case av:s=a}return X.createElement(ev.Provider,{value:{isMounting:!this.appeared}},s)},t})(X.Component);yv.propTypes={},yv.defaultProps={mode:hv.out};var bv={"hint-container":`_hint-container_1r2jg_1`,"tips-frameless":`_tips-frameless_1r2jg_10`,message:`_message_1r2jg_10`,"fade-enter":`_fade-enter_1r2jg_14`,"fade-enter-active":`_fade-enter-active_1r2jg_18`,"fade-exit":`_fade-exit_1r2jg_23`,"fade-exit-active":`_fade-exit-active_1r2jg_27`,"message-container":`_message-container_1r2jg_32`,icon:`_icon_1r2jg_42`,"processing-error-icon":`_processing-error-icon_1r2jg_58`,"search-icon":`_search-icon_1r2jg_64`,"square-icon":`_square-icon_1r2jg_70`,"message-background":`_message-background_1r2jg_86`,title:`_title_1r2jg_105`,copyright:`_copyright_1r2jg_112`},xv={exports:{}},Sv=xv.exports,Cv;function wv(){return Cv||(Cv=1,(function(e,t){(function(e,n){n(t,Bg)})(Sv,function(e,t){var n=`default`in t?t.default:t;function r(e){return(r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e})(e)}var i={},a=`[LOCALIZE-REACT]: There are no translations for specified locale`,o=`[LOCALIZE-REACT] Looks like template is being used, but no value passed for `,s=/{{([^{]+[^}])}}/g;function c(e,t){if(!t||Object.keys(t).length===0)return e;var n,r,i,a=e.match(s);return a&&a.length!==0?(n=a,r=t,i=Object.keys(r),n.map(function(e){var t=Array.prototype.slice.call(e,2,-2).join(``),n=i.find(function(e){return e===t});return n?[e,r[n]]:(console.warn(o,e),[e,e])})).reduce(function(e,t){var n=new RegExp(t[0],`gi`);return e.replace(n,t[1])},e):e}var l=n.createContext(),u=l.Consumer;function d(){return t.useContext(l)}e.LocalizationConsumer=u,e.LocalizationContext=l,e.LocalizationProvider=function(e){var o=e.children,s=e.disableCache,u=e.locale,d=e.translations,f=d===void 0?{}:d,p=(function(e,t){if(!e)return null;if(r(t[e])===`object`)return e;var n=e.toLowerCase().replace(/-/g,`_`);if(r(t[n])===`object`)return n;var i=n.split(`_`)[0];return r(t[i])===`object`?i:(console.warn(a,e),e)})(u,f),m=p?f[p]:f;function h(e,t,n){if(!m||!e)return n||e;var r=typeof n==`string`?n:e,i=m[e];if(typeof i==`string`)return t?c(i,t):i;var a=e.split(`.`);if(a.length===1)return c(r,t);for(var o=m[a[0]],s=1;s<a.length;s++)o=o&&o[a[s]];return c(typeof o==`string`?o:r,t)}t.useEffect(function(){i={}},[u,f]);var g,_=s?h:(g=h,function(e,t,n){var r=2<arguments.length&&n!==void 0?n:``,a=t?JSON.stringify(t,null,``)+e+r:e+r;if(i[a])return i[a];var o=g(e,t,r);return i[a]=o});return n.createElement(l.Provider,{value:{locale:u,translate:_,translations:f}},o)},e.Message=function(e){var t=e.defaultMessage,n=e.descriptor,r=e.values;return(0,d().translate)(n,r,t)},e.useLocalize=d,Object.defineProperty(e,"__esModule",{value:!0})})})(xv,xv.exports)),xv.exports}var Tv=wv(),Ev={copyright:`_copyright_7zsy1_1`},Dv=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='33'%20height='11'%20viewBox='0%200%2033%2011'%20fill='none'%3e%3cpath%20d='M4.98344%205.36204C5.67499%204.93985%206.16388%204.1039%206.16388%203.18439C6.16388%201.43957%204.78591%200.299805%203.05391%200.299805C1.3219%200.299805%200%201.43993%200%203.40978V4.88744H1.26767V3.40942C1.26767%202.22751%202.0699%201.566%203.055%201.566C4.04011%201.566%204.74339%202.24143%204.74339%203.18439C4.74339%204.12736%203.98367%204.88708%202.99857%204.88708H1.26767V8.09564H2.53423V6.01291H3.02679C4.26513%206.01291%205.08129%206.9698%205.10951%208.09564H6.43215C6.40869%206.98153%205.87546%205.85716%204.98454%205.36204'%20fill='%23BD7DFF'/%3e%3cpath%20d='M31.8037%202.5231V3.32533C31.4658%202.81885%2030.8747%202.48242%2030.0307%202.48242C28.4827%202.48242%2027.3286%203.72077%2027.3286%205.31094C27.3286%206.88682%2028.4827%208.13946%2030.0307%208.13946C30.8326%208.13946%2031.4098%207.81585%2031.8037%207.3233V8.09731H32.9999V2.5231H31.8037ZM30.1714%206.92787C29.2706%206.92787%2028.6234%206.22422%2028.6234%205.30947C28.6234%204.39473%2029.2706%203.69108%2030.1714%203.69108C31.0722%203.69108%2031.7334%204.39473%2031.7334%205.30947C31.7334%206.22422%2031.0737%206.92787%2030.1714%206.92787Z'%20fill='%23BD7DFF'/%3e%3cpath%20d='M23.2758%205.40839C23.2758%206.50601%2022.7129%206.91427%2021.9953%206.91427C21.2777%206.91427%2020.7148%206.50601%2020.7148%205.40839V2.52344H19.4482V5.35196C19.4482%207.20966%2020.4051%208.13723%2021.9953%208.13723C23.5855%208.13723%2024.5424%207.20856%2024.5424%205.35196V2.52344H23.2758V5.40839Z'%20fill='%23BD7DFF'/%3e%3cpath%20d='M9.55541%202.48047C7.99309%202.48047%206.78296%203.76096%206.78296%205.32328C6.78296%206.8856%207.99235%208.13751%209.59755%208.13751C10.5684%208.13751%2011.272%207.79997%2011.8492%207.19491L11.1595%206.37875C10.7795%206.71628%2010.3012%206.9556%209.62577%206.9556C8.95034%206.9556%208.31706%206.6177%208.12099%205.88583H12.2853C12.3358%205.66432%2012.3594%205.43755%2012.3557%205.2104C12.3557%203.63452%2011.1174%202.48047%209.55541%202.48047ZM8.04953%204.8868C8.21847%204.15383%208.83746%203.66274%209.6254%203.66274C10.4133%203.66274%2010.948%204.14101%2011.1031%204.8868H8.04953Z'%20fill='%23BD7DFF'/%3e%3cpath%20d='M26.6533%200.356445H25.3867V8.09621H26.6533V0.356445Z'%20fill='%23BD7DFF'/%3e%3cpath%20d='M17.4077%203.32533C17.1263%202.84671%2016.4791%202.48242%2015.6347%202.48242C14.157%202.48242%2012.9326%203.72077%2012.9326%205.31094C12.9326%206.88682%2014.157%208.09621%2015.6347%208.09621C16.4369%208.09621%2016.9434%207.8569%2017.3374%207.36325V7.87009C17.3374%208.96771%2016.5634%209.36168%2015.8176%209.36168C15.0718%209.36168%2014.4806%208.9952%2014.3681%208.1937H13.1298C13.1862%209.601%2014.3117%2010.5025%2015.8176%2010.5025C17.3235%2010.5025%2018.6028%209.64424%2018.6028%207.78654V2.5231H17.4077V3.32533ZM15.7754%206.88572C14.8746%206.88572%2014.2274%206.22422%2014.2274%205.30984C14.2274%204.39547%2014.8746%203.69145%2015.7754%203.69145C16.6762%203.69145%2017.3374%204.3951%2017.3374%205.30984C17.3374%206.22458%2016.6759%206.88572%2015.7754%206.88572Z'%20fill='%23BD7DFF'/%3e%3c/svg%3e`,Ov=Yh(function(e,t){let{className:n}=e,{copyright:r=!0}=V_();return r?Z(`div`,{ref:t,part:`container-copyright`,className:`${Ev.copyright} ${n==null?``:n}`,children:[Z(`span`,{"data-e2e":`powered-by`,children:`Powered by`}),Z(`img`,{src:Dv,alt:`Regula`})]}):null});function kv(e){switch(e){case Tf.Unknown:return`id-front-icon`;case Tf.PassportSinglePage:return`passport-single-icon`;case Tf.PassportTwoPages:return`passport-both-pages-icon`;case Tf.IDFront:return`id-front-icon`;case Tf.IDFrontMRZ:return`id-mrz-front-icon`;case Tf.IDBack:return`id-back-icon`;case Tf.IDBackMrz:return`id-mrz-back-icon`;case Tf.IDBackBarcode:return`id-barcode-back-icon`;case Tf.IDBackBarcodeMRZ:return`id-mrz-barcode-back-icon`;case Tf.BankCardFront:return`bank-card-front-icon`;case Tf.BankCardBack:return`bank-card-back-icon`;case Tf.DocumentFront:return`document-front-icon`;case Tf.DocumentBack:return`document-back-icon`;default:return`id-front-icon`}}function Av(e){switch(e){case Cf.Horizontal:return`horizontal`;case Cf.Vertical:return`vertical`;case Cf.LeftBottomRightTop:return`left-bottom-right-top`;case Cf.RightBottomLeftTop:return`right-bottom-left-top`;default:return``}}var jv={announcer:`_announcer_1qj2e_1`};function Mv(e){let{text:t,timeout:n=100}=e,[r,i]=J(``);return Y(()=>{if(!t)return;i(``);let e=setTimeout(()=>{i(t)},n);return()=>{clearTimeout(e)}},[t,n]),Z(`div`,{role:`status`,"aria-live":`assertive`,className:jv.announcer,children:r})}var Nv,Pv;function Fv(){if(Pv)return Nv;Pv=1;function e(e){return e&&e.length?e[0]:void 0}return Nv=e,Nv}var Iv,Lv;function Rv(){return Lv||(Lv=1,Iv=Fv()),Iv}var zv=rt(Rv()),Bv={tilt:`_tilt_5ot88_1`,vertical:`_vertical_5ot88_19`,horizontal:`_horizontal_5ot88_23`,"left-bottom-right-top":`_left-bottom-right-top_5ot88_27`,"right-bottom-left-top":`_right-bottom-left-top_5ot88_31`,"id-front-icon":`_id-front-icon_5ot88_35`,"passport-single-icon":`_passport-single-icon_5ot88_39`,"passport-both-pages-icon":`_passport-both-pages-icon_5ot88_43`,"id-mrz-front-icon":`_id-mrz-front-icon_5ot88_47`,"id-back-icon":`_id-back-icon_5ot88_51`,"id-mrz-back-icon":`_id-mrz-back-icon_5ot88_55`,"id-barcode-back-icon":`_id-barcode-back-icon_5ot88_59`,"id-mrz-barcode-back-icon":`_id-mrz-barcode-back-icon_5ot88_63`,"bank-card-front-icon":`_bank-card-front-icon_5ot88_67`,"bank-card-back-icon":`_bank-card-back-icon_5ot88_71`,"document-front-icon":`_document-front-icon_5ot88_75`,"document-back-icon":`_document-back-icon_5ot88_79`},Vv=Yh(function(e,t){var n,r;let{animation:i}=e,a=kv((n=zv(i.image))==null?Tf.IDFront:n);return Z(Mc,{children:[Z(Mv,{text:`Tilt the document`}),Z(`div`,{part:`hint-holo-icon hint-holo-${a}`,className:`${Bv.tilt} ${Bv[Av(i.tiltType)]} ${(r=Bv[a])==null?``:r}`,ref:t,role:`img`,"aria-label":`Document tilt animation`})]})}),Hv={flip:`_flip_1nryz_1`,"one-side":`_one-side_1nryz_2`,front:`_front_1nryz_10`,back:`_back_1nryz_11`,slide:`_slide_1nryz_22`,"flip-front":`_flip-front_1nryz_1`,"flip-back":`_flip-back_1nryz_1`,"id-front-icon":`_id-front-icon_1nryz_51`,"passport-single-icon":`_passport-single-icon_1nryz_55`,"passport-both-pages-icon":`_passport-both-pages-icon_1nryz_59`,"id-mrz-front-icon":`_id-mrz-front-icon_1nryz_63`,"id-back-icon":`_id-back-icon_1nryz_67`,"id-mrz-back-icon":`_id-mrz-back-icon_1nryz_71`,"id-barcode-back-icon":`_id-barcode-back-icon_1nryz_75`,"id-mrz-barcode-back-icon":`_id-mrz-barcode-back-icon_1nryz_79`,"bank-card-front-icon":`_bank-card-front-icon_1nryz_83`,"bank-card-back-icon":`_bank-card-back-icon_1nryz_87`,"document-front-icon":`_document-front-icon_1nryz_91`,"document-back-icon":`_document-back-icon_1nryz_95`},Uv=Yh(function(e,t){var n,r,i,a,o;let{animation:s}=e,{nextPageAnimationStartDelay:c=Wf}=V_(),l=s.image.length===1,u=l&&zv(s.image)===Tf.PassportTwoPages,d=kv((n=zv(s.image))==null?Tf.DocumentFront:n),f={"--animation-delay":c+`ms`,"--animation-duration":Uf+`ms`};if(l){var p;return Z(Mc,{children:[Z(Mv,{text:`Slide the document`}),Z(`div`,{ref:t,part:`hint-one-side-page-icon ${d}`,className:`${Hv[`one-side`]} ${u?Hv.slide:``} ${(p=Hv[d])==null?``:p}`,style:f,role:`img`,"aria-label":`Document slide animation`})]})}let m=kv((r=(i=s.image)==null?void 0:i[1])==null?Tf.DocumentBack:r);return Z(Mc,{children:[Z(Mv,{text:`Flip the document`}),Z(`div`,{ref:t,className:Hv.flip,style:f,role:`img`,"aria-label":`Document flip animation`,part:`hint-next-page-icon`,children:[Z(`div`,{part:`hint-next-page-icon-front-side hint-next-page-front-${d}`,className:`${Hv.front} ${(a=Hv[d])==null?``:a}`}),Z(`div`,{part:`hint-next-page-icon-back-side hint-next-page-back-${m}`,className:`${Hv.back} ${(o=Hv[m])==null?``:o}`})]})]})}),Wv=Yh(function(e,t){let{animation:n}=e,[r,i]=J(null);xh(()=>{n&&i(n.type)},[n]);let a=(n==null?void 0:n.type)||r;return a===wf.Tilt&&(n==null?void 0:n.type)===wf.Tilt?Z(Vv,{animation:n,ref:t}):a===wf.Flip&&(n==null?void 0:n.type)===wf.Flip?Z(Uv,{animation:n,ref:t}):null});function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gv(Object(n),!0).forEach(function(t){qv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qv(e,t,n){return(t=Jv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jv(e){var t=Yv(e,`string`);return typeof t==`symbol`?t:t+``}function Yv(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xv(e){var t;let{layoutParams:n,icon:r,title:i,maskParams:a,animation:o,videoSize:s,controlsSizes:c,isLandscape:l}=e,{statusIcon:u=!0,statusPositionMultiplier:d,activityIndicatorPortraitPositionMultiplier:f,activityIndicatorLandscapePositionMultiplier:p,newLayout:m}=V_(),h=Sh(null),g=Sh(null),_=Sh(null),v=Sh(null),y=Sh(null),b=l&&a==null,x=`${bv[`hint-container`]} ${b?bv[`tips-frameless`]:``}`,{translate:S}=Tv.useLocalize(),C={classNames:{enter:bv[`fade-enter`],enterActive:bv[`fade-enter-active`],exit:bv[`fade-exit`],exitActive:bv[`fade-exit-active`]},timeout:300};return xh(()=>{var e,t;let r=g.current;if(!r||!s)return;let i=l&&c?c.main:0;r.style.width=`${a?a.width:s.width-i}px`,r.style.height=`${a?a.height:s.height}px`,r.style.top=`${a?a.top:0}px`,r.style.left=`${a?a.left:i}px`;let o=d!==void 0,u=f!==void 0||p!==void 0,h=((e=a==null?void 0:a.height)==null?s.height:e)/2+((t=a==null?void 0:a.top)==null?0:t),_=(e,t,n)=>{e.style.setProperty(t,`${n}px`)};if(m&&y.current&&n){var b,x,S;let e=((b=c==null?void 0:c.top)==null?0:b)+((x=a==null?void 0:a.height)==null?0:x)+y.current.clientHeight+18,t=((S=c==null?void 0:c.main)==null?0:S)>n.height-e?r.clientHeight/2-18-y.current.clientHeight:r.clientHeight/2+18,i=r.clientHeight/2-y.current.clientHeight-6;_(r,`--message-top`,l?i:t)}if(o&&y.current&&_(r,`--message-top`,((m&&n?n.height:s.height)-y.current.clientHeight)/2*d-h),u&&v.current){let e=v.current.clientHeight,t=s.width>s.height?p:f;t!==void 0&&_(r,`--indicator-top`,(s.height-e)/2*t-h)}},[d,a,s,c,f,p,m,l,n,i]),Z(`div`,{part:`hint-container`,ref:g,className:x,children:m?Z(Mc,{children:[Z(dv,Kv(Kv({in:!!o,nodeRef:h,unmountOnExit:!0},C),{},{children:Z(Wv,{animation:o,ref:h})})),Z(`div`,{part:`hint-status-message-container`,className:bv[`message-container`],children:!!i&&Z(`div`,{part:`hint-status-message`,ref:y,className:bv.message,children:Z(`div`,{part:`hint-status-message-background`,className:bv[`message-background`],children:Z(`p`,{role:`status`,"aria-live":`assertive`,part:`hint-status-message-title`,className:bv.title,children:S(i)})})})})]}):Z(Mc,{children:[Z(Ov,{className:bv.copyright}),Z(yv,{children:Z(dv,Kv(Kv({nodeRef:o?h:_},C),{},{children:o?Z(Wv,{animation:o,ref:h}):Z(`div`,{part:`hint-status-message-container`,ref:_,className:bv[`message-container`],children:[u&&!!r&&Z(`div`,{role:`img`,"aria-label":`Status icon`,part:`hint-status-${r}`,ref:v,className:`${bv.icon} ${(t=bv[r])==null?``:t}`}),!!i&&Z(`div`,{part:`hint-status-message`,ref:y,className:bv.message,children:Z(`div`,{part:`hint-status-message-background`,className:bv[`message-background`],children:Z(`p`,{role:`status`,"aria-live":`assertive`,part:`hint-status-message-title`,className:bv.title,children:S(i)})})})]})}),o?`document-animation`:`message-container`)})]})})}var Zv={"top-functional-buttons":`_top-functional-buttons_r3hg6_1`,"bottom-functional-buttons":`_bottom-functional-buttons_r3hg6_2`,"left-functional-buttons":`_left-functional-buttons_r3hg6_3`,"main-functional-buttons":`_main-functional-buttons_r3hg6_15`,"mirror-button":`_mirror-button_r3hg6_77`,"change-camera-button":`_change-camera-button_r3hg6_78`,"process-button":`_process-button_r3hg6_100`,"snapshot-button":`_snapshot-button_r3hg6_101`,"skip-button":`_skip-button_r3hg6_109`,"controls-container":`_controls-container_r3hg6_186`,"process-close-button":`_process-close-button_r3hg6_194`,mirrored:`_mirrored_r3hg6_245`,"not-mirrored":`_not-mirrored_r3hg6_251`,visible:`_visible_r3hg6_327`};function Qv(e){var t;let{mirroring:n,isSkipButtonVisible:r,isChangeCameraAvailable:i,isLandscape:a,onClose:o,onChangeCamera:s,onChangeMirroring:c,maskParams:l,captureButton:u,facing:d,onSnapshotProcess:f,onCameraSnapshot:p,onSkip:m,onControlsSizes:h,direction:g}=e,{closeButton:_=!0,skipButton:v=!0,mirrorButton:y=!1,changeCameraButton:b,captureButtonDelay:x,newLayout:S}=V_(),{translate:C}=Tv.useLocalize(),[w,T]=J(x===void 0),E=Sh(null),D=Sh(null),O=Sh(null),k=Sh(null),A=f&&u&&w,j=v,M=d!==op.environment&&y,N=i&&b,P=_,F=A||!!p||j,I=M||N,L=A||!!p||M||N,ee=L||j,te=n?`mirrored`:`not-mirrored`,ne={"--skip-position":((t=g===up.Ltr&&S?l==null?void 0:l.right:l==null?void 0:l.left)==null?0:t)+Yf+`px`};return Y(()=>{var e,t,n,r,i,o;let s=((e=E.current)==null?void 0:e.offsetWidth)||0,c=((t=D.current)==null?void 0:t.offsetWidth)||0,l=((n=O.current)==null?void 0:n.offsetWidth)||0,u=((r=k.current)==null?void 0:r.offsetWidth)||0,d=((i=k.current)==null?void 0:i.offsetHeight)||0,f=((o=E.current)==null?void 0:o.offsetHeight)||0;h({top:f,main:a&&!L&&!P?0:a?Math.max(s,c,l,u):d})},[P,F,I,ee,a,L]),Y(()=>{if(typeof x!=`number`)return;let e=setTimeout(()=>{T(!0)},x*1e3);return()=>{clearTimeout(e)}},[x]),Z(`div`,{part:`controls-container`,className:Zv[`controls-container`],style:a?ne:void 0,children:[Z(`div`,{part:`controls-top-buttons`,className:Zv[`top-functional-buttons`],ref:E,children:_&&Z(`button`,{part:`controls-process-close-button`,className:Zv[`process-close-button`],onClick:o,"aria-label":`Close processing`})}),F&&!S&&Z(`div`,{part:`controls-left-buttons`,className:Zv[`left-functional-buttons`],ref:D,children:[(A||p)&&Z(`button`,{part:A?`controls-process-button`:`controls-snapshot-button`,className:A?Zv[`process-button`]:Zv[`snapshot-button`],onClick:A?f:p,"aria-label":A?`Process the frame`:`Take a snapshot`}),j&&Z(`button`,{"aria-label":`Skip the page`,part:`controls-skip-button`,className:`${Zv[`skip-button`]} ${r?Zv.visible:``}`,onClick:m})]}),I&&!S&&Z(`div`,{part:`controls-bottom-buttons`,className:Zv[`bottom-functional-buttons`],ref:O,children:[N&&Z(`button`,{part:`controls-change-camera-button`,className:Zv[`change-camera-button`],onClick:s,"aria-label":`Change the camera`}),M&&Z(`button`,{part:`controls-mirror-button ${te}`,className:Zv[te],onClick:c,"aria-label":`Flip horizontally`})]}),ee&&S&&Z(`div`,{part:`controls-main-buttons`,className:Zv[`main-functional-buttons`],ref:k,children:[N&&Z(`button`,{part:`controls-change-camera-button`,"aria-label":`Change the camera`,className:Zv[`change-camera-button`],onClick:s}),A&&Z(`button`,{part:`controls-process-button ${a?`landscape`:`portrait`}`,className:Zv[`process-button`],onClick:f,"aria-label":`Process the frame`}),M&&Z(`button`,{part:`controls-mirror-button`,className:Zv[`mirror-button`],onClick:c,"aria-label":`Flip horizontally`}),j&&Z(`button`,{part:`controls-skip-button ${a?`landscape`:`portrait`}`,"aria-label":`Skip the page`,className:`${Zv[`skip-button`]} ${r?Zv.visible:``}`,onClick:m,children:C(`skip`)})]})]})}var $v={spinner:`_spinner_1vpw0_1`,"process-message":`_process-message_1vpw0_41`,message:`_message_1vpw0_51`};function ey(e){let{title:t}=e,{translate:n}=Tv.useLocalize();return Z(Mc,{children:[Z(Mv,{text:t||n(`pleaseWait`)}),Z(`div`,{part:`processing-container`,className:$v[`process-message`],children:[Z(`div`,{role:`img`,"aria-label":`Spinner`,part:`spinner-container`,className:$v.spinner,children:Z(`div`,{part:`spinner-circle`})}),Z(`span`,{part:`processing-message`,className:$v.message,children:t||n(`pleaseWait`)})]})]})}var ty={window:`_window_989nk_14`,header:`_header_989nk_36`,footer:`_footer_989nk_57`,"close-button":`_close-button_989nk_64`};function ny(e){let{onClose:t,children:n,direction:r,showHeaderAndFooter:i=!0,className:a}=e,{closeButton:o=!0}=V_();return Z(`div`,{part:`container`,className:`${ty.window} ${a==null?``:a}`,"data-direction":r,children:[i&&Z(`div`,{part:`container-header`,className:ty.header,children:o&&Z(`button`,{part:`container-close-button`,className:ty[`close-button`],"data-e2e":`cross`,onClick:t,"aria-label":`Close document reader component`})}),n,i&&Z(`div`,{part:`container-footer`,className:ty.footer,children:Z(Ov,{})})]})}var ry={container:`_container_1fvj1_1`,layout:`_layout_1fvj1_2`,loader:`_loader_1fvj1_20`,copyright:`_copyright_1fvj1_27`};function iy(e){let{direction:t,status:n,children:r,mirroring:i,onChangeMirroring:a,onChangeCamera:o,videoStatusParams:s,videoElementParams:c,onProcessClose:l,onClose:u,onSnapshotProcess:d,onCameraSnapshot:f,onSkip:p,frameParams:m,captureButton:h,animation:g,onControlsWidth:_}=e,{cameraFrameBorderWidth:v,cameraFrame:y=!0,newLayout:b,cameraFrameVerticalPositionMultiplier:x,cameraFrameHorizontalPositionMultiplier:S,manualMultipageMode:C}=V_(),w=Sh(null),T=Sh(null),[E,D]=J(!1),[O,k]=J(null),[A,j]=J(null),[M,N]=J(null),P=!!(s.sortedDevices&&s.sortedDevices.frontCameras.length+s.sortedDevices.backCameras.length>hp),F=n===G.HOLD||n===G.FOCUS||n===G.RESOLUTION||n===G.PROCESSING||n===G.GLARE,I=n!==G.SERVICE_PREPARING,L=s.videoStatus===ap.PLAY,{icon:ee,title:te}=L_(n),ne=c.videoParams.width>c.videoParams.height,R=b?c.videoContainerParams:A;return Y(()=>{n!==G.START_NEXT_PAGE||C||D(!0)},[n,C]),xh(()=>{let e=w.current;if(!L||!e||!I)return;let n=n_(c.videoParams.width,c.videoParams.height,c.videoContainerParams.width,c.videoContainerParams.height,c.videoParams.width,c.videoParams.height,0,0,sp.contain),r=n.width,a=n.height,o=n.left,s=n.right,l=n.top,u=n.stroke,d=b?0:Jf/2;if(b||(r+=Jf,a+=Jf,o-=Jf/2,s-=Jf/2,l-=Jf/2,e.style.width=`${r}px`,e.style.height=`${a}px`,e.style.top=`${l}px`,e.style.left=`${o}px`,e.style.right=`${s}px`),j({width:r,height:a,left:o,right:s,top:l,stroke:u}),!m||!n)return k(null);let f=m.frameRight-m.frameLeft,p=m.frameBottom-m.frameTop;if(!(n.width&&n.height)||!(f&&p)||!c.videoElement)return;let h=n_(c.videoParams.width,c.videoParams.height,n.width,n.height,f,p,m.frameLeft,m.frameTop,sp.contain),g=v==null?b?Pf:Nf:v,_=i?n.width-(h.left+h.width):h.left,y=i?n.width-(h.right+h.width):h.right,C=h.width,E=h.height,D=h.top;if(b&&M){if(c.videoElement.style.position=`absolute`,ne){var O,A;let e=(O=(A=T.current)==null?void 0:A.offsetHeight)==null?0:O,r=c.videoContainerParams.width-M.main,i=t===up.Rtl?M.main:0,a=n.width,o=n.height;h.width>r-20&&(C=r-20,E=Math.round(C*(h.height/h.width)),a=Math.round(n.width*(C/h.width)));let s=(r-C)/2*((S==null?1:S)-1);D=(c.videoContainerParams.height-E)/2,D<e&&(D=e,E=c.videoContainerParams.height-D*2,C=Math.round(E*(h.width/h.height)),o=Math.round(n.height*(E/h.height))),_=(r-C)/2+s+i,y=c.videoContainerParams.width-(_+C);let l=Math.round(_-(a-C)/2);c.videoElement.style.width=`${a}px`,c.videoElement.style.left=`${l}px`,c.videoElement.style.height=`${o}px`,c.videoElement.style.top=`auto`}else{let e=c.videoContainerParams.height-M.top-M.main,t=n.height;if(h.height>e){let r=e/h.height;t=n.height*r,E=e,C=Math.round(E*(h.width/h.height))}let r=(e-E)/2*(x==null?0:x);D=M.top+r,_=(c.videoContainerParams.width-C)/2,y=_;let i=Math.round(D-(t-E)/2);c.videoElement.style.width=`100%`,c.videoElement.style.left=`auto`,c.videoElement.style.height=`${t}px`,c.videoElement.style.top=`${i}px`}}k({width:C,height:E,top:D+d,left:_+d,right:y+d,stroke:g})},[c,L,I,b,ne,m,i,v,x,S,M,t]),xh(()=>{if(!A||!_||!M||!ne||b)return;let e=A.width/c.videoParams.width,t=M.main>0?M.main/e:0;_(t)},[A,M,c.videoParams.width,b]),Z(`div`,{part:`layout-container`,className:ry.container,"data-layout":b?`new`:`old`,"data-orientation":ne?`landscape`:`portrait`,children:[r,L&&Z(`div`,{part:`layout`,ref:w,className:ry.layout,children:[y&&O&&R&&Z(W_,{layoutParams:R,maskParams:O,isDocumentAvailable:F}),Z(Xv,{layoutParams:R,title:te,icon:ee,maskParams:O,videoSize:A,controlsSizes:M,isLandscape:ne,animation:g}),Z(Qv,{mirroring:i,captureButton:h,facing:s.camera.facing,isLandscape:ne,isSkipButtonVisible:E,isChangeCameraAvailable:P,onClose:l,onChangeCamera:o,onChangeMirroring:a,onSnapshotProcess:d,onCameraSnapshot:f,onSkip:p,onControlsSizes:N,maskParams:O,direction:t}),b&&Z(Ov,{ref:T,className:ry.copyright})]}),(n===G.SERVICE_PREPARING||!L)&&Z(ny,{onClose:u,className:ry.loader,children:Z(ey,{})})]})}var ay={},oy,sy;function cy(){return sy||(sy=1,oy=`
8
- \v\f\r \xA0               \u2028\u2029`),oy}var ly,uy;function dy(){if(uy)return ly;uy=1;var e=jt(),t=Ut(),n=fo(),r=cy(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return ly={start:s(1),end:s(2),trim:s(3)},ly}var fy,py;function my(){if(py)return fy;py=1;var e=Ii().PROPER,t=Tt(),n=cy(),r=`​…᠎`;return fy=function(i){return t(function(){return!!n[i]()||r[i]()!==r||e&&n[i].name!==i})},fy}var hy;function gy(){if(hy)return ay;hy=1;var e=ca(),t=dy().trim;return e({target:`String`,proto:!0,forced:my()(`trim`)},{trim:function(){return t(this)}}),ay}gy();var _y={},vy;function yy(){if(vy)return _y;vy=1;var e=ca(),t=Kn(),n=Js(),r=sr(),i=Mn(),a=os(),o=fs(),s=Ds()(`find`,TypeError);return e({target:`Iterator`,proto:!0,real:!0,forced:s},{find:function(e){i(this);try{r(e)}catch(e){o(this,`throw`,e)}if(s)return t(s,this,e);var c=a(this),l=0;return n(c,function(t,n){if(e(t,l++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}}),_y}yy();function by(e){let{videoSize:t,mirroring:n,controlsWidth:r,cameraFrameOffsetWidth:i,landscapeAspectRatio:a,portraitAspectRatio:o,cameraFrameVerticalPositionMultiplier:s,cameraFrameHorizontalPositionMultiplier:c,newLayout:l}=e,u=t.width>t.height,d=u&&!l?r:0,f=(u?t.height:t.width)/100*(u?i==null?Af:i:i==null?l?Af:2:i),p=(t.width-(u?d:0))/t.height,m=u?a:o,h,g,_,v;if(u){p>m?(g=t.height-f*2,h=g*m,_=((!!l===n?d:0)+(t.width-d-h)/2)*(l||c==null?1:c),v=f):(h=t.width-d-f*2,g=h/m,_=(!!l===n?d:0)+f,v=(t.height-g)/2);let e=(t.width-h)/2;e>d+f&&!l&&(p>m&&c!==void 0||(_=e))}else p<m?(h=t.width-f*2,g=h/m,_=f,v=(t.height-g)/2*(l||s==null?1:s)):(g=t.height-f*2,h=g*m,_=(t.width-h)/2,v=f);return{height:Math.round(g),width:Math.round(h),left:Math.round(_),top:Math.round(v)}}function xy(e){let{videoSize:t,mirroring:n,controlsWidth:r,scenario:i,scenarioParams:a}=e,{cameraFramePortraitAspectRatio:o,cameraFrameLandscapeAspectRatio:s,cameraFrameOffsetWidth:c,cameraFrameVerticalPositionMultiplier:l,cameraFrameHorizontalPositionMultiplier:u,cameraFrame:d=!0,newLayout:f}=V_(),[p,m]=J(null);return Y(()=>{if(!d)return m(null);let e=!!t.width,p=!!t.height;if(!(e&&p&&a!=null&&a.length)||!i)return;let h=a.find(e=>e.name===i),g=window.RegulaDocumentSDK.recognizerProcessParam.processParam.doublePageSpread,_=g?h==null?void 0:h.frameKWHDoublePageSpreadLandscape:h==null?void 0:h.frameKWHLandscape,v=g?h==null?void 0:h.frameKWHDoublePageSpreadPortrait:h==null?void 0:h.frameKWHPortrait;if(!_||!v)return;let y=s==null?Number(_):s,b=o==null?Number(v):o,{width:x,height:S,top:C,left:w}=by({videoSize:t,mirroring:n,controlsWidth:r,cameraFrameOffsetWidth:c,landscapeAspectRatio:y,portraitAspectRatio:b,cameraFrameVerticalPositionMultiplier:l,cameraFrameHorizontalPositionMultiplier:u,newLayout:f});m({frameBottom:C+S,frameLeft:w,frameRight:w+x,frameTop:C})},[d,i,t,a,n,r,o,s,c,l,u,f]),p}function Sy(e,t,n){return(t=Cy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cy(e){var t=wy(e,`string`);return typeof t==`symbol`?t:t+``}function wy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ty=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Sy(this,`type`,void 0),Sy(this,`details`,void 0),this.type=e,this.details=t}},Ey={},Dy,Oy;function ky(){if(Oy)return Dy;Oy=1,im();var e=Kn(),t=Wi(),n=nm(),r=Tt(),i=kn(),a=Ci(),o=i(`species`),s=RegExp.prototype;return Dy=function(c,l,u,d){var f=i(c),p=!r(function(){var e={};return e[f]=function(){return 7},``[c](e)!==7}),m=p&&!r(function(){var e=!1,t=/a/;if(c===`split`){var n={};n[o]=function(){return t},t={constructor:n,flags:``},t[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](``),!e});if(!p||!m||u){var h=/./[f],g=l(f,``[c],function(t,r,i,a,o){var c=r.exec;return c===n||c===s.exec?p&&!o?{done:!0,value:e(h,r,i,a)}:{done:!0,value:e(t,i,r,a)}:{done:!1}});t(String.prototype,c,g[0]),t(s,f,g[1])}d&&a(s[f],`sham`,!0)},Dy}var Ay,jy;function My(){if(jy)return Ay;jy=1;var e=um().charAt;return Ay=function(t,n,r){return n+(r?e(t,n).length:1)},Ay}var Ny,Py;function Fy(){if(Py)return Ny;Py=1;var e=jt(),t=cn(),n=Math.floor,r=e(``.charAt),i=e(``.replace),a=e(``.slice),o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ny=function(e,c,l,u,d,f){var p=l+e.length,m=u.length,h=s;return d!==void 0&&(d=t(d),h=o),i(f,h,function(t,i){var o;switch(r(i,0)){case`$`:return`$`;case`&`:return e;case"`":return a(c,0,l);case`'`:return a(c,p);case`<`:o=d[a(i,1,-1)];break;default:var s=+i;if(s===0)return t;if(s>m){var f=n(s/10);return f===0?t:f<=m?u[f-1]===void 0?r(i,1):u[f-1]+r(i,1):t}o=u[s-1]}return o===void 0?``:o})},Ny}var Iy,Ly;function Ry(){if(Ly)return Iy;Ly=1;var e=H(),t=Tt(),n=e.RegExp;return Iy={correct:!t(function(){var e=!0;try{n(`.`,`d`)}catch(t){e=!1}var t={},r=``,i=e?`dgimsy`:`gimsy`,a=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(n.prototype,`flags`).get.call(t)!==i||r!==i})},Iy}var zy,By;function Vy(){if(By)return zy;By=1;var e=Kn(),t=dn(),n=Qn(),r=Ry(),i=Wp(),a=RegExp.prototype;return zy=r.correct?function(e){return e.flags}:function(o){return!r.correct&&n(a,o)&&!t(o,`flags`)?e(i,o):o.flags},zy}var Hy,Uy;function Wy(){if(Uy)return Hy;Uy=1;var e=Kn(),t=Mn(),n=pt(),r=Pt(),i=nm(),a=TypeError;return Hy=function(o,s){var c=o.exec;if(n(c)){var l=e(c,o,s);return l!==null&&t(l),l}if(r(o)===`RegExp`)return e(i,o,s);throw new a(`RegExp#exec called on incompatible receiver`)},Hy}var Gy;function Ky(){if(Gy)return Ey;Gy=1;var e=Xa(),t=Kn(),n=jt(),r=ky(),i=Tt(),a=Mn(),o=pt(),s=gt(),c=Dr(),l=Nr(),u=fo(),d=Ut(),f=My(),p=ur(),m=Fy(),h=Vy(),g=Wy(),_=kn()(`replace`),v=Math.max,y=Math.min,b=n([].concat),x=n([].push),S=n(``.indexOf),C=n(``.slice),w=function(e){return e===void 0?e:String(e)},T=(function(){return`a`.replace(/./,`$0`)===`$0`})(),E=(function(){return/./[_]?/./[_](`a`,`$0`)===``:!1})();return r(`replace`,function(n,r,i){var T=E?`$`:`$0`;return[function(e,n){var i=d(this),a=s(e)?p(e,_):void 0;return a?t(a,e,i,n):t(r,u(i),e,n)},function(t,n){var s=a(this),d=u(t);if(typeof n==`string`&&S(n,T)===-1&&S(n,`$<`)===-1){var p=i(r,s,d,n);if(p.done)return p.value}var _=o(n);_||(n=u(n));var E=u(h(s)),D=S(E,`g`)!==-1,O;D&&(O=S(E,`u`)!==-1,s.lastIndex=0);for(var k=[],A;A=g(s,d),!(A===null||(x(k,A),!D));)u(A[0])===``&&(s.lastIndex=f(d,l(s.lastIndex),O));for(var j=``,M=0,N=0;N<k.length;N++){A=k[N];for(var P=u(A[0]),F=v(y(c(A.index),d.length),0),I=[],L,ee=1;ee<A.length;ee++)x(I,w(A[ee]));var te=A.groups;if(_){var ne=b([P],I,F,d);te!==void 0&&x(ne,te),L=u(e(n,void 0,ne))}else L=m(P,d,F,I,te,n);F>=M&&(j+=C(d,M,F)+L,M=F+P.length)}return j+C(d,M)}]},!!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`})||!T||E),Ey}Ky();function qy(e,t){return function(){return e.apply(t,arguments)}}var{toString:Jy}=Object.prototype,{getPrototypeOf:Yy}=Object,{iterator:Xy,toStringTag:Zy}=Symbol,Qy=(e=>t=>{let n=Jy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$y=e=>(e=e.toLowerCase(),t=>Qy(t)===e),eb=e=>t=>typeof t===e,{isArray:tb}=Array,nb=eb(`undefined`);function rb(e){return e!==null&&!nb(e)&&e.constructor!==null&&!nb(e.constructor)&&sb(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ib=$y(`ArrayBuffer`);function ab(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ib(e.buffer),t}var ob=eb(`string`),sb=eb(`function`),cb=eb(`number`),lb=e=>typeof e==`object`&&!!e,ub=e=>e===!0||e===!1,db=e=>{if(Qy(e)!==`object`)return!1;let t=Yy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zy in e)&&!(Xy in e)},fb=e=>{if(!lb(e)||rb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},pb=$y(`Date`),mb=$y(`File`),hb=e=>!!(e&&typeof e.uri<`u`),gb=e=>e&&typeof e.getParts<`u`,_b=$y(`Blob`),vb=$y(`FileList`),yb=e=>lb(e)&&sb(e.pipe);function bb(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var xb=bb(),Sb=typeof xb.FormData<`u`?xb.FormData:void 0,Cb=e=>{if(!e)return!1;if(Sb&&e instanceof Sb)return!0;let t=Yy(e);if(!t||t===Object.prototype||!sb(e.append))return!1;let n=Qy(e);return n===`formdata`||n===`object`&&sb(e.toString)&&e.toString()===`[object FormData]`},wb=$y(`URLSearchParams`),[Tb,Eb,Db,Ob]=[`ReadableStream`,`Request`,`Response`,`Headers`].map($y),kb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Ab(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>`u`)return;let r,i;if(typeof e!=`object`&&(e=[e]),tb(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(rb(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function jb(e,t){if(rb(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Mb=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Nb=e=>!nb(e)&&e!==Mb;function Pb(...e){let{caseless:t,skipUndefined:n}=Nb(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&jb(r,i)||i,o=Kb(r,a)?r[a]:void 0;db(o)&&db(e)?r[a]=Pb(o,e):db(e)?r[a]=Pb({},e):tb(e)?r[a]=e.slice():(!n||!nb(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&Ab(e[t],i);return r}var Fb=(e,t,n,{allOwnKeys:r}={})=>(Ab(t,(t,r)=>{n&&sb(t)?Object.defineProperty(e,r,{__proto__:null,value:qy(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ib=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lb=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Rb=(e,t,n,r)=>{let i,a,o,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Yy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Bb=e=>{if(!e)return null;if(tb(e))return e;let t=e.length;if(!cb(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},Vb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Yy(Uint8Array)),Hb=(e,t)=>{let n=(e&&e[Xy]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Ub=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wb=$y(`HTMLFormElement`),Gb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Kb=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qb=$y(`RegExp`),Jb=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Ab(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Yb=e=>{Jb(e,(t,n)=>{if(sb(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(sb(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})}})},Xb=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return tb(e)?r(e):r(String(e).split(t)),n},Zb=()=>{},Qb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $b(e){return!!(e&&sb(e.append)&&e[Zy]===`FormData`&&e[Xy])}var ex=e=>{let t=Array(10),n=(e,r)=>{if(lb(e)){if(t.indexOf(e)>=0)return;if(rb(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=tb(e)?[]:{};return Ab(e,(e,t)=>{let a=n(e,r+1);!nb(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},tx=$y(`AsyncFunction`),nx=e=>e&&(lb(e)||sb(e))&&sb(e.then)&&sb(e.catch),rx=((e,t)=>e?setImmediate:t?((e,t)=>(Mb.addEventListener(`message`,({source:n,data:r})=>{n===Mb&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Mb.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,sb(Mb.postMessage)),Q={isArray:tb,isArrayBuffer:ib,isBuffer:rb,isFormData:Cb,isArrayBufferView:ab,isString:ob,isNumber:cb,isBoolean:ub,isObject:lb,isPlainObject:db,isEmptyObject:fb,isReadableStream:Tb,isRequest:Eb,isResponse:Db,isHeaders:Ob,isUndefined:nb,isDate:pb,isFile:mb,isReactNativeBlob:hb,isReactNative:gb,isBlob:_b,isRegExp:qb,isFunction:sb,isStream:yb,isURLSearchParams:wb,isTypedArray:Vb,isFileList:vb,forEach:Ab,merge:Pb,extend:Fb,trim:kb,stripBOM:Ib,inherits:Lb,toFlatObject:Rb,kindOf:Qy,kindOfTest:$y,endsWith:zb,toArray:Bb,forEachEntry:Hb,matchAll:Ub,isHTMLForm:Wb,hasOwnProperty:Kb,hasOwnProp:Kb,reduceDescriptors:Jb,freezeMethods:Yb,toObjectSet:Xb,toCamelCase:Gb,noop:Zb,toFiniteNumber:Qb,findKey:jb,global:Mb,isContextDefined:Nb,isSpecCompliantForm:$b,toJSONObject:ex,isAsyncFn:tx,isThenable:nx,setImmediate:rx,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(Mb):typeof process<`u`&&process.nextTick||rx,isIterable:e=>e!=null&&sb(e[Xy])},ix=Q.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),ax=e=>{let t={},n,r,i;return e&&e.split(`
8
+ \v\f\r \xA0               \u2028\u2029`),oy}var ly,uy;function dy(){if(uy)return ly;uy=1;var e=jt(),t=Ut(),n=fo(),r=cy(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return ly={start:s(1),end:s(2),trim:s(3)},ly}var fy,py;function my(){if(py)return fy;py=1;var e=Ii().PROPER,t=Tt(),n=cy(),r=`​…᠎`;return fy=function(i){return t(function(){return!!n[i]()||r[i]()!==r||e&&n[i].name!==i})},fy}var hy;function gy(){if(hy)return ay;hy=1;var e=ca(),t=dy().trim;return e({target:`String`,proto:!0,forced:my()(`trim`)},{trim:function(){return t(this)}}),ay}gy();var _y={},vy;function yy(){if(vy)return _y;vy=1;var e=ca(),t=Kn(),n=Js(),r=sr(),i=Mn(),a=os(),o=fs(),s=Ds()(`find`,TypeError);return e({target:`Iterator`,proto:!0,real:!0,forced:s},{find:function(e){i(this);try{r(e)}catch(e){o(this,`throw`,e)}if(s)return t(s,this,e);var c=a(this),l=0;return n(c,function(t,n){if(e(t,l++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}}),_y}yy();function by(e){let{videoSize:t,mirroring:n,controlsWidth:r,cameraFrameOffsetWidth:i,landscapeAspectRatio:a,portraitAspectRatio:o,cameraFrameVerticalPositionMultiplier:s,cameraFrameHorizontalPositionMultiplier:c,newLayout:l}=e,u=t.width>t.height,d=u&&!l?r:0,f=(u?t.height:t.width)/100*(u?i==null?Af:i:i==null?l?Af:2:i),p=(t.width-(u?d:0))/t.height,m=u?a:o,h,g,_,v;if(u){p>m?(g=t.height-f*2,h=g*m,_=((!!l===n?d:0)+(t.width-d-h)/2)*(l||c==null?1:c),v=f):(h=t.width-d-f*2,g=h/m,_=(!!l===n?d:0)+f,v=(t.height-g)/2);let e=(t.width-h)/2;e>d+f&&!l&&(p>m&&c!==void 0||(_=e))}else p<m?(h=t.width-f*2,g=h/m,_=f,v=(t.height-g)/2*(l||s==null?1:s)):(g=t.height-f*2,h=g*m,_=(t.width-h)/2,v=f);return{height:Math.round(g),width:Math.round(h),left:Math.round(_),top:Math.round(v)}}function xy(e){let{videoSize:t,mirroring:n,controlsWidth:r,scenario:i,scenarioParams:a}=e,{cameraFramePortraitAspectRatio:o,cameraFrameLandscapeAspectRatio:s,cameraFrameOffsetWidth:c,cameraFrameVerticalPositionMultiplier:l,cameraFrameHorizontalPositionMultiplier:u,cameraFrame:d=!0,newLayout:f}=V_(),[p,m]=J(null);return Y(()=>{if(!d)return m(null);let e=!!t.width,p=!!t.height;if(!(e&&p&&a!=null&&a.length)||!i)return;let h=a.find(e=>e.name===i),g=window.RegulaDocumentSDK.recognizerProcessParam.processParam.doublePageSpread,_=g?h==null?void 0:h.frameKWHDoublePageSpreadLandscape:h==null?void 0:h.frameKWHLandscape,v=g?h==null?void 0:h.frameKWHDoublePageSpreadPortrait:h==null?void 0:h.frameKWHPortrait;if(!_||!v)return;let y=s==null?Number(_):s,b=o==null?Number(v):o,{width:x,height:S,top:C,left:w}=by({videoSize:t,mirroring:n,controlsWidth:r,cameraFrameOffsetWidth:c,landscapeAspectRatio:y,portraitAspectRatio:b,cameraFrameVerticalPositionMultiplier:l,cameraFrameHorizontalPositionMultiplier:u,newLayout:f});m({frameBottom:C+S,frameLeft:w,frameRight:w+x,frameTop:C})},[d,i,t,a,n,r,o,s,c,l,u,f]),p}function Sy(e,t,n){return(t=Cy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cy(e){var t=wy(e,`string`);return typeof t==`symbol`?t:t+``}function wy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ty=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Sy(this,`type`,void 0),Sy(this,`details`,void 0),this.type=e,this.details=t}},Ey={},Dy,Oy;function ky(){if(Oy)return Dy;Oy=1,im();var e=Kn(),t=Wi(),n=nm(),r=Tt(),i=kn(),a=Ci(),o=i(`species`),s=RegExp.prototype;return Dy=function(c,l,u,d){var f=i(c),p=!r(function(){var e={};return e[f]=function(){return 7},``[c](e)!==7}),m=p&&!r(function(){var e=!1,t=/a/;if(c===`split`){var n={};n[o]=function(){return t},t={constructor:n,flags:``},t[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](``),!e});if(!p||!m||u){var h=/./[f],g=l(f,``[c],function(t,r,i,a,o){var c=r.exec;return c===n||c===s.exec?p&&!o?{done:!0,value:e(h,r,i,a)}:{done:!0,value:e(t,i,r,a)}:{done:!1}});t(String.prototype,c,g[0]),t(s,f,g[1])}d&&a(s[f],`sham`,!0)},Dy}var Ay,jy;function My(){if(jy)return Ay;jy=1;var e=um().charAt;return Ay=function(t,n,r){return n+(r?e(t,n).length:1)},Ay}var Ny,Py;function Fy(){if(Py)return Ny;Py=1;var e=jt(),t=cn(),n=Math.floor,r=e(``.charAt),i=e(``.replace),a=e(``.slice),o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ny=function(e,c,l,u,d,f){var p=l+e.length,m=u.length,h=s;return d!==void 0&&(d=t(d),h=o),i(f,h,function(t,i){var o;switch(r(i,0)){case`$`:return`$`;case`&`:return e;case"`":return a(c,0,l);case`'`:return a(c,p);case`<`:o=d[a(i,1,-1)];break;default:var s=+i;if(s===0)return t;if(s>m){var f=n(s/10);return f===0?t:f<=m?u[f-1]===void 0?r(i,1):u[f-1]+r(i,1):t}o=u[s-1]}return o===void 0?``:o})},Ny}var Iy,Ly;function Ry(){if(Ly)return Iy;Ly=1;var e=H(),t=Tt(),n=e.RegExp;return Iy={correct:!t(function(){var e=!0;try{n(`.`,`d`)}catch(t){e=!1}var t={},r=``,i=e?`dgimsy`:`gimsy`,a=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(n.prototype,`flags`).get.call(t)!==i||r!==i})},Iy}var zy,By;function Vy(){if(By)return zy;By=1;var e=Kn(),t=dn(),n=Qn(),r=Ry(),i=Wp(),a=RegExp.prototype;return zy=r.correct?function(e){return e.flags}:function(o){return!r.correct&&n(a,o)&&!t(o,`flags`)?e(i,o):o.flags},zy}var Hy,Uy;function Wy(){if(Uy)return Hy;Uy=1;var e=Kn(),t=Mn(),n=pt(),r=Pt(),i=nm(),a=TypeError;return Hy=function(o,s){var c=o.exec;if(n(c)){var l=e(c,o,s);return l!==null&&t(l),l}if(r(o)===`RegExp`)return e(i,o,s);throw new a(`RegExp#exec called on incompatible receiver`)},Hy}var Gy;function Ky(){if(Gy)return Ey;Gy=1;var e=Xa(),t=Kn(),n=jt(),r=ky(),i=Tt(),a=Mn(),o=pt(),s=gt(),c=Dr(),l=Nr(),u=fo(),d=Ut(),f=My(),p=ur(),m=Fy(),h=Vy(),g=Wy(),_=kn()(`replace`),v=Math.max,y=Math.min,b=n([].concat),x=n([].push),S=n(``.indexOf),C=n(``.slice),w=function(e){return e===void 0?e:String(e)},T=(function(){return`a`.replace(/./,`$0`)===`$0`})(),E=(function(){return/./[_]?/./[_](`a`,`$0`)===``:!1})();return r(`replace`,function(n,r,i){var T=E?`$`:`$0`;return[function(e,n){var i=d(this),a=s(e)?p(e,_):void 0;return a?t(a,e,i,n):t(r,u(i),e,n)},function(t,n){var s=a(this),d=u(t);if(typeof n==`string`&&S(n,T)===-1&&S(n,`$<`)===-1){var p=i(r,s,d,n);if(p.done)return p.value}var _=o(n);_||(n=u(n));var E=u(h(s)),D=S(E,`g`)!==-1,O;D&&(O=S(E,`u`)!==-1,s.lastIndex=0);for(var k=[],A;A=g(s,d),!(A===null||(x(k,A),!D));)u(A[0])===``&&(s.lastIndex=f(d,l(s.lastIndex),O));for(var j=``,M=0,N=0;N<k.length;N++){A=k[N];for(var P=u(A[0]),F=v(y(c(A.index),d.length),0),I=[],L,ee=1;ee<A.length;ee++)x(I,w(A[ee]));var te=A.groups;if(_){var ne=b([P],I,F,d);te!==void 0&&x(ne,te),L=u(e(n,void 0,ne))}else L=m(P,d,F,I,te,n);F>=M&&(j+=C(d,M,F)+L,M=F+P.length)}return j+C(d,M)}]},!!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`})||!T||E),Ey}Ky();function qy(e,t){return function(){return e.apply(t,arguments)}}var{toString:Jy}=Object.prototype,{getPrototypeOf:Yy}=Object,{iterator:Xy,toStringTag:Zy}=Symbol,Qy=(e=>t=>{let n=Jy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$y=e=>(e=e.toLowerCase(),t=>Qy(t)===e),eb=e=>t=>typeof t===e,{isArray:tb}=Array,nb=eb(`undefined`);function rb(e){return e!==null&&!nb(e)&&e.constructor!==null&&!nb(e.constructor)&&sb(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ib=$y(`ArrayBuffer`);function ab(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ib(e.buffer),t}var ob=eb(`string`),sb=eb(`function`),cb=eb(`number`),lb=e=>typeof e==`object`&&!!e,ub=e=>e===!0||e===!1,db=e=>{if(Qy(e)!==`object`)return!1;let t=Yy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zy in e)&&!(Xy in e)},fb=e=>{if(!lb(e)||rb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},pb=$y(`Date`),mb=$y(`File`),hb=e=>!!(e&&typeof e.uri<`u`),gb=e=>e&&typeof e.getParts<`u`,_b=$y(`Blob`),vb=$y(`FileList`),yb=e=>lb(e)&&sb(e.pipe);function bb(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var xb=bb(),Sb=typeof xb.FormData<`u`?xb.FormData:void 0,Cb=e=>{if(!e)return!1;if(Sb&&e instanceof Sb)return!0;let t=Yy(e);if(!t||t===Object.prototype||!sb(e.append))return!1;let n=Qy(e);return n===`formdata`||n===`object`&&sb(e.toString)&&e.toString()===`[object FormData]`},wb=$y(`URLSearchParams`),[Tb,Eb,Db,Ob]=[`ReadableStream`,`Request`,`Response`,`Headers`].map($y),kb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Ab(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>`u`)return;let r,i;if(typeof e!=`object`&&(e=[e]),tb(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(rb(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function jb(e,t){if(rb(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Mb=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Nb=e=>!nb(e)&&e!==Mb;function Pb(...e){let{caseless:t,skipUndefined:n}=Nb(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&jb(r,i)||i,o=Kb(r,a)?r[a]:void 0;db(o)&&db(e)?r[a]=Pb(o,e):db(e)?r[a]=Pb({},e):tb(e)?r[a]=e.slice():n&&nb(e)||(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&Ab(e[t],i);return r}var Fb=(e,t,n,{allOwnKeys:r}={})=>(Ab(t,(t,r)=>{n&&sb(t)?Object.defineProperty(e,r,{__proto__:null,value:qy(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ib=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lb=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Rb=(e,t,n,r)=>{let i,a,o,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=n!==!1&&Yy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Bb=e=>{if(!e)return null;if(tb(e))return e;let t=e.length;if(!cb(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},Vb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Yy(Uint8Array)),Hb=(e,t)=>{let n=(e&&e[Xy]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Ub=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wb=$y(`HTMLFormElement`),Gb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Kb=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qb=$y(`RegExp`),Jb=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Ab(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Yb=e=>{Jb(e,(t,n)=>{if(sb(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(sb(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})}})},Xb=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return tb(e)?r(e):r(String(e).split(t)),n},Zb=()=>{},Qb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $b(e){return!!(e&&sb(e.append)&&e[Zy]===`FormData`&&e[Xy])}var ex=e=>{let t=Array(10),n=(e,r)=>{if(lb(e)){if(t.indexOf(e)>=0)return;if(rb(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=tb(e)?[]:{};return Ab(e,(e,t)=>{let a=n(e,r+1);!nb(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},tx=$y(`AsyncFunction`),nx=e=>e&&(lb(e)||sb(e))&&sb(e.then)&&sb(e.catch),rx=((e,t)=>e?setImmediate:t?((e,t)=>(Mb.addEventListener(`message`,({source:n,data:r})=>{n===Mb&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Mb.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,sb(Mb.postMessage)),Q={isArray:tb,isArrayBuffer:ib,isBuffer:rb,isFormData:Cb,isArrayBufferView:ab,isString:ob,isNumber:cb,isBoolean:ub,isObject:lb,isPlainObject:db,isEmptyObject:fb,isReadableStream:Tb,isRequest:Eb,isResponse:Db,isHeaders:Ob,isUndefined:nb,isDate:pb,isFile:mb,isReactNativeBlob:hb,isReactNative:gb,isBlob:_b,isRegExp:qb,isFunction:sb,isStream:yb,isURLSearchParams:wb,isTypedArray:Vb,isFileList:vb,forEach:Ab,merge:Pb,extend:Fb,trim:kb,stripBOM:Ib,inherits:Lb,toFlatObject:Rb,kindOf:Qy,kindOfTest:$y,endsWith:zb,toArray:Bb,forEachEntry:Hb,matchAll:Ub,isHTMLForm:Wb,hasOwnProperty:Kb,hasOwnProp:Kb,reduceDescriptors:Jb,freezeMethods:Yb,toObjectSet:Xb,toCamelCase:Gb,noop:Zb,toFiniteNumber:Qb,findKey:jb,global:Mb,isContextDefined:Nb,isSpecCompliantForm:$b,toJSONObject:ex,isAsyncFn:tx,isThenable:nx,setImmediate:rx,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(Mb):typeof process<`u`&&process.nextTick||rx,isIterable:e=>e!=null&&sb(e[Xy])},ix=Q.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),ax=e=>{let t={},n,r,i;return e&&e.split(`
9
9
  `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&ix[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},ox=Symbol(`internals`),sx=/[^\x09\x20-\x7E\x80-\xFF]/g;function cx(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function lx(e){return e&&String(e).trim().toLowerCase()}function ux(e){return cx(e.replace(sx,``))}function dx(e){return e===!1||e==null?e:Q.isArray(e)?e.map(dx):ux(String(e))}function fx(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var px=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mx(e,t,n,r,i){if(Q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function hx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function gx(e,t){let n=Q.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var _x=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=lx(t);if(!i)throw Error(`header name must be a non-empty string`);let a=Q.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=dx(e))}let a=(e,t)=>Q.forEach(e,(e,n)=>i(e,n,t));if(Q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Q.isString(e)&&(e=e.trim())&&!px(e))a(ax(e),t);else if(Q.isObject(e)&&Q.isIterable(e)){let n={},r,i;for(let t of e){if(!Q.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?Q.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=lx(e),e){let n=Q.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return fx(e);if(Q.isFunction(t))return t.call(this,e,n);if(Q.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=lx(e),e){let n=Q.findKey(this,e);return!(!n||this[n]===void 0||t&&!mx(this,this[n],n,t))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=lx(e),e){let i=Q.findKey(n,e);i&&(!t||mx(n,n[i],i,t))&&(delete n[i],r=!0)}}return Q.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||mx(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return Q.forEach(this,(r,i)=>{let a=Q.findKey(n,i);if(a){t[a]=dx(r),delete t[i];return}let o=e?hx(i):String(i).trim();o!==i&&delete t[i],t[o]=dx(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Q.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&Q.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
10
- `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[ox]=this[ox]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=lx(e);t[r]||(gx(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}};_x.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Q.reduceDescriptors(_x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(_x);var vx=`[REDACTED ****]`;function yx(e){if(Q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function bx(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||Q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof _x&&(e=e.toJSON()),r.push(e);let t;if(Q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);Q.isUndefined(r)||(t[n]=r)});else{if(!Q.isPlainObject(e)&&yx(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?vx:i(a);Q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var $=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&Q.hasOwnProp(e,`redact`)?e.redact:void 0,n=Q.isArray(t)&&t.length>0?bx(e,t):Q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};$.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,$.ERR_BAD_OPTION=`ERR_BAD_OPTION`,$.ECONNABORTED=`ECONNABORTED`,$.ETIMEDOUT=`ETIMEDOUT`,$.ECONNREFUSED=`ECONNREFUSED`,$.ERR_NETWORK=`ERR_NETWORK`,$.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,$.ERR_DEPRECATED=`ERR_DEPRECATED`,$.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,$.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,$.ERR_CANCELED=`ERR_CANCELED`,$.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,$.ERR_INVALID_URL=`ERR_INVALID_URL`,$.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;var xx=null;function Sx(e){return Q.isPlainObject(e)||Q.isArray(e)}function Cx(e){return Q.endsWith(e,`[]`)?e.slice(0,-2):e}function wx(e,t,n){return e?e.concat(t).map(function(e,t){return e=Cx(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Tx(e){return Q.isArray(e)&&!e.some(Sx)}var Ex=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)});function Dx(e,t,n){if(!Q.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Q.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&Q.isSpecCompliantForm(t);if(!Q.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(Q.isDate(e))return e.toISOString();if(Q.isBoolean(e))return e.toString();if(!l&&Q.isBlob(e))throw new $(`Blob is not supported. Use a Buffer instead.`);return Q.isArrayBuffer(e)||Q.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(Q.isReactNative(t)&&Q.isReactNativeBlob(e))return t.append(wx(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(Q.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&Tx(e)||(Q.isFileList(e)||Q.endsWith(n,`[]`))&&(s=Q.toArray(e)))return n=Cx(n),s.forEach(function(e,r){!(Q.isUndefined(e)||e===null)&&t.append(o===!0?wx([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Sx(e)?!0:(t.append(wx(i,n,a),u(e)),!1)}let f=[],p=Object.assign(Ex,{defaultVisitor:d,convertValue:u,isVisitable:Sx});function m(e,n,r=0){if(!Q.isUndefined(e)){if(r>c)throw new $(`Object is too deeply nested (`+r+` levels). Max depth: `+c,$.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),Q.forEach(e,function(e,a){(!(Q.isUndefined(e)||e===null)&&i.call(t,e,Q.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!Q.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function Ox(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function kx(e,t){this._pairs=[],e&&Dx(e,this,t)}var Ax=kx.prototype;Ax.append=function(e,t){this._pairs.push([e,t])},Ax.toString=function(e){let t=e?function(t){return e.call(this,t,Ox)}:Ox;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function jx(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Mx(e,t,n){if(!t)return e;let r=n&&n.encode||jx,i=Q.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):Q.isURLSearchParams(t)?t.toString():new kx(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Nx=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,function(t){t!==null&&e(t)})}},Px={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Fx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:kx,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Ix=typeof window<`u`&&typeof document<`u`,Lx=typeof navigator==`object`&&navigator||void 0,Rx=Ix&&(!Lx||[`ReactNative`,`NativeScript`,`NS`].indexOf(Lx.product)<0),zx=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Bx=Ix&&window.location.href||`http://localhost`,Vx=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ix,hasStandardBrowserEnv:Rx,hasStandardBrowserWebWorkerEnv:zx,navigator:Lx,origin:Bx},Symbol.toStringTag,{value:`Module`}))),Fx);function Hx(e,t){return Dx(e,new Vx.classes.URLSearchParams,B({visitor:function(e,t,n,r){return Vx.isNode&&Q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Ux(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Wx(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Gx(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&Q.isArray(r)?r.length:a,s?(Q.hasOwnProp(r,a)?r[a]=Q.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!Q.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&Q.isArray(r[a])&&(r[a]=Wx(r[a])),!o)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){let n={};return Q.forEachEntry(e,(e,r)=>{t(Ux(e),r,n,0)}),n}return null}var Kx=(e,t)=>e!=null&&Q.hasOwnProp(e,t)?e[t]:void 0;function qx(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Jx={transitional:Px,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=Q.isObject(e);if(i&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return r?JSON.stringify(Gx(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Kx(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Hx(e,t).toString();if((a=Q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Kx(this,`env`),r=n&&n.FormData;return Dx(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),qx(e)):e}],transformResponse:[function(e){let t=Kx(this,`transitional`)||Jx.transitional,n=t&&t.forcedJSONParsing,r=Kx(this,`responseType`),i=r===`json`;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Kx(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?$.from(e,$.ERR_BAD_RESPONSE,this,null,Kx(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vx.classes.FormData,Blob:Vx.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Jx.headers[e]={}});function Yx(e,t){let n=this||Jx,r=t||n,i=_x.from(r.headers),a=r.data;return Q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Xx(e){return!!(e&&e.__CANCEL__)}var Zx=class extends ${constructor(e,t,n){super(e==null?`canceled`:e,$.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Qx(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $(`Request failed with status code `+n.status,n.status>=400&&n.status<500?$.ERR_BAD_REQUEST:$.ERR_BAD_RESPONSE,n.config,n.request,n))}function $x(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function eS(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function tS(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||(a=setTimeout(()=>{a=null,o(i)},r-s)))},()=>i&&o(i)]}var nS=(e,t,n=3)=>{let r=0,i=eS(50,250);return tS(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},rS=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},iS=e=>(...t)=>Q.asap(()=>e(...t)),aS=Vx.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Vx.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Vx.origin),Vx.navigator&&/(msie|trident)/i.test(Vx.navigator.userAgent)):()=>!0,oS=Vx.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&s.push(`path=${r}`),Q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function sS(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cS(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function lS(e,t,n){let r=!sS(t);return e&&(r||n===!1)?cS(e,t):t}var uS=e=>e instanceof _x?B({},e):e;function dS(e,t){t=t||{};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){if(Q.isUndefined(t)){if(!Q.isUndefined(e))return r(void 0,e,n,i)}else return r(e,t,n,i)}function a(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function o(e,t){if(Q.isUndefined(t)){if(!Q.isUndefined(e))return r(void 0,e)}else return r(void 0,t)}function s(n,i,a){if(Q.hasOwnProp(t,a))return r(n,i);if(Q.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(uS(e),uS(t),n,!0)};return Q.forEach(Object.keys(B(B({},e),t)),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Q.hasOwnProp(c,r)?c[r]:i,o=a(Q.hasOwnProp(e,r)?e[r]:void 0,Q.hasOwnProp(t,r)?t[r]:void 0,r);Q.isUndefined(o)&&a!==s||(n[r]=o)}),n}var fS=[`content-type`,`content-length`];function pS(e,t,n){n===`content-only`?Object.entries(t).forEach(([t,n])=>{fS.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var mS=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),hS=e=>{let t=dS({},e),n=e=>Q.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=_x.from(s),t.url=Mx(lS(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?mS(c.password):``))),Q.isFormData(r)&&(Vx.hasStandardBrowserEnv||Vx.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):Q.isFunction(r.getHeaders)&&pS(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Vx.hasStandardBrowserEnv&&(Q.isFunction(i)&&(i=i(t)),i===!0||i==null&&aS(t.url))){let e=a&&o&&oS.read(o);e&&s.set(a,e)}return t},gS=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=hS(e),i=r.data,a=_x.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=_x.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Qx(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&(n(new $(`Request aborted`,$.ECONNABORTED,e,h)),m(),h=null)},h.onerror=function(t){let r=new $(t&&t.message?t.message:`Network Error`,$.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Px;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $(t,i.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Q.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=nS(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=nS(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&(n(!t||t.type?new Zx(null,e,h):t),h.abort(),m(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=$x(r.url);_&&!Vx.protocols.includes(_)?n(new $(`Unsupported protocol `+_+`:`,$.ERR_BAD_REQUEST,e)):h.send(i||null)})},_S=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof $?t:new Zx(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new $(`timeout of ${t}ms exceeded`,$.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>Q.asap(o),s}},vS=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},yS=function(e,t){return $e(this,null,function*(){try{for(var n=tt(bS(e)),r,i,a;r=!(i=yield new Qe(n.next())).done;r=!1){let e=i.value;yield*et(vS(e,t))}}catch(e){a=[e]}finally{try{r&&(i=n.return)&&(yield new Qe(i.call(n)))}finally{if(a)throw a[0]}}})},bS=function(e){return $e(this,null,function*(){if(e[Symbol.asyncIterator]){yield*et(e);return}let t=e.getReader();try{for(;;){let{done:e,value:n}=yield new Qe(t.read());if(e)break;yield n}}finally{yield new Qe(t.cancel())}})},xS=(e,t,n,r)=>{let i=yS(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({pull(e){return V(this,null,function*(){try{let{done:t,value:r}=yield i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}})},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function SS(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var CS=`1.16.0`,wS=65536,{isFunction:TS}=Q,ES=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},DS=e=>{var t;let n=(t=Q.global)==null?globalThis:t,{ReadableStream:r,TextEncoder:i}=n;e=Q.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);let{fetch:a,Request:o,Response:s}=e,c=a?TS(a):typeof fetch==`function`,l=TS(o),u=TS(s);if(!c)return!1;let d=c&&TS(r),f=c&&(typeof i==`function`?(e=>t=>e.encode(t))(new i):e=>V(null,null,function*(){return new Uint8Array(yield new o(e).arrayBuffer())})),p=l&&d&&ES(()=>{let e=!1,t=new o(Vx.origin,{body:new r,method:`POST`,get duplex(){return e=!0,`half`}}),n=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!n}),m=u&&d&&ES(()=>Q.isReadableStream(new s(``).body)),h={stream:m&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,n)})});let g=e=>V(null,null,function*(){if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(yield new o(Vx.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e)||Q.isArrayBuffer(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e+=``),Q.isString(e))return(yield f(e)).byteLength}),_=(e,t)=>V(null,null,function*(){let n=Q.toFiniteNumber(e.getContentLength());return n==null?g(t):n});return e=>V(null,null,function*(){let{url:t,method:n,data:r,signal:c,cancelToken:u,timeout:d,onDownloadProgress:f,onUploadProgress:g,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=hS(e),w=Q.isNumber(S)&&S>-1,T=Q.isNumber(C)&&C>-1,E=a||fetch;v=v?(v+``).toLowerCase():`text`;let D=_S([c,u&&u.toAbortSignal()],d),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&SS(t)>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O);if(T&&n!==`get`&&n!==`head`){let t=yield _(y,r);if(typeof t==`number`&&isFinite(t)&&t>C)throw new $(`Request body larger than maxBodyLength limit`,$.ERR_BAD_REQUEST,e,O)}if(g&&p&&n!==`get`&&n!==`head`&&(A=yield _(y,r))!==0){let e=new o(t,{method:`POST`,body:r,duplex:`half`}),n;if(Q.isFormData(r)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=rS(A,nS(iS(g)));r=xS(e.body,wS,t,n)}}Q.isString(b)||(b=b?`include`:`omit`);let a=l&&`credentials`in o.prototype;if(Q.isFormData(r)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+CS,!1);let c=Xe(B({},x),{signal:D,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:r,duplex:`half`,credentials:a?b:void 0});O=l&&new o(t,c);let u=yield l?E(O,x):E(t,c);if(w){let t=Q.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O)}let d=m&&(v===`stream`||v===`response`);if(m&&u.body&&(f||w||d&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=Q.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=f&&rS(n,nS(iS(f),!0))||[],a=0;u=new s(xS(u.body,wS,t=>{if(w&&(a=t,a>S))throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}v=v||`text`;let j=yield h[Q.findKey(h,v)||`text`](u,e);if(w&&!m&&!d){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof i==`function`?new i().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O)}return!d&&k&&k(),yield new Promise((t,n)=>{Qx(t,n,{data:j,headers:_x.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof $){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new $(`Network Error`,$.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t}):$.from(t,t&&t.code,e,O,t&&t.response)}})},OS=new Map,kS=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=OS;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:DS(t)),l=c;return c};kS();var AS={http:xx,xhr:gS,fetch:{get:kS}};Q.forEach(AS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var jS=e=>`- ${e}`,MS=e=>Q.isFunction(e)||e===null||e===!1;function NS(e,t){e=Q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!MS(r)&&(i=AS[(n=String(r)).toLowerCase()],i===void 0))throw new $(`Unknown adapter '${n}'`);if(i&&(Q.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new $(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
10
+ `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[ox]=this[ox]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=lx(e);t[r]||(gx(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}};_x.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Q.reduceDescriptors(_x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(_x);var vx=`[REDACTED ****]`;function yx(e){if(Q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function bx(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||Q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof _x&&(e=e.toJSON()),r.push(e);let t;if(Q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);Q.isUndefined(r)||(t[n]=r)});else{if(!Q.isPlainObject(e)&&yx(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?vx:i(a);Q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var $=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&Q.hasOwnProp(e,`redact`)?e.redact:void 0,n=Q.isArray(t)&&t.length>0?bx(e,t):Q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};$.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,$.ERR_BAD_OPTION=`ERR_BAD_OPTION`,$.ECONNABORTED=`ECONNABORTED`,$.ETIMEDOUT=`ETIMEDOUT`,$.ECONNREFUSED=`ECONNREFUSED`,$.ERR_NETWORK=`ERR_NETWORK`,$.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,$.ERR_DEPRECATED=`ERR_DEPRECATED`,$.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,$.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,$.ERR_CANCELED=`ERR_CANCELED`,$.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,$.ERR_INVALID_URL=`ERR_INVALID_URL`,$.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;var xx=null;function Sx(e){return Q.isPlainObject(e)||Q.isArray(e)}function Cx(e){return Q.endsWith(e,`[]`)?e.slice(0,-2):e}function wx(e,t,n){return e?e.concat(t).map(function(e,t){return e=Cx(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Tx(e){return Q.isArray(e)&&!e.some(Sx)}var Ex=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)});function Dx(e,t,n){if(!Q.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Q.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&Q.isSpecCompliantForm(t);if(!Q.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(Q.isDate(e))return e.toISOString();if(Q.isBoolean(e))return e.toString();if(!l&&Q.isBlob(e))throw new $(`Blob is not supported. Use a Buffer instead.`);return Q.isArrayBuffer(e)||Q.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(Q.isReactNative(t)&&Q.isReactNativeBlob(e))return t.append(wx(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(Q.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&Tx(e)||(Q.isFileList(e)||Q.endsWith(n,`[]`))&&(s=Q.toArray(e)))return n=Cx(n),s.forEach(function(e,r){!(Q.isUndefined(e)||e===null)&&t.append(o===!0?wx([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Sx(e)?!0:(t.append(wx(i,n,a),u(e)),!1)}let f=[],p=Object.assign(Ex,{defaultVisitor:d,convertValue:u,isVisitable:Sx});function m(e,n,r=0){if(!Q.isUndefined(e)){if(r>c)throw new $(`Object is too deeply nested (`+r+` levels). Max depth: `+c,$.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),Q.forEach(e,function(e,a){(!(Q.isUndefined(e)||e===null)&&i.call(t,e,Q.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!Q.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function Ox(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function kx(e,t){this._pairs=[],e&&Dx(e,this,t)}var Ax=kx.prototype;Ax.append=function(e,t){this._pairs.push([e,t])},Ax.toString=function(e){let t=e?function(t){return e.call(this,t,Ox)}:Ox;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function jx(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Mx(e,t,n){if(!t)return e;let r=n&&n.encode||jx,i=Q.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):Q.isURLSearchParams(t)?t.toString():new kx(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Nx=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,function(t){t!==null&&e(t)})}},Px={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Fx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:kx,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Ix=typeof window<`u`&&typeof document<`u`,Lx=typeof navigator==`object`&&navigator||void 0,Rx=Ix&&(!Lx||[`ReactNative`,`NativeScript`,`NS`].indexOf(Lx.product)<0),zx=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Bx=Ix&&window.location.href||`http://localhost`,Vx=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ix,hasStandardBrowserEnv:Rx,hasStandardBrowserWebWorkerEnv:zx,navigator:Lx,origin:Bx},Symbol.toStringTag,{value:`Module`}))),Fx);function Hx(e,t){return Dx(e,new Vx.classes.URLSearchParams,B({visitor:function(e,t,n,r){return Vx.isNode&&Q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Ux(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Wx(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Gx(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&Q.isArray(r)?r.length:a,s?(Q.hasOwnProp(r,a)?r[a]=Q.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):(r[a]&&Q.isObject(r[a])||(r[a]=[]),t(e,n,r[a],i)&&Q.isArray(r[a])&&(r[a]=Wx(r[a])),!o)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){let n={};return Q.forEachEntry(e,(e,r)=>{t(Ux(e),r,n,0)}),n}return null}var Kx=(e,t)=>e!=null&&Q.hasOwnProp(e,t)?e[t]:void 0;function qx(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Jx={transitional:Px,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=Q.isObject(e);if(i&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return r?JSON.stringify(Gx(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Kx(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Hx(e,t).toString();if((a=Q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Kx(this,`env`),r=n&&n.FormData;return Dx(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),qx(e)):e}],transformResponse:[function(e){let t=Kx(this,`transitional`)||Jx.transitional,n=t&&t.forcedJSONParsing,r=Kx(this,`responseType`),i=r===`json`;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Kx(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?$.from(e,$.ERR_BAD_RESPONSE,this,null,Kx(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vx.classes.FormData,Blob:Vx.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Jx.headers[e]={}});function Yx(e,t){let n=this||Jx,r=t||n,i=_x.from(r.headers),a=r.data;return Q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Xx(e){return!!(e&&e.__CANCEL__)}var Zx=class extends ${constructor(e,t,n){super(e==null?`canceled`:e,$.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Qx(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $(`Request failed with status code `+n.status,n.status>=400&&n.status<500?$.ERR_BAD_REQUEST:$.ERR_BAD_RESPONSE,n.config,n.request,n))}function $x(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function eS(e,t){e=e||10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function tS(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||(a=setTimeout(()=>{a=null,o(i)},r-s)))},()=>i&&o(i)]}var nS=(e,t,n=3)=>{let r=0,i=eS(50,250);return tS(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},rS=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},iS=e=>(...t)=>Q.asap(()=>e(...t)),aS=Vx.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Vx.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Vx.origin),Vx.navigator&&/(msie|trident)/i.test(Vx.navigator.userAgent)):()=>!0,oS=Vx.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&s.push(`path=${r}`),Q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function sS(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cS(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function lS(e,t,n){let r=!sS(t);return e&&(r||n===!1)?cS(e,t):t}var uS=e=>e instanceof _x?B({},e):e;function dS(e,t){t=t||{};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){if(Q.isUndefined(t)){if(!Q.isUndefined(e))return r(void 0,e,n,i)}else return r(e,t,n,i)}function a(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function o(e,t){if(Q.isUndefined(t)){if(!Q.isUndefined(e))return r(void 0,e)}else return r(void 0,t)}function s(n,i,a){if(Q.hasOwnProp(t,a))return r(n,i);if(Q.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(uS(e),uS(t),n,!0)};return Q.forEach(Object.keys(B(B({},e),t)),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Q.hasOwnProp(c,r)?c[r]:i,o=a(Q.hasOwnProp(e,r)?e[r]:void 0,Q.hasOwnProp(t,r)?t[r]:void 0,r);Q.isUndefined(o)&&a!==s||(n[r]=o)}),n}var fS=[`content-type`,`content-length`];function pS(e,t,n){n===`content-only`?Object.entries(t).forEach(([t,n])=>{fS.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var mS=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),hS=e=>{let t=dS({},e),n=e=>Q.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=_x.from(s),t.url=Mx(lS(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?mS(c.password):``))),Q.isFormData(r)&&(Vx.hasStandardBrowserEnv||Vx.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):Q.isFunction(r.getHeaders)&&pS(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Vx.hasStandardBrowserEnv&&(Q.isFunction(i)&&(i=i(t)),i===!0||i==null&&aS(t.url))){let e=a&&o&&oS.read(o);e&&s.set(a,e)}return t},gS=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=hS(e),i=r.data,a=_x.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=_x.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Qx(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&(n(new $(`Request aborted`,$.ECONNABORTED,e,h)),m(),h=null)},h.onerror=function(t){let r=new $(t&&t.message?t.message:`Network Error`,$.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Px;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $(t,i.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Q.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=nS(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=nS(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&(n(!t||t.type?new Zx(null,e,h):t),h.abort(),m(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=$x(r.url);_&&!Vx.protocols.includes(_)?n(new $(`Unsupported protocol `+_+`:`,$.ERR_BAD_REQUEST,e)):h.send(i||null)})},_S=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof $?t:new Zx(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new $(`timeout of ${t}ms exceeded`,$.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>Q.asap(o),s}},vS=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},yS=function(e,t){return $e(this,null,function*(){try{for(var n=tt(bS(e)),r,i,a;r=!(i=yield new Qe(n.next())).done;r=!1){let e=i.value;yield*et(vS(e,t))}}catch(e){a=[e]}finally{try{r&&(i=n.return)&&(yield new Qe(i.call(n)))}finally{if(a)throw a[0]}}})},bS=function(e){return $e(this,null,function*(){if(e[Symbol.asyncIterator]){yield*et(e);return}let t=e.getReader();try{for(;;){let{done:e,value:n}=yield new Qe(t.read());if(e)break;yield n}}finally{yield new Qe(t.cancel())}})},xS=(e,t,n,r)=>{let i=yS(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({pull(e){return V(this,null,function*(){try{let{done:t,value:r}=yield i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}})},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function SS(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var CS=`1.16.0`,wS=65536,{isFunction:TS}=Q,ES=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},DS=e=>{var t;let n=(t=Q.global)==null?globalThis:t,{ReadableStream:r,TextEncoder:i}=n;e=Q.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);let{fetch:a,Request:o,Response:s}=e,c=a?TS(a):typeof fetch==`function`,l=TS(o),u=TS(s);if(!c)return!1;let d=c&&TS(r),f=c&&(typeof i==`function`?(e=>t=>e.encode(t))(new i):e=>V(null,null,function*(){return new Uint8Array(yield new o(e).arrayBuffer())})),p=l&&d&&ES(()=>{let e=!1,t=new o(Vx.origin,{body:new r,method:`POST`,get duplex(){return e=!0,`half`}}),n=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!n}),m=u&&d&&ES(()=>Q.isReadableStream(new s(``).body)),h={stream:m&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,n)})});let g=e=>V(null,null,function*(){if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(yield new o(Vx.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e)||Q.isArrayBuffer(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e+=``),Q.isString(e))return(yield f(e)).byteLength}),_=(e,t)=>V(null,null,function*(){let n=Q.toFiniteNumber(e.getContentLength());return n==null?g(t):n});return e=>V(null,null,function*(){let{url:t,method:n,data:r,signal:c,cancelToken:u,timeout:d,onDownloadProgress:f,onUploadProgress:g,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=hS(e),w=Q.isNumber(S)&&S>-1,T=Q.isNumber(C)&&C>-1,E=a||fetch;v=v?(v+``).toLowerCase():`text`;let D=_S([c,u&&u.toAbortSignal()],d),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&SS(t)>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O);if(T&&n!==`get`&&n!==`head`){let t=yield _(y,r);if(typeof t==`number`&&isFinite(t)&&t>C)throw new $(`Request body larger than maxBodyLength limit`,$.ERR_BAD_REQUEST,e,O)}if(g&&p&&n!==`get`&&n!==`head`&&(A=yield _(y,r))!==0){let e=new o(t,{method:`POST`,body:r,duplex:`half`}),n;if(Q.isFormData(r)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=rS(A,nS(iS(g)));r=xS(e.body,wS,t,n)}}Q.isString(b)||(b=b?`include`:`omit`);let a=l&&`credentials`in o.prototype;if(Q.isFormData(r)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+CS,!1);let c=Xe(B({},x),{signal:D,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:r,duplex:`half`,credentials:a?b:void 0});O=l&&new o(t,c);let u=yield l?E(O,x):E(t,c);if(w){let t=Q.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O)}let d=m&&(v===`stream`||v===`response`);if(m&&u.body&&(f||w||d&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=Q.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=f&&rS(n,nS(iS(f),!0))||[],a=0;u=new s(xS(u.body,wS,t=>{if(w&&(a=t,a>S))throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}v=v||`text`;let j=yield h[Q.findKey(h,v)||`text`](u,e);if(w&&!m&&!d){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof i==`function`?new i().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new $(`maxContentLength size of `+S+` exceeded`,$.ERR_BAD_RESPONSE,e,O)}return!d&&k&&k(),yield new Promise((t,n)=>{Qx(t,n,{data:j,headers:_x.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof $){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new $(`Network Error`,$.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t}):$.from(t,t&&t.code,e,O,t&&t.response)}})},OS=new Map,kS=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=OS;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:DS(t)),l=c;return c};kS();var AS={http:xx,xhr:gS,fetch:{get:kS}};Q.forEach(AS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var jS=e=>`- ${e}`,MS=e=>Q.isFunction(e)||e===null||e===!1;function NS(e,t){e=Q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!MS(r)&&(i=AS[(n=String(r)).toLowerCase()],i===void 0))throw new $(`Unknown adapter '${n}'`);if(i&&(Q.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new $(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
11
11
  `+e.map(jS).join(`
12
12
  `):` `+jS(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var PS={getAdapter:NS,adapters:AS};function FS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zx(null,e)}function IS(e){return FS(e),e.headers=_x.from(e.headers),e.data=Yx.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),PS.getAdapter(e.adapter||Jx.adapter,e)(e).then(function(t){FS(e),e.response=t;try{t.data=Yx.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=_x.from(t.headers),t},function(t){if(!Xx(t)&&(FS(e),t&&t.response)){e.response=t.response;try{t.response.data=Yx.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=_x.from(t.response.headers)}return Promise.reject(t)})}var LS={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{LS[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var RS={};LS.transitional=function(e,t,n){function r(e,t){return`[Axios v1.16.0] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new $(r(i,` has been removed`+(t?` in `+t:``)),$.ERR_DEPRECATED);return t&&!RS[i]&&(RS[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},LS.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function zS(e,t,n){if(typeof e!=`object`)throw new $(`options must be an object`,$.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new $(`option `+a+` must be `+n,$.ERR_BAD_OPTION_VALUE)}else if(n!==!0)throw new $(`Unknown option `+a,$.ERR_BAD_OPTION)}}var BS={assertOptions:zS,validators:LS},VS=BS.validators,HS=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Nx,response:new Nx}}request(e,t){return V(this,null,function*(){try{return yield this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
13
13
  `);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
@@ -32,7 +32,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
32
32
  <slot />
33
33
  `}},qI=function(e,t){return qI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qI(e,t)};function JI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);qI(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function YI(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())})}function XI(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.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}}}function ZI(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function QI(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}function $I(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 eL(e){return this instanceof eL?(this.v=e,this):new eL(e)}function tL(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof eL?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function nL(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ZI==`function`?ZI(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function rL(e){return typeof e==`function`}function iL(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var aL=iL(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
34
34
  `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
35
- `):``,this.name=`UnsubscriptionError`,this.errors=t}});function oL(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sL=(function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ZI(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(rL(c))try{c()}catch(e){i=e instanceof aL?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ZI(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{uL(f)}catch(e){i=i==null?[]:i,e instanceof aL?i=$I($I([],QI(i)),QI(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new aL(i)}},e.prototype.add=function(t){var n;if(t&&t!==this){if(this.closed)uL(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)==null?[]:n).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&oL(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&oL(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cL=sL.EMPTY;function lL(e){return e instanceof sL||e&&`closed`in e&&rL(e.remove)&&rL(e.add)&&rL(e.unsubscribe)}function uL(e){rL(e)?e():e.unsubscribe()}var dL={Promise:void 0},fL={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$I([e,t],QI(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function pL(e){fL.setTimeout(function(){throw e})}function mL(){}function hL(e){e()}var gL=(function(e){JI(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,lL(t)&&t.add(n)):n.destination=xL,n}return t.create=function(e,t,n){return new vL(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(sL),_L=(function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){yL(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){yL(e)}else yL(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){yL(e)}},e})(),vL=(function(e){JI(t,e);function t(t,n,r){var i=e.call(this)||this;return i.destination=new _L(rL(t)||!t?{next:t==null?void 0:t,error:n==null?void 0:n,complete:r==null?void 0:r}:t),i}return t})(gL);function yL(e){pL(e)}function bL(e){throw e}var xL={closed:!0,next:mL,error:bL,complete:mL},SL=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function CL(e){return e}function wL(e){return e.length===0?CL:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var TL=(function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=OL(e)?e:new vL(e,t,n);return hL(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=EL(t),new t(function(t,r){var i=new vL({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return(t=this.source)==null?void 0:t.subscribe(e)},e.prototype[SL]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wL(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=EL(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e})();function EL(e){var t;return(t=e==null?dL.Promise:e)==null?Promise:t}function DL(e){return e&&rL(e.next)&&rL(e.error)&&rL(e.complete)}function OL(e){return e&&e instanceof gL||DL(e)&&lL(e)}function kL(e){return rL(e==null?void 0:e.lift)}function AL(e){return function(t){if(kL(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function jL(e,t,n,r,i){return new ML(e,t,n,r,i)}var ML=(function(e){JI(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t})(gL),NL=iL(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),PL=(function(e){JI(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new FL(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new NL},t.prototype.next=function(e){var t=this;hL(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ZI(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;hL(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;hL(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)==null?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?cL:(this.currentObservers=null,a.push(e),new sL(function(){t.currentObservers=null,oL(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new TL;return e.source=this,e},t.create=function(e,t){return new FL(e,t)},t})(TL),FL=(function(e){JI(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)==null?void 0:e.complete)==null||t.call(e)},t.prototype._subscribe=function(e){var t,n;return(n=(t=this.source)==null?void 0:t.subscribe(e))==null?cL:n},t})(PL),IL=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function LL(e){return rL(e==null?void 0:e.then)}function RL(e){return rL(e[SL])}function zL(e){return Symbol.asyncIterator&&rL(e==null?void 0:e[Symbol.asyncIterator])}function BL(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function VL(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var HL=VL();function UL(e){return rL(e==null?void 0:e[HL])}function WL(e){return tL(this,arguments,function(){var t,n,r,i;return XI(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,eL(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,eL(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,eL(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function GL(e){return rL(e==null?void 0:e.getReader)}function KL(e){if(e instanceof TL)return e;if(e!=null){if(RL(e))return qL(e);if(IL(e))return JL(e);if(LL(e))return YL(e);if(zL(e))return ZL(e);if(UL(e))return XL(e);if(GL(e))return QL(e)}throw BL(e)}function qL(e){return new TL(function(t){var n=e[SL]();if(rL(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function JL(e){return new TL(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function YL(e){return new TL(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,pL)})}function XL(e){return new TL(function(t){var n,r;try{for(var i=ZI(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ZL(e){return new TL(function(t){$L(e,t).catch(function(e){return t.error(e)})})}function QL(e){return ZL(WL(e))}function $L(e,t){var n,r,i,a;return YI(this,void 0,void 0,function(){var o,s;return XI(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=nL(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function eR(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tR(e,t){return t===void 0&&(t=0),AL(function(n,r){n.subscribe(jL(r,function(n){return eR(r,e,function(){return r.next(n)},t)},function(){return eR(r,e,function(){return r.complete()},t)},function(n){return eR(r,e,function(){return r.error(n)},t)}))})}function nR(e,t){return t===void 0&&(t=0),AL(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rR(e,t){return KL(e).pipe(nR(t),tR(t))}function iR(e,t){return KL(e).pipe(nR(t),tR(t))}function aR(e,t){return new TL(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function oR(e,t){return new TL(function(n){var r;return eR(n,t,function(){r=e[HL](),eR(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return rL(r==null?void 0:r.return)&&r.return()}})}function sR(e,t){if(!e)throw Error(`Iterable cannot be null`);return new TL(function(n){eR(n,t,function(){var r=e[Symbol.asyncIterator]();eR(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function cR(e,t){return sR(WL(e),t)}function lR(e,t){if(e!=null){if(RL(e))return rR(e,t);if(IL(e))return aR(e,t);if(LL(e))return iR(e,t);if(zL(e))return sR(e,t);if(UL(e))return oR(e,t);if(GL(e))return cR(e,t)}throw BL(e)}function uR(e,t){return t?lR(e,t):KL(e)}function dR(e,t){return AL(function(n,r){var i=0;n.subscribe(jL(r,function(n){r.next(e.call(t,n,i++))}))})}function fR(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){l++;var i=!1;KL(n(e,u++)).subscribe(jL(t,function(e){t.next(e)},function(){i=!0},void 0,function(){if(i)try{l--;for(var e=function(){var e=c.shift();o||m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(jL(t,p,function(){d=!0,f()})),function(){}}function pR(e,t,n){return n===void 0&&(n=1/0),rL(t)?pR(function(n,r){return dR(function(e,i){return t(n,e,r,i)})(KL(e(n,r)))},n):(typeof t==`number`&&(n=t),AL(function(t,r){return fR(t,r,e,n)}))}function mR(e){return AL(function(t,n){var r=null,i=!1,a;r=t.subscribe(jL(n,void 0,void 0,function(o){a=KL(e(o,mR(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function hR(e,t){return rL(t)?pR(e,t,1):pR(e,1)}function gR(e,t,n){return(t=_R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=vR(e,`string`);return typeof t==`symbol`?t:t+``}function vR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yR=class{constructor(){gR(this,`taskSubject`,new PL),this.taskSubject.pipe(hR(e=>uR(e()).pipe(mR(e=>uR(Promise.reject(e)))))).subscribe()}addTask(e){return new Promise((t,n)=>{this.taskSubject.next(()=>V(this,null,function*(){try{t(yield e())}catch(e){n(e)}}))})}},bR=`text/plain`,xR=`us-ascii`,SR=`%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)`,CR=`__normalize_url_encoded_reserved__`,wR=/__normalize_url_encoded_reserved__(\d+)__/g,TR=new RegExp(SR,`i`),ER=new RegExp(SR,`gi`),DR=(e,t)=>Array.isArray(t)&&t.some(t=>t instanceof RegExp?t.flags.includes(`g`)||t.flags.includes(`y`)?new RegExp(t.source,t.flags.replaceAll(/[gy]/g,``)).test(e):t.test(e):t===e),OR=new Set([`https:`,`http:`,`file:`]),kR=e=>{if(typeof e!=`string`)return;let t=e.trim().toLowerCase().replace(/:$/,``);return t===``?void 0:`${t}:`},AR=e=>{try{let{protocol:t}=new URL(e),n=e.slice(0,t.length+2).toLowerCase()===`${t}//`;if(t.endsWith(`:`)&&(!t.includes(`.`)||n)&&!OR.has(t))return t}catch(e){}},jR=e=>{try{return decodeURIComponent(e.replaceAll(`+`,`%20`))}catch(t){return new URLSearchParams(`${e}=`).keys().next().value}},MR=e=>{let t=new Set;if(!e)return t;for(let n of e.slice(1).split(`&`))n&&!n.includes(`=`)&&t.add(jR(n));return t},NR=e=>{let t=e;try{t=decodeURIComponent(e)}catch(n){t=new URLSearchParams(e).toString()}let n=e=>{let t=new Set;for(let n of e.matchAll(wR))t.add(Number.parseInt(n[1],10));return t},r=n(e);for(let e of n(t))r.add(e);let i=0;for(;r.has(i);)i++;return`${CR}${i}__`},PR=(e,t)=>{if(!t)return e.sort(),e.toString();let n=e=>e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))),r=[...e.entries()];return r.sort(([e],[t])=>{let r=n(e),i=n(t);return r<i?-1:+(r>i)}),new URLSearchParams(r).toString()},FR=(e,t)=>t?e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))):e,IR=(e,t,n)=>{let r=t===`always`,i=t===`never`,a=r||i?void 0:MR(n),o=e=>e.replaceAll(`+`,`%20`),s=e=>r?`${e}=`:i||a.has(jR(e))?e:`${e}=`,c=e=>{let t=e.indexOf(`=`);if(t===-1)return s(o(e));let n=e.slice(0,t),r=e.slice(t+1);return r===``?n===``?`=`:s(o(n)):`${o(n)}=${r}`},l=e.slice(1).split(`&`).filter(Boolean);return l.length===0?``:`?${l.map(e=>c(e)).join(`&`)}`},LR=(e,{stripHash:t})=>{let n=RegExp(`^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$`).exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`),s=o.at(-1)===`base64`;s&&o.pop();let c=o.shift().toLowerCase(),l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===xR)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];s&&l.push(`base64`),(l.length>0||c&&c!==bR)&&l.unshift(c);let u=t||!a?``:`#${a}`;return`data:${l.join(`;`)},${s?i.trim():i}${u}`};function RR(e,t){if(t=B({defaultProtocol:`http`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,emptyQueryValue:`preserve`},t),typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return LR(e,t);let n=Array.isArray(t.customProtocols)?t.customProtocols:[],r=new Set(n.map(e=>kR(e)).filter(Boolean)),i=AR(e);if(i&&!r.has(i))return e;let a=e.startsWith(`//`);(a||!/^\.*\//.test(e))&&!i&&(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let o=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&o.protocol===`https:`&&(o.protocol=`http:`),t.forceHttps&&o.protocol===`http:`&&(o.protocol=`https:`),t.stripAuthentication&&(o.username=``,o.password=``),t.stripHash?o.hash=``:t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,``)),o.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let r=e.exec(o.pathname);if(!r)break;let i=r[0],a=r.index,s=o.pathname.slice(t,a);n+=s.replaceAll(/\/{2,}/g,`/`),n+=i,t=a+i.length}let r=o.pathname.slice(t);n+=r.replaceAll(/\/{2,}/g,`/`),o.pathname=n}if(o.pathname)try{o.pathname=decodeURI(o.pathname).replaceAll(`\\`,`%5C`)}catch(e){}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split(`/`).filter(Boolean),n=e.at(-1);n&&DR(n,t.removeDirectoryIndex)&&(e.pop(),o.pathname=e.length>0?`/${e.join(`/`)}/`:`/`)}if(t.removePath&&(o.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=o.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);o.pathname=(n==null?void 0:n.length)>0?`/${n.join(`/`)}`:`/`}o.hostname&&(o.hostname=o.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,``)));let s=o.search,c;if(t.sortQueryParameters&&TR.test(s)){let e=NR(s);o.search=s.replaceAll(ER,t=>`${e}${t.slice(1).toUpperCase()}`),c=RegExp(`${e}([0-9A-F]{2})`,`g`)}let l=Array.isArray(t.keepQueryParameters),{searchParams:u}=o;if(!l&&Array.isArray(t.removeQueryParameters)&&t.removeQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.removeQueryParameters)&&u.delete(e);if(!l&&t.removeQueryParameters===!0&&(o.search=``),l&&t.keepQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.keepQueryParameters)||u.delete(e);else l&&(o.search=``);t.sortQueryParameters&&(o.search=PR(o.searchParams,c),o.search=decodeURIComponent(o.search.replaceAll(/%(?:26|23|3f|25|2b)/gi,e=>`%25${e.slice(1)}`)),c&&(o.search=o.search.replace(c,`%$1`))),o.search=IR(o.search,t.emptyQueryValue,s),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,``)),t.removeExplicitPort&&o.port&&(o.port=``);let d=e;return e=o.toString(),!t.removeSingleSlash&&o.pathname===`/`&&!d.endsWith(`/`)&&o.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||o.pathname===`/`)&&o.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),a&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zR(Object(n),!0).forEach(function(t){VR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VR(e,t,n){return(t=HR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HR(e){var t=UR(e,`string`);return typeof t==`symbol`?t:t+``}function UR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WR=x_.create(`wasm`),GR=x_.create(`main`),KR=class{constructor(){VR(this,`_worker`,null),VR(this,`_initializeListener`,null),VR(this,`_processingListener`,null),VR(this,`_queueService`,new yR),VR(this,`_initProcess`,null),VR(this,`version`,{component:`9.5.2892`}),VR(this,`onFinalize`,null),VR(this,`isPrepared`,!1),VR(this,`isInitialized`,!1),VR(this,`isProcessing`,!1),VR(this,`initData`,null),VR(this,`recognizerProcessParam`,{processParam:{}}),VR(this,`imageProcessParam`,{processParam:{}}),VR(this,`recognizeListener`,null),VR(this,`workerPath`,`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`)}get processingListener(){return this._processingListener}set processingListener(e){this._processingListener=e,e&&e({isProcessing:this.isProcessing})}get initializeListener(){return this._initializeListener}set initializeListener(e){this._initializeListener=e,e&&e({isInitialized:this.isInitialized})}createProcessImageRequest(e,t){let n=e.map((e,t)=>({data:e,light:6,pageIdx:t}));return BR(BR({},t),{},{imagesList:n})}prepareImageData(e){return e.map(e=>e instanceof ImageData?{width:e.width,height:e.height,data:e.data.buffer}:{data:e})}sendMessage(e){return this._queueService.addTask(()=>new Promise((t,n)=>{if(!this._worker)return GR(`Worker is missing)`),n(`Worker is missing`);this._worker.onmessage=e=>{if(e.data.target===lp.custom){let{method:r,response:i,code:a}=e.data.data,o=i&&`reject_message`in i?i.reject_message:``;if(a===xf.ok||a===xf.badLicense&&!o)GR(`Method ${r}: { code: ${a} } `),t(i);else{let e=`Method ${r}: ${Qf[a]||a}${o?` Reject message: ${o}`:``}`;GR(e),n(e)}}e.data.target===lp.stdout&&WR(JSON.stringify(e.data.content)),e.data.target===lp.stderr&&(WR(JSON.stringify(e.data.content)),n(e.data.content))},this._worker.onerror=e=>{WR(JSON.stringify(e.message)),n(e)},GR(`Send message to worker: { target: ${e.target}, method: ${e.method} }`),this._worker.postMessage(BR(BR({},e),{},{preMain:!0}),`data`in e&&e.data?e.data.map(e=>e.data):[])}))}prepare(e){return V(this,null,function*(){var t;GR(`Preparing the service`);{let t=this.workerPath===`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`,n=RR(e&&t?vE(e,`PROD`):this.workerPath),r=yield(yield fetch(`${n}/${Kf}`)).text();t||(r=_E(r,n));let i=new Blob([r],{type:`text/plain`}),a=URL.createObjectURL(i);this._worker=new Worker(a),URL.revokeObjectURL(a)}(t=this._worker)==null||t.postMessage({method:vf.prepare,target:lp.gl,preMain:!0,op:`setPrefetched`}),yield this.sendMessage({method:vf.prepare,target:lp.init,URL:document.URL}),this.isPrepared=!0,GR(`Service prepared`)})}initialize(e){return V(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(e),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(e){return V(this,null,function*(){var t,n;this.isPrepared||(yield this.prepare(e==null?void 0:e.module)),GR(`Initializing the service`);let{scenario:r,license:i}=yield this.sendMessage({target:lp.custom,method:vf.initialize,request:{systemInfo:{userID:p_(Sp),hostName:(t=document.location)==null?void 0:t.origin,license:e==null?void 0:e.license},telemetry:yield __({sdkVersion:`9.5.2892`}),processParam:this.recognizerProcessParam.processParam||this.imageProcessParam.processParam}});return this.initData={scenario:r,license:i},this.isInitialized=!0,(n=this._initializeListener)==null||n.call(this,{isInitialized:this.isInitialized}),GR(`Service initialized: ${JSON.stringify({scenario:r,license:i})}`),this.initData})}doProcess(e,t,n){return V(this,null,function*(){var r,i;GR(`Process method ${e} started`),this.isProcessing=!0,(r=this._processingListener)==null||r.call(this,{isProcessing:this.isProcessing});let a=yield this.sendMessage({target:lp.custom,method:e,request:t,data:n});return this.isProcessing=!1,(i=this._processingListener)==null||i.call(this,{isProcessing:this.isProcessing}),GR(`Process method ${e} finished`),new oE(a)})}processImageBase64(e,t){return V(this,null,function*(){return this.doProcess(vf.processImage,this.createProcessImageRequest(e,t))})}process(e,t){return V(this,null,function*(){var n;let r=this.prepareImageData(e),i=yield this.doProcess(vf.process,t||this.recognizerProcessParam,r);return(n=this.recognizeListener)==null||n.call(this,i),i})}processImage(e,t){return V(this,null,function*(){let n=this.prepareImageData(e);return this.doProcess(vf.processImage,t||this.imageProcessParam,n)})}startNewPage(){return V(this,null,function*(){GR(`Starting new page`),yield this.sendMessage({target:lp.custom,method:vf.startNewPage})})}startNewDocument(e,t){return V(this,null,function*(){return GR(`Starting new document`),yield this.sendMessage({target:lp.custom,method:vf.startNewDocument,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}createBackendTransaction(e,t){return V(this,null,function*(){return GR(`Create backend transaction`),yield this.sendMessage({target:lp.custom,method:vf.createBackendTransaction,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}finalizePackage(){return V(this,null,function*(){try{var e;GR(`Finalize package`);let t=yield this.sendMessage({target:lp.custom,method:vf.finalizePackage});return(e=this.onFinalize)==null||e.call(this,t),t}catch(e){var t;return(t=this.onFinalize)==null||t.call(this,{tag:``,transactionId:``}),Promise.reject(e)}})}addDataToPackage(e,t){return V(this,null,function*(){GR(`Add data to package`),yield this.sendMessage({target:lp.custom,method:vf.addDataToPackage,request:t,data:[{data:e.buffer}]}),GR(`Data added to package`)})}shutdown(){GR(`Shutdown service`),this._worker&&(this._worker.terminate(),GR(`Worker terminated`)),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}};function qR(){return V(this,null,function*(){let e=window.customElements.get(`document-reader`),t=window.customElements.get(`camera-snapshot`),n=window.customElements.get(`fullscreen-container`);e||window.customElements.define(`document-reader`,TI),t||window.customElements.define(`camera-snapshot`,HI),n||window.customElements.define(`fullscreen-container`,KI);let r=window.customElements.whenDefined(`document-reader`),i=window.customElements.whenDefined(`camera-snapshot`),a=window.customElements.whenDefined(`fullscreen-container`);yield Promise.all([r,i,a])})}var JR={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:E},YR=(e=JR,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function XR(e){return(t,n)=>typeof n==`object`?YR(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var ZR=(e,t,n)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return n==null?void 0:n()};function QR(e){"@babel/helpers - typeof";return QR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},QR(e)}function $R(e,t){if(QR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ez(e){var t=$R(e,`string`);return QR(t)==`symbol`?t:t+``}function tz(e,t,n){return(t=ez(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nz(Object(n),!0).forEach(function(t){tz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var iz=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}};function az(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.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" 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(`-------`)}function oz(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var sz={FORM:`form`,DATA:`data`},cz=e=>{if(typeof e!=`string`)return!1;try{return new URL(e),!0}catch(e){return!1}},lz=[`ar`,`he`],uz=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return lz.includes(n)?`rtl`:`ltr`},dz=(e,t)=>e.base64&&!(t!=null&&t.base64.has(e.base64))?e.base64:e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))?e.imageURL:``,fz=(e,t,n)=>{var r;if(!t)return;let i=(r=e==null?void 0:e.idvAsset)==null?null:r;for(;i;){let e=dz(i,n);if(e)return e;i=i.failurePolicy===`placeholderImage`&&i.placeholderImage||null}},pz={DOC_READER:`DOC_READER`,DOC_READER_GALLERY:`DOC_READER_GALLERY`},mz=function(e){return e[e.NO_INITIALIZED=0]=`NO_INITIALIZED`,e[e.UNKNOWN_STEP=1]=`UNKNOWN_STEP`,e[e.SCAN_ERROR=2]=`SCAN_ERROR`,e[e.RFID_ERROR=3]=`RFID_ERROR`,e[e.IMAGE_LOADING_FAILED=4]=`IMAGE_LOADING_FAILED`,e}({}),hz=function(e){return e[e.CONFIGURATION_FAILED=0]=`CONFIGURATION_FAILED`,e[e.INTERNAL_ERROR=1]=`INTERNAL_ERROR`,e[e.PRESENTER_UNAVAILABLE=2]=`PRESENTER_UNAVAILABLE`,e}({}),gz=`idv-document`,_z={0:pf.auto,1:pf.captureVideo,2:pf.captureFrame},vz={0:yf.line,1:yf.corners},yz={0:!0,1:!0,2:!1,3:!0},bz=1920,xz=4e6,Sz=5e7,Cz=function(e){return e.BarcodeMRZ=`BarcodeMRZ`,e.BoundsLite=`BoundsLite`,e}({}),wz,Tz,Ez=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,mz);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})}};wz=Ez,wz.MODULE=gz,wz.ERROR_ENUM_NAME=`ReaderModuleError`,wz.SHORT_CODE=`RM`;var Dz=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,hz);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})}};Tz=Dz,Tz.MODULE=gz,Tz.ERROR_ENUM_NAME=`ScanError`,Tz.SHORT_CODE=`RMS`;var Oz=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})};function kz(e){return XR(rz(rz({},e),{},{state:!0,attribute:!1}))}var Az=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function jz(e,t){return(n,r,i)=>{let a=t=>{var n,r;return(n=(r=t.renderRoot)==null?void 0:r.querySelector(e))==null?null:n};if(t){let{get:e,set:t}=typeof r==`object`?n:i==null?(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})():i;return Az(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Az(n,r,{get(){return a(this)}})}}function Mz(e){return Nz.apply(this,arguments)}function Nz(){return Nz=d(function*(e){return new Promise(t=>setTimeout(t,e))}),Nz.apply(this,arguments)}function Pz(e){return Fz.apply(this,arguments)}function Fz(){return Fz=d(function*(e,t=0,n=0){let r=null,i=n*1e3;for(let n=0;n<=t;n++){try{let t=yield e();if(t!=null&&t.transactionId)return t;break}catch(e){r=e}n<t&&(yield Mz(i))}throw r}),Fz.apply(this,arguments)}var Iz=e=>e?(e.internalScenario&&(e.scenario=e.internalScenario),delete e.internalScenario,e):{};function Lz(e,t,n,r,i){let a=e*t,o=a>i;return{width:e,height:t,isExtraLargeResolution:o,isDownscaleNeeded:(e>n||t>n||a>r)&&!o}}var Rz=function(){var e=d(function*(e,t,n,r){let i=yield createImageBitmap(e),{width:a,height:o}=i;return i==null||i.close(),Lz(a,o,t,n,r)});return function(t,n,r,i){return e.apply(this,arguments)}}();function zz({width:e,height:t,softSideLimit:n,softPixelLimit:r}){if(!(e>0&&t>0))return{width:1,height:1};let i=Math.max(e,t),a=e*t,o=i>n?n/i:1,s=a>r?Math.sqrt(r/a):1,c=Math.min(o,s,1);return{width:Math.max(1,Math.floor(e*c)),height:Math.max(1,Math.floor(t*c))}}function Bz(e,t,n){return Vz.apply(this,arguments)}function Vz(){return Vz=d(function*(e,t,n){return new Promise(r=>{if(!e||!e.size)return r({ok:!1});let i=document.createElement(`canvas`),a=i.getContext(`2d`),o=URL.createObjectURL(e),s=new Image,c=e=>{try{URL.revokeObjectURL(o)}catch(e){}try{i.width=0,i.height=0}catch(e){}s.onload=null,s.onerror=null,s.src=``,r(e)};s.onload=function(){let e=zz({width:s.width,height:s.height,softSideLimit:t,softPixelLimit:n});if(i.width=e.width,i.height=e.height,a)try{a.drawImage(s,0,0,e.width,e.height);let t=a.getImageData(0,0,e.width,e.height);return c(t?{ok:!0,imageData:t}:{ok:!1})}catch(e){return c({ok:!1})}return c({ok:!1})},s.onerror=()=>c({ok:!1}),s.src=o})}),Vz.apply(this,arguments)}var Hz=e=>{let{translationKeysData:t,translationKeysProps:n,locale:r}=e,i={},a=null;for(let e in t)i[t[e].key]=e;for(let e in n)i[e]&&n[e]&&(a?a[i[e]]=n[e]:a={[i[e]]:n[e]});return a?{[r]:a}:{}},Uz={preparingCamera:{fallback:`Preparing the camera...`,key:`strPrepareCamera`},timeout:{fallback:`Timeout`,key:`strTimeout`},noFocus:{fallback:`No camera focus`,key:`strNoFocus`},somethingWentWrong:{fallback:`Something went wrong`,key:`messageUnknownError`},incorrectCameraId:{fallback:`No camera with the specified ID found.`,key:`InfoScreenIncorrectCameraIdTitle`},done:{fallback:`Done!`,key:`strDoneMessage`},cameraUnavailable:{fallback:`Camera unavailable!`,key:`statusCameraUnavailableTitle`},versionNotSupported:{fallback:`Your browser version is not supported`,key:`statusBrowserNotSupportedTitle`},httpNotSupported:{fallback:`HTTPS not used`,key:`statusBrowserHTTPNotSupportedSubtitle`},insecurePageContext:{fallback:`Insecure context`,key:`statusBrowserInsecurePageContextSubtitle`},badLicense:{fallback:`The license cannot be found or has expired`,key:`statusProcMgrBadLicenseSubtitle`},fileCorrupt:{fallback:`This file is corrupt or not supported`,key:`statusIncorrectDataTitle`},largeFile:{fallback:`This file is too large to be uploaded`,key:`statusLargeDataTitle`},placeDocumentIntoFrame:{fallback:`Fit the document into the frame`,key:`strPlaceDocumentInFrame`},holdDocumentStraight:{fallback:`Hold the document straight`,key:`strHoldDocumentStraight`},glaresOnDocument:{fallback:`Avoid glare on the document`,key:`strGlaresOnDocument`},tryAgain:{fallback:`Try again`,key:`faceLivenessScreenButton`},noCameraAvailable:{fallback:`No camera available`,key:`InfoScreenNoCameraTitle`},positionDocumentCenter:{fallback:`Position the document in the center`,key:`documentReaderDocumentReaderLayoutDocumentCenter`},uploadPhoto:{fallback:`Upload a photo`,key:`cameraCaptureCameraCaptureStartScreenTitle`},moveCloser:{fallback:`Move closer`,key:`hint.moveCloser`},keepDeviceStill:{fallback:`Hold the device still`,key:`strKeepDeviceStill`},camera:{fallback:`Camera`,key:`strCamera`},switchToMobile:{fallback:`Switch to mobile`,key:`switchToMobile`},openPhoneCamera:{fallback:`Open the camera on your mobile device, scan the QR code, and follow the link`,key:`openPhoneCamera`},pleaseWait:{fallback:`Please wait...`,key:`strPleaseWait`},mobileDevice:{fallback:`Mobile device`,key:`mobileDevice`},verifyYourIdentity:{fallback:`Identity document verification`,key:`verifyYourIdentity`},fromCameraFilesMobileDesktop:{fallback:`Capture a document using the computer’s camera, upload it from files, or scan it on a mobile device`,key:`fromCameraFilesMobileDesktop`},fromCameraFilesDesktop:{fallback:`Capture a document using the computer’s camera or upload it from files`,key:`fromCameraFilesDesktop`},fromCameraMobileDesktop:{fallback:`Capture a document using the computer’s camera or scan it on a mobile device`,key:`fromCameraMobileDesktop`},fromFilesMobileDesktop:{fallback:`Upload a document from files or scan it on a mobile device`,key:`fromFilesMobileDesktop`},fromCameraDesktop:{fallback:`Use the computer's camera to capture a document`,key:`fromCameraDesktop`},fromFilesDesktop:{fallback:`Pick a document from files and upload it`,key:`fromFilesDesktop`},fromMobileDesktop:{fallback:`Use your mobile camera to capture a document`,key:`fromMobileDesktop`},fromCameraGalleryMobile:{fallback:`Capture a document using the mobile's camera or upload it from gallery`,key:`fromCameraGalleryMobile`},fromGalleryMobile:{fallback:`Pick a document from the gallery and upload it`,key:`fromGalleryMobile`},gallery:{fallback:`Gallery`,key:`gallery`},files:{fallback:`Files`,key:`files`},returnToComputer:{fallback:`Return to the computer`,key:`returnToComputer`},documentCaptured:{fallback:`Your document has been captured`,key:`documentCaptured`},or:{fallback:`or`,key:`strOr`},continueInBrowser:{fallback:`Click here to continue in browser`,key:`continueInBrowser`},skip:{fallback:`Skip`,key:`strSkip`},flipTheDocument:{fallback:`Flip the document`,key:`documentReaderDocumentReaderLayoutFlipDocument`},tiltTheDocument:{fallback:`Tilt the document`,key:`strTiltDocument`}},Wz=s`
35
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function oL(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var sL=(function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ZI(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(rL(c))try{c()}catch(e){i=e instanceof aL?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ZI(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{uL(f)}catch(e){i=i==null?[]:i,e instanceof aL?i=$I($I([],QI(i)),QI(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new aL(i)}},e.prototype.add=function(t){var n;if(t&&t!==this){if(this.closed)uL(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)==null?[]:n).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&oL(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&oL(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cL=sL.EMPTY;function lL(e){return e instanceof sL||e&&`closed`in e&&rL(e.remove)&&rL(e.add)&&rL(e.unsubscribe)}function uL(e){rL(e)?e():e.unsubscribe()}var dL={Promise:void 0},fL={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$I([e,t],QI(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function pL(e){fL.setTimeout(function(){throw e})}function mL(){}function hL(e){e()}var gL=(function(e){JI(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,lL(t)&&t.add(n)):n.destination=xL,n}return t.create=function(e,t,n){return new vL(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(sL),_L=(function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){yL(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){yL(e)}else yL(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){yL(e)}},e})(),vL=(function(e){JI(t,e);function t(t,n,r){var i=e.call(this)||this;return i.destination=new _L(rL(t)||!t?{next:t==null?void 0:t,error:n==null?void 0:n,complete:r==null?void 0:r}:t),i}return t})(gL);function yL(e){pL(e)}function bL(e){throw e}var xL={closed:!0,next:mL,error:bL,complete:mL},SL=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function CL(e){return e}function wL(e){return e.length===0?CL:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var TL=(function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=OL(e)?e:new vL(e,t,n);return hL(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=EL(t),new t(function(t,r){var i=new vL({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return(t=this.source)==null?void 0:t.subscribe(e)},e.prototype[SL]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wL(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=EL(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e})();function EL(e){var t;return(t=e==null?dL.Promise:e)==null?Promise:t}function DL(e){return e&&rL(e.next)&&rL(e.error)&&rL(e.complete)}function OL(e){return e&&e instanceof gL||DL(e)&&lL(e)}function kL(e){return rL(e==null?void 0:e.lift)}function AL(e){return function(t){if(kL(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function jL(e,t,n,r,i){return new ML(e,t,n,r,i)}var ML=(function(e){JI(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||(t=this.onFinalize)==null||t.call(this)}},t})(gL),NL=iL(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),PL=(function(e){JI(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new FL(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new NL},t.prototype.next=function(e){var t=this;hL(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ZI(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;hL(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;hL(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)==null?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?cL:(this.currentObservers=null,a.push(e),new sL(function(){t.currentObservers=null,oL(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new TL;return e.source=this,e},t.create=function(e,t){return new FL(e,t)},t})(TL),FL=(function(e){JI(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)==null?void 0:t.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)==null?void 0:e.complete)==null||t.call(e)},t.prototype._subscribe=function(e){var t,n;return(n=(t=this.source)==null?void 0:t.subscribe(e))==null?cL:n},t})(PL),IL=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function LL(e){return rL(e==null?void 0:e.then)}function RL(e){return rL(e[SL])}function zL(e){return Symbol.asyncIterator&&rL(e==null?void 0:e[Symbol.asyncIterator])}function BL(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function VL(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var HL=VL();function UL(e){return rL(e==null?void 0:e[HL])}function WL(e){return tL(this,arguments,function(){var t,n,r,i;return XI(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,eL(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,eL(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,eL(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function GL(e){return rL(e==null?void 0:e.getReader)}function KL(e){if(e instanceof TL)return e;if(e!=null){if(RL(e))return qL(e);if(IL(e))return JL(e);if(LL(e))return YL(e);if(zL(e))return ZL(e);if(UL(e))return XL(e);if(GL(e))return QL(e)}throw BL(e)}function qL(e){return new TL(function(t){var n=e[SL]();if(rL(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function JL(e){return new TL(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function YL(e){return new TL(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,pL)})}function XL(e){return new TL(function(t){var n,r;try{for(var i=ZI(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ZL(e){return new TL(function(t){$L(e,t).catch(function(e){return t.error(e)})})}function QL(e){return ZL(WL(e))}function $L(e,t){var n,r,i,a;return YI(this,void 0,void 0,function(){var o,s;return XI(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=nL(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function eR(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tR(e,t){return t===void 0&&(t=0),AL(function(n,r){n.subscribe(jL(r,function(n){return eR(r,e,function(){return r.next(n)},t)},function(){return eR(r,e,function(){return r.complete()},t)},function(n){return eR(r,e,function(){return r.error(n)},t)}))})}function nR(e,t){return t===void 0&&(t=0),AL(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rR(e,t){return KL(e).pipe(nR(t),tR(t))}function iR(e,t){return KL(e).pipe(nR(t),tR(t))}function aR(e,t){return new TL(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function oR(e,t){return new TL(function(n){var r;return eR(n,t,function(){r=e[HL](),eR(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return rL(r==null?void 0:r.return)&&r.return()}})}function sR(e,t){if(!e)throw Error(`Iterable cannot be null`);return new TL(function(n){eR(n,t,function(){var r=e[Symbol.asyncIterator]();eR(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function cR(e,t){return sR(WL(e),t)}function lR(e,t){if(e!=null){if(RL(e))return rR(e,t);if(IL(e))return aR(e,t);if(LL(e))return iR(e,t);if(zL(e))return sR(e,t);if(UL(e))return oR(e,t);if(GL(e))return cR(e,t)}throw BL(e)}function uR(e,t){return t?lR(e,t):KL(e)}function dR(e,t){return AL(function(n,r){var i=0;n.subscribe(jL(r,function(n){r.next(e.call(t,n,i++))}))})}function fR(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){l++;var i=!1;KL(n(e,u++)).subscribe(jL(t,function(e){t.next(e)},function(){i=!0},void 0,function(){if(i)try{l--;for(var e=function(){var e=c.shift();o||m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(jL(t,p,function(){d=!0,f()})),function(){}}function pR(e,t,n){return n===void 0&&(n=1/0),rL(t)?pR(function(n,r){return dR(function(e,i){return t(n,e,r,i)})(KL(e(n,r)))},n):(typeof t==`number`&&(n=t),AL(function(t,r){return fR(t,r,e,n)}))}function mR(e){return AL(function(t,n){var r=null,i=!1,a;r=t.subscribe(jL(n,void 0,void 0,function(o){a=KL(e(o,mR(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function hR(e,t){return rL(t)?pR(e,t,1):pR(e,1)}function gR(e,t,n){return(t=_R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=vR(e,`string`);return typeof t==`symbol`?t:t+``}function vR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yR=class{constructor(){gR(this,`taskSubject`,new PL),this.taskSubject.pipe(hR(e=>uR(e()).pipe(mR(e=>uR(Promise.reject(e)))))).subscribe()}addTask(e){return new Promise((t,n)=>{this.taskSubject.next(()=>V(this,null,function*(){try{t(yield e())}catch(e){n(e)}}))})}},bR=`text/plain`,xR=`us-ascii`,SR=`%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)`,CR=`__normalize_url_encoded_reserved__`,wR=/__normalize_url_encoded_reserved__(\d+)__/g,TR=new RegExp(SR,`i`),ER=new RegExp(SR,`gi`),DR=(e,t)=>Array.isArray(t)&&t.some(t=>t instanceof RegExp?t.flags.includes(`g`)||t.flags.includes(`y`)?new RegExp(t.source,t.flags.replaceAll(/[gy]/g,``)).test(e):t.test(e):t===e),OR=new Set([`https:`,`http:`,`file:`]),kR=e=>{if(typeof e!=`string`)return;let t=e.trim().toLowerCase().replace(/:$/,``);return t===``?void 0:`${t}:`},AR=e=>{try{let{protocol:t}=new URL(e),n=e.slice(0,t.length+2).toLowerCase()===`${t}//`;if(t.endsWith(`:`)&&(!t.includes(`.`)||n)&&!OR.has(t))return t}catch(e){}},jR=e=>{try{return decodeURIComponent(e.replaceAll(`+`,`%20`))}catch(t){return new URLSearchParams(`${e}=`).keys().next().value}},MR=e=>{let t=new Set;if(!e)return t;for(let n of e.slice(1).split(`&`))n&&!n.includes(`=`)&&t.add(jR(n));return t},NR=e=>{let t=e;try{t=decodeURIComponent(e)}catch(n){t=new URLSearchParams(e).toString()}let n=e=>{let t=new Set;for(let n of e.matchAll(wR))t.add(Number.parseInt(n[1],10));return t},r=n(e);for(let e of n(t))r.add(e);let i=0;for(;r.has(i);)i++;return`${CR}${i}__`},PR=(e,t)=>{if(!t)return e.sort(),e.toString();let n=e=>e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))),r=[...e.entries()];return r.sort(([e],[t])=>{let r=n(e),i=n(t);return r<i?-1:+(r>i)}),new URLSearchParams(r).toString()},FR=(e,t)=>t?e.replace(t,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))):e,IR=(e,t,n)=>{let r=t===`always`,i=t===`never`,a=r||i?void 0:MR(n),o=e=>e.replaceAll(`+`,`%20`),s=e=>r?`${e}=`:i||a.has(jR(e))?e:`${e}=`,c=e=>{let t=e.indexOf(`=`);if(t===-1)return s(o(e));let n=e.slice(0,t),r=e.slice(t+1);return r===``?n===``?`=`:s(o(n)):`${o(n)}=${r}`},l=e.slice(1).split(`&`).filter(Boolean);return l.length===0?``:`?${l.map(e=>c(e)).join(`&`)}`},LR=(e,{stripHash:t})=>{let n=RegExp(`^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$`).exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`),s=o.at(-1)===`base64`;s&&o.pop();let c=o.shift().toLowerCase(),l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===xR)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];s&&l.push(`base64`),(l.length>0||c&&c!==bR)&&l.unshift(c);let u=t||!a?``:`#${a}`;return`data:${l.join(`;`)},${s?i.trim():i}${u}`};function RR(e,t){if(t=B({defaultProtocol:`http`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,emptyQueryValue:`preserve`},t),typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return LR(e,t);let n=Array.isArray(t.customProtocols)?t.customProtocols:[],r=new Set(n.map(e=>kR(e)).filter(Boolean)),i=AR(e);if(i&&!r.has(i))return e;let a=e.startsWith(`//`);!a&&/^\.*\//.test(e)||i||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let o=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&o.protocol===`https:`&&(o.protocol=`http:`),t.forceHttps&&o.protocol===`http:`&&(o.protocol=`https:`),t.stripAuthentication&&(o.username=``,o.password=``),t.stripHash?o.hash=``:t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,``)),o.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let r=e.exec(o.pathname);if(!r)break;let i=r[0],a=r.index,s=o.pathname.slice(t,a);n+=s.replaceAll(/\/{2,}/g,`/`),n+=i,t=a+i.length}let r=o.pathname.slice(t);n+=r.replaceAll(/\/{2,}/g,`/`),o.pathname=n}if(o.pathname)try{o.pathname=decodeURI(o.pathname).replaceAll(`\\`,`%5C`)}catch(e){}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split(`/`).filter(Boolean),n=e.at(-1);n&&DR(n,t.removeDirectoryIndex)&&(e.pop(),o.pathname=e.length>0?`/${e.join(`/`)}/`:`/`)}if(t.removePath&&(o.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=o.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);o.pathname=(n==null?void 0:n.length)>0?`/${n.join(`/`)}`:`/`}o.hostname&&(o.hostname=o.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,``)));let s=o.search,c;if(t.sortQueryParameters&&TR.test(s)){let e=NR(s);o.search=s.replaceAll(ER,t=>`${e}${t.slice(1).toUpperCase()}`),c=RegExp(`${e}([0-9A-F]{2})`,`g`)}let l=Array.isArray(t.keepQueryParameters),{searchParams:u}=o;if(!l&&Array.isArray(t.removeQueryParameters)&&t.removeQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.removeQueryParameters)&&u.delete(e);if(!l&&t.removeQueryParameters===!0&&(o.search=``),l&&t.keepQueryParameters.length>0)for(let e of[...u.keys()])DR(FR(e,c),t.keepQueryParameters)||u.delete(e);else l&&(o.search=``);t.sortQueryParameters&&(o.search=PR(o.searchParams,c),o.search=decodeURIComponent(o.search.replaceAll(/%(?:26|23|3f|25|2b)/gi,e=>`%25${e.slice(1)}`)),c&&(o.search=o.search.replace(c,`%$1`))),o.search=IR(o.search,t.emptyQueryValue,s),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,``)),t.removeExplicitPort&&o.port&&(o.port=``);let d=e;return e=o.toString(),!t.removeSingleSlash&&o.pathname===`/`&&!d.endsWith(`/`)&&o.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||o.pathname===`/`)&&o.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),a&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zR(Object(n),!0).forEach(function(t){VR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VR(e,t,n){return(t=HR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HR(e){var t=UR(e,`string`);return typeof t==`symbol`?t:t+``}function UR(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WR=x_.create(`wasm`),GR=x_.create(`main`),KR=class{constructor(){VR(this,`_worker`,null),VR(this,`_initializeListener`,null),VR(this,`_processingListener`,null),VR(this,`_queueService`,new yR),VR(this,`_initProcess`,null),VR(this,`version`,{component:`9.5.2892`}),VR(this,`onFinalize`,null),VR(this,`isPrepared`,!1),VR(this,`isInitialized`,!1),VR(this,`isProcessing`,!1),VR(this,`initData`,null),VR(this,`recognizerProcessParam`,{processParam:{}}),VR(this,`imageProcessParam`,{processParam:{}}),VR(this,`recognizeListener`,null),VR(this,`workerPath`,`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`)}get processingListener(){return this._processingListener}set processingListener(e){this._processingListener=e,e&&e({isProcessing:this.isProcessing})}get initializeListener(){return this._initializeListener}set initializeListener(e){this._initializeListener=e,e&&e({isInitialized:this.isInitialized})}createProcessImageRequest(e,t){let n=e.map((e,t)=>({data:e,light:6,pageIdx:t}));return BR(BR({},t),{},{imagesList:n})}prepareImageData(e){return e.map(e=>e instanceof ImageData?{width:e.width,height:e.height,data:e.data.buffer}:{data:e})}sendMessage(e){return this._queueService.addTask(()=>new Promise((t,n)=>{if(!this._worker)return GR(`Worker is missing)`),n(`Worker is missing`);this._worker.onmessage=e=>{if(e.data.target===lp.custom){let{method:r,response:i,code:a}=e.data.data,o=i&&`reject_message`in i?i.reject_message:``;if(a===xf.ok||a===xf.badLicense&&!o)GR(`Method ${r}: { code: ${a} } `),t(i);else{let e=`Method ${r}: ${Qf[a]||a}${o?` Reject message: ${o}`:``}`;GR(e),n(e)}}e.data.target===lp.stdout&&WR(JSON.stringify(e.data.content)),e.data.target===lp.stderr&&(WR(JSON.stringify(e.data.content)),n(e.data.content))},this._worker.onerror=e=>{WR(JSON.stringify(e.message)),n(e)},GR(`Send message to worker: { target: ${e.target}, method: ${e.method} }`),this._worker.postMessage(BR(BR({},e),{},{preMain:!0}),`data`in e&&e.data?e.data.map(e=>e.data):[])}))}prepare(e){return V(this,null,function*(){var t;GR(`Preparing the service`);{let t=this.workerPath===`https://wasm.regulaforensics.com/document/release/9.5/barcodemrz/1f57dab0-9204d6578`,n=RR(e&&t?vE(e,`PROD`):this.workerPath),r=yield(yield fetch(`${n}/${Kf}`)).text();t||(r=_E(r,n));let i=new Blob([r],{type:`text/plain`}),a=URL.createObjectURL(i);this._worker=new Worker(a),URL.revokeObjectURL(a)}(t=this._worker)==null||t.postMessage({method:vf.prepare,target:lp.gl,preMain:!0,op:`setPrefetched`}),yield this.sendMessage({method:vf.prepare,target:lp.init,URL:document.URL}),this.isPrepared=!0,GR(`Service prepared`)})}initialize(e){return V(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(e),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(e){return V(this,null,function*(){var t,n;this.isPrepared||(yield this.prepare(e==null?void 0:e.module)),GR(`Initializing the service`);let{scenario:r,license:i}=yield this.sendMessage({target:lp.custom,method:vf.initialize,request:{systemInfo:{userID:p_(Sp),hostName:(t=document.location)==null?void 0:t.origin,license:e==null?void 0:e.license},telemetry:yield __({sdkVersion:`9.5.2892`}),processParam:this.recognizerProcessParam.processParam||this.imageProcessParam.processParam}});return this.initData={scenario:r,license:i},this.isInitialized=!0,(n=this._initializeListener)==null||n.call(this,{isInitialized:this.isInitialized}),GR(`Service initialized: ${JSON.stringify({scenario:r,license:i})}`),this.initData})}doProcess(e,t,n){return V(this,null,function*(){var r,i;GR(`Process method ${e} started`),this.isProcessing=!0,(r=this._processingListener)==null||r.call(this,{isProcessing:this.isProcessing});let a=yield this.sendMessage({target:lp.custom,method:e,request:t,data:n});return this.isProcessing=!1,(i=this._processingListener)==null||i.call(this,{isProcessing:this.isProcessing}),GR(`Process method ${e} finished`),new oE(a)})}processImageBase64(e,t){return V(this,null,function*(){return this.doProcess(vf.processImage,this.createProcessImageRequest(e,t))})}process(e,t){return V(this,null,function*(){var n;let r=this.prepareImageData(e),i=yield this.doProcess(vf.process,t||this.recognizerProcessParam,r);return(n=this.recognizeListener)==null||n.call(this,i),i})}processImage(e,t){return V(this,null,function*(){let n=this.prepareImageData(e);return this.doProcess(vf.processImage,t||this.imageProcessParam,n)})}startNewPage(){return V(this,null,function*(){GR(`Starting new page`),yield this.sendMessage({target:lp.custom,method:vf.startNewPage})})}startNewDocument(e,t){return V(this,null,function*(){return GR(`Starting new document`),yield this.sendMessage({target:lp.custom,method:vf.startNewDocument,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}createBackendTransaction(e,t){return V(this,null,function*(){return GR(`Create backend transaction`),yield this.sendMessage({target:lp.custom,method:vf.createBackendTransaction,request:BR(BR({},t||this.recognizerProcessParam),{},{metadata:e})})})}finalizePackage(){return V(this,null,function*(){try{var e;GR(`Finalize package`);let t=yield this.sendMessage({target:lp.custom,method:vf.finalizePackage});return(e=this.onFinalize)==null||e.call(this,t),t}catch(e){var t;return(t=this.onFinalize)==null||t.call(this,{tag:``,transactionId:``}),Promise.reject(e)}})}addDataToPackage(e,t){return V(this,null,function*(){GR(`Add data to package`),yield this.sendMessage({target:lp.custom,method:vf.addDataToPackage,request:t,data:[{data:e.buffer}]}),GR(`Data added to package`)})}shutdown(){GR(`Shutdown service`),this._worker&&(this._worker.terminate(),GR(`Worker terminated`)),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}};function qR(){return V(this,null,function*(){let e=window.customElements.get(`document-reader`),t=window.customElements.get(`camera-snapshot`),n=window.customElements.get(`fullscreen-container`);e||window.customElements.define(`document-reader`,TI),t||window.customElements.define(`camera-snapshot`,HI),n||window.customElements.define(`fullscreen-container`,KI);let r=window.customElements.whenDefined(`document-reader`),i=window.customElements.whenDefined(`camera-snapshot`),a=window.customElements.whenDefined(`fullscreen-container`);yield Promise.all([r,i,a])})}var JR={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:E},YR=(e=JR,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function XR(e){return(t,n)=>typeof n==`object`?YR(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var ZR=(e,t,n)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return n==null?void 0:n()};function QR(e){"@babel/helpers - typeof";return QR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},QR(e)}function $R(e,t){if(QR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ez(e){var t=$R(e,`string`);return QR(t)==`symbol`?t:t+``}function tz(e,t,n){return(t=ez(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nz(Object(n),!0).forEach(function(t){tz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var iz=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}};function az(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.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" 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(`-------`)}function oz(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var sz={FORM:`form`,DATA:`data`},cz=[`ar`,`he`],lz=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return cz.includes(n)?`rtl`:`ltr`},uz=(e,t)=>e.base64&&!(t!=null&&t.base64.has(e.base64))?e.base64:e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))?e.imageURL:``,dz=(e,t,n)=>{var r;if(!t)return;let i=(r=e==null?void 0:e.idvAsset)==null?null:r;for(;i;){let e=uz(i,n);if(e)return e;i=i.failurePolicy===`placeholderImage`&&i.placeholderImage||null}},fz={DOC_READER:`DOC_READER`,DOC_READER_GALLERY:`DOC_READER_GALLERY`},pz=function(e){return e[e.NO_INITIALIZED=0]=`NO_INITIALIZED`,e[e.UNKNOWN_STEP=1]=`UNKNOWN_STEP`,e[e.SCAN_ERROR=2]=`SCAN_ERROR`,e[e.RFID_ERROR=3]=`RFID_ERROR`,e[e.IMAGE_LOADING_FAILED=4]=`IMAGE_LOADING_FAILED`,e}({}),mz=function(e){return e[e.CONFIGURATION_FAILED=0]=`CONFIGURATION_FAILED`,e[e.INTERNAL_ERROR=1]=`INTERNAL_ERROR`,e[e.PRESENTER_UNAVAILABLE=2]=`PRESENTER_UNAVAILABLE`,e}({}),hz=`idv-document`,gz={0:pf.auto,1:pf.captureVideo,2:pf.captureFrame},_z={0:yf.line,1:yf.corners},vz={0:!0,1:!0,2:!1,3:!0},yz=1920,bz=4e6,xz=5e7,Sz=function(e){return e.BarcodeMRZ=`BarcodeMRZ`,e.BoundsLite=`BoundsLite`,e}({}),Cz,wz,Tz=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,pz);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})}};Cz=Tz,Cz.MODULE=hz,Cz.ERROR_ENUM_NAME=`ReaderModuleError`,Cz.SHORT_CODE=`RM`;var Ez=class e extends iz{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=iz.getErrorKey(t,mz);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})}};wz=Ez,wz.MODULE=hz,wz.ERROR_ENUM_NAME=`ScanError`,wz.SHORT_CODE=`RMS`;var Dz=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})};function Oz(e){return XR(rz(rz({},e),{},{state:!0,attribute:!1}))}var kz=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function Az(e,t){return(n,r,i)=>{let a=t=>{var n,r;return(n=(r=t.renderRoot)==null?void 0:r.querySelector(e))==null?null:n};if(t){let{get:e,set:t}=typeof r==`object`?n:i==null?(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})():i;return kz(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return kz(n,r,{get(){return a(this)}})}}function jz(e){return Mz.apply(this,arguments)}function Mz(){return Mz=d(function*(e){return new Promise(t=>setTimeout(t,e))}),Mz.apply(this,arguments)}function Nz(e){return Pz.apply(this,arguments)}function Pz(){return Pz=d(function*(e,t=0,n=0){let r=null,i=n*1e3;for(let n=0;n<=t;n++){try{let t=yield e();if(t!=null&&t.transactionId)return t;break}catch(e){r=e}n<t&&(yield jz(i))}throw r}),Pz.apply(this,arguments)}var Fz=e=>e?(e.internalScenario&&(e.scenario=e.internalScenario),delete e.internalScenario,e):{},Iz=e=>{try{return new URL(e),!0}catch(e){return!1}};function Lz(e,t,n,r,i){let a=e*t,o=a>i;return{width:e,height:t,isExtraLargeResolution:o,isDownscaleNeeded:(e>n||t>n||a>r)&&!o}}var Rz=function(){var e=d(function*(e,t,n,r){let i=yield createImageBitmap(e),{width:a,height:o}=i;return i==null||i.close(),Lz(a,o,t,n,r)});return function(t,n,r,i){return e.apply(this,arguments)}}();function zz({width:e,height:t,softSideLimit:n,softPixelLimit:r}){if(!(e>0&&t>0))return{width:1,height:1};let i=Math.max(e,t),a=e*t,o=i>n?n/i:1,s=a>r?Math.sqrt(r/a):1,c=Math.min(o,s,1);return{width:Math.max(1,Math.floor(e*c)),height:Math.max(1,Math.floor(t*c))}}function Bz(e,t,n){return Vz.apply(this,arguments)}function Vz(){return Vz=d(function*(e,t,n){return new Promise(r=>{if(!e||!e.size)return r({ok:!1});let i=document.createElement(`canvas`),a=i.getContext(`2d`),o=URL.createObjectURL(e),s=new Image,c=e=>{try{URL.revokeObjectURL(o)}catch(e){}try{i.width=0,i.height=0}catch(e){}s.onload=null,s.onerror=null,s.src=``,r(e)};s.onload=function(){let e=zz({width:s.width,height:s.height,softSideLimit:t,softPixelLimit:n});if(i.width=e.width,i.height=e.height,a)try{a.drawImage(s,0,0,e.width,e.height);let t=a.getImageData(0,0,e.width,e.height);return c(t?{ok:!0,imageData:t}:{ok:!1})}catch(e){return c({ok:!1})}return c({ok:!1})},s.onerror=()=>c({ok:!1}),s.src=o})}),Vz.apply(this,arguments)}var Hz=e=>{let{translationKeysData:t,translationKeysProps:n,locale:r}=e,i={},a=null;for(let e in t)i[t[e].key]=e;for(let e in n)i[e]&&n[e]&&(a?a[i[e]]=n[e]:a={[i[e]]:n[e]});return a?{[r]:a}:{}},Uz={preparingCamera:{fallback:`Preparing the camera...`,key:`strPrepareCamera`},timeout:{fallback:`Timeout`,key:`strTimeout`},noFocus:{fallback:`No camera focus`,key:`strNoFocus`},somethingWentWrong:{fallback:`Something went wrong`,key:`messageUnknownError`},incorrectCameraId:{fallback:`No camera with the specified ID found.`,key:`InfoScreenIncorrectCameraIdTitle`},done:{fallback:`Done!`,key:`strDoneMessage`},cameraUnavailable:{fallback:`Camera unavailable!`,key:`statusCameraUnavailableTitle`},versionNotSupported:{fallback:`Your browser version is not supported`,key:`statusBrowserNotSupportedTitle`},httpNotSupported:{fallback:`HTTPS not used`,key:`statusBrowserHTTPNotSupportedSubtitle`},insecurePageContext:{fallback:`Insecure context`,key:`statusBrowserInsecurePageContextSubtitle`},badLicense:{fallback:`The license cannot be found or has expired`,key:`statusProcMgrBadLicenseSubtitle`},fileCorrupt:{fallback:`This file is corrupt or not supported`,key:`statusIncorrectDataTitle`},largeFile:{fallback:`This file is too large to be uploaded`,key:`statusLargeDataTitle`},placeDocumentIntoFrame:{fallback:`Fit the document into the frame`,key:`strPlaceDocumentInFrame`},holdDocumentStraight:{fallback:`Hold the document straight`,key:`strHoldDocumentStraight`},glaresOnDocument:{fallback:`Avoid glare on the document`,key:`strGlaresOnDocument`},tryAgain:{fallback:`Try again`,key:`faceLivenessScreenButton`},noCameraAvailable:{fallback:`No camera available`,key:`InfoScreenNoCameraTitle`},positionDocumentCenter:{fallback:`Position the document in the center`,key:`documentReaderDocumentReaderLayoutDocumentCenter`},uploadPhoto:{fallback:`Upload a photo`,key:`cameraCaptureCameraCaptureStartScreenTitle`},moveCloser:{fallback:`Move closer`,key:`hint.moveCloser`},keepDeviceStill:{fallback:`Hold the device still`,key:`strKeepDeviceStill`},camera:{fallback:`Camera`,key:`strCamera`},switchToMobile:{fallback:`Switch to mobile`,key:`switchToMobile`},openPhoneCamera:{fallback:`Open the camera on your mobile device, scan the QR code, and follow the link`,key:`openPhoneCamera`},pleaseWait:{fallback:`Please wait...`,key:`strPleaseWait`},mobileDevice:{fallback:`Mobile device`,key:`mobileDevice`},verifyYourIdentity:{fallback:`Identity document verification`,key:`verifyYourIdentity`},fromCameraFilesMobileDesktop:{fallback:`Capture a document using the computer’s camera, upload it from files, or scan it on a mobile device`,key:`fromCameraFilesMobileDesktop`},fromCameraFilesDesktop:{fallback:`Capture a document using the computer’s camera or upload it from files`,key:`fromCameraFilesDesktop`},fromCameraMobileDesktop:{fallback:`Capture a document using the computer’s camera or scan it on a mobile device`,key:`fromCameraMobileDesktop`},fromFilesMobileDesktop:{fallback:`Upload a document from files or scan it on a mobile device`,key:`fromFilesMobileDesktop`},fromCameraDesktop:{fallback:`Use the computer's camera to capture a document`,key:`fromCameraDesktop`},fromFilesDesktop:{fallback:`Pick a document from files and upload it`,key:`fromFilesDesktop`},fromMobileDesktop:{fallback:`Use your mobile camera to capture a document`,key:`fromMobileDesktop`},fromCameraGalleryMobile:{fallback:`Capture a document using the mobile's camera or upload it from gallery`,key:`fromCameraGalleryMobile`},fromGalleryMobile:{fallback:`Pick a document from the gallery and upload it`,key:`fromGalleryMobile`},gallery:{fallback:`Gallery`,key:`gallery`},files:{fallback:`Files`,key:`files`},returnToComputer:{fallback:`Return to the computer`,key:`returnToComputer`},documentCaptured:{fallback:`Your document has been captured`,key:`documentCaptured`},or:{fallback:`or`,key:`strOr`},continueInBrowser:{fallback:`Click here to continue in browser`,key:`continueInBrowser`},skip:{fallback:`Skip`,key:`strSkip`},flipTheDocument:{fallback:`Flip the document`,key:`documentReaderDocumentReaderLayoutFlipDocument`},tiltTheDocument:{fallback:`Tilt the document`,key:`strTiltDocument`}},Wz=s`
36
36
  *,
37
37
  ::after,
38
38
  ::before {
@@ -57,7 +57,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
57
57
  width: 100%;
58
58
  height: 100%;
59
59
  }
60
- `;function Gz(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Kz(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 qz=class extends Ne{constructor(...e){super(...e),this._performType=sz.DATA,this.props=null,this._handleDocumentReader=e=>{var t,n,r,i;if((t=this.props)==null||(n=t.idvEventListener)==null||n.call(t,`IDV-DOCUMENT`,e.detail.action),e.detail.action===W.CAMERA_PROCESS_STARTED&&(r=this.props)!=null&&r.isProcessing&&this.props.isProcessing(!1),e.detail.action===W.PROCESS_FINISHED){var a,o,s,c,l;if(((a=e.detail.data)==null?void 0:a.status)===ip.ERROR){var u;let t={transactionId:``,cancel:!1,has_nfc:!1,errorCode:e.detail.data.reason};(u=this.props)==null||u.perform(t,this._performType)}let t=(o=e.detail.data)==null?void 0:o.status,n=t===ip.OK,r=t===ip.TIMEOUT;if(!(n||r)||!((s=e.detail.data)!=null&&s.response))return;if((c=this.props)!=null&&c.isProcessing){var d,f;(d=this.props)==null||(f=d.idvEventListener)==null||f.call(d,`IDV-DOCUMENT`,`Success. Start to finalize package`,`DEBUG`),this.props.isProcessing(!0)}let i=(l=this.props)==null||(l=l.moduleProps)==null?void 0:l.finalizePackageSettings;Pz(()=>window.RegulaDocumentSDK.finalizePackage(),i==null?void 0:i.retryCount,i==null?void 0:i.retryDelay).then(e=>{var t;let n={transactionId:(e==null?void 0:e.transactionId)||``,cancel:!1,has_nfc:!1,errorCode:``};(t=this.props)==null||t.perform(n,this._performType)}).catch(e=>{var t;console.log(`finalizePackage error: `,e),(t=this.props)==null||t.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)})}if(((i=e.detail)==null?void 0:i.action)===W.CLOSE||e.detail.action===W.CAMERA_PROCESS_CLOSED){var p;(p=this.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}}}_prepareCustomizationStyles(e,t,n){let r=[];if(e!=null&&e.fontFamily&&r.push(s`
60
+ `;function Gz(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Kz(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 qz=class extends Ne{constructor(...e){super(...e),this._performType=sz.DATA,this.props=null,this._handleDocumentReader=e=>{var t,n,r,i;if((t=this.props)==null||(n=t.idvEventListener)==null||n.call(t,`IDV-DOCUMENT`,e.detail.action),e.detail.action===W.CAMERA_PROCESS_STARTED&&(r=this.props)!=null&&r.isProcessing&&this.props.isProcessing(!1),e.detail.action===W.PROCESS_FINISHED){var a,o,s,c,l;if(((a=e.detail.data)==null?void 0:a.status)===ip.ERROR){var u;let t={transactionId:``,cancel:!1,has_nfc:!1,errorCode:e.detail.data.reason};(u=this.props)==null||u.perform(t,this._performType)}let t=(o=e.detail.data)==null?void 0:o.status,n=t===ip.OK,r=t===ip.TIMEOUT;if(!(n||r)||!((s=e.detail.data)!=null&&s.response))return;(c=this.props)!=null&&c.isProcessing&&this.props.isProcessing(!0);let i=(l=this.props)==null||(l=l.moduleProps)==null?void 0:l.finalizePackageSettings;Nz(()=>window.RegulaDocumentSDK.finalizePackage(),i==null?void 0:i.retryCount,i==null?void 0:i.retryDelay).then(e=>{var t;let n={transactionId:(e==null?void 0:e.transactionId)||``,cancel:!1,has_nfc:!1,errorCode:``};(t=this.props)==null||t.perform(n,this._performType)}).catch(e=>{var t;console.log(`finalizePackage error: `,e),(t=this.props)==null||t.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)})}if(((i=e.detail)==null?void 0:i.action)===W.CLOSE||e.detail.action===W.CAMERA_PROCESS_CLOSED){var d;(d=this.props)==null||d.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}}}_prepareCustomizationStyles(e,t,n){let r=[];if(e!=null&&e.fontFamily&&r.push(s`
61
61
  document-reader::part(container) {
62
62
  font-family: ${o(e.fontFamily)};
63
63
  }
@@ -113,39 +113,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113
113
  document-reader::part(webcamera-video) {
114
114
  background-color: ${o(e.cameraPreviewBackgroundColor)};
115
115
  }
116
- `),e!=null&&e.containerCloseButtonImage){let i=fz(e.containerCloseButtonImage,t,n);i&&r.push(s`
116
+ `),e!=null&&e.containerCloseButtonImage){let i=dz(e.containerCloseButtonImage,t,n);i&&r.push(s`
117
117
  document-reader::part(container-close-button)::before {
118
118
  background-image: url(${o(i)});
119
119
  }
120
- `)}if(e!=null&&e.menuFromCameraButtonImage){let i=fz(e.menuFromCameraButtonImage,t,n);i&&r.push(s`
120
+ `)}if(e!=null&&e.menuFromCameraButtonImage){let i=dz(e.menuFromCameraButtonImage,t,n);i&&r.push(s`
121
121
  document-reader::part(menu-from-camera-button)::before {
122
122
  background-image: url(${o(i)});
123
123
  }
124
- `)}if(e!=null&&e.menuFromGalleryButtonImage){let i=fz(e.menuFromGalleryButtonImage,t,n);i&&r.push(s`
124
+ `)}if(e!=null&&e.menuFromGalleryButtonImage){let i=dz(e.menuFromGalleryButtonImage,t,n);i&&r.push(s`
125
125
  document-reader::part(menu-from-gallery-button)::before {
126
126
  background-image: url(${o(i)});
127
127
  }
128
- `)}if(e!=null&&e.menuFromMobileButtonImage){let i=fz(e.menuFromMobileButtonImage,t,n);i&&r.push(s`
128
+ `)}if(e!=null&&e.menuFromMobileButtonImage){let i=dz(e.menuFromMobileButtonImage,t,n);i&&r.push(s`
129
129
  document-reader::part(menu-from-mobile-button)::before {
130
130
  background-image: url(${o(i)});
131
131
  }
132
- `)}if(e!=null&&e.closeButton){let i=fz(e.closeButton,t,n);i&&r.push(s`
132
+ `)}if(e!=null&&e.closeButton){let i=dz(e.closeButton,t,n);i&&r.push(s`
133
133
  document-reader::part(controls-process-close-button)::before {
134
134
  background-image: url(${o(i)});
135
135
  }
136
- `)}if(e!=null&&e.switchButton){let i=fz(e.switchButton,t,n);i&&r.push(s`
136
+ `)}if(e!=null&&e.switchButton){let i=dz(e.switchButton,t,n);i&&r.push(s`
137
137
  document-reader::part(controls-change-camera-button)::before {
138
138
  background-image: url(${o(i)});
139
139
  }
140
- `)}if(e!=null&&e.infoTryAgainButtonImage){let i=fz(e.infoTryAgainButtonImage,t,n);i&&r.push(s`
140
+ `)}if(e!=null&&e.infoTryAgainButtonImage){let i=dz(e.infoTryAgainButtonImage,t,n);i&&r.push(s`
141
141
  document-reader::part(info-try-again-button)::before {
142
142
  background-image: url(${o(i)});
143
143
  }
144
- `)}return r}_prepareTranslations(e){let{locale:t,localizationKeys:n}=e,r=t&&typeof t==`string`?t.slice(0,2).toLowerCase():``;return!r||!n?null:Hz({translationKeysData:Uz,translationKeysProps:n,locale:r})}_prepareSettings({copyright:e,customization:t,functionality:n,locale:r}){var i,a,o,s,c;let l=oz({copyright:e,skipButton:n==null?void 0:n.showSkipNextPageButton,captureButton:n==null?void 0:n.showCaptureButton,captureButtonDelay:n==null?void 0:n.showCaptureButtonDelayFromStart,cameraFrameOffsetWidth:t==null?void 0:t.cameraFrameWidthOffset,cameraFrameActiveColor:t==null?void 0:t.cameraFrameActiveColor,cameraFrameDefaultColor:t==null?void 0:t.cameraFrameDefaultColor,closeButton:n==null?void 0:n.showCloseButton,changeCameraButton:n==null?void 0:n.showCameraSwitchButton,videoCaptureMotionControl:n==null?void 0:n.videoCaptureMotionControl,statusIcon:t==null?void 0:t.showStatusMessages,cameraFrameBorderWidth:t==null?void 0:t.cameraFrameBorderWidth,cameraFrameLineLength:t==null?void 0:t.cameraFrameLineLength,nextPageAnimationEndDelay:t==null?void 0:t.nextPageAnimationEndDelay,nextPageAnimationStartDelay:t==null?void 0:t.nextPageAnimationStartDelay,statusPositionMultiplier:t==null?void 0:t.statusPositionMultiplier,cameraFrameLandscapeAspectRatio:t==null?void 0:t.cameraFrameLandscapeAspectRatio,cameraFramePortraitAspectRatio:t==null?void 0:t.cameraFramePortraitAspectRatio,cameraFrameCornerRadius:t==null?void 0:t.cameraFrameCornerRadius,cameraFrameVerticalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,cameraFrameHorizontalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,internalScenario:n==null?void 0:n.internalScenario,multipageProcessing:n==null?void 0:n.multipageProcessing,multipleFileInput:n==null?void 0:n.multipleFileInput,cameraId:n==null?void 0:n.cameraId,mirrorType:n==null?void 0:n.mirrorType,mobileDelegate:n==null?void 0:n.mobileDelegate,finalizeOnTimeout:n==null?void 0:n.finalizeOnTimeout,maxImageSize:n==null?void 0:n.maxImageSize,maxResolutionSize:n==null?void 0:n.maxResolutionSize,cameraMode:n==null?void 0:n.cameraMode,videoRecord:n==null?void 0:n.recordScanningProcess,activityIndicatorLandscapePositionMultiplier:t==null?void 0:t.activityIndicatorLandscapePositionMultiplier,activityIndicatorPortraitPositionMultiplier:t==null?void 0:t.activityIndicatorPortraitPositionMultiplier,cameraFrameLineCap:t==null?void 0:t.cameraFrameLineCap,fromCameraButton:t==null?void 0:t.fromCameraButton,uploadFileButton:t==null?void 0:t.uploadFileButton,mirrorButton:t==null?void 0:t.mirrorButton,nonce:(i=this.props)==null?void 0:i.nonce}),u=rz(rz(rz(rz(rz({},!!r&&typeof r==`string`&&{locale:r.slice(0,2).toLowerCase()}),typeof(n==null?void 0:n.captureMode)==`number`&&n.captureMode in _z&&{captureMode:_z[n.captureMode]}),typeof(t==null?void 0:t.cameraFrameShapeType)==`number`&&t.cameraFrameShapeType in vz&&{cameraFrameShapeType:vz[t.cameraFrameShapeType]}),(typeof(n==null||(a=n.videoOutputSettings)==null?void 0:a.AVVideoWidthKey)==`number`||typeof(n==null||(o=n.videoOutputSettings)==null?void 0:o.AVVideoHeightKey)==`number`)&&{resolution:rz(rz({},typeof(n==null||(s=n.videoOutputSettings)==null?void 0:s.AVVideoWidthKey)==`number`&&{width:n.videoOutputSettings.AVVideoWidthKey}),typeof(n==null||(c=n.videoOutputSettings)==null?void 0:c.AVVideoHeightKey)==`number`&&{height:n.videoOutputSettings.AVVideoHeightKey})}),typeof(n==null?void 0:n.cameraFrame)==`number`&&n.cameraFrame in yz&&{cameraFrame:yz[n.cameraFrame]});return rz(rz({},l),u)}_setDocReaderProps(){var e,t,n;if(!this.props||!this._component)return;(e=(t=this.props).isProcessing)==null||e.call(t,!0);let{processParam:r,functionality:i,customization:a,sessionId:o,copyright:s,serviceToken:l,locale:u,preloadAssetsRequired:d,failedAssets:f}=this.props.moduleProps,p=Iz(r),m=p==null||(n=p.backendProcessing)==null?void 0:n.serviceURL;if(!m||!cz(m)){let e=new Dz({errorCode:hz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Ez({errorCode:mz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}if(l&&p!=null&&p.backendProcessing){var h;p.backendProcessing.httpHeaders=rz({Authorization:`Connection ${l}`},p==null||(h=p.backendProcessing)==null?void 0:h.httpHeaders)}let g={processParam:rz({},p)};o&&(g.tag=o),window.RegulaDocumentSDK.recognizerProcessParam=g,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}},c(this.shadowRoot,[...this.shadowRoot.adoptedStyleSheets,...this._prepareCustomizationStyles(a,d,f)]),this._component.settings=this._prepareSettings({copyright:s,customization:a,functionality:i,locale:u}),this._component.translations=this._prepareTranslations(this.props.moduleProps)}updated(e){e.has(`props`)&&this._setDocReaderProps()}render(){return fe`<document-reader
144
+ `)}return r}_prepareTranslations(e){let{locale:t,localizationKeys:n}=e,r=t&&typeof t==`string`?t.slice(0,2).toLowerCase():``;return!r||!n?null:Hz({translationKeysData:Uz,translationKeysProps:n,locale:r})}_prepareSettings({copyright:e,customization:t,functionality:n,locale:r}){var i,a,o,s,c;let l=oz({copyright:e,skipButton:n==null?void 0:n.showSkipNextPageButton,captureButton:n==null?void 0:n.showCaptureButton,captureButtonDelay:n==null?void 0:n.showCaptureButtonDelayFromStart,cameraFrameOffsetWidth:t==null?void 0:t.cameraFrameWidthOffset,cameraFrameActiveColor:t==null?void 0:t.cameraFrameActiveColor,cameraFrameDefaultColor:t==null?void 0:t.cameraFrameDefaultColor,closeButton:n==null?void 0:n.showCloseButton,changeCameraButton:n==null?void 0:n.showCameraSwitchButton,videoCaptureMotionControl:n==null?void 0:n.videoCaptureMotionControl,statusIcon:t==null?void 0:t.showStatusMessages,cameraFrameBorderWidth:t==null?void 0:t.cameraFrameBorderWidth,cameraFrameLineLength:t==null?void 0:t.cameraFrameLineLength,nextPageAnimationEndDelay:t==null?void 0:t.nextPageAnimationEndDelay,nextPageAnimationStartDelay:t==null?void 0:t.nextPageAnimationStartDelay,statusPositionMultiplier:t==null?void 0:t.statusPositionMultiplier,cameraFrameLandscapeAspectRatio:t==null?void 0:t.cameraFrameLandscapeAspectRatio,cameraFramePortraitAspectRatio:t==null?void 0:t.cameraFramePortraitAspectRatio,cameraFrameCornerRadius:t==null?void 0:t.cameraFrameCornerRadius,cameraFrameVerticalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,cameraFrameHorizontalPositionMultiplier:t==null?void 0:t.cameraFramePositionMultiplier,internalScenario:n==null?void 0:n.internalScenario,multipageProcessing:n==null?void 0:n.multipageProcessing,multipleFileInput:n==null?void 0:n.multipleFileInput,cameraId:n==null?void 0:n.cameraId,mirrorType:n==null?void 0:n.mirrorType,mobileDelegate:n==null?void 0:n.mobileDelegate,finalizeOnTimeout:n==null?void 0:n.finalizeOnTimeout,maxImageSize:n==null?void 0:n.maxImageSize,maxResolutionSize:n==null?void 0:n.maxResolutionSize,cameraMode:n==null?void 0:n.cameraMode,videoRecord:n==null?void 0:n.recordScanningProcess,activityIndicatorLandscapePositionMultiplier:t==null?void 0:t.activityIndicatorLandscapePositionMultiplier,activityIndicatorPortraitPositionMultiplier:t==null?void 0:t.activityIndicatorPortraitPositionMultiplier,cameraFrameLineCap:t==null?void 0:t.cameraFrameLineCap,fromCameraButton:t==null?void 0:t.fromCameraButton,uploadFileButton:t==null?void 0:t.uploadFileButton,mirrorButton:t==null?void 0:t.mirrorButton,nonce:(i=this.props)==null?void 0:i.nonce}),u=rz(rz(rz(rz(rz({},!!r&&typeof r==`string`&&{locale:r.slice(0,2).toLowerCase()}),typeof(n==null?void 0:n.captureMode)==`number`&&n.captureMode in gz&&{captureMode:gz[n.captureMode]}),typeof(t==null?void 0:t.cameraFrameShapeType)==`number`&&t.cameraFrameShapeType in _z&&{cameraFrameShapeType:_z[t.cameraFrameShapeType]}),(typeof(n==null||(a=n.videoOutputSettings)==null?void 0:a.AVVideoWidthKey)==`number`||typeof(n==null||(o=n.videoOutputSettings)==null?void 0:o.AVVideoHeightKey)==`number`)&&{resolution:rz(rz({},typeof(n==null||(s=n.videoOutputSettings)==null?void 0:s.AVVideoWidthKey)==`number`&&{width:n.videoOutputSettings.AVVideoWidthKey}),typeof(n==null||(c=n.videoOutputSettings)==null?void 0:c.AVVideoHeightKey)==`number`&&{height:n.videoOutputSettings.AVVideoHeightKey})}),typeof(n==null?void 0:n.cameraFrame)==`number`&&n.cameraFrame in vz&&{cameraFrame:vz[n.cameraFrame]});return rz(rz({},l),u)}_setDocReaderProps(){var e,t,n;if(!this.props||!this._component)return;(e=(t=this.props).isProcessing)==null||e.call(t,!0);let{processParam:r,functionality:i,customization:a,sessionId:o,copyright:s,serviceToken:l,locale:u,preloadAssetsRequired:d,failedAssets:f}=this.props.moduleProps,p=Fz(r),m=p==null||(n=p.backendProcessing)==null?void 0:n.serviceURL;if(!m||!Iz(m)){let e=new Ez({errorCode:mz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Tz({errorCode:pz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}if(l&&p!=null&&p.backendProcessing){var h;p.backendProcessing.httpHeaders=rz({Authorization:`Connection ${l}`},p==null||(h=p.backendProcessing)==null?void 0:h.httpHeaders)}let g={processParam:rz({},p)};o&&(g.tag=o),window.RegulaDocumentSDK.recognizerProcessParam=g,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}},c(this.shadowRoot,[...this.shadowRoot.adoptedStyleSheets,...this._prepareCustomizationStyles(a,d,f)]),this._component.settings=this._prepareSettings({copyright:s,customization:a,functionality:i,locale:u}),this._component.translations=this._prepareTranslations(this.props.moduleProps)}updated(e){e.has(`props`)&&this._setDocReaderProps()}render(){return fe`<document-reader
145
145
  new-layout
146
146
  start-screen=${!1}
147
147
  @document-reader=${this._handleDocumentReader}
148
- ></document-reader>`}},Jz=(qz.styles=[Wz],qz);Kz([kz(),Gz(`design:type`,Object)],Jz.prototype,`props`,void 0),Kz([jz(`document-reader`),Gz(`design:type`,TI===void 0?Object:TI)],Jz.prototype,`_component`,void 0),Jz=Kz([Oz(`document-reader-camera`)],Jz);var Yz=e=>e==null?z:e,Xz=s`
148
+ ></document-reader>`}},Jz=(qz.styles=[Wz],qz);Kz([Oz(),Gz(`design:type`,Object)],Jz.prototype,`props`,void 0),Kz([Az(`document-reader`),Gz(`design:type`,TI===void 0?Object:TI)],Jz.prototype,`_component`,void 0),Jz=Kz([Dz(`document-reader-camera`)],Jz);var Yz=e=>e==null?z:e,Xz=s`
149
149
  .gallery-root {
150
150
  display: flex;
151
151
  width: 100%;
@@ -277,10 +277,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
277
277
  d="M93.1547 5.85404C92.7965 5.24412 91.9727 4.77991 90.8981 4.77991C89.0174 4.77991 87.459 6.35794 87.459 8.38431C87.459 10.3925 89.0174 11.9336 90.8981 11.9336C91.9191 11.9336 92.5637 11.6287 93.0651 10.9996V11.6455C93.0651 13.0442 92.08 13.5462 91.1308 13.5462C90.1816 13.5462 89.4292 13.0792 89.286 12.0578H87.7099C87.7818 13.8512 89.2142 15 91.1308 15C93.0474 15 94.6758 13.9063 94.6758 11.539V4.83175H93.1547V5.85404ZM91.0772 10.3911C89.9307 10.3911 89.1069 9.54811 89.1069 8.38291C89.1069 7.21772 89.9307 6.32058 91.0772 6.32058C92.2237 6.32058 93.0651 7.21725 93.0651 8.38291C93.0651 9.54858 92.2232 10.3911 91.0772 10.3911Z"
278
278
  fill="#BD7DFF"
279
279
  />
280
- </svg>`,eB=class extends Ne{constructor(...e){var t;super(...e),t=this,this._performType=sz.DATA,this.props=null,this._handleInputChange=function(){var e=d(function*(e){var n,r,i;let a=[...(n=e.target.files)==null?[]:n];if(!a.length)return;(r=t.props)!=null&&r.isProcessing&&t.props.isProcessing(!0),yield window.RegulaDocumentSDK.createBackendTransaction({},window.RegulaDocumentSDK.recognizerProcessParam);let o=[];for(let e of a){let{isExtraLargeResolution:n,isDownscaleNeeded:r}=yield Rz(e,bz,xz,Sz),i=e.type.startsWith(`image/webp`);if(n){var s;(s=t.props)==null||s.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_RESOLUTION_EXCEEDS_LIMIT`},t._performType);return}if(r||i){let n=yield Bz(e,bz,xz);if(!n.ok){var c;let e={transactionId:``,cancel:!1,has_nfc:!1,errorCode:r?`IMAGE_DOWNSCALING_ERROR`:`IMAGE_PROCESSING_ERROR`};(c=t.props)==null||c.perform(e,t._performType);return}o.push(n.imageData)}else o.push(yield e.arrayBuffer())}try{yield window.RegulaDocumentSDK.processImage(o)}catch(e){var l;(l=t.props)==null||l.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_PROCESSING_ERROR`},t._performType);return}let u=(i=t.props)==null||(i=i.moduleProps)==null?void 0:i.finalizePackageSettings;try{var f;let e=yield Pz(d(function*(){return window.RegulaDocumentSDK.finalizePackage()}),u==null?void 0:u.retryCount,u==null?void 0:u.retryDelay),n={transactionId:e==null?void 0:e.transactionId,cancel:!1,has_nfc:!1,errorCode:``};(f=t.props)==null||f.perform(n,t._performType)}catch(e){var p;console.log(`finalizePackage error: `,e),(p=t.props)==null||p.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},t._performType)}});return function(t){return e.apply(this,arguments)}}()}_handleUploadClick(){this._input.click()}_handleCloseClick(){var e;(e=this.props)==null||e.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}_setDocReaderGalleryProps(){var e;if(!this.props)return;let{processParam:t,sessionId:n,serviceToken:r,selectionLimit:i}=this.props.moduleProps;this._input.multiple=typeof i==`number`&&(i===0||i>1);let a=Iz(t),o=a==null||(e=a.backendProcessing)==null?void 0:e.serviceURL;if(!o||!cz(o)){let e=new Dz({errorCode:hz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Ez({errorCode:mz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}r&&a!=null&&a.backendProcessing&&(a.backendProcessing.httpHeaders={Authorization:`Connection ${r}`});let s={processParam:rz({},a)};n&&(s.tag=n),window.RegulaDocumentSDK.recognizerProcessParam=s,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}}}updated(e){e.has(`props`)&&this._setDocReaderGalleryProps()}render(){var e,t;let n=(e=this.props)==null?void 0:e.moduleProps.locale;return fe`<div
280
+ </svg>`,eB=class extends Ne{constructor(...e){var t;super(...e),t=this,this._performType=sz.DATA,this.props=null,this._handleInputChange=function(){var e=d(function*(e){var n,r,i;let a=[...(n=e.target.files)==null?[]:n];if(!a.length)return;(r=t.props)!=null&&r.isProcessing&&t.props.isProcessing(!0),yield window.RegulaDocumentSDK.createBackendTransaction({},window.RegulaDocumentSDK.recognizerProcessParam);for(let e of a){let{isExtraLargeResolution:n,isDownscaleNeeded:r}=yield Rz(e,yz,bz,xz),i=e.type.startsWith(`image/webp`);if(n){var o;(o=t.props)==null||o.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_RESOLUTION_EXCEEDS_LIMIT`},t._performType);return}let a;if(r||i){let n=yield Bz(e,yz,bz);if(!n.ok){var s;let e={transactionId:``,cancel:!1,has_nfc:!1,errorCode:r?`IMAGE_DOWNSCALING_ERROR`:`IMAGE_PROCESSING_ERROR`};(s=t.props)==null||s.perform(e,t._performType);return}a=[n.imageData]}else a=[yield e.arrayBuffer()];try{yield window.RegulaDocumentSDK.processImage(a)}catch(e){var c;(c=t.props)==null||c.perform({transactionId:``,cancel:!1,has_nfc:!1,errorCode:`IMAGE_PROCESSING_ERROR`},t._performType)}}let l=(i=t.props)==null||(i=i.moduleProps)==null?void 0:i.finalizePackageSettings;try{var u;let e=yield Nz(d(function*(){return window.RegulaDocumentSDK.finalizePackage()}),l==null?void 0:l.retryCount,l==null?void 0:l.retryDelay),n={transactionId:e==null?void 0:e.transactionId,cancel:!1,has_nfc:!1,errorCode:``};(u=t.props)==null||u.perform(n,t._performType)}catch(e){var f;console.log(`finalizePackage error: `,e),(f=t.props)==null||f.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},t._performType)}});return function(t){return e.apply(this,arguments)}}()}_handleUploadClick(){this._input.click()}_handleCloseClick(){var e;(e=this.props)==null||e.perform({transactionId:``,cancel:!0,has_nfc:!1,errorCode:``},this._performType)}_setDocReaderGalleryProps(){var e;if(!this.props)return;let{processParam:t,sessionId:n,serviceToken:r,selectionLimit:i}=this.props.moduleProps;this._input.multiple=typeof i==`number`&&(i===0||i>1);let a=Fz(t),o=a==null||(e=a.backendProcessing)==null?void 0:e.serviceURL;if(!o||!Iz(o)){let e=new Ez({errorCode:mz.CONFIGURATION_FAILED,message:`serviceURL is not defined or is invalid.`}),t=new Tz({errorCode:pz.SCAN_ERROR,underlyingBaseError:e});this.props.perform(t)}r&&a!=null&&a.backendProcessing&&(a.backendProcessing.httpHeaders={Authorization:`Connection ${r}`});let s={processParam:rz({},a)};n&&(s.tag=n),window.RegulaDocumentSDK.recognizerProcessParam=s,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:_f.MrzAndLocate}}}updated(e){e.has(`props`)&&this._setDocReaderGalleryProps()}render(){var e,t;let n=(e=this.props)==null?void 0:e.moduleProps.locale;return fe`<div
281
281
  part="gallery-root"
282
282
  class="gallery-root"
283
- dir="${uz(n)}"
283
+ dir="${lz(n)}"
284
284
  lang="${n}"
285
285
  style="background: ${Yz((t=this.props)==null||(t=t.moduleProps)==null?void 0:t.backgroundColor)}"
286
286
  >
@@ -298,4 +298,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
298
298
  <div class="footer">
299
299
  <a href>${$z} </a>
300
300
  </div>
301
- </div>`}},tB=(eB.styles=[Xz],eB);Kz([kz(),Gz(`design:type`,Object)],tB.prototype,`props`,void 0),Kz([jz(`#file-input`),Gz(`design:type`,typeof HTMLInputElement>`u`?Object:HTMLInputElement)],tB.prototype,`_input`,void 0),tB=Kz([Oz(`document-reader-gallery`)],tB);var nB,rB=!1,iB=class e extends Ne{constructor(...e){super(...e),this.props=null,this.renderVersion=0}setProps(t){if(!e.getSupportedTemplates().includes(t.moduleProps.templateId)){var n;let e=new Ez({errorCode:mz.UNKNOWN_STEP,message:`TemplateId ${t.moduleProps.templateId} is not supported`});(n=t.perform)==null||n.call(t,e)}let r=t.moduleProps.failedAssets;if(r&&r.blockingAssets.size>0){var i;let e=new Ez({errorCode:mz.IMAGE_LOADING_FAILED,message:`Failed to load image asset${r.blockingAssets.size>1?`s`:``}: ${[...r.blockingAssets].join(`, `)}`});(i=t.perform)==null||i.call(t,e)}this.renderVersion++,this.props=t}static isReady(){return rB}static getSupportedTemplates(){return[pz.DOC_READER,pz.DOC_READER_GALLERY]}static initialize(e){var t,n;let r=e==null||(t=e.docreader)==null?void 0:t.devLicense,i=e==null||(n=e.docreader)==null?void 0:n.module;window.RegulaDocumentSDK=new KR,console.info(`%cDocument Reader web component version: %s`,`color: #6e56b0;`,window.RegulaDocumentSDK.version.component),qR().then(()=>{window.RegulaDocumentSDK.initialize({license:r,module:i}).then(()=>rB=!0)})}static deinitialize(){var e;rB=!1,(e=window.RegulaDocumentSDK)==null||e.shutdown()}static getIdentifier(){return gz}static cancel(){}render(){var e;return fe`${Be(this.renderVersion,fe`${ZR((e=this.props)==null||(e=e.moduleProps)==null?void 0:e.templateId,[[pz.DOC_READER,()=>fe`<document-reader-camera .props=${this.props}></document-reader-camera>`],[pz.DOC_READER_GALLERY,()=>fe`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`}};return nB=iB,nB.displayName=gz,Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`props`,void 0),Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`renderVersion`,void 0),az(gz,iB),e.DocumentIdv=iB,e.ModuleType=Cz,e})({});
301
+ </div>`}},tB=(eB.styles=[Xz],eB);Kz([Oz(),Gz(`design:type`,Object)],tB.prototype,`props`,void 0),Kz([Az(`#file-input`),Gz(`design:type`,typeof HTMLInputElement>`u`?Object:HTMLInputElement)],tB.prototype,`_input`,void 0),tB=Kz([Dz(`document-reader-gallery`)],tB);var nB,rB=!1,iB=class e extends Ne{constructor(...e){super(...e),this.props=null,this.renderVersion=0}setProps(t){if(!e.getSupportedTemplates().includes(t.moduleProps.templateId)){var n;let e=new Tz({errorCode:pz.UNKNOWN_STEP,message:`TemplateId ${t.moduleProps.templateId} is not supported`});(n=t.perform)==null||n.call(t,e)}let r=t.moduleProps.failedAssets;if(r&&r.blockingAssets.size>0){var i;let e=new Tz({errorCode:pz.IMAGE_LOADING_FAILED,message:`Failed to load image asset${r.blockingAssets.size>1?`s`:``}: ${[...r.blockingAssets].join(`, `)}`});(i=t.perform)==null||i.call(t,e)}this.renderVersion++,this.props=t}static isReady(){return rB}static getSupportedTemplates(){return[fz.DOC_READER,fz.DOC_READER_GALLERY]}static initialize(e){var t,n;let r=e==null||(t=e.docreader)==null?void 0:t.devLicense,i=e==null||(n=e.docreader)==null?void 0:n.module;window.RegulaDocumentSDK=new KR,console.info(`%cDocument Reader web component version: %s`,`color: #6e56b0;`,window.RegulaDocumentSDK.version.component),qR().then(()=>{window.RegulaDocumentSDK.initialize({license:r,module:i}).then(()=>rB=!0)})}static deinitialize(){var e;rB=!1,(e=window.RegulaDocumentSDK)==null||e.shutdown()}static getIdentifier(){return hz}static cancel(){}render(){var e;return fe`${Be(this.renderVersion,fe`${ZR((e=this.props)==null||(e=e.moduleProps)==null?void 0:e.templateId,[[fz.DOC_READER,()=>fe`<document-reader-camera .props=${this.props}></document-reader-camera>`],[fz.DOC_READER_GALLERY,()=>fe`<document-reader-gallery .props=${this.props}></document-reader-gallery>`]])}`)}`}};return nB=iB,nB.displayName=hz,Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`props`,void 0),Kz([XR({attribute:!1}),Gz(`design:type`,Object)],iB.prototype,`renderVersion`,void 0),az(hz,iB),e.DocumentIdv=iB,e.ModuleType=Sz,e})({});