@transmitsecurity/platform-web-sdk 2.6.0 → 2.6.2
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/CHANGELOG.md +30 -0
- package/dist/common.cjs +1 -1
- package/dist/common.js +1 -1
- package/dist/drs.cjs +1 -1
- package/dist/drs.d.ts +29 -2
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +1 -1
- package/dist/ido.js +1 -1
- package/dist/idv.cjs +1 -1
- package/dist/idv.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/ts-platform-websdk.js +1 -1
- package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -1
- package/dist/web-sdk.d.ts +31 -2
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.js +1 -1
- package/package.json +1 -1
package/dist/idv.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));var t=require("./common.cjs"),e=require("./common.cjs");function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={},u={};function c(t){let e=t.length;for(;--e>=0;)t[e]=0}const l=256,d=286,h=30,f=15,p=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),g=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),w=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y=new Array(576);c(y);const v=new Array(60);c(v);const _=new Array(512);c(_);const E=new Array(256);c(E);const b=new Array(29);c(b);const A=new Array(h);function C(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let I,S,T;function D(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}c(A);const O=t=>t<256?_[t]:_[256+(t>>>7)],R=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},M=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,R(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},N=(t,e,r)=>{M(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},P=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=f;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=k(n[e]++,e))}},x=t=>{let e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=t=>{t.bi_valid>8?R(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},F=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},L=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&F(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!F(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},z=(t,e,r)=>{let n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?N(t,o,e):(i=E[o],N(t,i+l+1,e),a=p[i],0!==a&&(o-=b[i],M(t,o,a)),n--,i=O(n),N(t,i,r),a=g[i],0!==a&&(n-=A[i],M(t,n,a)))}while(s<t.last_lit);N(t,256,e)},U=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)L(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,L(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,p,g,m=0;for(h=0;h<=f;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=r[2*r[2*l+1]+1]+1,h>u&&(h=u,m++),r[2*l+1]=h,l>n||(t.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),g=r[2*l],t.opt_len+=g*(h+p),i&&(t.static_len+=g*(o[2*l+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>n||(r[2*d+1]!==h&&(t.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(t,e),P(r,c,t.bl_count)},V=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},H=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{N(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(N(t,o,t.bl_tree),s--),N(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(N(t,17,t.bl_tree),M(t,s-3,3)):(N(t,18,t.bl_tree),M(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let j=!1;const G=(t,e,r,n)=>{M(t,0+(n?1:0),3),((t,e,r,n)=>{B(t),n&&(R(t,r),R(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};u._tr_init=t=>{j||((()=>{let t,e,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(b[n]=r,t=0;t<1<<p[n];t++)E[r++]=n;for(E[r-1]=n,o=0,n=0;n<16;n++)for(A[n]=o,t=0;t<1<<g[n];t++)_[o++]=n;for(o>>=7;n<h;n++)for(A[n]=o<<7,t=0;t<1<<g[n]-7;t++)_[256+o++]=n;for(e=0;e<=f;e++)i[e]=0;for(t=0;t<=143;)y[2*t+1]=8,t++,i[8]++;for(;t<=255;)y[2*t+1]=9,t++,i[9]++;for(;t<=279;)y[2*t+1]=7,t++,i[7]++;for(;t<=287;)y[2*t+1]=8,t++,i[8]++;for(P(y,287,i),t=0;t<h;t++)v[2*t+1]=5,v[2*t]=k(t,5);I=new C(y,p,257,d,f),S=new C(v,g,0,h,f),T=new C(new Array(0),m,0,19,7)})(),j=!0),t.l_desc=new D(t.dyn_ltree,I),t.d_desc=new D(t.dyn_dtree,S),t.bl_desc=new D(t.bl_tree,T),t.bi_buf=0,t.bi_valid=0,x(t)},u._tr_stored_block=G,u._tr_flush_block=(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<l;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),a=(t=>{let e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*w[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?G(t,e,r,n):4===t.strategy||i===o?(M(t,2+(n?1:0),3),z(t,y,v)):(M(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(M(t,e-257,5),M(t,r-1,5),M(t,n-4,4),o=0;o<n;o++)M(t,t.bl_tree[2*w[o]+1],3);H(t,t.dyn_ltree,e-1),H(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),z(t,t.dyn_ltree,t.dyn_dtree)),x(t),n&&B(t)},u._tr_tally=(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(E[r]+l+1)]++,t.dyn_dtree[2*O(e)]++),t.last_lit===t.lit_bufsize-1),u._tr_align=t=>{M(t,2,3),N(t,256,y),(t=>{16===t.bi_valid?(R(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var W=(t,e,r,n)=>{let o=65535&t,i=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16};const X=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var Y=(t,e,r,n)=>{const o=X,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return~t},q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Z={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:$,_tr_flush_block:J,_tr_tally:Q,_tr_align:tt}=u,et=W,rt=Y,nt=q,{Z_NO_FLUSH:ot,Z_PARTIAL_FLUSH:it,Z_FULL_FLUSH:at,Z_FINISH:st,Z_BLOCK:ut,Z_OK:ct,Z_STREAM_END:lt,Z_STREAM_ERROR:dt,Z_DATA_ERROR:ht,Z_BUF_ERROR:ft,Z_DEFAULT_COMPRESSION:pt,Z_FILTERED:gt,Z_HUFFMAN_ONLY:mt,Z_RLE:wt,Z_FIXED:yt,Z_DEFAULT_STRATEGY:vt,Z_UNKNOWN:_t,Z_DEFLATED:Et}=Z,bt=258,At=262,Ct=103,It=113,St=666,Tt=(t,e)=>(t.msg=nt[e],e),Dt=t=>(t<<1)-(t>4?9:0),Ot=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Rt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Mt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Nt=(t,e)=>{J(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Mt(t.strm)},kt=(t,e)=>{t.pending_buf[t.pending++]=e},Pt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},xt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=et(t.adler,e,o,r):2===t.state.wrap&&(t.adler=rt(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},Bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-At?t.strstart-(t.w_size-At):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+bt;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=bt-(h-i),i=h-bt,n>a){if(t.match_start=e,a=n,n>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},Ft=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-At)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=xt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Rt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Rt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<At&&0!==t.strm.avail_in)},Lt=(t,e)=>{let r,n;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r)),t.match_length>=3)if(n=Q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+1]);else n=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2},zt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r),t.match_length<=5&&(t.strategy===gt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=Q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Nt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=Q(t,0,t.window[t.strstart-1]),n&&Nt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Vt=[new Ut(0,0,0,0,((t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ft(t),0===t.lookahead&&e===ot)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Nt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-At&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Nt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Lt),new Ut(4,5,16,8,Lt),new Ut(4,6,32,32,Lt),new Ut(4,4,16,16,zt),new Ut(8,16,32,32,zt),new Ut(8,16,128,128,zt),new Ut(8,32,128,256,zt),new Ut(32,128,258,1024,zt),new Ut(32,258,258,4096,zt)];function Ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Et,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const jt=t=>{if(!t||!t.state)return Tt(t,dt);t.total_in=t.total_out=0,t.data_type=_t;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:It,t.adler=2===e.wrap?0:1,e.last_flush=ot,K(e),ct},Gt=t=>{const e=jt(t);return e===ct&&(t=>{t.window_size=2*t.w_size,Ot(t.head),t.max_lazy_match=Vt[t.level].max_lazy,t.good_match=Vt[t.level].good_length,t.nice_match=Vt[t.level].nice_length,t.max_chain_length=Vt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Wt=(t,e,r,n,o,i)=>{if(!t)return dt;let a=1;if(e===pt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Et||n<8||n>15||e<0||e>9||i<0||i>yt)return Tt(t,dt);8===n&&(n=9);const s=new Ht;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,Gt(t)};s.deflateInit=(t,e)=>Wt(t,e,Et,15,8,vt),s.deflateInit2=Wt,s.deflateReset=Gt,s.deflateResetKeep=jt,s.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?dt:(t.state.gzhead=e,ct):dt,s.deflate=(t,e)=>{let r,n;if(!t||!t.state||e>ut||e<0)return t?Tt(t,dt):dt;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===St&&e!==st)return Tt(t,0===t.avail_out?ft:dt);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,kt(o,31),kt(o,139),kt(o,8),o.gzhead?(kt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),kt(o,255&o.gzhead.time),kt(o,o.gzhead.time>>8&255),kt(o,o.gzhead.time>>16&255),kt(o,o.gzhead.time>>24&255),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(kt(o,255&o.gzhead.extra.length),kt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=rt(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,0),kt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),kt(o,3),o.status=It);else{let e=Et+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=mt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=It,Pt(o,e),0!==o.strstart&&(Pt(o,t.adler>>>16),Pt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending!==o.pending_buf_size));)kt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Mt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,kt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=Ct)}else o.status=Ct;if(o.status===Ct&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Mt(t),o.pending+2<=o.pending_buf_size&&(kt(o,255&t.adler),kt(o,t.adler>>8&255),t.adler=0,o.status=It)):o.status=It),0!==o.pending){if(Mt(t),0===t.avail_out)return o.last_flush=-1,ct}else if(0===t.avail_in&&Dt(e)<=Dt(i)&&e!==st)return Tt(t,ft);if(o.status===St&&0!==t.avail_in)return Tt(t,ft);if(0!==t.avail_in||0!==o.lookahead||e!==ot&&o.status!==St){let r=o.strategy===mt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ft(t),0===t.lookahead)){if(e===ot)return 1;break}if(t.match_length=0,r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===wt?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=bt){if(Ft(t),t.lookahead<=bt&&e===ot)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+bt;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=bt-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=Q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Nt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Nt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Nt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Vt[o.level].func(o,e);if(3!==r&&4!==r||(o.status=St),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),ct;if(2===r&&(e===it?tt(o):e!==ut&&($(o,0,0,!1),e===at&&(Ot(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Mt(t),0===t.avail_out))return o.last_flush=-1,ct}return e!==st?ct:o.wrap<=0?lt:(2===o.wrap?(kt(o,255&t.adler),kt(o,t.adler>>8&255),kt(o,t.adler>>16&255),kt(o,t.adler>>24&255),kt(o,255&t.total_in),kt(o,t.total_in>>8&255),kt(o,t.total_in>>16&255),kt(o,t.total_in>>24&255)):(Pt(o,t.adler>>>16),Pt(o,65535&t.adler)),Mt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?ct:lt)},s.deflateEnd=t=>{if(!t||!t.state)return dt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==Ct&&e!==It&&e!==St?Tt(t,dt):(t.state=null,e===It?Tt(t,ht):ct)},s.deflateSetDictionary=(t,e)=>{let r=e.length;if(!t||!t.state)return dt;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return dt;if(1===o&&(t.adler=et(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Ot(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ft(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Rt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ft(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,ct},s.deflateInfo="pako deflate (from Nodeca project)";var Xt={};const Yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Xt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Yt(r,e)&&(t[e]=r[e])}}return t},Xt.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};var qt={};let Zt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Zt=!1}const Kt=new Uint8Array(256);for(let t=0;t<256;t++)Kt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Kt[254]=Kt[254]=1,qt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e};qt.buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Kt[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Zt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},qt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Kt[t[r]]>e?r:e};const $t=s,Jt=Xt,Qt=qt,te=q,ee=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},re=Object.prototype.toString,{Z_NO_FLUSH:ne,Z_SYNC_FLUSH:oe,Z_FULL_FLUSH:ie,Z_FINISH:ae,Z_OK:se,Z_STREAM_END:ue,Z_DEFAULT_COMPRESSION:ce,Z_DEFAULT_STRATEGY:le,Z_DEFLATED:de}=Z;function he(t){this.options=Jt.assign({level:ce,method:de,chunkSize:16384,windowBits:15,memLevel:8,strategy:le},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ee,this.strm.avail_out=0;let r=$t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==se)throw new Error(te[r]);if(e.header&&$t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Qt.string2buf(e.dictionary):"[object ArrayBuffer]"===re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=$t.deflateSetDictionary(this.strm,t),r!==se)throw new Error(te[r]);this._dict_set=!0}}he.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ae:ne,"string"==typeof t?r.input=Qt.string2buf(t):"[object ArrayBuffer]"===re.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===oe||i===ie)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=$t.deflate(r,i),o===ue)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=$t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===se;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},he.prototype.onData=function(t){this.chunks.push(t)},he.prototype.onEnd=function(t){t===se&&(this.result=Jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fe=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const r=new he(e);if(r.push(t,!0),r.err)throw r.msg||te[r.err];return r.result}(t,e)};const pe=["enabled","userId","serverPath"];function ge(t,e){return t-=177,we()[t]}var me=ge;function we(){var t=["10cSuGFq","672582zeLWFb","7BOqzCg","6271628QLYGWf","84TgTrwA","575287iWOgsO","drs","1736406rvCqQy","5040968FsWTRh","21190uvreQY","57maYfgS","9925OYNcwk"];return(we=function(){return t})()}!function(){for(var t=ge,e=we();;)try{if(436531==parseInt(t(178))/1+-parseInt(t(182))/2*(parseInt(t(183))/3)+parseInt(t(177))/4*(parseInt(t(184))/5)+parseInt(t(186))/6*(-parseInt(t(187))/7)+-parseInt(t(181))/8+parseInt(t(180))/9*(parseInt(t(185))/10)+parseInt(t(188))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var ye=new t(me(179));function ve(t,e){return t-=472,Ee()[t]}const _e=ve;function Ee(){const t=["getFullStorageKey","setItem","1111170KTVCES","2250815EcOqDR","setClientId","clientId","1389528ksJAxp","11905YVorHy","FALLBACK_LOCAL_STORAGE","removeItem","40TfKMxZ","648405YHIGoy","138633bhUpiI","removeItemLocalStorageSafe","sessionStorage","FALLBACK_SESSION_STORAGE","getClientId","73014KRdRAw","62aOThQP","getItemLocalStorageSafe","getItem","localStorage","setItemLocalStorageSafe"];return(Ee=function(){return t})()}!function(){const t=ve,e=Ee();for(;;)try{if(221609==parseInt(t(487))/1*(-parseInt(t(475))/2)+parseInt(t(492))/3+-parseInt(t(486))/4+parseInt(t(482))/5+-parseInt(t(474))/6+parseInt(t(483))/7+-parseInt(t(490))/8*(-parseInt(t(491))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class be{constructor(t){const e=ve;this[e(472)]={},this[e(488)]={},this[e(485)]=t}[_e(473)](){return this.clientId}[_e(484)](t){this[_e(485)]=t}[_e(480)](t){return this[_e(485)]+"_"+t}getItemSessionStorageSafe(t){const e=_e,r=this[e(480)](t);try{return window[e(494)][e(477)](r)}catch(t){return this.FALLBACK_SESSION_STORAGE[r]}}setItemSessionStorageSafe(t,e){const r=_e,n=this[r(480)](t);try{window[r(494)][r(481)](n,e)}catch(t){this[r(472)][n]=e}}removeItemSessionStorageSafe(t){const e=_e,r=this.getFullStorageKey(t);try{window.sessionStorage[e(489)](r)}catch(t){this[e(472)][r]=void 0}}[_e(476)](t){const e=_e,r=this[e(480)](t);try{return window[e(478)][e(477)](r)}catch(t){return this[e(488)][r]}}[_e(479)](t,e){const r=_e,n=this[r(480)](t);try{window[r(478)][r(481)](n,e)}catch(t){this.FALLBACK_LOCAL_STORAGE[n]=e}}[_e(493)](t){const e=_e,r=this[e(480)](t);try{window[e(478)][e(489)](r)}catch(t){this[e(488)][r]=void 0}}}function Ae(t,e){return t-=346,Ce()[t]}function Ce(){const t=["2010MFdakw","now","11CKVSvp","stringify","9725lnRkib","logsLimit","pushLog","448937zHemwH","catch","push","logPrefix","[AccountProtection SDK]","2072iHtQTm","883144ijhHqk","%s %s %s","middlewares","7zFokKH","warn","3024BNrzHx","logs","3432969vYUTPL","10FFAUBo","all","map","length","formatter","274KwXmyG","log","1891512PfPhIA"];return(Ce=function(){return t})()}const Ie=Ae;!function(){const t=Ae,e=Ce();for(;;)try{if(337446==-parseInt(t(370))/1+-parseInt(t(360))/2*(-parseInt(t(352))/3)+parseInt(t(347))/4+parseInt(t(367))/5*(parseInt(t(363))/6)+parseInt(t(350))/7*(-parseInt(t(346))/8)+-parseInt(t(354))/9*(parseInt(t(355))/10)+parseInt(t(365))/11*(parseInt(t(362))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Se{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=Ae;this.enabled=t,this[e(373)]=e(374),this[e(368)]=1e4,this.logs=[],this[e(349)]=[]}info(t,e){this[Ae(369)](3,t,e)}[Ie(351)](t,e){this[Ie(369)](4,t,e)}error(t,e){this[Ie(369)](5,t,e)}flush(){const t=Ie,e=this[t(353)];return this[t(353)]=[],e}[Ie(369)](t,e,r){const n=Ie;this.enabled&&console[n(361)](n(348),this[n(373)],e,JSON[n(366)](r)),this[n(353)][n(372)]({timestamp:Date[n(364)](),severity:t,text:JSON[n(366)](o(o({},r),{},{message:e}),this.formatter)}),this.logs[n(358)]>this[n(368)]&&this[n(353)].unshift();const i=this.middlewares[n(357)]((t=>t()));Promise[n(356)](i)[n(371)]((()=>{}))}[Ie(359)](t,e){if(e instanceof Error){const{name:t,stack:r,message:n}=e;return{name:t,stack:r,message:n}}return e}}const Te=new Se;function De(t,e){return t-=297,Oe()[t]}function Oe(){var t=["171fkbNsq","865816nUbYxN","finally","userAgentData","1349416fWejGU","1291124hvTxUR","uaFullVersion","197687JYUkzP","executor reached timeout","fullVersionList","model","5IWIdYg","architecture","warn","name","wow64","catch","bitness","397630FAbAtG","2466909VXLMji","platform","race","resolve","mobile","platformVersion","1591290BXEaBg","setTimeout","222LeprEy"];return(Oe=function(){return t})()}function Re(){var t,e=De;return null===(t=navigator[e(313)])||void 0===t?void 0:t.getHighEntropyValues([e(322),e(320),e(302),e(306),e(319),e(299),e(305),e(297),e(316)])}function Me(t,e){var r=De;let n;const o=[Promise[r(304)](t())[r(298)]((()=>{})),new Promise(((t,o)=>n=window[r(308)](o,e)))];return Promise[r(303)](o)[r(298)]((()=>Te[r(323)](r(318),{fnName:t[r(324)]})))[r(312)]((()=>clearTimeout(n)))}!function(){for(var t=De,e=Oe();;)try{if(529246==parseInt(t(311))/1+parseInt(t(307))/2+parseInt(t(301))/3+-parseInt(t(315))/4*(parseInt(t(321))/5)+-parseInt(t(309))/6*(parseInt(t(317))/7)+parseInt(t(314))/8+-parseInt(t(310))/9*(parseInt(t(300))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ne=Ve;function ke(){const t=["userActivation","10px","getPrototypeOf","getIndexedDB","filter","tan","multiply","maxTouchPoints","Small Fonts","DocumentTouch","sans-serif-thin","__driver_unwrapped","LanguageDetector","isGeoLocationExists","values","no-preference","canPlayType","deviceMemory","acos","deviceDataCalculationExpiry","ucweb","getWindowBasedKeys","getItemLocalStorageSafe","product","notifications","getBrave","Symbol","fromCharCode","length","style","geolocation","referrer","test","timeZone","lastDeviceData","rec2020","navigatorOnLine","screen","Serifa","document","Gill Sans","driver-evaluate","orientation","RTCPeerConnection","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","getFloatFrequencyData","sort","$chrome_asyncScriptInfo","memory","external","indexedDB","charCodeAt","tts","collectPromisesData","entries","srgb","bind","msMaxTouchPoints","language","getReferrer","OSMJIF","MS Reference Specialty","asinh","estimate","toString","Lucida Bright","oscpu","reduction","getInstalledRelatedApps","pixelDepth","fontSize","type","top","fillStyle","Meiryo UI","GOTHAM","cos","onvoiceschanged","function","callSelenium","isActive","cdc_adoQpoasnfa76pfcZLmcfl_Promise","forced","18329960CLIZtj","serviceWorker","inverted","start","dataPoints","mediaDevices","hardwareConcurrency","Vrinda","Promise","isBrave","getDeviceMemory","hidden","getCodesTests","ZWAdobeF","#f9c","domAutomationController","EUROSTILE","localStorage","warn","Minion Pro","windowConstructorAliasTest","__lastWatirAlert","monospace","getNavigatorUAData","SCRIPTINA","getWebGlRenderer","resolvedOptions","oprt","getNavigatorBasedKeys","getBattery","getPublicData","plugins","Pristina","_selenium","getOpenDatabase","#f2f","mobile","__webdriver_unwrapped","standard","sinh","Levenim MT","serif","boolean","kind","windowDocumentAuxVarsTest","permissions","Letter Gothic","924677ESddix","Menlo","getFonts","#ff2","spawn","userAgentData","getMathFingerprint","HELV","DateTimeFormat","isUserVerifyingPlatformAuthenticatorAvailable","getNavigatorProduct","absolute","isPointInPath","getWindowOrientation","token","__webdriver_script_function","replace","state","MS UI Gothic","getMediaDevices","__phantomas","callPhantom","getDocumentBasedKeys","webRTCDisabled","__edgeTrackingPreventionStatistics","get","angle","startPromisesLoop","canvas","body","getAudioFingerprintExtended","__selenium_unwrapped","getCookieEnabled","invalidPublicKeyId","getCpuClass","getExtension","cache_","matchMedia","getCryptoRandomValues","Microsoft Uighur","evenodd","query","Futura Bk BT","getPerformanceTiming","getOsCpu","fillRect","now","only screen and (max-width: 600px)","storeItem","cdc_adoQpoasnfa76pfcZLmcfl_Array","Arabic Typesetting","__$webdriverAsyncExecutor","deviceId","__selenium_evaluate","getCryptoBindingData","6776385rjwCfL","chrome","Cwm fjordbank gly ","font","24294GzfyMf","visibility","connect","productSub","getWebDriver","getScreen","__webdriver_script_func","colorDepth","getFIDOEnabled","BankGothic Md BT","Segoe UI Light","height","dischargingTime","acosh","closePath","PMingLiU","oncomplete","Buffer","awesomium","getPlugins","createElement","emit","getWindowAIAPIs","__lastWatirPrompt","spynner_additional_js_loaded","setItemLocalStorageSafe","22QcBXYb","_WEBDRIVER_ELEM_CACHE","console","__fxdriver_unwrapped","isSendBeaconFunction","38079uuGPuR","getCanvasFingerprint","getMediaMatch","map","arc","2650664EvezRa","LanguageModel","webgl","875GsieIJ","fmget_targets","description","configManager","sqrt","__webdriverFunc","getTimezoneOffset","more","hasSequentum","getOwnPropertyDescriptor","frequency","prototype","Bitstream Vera Sans Mono","ARNO PRO","knee","destination","hashCodeString","ChromeDriverw","webdriver-evaluate","getHash","getOwnPropertyNames","createDynamicsCompressor","appendChild","brave","addBehavior","#069","Arial Unicode MS","width","calledPhantom","rgba(102, 204, 0, 0.2)","__webdriver__chr","getAudioFingerprint","speechSynthesis","createAnalyser","atan","none","textContent","buildID","getConnection","exp","url","asin","getTouchSupport","sdkDeviceDataCollectionIgnoreList","__lastWatirConfirm","fill","expm1","fftSize","threshold","languages","matches","createOscillator","some","chrome_asyncScriptInfo","storageManager","__crWeb","reduce","dataPointsExtractor","textBaseline","geb","webdriver-evaluate-response","getHardwareConcurrency","navigatorIsUserActive","getNavigatorUserAgent","Sequentum","UCShellJava","getBuildID","puffinDevice","#f60","sessionStorage","push","SimHei","agenticIdentityEnabled","getLocalStorage","__webdriver_evaluate","disconnect","every","MT Extra","userAgent","#2ff","availHeight","storage","atanh","Lucida Sans","ratio","Marlett","cryptoBinding","getAsyncToken","100","groupId","PublicKeyCredential","Century Gothic","offsetHeight","isNodeReachable_","_phantom","getOwnPropertyDescriptors","isMobileForAgentic","retrieveItem",'video/mp4; codecs="avc1.42E01E"',"__driver_evaluate","getTimezone","webgl-experimental","OfflineAudioContext","Object","Humanst521 BT","chargingTime","worker throw error","__webdriver_script_fn","name","outerHeight","getPlatform","getRandomValues","selenium-evaluate","rect","isArray","toDataURL","760pFTrpy","$cdc_asdjflasutopfhvcZLmcfl_","offsetWidth","safari","webkitOfflineAudioContext","ontouchstart","webdriver","getAddBehavior","sin","TRAJAN PRO","stack","__fxdriver_evaluate","high","abs","webkit","getContext","2gcHfsF","Clarendon","active","platform","attack","getSessionStorage","getVendor","cosh","getConfValue","less","Monotype Corsiva","devicePixelRatio","MS Outlook","getFloatTimeDomainData","891507TnzlBJ","CDPRuntimeDomainTest","frequencyBinCount","getTTS","from","release","resolve","AvantGarde Bk BT","renderedBuffer","__firefox__","18pt Arial","watinExpressionResult","level","left","getProductSub","samsungAr","indexOf","getNavigatorHighEntropyData","includes","isAgenticCollect","calculate","getLanguages","defineProperty","value","getNavigatorPermissionsState","getVoices","calledSelenium","log","Franklin Gothic"];return(ke=function(){return t})()}!function(){const t=Ve,e=ke();for(;;)try{if(843465==-parseInt(t(654))/1+-parseInt(t(481))/2*(parseInt(t(495))/3)+parseInt(t(749))/4+-parseInt(t(709))/5+parseInt(t(713))/6*(-parseInt(t(752))/7)+parseInt(t(465))/8*(-parseInt(t(744))/9)+parseInt(t(607))/10*(parseInt(t(739))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Pe=Ne(392),xe=Ne(543),Be=Ne(421),Fe={tts:1e3},Le=t=>{var e;return null!==(e=Fe[t])&&void 0!==e?e:100},ze=t=>t?[...t][Ne(405)](((t,e)=>t+Math[Ne(478)](e)),0):0;class Ue{constructor(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=Ne;this.storageManager=t,this[o(755)]=e,this[o(435)]=r,this.isAgenticCollect=n}async calculate(){const t=Ne,e=this[t(755)][t(489)](Pe,[]),r=this[t(755)].getConfValue(xe,36e5),n=this[t(514)]||this.configManager.getConfValue(Be,!1),o=await new He(e,this[t(435)],n).dataPointsExtractor();return this[t(558)]=o,this[t(403)][t(738)](xe,Date.now()+r),o}async getDeviceData(){const t=Ne;return Number(this[t(403)][t(546)](xe))<Date[t(700)]()||!this[t(558)]?await this[t(515)]()||{}:this.lastDeviceData||{}}}function Ve(t,e){return t-=372,ke()[t]}class He{constructor(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=Ne;this[n(392)]=t,this[n(435)]=e,this[n(611)]=o({battery:this[n(636)],brave:this[n(549)],canvas:this.getCanvasFingerprint,codecs:this.getCodesTests,connection:this[n(387)],cookieEnabled:this[n(686)],cryptoRandomValues:this[n(692)],deviceMemory:this.getDeviceMemory,documentBasedKeys:this.getDocumentBasedKeys,hardwareConcurrency:this[n(410)],indexedDB:this[n(527)],fidoEnabled:this[n(721)],languages:this[n(516)],language:this.getLanguage,timezoneOffset:this[n(758)],localStorage:this.getLocalStorage,navigatorBasedKeys:this[n(635)],navigatorProduct:this.getNavigatorProduct,navigatorUserAgent:this[n(412)],navigatorUAData:this[n(630)],navigatorHighEntropyData:this[n(512)],navigatorStorageEstimation:this.navigatorStorageEstimation,navigatorOnLine:this[n(560)],navigatorIsUserActive:this.navigatorIsUserActive,math:this[n(660)],mediaMatch:this[n(746)],openDatabase:this[n(641)],windowOrientation:this[n(667)],platform:this.getPlatform,cpuClass:this[n(688)],osClass:this[n(698)],addBehavior:this[n(472)],productSub:this[n(509)],mediaDevices:this[n(673)],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this[n(684)],fonts:this[n(656)],performanceTiming:this[n(697)],performanceMemory:this.getPerformanceMemory,plugins:this[n(732)],screen:this[n(718)],sequentum:this[n(760)],sessionStorage:this[n(486)],referrer:this[n(583)],timezone:this.getTimezone,touchSupport:this[n(391)],vendor:this[n(487)],buildID:this[n(415)],webdriver:this[n(717)],webGlRenderer:this[n(632)],windowBasedKeys:this[n(545)],windowOuter:this.getWindowOuter,webRTCDisabled:this[n(677)],cryptoBindingData:this[n(708)][n(580)](this),notificationState:this[n(519)][n(580)](this,n(548)),geolocationState:this.getNavigatorPermissionsState[n(580)](this,"geolocation"),isGeoLocationExists:this[n(537)],isSendBeaconExists:this[n(743)],navigatorPrototype:this.getNavigatorPrototype,installedRelatedApps:this[n(592)],windowConstructorAliasTest:this[n(627)],windowDocumentAuxVarsTest:this[n(651)],CDPRuntimeDomainTest:this[n(496)]},r&&{tts:this[n(498)],windowAIAPIs:this[n(735)]})}[Ne(496)](){const t=Ne;let e=!1;const r=new window.Error;return window[t(452)][t(517)](r,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[t(741)].debug(r[t(475)]),e}[Ne(651)](){const t=Ne;for(const e of window[t(452)][t(772)](window.document))if(e==t(571)||/^\$cdc_[a-zA-Z0-9]{22}_$/[t(556)](e))return!0;for(const e of window[t(452)][t(538)](window[t(452)][t(444)](window[t(563)]))){if(!e[t(518)]||void 0===e[t(518)][t(690)])continue;const r=window[t(452)][t(772)](window.Object.getPrototypeOf(e[t(518)])),n=[t(702),t(446),t(442)];if(r[t(570)](),n[t(570)](),r[t(425)](((t,e)=>t==n[e])))return!0}return!1}[Ne(627)](){const t=Ne,e=window[t(452)][t(772)](window);for(const r of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[t(556)](r))return!0;for(const e of[window.Array,window[t(615)],window[t(550)]])if(r!=(null==e?void 0:e[t(457)])&&r!=t(668)&&r!=t(436)&&window[r]===e)return!0}return!1}async[Ne(406)](){const t=Ne,e=this.startPromisesLoop();return await this[t(577)](e)}[Ne(681)](){const t=Ne,e={};for(const[r,n]of Object[t(578)](this[t(611)]))if(!this[t(392)][t(513)](r))try{e[r]=Me(n,Le(r))}catch(n){Te[t(625)](t(455),{e:n,key:r}),e[r]=Promise[t(501)]()}return e}async[Ne(577)](t){const e=Ne,r={};for(const[n,o]of Object.entries(t))try{r[n]=await o}catch(t){Te[e(625)]("worker promise rejected",{e:t,key:n}),r[n]=void 0}return r}getCookieEnabled(){const t=Ne,e=navigator.cookieEnabled;return Promise[t(501)](e)}async[Ne(721)](){const t=Ne;return!!navigator.credentials&&await window[t(439)][t(663)]()}getCryptoRandomValues(){const t=Ne,e=window.crypto[t(460)](new Uint8Array(16));return Array[t(499)](e)}[Ne(677)](){const t=Ne,e=null==window[t(567)];return Promise[t(501)](e)}[Ne(545)](){const t=Ne,e=[t(710),t(468),t(404),"__gCrWeb","yandex","__yb","__ybro",t(504),t(678),t(479),t(634),t(510),t(544),t(414),t(416),t(443),t(674),t(675),t(730),t(734),t(658),t(622),"domAutomation","__nightmare","_selenium",t(521),t(603),"_Selenium_IDE_Recorder",t(705),t(448),"__driver_unwrapped",t(476),"__fxdriver_unwrapped",t(628),"__lastWatirConfirm",t(736),t(707),t(685),t(379),"__webdriver_evaluate",t(456),t(719),t(669),t(644),"__webdriverFuncgeb",t(731),t(377),t(703),t(605),t(568),t(402),t(753),t(408),t(584),t(737),"watinExpressionError",t(506)],r=[];for(const n of e){const e=window[n];void 0!==e&&null!=e&&r[t(419)](n)}return Promise[t(501)](r)}[Ne(735)](){const t=Ne;return{languageModel:t(750)in window,summarizer:"Summarizer"in window,translator:"Translator"in window,languageDetector:t(536)in window}}async[Ne(498)](){const t=Ne;if(!window[t(381)])return null;const e=await new Promise((e=>{const r=t,n=window[r(381)][r(520)]();if(n[r(552)]>0)return void e(n);const o=window.setTimeout((()=>{const t=r;window[t(381)][t(601)]=null,e(null)}),Fe[r(576)]);window[r(381)][r(601)]=()=>{const t=r;clearTimeout(o),window.speechSynthesis[t(601)]=null,e(window.speechSynthesis[t(520)]())}}));return e?{voiceCount:e.length,hasGoogle:e[t(401)]((e=>/Google/i[t(556)](e[t(457)])))}:null}getMediaMatch(){const t=Ne,e={"dynamic-range":[t(477),t(645)],"prefers-reduced-motion":["no-preference",t(405)],"prefers-contrast":[t(539),"high","low",t(759),t(490),t(606)],"max-monochrome":["0","10",t(437),"1000"],"forced-colors":[t(483),"none"],"inverted-colors":[t(609),t(384)],"color-gamut":[t(559),"p3",t(579)]},r={};for(const[n,o]of Object[t(578)](e))for(const e of o)r[n[t(670)](/-/g,"_")+"_"+e.replace(/-/g,"_")]=window.matchMedia("("+n+": "+e+")")[t(399)];return Promise[t(501)](r)}[Ne(660)](){const t=Ne,e=[Math[t(542)](.12312423423423424),Math[t(726)](1e308),(r=1e154,Math.log(r+Math[t(756)](r*r-1))),Math[t(390)](.12312423423423424),Math[t(586)](1),Math.log(1+Math[t(756)](2)),Math[t(431)](.5),Math.log(3)/2,Math[t(383)](.5),Math[t(473)](-1e300),Math[t(646)](1),Math[t(388)](1)-1/Math[t(388)](1)/2,Math[t(600)](10.000000000123),Math[t(488)](1),(Math[t(388)](1)+1/Math[t(388)](1))/2,Math[t(529)](-1e300),Math.tanh(1),(Math.exp(2)-1)/(Math[t(388)](2)+1),Math[t(388)](1),Math[t(395)](1),Math[t(388)](1)-1,Math.log1p(10),Math[t(522)](11),Math.PI**-100];var r;let n="";for(let r=0;r<e.length;r++)n+=e[r][t(588)]();return Promise[t(501)](He[t(768)](n))}[Ne(387)](){const t=Ne,{connection:e}=navigator,r=(t=>{let{downlink:e,effectiveType:r,rtt:n,saveData:o}=t;return{downlink:e,effectiveType:r,rtt:n,saveData:o}})(e);return Promise[t(501)](r)}getSessionStorage(){const t=Ne;return Promise[t(501)](!!window[t(418)])}[Ne(422)](){const t=Ne;return Promise.resolve(!!window[t(624)])}[Ne(760)](){const t=Ne;return-1!==window[t(573)][t(588)]()[t(511)](t(413))}getNavigatorBasedKeys(){const t=Ne;return[t(471),t(448),t(423),t(707),"__fxdriver_evaluate",t(535),t(644),t(685),t(742),"_Selenium_IDE_Recorder",t(640),t(521),t(740),t(769),t(565),t(770),t(461),"webdriverCommand",t(409),t(757),t(456),t(705),t(628),t(393),"__lastWatirPrompt",t(571),t(466),t(608)][t(528)]((t=>navigator[t]))}[Ne(664)](){const t=Ne,e=navigator[t(547)];return Promise[t(501)](e)}getNavigatorUserAgent(){return navigator[Ne(427)]}[Ne(630)](){return navigator[Ne(659)]}[Ne(512)](){return Re()}navigatorStorageEstimation(){const t=Ne;return navigator[t(430)][t(587)]()}[Ne(560)](){return navigator.onLine}[Ne(411)](){const t=Ne;return navigator[t(524)][t(604)]}async[Ne(519)](t){const e=Ne;try{const r=await navigator[e(652)][e(695)]({name:t});return null==r?void 0:r[e(671)]}catch(t){}}isGeoLocationExists(){return!!navigator[Ne(554)]}[Ne(743)](){const t=Ne;return typeof navigator.sendBeacon===t(602)}getNavigatorPrototype(){const t=Ne;return{hardwareConcurrency:Object[t(761)](Object[t(526)](navigator),t(613)).get[t(588)](),languages:Object[t(761)](Object[t(526)](navigator),"languages")[t(679)][t(588)]()}}async getInstalledRelatedApps(){const t=Ne;if("function"==typeof navigator[t(592)])try{const{related_applications:e}=await navigator[t(592)]();if(e&&Array[t(463)](e))return e[t(747)]((e=>{const r=t;return{platform:e.platform,url:e[r(389)]}}))}catch(t){}}[Ne(583)](){return document[Ne(555)]}[Ne(697)](){return performance.timing}getPerformanceMemory(){const t=Ne,{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}=performance[t(572)];return{jsHeapSizeLimit:e,totalJSHeapSize:r,usedJSHeapSize:n}}[Ne(527)](){const t=Ne;return Promise[t(501)](!!window[t(574)])}[Ne(641)](){const{openDatabase:t}=window;return Promise.resolve(!!t)}[Ne(391)](){const t=Ne,e=window[t(533)]&&document instanceof DocumentTouch,r={maxTouchPoints:navigator[t(531)]||navigator[t(581)]||0,documentTouch:e,ontouchstart:t(470)in window};return Promise[t(501)](r)}[Ne(732)](){const t=Ne;function e(t){const e=Ve,r=[];for(let n=0;n<t.length;++n)r[e(419)]({type:t[n][e(595)],suffixes:t[n].suffixes});return r}const r=[];for(let n=0;n<navigator[t(638)][t(552)];++n){const o=navigator[t(638)][n];o&&r.push({name:o[t(457)],description:o[t(754)],mimeTypes:e(o)})}return Promise[t(501)](r)}[Ne(718)](){const t=Ne,e=window[t(561)]||screen,{availLeft:r}=e,{availTop:n}=e,o={availHeight:e[t(429)],availLeft:r,availTop:n,availWidth:e.availWidth,colorDepth:e[t(720)],height:e.height,width:e[t(376)],pixelDepth:e[t(593)],orientationAngle:e[t(566)]&&e.orientation[t(680)],orientationType:e[t(566)]&&e[t(566)][t(595)],devicePixelRatio:window[t(492)]};return Promise[t(501)](o)}static[Ne(768)](t){const e=Ne;if(null==t)return;let r=0,n=0;const o=t[e(552)];for(;n<o;)r=(r<<5)-r+t[e(575)](n++)|0;return r}getWindowOuter(){const t=Ne,e={outerWidth:window.outerWidth,outerHeight:window[t(458)]};return Promise.resolve(e)}[Ne(717)](){const t=Ne,e=navigator[t(471)];return Promise[t(501)](e)}[Ne(667)](){const t=Ne,e=window[t(566)];return Promise[t(501)](e)}[Ne(459)](){const t=Ne,e=navigator[t(484)];return Promise[t(501)](e)}[Ne(688)](){const t=navigator.cpuClass;return Promise.resolve(t)}[Ne(698)](){const t=Ne,e=navigator[t(590)];return Promise[t(501)](e)}[Ne(472)](){const t=Ne,e=!!window.HTMLElement[t(763)][t(373)];return Promise.resolve(e)}[Ne(509)](){const t=navigator[Ne(716)];return Promise.resolve(t)}async getMediaDevices(){const t=Ne,e=await navigator[t(612)].enumerateDevices(),r=[];for(const n of e)r[t(419)]({kind:n[t(650)],label:n.label,deviceId:n[t(706)],groupId:n[t(438)]});return r}async[Ne(380)](){const t=Ne,e=window[t(451)]||window[t(469)];if(!e)return-1;const r=new e(1,5e3,44100),n=r[t(400)]();n.type="triangle",n.frequency.value=1e4;const o=r[t(773)]();o[t(397)][t(518)]=-50,o[t(766)].value=40,o[t(433)].value=12,o[t(485)].value=0,o[t(500)][t(518)]=.25,n[t(715)](o),o[t(715)](r[t(767)]),n[t(610)](0);const i=new Promise((async(e,n)=>{const o=t;r[o(729)]=t=>e(t[o(503)]);try{await r.startRendering()}catch(t){n(t)}})),a=(await i).getChannelData(0).subarray(4500);return He[t(771)](a)}async getAudioFingerprintExtended(){const t=Ne;var e;const r=window[t(451)]||window[t(469)];if(!r)return{};const n=new r(1,5e3,44100),o=n.createOscillator();o[t(595)]="triangle",o[t(762)][t(518)]=1e4;const i=n.createDynamicsCompressor();i[t(397)][t(518)]=-50,i.knee[t(518)]=40,i[t(485)][t(518)]=0;const a=n[t(382)]();o.connect(i),i[t(715)](a),i[t(715)](n[t(767)]),o.start(0);try{await n.startRendering(),i.disconnect(),o[t(424)]();const r=new Float32Array(a[t(497)]);null===(e=a[t(569)])||void 0===e||e.call(a,r);const s=new Float32Array(a[t(396)]);return"getFloatTimeDomainData"in a&&a[t(494)](s),{gain:i[t(591)][t(518)]||i.reduction,freq:ze(r),time:ze(s)}}catch(t){return{}}}static[Ne(771)](t){const e=Ne;let r=0;for(let n=0;n<t.length;++n)r+=Math[e(478)](t[n]);return r}getFonts(){const t=Ne,e=[t(629),"sans-serif",t(648)],r=[t(534),t(765),"Agency FB",t(704),t(375),t(502),t(722),"Batang",t(764),"Calibri","Century",t(440),t(482),t(623),t(523),t(696),"Futura Md BT",t(599),t(564),t(661),"Haettenschweiler","Helvetica Neue",t(453),"Leelawadee",t(653),t(647),t(589),t(432),t(655),"MS Mincho",t(493),t(585),t(672),t(426),"MYRIAD PRO",t(434),t(598),t(693),t(626),t(491),t(728),t(639),t(631),t(723),t(562),t(420),t(532),"Staccato222 BT",t(474),"Univers CE 55 Medium",t(614),t(620)],n=document[t(733)]("div");n[t(553)][t(714)]=t(618);const o={},i={},a=e=>{const r=t,o=document[r(733)]("span"),{style:i}=o;return i.position=r(665),i[r(596)]="0",i[r(508)]="0",i.fontFamily=e,i[r(594)]=r(525),o[r(385)]="mmMwWLliI0O&1",n[r(774)](o),o},s=e.map(a),u=(()=>{const n=t,o={};for(const t of r)o[t]=e[n(747)]((e=>a("'"+t+"',"+e)));return o})();document.body[t(774)](n);try{for(let r=0;r<e[t(552)];r++)o[e[r]]=s[r][t(467)],i[e[r]]=s[r][t(441)];const n=r[t(528)]((r=>(r=>{const n=t;return e[n(401)](((t,e)=>r[e][n(467)]!==o[t]||r[e][n(441)]!==i[t]))})(u[r])));return Promise[t(501)](n)}finally{document[t(683)].removeChild(n)}}[Ne(758)](){const t=Ne,e=(new Date)[t(758)]();return Promise[t(501)](e)}getLanguage(){const t=navigator[Ne(582)];return Promise.resolve(t)}[Ne(516)](){const t=Ne,e=navigator[t(398)];return Promise[t(501)](e)}[Ne(410)](){const t=Ne,e=navigator[t(613)];return Promise[t(501)](e)}[Ne(617)](){const t=Ne,e=navigator[t(541)];return Promise[t(501)](e)}[Ne(676)](){const t=Ne;return[t(423),t(707),"__webdriver_script_function",t(719),t(456),"__fxdriver_evaluate",t(535),t(644),"__driver_evaluate","__selenium_unwrapped",t(742)].filter((t=>document[t]))}[Ne(449)](){const t=Ne,e=Intl[t(662)]()[t(633)]()[t(557)];return Promise[t(501)](e)}[Ne(487)](){const t=Ne,e=navigator.vendor;return Promise[t(501)](e)}[Ne(415)](){const t=Ne,e=navigator[t(386)];return Promise[t(501)](e)}async[Ne(745)](){const t=Ne,e=document.createElement(t(682));e[t(376)]=1,e[t(724)]=1;const r=e[t(480)]("2d"),n={winding:function(t){const e=Ve;return t[e(462)](0,0,10,10),t[e(462)](2,2,6,6),!t[e(666)](5,5,e(694))}(r),geometry:function(t,e){const r=Ve;t[r(376)]=122,t[r(724)]=110,e.globalCompositeOperation=r(530);const n=[[r(642),40,40],[r(428),80,40],[r(657),60,80]];for(const[t,o,i]of n)e[r(597)]=t,e.beginPath(),e[r(748)](o,i,40,0,2*Math.PI,!0),e[r(727)](),e[r(394)]();return e[r(597)]=r(621),e.arc(60,60,60,0,2*Math.PI,!0),e[r(748)](60,60,20,0,2*Math.PI,!0),e[r(394)](r(694)),He[r(768)](t.toDataURL())}(e,r),text:function(t,e){const r=Ve;t.width=240,t[r(724)]=60,e[r(407)]="alphabetic",e[r(597)]=r(417),e[r(699)](100,1,62,20),e[r(597)]=r(374),e[r(712)]='11pt "Times New Roman"';const n=r(711)+String[r(551)](55357,56835);return e.fillText(n,2,15),e[r(597)]=r(378),e[r(712)]=r(505),e.fillText(n,4,45),He.hashCodeString(t[r(464)]())}(e,r)};return Promise[t(501)](n)}async getBattery(){const t=Ne,e=await navigator[t(636)]();return{charging:e.charging,chargingTime:e[t(454)],dischargingTime:e[t(725)],level:e[t(507)]}}async getBrave(){const t=Ne;return!!navigator.brave&&await navigator[t(372)][t(616)]()}async[Ne(632)](){const t=Ne,e=document[t(733)](t(682)),r=e[t(480)](t(751))||e[t(480)](t(450)),n=r[t(689)]("WEBGL_debug_renderer_info");return Promise.resolve(r.getParameter(n.UNMASKED_RENDERER_WEBGL))}async[Ne(619)](){const t=Ne,e=document[t(733)]("video"),r={basic:""===e[t(540)](t(447)),advanced:""===e[t(540)]("video/mp4;;Codecs =avc1.42E01E")};return Promise[t(501)](r)}async getCryptoBindingData(){const t=Ne,{publicKey:e,keyIdentifier:r,errors:n}=await this[t(435)][t(637)](),o={publicKey:e,keyIdentifier:r};return(null==n?void 0:n[0])&&(o[t(687)]=n[0]),o}static isMobile(){const t=Ne;return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator.userAgent)||null!=window[t(566)]||window[t(691)](t(701)).matches}static[Ne(445)](){const t=Ne,e=navigator[t(659)];if(e&&typeof e[t(643)]===t(649))return e[t(643)];const r=/iPhone|iPad|iPod|Android|MiuiBrowser/i[t(556)](navigator[t(427)]),n=window[t(691)]("(pointer: coarse)")[t(399)]&&window.matchMedia(t(701)).matches;return r||null!=window[t(566)]||n}}function je(t,e){return t-=422,Ye()[t]}const Ge=je;var We;!function(){const t=je,e=Ye();for(;;)try{if(589982==-parseInt(t(425))/1*(-parseInt(t(423))/2)+parseInt(t(441))/3*(parseInt(t(427))/4)+-parseInt(t(439))/5+-parseInt(t(433))/6+-parseInt(t(438))/7*(parseInt(t(440))/8)+-parseInt(t(429))/9+parseInt(t(426))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(t){const e=je;t[e(424)]=e(442),t[e(422)]="device",t[e(437)]=e(436),t[e(431)]=e(435),t[e(428)]=e(430)}(We||(We={}));const Xe=Ge(434);function Ye(){const t=["9eFcUlM","action","EVENT_TYPE_DEVICE","362122noFoyQ","EVENT_TYPE_ACTION","1SRwdeE","23549990mrbJdI","1167416jjWNtI","EVENT_TYPE_ACTION_RESULT","6495840bwVsbp","action_result","EVENT_TYPE_IDENTIFICATION","mobile_web","5367624NIUDad","desktop_web","identification","interaction","EVENT_TYPE_INTERACTION","161HJHZGL","3970985YAZsAy","142984WgYOVt"];return(Ye=function(){return t})()}const qe=Ge(432),Ze=Qe;function Ke(){const t=["30512730hQFRhf","error fetching config","58782Xfuitz","fetchConf","1909088FaOPKF","keys","storageManager","length","loadConf","1635561pCwOSj","shouldUpdateConf","setItemLocalStorageSafe","device/conf?tenantId=","getItemLocalStorageSafe","getConfValue","245144tpnWTm","581NaHosW","parse","now","getData","conf","59350huGYPu","stringify","7334056CBBjtn","isMobile","error","117OrcIxT","15xeGjZU","ric","requestsManager"];return(Ke=function(){return t})()}!function(){const t=Qe,e=Ke();for(;;)try{if(983459==-parseInt(t(499))/1+parseInt(t(475))/2*(parseInt(t(480))/3)+parseInt(t(488))/4*(-parseInt(t(481))/5)+-parseInt(t(486))/6*(parseInt(t(500))/7)+-parseInt(t(477))/8+parseInt(t(493))/9+parseInt(t(484))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const $e=Ze(482);class Je{constructor(t,e){const r=Ze;this[r(490)]=t,this[r(483)]=e,this.conf=this[r(492)]()}async[Ze(487)](t){const e=Ze;try{const r=He[e(478)]()?qe:Xe,n=e(496)+t+"&type="+r,o=await this[e(483)][e(473)](n);return null!=o?o:{}}catch(r){return Te[e(479)](e(485),{clientId:t,error:r}),{}}}[Ze(492)](){const t=Ze,e=this[t(490)][t(497)]($e);if(null!=e)try{return JSON[t(471)](e)}catch(e){Te[t(479)]("error loading config",{error:e})}return{}}shouldUpdateConf(){const t=Ze,e=this[t(498)]("timestamp",0);return Date[t(472)]()-e>36e5}async refreshConf(t){const e=Ze;if(!this[e(494)]())return!1;let r=await this[e(487)](t);return 0==Object[e(489)](r)[e(491)]?r=this[e(492)]():this[e(490)][e(495)]($e,JSON[e(476)](r)),this.conf=r,!0}[Ze(498)](t,e){const r=Ze,n=void 0!==this[r(474)]?this[r(474)][t]:void 0;return null!=n?n:e}}function Qe(t,e){return t-=471,Ke()[t]}function tr(t,e){return t-=262,er()[t]}function er(){const t=["614290GxNmrI","random","undefined","base64UrlEncode","9858040xmjRtw","function","padStart","timeOrigin","base64ToBase64Url","join","encode","push","slice","replace","fromCharCode","42TlRsqB","length","getEventHighResTimestamp","randomUUID","3142635brjsEA","getRandomValues","splice","2689164MZuDEO","timeStamp","toString","maintainLastXItems","32963pjRGIK","218534qFPohA","654PYKduZ","180wgiZDG","177550IIWhUf"];return(er=function(){return t})()}const rr=tr;!function(){const t=tr,e=er();for(;;)try{if(791468==-parseInt(t(274))/1+-parseInt(t(271))/2*(-parseInt(t(290))/3)+-parseInt(t(266))/4+parseInt(t(263))/5+parseInt(t(272))/6*(-parseInt(t(270))/7)+-parseInt(t(279))/8+parseInt(t(273))/9*(parseInt(t(275))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class nr{static[rr(269)](t,e,r){const n=rr;return t[n(291)]>=e&&t[n(265)](0,1),t[n(286)](r),t}static[rr(292)](t){const e=rr;var r,n;return(null!==(r=performance[e(282)])&&void 0!==r?r:Date.now()-performance.now())+(null!==(n=null==t?void 0:t[e(267)])&&void 0!==n?n:performance.now())}static[rr(278)](t){const e=rr,r=(new TextEncoder)[e(285)](t),n=String[e(289)](...r);return btoa(n).replace(/\+/g,"-")[e(288)](/\//g,"_")[e(288)](/=/g,"")}static[rr(283)](t){const e=rr;return t.replace(/\+/g,"-")[e(288)](/\//g,"_").replace(/=/g,"")}static[rr(262)](){const t=rr;if(typeof crypto!==t(277)&&typeof crypto[t(262)]===t(280))return crypto[t(262)]();const e=new Uint8Array(16);if(typeof crypto!==t(277)&&typeof crypto[t(264)]===t(280))crypto.getRandomValues(e);else for(let r=0;r<e[t(291)];r++)e[r]=Math.floor(256*Math[t(276)]());e[6]=15&e[6]|64,e[8]=63&e[8]|128;const r=[];for(let n=0;n<e.length;n++)r[t(286)](e[n][t(268)](16)[t(281)](2,"0"));return r[t(287)](0,4).join("")+"-"+r[t(287)](4,6)[t(284)]("")+"-"+r.slice(6,8)[t(284)]("")+"-"+r[t(287)](8,10).join("")+"-"+r[t(287)](10,16)[t(284)]("")}}const or=ir;function ir(t,e){return t-=283,ar()[t]}function ar(){const t=["buttons","12gYMcGm","function","getEventHighResTimestamp","8637462dTPARb","getCoalescedEvents","extractButtonsPressedData","797755dtxhww","3498192CofZHh","469354kvWibA","387580YyTpPH","bufferSize","view","39822qIojxI","forEach","collect","477036SWJNne","cancelable","getData","parentId","altKey","data","sourceCapabilities","shiftKey","now","inputType","buffer","325KxETrQ","extractEventData","maintainLastXItems","isTrusted","target","length","location","metaKey","ctrlKey","firesTouchEvents"];return(ar=function(){return t})()}!function(){const t=ir,e=ar();for(;;)try{if(259409==parseInt(t(287))/1+parseInt(t(317))/2+-parseInt(t(309))/3*(-parseInt(t(318))/4)+-parseInt(t(298))/5*(parseInt(t(284))/6)+parseInt(t(315))/7+parseInt(t(316))/8+-parseInt(t(312))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class sr{constructor(t){const e=ir;this.data=[],this[e(297)]=t}[or(286)](t){const e=or,r=this[e(299)](t);nr[e(300)](this[e(292)],this[e(297)],r)}[or(289)](){return this.data}extractEventData(t){const e=or;return o({x:t.x,y:t.y,tspl:Date[e(295)]()},this[e(314)](t))}extractButtonsPressedData(t){const e=or;return o(o(o(o({},t[e(306)]&&{ctrlKey:!0}),t[e(291)]&&{altKey:!0}),t[e(294)]&&{shiftKey:!0}),0!=t[e(308)]&&{buttons:t[e(308)]})}}class ur{constructor(t){this[or(292)]=[],this.bufferSize=t}collect(t){const e=or,r=nr[e(311)](t);if(typeof t[e(313)]===e(310)){const n=t[e(313)]();if(n&&n[e(303)]>0)return void n[e(285)]((t=>{const n=e,o=this[n(299)](t,r,!0);nr[n(300)](this[n(292)],this[n(319)],o)}))}const n=this[e(299)](t,r,!1);nr.maintainLastXItems(this[e(292)],this[e(319)],n)}[or(289)](){return this[or(292)]}[or(299)](t,e,r){const n=or,i=o({x:t.x,y:t.y,timestampHighRes:nr.getEventHighResTimestamp(t)},this[n(314)](t));return r&&(i[n(290)]=e),i}[or(314)](t){const e=or;return o(o(o(o({},t[e(306)]&&{ctrlKey:!0}),t.altKey&&{altKey:!0}),t.shiftKey&&{shiftKey:!0}),0!=t.buttons&&{buttons:t[e(308)]})}}class cr{constructor(t){const e=or;this[e(292)]=[],this[e(297)]=t}[or(286)](t){const e=or;var r;const n={x:t.x,y:t.y,timestamp:Date[e(295)](),mouseButtonType:t.detail,offsetX:t.offsetX,offsetY:t.offsetY,isPressed:null==(null===(r=t[e(293)])||void 0===r?void 0:r.firesTouchEvents)?null:!t[e(293)][e(307)],target_id:t[e(302)].id};nr[e(300)](this[e(292)],this.buffer,n)}[or(289)](){const t=or,e=[...this[t(292)]];return this[t(292)]=[],e}}class lr{constructor(t){this[or(292)]=[],this.bufferSize=t}[or(286)](t){const e=or;var r;const n={isTrusted:t[e(301)],cancelable:t.cancelable,composed:t.composed,isView:!!t.view,shiftKey:t[e(294)],metaKey:t[e(305)],ctrlKey:t[e(306)],altKey:t[e(291)],firesTouchEvents:null===(r=t.sourceCapabilities)||void 0===r?void 0:r[e(307)],timestamp:Date.now()};nr.maintainLastXItems(this[e(292)],this[e(319)],n)}[or(289)](){const t=or,e=[...this[t(292)]];return this[t(292)]=[],e}}class dr{constructor(t){this[or(292)]=[],this.bufferSize=t}collect(t){const e=or;var r;const n={isTrusted:t.isTrusted,cancelable:t[e(288)],composed:t.composed,isView:!!t.view,location:t[e(304)],shiftKey:t[e(294)],ctrlKey:t[e(306)],altKey:t[e(291)],firesTouchEvents:null===(r=t[e(293)])||void 0===r?void 0:r[e(307)],timestamp:Date[e(295)]()};nr[e(300)](this[e(292)],this[e(319)],n)}[or(289)](){const t=or,e=this.data;return this[t(292)]=[],e}}class hr{constructor(t){const e=or;this[e(292)]=[],this[e(319)]=t}[or(286)](t){const e=or,r={isTrusted:t[e(301)],cancelable:t[e(288)],composed:t.composed,inputType:t[e(296)],isView:!!t[e(283)],timestamp:Date[e(295)]()};nr[e(300)](this[e(292)],this.bufferSize,r)}getData(){const t=or,e=this[t(292)];return this[t(292)]=[],e}}class fr{constructor(t){const e=or;this[e(292)]=[],this[e(319)]=t}[or(286)](t){const e=or,r={isTrusted:t[e(301)],cancelable:t[e(288)],composed:t.composed,timestamp:Date.now()};nr[e(300)](this[e(292)],this.bufferSize,r)}getData(){const t=this.data;return this.data=[],t}}const pr=Fr;function gr(){const t=["overlaysContent","error adding interaction listener","filter","cancelable","195292YarwhH","random","undefined","collect","selectMoveEventTypeBasedOnRollout","1502406PoKhbl","getGenericAttributes","getItemLocalStorageSafe","persistRolloutAndMoveEventTypeSelections","submit","2835009xDtMXD","mouseEventsCollectionBuffer","blur","PointerEvent","keys","getAttachedData","25MJzojW","visibilityState","tagName","1HXmTgb","pointerMoveRolloutPercentage","12991150qDNjHm","detectMoveEventType","inputTypeFilter","composed","detail","3232osXlWS","focusout","588798RnYeqY","dataset","cmet","setItemLocalStorageSafe","677134TfbQrG","forEach","3892EjKmOk","addEventListener","target","error","SELECT","visibilitychange","focus","offsetX","handleEvent","hasFocus","mouseup","storageManager","getStoredMoveEventType","pecrp","firesTouchEvents","pageshow","deviceEventDataCollectionIgnoreList","addSafeInteractionListener","click","pointermove","getEventHighResTimestamp","pagehide","sourceCapabilities","keyup","virtualKeyboard","eventTypesToAttach","mousedown","input","moveEventType","interactionEventsCollectorsData","href","mousemove","clipboardData","change","TEXTAREA","isTrusted"];return(gr=function(){return t})()}!function(){const t=Fr,e=gr();for(;;)try{if(218371==parseInt(t(259))/1*(-parseInt(t(198))/2)+-parseInt(t(268))/3+-parseInt(t(240))/4*(-parseInt(t(256))/5)+-parseInt(t(245))/6+-parseInt(t(200))/7*(parseInt(t(266))/8)+-parseInt(t(250))/9+parseInt(t(261))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const mr=pr(233),wr=pr(218),yr="paste",vr=pr(231),_r=pr(219),Er=pr(210),br=pr(226),Ar=pr(249),Cr=pr(223),Ir="keydown",Sr=pr(227),Tr=pr(267),Dr=pr(206),Or=pr(252),Rr=pr(205),Mr=pr(221),Nr=pr(215),kr=["INPUT",pr(204),pr(234)],Pr=pr(213),xr=pr(270);class Br{constructor(t,e,r,n,i){const a=pr;this[a(211)]=n,this[a(216)]=t,this.mouseEventsCollectionBuffer=e,this.safeEventCallback=r,this.pointerMoveRolloutPercentage=i,this.moveEventType=this[a(262)](),this[a(229)]={[wr]:{eventTypesToAttach:[this[a(228)],Er,br],attributesMapper:t=>{const e=a;var r;return{x:t.x,y:t.y,mouseButtonType:t[e(265)],isPressed:null==(null===(r=t[e(222)])||void 0===r?void 0:r.firesTouchEvents)?null:!t.sourceCapabilities[e(214)],offsetX:t[e(207)],offsetY:t.offsetY,target_id:t[e(202)].id}}},[yr]:{attributesMapper:t=>{const e=a;return{target_id:t[e(202)].id,isTrusted:t[e(235)],cancelable:t[e(239)],composed:t[e(264)],dropEffect:t[e(232)].dropEffect,effectAllowed:t[e(232)].effectAllowed}}},[Ar]:{attributesMapper:t=>({target_id:t[a(202)].id})},[vr]:{continousCollectors:[new sr(this[a(251)])]},[_r]:{continousCollectors:[new ur(this.mouseEventsCollectionBuffer)]},[Er]:{continousCollectors:[new cr(1)]},[br]:{continousCollectors:[new cr(1)]},[Tr]:{eventTypesToAttach:[Sr,Cr,Ir,mr],filter:this[a(263)],attributesMapper:t=>{const e=a,{target:r,isTrusted:n,cancelable:i,composed:s}=t;return o({target_id:r.id,dataset_keys:Object[e(254)](r[e(269)]||{}),isTrusted:n,cancelable:i,composed:s},navigator[e(224)]&&{navigator_virtualKeyboard:navigator[e(224)][e(236)]})}},[Sr]:{filter:this[a(263)],continousCollectors:[new hr(50)]},[Cr]:{filter:this[a(263)],continousCollectors:[new dr(50)]},[Ir]:{filter:this.inputTypeFilter,continousCollectors:[new lr(50)]},[mr]:{continousCollectors:[new fr(50)]},[Dr]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document.visibilityState,hasFocus:document.hasFocus(),timestampHighRes:nr[e(220)](t),target_id:null===(r=t.target)||void 0===r?void 0:r.id}}},[Or]:{attributesMapper:t=>{const e=a;var r;return{visibilityState:document.visibilityState,hasFocus:document[e(209)](),timestampHighRes:nr[e(220)](t),target_id:null===(r=t[e(202)])||void 0===r?void 0:r.id}}},[Rr]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(257)],hasFocus:document[e(209)](),timestampHighRes:nr[e(220)](t)}}},[Mr]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(257)],hasFocus:document.hasFocus(),timestampHighRes:nr[e(220)](t)}}},[Nr]:{attributesMapper:t=>{const e=a;return{visibilityState:document.visibilityState,hasFocus:document.hasFocus(),timestampHighRes:nr[e(220)](t)}}}}}[pr(262)](){const t=pr;return typeof window!==t(242)&&window[t(253)]?this[t(244)]():vr}[pr(244)](){const t=pr,e=this[t(211)][t(247)](Pr);if((null!=e?Number(e):null)!==this[t(260)]){const e=Math[t(241)]()<this.pointerMoveRolloutPercentage/100?_r:vr;return this.persistRolloutAndMoveEventTypeSelections(e),e}return this.getStoredMoveEventType()}[pr(248)](t){const e=pr;this[e(211)].setItemLocalStorageSafe(Pr,this.pointerMoveRolloutPercentage),this[e(211)][e(197)](xr,t)}[pr(212)](){const t=this[pr(211)].getItemLocalStorageSafe(xr);return(e=t)===_r||e===vr?t:vr;var e}[pr(263)](t){const e=pr;var r;const n=null===(r=t[e(202)])||void 0===r?void 0:r[e(258)];return kr.includes(n)}registerEventListeners(){const t=pr;for(const[e,r]of Object.entries(this.interactionEventsCollectorsData))if(!this.deviceEventDataCollectionIgnoreList.includes(e)&&!(e===vr&&this[t(228)]===_r||e===_r&&this[t(228)]===vr))try{this[t(217)](e,r)}catch(r){Te[t(203)]("Error while adding listener",{error:r,eventType:e})}}filter(t,e){const r=pr;return!t[r(238)]||t[r(238)](e)}async[pr(208)](t,e,r){const n=pr,{attributesMapper:i,continousCollectors:a}=t;if(!this[n(238)](t,e))return!1;if(a)a.forEach((t=>{t[n(243)](e)}));else{const t=this[n(246)](),a=this[n(255)](r),s=o(o(o({},t),i(e)),a&&{attachedEventsData:a});await this.safeEventCallback(r,s)}return!0}[pr(217)](t,e){const r=pr;window[r(201)](t,(async n=>{const o=r;try{await this[o(208)](e,n,t)}catch(t){Te[o(203)](o(237),{error:t})}}),t===Dr||t===Or)}getAttachedData(t){const e=pr;let r;const n=this.interactionEventsCollectorsData[t][e(225)];return n&&(r={},n[e(199)]((t=>{const n=e,{continousCollectors:o}=this[n(229)][t];if(o){const e=t===_r?"pointerevents":t;o[n(199)]((t=>r[e]=t.getData()))}}))),r}[pr(246)](){const t=pr;return{location:window.location[t(230)]}}}function Fr(t,e){return t-=197,gr()[t]}function Lr(){var t=["CHALLENGE","341hGXito","1150302cmrilV","compressed","117kqCOYF","114531jJDbjS","42QGDnWN","5QojQHl","uncompressed","3484248ztXVwt","TRUST","1420912osaeje","ALLOW","DENY","437230fUeKfw","354787BuXjpI","48128qpkvcj","70xaKbsl","1629VHtAYO"];return(Lr=function(){return t})()}var zr,Ur,Vr,Hr,jr,Gr;function Wr(t,e){return t-=273,Lr()[t]}function Xr(){const t=["importPublicKey","subtle","arrayBufferToBase64","jwk","SHA-256","3710016crKhhf","98352kmcGGS","3303412oZBsUC","801zYlIub","518105FSzowV","422IBvUmK","encode","30473230mIQICG","RSA-OAEP","getRandomValues","crypto","encryptPayload","encryptSymKeyBundle","string","6hqMeqy","byteLength","generateSymKey","configManager","2740895WUcvLz","encrypt","fromCharCode","928jvDkJy"];return(Xr=function(){return t})()}!function(){for(var t=Wr,e=Lr();;)try{if(692999==parseInt(t(285))/1+parseInt(t(287))/2*(-parseInt(t(275))/3)+parseInt(t(281))/4*(parseInt(t(277))/5)+parseInt(t(291))/6*(parseInt(t(276))/7)+-parseInt(t(286))/8*(parseInt(t(288))/9)+-parseInt(t(284))/10*(parseInt(t(290))/11)+parseInt(t(279))/12*(parseInt(t(274))/13))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),Vr=Wr,(Ur=zr||(zr={})).compress=Vr(273),Ur[Vr(278)]=Vr(278),(jr=Hr||(Hr={}))[(Gr=Wr)(282)]=Gr(282),jr[Gr(289)]=Gr(289),jr[Gr(283)]=Gr(283),jr[Gr(280)]=Gr(280);const Yr=Zr;!function(){const t=Zr,e=Xr();for(;;)try{if(724336==-parseInt(t(492))/1*(parseInt(t(508))/2)+-parseInt(t(514))/3+parseInt(t(489))/4+parseInt(t(505))/5*(-parseInt(t(501))/6)+-parseInt(t(491))/7+-parseInt(t(488))/8*(parseInt(t(490))/9)+parseInt(t(494))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class qr{constructor(t){this[Zr(504)]=t}[Yr(503)](){const t=Yr;return window[t(497)].subtle.generateKey({name:"AES-GCM",length:256},!0,[t(506),"decrypt"])}async encryptPayload(t,e){const r=Yr,n=typeof t===r(500)?(new TextEncoder)[r(493)](t):t,o=window.crypto[r(496)](new Uint8Array(12)),i={name:"AES-GCM",iv:o},a=await window[r(497)][r(510)][r(506)](i,e,n);return{payloadCipherText:this.arrayBufferToBase64(a),iv:o}}async[Yr(499)](t,e,r){const n=Yr,o=await window[n(497)].subtle.exportKey("raw",t),i=this[n(511)](o),a=this[n(511)](e),s=(new TextEncoder)[n(493)](JSON.stringify({symKey:i,iv:a})),u=await window.crypto.subtle[n(506)]({name:n(495)},r,s);return this[n(511)](u)}[Yr(511)](t){const e=Yr;let r="";const n=new Uint8Array(t),o=n[e(502)];for(let t=0;t<o;t++)r+=String[e(507)](n[t]);return window.btoa(r)}[Yr(509)](t){const e=Yr;return window[e(497)][e(510)].importKey(e(512),JSON.parse(t),{name:"RSA-OAEP",hash:e(513)},!0,[e(506)])}async[Yr(506)](t,e){const r=Yr;if(!window.crypto||!window[r(497)][r(510)])throw new Error("crypto is not supported");const n=await this[r(503)](),{payloadCipherText:o,iv:i}=await this[r(498)](e,n),a=await this.importPublicKey(t);return{encryptedData:o,encryptedKey:await this[r(499)](n,i,a)}}}function Zr(t,e){return t-=488,Xr()[t]}var Kr,$r,Jr,Qr=en;function tn(){var t=["message","SERVER","errorCode","SDKError: ","545944KaBqhI","461820yHeRks","toLog","toString","479703MrCGkB","COMMUNICATION","12FUYeoo","85204jCSBMg","client","error","1dZYqga","communication","2044674DvRjUu","CLIENT","572072IrIkOA","947650jgJuwp","errorSpace","name"];return(tn=function(){return t})()}function en(t,e){return t-=354,tn()[t]}!function(){for(var t=en,e=tn();;)try{if(165880==-parseInt(t(355))/1*(parseInt(t(367))/2)+parseInt(t(373))/3*(parseInt(t(374))/4)+parseInt(t(360))/5+parseInt(t(368))/6+-parseInt(t(371))/7+-parseInt(t(359))/8+parseInt(t(357))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),($r=Kr||(Kr={}))[(Jr=en)(358)]=Jr(375),$r[Jr(364)]="server",$r[Jr(372)]=Jr(356);class rn extends Error{constructor(t,e,r){var n,o,i=en;super(),this[i(354)]=t,this[i(361)]=e,this[i(365)]=r,this.message=(null===(n=this.error)||void 0===n?void 0:n[i(363)])||this[i(354)][i(370)](),this[i(362)]=(null===(o=this[i(354)])||void 0===o?void 0:o[i(362)])||rn[i(362)]}[Qr(370)](){var t=Qr;return t(366)+this[t(363)]+(this[t(361)]?", errorSpace: "+this.errorSpace:"")+(this[t(365)]?", errorCode: "+this.errorCode:"")}[Qr(369)](){var t=Qr;return o(o({name:this.name,message:this[t(363)]},this[t(361)]&&{errorSpace:this[t(361)]}),this[t(365)]&&{errorCode:this[t(365)]})}}function nn(t,e){return t-=235,on()[t]}function on(){const t=["2066103HwpGIL","1225572mLJHGF","152372asuman","41373WsKIim","filter","8713376lqGpNe","2354598ohkXHO","join","4380NiNzjQ","68988SdWwsh","140yeYHKW","518aYotZz"];return(on=function(){return t})()}!function(){const t=nn,e=on();for(;;)try{if(721028==parseInt(t(245))/1+parseInt(t(238))/2+-parseInt(t(244))/3+parseInt(t(246))/4*(-parseInt(t(242))/5)+parseInt(t(241))/6*(-parseInt(t(243))/7)+-parseInt(t(237))/8+parseInt(t(235))/9*(parseInt(t(240))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const an=sn;function sn(t,e){return t-=226,un()[t]}function un(){const t=["refreshSessionToken","deviceEventDataCollectionIgnoreList","EVENT_TYPE_INTERACTION","set","compressData","eventIndex","processingEvents","getTabId","tabId","filter","isTokenExpired","getClientId","flushLock","push","pollingSessionToken","history","enablePendingQueue","data","emitEvent","includes","Failed to polling data","index","localStoredEventTypes","size","lse","bufferSize","Error while emitting event (delayed flush)","getDeviceData","cryptoBinding","length","EVENT_TYPE_ACTION","generateEventIdentifier","standard","pop","popAllEvents","pendingQueueEnabled","isArray","getEntriesByType","getItemLocalStorageSafe","configManager","agenticSignalsManager","token","initiatorType","getActionEventCacheKey","page_load","Encryption error - missing public key","keyIdentifier","removeItemLocalStorageSafe","mouseEventsCollectionBuffer","ACTION_TOKEN_CACHE_MAX_SIZE","errorCode","publicKey","href","7540800UOicTk","error","actionTokenCache","isMobile","forEach","getUserId","standDown","interactionEventsManager","SUPPRESSIBLE_COLLECTION_EVENT_TYPES","EVENT_TYPE_DEVICE","requestsManager","postData","3784386VYCwvF","identityManager","EVENT_TYPE_IDENTIFICATION","uncompressed","flush","cleanLocalStorageEvents","getSnapshot","type","COMMUNICATION","min","info","sendDeviceDataEvent","parseInt","CLIENT","refreshConf","warn","enrichUADataIfDoesNotExist","sendPageLoadEvent","add","[Lightweight] clearQueue() called in standard mode - ignoring","referrer","toLog","events","extractWindowRespurces","493360YLQkJI","Failed to parse events from localStorage","catch","interactionObserver","tier","3528469DLxSQU","next","userId","encrypt","mobile_web","getDeviceId","Error while emitting event","setDeviceId","sort","lastDeviceInDeviceEvent","navigatorHighEntropyData","headers","safeEventCallback","rei","timestamp","bufferInterval","parse","eventsQueue","ACTION_TOKEN_CACHE_TTL","413358OJlOQO","location","correlationId","action_type","registerEventListeners","isNaN","call","delete","addEventToLocalStorage","clientId","eventIdMap","sessionToken","flushTimeoutHandle","value","resources","setItemLocalStorageSafe","attributes","fetchEventsFromLocalStorage","buildEncryptedRequestBody","no need to send device event","4wynXzh","setSessionToken","find","646168ttkGXO","performance","key_rotation_status","cacheActionToken","keys","EVENT_TYPE_ACTION_RESULT","crypto","has","stringify","pollingInterval","serverPath","publicKeyId","toString","handleRotateResponse","setUserId","sdkPlatform","enableSessionToken","[Lightweight] getPayload() can only be called in lightweight mode","clearQueue","device/events","maintainLastXItems","desktop_web","deviceDataManager","storageManager","1525662uBCdYs","signature","getConfValue","platform","shouldSendDeviceEvent","deviceId","maxEventStored","lightweight","get","increaseEventIndex","[Lightweight] Failed to collect device data","collectionSuppressed","now","eventTypesToStore","cleanupSentEvents","ddls"];return(un=function(){return t})()}!function(){const t=sn,e=un();for(;;)try{if(490888==-parseInt(t(376))/1*(parseInt(t(356))/2)+parseInt(t(227))/3+-parseInt(t(379))/4+-parseInt(t(332))/5+parseInt(t(308))/6+-parseInt(t(337))/7+parseInt(t(296))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const cn=an(242),ln=an(346),dn=an(350),hn=an(267),fn=an(291),pn=an(244),gn=an(294),mn=an(268),wn=an(352),yn=[We[an(273)],We[an(310)],We.EVENT_TYPE_DEVICE,We[an(384)]],vn=[We.EVENT_TYPE_ACTION,We[an(310)]],_n=an(265),En=an(381);class bn{get[an(278)](){const t=an;return this[t(282)][t(229)](t(259),!1)}constructor(t,e,r,n,i,a,s,u,c){let l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:an(275);const d=an;this.configManager=t,this[d(226)]=e,this[d(401)]=r,this[d(306)]=n,this[d(309)]=i,this[d(283)]=a,this[d(271)]=s,this.serverPath=u,this[d(395)]=c,this.tier=l,this[d(248)]=null,this[d(366)]=new WeakMap,this[d(255)]=!1,this.collectionSuppressed=!1,this[d(335)]=null,this.processingEvents=new Map,this[d(298)]=new Map,this.ACTION_TOKEN_CACHE_TTL=36e5,this[d(292)]=100,this.flushTimeoutHandle=null,this[d(349)]=async(t,e)=>{const r=d;var n;try{null===(n=this.interactionObserver)||void 0===n||n[r(362)](this,t);const i=this[r(283)][r(314)](),a=o({},o(o({interaction_type:t},e),i&&{aiAgentSignals:i})),s={type:We[r(245)],attributes:a};return await this[r(261)](s)}catch(t){}},this.enableSessionToken=c,this[d(354)]=[],this[d(385)]=new qr(t),this[d(303)]=new Br(this[d(282)][d(229)](pn,[]),this.configManager[d(229)](fn,100),this.safeEventCallback,this[d(226)],this.configManager.getConfValue("pointerEventRolloutPercentage",0)),this[d(299)]=He.isMobile(),this[d(240)]=this[d(282)][d(229)](_n,[We[d(273)],We[d(305)]]),this[d(233)]=this[d(282)][d(229)]("maxLocalStoredEvents",4),this[d(388)]=36e4,this.tier!==d(234)&&this.pollingSessionToken()}[an(274)](t){const e=an;var r;if(this[e(366)][e(386)](t))return this[e(366)][e(235)](t);const n=function(t,e,r,n,o,i,a){const s=nn;return[t,e,r,n,o,void 0!==i?i:"",a||""][s(236)]((t=>""!==t))[s(239)]("-")}(t[e(315)]||"",this[e(309)][e(254)](),this[e(309)][e(342)]()||"",this.identityManager[e(301)]()||"",t[e(351)],t[e(264)],null===(r=t[e(372)])||void 0===r?void 0:r[e(359)]);return this[e(366)].set(t,n),n}[an(286)](t){const e=an;var r;return((null==t?void 0:t[e(315)])||"")+"-"+(this.identityManager.getClientId()||"")+"-"+(this.identityManager[e(342)]()||"")+"-"+((null==t?void 0:t[e(339)])||this.identityManager[e(301)]()||"")+"-"+((null==t?void 0:t[e(351)])||"")+"-"+((null==t?void 0:t[e(264)])||"")+"-"+((null===(r=null==t?void 0:t[e(372)])||void 0===r?void 0:r[e(359)])||(null==t?void 0:t[e(358)])||"")}getCachedActionToken(t){const e=an;if(!vn[e(262)](null==t?void 0:t[e(315)]))return null;const r=this[e(286)](t),n=this[e(298)][e(235)](r);return n?Date[e(239)]()-n[e(351)]>this[e(355)]?(this[e(298)][e(363)](r),null):n[e(284)]:null}[an(382)](t,e){const r=an;if(!vn[r(262)](null==t?void 0:t[r(315)])||!e)return;if(this[r(298)][r(266)]>=this[r(292)]){const t=this[r(298)][r(383)]()[r(338)]()[r(369)];this[r(298)][r(363)](t)}const n=this[r(286)](t);this.actionTokenCache[r(246)](n,{token:e,timestamp:Date[r(239)]()})}[an(302)](){const t=an;this[t(312)]()[t(334)]((()=>{})),this[t(238)]=!0,this.flushTimeoutHandle&&(clearTimeout(this[t(368)]),this[t(368)]=null)}async[an(261)](t){const e=an;if(this.collectionSuppressed&&bn[e(304)][e(262)](null==t?void 0:t[e(315)]))return{};if(this[e(278)]&&vn[e(262)](null==t?void 0:t[e(315)])){const r=this.getCachedActionToken(t);if(r)return Te[e(318)]("Returning cached action token",{actionType:t[e(315)],correlationId:t[e(358)]}),{actionToken:r}}t[e(264)]=this.increaseEventIndex(),t.location=location[e(391)](),t[e(230)]=navigator.platform,t.sdkVersion="2.6.0",t[e(389)]=this[e(389)],t[e(251)]=this[e(309)][e(250)](),t[e(351)]=Date[e(239)](),await this[e(324)](t);let r=0;if(this[e(240)][e(262)](t[e(315)])?r=this[e(364)](t):this[e(354)][e(256)](t),"lightweight"===this.tier)return{};const n=this[e(282)].getConfValue(mn,2);if(this[e(354)][e(272)]+r>=n||yn[e(262)](t[e(315)])){this.flushTimeoutHandle&&(clearTimeout(this[e(368)]),this[e(368)]=null);try{return await this[e(312)]()}catch(r){throw Te[e(297)](e(343),{clientId:this.identityManager[e(254)](),eventType:t.type,error:r[e(293)]?r[e(329)]():r}),r}}if(!this.flushTimeoutHandle&&this.eventsQueue[e(272)]>0){const r=this[e(282)].getConfValue(wn,2),n=Math[e(317)](r,30);this.flushTimeoutHandle=setTimeout((()=>{const r=e;this[r(368)]=null,this[r(312)]()[r(334)]((e=>{const n=r;Te[n(297)](n(269),{clientId:this.identityManager[n(254)](),eventType:t.type,error:e.errorCode?e[n(329)]():e})}))}),1e3*n)}return{}}async[an(243)](){const t=an;try{return this[t(354)][t(272)]>0?await this.flush():(await this[t(319)](!0),await this[t(312)]())}catch(t){Te.error("Failed to refresh data",{e:t})}}async[an(257)](){const t=an;try{this[t(309)][t(253)]()&&await this[t(243)]()}catch(e){Te.error(t(263),{e:e})}finally{setTimeout((async()=>{const e=t;await this[e(257)]()}),this.pollingInterval)}}async enrichUADataIfDoesNotExist(t){const e=an;var r;if(!(null===(r=t[e(372)])||void 0===r?void 0:r.navigatorHighEntropyData))try{t.attributes[e(347)]=await Re()}catch(t){}}[an(277)](){const t=an;if(this.pendingQueueEnabled){const e=[],r=new Set;for(;this[t(354)][t(272)];){const n=this[t(354)][t(276)]();if(!n)break;const o=this[t(274)](n);this.processingEvents[t(386)](o)||!r.has(o)&&(r[t(326)](o),e[t(256)](n))}const n=this[t(373)]();return(null==n?void 0:n[t(272)])&&n[t(300)]((n=>{const o=t,i=this[o(274)](n);this[o(249)][o(386)](i)||!r[o(386)](i)&&(r.add(i),e[o(256)](n))})),e[t(345)](((e,r)=>e[t(351)]-r[t(351)]))}{const e=[],r=this[t(373)]();for(;this[t(354)][t(272)];){const r=this[t(354)][t(276)]();if(!r)break;e.push(r)}return(null==r?void 0:r.length)&&e.push(...r),e.sort(((e,r)=>e[t(351)]-r[t(351)]))}}async[an(312)](){const t=an;let e=[];if(this.pendingQueueEnabled){for(;this.flushLock;)await new Promise((t=>setTimeout(t,10)));this[t(255)]=!0;try{if(e=this.popAllEvents(),0===e.length)return{};e.forEach((e=>{const r=t,n=this[r(274)](e);this[r(249)][r(246)](n,e)}))}finally{this[t(255)]=!1}}else if(e=this.popAllEvents(),0===e.length)return{};const r={};r[t(365)]=this.identityManager[t(254)](),r[t(232)]=this[t(309)].getDeviceId(),r.userId=this[t(309)].getUserId(),r[t(394)]=this[t(299)]?qe:Xe,r[t(330)]=e;try{const{keyIdentifier:e,publicKeyId:n}=await this[t(271)].getPublicData();r[t(289)]=e,r[t(390)]=n}catch(e){Te[t(323)]("Crypto-binding is not supported. "+e)}this[t(395)]&&(r[t(367)]=!0);try{const n=await this[t(374)](r,!0),i=await this[t(271)].getRotationData();let a;i&&(a=[{type:"key_rotation_data",data:i[t(260)],signature:i[t(228)]}]);const s=await this.requestsManager[t(307)](t(398),o(o({},n),a?{headers:a}:{}));if(s[t(348)]){const e=s.headers[t(378)]((e=>e[t(315)]===En));e&&e[t(369)]&&this[t(271)][t(392)](e.value)}return s[t(232)]&&this[t(309)][t(344)](s[t(232)]),s[t(367)]&&this[t(309)][t(377)](s.sessionToken),s[t(339)]&&this[t(309)][t(393)](s[t(339)]),this[t(278)]?(e[t(300)]((e=>{const r=t;vn[r(262)](e[r(315)])&&s.actionToken&&this[r(382)](e,s.actionToken)})),this[t(241)](e),e[t(300)]((e=>{const r=t,n=this[r(274)](e);this[r(249)][r(363)](n)}))):this.cleanLocalStorageEvents(),s}catch(r){throw this[t(278)]&&e[t(300)]((e=>{const r=t,n=this[r(274)](e);this[r(249)].delete(n)})),r}}async[an(374)](t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=an,n=this[r(282)][r(229)](gn,null);if(null===n&&e)return await this[r(282)][r(322)](this[r(309)].getClientId()),await this[r(374)](t);if(null===n)throw new rn(new Error(r(288)),Kr[r(316)]);try{const e=JSON[r(387)](t),o=this.compressData(e),i=o||e,{encryptedData:a,encryptedKey:s}=await this[r(385)][r(340)](n,i);return{data:a,key:s,dataType:o?zr.compress:zr[r(311)]}}catch(t){throw new rn(t,Kr[r(321)])}}[an(247)](t){const e=an;try{return fe(t)}catch(t){Te.error("Failed to compress data, sending the data to the service uncompressed",{clientId:this[e(309)][e(254)](),error:t})}}setInteractionObserver(t){this.interactionObserver=t}[an(236)](){const t=an;if(null===this[t(248)]){const e=this[t(226)][t(281)](dn),r=Number[t(320)](e);this[t(248)]=Number[t(361)](r)?-1:r}return this[t(248)]++,this.storageManager[t(371)](dn,this.eventIndex[t(391)]()),this[t(248)]}[an(231)](){const t=an,e=this[t(226)].getItemLocalStorageSafe(cn),r=this.storageManager[t(281)](ln);return!e||!r||Date[t(239)]()-e>864e5||r!=this[t(309)][t(342)]()}async[an(319)](t){const e=an;if(!t&&!this[e(231)]())return Te[e(318)](e(375)),!1;const r=await this.deviceDataManager[e(270)](),n={type:We.EVENT_TYPE_DEVICE,attributes:r},o=await this[e(261)](n);return o&&!this.collectionSuppressed&&(this[e(226)][e(371)](cn,Date[e(239)]()),this[e(226)].setItemLocalStorageSafe(ln,this.identityManager.getDeviceId())),o}async[an(325)](){const t=an,e=t(287);if(this[t(282)][t(229)](pn,[])[t(262)](e))return!1;const r=this[t(331)](),n=this.agenticSignalsManager[t(314)]();return await this[t(261)]({type:We[t(245)],attributes:o(o(o({interaction_type:e,location:window[t(357)][t(295)],referrer:document[t(328)]},window[t(258)]&&{window_historyLength:window[t(258)][t(272)]}),r&&{windowResources:r}),n&&{aiAgentSignals:n})}),!0}[an(331)](){const t=an;try{const e=window[t(380)][t(280)](t(370));return e&&Array[t(279)](e)?e.map((e=>{const r=t;return{name:e.name,initiatorType:e[r(285)]}})):void 0}catch(t){}}[an(360)](){const t=an;this.interactionEventsManager.registerEventListeners(),this[t(309)][t(360)]()}async getPayload(){const t=an;if(this[t(336)]!==t(234))throw new Error(t(396));let e;Te[t(318)]("[Lightweight] Building fresh device payload");try{e=await this[t(401)][t(270)]()}catch(e){throw Te.error(t(237),{error:e}),new Error(t(237))}const r=[{type:We[t(305)],attributes:e,timestamp:Date.now(),index:this[t(236)](),location:location.toString(),platform:navigator[t(230)],sdkVersion:"2.6.0",serverPath:this[t(389)],tabId:this[t(309)].getTabId()}],n=this[t(309)][t(342)]();return{clientId:this[t(309)][t(254)](),deviceId:n||void 0,userId:this[t(309)][t(301)]()||null,sdkPlatform:this[t(299)]?t(341):t(400),events:r}}[an(397)](){const t=an;this[t(336)]===t(234)?(this.eventsQueue=[],this[t(226)][t(290)](hn),Te[t(318)]("[Lightweight] Event queue cleared")):Te[t(323)](t(327))}[an(373)](){const t=an,e=this[t(226)][t(281)](hn);if(!e)return[];try{return JSON[t(353)](e)}catch(e){return Te[t(297)](t(333),{error:e}),[]}}[an(364)](t){const e=an,r=this[e(373)]();return nr[e(399)](r,this[e(233)],t),this[e(226)].setItemLocalStorageSafe(hn,JSON.stringify(r)),r.length}[an(313)](){this[an(226)].removeItemLocalStorageSafe(hn)}cleanupSentEvents(t){const e=an;if(0===t[e(272)])return;const r=this[e(373)]();if(!r||0===r[e(272)])return;const n=new Set;for(const r of t)n[e(326)](this[e(274)](r));const o=r[e(252)]((t=>!n.has(this[e(274)](t))));o.length!==r[e(272)]&&(o[e(272)]>0?this.storageManager[e(371)](hn,JSON[e(387)](o)):this[e(226)][e(290)](hn))}}bn.SUPPRESSIBLE_COLLECTION_EVENT_TYPES=[We.EVENT_TYPE_INTERACTION,We[an(305)]];const An=Cn;function Cn(t,e){return t-=345,In()[t]}function In(){const t=["2DzKxrP","warn","Invalid JWT:","parse","setClientId","addEventListener","base64UrlEncode","getTabId","loadDeviceId","exp","userId","getSecureSessionToken","723469gxsdLR","186715nPchfA","sstReplayMaxUses","RS256","84BUItud","randomUUID","1618137ldneyu","iat","registerEventListeners","rui","getItemSessionStorageSafe","JWT","removeItemLocalStorageSafe","1478500bIejLr","error","CryptoBinding not available for secure session token generation","load","removeUserId","MAX_SAFE_INTEGER","cryptoBinding","rti","expirationSeconds","getUserId","tabId","deviceId","removeItemSessionStorageSafe","rdit","saveTabIdOnUnload","toString","configManager","Failed to generate secure session token:","floor","stringify","now","sign","getConfValue","setItemLocalStorageSafe","1672782kPEaUc","getPublicData","isTokenExpired","6469064lzwtaY","getDeviceId","setDeviceId","loadTabId","rdi","setItemSessionStorageSafe","setCryptoBinding","beforeunload","198esMJgj","split","clientId","125692mJuvbT","getItemLocalStorageSafe","random","storageManager","userIdStorageExpiry","rci","getClientId","getSessionToken","rst"];return(In=function(){return t})()}!function(){const t=Cn,e=In();for(;;)try{if(576678==parseInt(t(400))/1*(-parseInt(t(388))/2)+-parseInt(t(365))/3+-parseInt(t(404))/4*(-parseInt(t(401))/5)+parseInt(t(376))/6*(parseInt(t(379))/7)+parseInt(t(368))/8+-parseInt(t(406))/9+-parseInt(t(413))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Sn=An(409),Tn=An(384),Dn=An(372),On=An(354),Rn=An(348),Mn=An(387),Nn=An(383);class kn{constructor(t,e,r){const n=An;this[n(382)]=t,this[n(357)]=e,this[n(378)]=r,this[n(347)]=null,this[n(392)](this.clientId)}[An(374)](t){this[An(347)]=t}[An(416)](){this[An(396)](),this.loadTabId()}[An(408)](){const t=An;window[t(393)](t(375),(async()=>this[t(355)]()))}[An(369)](){return this[An(352)]}[An(370)](t){const e=An;this[e(352)]!==t&&(Te.info("Updating DeviceId",{deviceId:t}),this[e(352)]=t,this[e(382)].setItemSessionStorageSafe(Dn,t),this.storageManager.setItemLocalStorageSafe(Dn,t))}[An(396)](){const t=An,e=this.storageManager[t(410)](Dn)||this.storageManager[t(380)](Dn);return null!=e&&this[t(370)](e),e}[An(385)](){return this.clientId}setClientId(t){const e=An;this.storageManager[e(385)]()!=t&&this[e(382)][e(392)](t),this[e(382)].setItemSessionStorageSafe(Tn,t)}[An(350)](){const t=An;if(Number(this[t(382)][t(380)](On))+this[t(357)][t(363)](Nn,864e5)<Date[t(361)]())return this[t(345)](),null;const e=this[t(382)][t(410)](Sn);return null!=e?e:this[t(382)][t(380)](Sn)}setUserId(t){const e=An;this[e(398)]=t,this[e(382)][e(373)](Sn,t),this[e(382)].setItemLocalStorageSafe(Sn,t),this[e(382)][e(364)](On,Date[e(361)]())}[An(345)](){const t=An;this[t(382)].removeItemSessionStorageSafe(Sn),this[t(382)][t(412)](Sn),this[t(382)][t(412)](On)}[An(371)](){const t=An,e=this.storageManager[t(410)](Rn);e?(this.storageManager[t(353)](Rn),this[t(351)]=e):this[t(351)]=Math.floor(Math[t(381)]()*Number[t(346)])[t(356)]()}[An(395)](){return this[An(351)]}[An(355)](){this.storageManager.setItemSessionStorageSafe(Rn,this.tabId)}setSessionToken(t){const e=An;this[e(382)][e(364)](Mn,t)}[An(386)](){const t=An;return this[t(382)][t(380)](Mn)||this.storageManager[t(410)](Mn)}async[An(399)](t){const e=An;var r,n;const i=null!==(r=null==t?void 0:t.actionType)&&void 0!==r?r:null,a=null!==(n=null==t?void 0:t[e(349)])&&void 0!==n?n:300,s=this[e(357)].getConfValue(e(402),0)||null;if(!this[e(347)])return Te[e(389)](e(415)),null;const u=this.getSessionToken();if(!u)return Te.warn("No backend session token available"),null;try{const{publicKey:t}=await this[e(347)][e(366)](),r=Math[e(359)](Date[e(361)]()/1e3),n=r+a,c=o(o({backendSessionToken:u,securedToken:!0,version:"1.0",jti:nr[e(405)](),clientParams:{clientId:this[e(385)](),deviceId:this[e(369)](),userId:this[e(350)]()},iat:r,exp:n,publicKey:t},i&&{actionType:i}),s&&{maxUses:s}),l={alg:e(403),typ:e(411)},d=nr.base64UrlEncode(JSON.stringify(l))+"."+nr[e(394)](JSON[e(360)](c)),h=await this[e(347)][e(362)](d);return d+"."+nr.base64ToBase64Url(h)}catch(t){return Te[e(414)](e(358),{error:t}),null}}[An(367)](){const t=An;var e;const r=this[t(386)]();if(!r)return!0;try{const n=JSON[t(391)](atob(r[t(377)](".")[1]));let o=(null!==(e=n[t(397)])&&void 0!==e?e:n[t(407)])*(n[t(397)]&&n[t(397)]<1e12?1e3:1);return!n[t(397)]&&(o+=9e5),Date[t(361)]()>=o}catch(e){return Te.error(t(390),{error:e}),!0}}}const Pn=Hn;!function(){const t=Hn,e=jn();for(;;)try{if(625318==parseInt(t(382))/1+-parseInt(t(378))/2*(parseInt(t(375))/3)+parseInt(t(381))/4+parseInt(t(372))/5+-parseInt(t(384))/6+parseInt(t(389))/7+parseInt(t(374))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const xn="__tsDrsInstances",Bn=Pn(377),Fn="ts-drs:initialized";function Ln(t){const e=Pn;try{return t[e(373)],!0}catch(t){return!1}}function zn(){const t=Pn;let e=window;try{for(;e[t(385)]!==e&&Ln(e[t(385)]);)e=e[t(385)]}catch(t){}return e}function Un(){const t=Pn,e=zn(),r=e[xn];if(Array[t(380)](r))return r;const n=[];return e[xn]=n,n}function Vn(t){const e=Pn,r={mode:t,v:1};Un()[e(387)](r);const n=window[Bn];Array[e(380)](n)?n.push(r):window[Bn]=[r],zn().dispatchEvent(new CustomEvent(Fn,{detail:{mode:t,v:1}}))}function Hn(t,e){return t-=372,jn()[t]}function jn(){const t=["agentic","3369528mSycFo","parent","standard","push","mode","8742825tvHwxM","137825SctMVG","document","6151968LubzcO","234IFRoAk","some","__tsDrsLocalInstances","26606JrRpaY","detail","isArray","635512HxprXU","20126WAHXZN"];return(jn=function(){return t})()}const Gn=Wn;function Wn(t,e){return t-=484,Kn()[t]}!function(){const t=Wn,e=Kn();for(;;)try{if(989113==parseInt(t(505))/1+parseInt(t(484))/2*(parseInt(t(490))/3)+-parseInt(t(488))/4+-parseInt(t(486))/5+parseInt(t(501))/6*(-parseInt(t(493))/7)+parseInt(t(510))/8+-parseInt(t(489))/9*(parseInt(t(498))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Xn=Gn(497),Yn="addon_a",qn=[Gn(492),Gn(512),Gn(487)];function Zn(t,e){const r=Gn;try{const n=new URL(t,window.location[r(496)]);return n[r(491)]===e&&!!function(t){const e=Gn;return qn.some((r=>t===r||t[e(500)](r)))}(n[r(513)])&&n[r(509)][r(485)](Xn)!==Yn}catch(t){return!1}}function Kn(){const t=["resource","forEach","1776492KIOSDh","frames","name","from","searchParams","2016328dqKnbp","getEntriesByType","/device/logs","pathname","observe","disconnect","10NpgeLK","get","9326975GbmIPG","/device/conf","1159520JrsuNT","36lZaUyZ","1182108lphcnT","origin","/device/events","7WQCGEH","push","getEntries","href","tss","1260470wHtWdi","PerformanceObserver","endsWith","2100822aBRhkq","function"];return(Kn=function(){return t})()}const $n=Jn;function Jn(t,e){return t-=154,Qn()[t]}function Qn(){const t=["3618wEzgPb","tagPath","stringify","json","COMMUNICATION","11gmabac","statusText","postDataFromURL","includes","4905388ZUkdYO","1059550TJjIqq","14cOxrge","fetch","371097xGGLym","30010GLONeM","11081YtwtYw","5291215SehbWS","2290788fTvgdd","callServer","status","isAgenticSelfTagged","fetch-api is not supported","POST","SERVER","message","serverPath","include","152ZYsiFq"];return(Qn=function(){return t})()}!function(){const t=Jn,e=Qn();for(;;)try{if(994185==-parseInt(t(175))/1*(parseInt(t(178))/2)+parseInt(t(181))/3+parseInt(t(173))/4+parseInt(t(180))/5+-parseInt(t(164))/6*(parseInt(t(179))/7)+-parseInt(t(163))/8*(parseInt(t(177))/9)+-parseInt(t(174))/10*(parseInt(t(169))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class to{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=Jn;this[r(161)]=t,this[r(156)]=e}tagPath(t){const e=Jn;if(!this[e(156)])return t;const r=t[e(172)]("?")?"&":"?";return""+t+r+Xn+"="+Yn}async postData(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Jn;return this[n(171)](this[n(161)]+this[n(165)](t),e,r)}async postDataFromURL(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Jn,i={method:n(158),credentials:n(162),headers:new Headers(o({"Content-Type":"application/json"},r)),body:JSON[n(166)](e)};return await this[n(154)](t,i)}async getData(t){const e=Jn,r=this[e(161)]+this[e(165)](t),n={method:"GET",credentials:e(162)};return await this[e(154)](r,n)}async[$n(154)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=$n;if(!(r(176)in window))throw new rn(new Error(r(157)),Kr.CLIENT);try{const n=await fetch(t,e),o=await n[r(167)]();if(n.ok)return o;throw new rn(new Error(o[r(160)]||n[r(170)]),Kr[r(159)],n[r(155)])}catch(t){if(!(t instanceof rn))throw new rn(new Error(t.message),Kr[r(168)]);throw t}}}const eo=ro;function ro(t,e){return t-=258,oo()[t]}!function(){const t=ro,e=oo();for(;;)try{if(166701==parseInt(t(270))/1*(parseInt(t(273))/2)+-parseInt(t(260))/3*(-parseInt(t(269))/4)+-parseInt(t(264))/5*(-parseInt(t(281))/6)+parseInt(t(277))/7*(parseInt(t(279))/8)+parseInt(t(280))/9*(parseInt(t(276))/10)+parseInt(t(282))/11+-parseInt(t(275))/12)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class no{constructor(){const t=ro;this[t(261)]={clientId:t(271)}}[eo(283)](t,e,r){const n=eo;if(!t&&((null==e?void 0:e[n(272)])&&Te.info(r),null==e?void 0:e[n(266)]))throw new Error(r);return t}[eo(265)](t,e){const r=eo;var n,o,i,a;const s=Object[r(274)](this[r(261)]).filter((e=>typeof t[e]!=this.REQUIRED_SDK_PARAMS[e]));if((null!==(n=t[r(258)])&&void 0!==n?n:null===(o=t[r(262)])||void 0===o?void 0:o.tier)!==r(263)){const e=null!==(a=null===(i=t.options)||void 0===i?void 0:i[r(278)])&&void 0!==a?a:t[r(278)];(typeof e!==r(271)||!e)&&s.push(r(278))}return this[r(283)](0==s[r(267)],e,r(268)+JSON[r(259)](s))}}function oo(){const t=["3QlbtON","REQUIRED_SDK_PARAMS","options","lightweight","115wiXDOx","validateSDKParams","throwError","length","Invalid SDK params was provided: ","726744rotAeU","1227CHwpro","string","logIfInvalid","386fxGgpC","keys","9729468zMeasU","130JuOHNI","240268LQfmWY","serverPath","16LqGWZr","35334TaMnOd","84126JyjYWG","1285064nmgdNI","throwOrReturnResult","tier","stringify"];return(oo=function(){return t})()}function io(){const t=["length","requestsManager","now","floor","platform","flush","logsMinimumBatch","7uHRFLX","170jtVPZC","identityManager","getClientId","129488LycgOd","configManager","lastTimeLogsSent","20qUEazO","246771uIOpnu","3851192eDvKBI","logsMinimumDelay","push","logs","343264pAqiYG","676986sbXlmr","409089iiwNji","logMiddleware","370600kcMizG","reportLogs"];return(io=function(){return t})()}function ao(t,e){return t-=307,io()[t]}!function(){const t=ao,e=io();for(;;)try{if(349308==-parseInt(t(311))/1+parseInt(t(328))/2+parseInt(t(313))/3*(parseInt(t(331))/4)+parseInt(t(315))/5+parseInt(t(312))/6*(-parseInt(t(324))/7)+-parseInt(t(307))/8+parseInt(t(332))/9*(parseInt(t(325))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class so{constructor(t,e,r){const n=ao;this[n(318)]=t,this[n(326)]=e,this[n(329)]=r,this.lastTimeLogsSent=0,this[n(314)]=async()=>{const t=n;try{await this[t(316)]()}catch(t){}},Te.middlewares[n(309)](this.logMiddleware)}async reportLogs(){const t=ao;if(!this.configManager.getConfValue("enableLogsReporting",!1))return;const e=this[t(329)].getConfValue(t(323),6),r=this[t(329)].getConfValue(t(308),12e4);if(Te[t(310)][t(317)]<e||this[t(330)]+r>Date[t(319)]())return;this[t(330)]=Date[t(319)]();const n=Te[t(322)](),o=this.identityManager[t(327)](),i=Math[t(320)](Date[t(319)]()/1e3),a={sdkVersion:"2.6.0",platform:navigator[t(321)],clientId:o,timestamp:i,logEntries:n};await this[t(318)].postData("device/logs",a)}}const uo=lo;function co(){const t=["true","fixed","input","continuous","isTrusted","viewportBarShift","aria-hidden","47341iAVrda","disconnect","inner","absolute","height","2248380noZvoi","brand","speechSynthesis","bottom","observe","time","body","composed","0px","10001979CQQoCw","timeStamp","createElement","outer","type","removedNodes","DIV","navigator","pointerover","pointerdown","clearTimeout","length","clientY","data-openclaw-labels","appendChild","opacity","forEach","1qLJKdg","822938opzqyu","userAgentData","every","removeEventListener","tagName","resize","now","SPAN","immediate","documentElement","oneTime","syntheticCenteredClick","screenY","brands","attributes","right","726xFqIFg","innerHeight","name","claude-agent-glow-border","remove","viewportProbe","top","find","hidden","some","4zaZkjf","addEventListener","abs","addedNodes","nodeType","from","pointerEvents","delete","resolve","ELEMENT_NODE","getBoundingClientRect","66iFlkxB","outerHeight","setTimeout","1748490BSWzBx","none","voiceSignatureMatch","voiceschanged","left","encode","position","Google Chrome","7104216hLWjBi","version","glowBorderToggle","target","450915nikHSp","chromeLikeUa","mcpOverlay","syntheticSelectChange","visibility","get","Chromium","change","refAttributeMutation","style"];return(co=function(){return t})()}function lo(t,e){return t-=412,co()[t]}!function(){const t=lo,e=co();for(;;)try{if(557375==parseInt(t(438))/1*(parseInt(t(439))/2)+parseInt(t(491))/3*(parseInt(t(465))/4)+parseInt(t(412))/5+-parseInt(t(455))/6*(-parseInt(t(508))/7)+parseInt(t(487))/8+-parseInt(t(421))/9+parseInt(t(479))/10*(-parseInt(t(476))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const ho=[71,111,111,103,108,101,32,230,153,174,233,128,154,232,175,157,239,188,136,228,184,173,229,155,189,229,164,167,233,153,134,239,188,137],fo=uo(458),po=t=>t[uo(469)]===Node.ELEMENT_NODE&&t[uo(443)]===uo(427)&&t.id===fo,go=(t,e)=>t.nodeType===Node[uo(474)]&&t[uo(443)]===uo(427)&&t.hasAttribute(e),mo=t=>e=>{const r=uo;let n=null;const o=new MutationObserver((r=>{const o=lo;r[o(437)]((r=>{const i=o;r[i(490)]===document[i(448)]&&(r[i(468)][i(437)]((e=>{const r=i;go(e,t)&&(n=performance[r(445)]())})),r.removedNodes[i(437)]((r=>{const o=i;go(r,t)&&null!==n&&performance[o(445)]()-n<300&&e()})))}))}));return o[r(416)](document.documentElement,{childList:!0}),()=>o[r(509)]()},wo=mo("data-openclaw-mcp-overlay"),yo=mo(uo(434)),vo="data-openclaw-browser-ref",_o=[{name:uo(492),kind:uo(447),run:()=>{const t=lo;var e,r;const n=null!==(r=null===(e=window[t(428)][t(440)])||void 0===e?void 0:e[t(452)])&&void 0!==r?r:[],o=n[t(462)]((e=>e.brand===t(497))),i=n[t(462)]((e=>e[t(413)]===t(486)));return Boolean(o)&&Boolean(i)&&o[t(488)]===i.version}},{name:uo(481),kind:"immediate",run:async()=>{const t=lo;var e,r;const n=await(()=>{const t=lo;if(!("speechSynthesis"in window))return Promise[t(473)]([]);const e=window[t(414)].getVoices();return e[t(432)]?Promise[t(473)](e):new Promise((e=>{const r=t,n=window[r(478)]((()=>{const t=r;window[t(414)][t(442)](t(482),o),e([])}),1500),o=()=>{const t=r,i=window.speechSynthesis.getVoices();i.length&&(window.clearTimeout(n),window[t(414)][t(442)](t(482),o),e(i))};window[r(414)][r(466)]("voiceschanged",o),o()}))})(),o=null!==(r=null===(e=n[n[t(432)]-3])||void 0===e?void 0:e[t(457)])&&void 0!==r?r:"",i=Array[t(470)]((new TextEncoder)[t(484)](o));return i[t(432)]===ho[t(432)]&&i[t(441)](((t,e)=>t===ho[e]))}},{name:uo(460),kind:uo(449),install:t=>{const e=lo,r=new Map,n=new MutationObserver((e=>{const n=lo,o=performance[n(445)]();let i=0;e[n(437)]((t=>{const e=n;t[e(468)][e(437)]((t=>{(t=>{const e=lo;if(t[e(469)]!==Node[e(474)])return!1;const r=t;if(r[e(443)]!==e(427)&&r[e(443)]!==e(446))return!1;const n=r[e(500)];if(!n||n[e(432)]<4)return!1;if(n.position!==e(502)&&n[e(485)]!==e(511))return!1;if(n[e(461)]!==e(420)||n[e(454)]!==e(420)||n[e(415)]!==e(420)||"0px"!==n[e(483)])return!1;if(n[e(471)]!==e(480))return!1;const o=parseFloat(n[e(436)]),i=!isNaN(o)&&o<.1,a=n[e(495)]===e(463);return i||a})(t)&&r.set(t,o)})),t[e(426)][e(437)]((t=>{const n=e,a=r[n(496)](t);void 0!==a&&(o-a<10&&i++,r[n(472)](t))}))})),r.size>50&&r[n(437)](((t,e)=>{o-t>1e3&&r[n(472)](e)})),i>0&&t()}));return n[e(416)](document[e(448)],{childList:!0,subtree:!1}),()=>n[e(509)]()}},{name:uo(489),kind:uo(504),install:t=>{const e=uo;document.getElementById(fo)&&t(!0);const r=new MutationObserver((e=>{const r=lo;e[r(437)]((e=>{const n=r;e[n(490)]===document[n(418)]&&(e[n(468)][n(437)]((e=>{po(e)&&t(!0)})),e[n(426)][n(437)]((e=>{po(e)&&t(!1)})))}))}));return r.observe(document[e(418)],{childList:!0}),()=>r[e(509)]()}},{name:uo(506),kind:uo(504),install:t=>{const e=uo;let r=null,n={time:performance.now(),inner:window[e(456)],outer:window.outerHeight},o=null;const i=()=>{const i=e,a={time:performance.now(),inner:window.innerHeight,outer:window[i(477)]};null!==o&&window[i(431)](o),a[i(417)]-n[i(417)]<50||(r=n),n=a,o=window.setTimeout((()=>{const e=i;if(!r||n.outer!==r[e(424)])return;const o=n.inner<r[e(510)]-10,a=n[e(510)]>r[e(510)]+10;o?t(!0):a&&t(!1)}),50)};return window[e(466)](e(444),i),()=>{const t=e;window[t(442)](t(444),i),null!==o&&window[t(431)](o)}}},{name:uo(493),kind:uo(449),install:wo},{name:"labelsOverlay",kind:uo(449),install:yo},{name:uo(499),kind:uo(449),install:t=>{const e=uo,r=document[e(423)]("div");r.setAttribute(vo,"1"),r.setAttribute(e(507),e(501)),r[e(463)]=!0,r[e(500)].display=e(480),r[e(500)].pointerEvents=e(480),document.body[e(435)](r);const n=new MutationObserver((r=>{const n=e;r[n(464)]((t=>t[n(425)]===n(453)&&t.attributeName===vo&&null!==t.oldValue))&&t()}));return n[e(416)](r,{attributeFilter:[vo],attributeOldValue:!0,attributes:!0}),()=>{const t=e;n[t(509)](),r[t(459)]()}}},{name:uo(450),kind:"oneTime",install:t=>{const e=uo;let r=null;const n=t=>{r={x:t.x,y:t.y}},o=e=>{const n=lo;if(!r||0!==e.pressure)return;const o=e[n(490)][n(475)](),i=o.x+o.width/2,a=o.y+o[n(512)]/2,s=Math[n(467)](e.x-i)<1&&Math[n(467)](e.y-a)<1,u=r.x===e.x&&r.y===e.y,c=e[n(433)]===e[n(451)];s&&u&&c&&t()};return window[e(466)](e(429),n),window[e(466)](e(430),o),()=>{const t=e;window[t(442)](t(429),n),window.removeEventListener(t(430),o)}}},{name:uo(494),kind:"oneTime",install:t=>{const e=uo;let r=null,n=null;const o=t=>{const e=lo;t.target instanceof HTMLSelectElement&&!1===t[e(505)]&&!1===t[e(419)]?(r=t[e(490)],n=t.timeStamp):(r=null,n=null)},i=e=>{const o=lo;e.target instanceof HTMLSelectElement&&e.target===r&&!1===e.isTrusted&&null!==n&&e[o(422)]-n<10&&t(),r=null,n=null};return window[e(466)](e(503),o,!0),window[e(466)](e(498),i,!0),()=>{const t=e;window[t(442)](t(503),o,!0),window[t(442)](t(498),i,!0)}}}],Eo=Io;function bo(){const t=["agenticIdentityEnabled","error","isEnabled","call","oneTime","157344nvayOk","5ltmjko","kind","1074264sfOrbc","configManager","installContinuousSignal","initSignals","immediate","2198413JensiO","463581lXpAhG","Failed to run immediate signal","installOneTimeSignal","disconnectors","Failed to install one-time signal","2351238RxhBcN","name","run","getConfValue","install","state","runImmediateSignal","545046WSkrka","Failed to install continuous signal","enabled","924268efwltm"];return(bo=function(){return t})()}!function(){const t=Io,e=bo();for(;;)try{if(276040==-parseInt(t(334))/1+parseInt(t(349))/2+parseInt(t(346))/3+parseInt(t(355))/4+-parseInt(t(356))/5*(parseInt(t(339))/6)+parseInt(t(333))/7+parseInt(t(358))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ao=Eo(350);class Co{constructor(t){const e=Eo;this[e(359)]=t,this[e(344)]={},this.disconnectors={},this.enabled=this.isEnabled(),this[e(348)]&&this[e(331)]()}[Eo(352)](){const t=Eo;return this[t(359)][t(342)](Ao,!1)}initSignals(){const t=Eo;for(const e of _o)this[t(344)][e[t(340)]]=!1,e[t(357)]===t(332)?this[t(345)](e):e[t(357)]===t(354)?this[t(336)](e):this[t(360)](e)}async[Eo(345)](t){const e=Eo;try{this[e(344)][t[e(340)]]=Boolean(await t[e(341)]())}catch(r){Te[e(351)](e(335),{signal:t})}}installOneTimeSignal(t){const e=Eo;try{const r=t[e(343)]((()=>{const r=e;var n,o;this.state[t.name]=!0,null===(o=(n=this[r(337)])[t.name])||void 0===o||o[r(353)](n),delete this[r(337)][t.name]}));this[e(337)][t[e(340)]]=r}catch(r){Te[e(351)](e(338),{signal:t})}}[Eo(360)](t){const e=Eo;try{const r=t.install((e=>{const r=Io;this.state[t[r(340)]]=e}));this[e(337)][t[e(340)]]=r}catch(r){Te[e(351)](e(347),{signal:t})}}getSnapshot(){return this[Eo(348)]?o({},this.state):null}}function Io(t,e){return t-=331,bo()[t]}function So(t,e){return t-=231,Ro()[t]}const To=So;!function(){const t=So,e=Ro();for(;;)try{if(146039==parseInt(t(235))/1+parseInt(t(231))/2+parseInt(t(241))/3*(parseInt(t(249))/4)+-parseInt(t(246))/5*(parseInt(t(251))/6)+parseInt(t(248))/7+-parseInt(t(250))/8+-parseInt(t(252))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Do="rimd";class Oo{constructor(t,e,r){this[So(243)]=t,this.requestsManager=e,this.storageManager=r}async[To(234)](t){const e=To;if(this[e(236)][e(239)](Do)!=e(240)){const r=this.identityManager[e(247)](),n=this[e(243)][e(232)](),o=(t[e(237)]("/")?t:t+"/")+e(244),i=await this[e(238)][e(233)](o,{deviceId:r,clientId:n});i[e(242)]&&i.deviceId==r&&this.storageManager[e(245)](Do,"true")}}}function Ro(){const t=["107597VOHyqK","storageManager","endsWith","requestsManager","getItemLocalStorageSafe","true","19287UANnkC","deviceId","identityManager","device/migrate-identifiers","setItemLocalStorageSafe","3215whXPfE","getDeviceId","1501486rcRYLH","148VTocCC","2071192CbgnCM","1104vItTcG","1462851tjGLgd","251642RWucEp","getClientId","postDataFromURL","migrateIdentifiers"];return(Ro=function(){return t})()}const Mo=Lo;!function(){const t=Lo,e=Fo();for(;;)try{if(455054==parseInt(t(488))/1*(parseInt(t(511))/2)+-parseInt(t(494))/3*(parseInt(t(492))/4)+-parseInt(t(475))/5*(parseInt(t(495))/6)+-parseInt(t(522))/7+-parseInt(t(505))/8+parseInt(t(508))/9*(-parseInt(t(489))/10)+parseInt(t(484))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const No=Mo(485),ko=Mo(509),Po=Mo(515),xo=Mo(514),Bo=[];function Fo(){const t=["readFrequencyCounter","readCountedInteractions","fireAction","catch","15tfnVLq","length","publishGraceMs","object","some","isActionAllowed","isArray","stringify","getConfValue","27211283qwYKmI","agentic_checkpoint","error","ignoredPaths","2GhTdYi","292130irQuvs","startsWith","getItemLocalStorageSafe","8ODGiFy","setItemLocalStorageSafe","1286421CoMHdM","752904DSTigx","pathname","storageManager","isInteger","neverCountInteractions","includes","isPathIgnored","recordCountedInteraction","triggerFrequency","configManager","3454736XQKjCD","string","parse","189zEOSiK","atc","resetFrequencyCounter","315962ynTqiR","resetCountedInteractions","endsWith","agenticConfig","atci","parseInt","writeFrequencyCounter","min","isNaN","resetCounterOnRealAction","config","386960davQyZ","toString"];return(Fo=function(){return t})()}function Lo(t,e){return t-=475,Fo()[t]}class zo{constructor(t,e,r,n){const o=Mo;this[o(504)]=t,this[o(497)]=e,this.isActionAllowed=r,this[o(526)]=n}get[Mo(521)](){const t=Mo,e=this[t(504)][t(483)](xo,{});return typeof e===t(478)&&null!==e?e:{}}get[Mo(503)](){const t=Mo,e=this[t(521)][t(503)];return Number[t(498)](e)&&e>0?e:5}get neverCountInteractions(){const t=Mo,e=this[t(521)][t(499)];return Array.isArray(e)?e:Bo}get[Mo(477)](){const t=Mo,e=this[t(521)].publishGraceMs;return"number"==typeof e&&Number.isFinite(e)&&e>0?Math[t(518)](e,2e3):0}get[Mo(487)](){const t=Mo,e=this[t(521)][t(487)];return Array[t(481)](e)?e.filter((e=>typeof e===t(506)&&e[t(490)]("/"))):[]}[Mo(501)](){const t=Mo,e=window.location[t(496)];return this[t(487)][t(479)]((r=>{const n=t,o=r[n(476)]>1&&r[n(513)]("/")?r.slice(0,-1):r;return e===o||e[n(490)](o+"/")}))}[Mo(524)](){const t=Mo,e=this[t(497)][t(491)](ko),r=Number[t(516)](e);return Number[t(519)](r)||r<0?0:r}[Mo(517)](t){const e=Mo;this.storageManager[e(493)](ko,t[e(523)]())}[Mo(510)](){this[Mo(517)](0)}[Mo(525)](){const t=Mo,e=this.storageManager[t(491)](Po);if(!e)return{};try{const r=JSON[t(507)](e);return r&&typeof r===t(478)?r:{}}catch(t){return{}}}[Mo(502)](t){const e=Mo;var r;const n=this[e(525)]();n[t]=(null!==(r=n[t])&&void 0!==r?r:0)+1,this[e(497)][e(493)](Po,JSON.stringify(n))}[Mo(512)](){const t=Mo;this[t(497)].setItemLocalStorageSafe(Po,JSON[t(482)]({}))}[Mo(520)](){const t=Mo;this.resetFrequencyCounter(),this[t(512)]()}onInteraction(t){const e=Mo;if(this[e(501)]())return;if(!this[e(480)](No))return;if(this[e(499)][e(500)](t))return;const r=this[e(524)]()+1;if(this[e(502)](t),r<this[e(503)])return void this[e(517)](r);const n=this.readCountedInteractions();this[e(510)](),this.resetCountedInteractions(),this[e(526)](No,{agenticCountedInteractions:n})[e(527)]((t=>{Te[e(486)]("Agentic checkpoint failed",{error:t})}))}}const Uo=Vo;function Vo(t,e){return t-=212,Yo()[t]}!function(){const t=Vo,e=Yo();for(;;)try{if(637527==parseInt(t(249))/1*(parseInt(t(250))/2)+parseInt(t(216))/3*(-parseInt(t(225))/4)+-parseInt(t(253))/5*(parseInt(t(230))/6)+-parseInt(t(243))/7*(-parseInt(t(239))/8)+-parseInt(t(247))/9*(-parseInt(t(252))/10)+-parseInt(t(226))/11*(parseInt(t(235))/12)+parseInt(t(251))/13)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ho=Uo(246),jo=[Uo(245),Uo(213),Uo(219),Uo(223)],Go=[Uo(219),Uo(223)],Wo=jo[Uo(233)]((t=>!Go[Uo(236)](t))),Xo=Uo(221);function Yo(){const t=["riskId","hasAttribute","platform-websdk","pathname","data-ts-agentic-self","getItemLocalStorageSafe","ts-platform-websdk","signal","24fQuSjM","1100GchNcM","traffic","now","some","6KMfvTR","src","parse","filter","string","123732YXkSEt","includes","script","tsPlatform","8huAwwE","scripts","ownGlobals","number","4006107Bpeaxk","setItemLocalStorageSafe","cdn.riskid.security","ag_drs_verdict","864FchVDu","RiskID","227790JmpBYv","4QIYGKe","20176403gKeBrN","74240kCadlj","5097745wYaVeD","tsPlatformIsOwn","web_sdk_","location","verdict-cache","302220XInLBR"];return(Yo=function(){return t})()}function qo(){return Ho+":"+function(){const t=Uo;return window[t(214)][t(220)]||"/"}()}function Zo(t,e){const r=Uo,n={ts:Date[r(228)](),signal:e};t[r(244)](qo(),JSON.stringify(n))}const Ko=Qo;var $o,Jo;function Qo(t,e){return t-=352,hi()[t]}!function(){const t=Qo,e=hi();for(;;)try{if(710354==-parseInt(t(404))/1+-parseInt(t(359))/2+-parseInt(t(542))/3+-parseInt(t(473))/4+-parseInt(t(530))/5*(-parseInt(t(431))/6)+parseInt(t(381))/7*(parseInt(t(512))/8)+parseInt(t(491))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const ti=[null,void 0,Ko(393),"",0],ei="undefined"!=typeof document?document[Ko(389)]:null,ri=Ko(508),ni=Ko(417),oi=Ko(366),ii=Ko(426),ai=Ko(452),si=Ko(486),ui=Ko(439),ci=[Ko(547),Ko(480),Ko(449),Ko(408),Ko(398),Ko(422),Ko(374),Ko(403)];class li{constructor(t,e){const r=Ko;var n,o,i;this[r(365)]=null,this[r(477)]=null,this.enableSessionToken=!1,this[r(541)]=!1,this[r(436)]=null,this[r(430)]=!1,this[r(376)]=r(483),this[r(355)]=!1,this[r(356)]=!1,this.agenticManager=null,this.agenticInitStartedAt=0,this[r(458)]="",this[r(354)]=new no,this[r(380)]=!1,this.standardInitListenerRegistered=!1,this[r(391)]=!1,this[r(459)]=!1;const a=typeof e===r(375);if(this.clientId=a?e:t,this.options=a?{serverPath:t}:e,this.tier=(null===(n=this.options)||void 0===n?void 0:n[r(376)])||r(483),this.agenticCollect=(null===(o=this.options)||void 0===o?void 0:o.agenticCollect)||!1,!this.agenticCollect&&function(){const t=Pn;return function(){const t=window[Bn];return Array.isArray(t)?t:[]}().some((e=>(null==e?void 0:e[t(388)])===t(386)))}())throw new Error(r(432));if(this[r(355)]&&this.tier===r(362))throw new Error("agenticCollect is not supported in lightweight tier");const s=typeof(null===(i=this[r(528)])||void 0===i?void 0:i[r(502)])===r(375)&&this[r(528)][r(502)][r(385)]()[r(492)]>0;if(this[r(376)]!==r(362)&&!s)throw new Error(r(552));s&&(this[r(528)].serverPath=new URL(this[r(528)][r(502)]).toString()),this[r(436)]=this.options[r(436)]||null,this[r(376)]===r(362)&&Te[r(455)](r(427),{serverPath:this[r(528)][r(502)]}),Te.enabled=!!this[r(528)][r(469)],!this[r(354)][r(373)](this,{throwError:!0,logIfInvalid:!0})&&(this.disabledReason=r(526)),this.storageManager=new be(this[r(433)]),this[r(510)]=new to(this[r(528)][r(502)],this.agenticCollect),this[r(435)]=new Je(this[r(524)],this[r(510)]),this[r(493)]=new kn(this[r(524)],this[r(435)],this.clientId),this.identityManager[r(535)](),this[r(485)]=new Oo(this[r(493)],this[r(510)],this[r(524)]),this[r(522)]=this[r(528)][r(522)]||!1,this[r(430)]=this[r(528)][r(430)]||!1,this[r(516)]=new so(this[r(510)],this[r(493)],this.configManager),!this[r(355)]&&Vn(r(483))}standDown(t){const e=Ko;var r;if(this[e(380)])return;this[e(380)]=!0;const n=this[e(475)]?Date[e(515)]()-this.agenticInitStartedAt:void 0;Te[e(455)](e(400),{signal:t,msSinceInit:n}),null===(r=this[e(470)])||void 0===r||r[e(367)]()}[Ko(482)](){const t=Ko;var e,r;if(this[t(380)])return;const n=function(t){const e=Uo;return function(){const t=Pn;return Un().some((e=>(null==e?void 0:e.mode)===t(386)))}()?{detected:!0,signal:"registry"}:function(t){const e=Uo,r=function(t){const e=Uo,r=t[e(222)](qo());if(!r)return null;try{const t=JSON[e(232)](r);if(t&&typeof t.ts===e(242)&&typeof t[e(224)]===e(234))return t}catch(t){}return null}(t);return!!r&&Date[e(228)]()-r.ts<6048e5}(t.storageManager)?{detected:!0,signal:e(215)}:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Uo;try{const r=t[e(212)]?Wo:jo;if(Array.from(document[e(240)]||[])[e(229)]((n=>n!==t.ownScript&&!n[e(218)](Xo)&&r[e(229)]((t=>n[e(231)]&&n.src[e(236)](t))))))return!0}catch(t){}const r=window,n=(t,e)=>null!=t&&t!==e;return!!n(r.TSAccountProtection,t.tsAccountProtection)||!!n(r[e(248)],t[e(217)])||!t[e(212)]&&void 0!==r[e(238)]&&null!==r[e(238)]}(t[e(241)])?{detected:!0,signal:e(237)}:{detected:!1}}({storageManager:this[t(524)],ownGlobals:{tsAccountProtection:li,riskId:di,ownScript:ei,tsPlatformIsOwn:!0}}),o=null!==(r=null===(e=this.agenticManager)||void 0===e?void 0:e.isPathIgnored())&&void 0!==r&&r;var i;n[t(499)]||o?(n[t(499)]&&n[t(392)]!==t(406)&&Zo(this[t(524)],n[t(392)]),this[t(367)](n[t(499)]?n[t(392)]:"declared-path")):!this[t(364)]&&(this.standardInitListenerRegistered=!0,i=()=>{const e=t;this[e(367)](e(406))},zn().addEventListener(Fn,(t=>{const e=Hn;var r;"standard"===(null===(r=t[e(379)])||void 0===r?void 0:r[e(388)])&&i()})))}startTrafficWatch(){const t=Ko;this[t(391)]||(this[t(391)]=!0,function(t,e){const r=Uo;!function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const n=Gn;var o;const i=r[n(499)];if(typeof i!==n(502)||typeof(null===(o=i.prototype)||void 0===o?void 0:o[n(514)])!==n(502))return;let a;try{a=new URL(e)[n(491)]}catch(t){return}let s=!1,u=!1,c=null;const l=[],d=()=>{const t=n;u||(u=!0,null!==c&&(clearTimeout(c),c=null),l[t(504)]((e=>{const r=t;try{e[r(515)]()}catch(t){}})))},h=()=>{s||u||(s=!0,d(),t())},f=t=>{const e=n;for(const r of t){const t=r[e(507)];if(t&&Zn(t,a))return void h()}},p=function(t){const e=[],r=t=>{const n=Wn;e.push(t);let o=[];try{o=Array[n(508)](t[n(506)])}catch(t){return}for(const t of o)Ln(t)&&r(t)};return r(t),e}(r);for(const e of p){if(s)break;try{const t=e.performance;if(!t)continue;if(f(t[n(511)](n(503))),s)break;const r=e[n(499)];if(typeof r!==n(502))continue;const o=new r((t=>f(t[n(495)]())));o.observe({entryTypes:[n(503)]}),l[n(494)](o)}catch(t){}}!u&&(c=setTimeout(d,5e3))}((()=>t(r(227))),e)}((e=>{const r=t;Zo(this[r(524)],e),this[r(367)](e)}),this.options[t(502)]))}[Ko(463)](){const t=Ko;if(this[t(459)])return;this[t(459)]=!0;const e=()=>{const e=t,r=window[e(388)][e(425)];r!==this[e(458)]&&(this.lastCascadePath=r,this[e(482)]())};if(window[t(536)](t(377),e),window[t(536)]("locationchange",e),history[ri])return;history[ri]=!0;const r=history[t(446)];history[t(446)]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];const i=t,a=r[i(428)](this,n);return window[i(484)](new Event("locationchange")),a};const n=history.replaceState;history[t(402)]=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];const i=t,a=n.apply(this,r);return window[i(484)](new Event(i(383))),a}}[Ko(368)](t){const e=Ko,r=Date[e(515)]();return e(360)+(this[e(477)]||"unknown")+"_"+t+"_"+r}get actions(){return this.configManager.getConfValue(ui,[])}async[Ko(423)](){const t=Ko;return await this[t(370)](),this[t(439)]}async[Ko(443)](){const t=Ko;if(this[t(376)]===t(362))throw new Error(t(479));if(!this[t(522)])throw new Error(t(462));return await this.isInitialized()?(this[t(493)][t(504)]()&&await this[t(470)][t(471)](),this.identityManager[t(443)]()):(Te[t(455)](t(540)),this.generateDisabledToken(t(353)))}async[Ko(419)](){const t=Ko;if("lightweight"!==this.tier)throw new Error(t(397));return await this[t(370)](),await this[t(470)][t(419)]()}[Ko(416)](){const t=Ko;if(this[t(376)]!==t(362))throw new Error(t(454));this[t(470)][t(416)]()}[Ko(488)](t){const e=Ko;if(this[e(376)]!==e(362))throw new Error("[Lightweight] setDeviceId() can only be used in lightweight tier");if(!t||typeof t!==e(375))throw new Error(e(505));Te.info(e(503),{deviceId:t}),this[e(493)][e(488)](t)}[Ko(379)](){const t=Ko;return!(!this[t(355)]||this[t(435)].getConfValue(oi,!1)&&(Te[t(455)](t(496)),1))}async[Ko(418)](t){const e=Ko,r="object"!=typeof t?t:null==t?void 0:t[e(549)];return Te.info(e(429)),this[e(365)]=(async()=>{const t=e;var n,o,i;if(this[t(355)]){if(He[t(487)]())return Te.info(t(529)),!0;if(function(){const t=Pn;return Un()[t(376)]((e=>(null==e?void 0:e[t(388)])===t(383)))}())return Te[t(455)](t(394)),!0;Vn("agentic"),this.agenticInitStartedAt=Date[t(515)]()}this[t(376)]!==t(362)&&await this[t(435)][t(352)](this[t(493)][t(413)]()),this[t(356)]=this[t(379)]();const a=this[t(435)][t(464)](t(357),null),s=this[t(435)][t(464)](t(361),null),u=this.configManager.getConfValue(ii,void 0),c={};if((null==s?void 0:s[t(387)])&&(c[t(361)]={isEnabled:!0,expiryDays:s.expiryDays,startedAt:s[t(437)],tenantId:a}),void 0!==u&&(c[t(426)]=u),this[t(430)]&&(c.fallbackClientId=this[t(433)]),(null===(n=this[t(528)][t(500)])||void 0===n?void 0:n[t(358)])&&(c[t(358)]=this[t(528)][t(500)][t(358)]),this[t(511)]=ye[t(411)][t(441)](t(514),Object[t(478)](c)[t(492)]>0?c:void 0),this[t(493)][t(447)](this.cryptoBinding),this.deviceDataManager=new Ue(this[t(524)],this[t(435)],this.cryptoBinding,this.agenticActive),this[t(532)]=new Co(this[t(435)]),this[t(470)]=new bn(this.configManager,this[t(524)],this.deviceDataManager,this[t(510)],this.identityManager,this.agenticSignalsManager,this[t(511)],this[t(528)].serverPath,this[t(522)],this[t(376)]),this[t(355)]&&!this[t(356)]&&this.eventsManager.standDown(),this[t(356)]&&(this[t(489)]=new zo(this[t(435)],this[t(524)],(e=>this[t(439)][t(409)](e)),((e,r)=>this[t(498)](e,r))),this[t(470)][t(538)]((e=>this[t(489)].onInteraction(e)))),null!==this.disabledReason)return!1;const l=this.configManager.getConfValue(ni,void 0);if(!l)return this.disabledReason=t(void 0===l?551:527),!1;if(this[t(541)]=this[t(541)]||this[t(435)][t(464)](ai,!1),this[t(541)]&&this[t(436)]&&await this[t(485)][t(420)](this[t(436)]),Te[t(396)]=Te[t(396)]||!!this[t(435)][t(464)]("verbose",!1),this[t(376)]!==t(362))if(this[t(355)]&&!this.agenticActive)Te[t(455)](t(372));else{if(this[t(356)]&&this[t(482)](),this[t(356)]&&!this.standDownCalled){const e=null!==(i=null===(o=this[t(489)])||void 0===o?void 0:o[t(521)])&&void 0!==i?i:0;e>0&&(this.startTrafficWatch(),await new Promise((t=>setTimeout(t,e))),this[t(482)]())}await this[t(470)].sendDeviceDataEvent()[t(545)]((()=>{})),await this[t(470)][t(363)]()[t(545)]((()=>{})),await this[t(384)](r)[t(545)]((()=>{})),this[t(356)]&&!this.standDownCalled&&(this[t(378)](),this.lastCascadePath=window[t(388)][t(425)],this[t(463)]()),(!this[t(380)]||this.agenticCollect)&&this[t(470)].registerEventListeners(),await this.eventsManager[t(466)]().catch((()=>{}))}else Te[t(455)](t(518));return Te.info(t(490)),!0})(),await this[e(365)]}async[Ko(370)](){const t=Ko;if(null===this[t(365)])return!this[t(477)]&&(this[t(477)]=t(456)),!1;const e=await this[t(365)];return!e&&!this[t(477)]&&(this[t(477)]=t(531)),e}async triggerActionEvent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ko;var n,i;if(this[r(376)]===r(362))throw new Error(r(407));const a=Date[r(515)]();if(!await this[r(370)]())return Te[r(455)](r(540)),{actionToken:this[r(368)]("action")};if(!this[r(439)][r(409)](t))return Te[r(537)](r(438),{actionType:t}),{actionToken:Kr[r(476)]+"_error_'invalid action type - "+t+"'_"+a};this[r(356)]&&t!==No&&(null===(n=this[r(489)])||void 0===n||n[r(390)]());const s=null==e?void 0:e[r(450)];if(s&&!ci[r(409)](s))return Te[r(537)](r(543),{claimedUserIdType:s}),{actionToken:"invalid_claimed_user_id_type_"+s+"_"+a};let u;this[r(435)][r(464)](si,!1)&&(u=await this[r(534)][r(507)]());const c=this[r(532)][r(509)](),l=o({type:We[r(371)],attributes:o(o(o(o(o(o(o(o(o(o(o(o(o(o(o(o({action_type:t},(null==e?void 0:e.triggerSource)&&{trigger_source:e[r(533)]}),(null==e?void 0:e.agenticCountedInteractions)&&{agentic_counted_interactions:e.agenticCountedInteractions}),(null==e?void 0:e[r(513)])&&{correlation_id:e.correlationId}),(null==e?void 0:e[r(448)])&&{claimed_user_id:e.claimedUserId}),s&&{claimed_user_id_type:s}),(null==e?void 0:e[r(424)])&&{public_key:e[r(424)]}),(null==e?void 0:e[r(457)])&&{extension_metadata:e.extensionMetadata}),(null==e?void 0:e[r(453)])&&{extension_device_attributes:e[r(453)]}),(null==e?void 0:e[r(395)])&&{suspicious_signals:e.suspiciousSignals}),(null==e?void 0:e[r(412)])&&{suspicious_context:e[r(412)]}),(null==e?void 0:e[r(501)])&&{download_file:e[r(501)]}),(null==e?void 0:e[r(497)])&&{upload_file:e[r(497)]}),(null==e?void 0:e.transactionData)&&{transactionData:e.transactionData}),typeof globalThis!==r(393)&&(null===(i=globalThis.__UNIFIED_SDK_VERSIONS__)||void 0===i?void 0:i[r(544)])&&{platform_sdk_version:globalThis[r(405)][r(544)]}),u),c&&{aiAgentSignals:c})},(null==e?void 0:e[r(495)])&&{customAttributes:e[r(495)]});try{const t=await this[r(470)][r(410)](l),{actionToken:e}=t;if(!e)throw new rn(new Error(r(517)+("object"==typeof t?JSON.stringify(t)[r(506)](15):t)),Kr[r(476)]);return t}catch(e){return{actionToken:e instanceof rn?e[r(414)]===Kr[r(445)]?e[r(414)]+r(451)+t+"_"+e[r(520)]+"_'"+e[r(465)]+"'_"+a:e[r(414)]+r(451)+t+"_'"+e.message+"'_"+a:"unexpected_error_"+t+"_"+a}}}async updateUserId(t){const e=Ko;if(ti[e(409)](t))return Te[e(455)](e(467),{userId:t}),!1;t=t[e(494)](),Te.info(e(550),{userId:t});const r=this.identityManager[e(519)]();return r===t||(this[e(493)][e(474)](t),!!(await this[e(470)][e(410)]({type:We[e(460)],attributes:{previous_user_id:r,user_id:t}}))[e(386)])}async[Ko(399)](t){const e=Ko;return await this[e(370)]()?this[e(384)](t):(Te[e(455)](e(540)),!1)}async[Ko(415)](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Ko;if("lightweight"===this[n(376)])throw new Error("[Lightweight] reportActionResult() cannot be used in lightweight tier.");if(!await this[n(370)]())return Te[n(455)](n(540)),!1;if(!t||!e)return Te.warn("reportActionResult called without actionToken or result",{result:e}),!1;const i={type:We[n(440)],attributes:o(o(o({action_token:t,result_feedback:e},(null==r?void 0:r[n(481)])&&{challenge_type:r[n(481)]}),(null==r?void 0:r[n(549)])&&{user_id:r[n(549)]}),(null==r?void 0:r[n(539)])&&{privateUserIdentifier:r[n(539)]})};try{const t=await this[n(470)][n(410)](i);return typeof t===n(472)&&null!==t}catch(t){return Te[n(537)]("reportActionResult failed to send",{error:t}),!1}}async[Ko(382)](){const t=Ko;if(!await this[t(370)]())return Te[t(455)]("SDK disabled"),!1;const e=this[t(493)][t(519)]();return null!=e&&this[t(493)][t(546)](),!!(await this.eventsManager.emitEvent({type:We[t(460)],attributes:{previous_user_id:e}}))[t(386)]}async[Ko(444)](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;const r=Ko;if(this[r(376)]===r(362))throw new Error(r(421));if(!this[r(522)])throw new Error(r(462));return await this[r(370)]()?(this[r(493)].isTokenExpired()&&await this[r(470)][r(471)](),await this[r(493)][r(444)]({actionType:t,expirationSeconds:e})||this.generateDisabledToken(r(353))):(Te[r(455)](r(540)),this[r(368)]("session"))}}const di=li;function hi(){const t=["[Lightweight] SDK initialized in lightweight mode","apply","sdk init started","hasOwnClientId","18798RMaUCX","A standard SDK instance is already initialized","clientId","RiskID","configManager","firstPartyMigrationUrl","startedAt","Invalid action type","actions","EVENT_TYPE_ACTION_RESULT","createCryptoBinding","call","getSessionToken","getSecureSessionToken","SERVER","pushState","setCryptoBinding","claimedUserId","account_id","claimedUserIdType","_error_","enableIdentifiersMigration","extensionDeviceAttributes","[Lightweight] clearQueue() can only be used in lightweight tier","info","init_not_called","extensionMetadata","lastCascadePath","spaRouteHooksRegistered","EVENT_TYPE_IDENTIFICATION","initialize","Session token is not enabled","registerSpaRouteHooks","getConfValue","message","flush","identifyUser called without a valid userid","setAttribute","verbose","eventsManager","refreshSessionToken","object","4906112qTSsVa","setUserId","agenticInitStartedAt","CLIENT","disabledReason","keys","[Lightweight] getSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.","phone_number","challengeType","runDetectionCascade","standard","dispatchEvent","migrationsManager","enableDeviceAttributesInActions","isMobileForAgentic","setDeviceId","agenticManager","sdk init done","22657392FSLjnb","length","identityManager","toString","customAttributes","agentic kill switch active: agentic functionality suppressed","uploadFile","triggerActionEvent","detected","cryptoBindingConfig","downloadFile","serverPath","[Lightweight] Setting deviceId from backend","isTokenExpired","[Lightweight] deviceId must be a non-empty string","slice","getDeviceData","__tsDrsHistoryPatched","getSnapshot","requestsManager","cryptoBinding","9482232LUnhiE","correlationId","sign","now","logsReporter","Unhandled SDK error. Received eventResponse: ","[Lightweight] Skipping auto-event collection and event listeners","getUserId","errorCode","publishGraceMs","enableSessionToken","RiskIDReady","storageManager","mainEntry","invalid_params","config_disabled","options","agentic inert: mobile web is not supported","700EPWGln","init_failed","agenticSignalsManager","triggerSource","deviceDataManager","load","addEventListener","warn","setInteractionObserver","privateUserIdentifier","SDK disabled","identifiersMigrationEnabled","1305123NoagIB","Invalid claimedUserIdType","unified-platform","catch","removeUserId","email","TSAccountProtection","userId","identifyUser","missing_config","serverPath is required","refreshConf","session","validationManager","agenticCollect","agenticActive","tenantId","keyScope","1933442DvxnUQ","disabled_sdk_","keyRotation","lightweight","sendPageLoadEvent","standardInitListenerRegistered","initializationPromise","agenticKillSwitch","standDown","generateDisabledToken","__tsAccountProtection","isInitialized","EVENT_TYPE_ACTION","agentic instance killed by kill switch — no publish, no collection","validateSDKParams","drivers_license_number","string","tier","popstate","startTrafficWatch","resolveAgenticActive","standDownCalled","7ydEABX","clearUser","locationchange","updateUserId","trim","deviceId","isEnabled","location","currentScript","resetCounterOnRealAction","trafficWatchStarted","signal","undefined","agentic inert: another agentic instance already registered","suspiciousSignals","enabled","[Lightweight] getPayload() can only be used in lightweight tier","national_id","setAuthenticatedUser","agentic stand-down: another DRS instance covers this page","TSAccountProtectionReady","replaceState","other","802743NBUbZK","__UNIFIED_SDK_VERSIONS__","registry","[Lightweight] triggerActionEvent() cannot be used in lightweight tier. Use getPayload() instead.","ssn","includes","emitEvent","crypto","suspiciousContext","getClientId","errorSpace","reportActionResult","clearQueue","sdkEnabled","init","getPayload","migrateIdentifiers","[Lightweight] getSecureSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.","passport_number","getActions","publicKey","pathname","idbWriteTimeoutMs"];return(hi=function(){return t})()}if(ei){ei[Ko(369)]=li;try{null===(Jo=($o=ei)[Ko(468)])||void 0===Jo||Jo[Ko(442)]($o,Xo,"")}catch(t){}}document[Ko(484)](new CustomEvent(Ko(401),{detail:{TSAccountProtection:li}}));const fi=gi;!function(){const t=gi,e=mi();for(;;)try{if(596765==-parseInt(t(166))/1*(-parseInt(t(174))/2)+-parseInt(t(170))/3+parseInt(t(157))/4+-parseInt(t(179))/5*(-parseInt(t(159))/6)+-parseInt(t(173))/7+parseInt(t(163))/8+-parseInt(t(165))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let pi=null;function gi(t,e){return t-=156,mi()[t]}function mi(){const t=["triggerActionEvent","6150347UMnytJ","829030kXiMoY","reportActionResult","getPayload","flush","clientId","702775wSNffb","moduleMetadata","getDeviceId","setDeviceId","events","3763668RBWwlj","utils","30GcThja","setAuthenticatedUser","identityManager","getActions","2879456inEbPs","getSessionToken","4400181ztsyEa","1FnjTJX","not_initialized","getSecureSessionToken","MODULE_INITIALIZED","1361532FgZHiT","getClientId"];return(mi=function(){return t})()}ye[fi(156)].on(ye[fi(156)][fi(169)],(()=>{const t=fi,{clientId:e,drs:r,cryptoBindingConfig:n}=ye[t(180)].getInitConfig(),i=r||{},{enabled:a,userId:s,serverPath:u}=i,c=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(i,pe);if(!1===a)return;const l=(null==r?void 0:r[t(178)])||e,d=!!(null==r?void 0:r.clientId);pi=new li(l,o(o({},c),{},{hasOwnClientId:d,serverPath:u,cryptoBindingConfig:n})),pi.init({userId:s})}));const wi=function(){const t=fi;return function(t){const e=fi;if(!t)throw new(ye[e(158)].exceptions.TsError)(e(167),"tsPlatform not initialized")}(pi),pi[t(164)]()};class yi extends Error{constructor(t,e,r){super(r),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const vi={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var _i,Ei,bi,Ai;!function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(_i||(_i={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(Ei||(Ei={})),function(t){var e,r;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(r=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",r.DOCUMENT_EXPIRED="document_expired",r.DOCUMENT_NOT_SUPPORTED="document_not_supported",r.DOCUMENT_DAMAGED="document_damaged",r.POOR_IMAGE_QUALITY="poor_image_quality",r.DOCUMENT_NOT_FOUND="document_not_found",r.OBSTRUCTED="obstructed",r.BLUR="blur",r.GLARE="glare",r.DOCUMENT_NOT_MATCHING="document_not_matching",r.WRONG_DOCUMENT_SIDE="wrong_document_side",r.FACE_NOT_FOUND="face_not_found",r.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",r.INVALID_INPUT="invalid_input",r.MULTI_FACE="multi_face",r.FACE_ROTATED="face_rotated",r.FACE_TOO_SMALL="face_too_small",r.FACE_TOO_CLOSE="face_too_close",r.CLOSED_EYES="closed_eyes",r.FACE_ANGLE_TOO_LARGE="face_angle_too_large",r.FACE_CLOSE_TO_BORDER="face_close_to_border",r.FACE_OCCLUDED="face_occluded",r.FACE_CROPPED="face_cropped",r.BARCODE_NOT_FOUND="barcode_not_found",r.GLARE_SELFIE="glare_selfie",r.BLUR_SELFIE="blur_selfie",r.NO_FACE="no_face",r.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(bi||(bi={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(Ai||(Ai={}));var Ci="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ii=[],Si=[],Ti="undefined"!=typeof Uint8Array?Uint8Array:Array,Di=!1;function Oi(){Di=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Ii[e]=t[e],Si[t.charCodeAt(e)]=e;Si["-".charCodeAt(0)]=62,Si["_".charCodeAt(0)]=63}function Ri(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Ii[(o=n)>>18&63]+Ii[o>>12&63]+Ii[o>>6&63]+Ii[63&o]);return i.join("")}function Mi(t){var e;Di||Oi();for(var r=t.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(Ri(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],o+=Ii[e>>2],o+=Ii[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=Ii[e>>10],o+=Ii[e>>4&63],o+=Ii[e<<2&63],o+="="),i.push(o),i.join("")}function Ni(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?o-1:0,h=r?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)}function ki(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*g}var Pi={}.toString,xi=Array.isArray||function(t){return"[object Array]"==Pi.call(t)};function Bi(){return Li.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Fi(t,e){if(Bi()<e)throw new RangeError("Invalid typed array length");return Li.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Li.prototype:(null===t&&(t=new Li(e)),t.length=e),t}function Li(t,e,r){if(!(Li.TYPED_ARRAY_SUPPORT||this instanceof Li))return new Li(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Vi(this,t)}return zi(this,t,e,r)}function zi(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Li.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Li.prototype:t=Hi(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!Li.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Wi(e,r);t=Fi(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(Gi(e)){var r=0|ji(e.length);return 0===(t=Fi(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Fi(t,0):Hi(t,e);if("Buffer"===e.type&&xi(e.data))return Hi(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Ui(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Vi(t,e){if(Ui(e),t=Fi(t,e<0?0:0|ji(e)),!Li.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Hi(t,e){var r=e.length<0?0:0|ji(e.length);t=Fi(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function ji(t){if(t>=Bi())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bi().toString(16)+" bytes");return 0|t}function Gi(t){return!(null==t||!t._isBuffer)}function Wi(t,e){if(Gi(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ya(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return va(t).length;default:if(n)return ya(t).length;e=(""+e).toLowerCase(),n=!0}}function Xi(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return sa(this,e,r);case"utf8":case"utf-8":return na(this,e,r);case"ascii":return ia(this,e,r);case"latin1":case"binary":return aa(this,e,r);case"base64":return ra(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ua(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Yi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function qi(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=Li.from(e,n)),Gi(e))return 0===e.length?-1:Zi(t,e,r,n,o);if("number"==typeof e)return e&=255,Li.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Zi(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Zi(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function Ki(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function $i(t,e,r,n){return _a(ya(e,t.length-r),t,r,n)}function Ji(t,e,r,n){return _a(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function Qi(t,e,r,n){return Ji(t,e,r,n)}function ta(t,e,r,n){return _a(va(e),t,r,n)}function ea(t,e,r,n){return _a(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function ra(t,e,r){return 0===e&&r===t.length?Mi(t):Mi(t.slice(e,r))}function na(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=d}return function(t){var e=t.length;if(e<=oa)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=oa));return r}(n)}Li.TYPED_ARRAY_SUPPORT=void 0===Ci.TYPED_ARRAY_SUPPORT||Ci.TYPED_ARRAY_SUPPORT,Bi(),Li.poolSize=8192,Li._augment=function(t){return t.__proto__=Li.prototype,t},Li.from=function(t,e,r){return zi(null,t,e,r)},Li.TYPED_ARRAY_SUPPORT&&(Li.prototype.__proto__=Uint8Array.prototype,Li.__proto__=Uint8Array),Li.alloc=function(t,e,r){return function(t,e,r,n){return Ui(e),e<=0?Fi(t,e):void 0!==r?"string"==typeof n?Fi(t,e).fill(r,n):Fi(t,e).fill(r):Fi(t,e)}(null,t,e,r)},Li.allocUnsafe=function(t){return Vi(null,t)},Li.allocUnsafeSlow=function(t){return Vi(null,t)},Li.isBuffer=function(t){return null!=t&&(!!t._isBuffer||Ea(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Ea(t.slice(0,0))}(t))},Li.compare=function(t,e){if(!Gi(t)||!Gi(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},Li.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Li.concat=function(t,e){if(!xi(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Li.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Li.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!Gi(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},Li.byteLength=Wi,Li.prototype._isBuffer=!0,Li.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Yi(this,e,e+1);return this},Li.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Yi(this,e,e+3),Yi(this,e+1,e+2);return this},Li.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Yi(this,e,e+7),Yi(this,e+1,e+6),Yi(this,e+2,e+5),Yi(this,e+3,e+4);return this},Li.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?na(this,0,t):Xi.apply(this,arguments)},Li.prototype.equals=function(t){if(!Gi(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Li.compare(this,t)},Li.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Li.prototype.compare=function(t,e,r,n,o){if(!Gi(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},Li.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},Li.prototype.indexOf=function(t,e,r){return qi(this,t,e,r,!0)},Li.prototype.lastIndexOf=function(t,e,r){return qi(this,t,e,r,!1)},Li.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return Ki(this,t,e,r);case"utf8":case"utf-8":return $i(this,t,e,r);case"ascii":return Ji(this,t,e,r);case"latin1":case"binary":return Qi(this,t,e,r);case"base64":return ta(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ea(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Li.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var oa=4096;function ia(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function aa(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function sa(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=wa(t[i]);return o}function ua(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function ca(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function la(t,e,r,n,o,i){if(!Gi(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function da(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function ha(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function fa(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function pa(t,e,r,n,o){return o||fa(t,0,r,4),ki(t,e,r,n,23,4),r+4}function ga(t,e,r,n,o){return o||fa(t,0,r,8),ki(t,e,r,n,52,8),r+8}Li.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),Li.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=Li.prototype;else{var o=e-t;r=new Li(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},Li.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||ca(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},Li.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||ca(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},Li.prototype.readUInt8=function(t,e){return e||ca(t,1,this.length),this[t]},Li.prototype.readUInt16LE=function(t,e){return e||ca(t,2,this.length),this[t]|this[t+1]<<8},Li.prototype.readUInt16BE=function(t,e){return e||ca(t,2,this.length),this[t]<<8|this[t+1]},Li.prototype.readUInt32LE=function(t,e){return e||ca(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Li.prototype.readUInt32BE=function(t,e){return e||ca(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Li.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||ca(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},Li.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||ca(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},Li.prototype.readInt8=function(t,e){return e||ca(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Li.prototype.readInt16LE=function(t,e){e||ca(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Li.prototype.readInt16BE=function(t,e){e||ca(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Li.prototype.readInt32LE=function(t,e){return e||ca(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Li.prototype.readInt32BE=function(t,e){return e||ca(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Li.prototype.readFloatLE=function(t,e){return e||ca(t,4,this.length),Ni(this,t,!0,23,4)},Li.prototype.readFloatBE=function(t,e){return e||ca(t,4,this.length),Ni(this,t,!1,23,4)},Li.prototype.readDoubleLE=function(t,e){return e||ca(t,8,this.length),Ni(this,t,!0,52,8)},Li.prototype.readDoubleBE=function(t,e){return e||ca(t,8,this.length),Ni(this,t,!1,52,8)},Li.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||la(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},Li.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||la(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},Li.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,1,255,0),Li.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Li.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,2,65535,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):da(this,t,e,!0),e+2},Li.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,2,65535,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):da(this,t,e,!1),e+2},Li.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,4,4294967295,0),Li.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):ha(this,t,e,!0),e+4},Li.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,4,4294967295,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ha(this,t,e,!1),e+4},Li.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);la(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},Li.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);la(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},Li.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,1,127,-128),Li.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Li.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,2,32767,-32768),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):da(this,t,e,!0),e+2},Li.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,2,32767,-32768),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):da(this,t,e,!1),e+2},Li.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,4,2147483647,-2147483648),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ha(this,t,e,!0),e+4},Li.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||la(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ha(this,t,e,!1),e+4},Li.prototype.writeFloatLE=function(t,e,r){return pa(this,t,e,!0,r)},Li.prototype.writeFloatBE=function(t,e,r){return pa(this,t,e,!1,r)},Li.prototype.writeDoubleLE=function(t,e,r){return ga(this,t,e,!0,r)},Li.prototype.writeDoubleBE=function(t,e,r){return ga(this,t,e,!1,r)},Li.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!Li.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},Li.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Li.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=Gi(t)?t:ya(new Li(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var ma=/[^+\/0-9A-Za-z-_]/g;function wa(t){return t<16?"0"+t.toString(16):t.toString(16)}function ya(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function va(t){return function(t){var e,r,n,o,i,a;Di||Oi();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Ti(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=Si[t.charCodeAt(e)]<<18|Si[t.charCodeAt(e+1)]<<12|Si[t.charCodeAt(e+2)]<<6|Si[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=Si[t.charCodeAt(e)]<<2|Si[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=Si[t.charCodeAt(e)]<<10|Si[t.charCodeAt(e+1)]<<4|Si[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ma,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function _a(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Ea(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}const ba=t=>null!=t,Aa=t=>"string"==typeof t,Ca=t=>Aa(t)&&""!==t,Ia=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),Sa=t=>t instanceof FormData,Ta=t=>{const e=[],r=(t,n)=>{ba(n)&&(Array.isArray(n)?n.forEach((e=>{r(t,e)})):"object"==typeof n?Object.entries(n).forEach((e=>{let[n,o]=e;r(`${t}[${n}]`,o)})):((t,r)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(r))}`)})(t,n))};return Object.entries(t).forEach((t=>{let[e,n]=t;r(e,n)})),e.length>0?`?${e.join("&")}`:""},Da=async(t,e)=>"function"==typeof e?e(t):e,Oa=async(t,e)=>{const r=await Da(e,t.TOKEN),n=await Da(e,t.USERNAME),i=await Da(e,t.PASSWORD),a=await Da(e,t.HEADERS),s=Object.entries(o(o({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,r]=t;return ba(r)})).reduce(((t,e)=>{let[r,n]=e;return o(o({},t),{},{[r]:String(n)})}),{});if(Ca(r)&&(s.Authorization=`Bearer ${r}`),Ca(n)&&Ca(i)){const t=(t=>{try{return btoa(t)}catch(e){return Li.from(t).toString("base64")}})(`${n}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Ia(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Aa(e.body)?s["Content-Type"]="text/plain":Sa(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},Ra=(t,e)=>new Promise((async(r,n)=>{try{const n=((t,e)=>{const r=t.ENCODE_PATH||encodeURI,n=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,n)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(n))?r(String(e.path[n])):t})),o=`${t.BASE}${n}`;return e.query?`${o}${Ta(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,r=(t,r)=>{Aa(r)||Ia(r)?e.append(t,r):e.append(t,JSON.stringify(r))};return Object.entries(t.formData).filter((t=>{let[e,r]=t;return ba(r)})).forEach((t=>{let[e,n]=t;Array.isArray(n)?n.forEach((t=>r(e,t))):r(e,n)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Aa(t.body)||Ia(t.body)||Sa(t.body)?t.body:JSON.stringify(t.body)})(e),s=await Oa(t,e),u=await(async(t,e,r,n,o,i)=>{const a=new AbortController,s={headers:i,body:null!=n?n:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),await fetch(r,s)})(t,e,n,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const r=t.headers.get(e);if(Aa(r))return r}})(u,e.responseHeader),d={url:n,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var r,n;const i=o({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new yi(t,e,i);if(!e.ok){const o=null!==(r=e.status)&&void 0!==r?r:"unknown",i=null!==(n=e.statusText)&&void 0!==n?n:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new yi(t,e,`Generic Error: status: ${o}; status text: ${i}; body: ${a}`)}})(e,d),r(d)}catch(t){n(t)}})),Ma=new t("idv"),Na=Symbol(),ka=Symbol(),Pa="verify-id-sdk";function xa(t){return sessionStorage.getItem(t)}const Ba=new Map;function Fa(t,e){const r=Ba.get(t);Ma.events.emit(r,e)}function La(t){Fa(Na,t)}function za(t,e){La({type:"session-id-acquired",step:t,sessionId:e})}function Ua(t,e,r,n,o){La({type:"verification-result",status:e,step:t,state:n,callbackUrl:o,sessionId:r})}function Va(t,e){La({type:"capture-error",errorCode:e,step:t})}function Ha(t,e,r){La({type:"api-request-error",errorCode:e,step:t,error:r})}function ja(t,e){return Ra(vi,t).catch((r=>(t.url.endsWith("/events")||Ha(e,"request-error",r.message),Promise.reject(r))))}async function Ga(t,e){var r;const n=await function(t,e){const r=vi.HEADERS;return vi.HEADERS=void 0,ja({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}${e?`&lang=${encodeURIComponent(e)}`:""}`},"init").finally((()=>{vi.HEADERS=r}))}(t,e);return{autocapture_settings:null!==(r=n.body.autocapture_settings)&&void 0!==r?r:void 0,autocapture_enabled:n.body.autocapture_enabled,strings:n.body.strings,capture_approval_settings:n.body.capture_approval_settings}}Ba.set(Na,Na),Ba.set(ka,ka);var Wa={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)},setCaptureApprovalSettings(t,e){t.commit("setCaptureApprovalSettings",e)},setFlowType(t,e){t.commit("setFlowType",e)}},Xa={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t),setCaptureApprovalSettings:(t,e)=>(t.captureApprovalSettings=e,t),setFlowType:(t,e)=>(t.flowType=e,t)};const Ya=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,r,n){return t[r]=n,Fa(ka,{key:r,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(r)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const r=this.mutations[t](this.state,e);return this.state=r,!0}}({actions:Wa,mutations:Xa,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var qa;function Za(t){const e=[],r=function(t){var e,r,n,o;const i=t.stats.get(qa.BLUR_DETECTION),a=t.stats.get(qa.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=Ja(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(r=null==i?void 0:i.countSuccess)&&void 0!==r?r:null==a?void 0:a.countSuccess;return{name:$a(qa.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);r&&e.push(r);const n=function(t){var e,r;const n=t.stats.get(qa.FACE_DETECTION),o=t.stats.get(qa.FACE_POSITION);if(!n||0===n.durations.length)return;const i=Ja(n.durations);return{name:$a(qa.FACE_DETECTION),count_success:null!==(e=null==o?void 0:o.countSuccess)&&void 0!==e?e:n.countSuccess,count_failure:n.countFailed+(null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0),avg_duration:i.duration_avg,std_duration:i.duration_std}}(t);n&&e.push(n);for(const[r,n]of t.stats.entries())r!==qa.BLUR_DETECTION&&r!==qa.GLARE_DETECTION&&r!==qa.FACE_DETECTION&&r!==qa.FACE_POSITION&&n.durations.length>0&&e.push(Ka(n,r));return t.frameHandleDurations.length>0&&e.push(function(t){const e=Ja(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function Ka(t,e){const r=Ja(t.durations);return{name:$a(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:r.duration_avg,std_duration:r.duration_std}}function $a(t){switch(t){case qa.BLUR_DETECTION:case qa.GLARE_DETECTION:return"blur_glare_detector";case qa.DOCUMENT_DETECTION:return"doc_detector";case qa.DOCUMENT_POSITION:return"frame_detector";case qa.BARCODE_DETECTION:return"barcode_detector";case qa.FACE_DETECTION:case qa.FACE_POSITION:return"face_detector";default:return t}}function Ja(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const r=t.length,n=t.reduce(((t,e)=>t+e),0)/r;let o=0;for(let e=0;e<r;e++){const r=t[e];o+=Math.pow(r-n,2)}const i=Math.sqrt(o/(r-1));return{duration_avg:Math.round(n),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position"}(qa||(qa={}));var Qa={},ts={get exports(){return Qa},set exports(t){Qa=t}};!function(t,e){!function(r,n){var o="function",i="undefined",a="object",s="string",u="major",c="model",l="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",w="tablet",y="smarttv",v="wearable",_="embedded",E="Amazon",b="Apple",A="ASUS",C="BlackBerry",I="Browser",S="Chrome",T="Firefox",D="Google",O="Huawei",R="LG",M="Microsoft",N="Motorola",k="Opera",P="Samsung",x="Sharp",B="Sony",F="Xiaomi",L="Zebra",z="Facebook",U="Chromium OS",V="Mac OS",H=" Browser",j=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},G=function(t,e){return typeof t===s&&-1!==W(e).indexOf(W(t))},W=function(t){return t.toLowerCase()},X=function(t,e){if(typeof t===s)return t=t.replace(/^\s\s*/,""),typeof e===i?t:t.substring(0,500)},Y=function(t,e){for(var r,i,s,u,c,l,d=0;d<e.length&&!c;){var h=e[d],f=e[d+1];for(r=i=0;r<h.length&&!c&&h[r];)if(c=h[r++].exec(t))for(s=0;s<f.length;s++)l=c[++i],typeof(u=f[s])===a&&u.length>0?2===u.length?typeof u[1]==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):n:this[u[0]]=l?u[1].call(this,l,u[2]):n:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):n):this[u]=l||n;d+=2}},q=function(t,e){for(var r in e)if(typeof e[r]===a&&e[r].length>0){for(var o=0;o<e[r].length;o++)if(G(e[r][o],t))return"?"===r?n:r}else if(G(e[r],t))return"?"===r?n:r;return e.hasOwnProperty("*")?e["*"]:t},Z={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,k+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,k+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,k]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/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)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+I]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+I],f],[/\bfocus\/([\w\.]+)/i],[f,[l,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,k+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,k+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[f,[l,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,P+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,z],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,S+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,T+" 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,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,W]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,W]]],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],[c,[h,P],[d,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,P],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,b],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,b],[d,w]],[/(macintosh);/i],[c,[h,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,x],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,O],[d,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,O],[d,m]],[/\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],[[c,/_/g," "],[h,F],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,F],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,N],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,N],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,R],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,R],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,D],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,D],[d,m]],[/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],[c,[h,B],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,B],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,E],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,E],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,A],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,A],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/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],[c,[h,"TCL"],[d,w]],[/(itel) ((\w+))/i],[[h,W],c,[d,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[h,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/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],[h,c,[d,w]],[/(surface duo)/i],[c,[h,M],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,M],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,L],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,L],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,y]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,P],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,R],[d,y]],[/(apple) ?tv/i],[h,[c,b+" TV"],[d,y]],[/crkey/i],[[c,S+"cast"],[h,D],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,E],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,x],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,B],[d,y]],[/(mitv-\w{5}) bui/i],[c,[h,F],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,X],[c,X],[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,B],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,M],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,P],[d,v]],[/((pebble))app/i],[h,c,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,b],[d,v]],[/droid.+; (glass) \d/i],[c,[h,D],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,L],[d,v]],[/(quest( \d| pro)?)/i],[c,[h,z],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/(aeobc)\b/i],[c,[h,E],[d,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[f,q,Z]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,q,Z],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,U],f],[/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) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},$=function(t,e){if(typeof t===a&&(e=t,t=n),!(this instanceof $))return new $(t,e).getResult();var g=typeof r!==i&&r.navigator?r.navigator:n,y=t||(g&&g.userAgent?g.userAgent:""),v=g&&g.userAgentData?g.userAgentData:n,_=e?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(K,e):K,E=g&&g.userAgent==y;return this.getBrowser=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,_.browser),t[u]=function(t){return typeof t===s?t.replace(/[^\d\.]/g,"").split(".")[0]:n}(t[f]),E&&g&&g.brave&&typeof g.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var t={};return t[p]=n,Y.call(t,y,_.cpu),t},this.getDevice=function(){var t={};return t[h]=n,t[c]=n,t[d]=n,Y.call(t,y,_.device),E&&!t[d]&&v&&v.mobile&&(t[d]=m),E&&"Macintosh"==t[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(t[c]="iPad",t[d]=w),t},this.getEngine=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,_.engine),t},this.getOS=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,_.os),E&&!t[l]&&v&&v.platform&&"Unknown"!=v.platform&&(t[l]=v.platform.replace(/chrome os/i,U).replace(/macos/i,V)),t},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 y},this.setUA=function(t){return y=typeof t===s&&t.length>500?X(t,500):t,this},this.setUA(y),this};$.VERSION="1.0.39",$.BROWSER=j([l,f,u]),$.CPU=j([p]),$.DEVICE=j([c,h,d,g,m,y,w,v,_]),$.ENGINE=$.OS=j([l,f]),t.exports&&(e=t.exports=$),e.UAParser=$;var J=typeof r!==i&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Q=new $;J.ua=Q.getResult(),J.ua.get=function(){return Q.getUA()},J.ua.set=function(t){Q.setUA(t);var e=Q.getResult();for(var r in e)J.ua[r]=e[r]}}}("object"==typeof window?window:i)}(ts,Qa);const es=new class{createUploadImageEvent(t,e,r,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(r),request_build_time_ms:String(n)}}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}async createCaptureStartEvent(t,e){var r,n,i;const a=await async function(){var t,e,r,n,o,i,a,s;const u=Qa.UAParser(),c={vendor:null===(t=u.device)||void 0===t?void 0:t.vendor,model:null===(e=u.device)||void 0===e?void 0:e.model,type:null===(r=u.device)||void 0===r?void 0:r.type,os:null===(n=u.os)||void 0===n?void 0:n.name,os_version:null===(o=u.os)||void 0===o?void 0:o.version,browser:null===(i=u.browser)||void 0===i?void 0:i.name,browser_version:null===(a=u.browser)||void 0===a?void 0:a.version},l=navigator.userAgentData;if(!l)return c;try{const t=await l.getHighEntropyValues(["model","platformVersion","fullVersionList"]);t.model&&(c.model=t.model),l.platform&&(c.os=l.platform),t.platformVersion&&(c.os_version=t.platformVersion);const e=(null!==(s=t.fullVersionList)&&void 0!==s?s:[]).find((t=>!t.brand.includes("Not")&&"Chromium"!==t.brand));e&&(c.browser=e.brand,c.browser_version=e.version)}catch(t){}return c}();return{event_type:"capture_start",capture_start_req:{page_name:t,autocapture_enabled:null!==(i=null===(n=null===(r=Ya.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==i&&i,camera:o({},e),device:a}}}createUserActionEvent(t,e,r,n){var o,i,a;const s={user_action_type:t,page_name:e,autocapture:!!r,autocapture_enabled:null!==(a=null===(i=null===(o=Ya.state)||void 0===o?void 0:o.autoCaptureSettings)||void 0===i?void 0:i.enabled)&&void 0!==a&&a};if(void 0!==n&&(s.retake_count=n),r){const t=Za(r);s.stats=t}return{event_type:"user_action",user_action_req:s}}createErrorEvent(t,e,r){return{event_type:"error",error_req:{error_name:e,error_description:t,step:r}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}},rs="1.6.6",ns=Qa.UAParser(),os=rs;function is(t,e){var r,n,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":os,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(r=null==ns?void 0:ns.os)||void 0===r?void 0:r.name,"ts-os-version":null===(n=null==ns?void 0:ns.os)||void 0===n?void 0:n.version,"ts-device-model":null===(o=null==ns?void 0:ns.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==ns?void 0:ns.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==ns?void 0:ns.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}async function as(t,e,r,n,o){r?(vi.HEADERS=is(n,e),await function(t,e,r){return ja({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},body:e},r)}(r,o,t)):console.error("cannot send event, sessionId or startToken is not set")}const ss=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${vi.BASE}/verify/api/v1/verification/${Ya.state.sessionId}/risk-session-token`,e=Ya.state.clientId,r=is(e,Ya.state.userToken);wi().then((e=>{Ma.http.httpPost(t,{session_token:e},null,r).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var r,n,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=es.createDrsInitFailureEvent(a,"init");as(null===(r=Ya.state)||void 0===r?void 0:r.step,null===(n=Ya.state)||void 0===n?void 0:n.userToken,null===(o=Ya.state)||void 0===o?void 0:o.sessionId,null===(i=Ya.state)||void 0===i?void 0:i.clientId,s).then((()=>{La({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function us(t,e,r){const n=es.createErrorEvent(t,e,r);await cs(r,n)}async function cs(t,e){var r,n,o,i,a;const s=null===(r=Ya.state)||void 0===r?void 0:r.userToken,u=(null===(n=Ya.state)||void 0===n?void 0:n.sessionId)||(null===(o=Ya.state)||void 0===o?void 0:o.startToken),c=null===(i=Ya.state)||void 0===i?void 0:i.clientId,l=(null===(a=Ya.state)||void 0===a?void 0:a.step)||t;await as(l,s,u,c,e)}const ls={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue",approve_button:"Approve",retake_button:"Retake"};const ds=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,r){return t[e]=r,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}translate(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==r[e]?r[e]:t}))}}(ls),hs={en:ls,es:{blur_message:"Favor enfoca la cámara en tú cédula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"Asegúrate de que la cédula esté completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"Asegúrate de utilizar una cédula valida",document_not_found_title:"Cédula no detectada",document_not_matching_message:"Favor Asegúrate de capturar la parte trasera de tu cédula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cédula",document_not_supported_title:"Cédula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cédula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cédula",obstructed_message:"Parte de la cédula documento no está visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"Escanéa tu cédula",page_header_face:"Reconocimiento Facial",second_title_document_back:"Asegúrate de poner su cédula en una superfice plana con la parte trasera visible.",second_title_document_face:"Asegúrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"Asegúrate de poner su cédula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cédula ha sido detectado",wrong_document_side_title:"Lado de tu cédula incorrecto",face_angle_too_large_title:"Tu rostro no está directamente alineado con la cámara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro está demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegúrate de que todo tu rostro esté dentro del marco.",face_too_small_title:"Tu rostro está demasiado lejos del borde.",face_too_small_message:"Por favor, acércate más a la cámara para que tu rostro esté más claro y sea más fácil de detectar.",face_too_close_title:"Tu rostro está demasiado cerca",face_too_close_message:"Acomode la posición y asegúrese de que toda su rostro esté dentro del marco.",face_cropped_title:"Tu rostro está parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegúrate de que todo tu rostro esté dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acércate más a la cámara o ajusta tu posición para que tu rostro esté más claro y sea más fácil de detectar.",multi_face_title:"Se detectaron múltiples rostros.",multi_face_message:"Por favor, asegúrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato está fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque más claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro está parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro está fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque más claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegúrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegúrese de que esté completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"¡Prepárate! Tu selfie se capturará automáticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"¡Buen trabajo! Aprueba tu selfie para continuar",approve_button:"Aprobar",retake_button:"Volver a tomar"},pt:{blur_message:"Por favor, foque a câmera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento válido emitido pelo governo",document_not_found_title:"Documento não detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento não suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto não esteja coberto e esteja totalmente visível",face_not_found_title:"Rosto não detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estão encobertas ou ausentes",obstructed_title:"Informações incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfície sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfície sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto não está diretamente alinhado com a câmera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_close_to_border_title:"Seu rosto está muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto está muito longe da borda.",face_too_small_message:"Aproxime-se da câmera para que seu rosto fique mais claro e fácil de detectar.",face_too_close_title:"Seu rosto está muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto está parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto não encontrado..",no_face_message:"Aproxime-se da câmera ou ajuste sua posição para que seu rosto fique mais claro e fácil de detectar.",multi_face_title:"Vários rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visível no quadro para continuar.",blur_selfie_title:"O autorretrato está fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexão em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estão fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto está parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_rotated_title:"Seu rosto está fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que não há reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que está totalmente dentro da moldura de captura para uma imagem nítida",second_title_face_autocapture:"Prepare-se! Sua selfie será capturada automaticamente, ou toque para capturá-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ótimo trabalho! Aprove sua selfie para continuar",approve_button:"Aprovar",retake_button:"Tirar novamente"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une pièce d’identité valide délivrée par le gouvernement",document_not_found_title:"Document non détecté",document_not_matching_message:"Veillez à capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre pièce d’identité délivrée par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entièrement visible",face_not_found_title:"Visage non détecté",glare_message:"Évitez la lumière directe qui pourrait se refléter sur le document",glare_title:"Reflet détecté",main_title_document_back:"Verso",main_title_document_face:"Égoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez réessayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"Numériser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais côté du document a été détecté",wrong_document_side_title:"Mauvais côté du document détecté",face_angle_too_large_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_close_to_border_title:"Votre visage est trop près du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop éloigné du bord",face_too_small_message:"Veuillez vous rapprocher de la caméra pour que votre visage soit plus clair et plus facile à détecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rogné",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la caméra ou ajuster votre position pour que votre visage soit plus clair et plus facile à détecter",multi_face_title:"Plusieurs visages détectés",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure détection",glare_selfie_title:"Trop de reflets sur votre égoportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur éclairage et sans reflet pour une détection précise",closed_eyes_title:"Il semble que vos yeux soient fermés.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement caché.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_rotated_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",barcode_not_found_title:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",barcode_not_found_message:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumière avant de réessayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entièrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"Préparez-vous! Votre selfie sera capturé automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer",approve_button:"Approuver",retake_button:"Reprendre"}};const fs=function(){var t,e;(null===(e=null===(t=Ya.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)};var ps;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(ps||(ps={}));var gs,ms,ws=(gs=function(t,e){return gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},gs(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}gs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ys=function(t){function e(e,r){var n,o,i,a=this.constructor,s=t.call(this,e,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,o=a.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return ws(e,t),e}(Error),vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_s=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return vs(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(ys),Es=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Es(e,t),e.kind="ArgumentException",e}(_s),As=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return As(e,t),e.kind="IllegalArgumentException",e}(_s),Is=function(){function t(t){if(this.binarizer=t,null===t)throw new Cs("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Ss=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(_s),Ds=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),Os=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Rs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ms=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rs(e,t),e.kind="IndexOutOfBoundsException",e}(_s),Ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ks=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Ns(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Ms),Ps=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xs=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Cs("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new ks(e);if(r>t)throw new ks(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=Ps(t),i=o.next();!i.done;i=o.next()){n=31*n+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return Os.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Bs=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Fs=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);Os.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return!!(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Bs.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Bs.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Cs;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Cs;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Cs("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Cs("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&xs.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+xs.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)7&e||(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,r=this.size;e<r;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(ms||(ms={}));var Ls,zs=ms,Us=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Us(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(_s),Hs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(Ls||(Ls={}));var js,Gs=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=Hs(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new Vs("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new Vs("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new Vs("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Ls.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Ls.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Ls.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Ls.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Ls.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Ls.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Ls.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Ls.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Ls.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Ls.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Ls.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Ls.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Ls.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Ls.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Ls.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Ls.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Ls.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Ls.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Ls.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Ls.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Ls.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Ls.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Ls.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Ls.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Ls.Big5,28,"Big5"),t.GB18030=new t(Ls.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Ls.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),Ws=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ws(e,t),e.kind="UnsupportedOperationException",e}(_s),Ys=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof Gs?t:Gs.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(Gs.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Xs("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(Gs.UTF8)||t.equals(Gs.ISO8859_1)||t.equals(Gs.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),qs=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return Ys.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(zs.CHARACTER_SET))return r.get(zs.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,w=0,y=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],v=0;v<n&&(o||i||a);v++){var _=255&e[v];a&&(s>0?128&_?s--:a=!1:128&_&&(64&_?(s++,32&_?(s++,16&_?(s++,8&_?a=!1:l++):c++):u++):a=!1)),o&&(_>127&&_<160?o=!1:_>159&&(_<192||215===_||247===_)&&w++),i&&(d>0?_<64||127===_||_>252?i=!1:d--:128===_||160===_||_>239?i=!1:_>160&&_<224?(h++,p=0,++f>g&&(g=f)):_>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(y||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*w>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}))},t.getBytes=function(t,e){return Ys.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=Gs.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=Gs.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=Gs.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Zs=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=qs.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),Ks=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Cs("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Cs("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Cs("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,o[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new Cs("illegal character encountered: "+e.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Cs("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return!!(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Cs("input matrix dimensions do not match");for(var e=new Fs(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),u=0;u<r;u++)n[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Cs("Left and top must be nonnegative");if(n<1||r<1)throw new Cs("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Cs("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new Fs(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){Os.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new Fs(t),n=new Fs(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<r;c++){var l=n[u*r+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;!(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;!(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&xs.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+xs.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new Zs,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),$s=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Js=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $s(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(_s),Qs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tu=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return Qs(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new Fs(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&r.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&r.set(s),c=l,l=d}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new Ks(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*r/5),l=Math.floor(r/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<n;a++){var f=a*r;for(l=0;l<r;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,u=0;for(a=0;a<r;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new Js;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(n-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Ds),eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ru=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return eu(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;n&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var u=e.calculateBlackPoints(i,a,s,n,o),c=new Ks(n,o);e.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<n;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,n-3),f=0;f<r;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,r-3),m=0,w=-2;w<=2;w++){var y=a[h+w];m+=y[g-2]+y[g-1]+y[g]+y[g+1]+y[g+2]}var v=m/25;e.thresholdBlock(t,p,d,v,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,u=n*i+r;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(r+c,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(n),c=0;c<n;c++){u[c]=new Int32Array(r);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<r;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,w=l*o+h;m<e.BLOCK_SIZE;m++,w+=o){for(var y=0;y<e.BLOCK_SIZE;y++){var v=255&t[w+y];f+=v,v<p&&(p=v),v>g&&(g=v)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,w+=o;m<e.BLOCK_SIZE;m++,w+=o)for(y=0;y<e.BLOCK_SIZE;y++)f+=255&t[w+y]}var _=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(_=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(_=E)}u[c][d]=_}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(tu),nu=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new Xs("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Xs("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Xs("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new Zs,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),iu=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return ou(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(nu),au=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),su=function(t){function e(r,n){void 0===n&&(n=!1);var o=t.call(this,r.width,r.height)||this;return o.canvas=r,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(r,n),o}return au(e,t),e.makeBufferFromCanvasImageData=function(t,r){void 0===r&&(r=!1);var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height,r)},e.toGrayscaleBuffer=function(t,r,n,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(r*n);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Cs("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=u,n.translate(s/2,u/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new iu(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(nu),uu=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),cu=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},lu=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},du=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hu=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return cu(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return lu(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=du(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return cu(this,void 0,void 0,(function(){return lu(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new uu(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return cu(this,void 0,void 0,(function(){var e;return lu(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return cu(this,void 0,void 0,(function(){return lu(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return cu(this,void 0,void 0,(function(){var r;return lu(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return cu(this,void 0,void 0,(function(){var r;return lu(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return cu(this,void 0,void 0,(function(){var r;return lu(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return cu(this,void 0,void 0,(function(){return lu(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return cu(this,void 0,void 0,(function(){var n;return lu(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return cu(this,void 0,void 0,(function(){var n;return lu(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return cu(this,void 0,void 0,(function(){var n;return lu(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return cu(this,void 0,void 0,(function(){var r;return lu(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return cu(this,void 0,void 0,(function(){return lu(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new bs("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new bs("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new bs("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new bs("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new bs("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new bs("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new bs("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new bs("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new bs("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new bs("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return cu(this,void 0,void 0,(function(){return lu(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return cu(this,void 0,void 0,(function(){return lu(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new Js("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(t){if(e&&t instanceof Js||(t instanceof Ts||t instanceof Vs)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Ts||t instanceof Vs||t instanceof Js)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var r=this.getCaptureCanvas(t),n=new su(r,e),o=new ru(n);return new Is(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),r=void 0;try{r=e.getContext("2d",{willReadFrequently:!0})}catch(t){r=e.getContext("2d")}this.captureCanvasContext=r}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),fu=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=Os.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?Os.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);Os.arraycopy(e,0,r,0,e.length),Os.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(js||(js={}));var pu,gu=js;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(pu||(pu={}));var mu,wu=pu,yu=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),vu=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Cs;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),_u=function(){function t(t,e){if(0===e.length)throw new Cs;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),Os.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=vu.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=vu.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Cs("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Os.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=vu.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Cs("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=r[u],l=0;l<i;l++)a[u+l]=vu.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Cs;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Cs("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Cs("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);r=r.addOrSubtract(c),n=n.addOrSubtract(u)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Eu(e,t),e.kind="ArithmeticException",e}(_s),Au=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cu=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var u=new Int32Array(r);for(s=0;s<r-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new _u(o,Int32Array.from([0])),o.one=new _u(o,Int32Array.from([1])),o}return Au(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Cs;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new _u(this,r)},e.prototype.inverse=function(t){if(0===t)throw new bu;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Bs.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(vu),Iu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Su=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Iu(e,t),e.kind="ReedSolomonException",e}(_s),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Tu(e,t),e.kind="IllegalStateException",e}(_s),Ou=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new _u(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new _u(r,o),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-r.log(h[a]);if(p<0)throw new Su("Bad error location");t[p]=Cu.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(r/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Su("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new Du("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Su("sigmaTilde(0) was zero");var w=o.inverse(m);return[u.multiplyScalar(w),a.multiplyScalar(w)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Su("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<r;u++)if(i!==u){var c=o.multiply(e[u],a),l=1&c?-2&c:1|c;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(mu||(mu={}));var Ru=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new yu(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=mu.UPPER,o=mu.UPPER,i="",a=0;a<r;)if(o===mu.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(r-a<8){a=r;break}var c=t.readCode(e,a,8);i+=qs.castAsNonUtf8Char(c),a+=8}o=n}else{var l=o===mu.DIGIT?4:5;if(r-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(n=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=o)):(i+=d,o=n)}return i},t.getTable=function(t){switch(t){case"L":return mu.LOWER;case"P":return mu.PUNCT;case"M":return mu.MIXED;case"D":return mu.DIGIT;case"B":return mu.BINARY;default:return mu.UPPER}},t.getCharacter=function(e,r){switch(e){case mu.UPPER:return t.UPPER_TABLE[r];case mu.LOWER:return t.LOWER_TABLE[r];case mu.MIXED:return t.MIXED_TABLE[r];case mu.PUNCT:return t.PUNCT_TABLE[r];case mu.DIGIT:return t.DIGIT_TABLE[r];default:throw new Du("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Cu.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Cu.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Cu.AZTEC_DATA_10):(n=12,r=Cu.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new Vs;for(var a=e.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=t.readCode(e,a,n);try{new Ou(r).decode(s,i-o)}catch(t){throw new Vs(t)}var c=(1<<n)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new Vs;1!==f&&f!==c-1||l++}var d=new Array(o*n-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+n-1),h+=n-1;else for(var p=n-1;p>=0;--p)d[h++]=!!(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Bs.truncDivision(Bs.truncDivision(n,2)-1,15),u=n/2,c=Bs.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Bs.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<r;a++){for(var h=4*(r-a)+(e?9:12),f=2*a,p=n-1-f,g=0;g<h;g++)for(var m=2*g,w=0;w<2;w++)i[d+m+w]=t.get(o[f+w],o[f+g]),i[d+2*h+m+w]=t.get(o[f+g],o[p-w]),i[d+4*h+m+w]=t.get(o[p-w],o[p-g]),i[d+6*h+m+w]=t.get(o[p-g],o[f+w]);d+=8*h}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Mu=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}(),Nu=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),ku=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Nu.floatToIntBits(this.x)+Nu.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return Mu.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),Pu=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),xu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bu=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return xu(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Pu),Fu=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new Js}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&n<h;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,u=!0):u||n++;if(n>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var w=e-t,y=null,v=1;null===y&&v<w;v++)y=this.getBlackPointOnSegment(t,n-v,t+v,n);if(null==y)throw new Js;var _=null;for(v=1;null===_&&v<w;v++)_=this.getBlackPointOnSegment(t,r+v,t+v,r);if(null==_)throw new Js;var E=null;for(v=1;null===E&&v<w;v++)E=this.getBlackPointOnSegment(e,r+v,e-v,r);if(null==E)throw new Js;var b=null;for(v=1;null===b&&v<w;v++)b=this.getBlackPointOnSegment(e,n-v,e-v,n);if(null==b)throw new Js;return this.centerEdges(b,y,E,_)}throw new Js},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=Mu.round(Mu.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,u=0;u<o;u++){var c=Mu.round(t+u*i),l=Mu.round(e+u*a);if(s.get(c,l))return new ku(c,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),u=r.getY(),c=n.getX(),l=n.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new ku(d-f,h+f),new ku(s+f,u+f),new ku(c-f,l-f),new ku(i+f,a-f)]:[new ku(d+f,h+f),new ku(s+f,u-f),new ku(c-f,l+f),new ku(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Lu=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new Js;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new Js;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),zu=function(){function t(t,e,r,n,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m){var w=t.quadrilateralToSquare(e,r,n,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(w)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(r*h+i*f+u)/p,t[d+1]=(n*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(r*f+i*p+u)/g,e[h]=(n*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,u){var c=e-n+i-s,l=r-o+a-u;if(0===c&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var d=n-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,w=(d*l-c*f)/g;return new t(n-e+m*n,s-e+w*s,e,o-r+m*o,u-r+w*u,r,m,w,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,u){return t.squareToQuadrilateral(e,r,n,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),Uu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Uu(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m,w,y){var v=zu.quadrilateralToQuadrilateral(n,o,i,a,s,u,c,l,d,h,f,p,g,m,w,y);return this.sampleGridWithTransform(t,e,r,v)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new Js;for(var o=new Ks(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;n.transformPoints(i),Lu.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new Js}}return o},e}(Lu),Hu=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new Vu,t}(),ju=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new ku(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),Gu=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Bu(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new Js;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(r<<3)+((t>>e-2<<1)+(1&t))})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Bs.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new Js},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Ou(Cu.AZTEC_PARAM).decode(i,o)}catch(t){throw new Js}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),u=this.getFirstDifferent(n,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,r=s,n=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new Js;this.compact=5===this.nbCenterLayers;var d=new ku(e.getX()+.5,e.getY()-.5),h=new ku(r.getX()+.5,r.getY()+.5),f=new ku(n.getX()-.5,n.getY()+.5),p=new ku(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(u=new Fu(this.image).detect())[0],e=u[1],r=u[2],n=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new ju(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new ju(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ju(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new ju(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Mu.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Mu.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var u;t=(u=new Fu(this.image,15,a,s).detect())[0],e=u[1],r=u[2],n=u[3]}catch(o){t=this.getFirstDifferent(new ju(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new ju(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ju(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new ju(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Mu.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Mu.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new ju(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=Hu.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get(Mu.round(a+l*u),Mu.round(s+l*c))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new ju(t.getX()-3,t.getY()+3),e=new ju(e.getX()-3,e.getY()-3),r=new ju(r.getX()+3,r.getY()-3),n=new ju(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o)},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(r),l=0;l<c;l++)a+=n,s+=o,this.image.get(Mu.round(a),Mu.round(s))!==u&&i++;var d=i/r;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new ju(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new ku(a+n*o,s+n*i),c=new ku(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new ku(a+n*o,s+n*i),c,new ku(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Mu.round(t.getX()),r=Mu.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return Mu.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Mu.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Bs.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Wu=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new Gu(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Ru).decode(a)}catch(t){r=t}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Ru).decode(a)}catch(t){if(null!=r)throw r;throw t}var s=new fu(i.getText(),i.getRawBytes(),i.getNumBits(),o,gu.AZTEC,Os.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(wu.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(wu.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(zs.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),Xu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Wu,e)||this}Xu(e,t)}(hu);var Yu=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(zs.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(wu.ORIENTATION)&&(i+=o.get(wu.ORIENTATION)%360),n.putMetadata(wu.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),u=0;u<a.length;u++)a[u]=new ku(s-a[u].getY()-1,a[u].getX());return n}throw new Js}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new Fs(n),a=e&&!0===e.get(zs.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var u=Math.trunc(o/2),c=0;c<r;c++){var l=Math.trunc((c+1)/2),d=u+s*(!(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(zs.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(zs.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(wu.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new ku(n-a[0].getX()-1,a[0].getY()),a[1]=new ku(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new Js},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new Js;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}u++}if(s!==n&&(s!==n-1||u!==i))throw new Js},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new Js;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return qu(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,u=n;u<r;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=Yu.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new Js},e.decodeCode=function(t,r,n){Yu.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new Js},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(zs.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new Vs}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,w=0,y=s,v=0,_=!0,E=!1,b=!1;!l;){var A=d;switch(d=!1,m=w,w=e.decodeCode(r,g,p),c[u++]=w,w!==e.CODE_STOP&&(_=!0),w!==e.CODE_STOP&&(y+=++v*w),f=p,p+=g.reduce((function(t,e){return t+e}),0),w){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new Vs}switch(o){case e.CODE_CODE_A:if(w<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else if(w<96)h+=b===E?String.fromCharCode(w-64):String.fromCharCode(w+64),b=!1;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(w<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(w<100)w<10&&(h+="0"),h+=w;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}A&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var C=p-f;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-f)/2),!1))throw new Js;if((y-=v*m)%103!==m)throw new Ts;var I=h.length;if(0===I)throw new Js;I>0&&_&&(h=o===e.CODE_CODE_C?h.substring(0,I-2):h.substring(0,I-1));for(var S=(a[1]+a[0])/2,T=f+C/2,D=c.length,O=new Uint8Array(D),R=0;R<D;R++)O[R]=c[R];var M=[new ku(S,t),new ku(T,t)];return new fu(h,O,0,M,gu.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(Yu),Ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ju=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return Ku(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(r,u),h=r.getNextSet(d[1]),f=r.getSize();do{e.recordPattern(r,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new Js;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,$u(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=r.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w,y=0;try{for(var v=$u(u),_=v.next();!_.done;_=v.next()){y+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-y)<y)throw new Js;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,A=0;A<E;A++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(A));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Ts;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new Js;w=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var C=(d[1]+d[0])/2,I=l+y/2;return new fu(w,null,0,[new ku(C,t),new ku(I,t)],gu.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=r.length,c=o;c<n;c++)if(t.get(c)!==s)r[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new Js},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,$u(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,n++,c+=h)}if(3===n){for(d=0;d<o&&n>0;d++){var h;if((h=t[d])>i&&(n--,2*h>=c))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new Js},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new Vs;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new Vs;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new Vs;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Vs;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(Yu),Qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ec=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return Qu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u,c,l=this.findAsteriskPattern(r),d=r.getNextSet(l[1]),h=r.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(r,d,f);var p=this.toPattern(f);if(p<0)throw new Js;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,tc(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w=0;try{for(var y=tc(f),v=y.next();!v.done;v=y.next()){w+=v.value}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}if(d===h||!r.get(d))throw new Js;if(this.decodeRowResult.length<2)throw new Js;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var _=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+w/2;return new fu(_,null,0,[new ku(E,t),new ku(b,t)],gu.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var r=t.getSize(),n=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=n,a=!1,s=o.length,u=0,c=n;c<r;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new Js},e.prototype.toPattern=function(t){var e,r,n=0;try{for(var o=tc(t),i=o.next();!i.done;i=o.next()){n+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/n);if(c<1||c>4)return-1;if(1&u)a<<=c;else for(var l=0;l<c;l++)a=a<<1|1}return a},e.prototype.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);throw new Js},e.prototype.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if(o>="a"&&o<="d"){if(n>=e-1)throw new Vs;var i=t.charAt(n+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new Vs;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new Vs;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new Vs;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Vs;a=":"}}r+=a,n++}else r+=o}return r},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,r,n){for(var o=1,i=0,a=r-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>n&&(o=1);if(t.charAt(r)!==e.ALPHABET_STRING[i%47])throw new Ts},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(Yu),rc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return rc(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),u=new Zs;e.decodeMiddle(r,a[1],s[0],u);var c=u.toString(),l=null;null!=n&&(l=n.get(zs.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=nc(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new Vs;var w=[new ku(a[1],t),new ku(s[0],t)];return new fu(c,null,0,w,gu.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){Yu.recordPattern(t,r,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new Js},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new Js;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof Js&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(Yu.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],Os.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new Js},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=Yu.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new Js},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(Yu),ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return ic(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Vs;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Vs;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,u=r=n?t.getNextUnset(r):t.getNextSet(r),c=o.length,l=n,d=r;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(Yu.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new Js},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=Yu.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new Js},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(Yu),sc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uc=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new ku((n[0]+n[1])/2,e),new ku(i,e)],c=new fu(a,null,0,u,gu.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=r[1],c=0,l=0;l<5&&u<s;l++){var d=ac.decodeDigit(e,a,u,ac.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,sc(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==n.length)throw new Js;var p=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==p)throw new Js;return u},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new Js},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[wu.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),cc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lc=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new ku((n[0]+n[1])/2,e),new ku(i,e)],c=new fu(a,null,0,u,gu.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=ac.decodeDigit(t,i,s,ac.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(n=void 0,cc(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new Js;if(parseInt(r.toString())%4!==u)throw new Js;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[wu.ISSUE_NUMBER,parseInt(t)]])},t}(),dc=function(){function t(){}return t.decodeRow=function(t,e,r){var n=ac.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new uc).decodeRow(t,e,n)}catch(r){return(new lc).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),hc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fc=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return hc(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(zs.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new ku((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new ku(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(r,u);if(null!=i){var h=new ku((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=r.getSize()||!r.isRange(f,p,!1))throw new Js;var g=c.toString();if(g.length<8)throw new Vs;if(!e.checkChecksum(g))throw new Ts;var m=(o[1]+o[0])/2,w=(d[1]+d[0])/2,y=this.getBarcodeFormat(),v=[new ku(m,t),new ku(w,t)],_=new fu(g,null,0,v,y,(new Date).getTime()),E=0;try{var b=dc.decodeRow(t,r,d[1]);_.putMetadata(wu.UPC_EAN_EXTENSION,b.getText()),_.putAllMetadata(b.getResultMetadata()),_.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var A=null==n?null:n.get(zs.ALLOWED_EAN_EXTENSIONS);if(null!=A){var C=!1;for(var I in A)if(E.toString()===I){C=!0;break}if(!C)throw new Js}return y===gu.EAN_13||gu.UPC_A,_},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Vs;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Vs;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(ac),pc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return pc(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=r[1],d=0,h=0;h<6&&l<c;h++){var f=fc.decodeDigit(t,u,l,fc.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,gc(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}n=e.determineFirstDigit(n,d),l=fc.findGuardPattern(t,l,!0,fc.MIDDLE_PATTERN,new Int32Array(fc.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=fc.decodeDigit(t,u,l,fc.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,gc(u)),w=m.next();!w.done;w=m.next()){l+=w.value}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return gu.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t;throw new Js},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(fc),wc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return wc(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=fc.decodeDigit(t,s,c,fc.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(n=void 0,yc(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}c=fc.findGuardPattern(t,c,!0,fc.MIDDLE_PATTERN,new Int32Array(fc.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=fc.decodeDigit(t,s,c,fc.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,yc(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:r}},e.prototype.getBarcodeFormat=function(){return gu.EAN_8},e}(fc),_c=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new mc,e}return _c(e,t),e.prototype.getBarcodeFormat=function(){return gu.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new fu(e.substring(1),null,null,t.getResultPoints(),gu.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new Js},e.prototype.reset=function(){this.ean13Reader.reset()},e}(fc),bc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ac=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return bc(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=r[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,Ac(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new Zs(n),c),u},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return fc.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw Js.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return gu.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new Zs;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(fc),Ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Tc=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(zs.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(gu.EAN_13)>-1&&o.push(new mc),n.indexOf(gu.UPC_A)>-1&&o.push(new Ec),n.indexOf(gu.EAN_8)>-1&&o.push(new vc),n.indexOf(gu.UPC_E)>-1&&o.push(new Cc)),0===o.length&&(o.push(new mc),o.push(new Ec),o.push(new vc),o.push(new Cc)),r.readers=o,r}return Ic(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Sc(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,r),c=u.getBarcodeFormat()===gu.EAN_13&&"0"===u.getText().charAt(0),l=null==r?null:r.get(zs.POSSIBLE_FORMATS),d=null==l||l.includes(gu.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new fu(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),gu.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new Js},e.prototype.reset=function(){var t,e;try{for(var r=Sc(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(Yu),Dc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return Dc(e,t),e.prototype.decodeRow=function(t,e,r){var n=this.getValidRowData(e);if(!n)throw new Js;var o=this.codaBarDecodeRow(n.row);if(!o)throw new Js;return new fu(o,null,0,[new ku(n.left,t),new ku(n.right,t)],gu.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),r=e.indexOf(!0);if(-1===r)return null;var n=e.lastIndexOf(!0);if(n<=r)return null;for(var o=[],i=(e=e.slice(r,n+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:r,right:n}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],r=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var n=t.splice(0,8).splice(0,7).map((function(t){return t<r?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[n])return null;e.push(this.CODA_BAR_CHAR_SET[n])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(Yu),Rc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nc=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Rc(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(Yu.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new Js},e.count=function(t){return Mu.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Mc(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(Yu),kc=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),Pc=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new ku(r,o)),this.resultPoints.push(new ku(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bc=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=xc(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(n&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>r;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>r&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),Fc=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new Fs(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)o&1<<i&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)s&1<<u&&r.set(n),n++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)c&1<<u&&r.set(n),n++}}return r},t}(),Lc=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),zc=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),Uc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vc=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return Uc(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(zc),Hc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jc=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Hc(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(zc),Gc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wc=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new Vs;return o.firstDigit=r,o.secondDigit=n,o}return Gc(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(zc),Xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yc=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new Js;var l=e.substring(0,2);try{for(var d=Xc(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new Js;var f=e.substring(0,3);try{for(var p=Xc(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=Xc(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),w=m.next();!w.done;w=m.next()){if((E=w.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new Js;var y=e.substring(0,4);try{for(var v=Xc(t.FOUR_DIGIT_DATA_LENGTH),_=v.next();!_.done;_=v.next()){var E;if((E=_.value)[0]===y)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{_&&!_.done&&(c=v.return)&&c.call(v)}finally{if(u)throw u.error}}throw new Js},t.processFixedAI=function(e,r,n){if(n.length<e)throw new Js;var o=n.substring(0,e);if(n.length<e+r)throw new Js;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),qc=function(){function t(t){this.buffer=new Zs,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=Yc.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new Wc(this.information.getSize(),0===e?Wc.FNC1:e-1,Wc.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new Wc(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new jc(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new jc(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(r!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new jc(this.current.getPosition(),this.buffer.toString()):new jc(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Lc(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new jc(this.current.getPosition(),this.buffer.toString());return new Lc(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Lc(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new jc(this.current.getPosition(),this.buffer.toString());return new Lc(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new Lc(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new jc(this.current.getPosition(),this.buffer.toString());return new Lc(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new Lc(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Vc(t+5,Vc.FNC1);if(e>=5&&e<15)return new Vc(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Vc(t+7,""+(n+1));if(n>=90&&n<116)return new Vc(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new Vs}return new Vc(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Vc(t+5,Vc.FNC1);if(e>=5&&e<15)return new Vc(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Vc(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new Du("Decoding invalid alphanumeric value: "+n)}return new Vc(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),Zc=function(){function t(t){this.information=t,this.generalDecoder=new qc(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),Kc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$c=function(t){function e(e){return t.call(this,e)||this}return Kc(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=1&n?o:3*o}10===(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(Zc),Jc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qc=function(t){function e(e){return t.call(this,e)||this}return Jc(e,t),e.prototype.parseInformation=function(){var t=new Zs;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}($c),tl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),el=function(t){function e(e){return t.call(this,e)||this}return tl(e,t),e.prototype.parseInformation=function(){var t=new Zs;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(Zc),rl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nl=function(t){function e(e){return t.call(this,e)||this}return rl(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}($c),ol=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),il=function(t){function e(e){return t.call(this,e)||this}return ol(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+nl.GTIN_SIZE+e.WEIGHT_SIZE)throw new Js;var t=new Zs;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+nl.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(nl),al=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sl=function(t){function e(e){return t.call(this,e)||this}return al(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(il),ul=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cl=function(t){function e(e){return t.call(this,e)||this}return ul(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(il),ll=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dl=function(t){function e(e){return t.call(this,e)||this}return ll(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+$c.GTIN_SIZE)throw new Js;var t=new Zs;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$c.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+$c.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}($c),hl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fl=function(t){function e(e){return t.call(this,e)||this}return hl(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+$c.GTIN_SIZE)throw new Js;var t=new Zs;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$c.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$c.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+$c.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}($c),pl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gl=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return pl(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new Js;var t=new Zs;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!==n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(nl);var ml=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&(t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern))},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),wl=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&(this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed)},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),yl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_l=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return yl(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof Js){if(!this.pairs.length)throw new Js;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new Js},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,vl(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new Js},e.isValidSequence=function(t){var r,n;try{for(var o=vl(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new wl(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var u=vl(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,vl(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,vl(t)),m=g.next();!m.done;m=g.next()){var w=m.value;if(ml.equals(f,w)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var u=vl(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,vl(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,vl(l.getPairs())),w=m.next();!w.done;w=m.next()){var y=w.value;if(p.equals(y)){g=!0;break}}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new Qc(t);if(!t.get(2))return new el(t);switch(qc.extractNumericValueFromBitArray(t,1,4)){case 4:return new sl(t);case 5:return new cl(t)}switch(qc.extractNumericValueFromBitArray(t,1,5)){case 12:return new dl(t);case 13:return new fl(t)}switch(qc.extractNumericValueFromBitArray(t,1,7)){case 56:return new gl(t,"310","11");case 57:return new gl(t,"320","11");case 58:return new gl(t,"310","13");case 59:return new gl(t,"320","13");case 60:return new gl(t,"310","15");case 61:return new gl(t,"320","15");case 62:return new gl(t,"310","17");case 63:return new gl(t,"320","17")}}catch(e){throw console.log(e),new Du("unknown decoder: "+t)}}(Fc.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new fu(e,null,null,o,gu.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null===r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null===(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new Js;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new ml(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(n>=0)i=n;else if(this.isEmptyPair(r))i=0;else{i=r[r.length-1].getFinderPattern().getStartEnd()[1]}var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new Js},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();Os.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new Pc(u,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Mu.sum(new Int32Array(i))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new Js;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,w=m+.5;if(w<1){if(m<.3)throw new Js;w=1}else if(w>8){if(m>8.7)throw new Js;w=8}var y=s/2;1&s?(f[y]=w,g[y]=m-w):(h[y]=w,p[y]=m-w)}this.adjustOddEvenCounts(17);var v=4*r.getValue()+(n?0:2)+(o?0:1)-1,_=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var b=e.WEIGHTS[v][2*s];E+=h[s]*b}_+=h[s]}var A=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(r,n,o)){b=e.WEIGHTS[v][2*s+1];A+=f[s]*b}var C=E+A;if(1&_||_>13||_<4)throw new Js;var I=(13-_)/2,S=e.SYMBOL_WIDEST[I],T=9-S,D=Bc.getRSSvalue(h,S,!0),O=Bc.getRSSvalue(f,T,!1),R=e.EVEN_TOTAL_SUBSET[I],M=e.GSUM[I];return new kc(D*R+O+M,C)},e.isNotA1left=function(t,e,r){return!(0===t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=Mu.sum(new Int32Array(this.getOddCounts())),n=Mu.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var u=r+n-t,c=!(1&~r),l=!(1&n);if(1===u)if(c){if(l)throw new Js;i=!0}else{if(!l)throw new Js;s=!0}else if(-1===u)if(c){if(l)throw new Js;o=!0}else{if(!l)throw new Js;a=!0}else{if(0!==u)throw new Js;if(c){if(!l)throw new Js;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new Js}if(o){if(i)throw new Js;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new Js;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Nc),El=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bl=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return El(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(kc),Al=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Al(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,u),r.reverse();var c=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,c),r.reverse();try{for(var l=Cl(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,Cl(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new Js},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Cl(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new Zs,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=1&i?s:3*s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new fu(o.toString(),null,0,[u[0],u[1],c[0],c[1]],gu.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(zs.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new ku(s,r))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new bl(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)Yu.recordPatternInReverse(t,r.getStartEnd()[0],o);else{Yu.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=n?16:15,l=Mu.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var w=Math.floor(a/2);1&a?(h[w]=m,p[w]=g-m):(d[w]=m,f[w]=g-m)}this.adjustOddEvenCounts(n,c);var y=0,v=0;for(a=d.length-1;a>=0;a--)v*=9,v+=d[a],y+=d[a];var _=0,E=0;for(a=h.length-1;a>=0;a--)_*=9,_+=h[a],E+=h[a];var b=v+3*_;if(n){if(1&y||y>12||y<4)throw new Js;var A=(12-y)/2,C=9-(O=e.OUTSIDE_ODD_WIDEST[A]),I=Bc.getRSSvalue(d,O,!1),S=Bc.getRSSvalue(h,C,!0),T=e.OUTSIDE_EVEN_TOTAL_SUBSET[A],D=e.OUTSIDE_GSUM[A];return new kc(I*T+S+D,b)}if(1&E||E>10||E<4)throw new Js;A=(10-E)/2,C=9-(O=e.INSIDE_ODD_WIDEST[A]),I=Bc.getRSSvalue(d,O,!0),S=Bc.getRSSvalue(h,C,!1);var O,R=e.INSIDE_ODD_TOTAL_SUBSET[A];D=e.INSIDE_GSUM[A];return new kc(S*R+I+D,b)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<n;u++)if(t.get(u)!==o)r[a]++;else{if(3===a){if(Nc.isFinderPattern(r))return[s,u];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new Js},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);Os.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return n&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new Pc(l,[a,o[1]],d,h,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=Mu.sum(new Int32Array(this.getOddCounts())),n=Mu.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var u=r+n-e,c=(1&r)==(t?1:0),l=!(1&~n);if(1===u)if(c){if(l)throw new Js;i=!0}else{if(!l)throw new Js;s=!0}else if(-1===u)if(c){if(l)throw new Js;o=!0}else{if(!l)throw new Js;a=!0}else{if(0!==u)throw new Js;if(c){if(!l)throw new Js;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new Js}if(o){if(i)throw new Js;Nc.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Nc.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new Js;Nc.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Nc.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Nc),Sl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tl=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(zs.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(zs.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(zs.ENABLE_CODE_39_EXTENDED_MODE);return n&&((n.includes(gu.EAN_13)||n.includes(gu.UPC_A)||n.includes(gu.EAN_8)||n.includes(gu.UPC_E))&&r.readers.push(new Tc(e)),n.includes(gu.CODE_39)&&r.readers.push(new Ju(o,i)),n.includes(gu.CODE_93)&&r.readers.push(new ec),n.includes(gu.CODE_128)&&r.readers.push(new Zu),n.includes(gu.ITF)&&r.readers.push(new oc),n.includes(gu.CODABAR)&&r.readers.push(new Oc),n.includes(gu.RSS_14)&&r.readers.push(new Il),n.includes(gu.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new _l))),0===r.readers.length&&(r.readers.push(new Tc(e)),r.readers.push(new Ju),r.readers.push(new ec),r.readers.push(new Tc(e)),r.readers.push(new Zu),r.readers.push(new oc),r.readers.push(new Il)),r}return Sl(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(t){}throw new Js},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(Yu),Dl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return void 0===e&&(e=500),t.call(this,new Tl(r),e,r)||this}Dl(e,t)}(hu);var Ol,Rl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ml=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Nl=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),kl=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Rl(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(1&e||1&r)throw new Vs;try{for(var i=Rl(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new Vs},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Ml(5,new Nl(1,3))),new t(2,12,12,10,10,new Ml(7,new Nl(1,5))),new t(3,14,14,12,12,new Ml(10,new Nl(1,8))),new t(4,16,16,14,14,new Ml(12,new Nl(1,12))),new t(5,18,18,16,16,new Ml(14,new Nl(1,18))),new t(6,20,20,18,18,new Ml(18,new Nl(1,22))),new t(7,22,22,20,20,new Ml(20,new Nl(1,30))),new t(8,24,24,22,22,new Ml(24,new Nl(1,36))),new t(9,26,26,24,24,new Ml(28,new Nl(1,44))),new t(10,32,32,14,14,new Ml(36,new Nl(1,62))),new t(11,36,36,16,16,new Ml(42,new Nl(1,86))),new t(12,40,40,18,18,new Ml(48,new Nl(1,114))),new t(13,44,44,20,20,new Ml(56,new Nl(1,144))),new t(14,48,48,22,22,new Ml(68,new Nl(1,174))),new t(15,52,52,24,24,new Ml(42,new Nl(2,102))),new t(16,64,64,14,14,new Ml(56,new Nl(2,140))),new t(17,72,72,16,16,new Ml(36,new Nl(4,92))),new t(18,80,80,18,18,new Ml(48,new Nl(4,114))),new t(19,88,88,20,20,new Ml(56,new Nl(4,144))),new t(20,96,96,22,22,new Ml(68,new Nl(4,174))),new t(21,104,104,24,24,new Ml(56,new Nl(6,136))),new t(22,120,120,18,18,new Ml(68,new Nl(6,175))),new t(23,132,132,20,20,new Ml(62,new Nl(8,163))),new t(24,144,144,22,22,new Ml(62,new Nl(8,156),new Nl(2,155))),new t(25,8,18,6,16,new Ml(7,new Nl(1,5))),new t(26,8,32,6,14,new Ml(11,new Nl(1,10))),new t(27,12,26,10,24,new Ml(14,new Nl(1,16))),new t(28,12,36,10,16,new Ml(18,new Nl(1,22))),new t(29,16,36,14,16,new Ml(24,new Nl(1,32))),new t(30,16,48,14,22,new Ml(28,new Nl(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Pl=function(){function t(e){var r=e.getHeight();if(r<8||r>144||1&r)throw new Vs;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new Ks(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return kl.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(r!==o||0!==n||a)if(r===o-2&&0===n&&3&i&&!s)t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else if(r!==o+4||2!==n||7&i||u)if(r!==o-2||0!==n||4!=(7&i)||c){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new Vs;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Cs("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new Ks(a*o,i*n),u=0;u<i;++u)for(var c=u*n,l=0;l<a;++l)for(var d=l*o,h=0;h<n;++h)for(var f=u*(n+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var w=d+g;s.set(w,p)}}return s},t}(),xl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bl=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=xl(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var h=new Array(u),f=0;try{for(var p=xl(c),g=p.next();!g.done;g=p.next())for(var m=g.value,w=0;w<m.getCount();w++){var y=m.getDataCodewords(),v=s.getECCodewords()+y;h[f++]=new t(y,new Uint8Array(v))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var _=h[0].codewords.length-s.getECCodewords(),E=_-1,b=0;for(w=0;w<E;w++)for(var A=0;A<f;A++)h[A].codewords[w]=e[b++];var C=24===r.getVersionNumber(),I=C?8:f;for(A=0;A<I;A++)h[A].codewords[_-1]=e[b++];var S=h[0].codewords.length;for(w=_;w<S;w++)for(A=0;A<f;A++){var T=C?(A+8)%f:A,D=C&&T>7?w-1:w;h[T].codewords[D]=e[b++]}if(b!==e.length)throw new Cs;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Fl=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Cs(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[n]&s)>>u,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[n]&s)>>u,r+=t}}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(Ol||(Ol={}));var Ll,zl=function(){function t(){}return t.decode=function(t){var e=new Fl(t),r=new Zs,n=new Zs,o=new Array,i=Ol.ASCII_ENCODE;do{if(i===Ol.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case Ol.C40_ENCODE:this.decodeC40Segment(e,r);break;case Ol.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case Ol.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case Ol.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case Ol.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new Vs}i=Ol.ASCII_ENCODE}}while(i!==Ol.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new yu(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new Vs;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),Ol.ASCII_ENCODE;if(129===o)return Ol.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return Ol.C40_ENCODE;case 231:return Ol.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return Ol.ANSIX12_ENCODE;case 239:return Ol.TEXT_ENCODE;case 240:return Ol.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new Vs}}while(t.available()>0);return Ol.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new Vs;var u=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Vs}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new Vs}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new Vs;var u=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Vs}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new Vs;u=this.TEXT_SHIFT3_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u),o=0;break;default:throw new Vs}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new Vs;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}32&n||(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new Vs;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new Vs;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(Ys.decode(a,qs.ISO88591))}catch(t){throw new Du("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),Ul=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vl=function(){function t(){this.rsDecoder=new Ou(Cu.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new Pl(t),o=n.getVersion(),i=n.readCodewords(),a=Bl.getDataBlocks(i,o),s=0;try{for(var u=Ul(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return zl.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Ts}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Hl=function(){function t(t){this.image=t,this.rectangleDetector=new Fu(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new Js;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;1&~s||(s+=1),1&~u||(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,n,o,i,a,s,u);return new Pu(c,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new ku(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new ku(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,r,n];return c>a&&(c=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),c>s&&(c=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),c>u&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),u=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(u,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),u=t.shiftPoint(r,n,4*(s+1)),c=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new ku(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),d=new ku(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(r,n,4*s),c=t.shiftPoint(o,n,4*a);1&~(a=this.transitionsBetween(u,i)+1)||(a+=1),1&~(s=this.transitionsBetween(c,i)+1)||(s+=1);var l,d,h=(r.getX()+n.getX()+o.getX()+i.getX())/4,f=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,h,f),n=t.moveAway(n,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(r,n,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,n,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return Hu.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var u=Math.abs(o-r),c=Math.abs(i-n),l=-u/2,d=n<i?1:-1,h=r<o?1:-1,f=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=h){var w=this.image.get(a?m:g,a?g:m);if(w!==p&&(f++,p=w),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),jl=function(){function t(){this.decoder=new Vl}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(zs.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Hl(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new fu(n.getText(),s,8*s.length,o,gu.DATA_MATRIX,Os.currentTimeMillis()),c=n.getByteSegments();null!=c&&u.putMetadata(wu.BYTE_SEGMENTS,c);var l=n.getECLevel();return null!=l&&u.putMetadata(wu.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new Js;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,u=(i-o+1)/n;if(s<=0||u<=0)throw new Js;var c=n/2;o+=c,a+=c;for(var l=new Ks(s,u),d=0;d<u;d++)for(var h=o+d*n,f=0;f<s;f++)t.get(a+f*n,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new Js;var i=n-t[0];if(0===i)throw new Js;return i},t.NO_POINTS=[],t}(),Gl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new jl,e)||this}Gl(e,t)}(hu),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(Ll||(Ll={}));var Wl,Xl=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new bs(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Cs;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Ll.L,"L",1),t.M=new t(Ll.M,"M",0),t.Q=new t(Ll.Q,"Q",3),t.H=new t(Ll.H,"H",2),t}(),Yl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ql=function(){function t(t){this.errorCorrectionLevel=Xl.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Bs.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=Yl(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===r)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==r&&(d=t.numBitsDiffering(r,l))<i&&(a=c[1],i=d)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),Zl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Kl=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=Zl(n),i=o.next();!i.done;i=o.next()){r+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),$l=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Jl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ql=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=Jl(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new Vs;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new Vs}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Cs;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=ql.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new Ks(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new Kl(7,new $l(1,19)),new Kl(10,new $l(1,16)),new Kl(13,new $l(1,13)),new Kl(17,new $l(1,9))),new t(2,Int32Array.from([6,18]),new Kl(10,new $l(1,34)),new Kl(16,new $l(1,28)),new Kl(22,new $l(1,22)),new Kl(28,new $l(1,16))),new t(3,Int32Array.from([6,22]),new Kl(15,new $l(1,55)),new Kl(26,new $l(1,44)),new Kl(18,new $l(2,17)),new Kl(22,new $l(2,13))),new t(4,Int32Array.from([6,26]),new Kl(20,new $l(1,80)),new Kl(18,new $l(2,32)),new Kl(26,new $l(2,24)),new Kl(16,new $l(4,9))),new t(5,Int32Array.from([6,30]),new Kl(26,new $l(1,108)),new Kl(24,new $l(2,43)),new Kl(18,new $l(2,15),new $l(2,16)),new Kl(22,new $l(2,11),new $l(2,12))),new t(6,Int32Array.from([6,34]),new Kl(18,new $l(2,68)),new Kl(16,new $l(4,27)),new Kl(24,new $l(4,19)),new Kl(28,new $l(4,15))),new t(7,Int32Array.from([6,22,38]),new Kl(20,new $l(2,78)),new Kl(18,new $l(4,31)),new Kl(18,new $l(2,14),new $l(4,15)),new Kl(26,new $l(4,13),new $l(1,14))),new t(8,Int32Array.from([6,24,42]),new Kl(24,new $l(2,97)),new Kl(22,new $l(2,38),new $l(2,39)),new Kl(22,new $l(4,18),new $l(2,19)),new Kl(26,new $l(4,14),new $l(2,15))),new t(9,Int32Array.from([6,26,46]),new Kl(30,new $l(2,116)),new Kl(22,new $l(3,36),new $l(2,37)),new Kl(20,new $l(4,16),new $l(4,17)),new Kl(24,new $l(4,12),new $l(4,13))),new t(10,Int32Array.from([6,28,50]),new Kl(18,new $l(2,68),new $l(2,69)),new Kl(26,new $l(4,43),new $l(1,44)),new Kl(24,new $l(6,19),new $l(2,20)),new Kl(28,new $l(6,15),new $l(2,16))),new t(11,Int32Array.from([6,30,54]),new Kl(20,new $l(4,81)),new Kl(30,new $l(1,50),new $l(4,51)),new Kl(28,new $l(4,22),new $l(4,23)),new Kl(24,new $l(3,12),new $l(8,13))),new t(12,Int32Array.from([6,32,58]),new Kl(24,new $l(2,92),new $l(2,93)),new Kl(22,new $l(6,36),new $l(2,37)),new Kl(26,new $l(4,20),new $l(6,21)),new Kl(28,new $l(7,14),new $l(4,15))),new t(13,Int32Array.from([6,34,62]),new Kl(26,new $l(4,107)),new Kl(22,new $l(8,37),new $l(1,38)),new Kl(24,new $l(8,20),new $l(4,21)),new Kl(22,new $l(12,11),new $l(4,12))),new t(14,Int32Array.from([6,26,46,66]),new Kl(30,new $l(3,115),new $l(1,116)),new Kl(24,new $l(4,40),new $l(5,41)),new Kl(20,new $l(11,16),new $l(5,17)),new Kl(24,new $l(11,12),new $l(5,13))),new t(15,Int32Array.from([6,26,48,70]),new Kl(22,new $l(5,87),new $l(1,88)),new Kl(24,new $l(5,41),new $l(5,42)),new Kl(30,new $l(5,24),new $l(7,25)),new Kl(24,new $l(11,12),new $l(7,13))),new t(16,Int32Array.from([6,26,50,74]),new Kl(24,new $l(5,98),new $l(1,99)),new Kl(28,new $l(7,45),new $l(3,46)),new Kl(24,new $l(15,19),new $l(2,20)),new Kl(30,new $l(3,15),new $l(13,16))),new t(17,Int32Array.from([6,30,54,78]),new Kl(28,new $l(1,107),new $l(5,108)),new Kl(28,new $l(10,46),new $l(1,47)),new Kl(28,new $l(1,22),new $l(15,23)),new Kl(28,new $l(2,14),new $l(17,15))),new t(18,Int32Array.from([6,30,56,82]),new Kl(30,new $l(5,120),new $l(1,121)),new Kl(26,new $l(9,43),new $l(4,44)),new Kl(28,new $l(17,22),new $l(1,23)),new Kl(28,new $l(2,14),new $l(19,15))),new t(19,Int32Array.from([6,30,58,86]),new Kl(28,new $l(3,113),new $l(4,114)),new Kl(26,new $l(3,44),new $l(11,45)),new Kl(26,new $l(17,21),new $l(4,22)),new Kl(26,new $l(9,13),new $l(16,14))),new t(20,Int32Array.from([6,34,62,90]),new Kl(28,new $l(3,107),new $l(5,108)),new Kl(26,new $l(3,41),new $l(13,42)),new Kl(30,new $l(15,24),new $l(5,25)),new Kl(28,new $l(15,15),new $l(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new Kl(28,new $l(4,116),new $l(4,117)),new Kl(26,new $l(17,42)),new Kl(28,new $l(17,22),new $l(6,23)),new Kl(30,new $l(19,16),new $l(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new Kl(28,new $l(2,111),new $l(7,112)),new Kl(28,new $l(17,46)),new Kl(30,new $l(7,24),new $l(16,25)),new Kl(24,new $l(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new Kl(30,new $l(4,121),new $l(5,122)),new Kl(28,new $l(4,47),new $l(14,48)),new Kl(30,new $l(11,24),new $l(14,25)),new Kl(30,new $l(16,15),new $l(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new Kl(30,new $l(6,117),new $l(4,118)),new Kl(28,new $l(6,45),new $l(14,46)),new Kl(30,new $l(11,24),new $l(16,25)),new Kl(30,new $l(30,16),new $l(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new Kl(26,new $l(8,106),new $l(4,107)),new Kl(28,new $l(8,47),new $l(13,48)),new Kl(30,new $l(7,24),new $l(22,25)),new Kl(30,new $l(22,15),new $l(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new Kl(28,new $l(10,114),new $l(2,115)),new Kl(28,new $l(19,46),new $l(4,47)),new Kl(28,new $l(28,22),new $l(6,23)),new Kl(30,new $l(33,16),new $l(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new Kl(30,new $l(8,122),new $l(4,123)),new Kl(28,new $l(22,45),new $l(3,46)),new Kl(30,new $l(8,23),new $l(26,24)),new Kl(30,new $l(12,15),new $l(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new Kl(30,new $l(3,117),new $l(10,118)),new Kl(28,new $l(3,45),new $l(23,46)),new Kl(30,new $l(4,24),new $l(31,25)),new Kl(30,new $l(11,15),new $l(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new Kl(30,new $l(7,116),new $l(7,117)),new Kl(28,new $l(21,45),new $l(7,46)),new Kl(30,new $l(1,23),new $l(37,24)),new Kl(30,new $l(19,15),new $l(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new Kl(30,new $l(5,115),new $l(10,116)),new Kl(28,new $l(19,47),new $l(10,48)),new Kl(30,new $l(15,24),new $l(25,25)),new Kl(30,new $l(23,15),new $l(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new Kl(30,new $l(13,115),new $l(3,116)),new Kl(28,new $l(2,46),new $l(29,47)),new Kl(30,new $l(42,24),new $l(1,25)),new Kl(30,new $l(23,15),new $l(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new Kl(30,new $l(17,115)),new Kl(28,new $l(10,46),new $l(23,47)),new Kl(30,new $l(10,24),new $l(35,25)),new Kl(30,new $l(19,15),new $l(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new Kl(30,new $l(17,115),new $l(1,116)),new Kl(28,new $l(14,46),new $l(21,47)),new Kl(30,new $l(29,24),new $l(19,25)),new Kl(30,new $l(11,15),new $l(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new Kl(30,new $l(13,115),new $l(6,116)),new Kl(28,new $l(14,46),new $l(23,47)),new Kl(30,new $l(44,24),new $l(7,25)),new Kl(30,new $l(59,16),new $l(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new Kl(30,new $l(12,121),new $l(7,122)),new Kl(28,new $l(12,47),new $l(26,48)),new Kl(30,new $l(39,24),new $l(14,25)),new Kl(30,new $l(22,15),new $l(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new Kl(30,new $l(6,121),new $l(14,122)),new Kl(28,new $l(6,47),new $l(34,48)),new Kl(30,new $l(46,24),new $l(10,25)),new Kl(30,new $l(2,15),new $l(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new Kl(30,new $l(17,122),new $l(4,123)),new Kl(28,new $l(29,46),new $l(14,47)),new Kl(30,new $l(49,24),new $l(10,25)),new Kl(30,new $l(24,15),new $l(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new Kl(30,new $l(4,122),new $l(18,123)),new Kl(28,new $l(13,46),new $l(32,47)),new Kl(30,new $l(48,24),new $l(14,25)),new Kl(30,new $l(42,15),new $l(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new Kl(30,new $l(20,117),new $l(4,118)),new Kl(28,new $l(40,47),new $l(7,48)),new Kl(30,new $l(43,24),new $l(22,25)),new Kl(30,new $l(10,15),new $l(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new Kl(30,new $l(19,118),new $l(6,119)),new Kl(28,new $l(18,47),new $l(31,48)),new Kl(30,new $l(34,24),new $l(34,25)),new Kl(30,new $l(20,15),new $l(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(Wl||(Wl={}));var td,ed=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[Wl.DATA_MASK_000,new t(Wl.DATA_MASK_000,(function(t,e){return!(t+e&1)}))],[Wl.DATA_MASK_001,new t(Wl.DATA_MASK_001,(function(t,e){return!(1&t)}))],[Wl.DATA_MASK_010,new t(Wl.DATA_MASK_010,(function(t,e){return e%3==0}))],[Wl.DATA_MASK_011,new t(Wl.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[Wl.DATA_MASK_100,new t(Wl.DATA_MASK_100,(function(t,e){return!(Math.floor(t/2)+Math.floor(e/3)&1)}))],[Wl.DATA_MASK_101,new t(Wl.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[Wl.DATA_MASK_110,new t(Wl.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[Wl.DATA_MASK_111,new t(Wl.DATA_MASK_111,(function(t,e){return!(t+e+t*e%3&1)}))]]),t}(),rd=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new Vs;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=ql.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new Vs},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return Ql.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=Ql.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;r=0;for(i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=Ql.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new Vs},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=ed.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=n-1;l>0;l-=2){6===l&&l--;for(var d=0;d<n;d++)for(var h=i?n-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new Vs;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=ed.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),nd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},od=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Cs;var u=r.getECBlocksForLevel(n),c=0,l=u.getECBlocks();try{for(var d=nd(l),h=d.next();!h.done;h=d.next()){c+=(w=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=nd(l),m=g.next();!m.done;m=g.next())for(var w=m.value,y=0;y<w.getCount();y++){var v=w.getDataCodewords(),_=u.getECCodewordsPerBlock()+v;f[p++]=new t(v,new Uint8Array(_))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var A=E-u.getECCodewordsPerBlock(),C=0;for(y=0;y<A;y++)for(var I=0;I<p;I++)f[I].codewords[y]=e[C++];for(I=b;I<p;I++)f[I].codewords[A]=e[C++];var S=f[0].codewords.length;for(y=A;y<S;y++)for(I=0;I<p;I++){var T=I<b?y:y+1;f[I].codewords[T]=e[C++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(td||(td={}));var id,ad,sd=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Cs;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(td.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(td.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(td.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(td.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(td.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(td.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(td.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(td.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(td.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(td.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),ud=function(){function t(){}return t.decode=function(e,r,n,o){var i=new Fl(e),a=new Zs,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=sd.TERMINATOR;else{var f=i.readBits(4);h=sd.forBits(f)}switch(h){case sd.TERMINATOR:break;case sd.FNC1_FIRST_POSITION:case sd.FNC1_SECOND_POSITION:d=!0;break;case sd.STRUCTURED_APPEND:if(i.available()<16)throw new Vs;u=i.readBits(8),c=i.readBits(8);break;case sd.ECI:var p=t.parseECIValue(i);if(null===(l=Gs.getCharacterSetECIByValue(p)))throw new Vs;break;case sd.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var w=i.readBits(h.getCharacterCountBits(r));switch(h){case sd.NUMERIC:t.decodeNumericSegment(i,a,w);break;case sd.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,w,d);break;case sd.BYTE:t.decodeByteSegment(i,a,w,l,s,o);break;case sd.KANJI:t.decodeKanjiSegment(i,a,w);break;default:throw new Vs}}}while(h!==sd.TERMINATOR)}catch(t){throw new Vs}return new yu(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),u,c)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new Vs;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(Ys.decode(n,qs.GB2312))}catch(t){throw new Vs(t)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new Vs;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(Ys.decode(n,qs.SHIFT_JIS))}catch(t){throw new Vs(t)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new Vs;for(var a,s=new Uint8Array(r),u=0;u<r;u++)s[u]=t.readBits(8);a=null===n?qs.guessEncoding(s,i):n.getName();try{e.append(Ys.decode(s,a))}catch(t){throw new Vs(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new Vs;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new Vs;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new Vs;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new Vs;var o=e.readBits(10);if(o>=1e3)throw new Vs;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new Vs;var i=e.readBits(7);if(i>=100)throw new Vs;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new Vs;var a=e.readBits(4);if(a>=10)throw new Vs;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new Vs},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),cd=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),ld=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dd=function(){function t(){this.rsDecoder=new Ou(Cu.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(Ks.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new rd(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new cd(!0)),o}catch(t){if(null!==n)throw n;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=od.getDataBlocks(u,a,s),l=0;try{for(var d=ld(c),h=d.next();!h.done;h=d.next()){l+=(w=h.value).getNumDataCodewords()}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}var f=new Uint8Array(l),p=0;try{for(var g=ld(c),m=g.next();!m.done;m=g.next()){var w,y=(w=m.value).getCodewords(),v=w.getNumDataCodewords();this.correctErrors(y,v);for(var _=0;_<v;_++)f[p++]=y[_]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return ud.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Ts}for(var n=0;n<e;n++)t[n]=r[n]},t}(),hd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fd=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return hd(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(ku),pd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gd=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<r&&!i.get(u,s);)u++;for(var c=0;u<r;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new Js},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(r,u)&&s[2]<=n;)s[2]++,u++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),u=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=pd(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new fd(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wd=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return md(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(ku),yd=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),vd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_d=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(zs.TRY_HARDER),n=null!=e&&void 0!==e.get(zs.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1&~d||d++,c[d]++;else if(1&d)c[d]++;else if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,n)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,n)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return ku.orderBestPatterns(p),new yd(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&r+a<c&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=u||r+a>=c)return!1;for(;e+a<u&&r+a<c&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=u||r+a>=c||i[3]>=n)return!1;for(;e+a<u&&r+a<c&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(r,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(r,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(r,u)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,r);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,r)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,r)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(u,r);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,r)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,r)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new wd(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=vd(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=vd(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=vd(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new Js;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=vd(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=vd(a),w=m.next();!w.done;w=m.next()){s+=w.value.getEstimatedModuleSize()}}catch(t){r={error:t}}finally{try{w&&!w.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Ed=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(zs.NEED_RESULT_POINT_CALLBACK);var e=new _d(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new Js("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=Ql.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),d=n.getY()-r.getY()+o.getY(),h=1-3/u,f=Math.floor(r.getX()+h*(l-r.getX())),p=Math.floor(r.getY()+h*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof Js))throw t}var m=t.createTransform(r,n,o,c,a),w=t.sampleGrid(this.image,m,a);return new Pu(w,null===c?[o,r,n]:[o,r,n,c])},t.createTransform=function(t,e,r,n,o){var i,a,s,u,c=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),u=s=c-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=c,u=c),zu.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return Hu.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=Mu.round(ku.distance(t,e)/n),i=Mu.round(ku.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new Js("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),u=-a/2,c=t<r?1:-1,l=e<n?1:-1,d=0,h=r+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Mu.distance(f,p,t,e);d++}if((u+=s)>0){if(p===n)break;p+=l,u-=a}}return 2===d?Mu.distance(r+c,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new Js("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),u=Math.min(this.image.getHeight()-1,r+o);if(u-s<3*t)throw new Js("Alignment bottom exceeds estimated module size.");return new gd(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),bd=function(){function t(){this.decoder=new dd}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(zs.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new Ed(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof cd&&n.getOther().applyMirroredCorrection(o);var s=new fu(n.getText(),n.getRawBytes(),void 0,o,gu.QR_CODE,void 0),u=n.getByteSegments();null!==u&&s.putMetadata(wu.BYTE_SEGMENTS,u);var c=n.getECLevel();return null!==c&&s.putMetadata(wu.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(wu.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(wu.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new Js;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new Js;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new Js;var u=Math.round((s-a+1)/n),c=Math.round((i-o+1)/n);if(u<=0||c<=0)throw new Js;if(c!==u)throw new Js;var l=Math.floor(n/2);o+=l;var d=(a+=l)+Math.floor((u-1)*n)-s;if(d>0){if(d>l)throw new Js;a-=d}var h=o+Math.floor((c-1)*n)-i;if(h>0){if(h>l)throw new Js;o-=h}for(var f=new Ks(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*n),m=0;m<u;m++)t.get(a+Math.floor(m*n),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new Js;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Ad=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cd=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Mu.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=Ad(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=xs.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Id=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Sd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Td=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Id(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,u=!1;a<r.getHeight();){var c=t.findVertices(r,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(n=void 0,Sd(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<r;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,n,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,n,!1,a,c))){o++;break}f=h}s[0]=new ku(f[0],o),s[1]=new ku(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,n,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new ku(h[0],l),s[3]=new ku(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&xs.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){xs.fillWithin(s,0,s.length,0);for(var u=r,c=0;e.get(u,n)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,n)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],Os.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Dd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Od=function(){function t(t,e){if(0===e.length)throw new Cs;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),Os.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=Dd(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Cs("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Os.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Cs("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Cs("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=r[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Cs;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new Zs,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Rd=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Cs;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new bu;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nd=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Od(n,new Int32Array([0])),n.one=new Od(n,new Int32Array([1])),n}return Md(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Cs;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Od(this,r)},e.PDF417_GF=new e(Cd.NUMBER_OF_CODEWORDS,3),e}(Rd),kd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pd=function(){function t(){this.field=Nd.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Od(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var d=kd(r),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new Od(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}var m=new Od(this.field,a),w=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),y=w[0],v=w[1],_=this.findErrorLocations(y),E=this.findErrorMagnitudes(v,y,_);for(u=0;u<_.length;u++){var b=t.length-1-this.field.log(_[u]);if(b<0)throw Ts.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return _.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Ts.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Ts.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Ts.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Od(this.field,o),s=r.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),xd=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new Js;i?(e=new ku(0,n.getY()),r=new ku(0,o.getY())):a&&(n=new ku(t.getWidth()-1,e.getY()),o=new ku(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new ku(u.getX(),c);n?o=l:a=l}if(r>0){var d=n?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+r);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new ku(d.getX(),h);n?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Bd=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Fd=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Ld=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zd=function(){function t(t){this.boundingBox=new xd(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new Fd,n=0;try{for(var o=Ld(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Ud=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vd=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Hd=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=Ud(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Vd(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Cd.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),jd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wd=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return jd(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=Gd(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=Gd(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Hd,o=new Hd,i=new Hd,a=new Hd;try{for(var s=Gd(r),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Cd.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Cd.MAX_ROWS_IN_BARCODE)return null;var h=new Bd(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(zd),Xd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yd=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Cd.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=u[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=u[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=u[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=u[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=u[r+2]);try{for(var l=Xd(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new Fd,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),qd=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),Zd=function(){function t(){}return t.initialize=function(){for(var e=0;e<Cd.SYMBOL_TABLE.length;e++)for(var r=Cd.SYMBOL_TABLE[e],n=1&r,o=0;o<Cd.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Cd.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Cd.BARS_IN_MODULE-o-1]=Math.fround(i/Cd.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Mu.sum(t),r=new Int32Array(Cd.BARS_IN_MODULE),n=0,o=0,i=0;i<Cd.MODULES_IN_CODEWORD;i++){var a=e/(2*Cd.MODULES_IN_CODEWORD)+i*e/Cd.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Cd.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=Mu.sum(e),n=new Array(Cd.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Nu.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<Cd.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-n[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=Cd.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Cd.SYMBOL_TABLE.length).map((function(t){return new Array(Cd.BARS_IN_MODULE)})),t}(),Kd=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),$d=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),Jd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jd(e,t),e.kind="NullPointerException",e}(_s),th=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new Qd;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new Ms;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),eh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eh(e,t),e}(_s),nh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oh=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Cs("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return nh(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new rh;e=Bs.MAX_VALUE}this.buf=xs.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new Ms;this.ensureCapacity(this.count+r),Os.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return xs.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(th);function ih(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Ci)return Ci.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function ah(t){if(void 0===ad&&(ad=ih()),null===ad)throw new Error("BigInt is not supported!");return ad(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(id||(id={}));var sh=function(){function t(){}return t.decode=function(e,r){var n=new Zs(""),o=Gs.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new Kd;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:Gs.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new Vs;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw Vs.getFormatInstance();a=e[i++]}if(0===n.length())throw Vs.getFormatInstance();var u=new yu(null,n.toString(),null,r);return u.setOther(s),u},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw Vs.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Bs.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new Zs;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new Zs;r=t.textCompaction(e,r+1,u),n.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new Zs;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new Zs;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Zs;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(Bs.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new Zs;r=t.numericCompaction(e,r+1,h),n.setTimestamp($d.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new Zs;r=t.numericCompaction(e,r+1,f),n.setChecksum(Bs.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new Zs;r=t.numericCompaction(e,r+1,p),n.setFileSize($d.parseLong(p.toString()));break;default:throw Vs.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw Vs.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(xs.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var u=e[r++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[r++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=id.ALPHA,a=id.ALPHA,s=0;s<n;){var u=e[s],c="";switch(i){case id.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=id.LOWER;break;case t.ML:i=id.MIXED;break;case t.PS:a=i,i=id.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}break;case id.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=id.ALPHA_SHIFT;break;case t.ML:i=id.MIXED;break;case t.PS:a=i,i=id.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}break;case id.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=id.PUNCT;break;case 26:c=" ";break;case t.LL:i=id.LOWER;break;case t.AL:i=id.ALPHA;break;case t.PS:a=i,i=id.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}break;case id.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=id.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}break;case id.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}break;case id.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=id.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=id.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new oh,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=r[o++];o<r[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(ah(u)>>ah(8*(5-h))));u=0,s=0}}o===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!c;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(ah(u)>>ah(8*(5-h))));u=0,s=0}}}return i.append(Ys.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=ah(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*ah(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new Vs;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=ih()?function(){var t=[];t[0]=ah(1);var e=ah(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),uh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ch=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var u,c=new xd(e,r,n,o,i),l=null,d=null,h=!0;;h=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,c,r,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw Js.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var w=g?m:p-m;if(void 0===u.getDetectionResultColumn(w)){var y=void 0;y=0===w||w===p?new Wd(c,0===w):new zd(c),u.setDetectionResultColumn(w,y);for(var v=-1,_=v,E=c.getMinY();E<=c.getMaxY();E++){if((v=t.getStartColumn(u,w,E,g))<0||v>c.getMaxX()){if(-1===_)continue;v=_}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,v,E,a,s);null!=b&&(y.setCodeword(E,b),_=v,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=xd.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Yd(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=uh(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=uh(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new Wd(r,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Cd.MAX_CODEWORDS_IN_BARCODE)throw Js.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=r[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?n.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Cd.toIntArray(n),Cd.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)r[o[u]]=i[u][a[u]];try{return t.decodeCodewords(r,e,n)}catch(t){if(!(t instanceof Ts))throw t}if(0===a.length)throw Ts.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Ts.getChecksumInstance()}}throw Ts.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Hd;var u=0;try{for(var c=uh(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(n=void 0,uh(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,uh(e.getDetectionResultColumn(r).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var c,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var d=Mu.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=Zd.getDecodedValue(l),g=Cd.getCodeword(p);return-1===g?null:new qd(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),u=0,c=n?1:-1,l=n;(n?a<r:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(n?r:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw Vs.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=sh.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Ts.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw Vs.getFormatInstance();var r=t[0];if(r>t.length)throw Vs.getFormatInstance();if(0===r){if(!(e<t.length))throw Vs.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new Fd,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Pd,t}(),lh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dh=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw Js.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(t){if(t instanceof Vs||t instanceof Ts)throw Js.getNotFoundInstance();throw t}},t.decode=function(e,r,n){var o,i,a=new Array,s=Td.detectMultiple(e,r,n);try{for(var u=lh(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=ch.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new fu(d.getText(),d.getRawBytes(),void 0,l,gu.PDF_417);h.putMetadata(wu.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(wu.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Bs.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Cd.MODULES_IN_CODEWORD/Cd.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Cd.MODULES_IN_CODEWORD/Cd.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Cd.MODULES_IN_CODEWORD/Cd.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Cd.MODULES_IN_CODEWORD/Cd.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),hh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hh(e,t),e.kind="ReaderException",e}(_s),ph=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gh=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(zs.TRY_HARDER),r=null==t?null:t.get(zs.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===gu.UPC_A||t===gu.UPC_E||t===gu.EAN_13||t===gu.EAN_8||t===gu.CODABAR||t===gu.CODE_39||t===gu.CODE_93||t===gu.CODE_128||t===gu.ITF||t===gu.RSS_14||t===gu.RSS_EXPANDED}));o&&!e&&n.push(new Tl(t)),r.includes(gu.QR_CODE)&&n.push(new bd),r.includes(gu.DATA_MATRIX)&&n.push(new jl),r.includes(gu.AZTEC)&&n.push(new Wu),r.includes(gu.PDF_417)&&n.push(new dh),o&&e&&n.push(new Tl(t))}0===n.length&&(e||n.push(new Tl(t)),n.push(new bd),n.push(new jl),n.push(new Wu),n.push(new dh),e&&n.push(new Tl(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=ph(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new fh("No readers where selected, nothing can be read.");try{for(var n=ph(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof fh)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new Js("No MultiFormat Readers were able to detect the code.")},t}(),mh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new gh;return n.setHints(e),t.call(this,n,r)||this}mh(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(hu);var wh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new dh,e)||this}wh(e,t)}(hu);var yh,vh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new bd,e)||this}vh(e,t)}(hu),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(yh||(yh={}));var _h=yh,Eh=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new _u(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],n=this.field,o=e.length;o<=t;o++){var i=r.multiply(new _u(n,Int32Array.from([1,n.exp(o-1+n.getGeneratorBase())])));e.push(i),r=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new Cs("No error correction bytes");var r=t.length-e;if(r<=0)throw new Cs("No data bytes provided");var n=this.buildGenerator(e),o=new Int32Array(r);Os.arraycopy(t,0,o,0,r);for(var i=new _u(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(n)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[r+u]=0;Os.arraycopy(a,0,t,r+s,a.length)},t}(),bh=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===n[a+1][u]&&c===n[a+1][u+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)1===s[u]&&r++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-c)/c)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Cs("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=r?a[s][l]:a[l][s];d===c?u++:(u>=5&&(n+=t.N1+(u-5)),u=1,c=d)}u>=5&&(n+=t.N1+(u-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),Ah=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ch=function(){function t(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},t.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},t.prototype.clear=function(t){var e,r;try{for(var n=Ah(this.bytes),o=n.next();!o.done;o=n.next()){var i=o.value;xs.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width)return!1;if(this.height!==r.height)return!1;for(var n=0,o=this.height;n<o;++n)for(var i=this.bytes[n],a=r.bytes[n],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new Zs,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,i=this.width;o<i;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),Ih=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new Zs;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Sh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Th=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sh(e,t),e.kind="WriterException",e}(_s),Dh=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new Fs;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(n.setBoolean(c,l,s),i<8){var d=n.getWidth()-i-1,h=8;n.setBoolean(d,h,s)}else{d=8,h=n.getHeight()-7+(i-8);n.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new Fs;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(n.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&bh.getDataMaskBit(r,c,s)&&(l=!l),n.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Th("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Bs.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Cs("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Ih.isValidMaskPattern(r))throw new Th("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new Fs;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Th("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new Th("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Th;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new Th;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new Th;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),Oh=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Rh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return bh.applyMaskPenaltyRule1(t)+bh.applyMaskPenaltyRule2(t)+bh.applyMaskPenaltyRule3(t)+bh.applyMaskPenaltyRule4(t)},t.encode=function(e,r,n){void 0===n&&(n=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==n&&void 0!==n.get(_h.CHARACTER_SET);i&&(o=n.get(_h.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new Fs;if(a===sd.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=Gs.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new Fs;if(this.appendBytes(e,a,l,o),null!==n&&void 0!==n.get(_h.QR_VERSION)){var d=Number.parseInt(n.get(_h.QR_VERSION).toString(),10);c=Ql.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,r))throw new Th("Data too big for requested version")}else c=this.recommendVersion(r,a,s,l);var f=new Fs;f.appendBitArray(s);var p=a===sd.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var w=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),y=new Ih;y.setECLevel(r),y.setMode(a),y.setVersion(c);var v=c.getDimensionForVersion(),_=new Ch(v,v),E=this.chooseMaskPattern(w,r,c,_);return y.setMaskPattern(E),Dh.buildMatrix(w,r,c,E,_),y.setMatrix(_),y},t.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,Ql.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(void 0===r&&(r=null),Gs.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return sd.KANJI;for(var n=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return sd.BYTE;o=!0}}return o?sd.ALPHANUMERIC:n?sd.NUMERIC:sd.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=Ys.encode(t,Gs.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Ih.NUM_MASK_PATTERNS;a++){Dh.buildMatrix(t,e,r,a,n);var s=this.calculateMaskPenalty(n);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var o=Ql.getVersionForNumber(n);if(t.willFit(e,o,r))return o}throw new Th("Data too big")},t.willFit=function(t,e,r){return e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new Th("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(1&n?17:236,8);if(e.getSize()!==r)throw new Th("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(n>=r)throw new Th("Block ID too large");var a=t%r,s=r-a,u=Math.floor(t/r),c=u+1,l=Math.floor(e/r),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Th("EC bytes mismatch");if(r!==s+a)throw new Th("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Th("Total bytes mismatch");n<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,r,n,o){var i,a,s,u;if(e.getSizeInBytes()!==n)throw new Th("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,o,f,p,g);var m=p[0],w=new Uint8Array(m);e.toBytes(8*c,w,0,m);var y=t.generateECBytes(w,g[0]);h.push(new Oh(w,y)),l=Math.max(l,m),d=Math.max(d,y.length),c+=p[0]}if(n!==c)throw new Th("Data bytes does not match offset");var v=new Fs;for(f=0;f<l;++f)try{for(var _=(i=void 0,Rh(h)),E=_.next();!E.done;E=_.next()){f<(w=E.value.getDataBytes()).length&&v.appendBits(w[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Rh(h)),A=b.next();!A.done;A=b.next()){f<(y=A.value.getErrorCorrectionBytes()).length&&v.appendBits(y[f],8)}}catch(t){s={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(r!==v.getSizeInBytes())throw new Th("Interleaving error: "+r+" and "+v.getSizeInBytes()+" differ.");return v},t.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new Eh(Cu.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(t>=1<<o)throw new Th(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},t.appendBytes=function(e,r,n,o){switch(r){case sd.NUMERIC:t.appendNumericBytes(e,n);break;case sd.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case sd.BYTE:t.append8BitBytes(e,n,o);break;case sd.KANJI:t.appendKanjiBytes(e,n);break;default:throw new Th("Invalid mode: "+r)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getDigit(e.charAt(o));if(o+2<n){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));r.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<n){a=t.getDigit(e.charAt(o+1));r.appendBits(10*i+a,7),o+=2}else r.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Th;if(o+1<n){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Th;r.appendBits(45*i+a,11),o+=2}else r.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,r){var n;try{n=Ys.encode(t,r)}catch(t){throw new Th(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var r;try{r=Ys.encode(t,Gs.SJIS)}catch(t){throw new Th(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Th("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(sd.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=Gs.UTF8.getName()}();var Mh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=r,c.dataHeight=n,c.left=o,c.top=i,o+a>r||i+s>n)throw new Cs("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Mh(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Cs("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Os.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Os.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Os.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];n[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=r[a];r[a]=r[s],r[s]=u}},e.prototype.invert=function(){return new iu(this)},e.THUMBNAIL_SCALE_FACTOR=2}(nu);var Nh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var u=t.call(this,r,n)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=r*n,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=r),void 0===i&&(u.dataHeight=n),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+r>u.dataWidth||u.top+n>u.dataHeight)throw new Cs("Crop rectangle does not fit within image data.");return u}Nh(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Cs("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Os.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Os.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Os.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new iu(this)}}(nu);var kh,Ph,xh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xh(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(Gs),Fh=function(){function t(){}return t.ISO_8859_1=Gs.ISO8859_1,t}();kh=function(t,e){for(var r=1,n=0;n<255;n++)e[n]=r,t[r]=n,(r*=2)>=256&&(r^=301);return{LOG:t,ALOG:e}}([],[]),kh.LOG,kh.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(Ph||(Ph={}));var Lh,zh="[)>05",Uh="[)>06",Vh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(rf.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),r=rf.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(r!==this.getEncodingMode())switch(r){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+r)}else rf.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(rf.isDigit(t)&&rf.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),Hh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new Zs;for(e.append(0);t.hasMoreCharacters();){var r=t.getCurrentChar();if(e.append(r),t.pos++,rf.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var n=e.length()-1,o=t.getCodewordCount()+n+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(n<=249)e.setCharAt(0,qs.getCharAt(n));else{if(!(n<=1555))throw new Error("Message length not in valid ranges: "+n);e.setCharAt(0,qs.getCharAt(Math.floor(n/250)+249)),e.insert(1,qs.getCharAt(n%250))}var a=0;for(r=e.length();a<r;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var r=t+(149*e%255+1);return r<=255?r:r-256},t}(),jh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new Zs,r=0,n=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,r=this.encodeChar(i,e),e.length()%3==0&&(n=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(r>3||1!==u))&&(t.pos=n)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new Zs;t.hasMoreCharacters();){var r=t.getCurrentChar();t.pos++;var n=this.encodeChar(r,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new Zs;for(e.length()%3==2&&2!==a&&(n=this.backtrackOneCharacter(t,e,s,n));e.length()%3==1&&(n>3||1!==a);)n=this.backtrackOneCharacter(t,e,s,n);break}if(e.length()%3==0)if(rf.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,r,n){var o=e.length(),i=e.toString().substring(0,o-n);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return n=this.encodeChar(a,r),t.resetSymbolInfo(),n},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(3);e.setLengthToZero(),e.append(r)},t.prototype.handleEOD=function(t,e){var r=Math.floor(e.length()/3*2),n=e.length()%3,o=t.getCodewordCount()+r;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===n){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===n){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==n)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,r=e/256,n=e%256,o=new Zs;return o.append(r),o.append(n),o.toString()},t}(),Gh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new Zs;t.hasMoreCharacters();){var r=t.getCurrentChar();if(this.encodeChar(r,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(4);if(e.setLengthToZero(),e.append(n),rf.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(qs.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var r=e.length();if(0===r)return;if(1===r){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>n&&(t.updateSymbolInfo(t.getCodewordCount()+1),n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=n&&n<=2)return}if(r>4)throw new Error("Count must not exceed 4");var i=r-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(qs.getCharAt(t-64)):rf.illegalCharacter(qs.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var r=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),n=r>>16&255,o=r>>8&255,i=255&r,a=new Zs;return a.append(n),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),Wh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yh=function(){function t(t,e,r,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=r,this.matrixWidth=n,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,r,n,o){var i,a;void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!0);try{for(var s=Xh(Zh),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==r||!(c.getSymbolWidth()<r.getWidth()||c.getSymbolHeight()<r.getHeight()))&&(null==n||!(c.getSymbolWidth()>n.getWidth()||c.getSymbolHeight()>n.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),qh=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return Wh(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(Yh),Zh=[new Yh(!1,3,5,8,8,1),new Yh(!1,5,7,10,10,1),new Yh(!0,5,7,16,6,1),new Yh(!1,8,10,12,12,1),new Yh(!0,10,11,14,6,2),new Yh(!1,12,12,14,14,1),new Yh(!0,16,14,24,10,1),new Yh(!1,18,14,16,16,1),new Yh(!1,22,18,18,18,1),new Yh(!0,22,18,16,10,2),new Yh(!1,30,20,20,20,1),new Yh(!0,32,24,16,14,2),new Yh(!1,36,24,22,22,1),new Yh(!1,44,28,24,24,1),new Yh(!0,49,28,22,14,2),new Yh(!1,62,36,14,14,4),new Yh(!1,86,42,16,16,4),new Yh(!1,114,48,18,18,4),new Yh(!1,144,56,20,20,4),new Yh(!1,174,68,22,22,4),new Yh(!1,204,84,24,24,4,102,42),new Yh(!1,280,112,14,14,16,140,56),new Yh(!1,368,144,16,16,16,92,36),new Yh(!1,456,192,18,18,16,114,48),new Yh(!1,576,224,20,20,16,144,56),new Yh(!1,696,272,22,22,16,174,68),new Yh(!1,816,336,24,24,16,136,56),new Yh(!1,1050,408,18,18,36,175,68),new Yh(!1,1304,496,20,20,36,163,62),new qh],Kh=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),r=new Zs,n=0,o=e.length;n<o;n++){var i=String.fromCharCode(255&e[n]);if("?"===i&&"?"!==t.charAt(n))throw new Error("Message contains characters outside ISO-8859-1 encoding.");r.append(i)}this.msg=r.toString(),this.shape=0,this.codewords=new Zs,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=Yh.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),$h=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $h(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new Zs;t.hasMoreCharacters();){var r=t.getCurrentChar();if(t.pos++,this.encodeChar(r,e),e.length()%3==0)if(this.writeNextTriplet(t,e),rf.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):rf.illegalCharacter(qs.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),n=e.length();t.pos-=n,(t.getRemainingCharacters()>1||r>1||t.getRemainingCharacters()!==r)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(jh),Qh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qh(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},e}(jh),ef=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!1);var i=new jh,a=[new Vh,i,new tf,new Jh,new Gh,new Hh],s=new Kh(t);s.setSymbolShape(e),s.setSizeConstraints(r,n),t.startsWith(zh)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=7):t.startsWith(Uh)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=7);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,r){var n=this.lookAheadTestIntern(t,e,r);if(3===r&&3===n){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===r&&4===n)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return n},t.lookAheadTestIntern=function(t,e,r){if(e>=t.length)return r;var n;0===r?n=[0,1,1,1,1,1.25]:(n=[1,2,2,2,2,2.25])[r]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){xs.fill(i,0),xs.fill(a,0);var s=this.findMinimums(n,a,Bs.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?n[0]+=.5:this.isExtendedASCII(c)?(n[0]=Math.ceil(n[0]),n[0]+=2):(n[0]=Math.ceil(n[0]),n[0]++),this.isNativeC40(c)?n[1]+=2/3:this.isExtendedASCII(c)?n[1]+=8/3:n[1]+=4/3,this.isNativeText(c)?n[2]+=2/3:this.isExtendedASCII(c)?n[2]+=8/3:n[2]+=4/3,this.isNativeX12(c)?n[3]+=2/3:this.isExtendedASCII(c)?n[3]+=13/3:n[3]+=10/3,this.isNativeEDIFACT(c)?n[4]+=3/4:this.isExtendedASCII(c)?n[4]+=4.25:n[4]+=3.25,this.isSpecialB256(c)?n[5]+=4:n[5]++,o>=4){if(xs.fill(i,0),xs.fill(a,0),this.findMinimums(n,a,Bs.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,r,n,o){var i=Math.min(t,Math.min(e,Math.min(r,n)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,r,n){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);r>i&&(r=i,xs.fill(n,0)),r===i&&(n[o]=n[o]+1)}return r},t.getMinimumCount=function(t){for(var e=0,r=0;r<6;r++)e+=t[r];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var r=t.length,n=e;n<r&&this.isDigit(t.charCodeAt(n));)n++;return n-e},t.illegalCharacter=function(t){var e=Bs.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),rf=ef,nf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},of=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=Ys.encode(t,this.charset)}catch(t){return!1}},t}(),af=function(){function t(t,e,r){var n,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new of(Bh.forName(t))})),this.encoders=[];var c=[];c.push(new of(Fh.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(n=void 0,nf(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===r||g.canEncode(m)){h=!0;break}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(!h)try{for(var w=(i=void 0,nf(this.ENCODERS)),y=w.next();!y.done;y=w.next()){if((g=y.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{y&&!y.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var v=0;try{for(var _=nf(c),E=_.next();!E.done;E=_.next()){g=E.value;this.encoders[v++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return Ys.encode(qs.getCharAt(t),this.encoders[e].name)},t}(),sf=function(){function t(t,e,r){this.fnc1=r;var n=new af(t,e,r);if(1===n.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===r?1e3:i}else this.bytes=this.encodeMinimally(t,n,r)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var r=0;r<e;r++)if(this.isECI(t+r))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var r=new Zs,n=t;n<e;n++){if(this.isECI(n))throw new Error("value at "+n+" is not a character but an ECI");r.append(this.charAt(n))}return r.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,r){(null==t[e][r.encoderIndex]||t[e][r.encoderIndex].cachedTotalSize>r.cachedTotalSize)&&(t[e][r.encoderIndex]=r)},t.prototype.addEdges=function(t,e,r,n,o,i){var a=t.charAt(n).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(r,n+1,new uf(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,r){var n=t.length,o=new(uf[n+1][e.length()]);this.addEdges(t,e,o,0,null,r);for(var i=1;i<=n;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<n&&this.addEdges(t,e,o,i,o[i][a],r);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Bs.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[n][a]){var c=o[n][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[n][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),uf=function(){function t(t,e,r,n,o){this.c=t,this.encoderSet=e,this.encoderIndex=r,this.previous=n,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,r).length;(null===n?0:n.encoderIndex)!==r&&(i+=3),null!=n&&(i+=n.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),cf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(Lh||(Lh={})),function(t){function e(e,r,n,o,i){var a=t.call(this,e,r,n)||this;return a.shape=o,a.macroId=i,a}cf(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(sf);var lf=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),df=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hf=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return df(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Bs.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(lf),ff=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}ff(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(hf);new hf(null,0,0);var pf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,r;try{for(var n=pf(t),o=n.next();!o.done;o=n.next()){var i=o.value;xs.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(xs.createInt32Array(6,6)),function(t){var e=qs.getCharCode(" "),r=qs.getCharCode("."),n=qs.getCharCode(",");t[0][e]=1;for(var o=qs.getCharCode("Z"),i=qs.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=qs.getCharCode("z"),u=qs.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=qs.getCharCode("9"),l=qs.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][qs.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)qs.getCharCode(f[h])>0&&(t[4][qs.getCharCode(f[h])]=h)}(xs.createInt32Array(5,256));var gf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mf=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return gf(e,t),e.makeBufferFromCanvasImageData=function(t){var r;try{r=t.getContext("2d",{willReadFrequently:!0})}catch(e){r=t.getContext("2d")}if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Cs("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new iu(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var u=r.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(n),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(nu);function wf(){return"undefined"!=typeof navigator}function yf(){return!!(wf()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var vf=function(){return vf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},vf.apply(this,arguments)},_f=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ef=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},bf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Af={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Cf=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=vf(vf({},Af),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(zs.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return _f(this,void 0,void 0,(function(){return Ef(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=bf(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new bs("element with id '".concat(t,"' not found"));if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new bs("element with id '".concat(t,"' must be an ").concat(e," element"));return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new mf(t),r=new ru(e);return new Is(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new bs("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return _f(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return Ef(this,(function(h){switch(h.label){case 0:if(!wf())throw new Error("Can't enumerate devices, navigator is not present.");if(!yf())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=bf(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,r){return _f(this,void 0,void 0,(function(){return Ef(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),_f(this,void 0,void 0,(function(){var o;return Ef(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new bs("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:if(!e)throw new bs("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:if(!e)throw new bs("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return _f(this,void 0,void 0,(function(){var o,i;return Ef(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return _f(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return Ef(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,n,a),u=e.getVideoTracks(),c=vf(vf({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return _f(this,void 0,void 0,(function(){var r,n,o,i,a,s;return Ef(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=bf(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return _f(h,void 0,void 0,(function(){return Ef(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return r.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return _f(h,void 0,void 0,(function(){return Ef(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return _f(this,void 0,void 0,(function(){var o;return Ef(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return _f(this,void 0,void 0,(function(){var n,o;return Ef(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new bs("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return _f(this,void 0,void 0,(function(){var n,o,i;return Ef(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new bs("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:return[4,this.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return _f(this,void 0,void 0,(function(){var n,o;return Ef(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return _f(this,void 0,void 0,(function(){var r,n;return Ef(this,(function(o){switch(o.label){case 0:if(!e)throw new bs("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return _f(this,void 0,void 0,(function(){var r,n;return Ef(this,(function(o){switch(o.label){case 0:if(!e)throw new bs("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof Js&&e)return;if(o instanceof Ts&&r)return;if(o instanceof Vs&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}},d=function(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);r(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(r(void 0,t,l),t instanceof Ts||t instanceof Vs||t instanceof Js)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),n&&n(t)}};return d(),l},t.prototype._decodeOnLoadImage=function(e){return _f(this,void 0,void 0,(function(){return Ef(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return _f(this,void 0,void 0,(function(){var r;return Ef(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=n.sent(),t.streamTracker.push(r),[2,r]}}))}))},t.streamTracker=[],t}(),If=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Wu,e,r)||this}If(e,t)}(Cf);var Sf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Tl(e),e,r)||this}Sf(e,t)}(Cf);var Tf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new jl,e,r)||this}Tf(e,t)}(Cf);var Df=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Of=function(t){function e(e,r){var n=this,o=new gh;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}return Df(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(zs.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(Cf),Rf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new dh,e,r)||this}Rf(e,t)}(Cf);var Mf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new bd,e,r)||this}Mf(e,t)}(Cf);const Nf=[gu.PDF_417,gu.QR_CODE];class kf{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Nf;this.reader=new Of,this.formats=t,this.reader.possibleFormats=t,fs("Barcode detector initialized",t.map((t=>gu[t])))}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,r=-1/0,n=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>r&&(r=t),a<n&&(n=a),a>o&&(o=a)}return{x:e,y:n,width:r-e,height:o-n}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(!r)return fs("Warning: Unable to get 2D context for canvas."),[];null==r||r.drawImage(t,0,0)}const r=[],n=new Set,o=t=>{try{const t=this.reader.decodeFromCanvas(e);fs("Barcode detected:",t);const o=this.getXYWidthHeight(t.getResultPoints()),i=gu[t.getBarcodeFormat()],a=t.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};r.push(u),fs("Barcode result:",u)}catch(e){fs(void 0!==t?`Barcode not detected for format ${gu[t]}`:"Barcode not detected"),"NotFoundException"!==(null==e?void 0:e.name)&&fs("Barcode detection error:",e)}};if(0===this.formats.length)return o(),r;for(const t of this.formats){const e=new Map;e.set(zs.POSSIBLE_FORMATS,[t]),e.set(zs.TRY_HARDER,!0),this.reader.setHints(e),o(t)}return r}}var Pf;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(Pf||(Pf={}));const xf={[ps.DOCUMENT_DETECTOR]:{status:Pf.LOADING},[ps.BLUR_GLARE_CLASSIFIER]:{status:Pf.LOADING},[ps.FACE_LANDMARK]:{status:Pf.LOADING}};let Bf=null;function Ff(t){if(Bf)return fs("Reusing existing barcode detector instance"),Bf;try{return Bf=new kf((t=>{const e={Aztec:gu.AZTEC,Codabar:gu.CODABAR,Code39:gu.CODE_39,Code93:gu.CODE_93,Code128:gu.CODE_128,DataMatrix:gu.DATA_MATRIX,EAN8:gu.EAN_8,EAN13:gu.EAN_13,ITF:gu.ITF,MaxiCode:gu.MAXICODE,PDF417:gu.PDF_417,QRCode:gu.QR_CODE,UPCA:gu.UPC_A,UPCE:gu.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),fs("Created new barcode detector instance"),Bf}catch(t){throw fs("Error initializing barcode model",t),us("Error initializing barcode model","barcode_model_not_supported","init"),t}}const Lf=[ps.DOCUMENT_DETECTOR,ps.BLUR_GLARE_CLASSIFIER],zf=async()=>{let t=!1;for(;!t;){const e=Object.values(xf).filter((t=>t.status===Pf.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=Lf.every((t=>xf[t].status===Pf.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Uf=t=>"function"==typeof t,Vf=function(t){};let Hf;Ma.events.on(Ma.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=Ma.moduleMetadata.getInitConfig();if(!t||!e)return!1;const r=(null==e?void 0:e.serverPath)&&(n=null==e?void 0:e.serverPath,o="/verify",(null==n?void 0:n.endsWith(o))?n.slice(0,n.length-o.length):n);var n,o;if(!r)throw new Error("Failed to load SDK: serverPath param required");vi.BASE=r,Ya.dispatch("setClientId",t),Ya.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),Ya.dispatch("setServerPath",null==e?void 0:e.serverPath),Ya.dispatch("setLanguage",null==e?void 0:e.language),Ya.dispatch("setCallback",null==e?void 0:e.callback),Ya.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),Ya.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),Ya.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),Ya.dispatch("setCdnHost",null==e?void 0:e.cdnHost),void 0!==(null==e?void 0:e.isImageSigningEnabled)&&Ya.dispatch("setIsImageSigningEnabled",e.isImageSigningEnabled);(null==e?void 0:e.callbacks)&&$f(e);return Ya.dispatch("setStartToken",null==e?void 0:e.startToken),Hf=Ga(Ya.state.clientId,null==e?void 0:e.language).then((t=>Jf(t))),function(t){La({type:"init",step:t})}("init"),!0})),Ma.events.on(Na,(function(t){switch(ss.handelEventData(t),Kf(t),t.type){case"session-granted":jf({session:Ya.state.sessionId});break;case"session-id-acquired":Gf({session:Ya.state.sessionId});break;case"capture-image-result":Wf({session:Ya.state.sessionId},t.imageType);break;case"start-verification-processing":Xf({session:Ya.state.sessionId});break;case"verification-complete":Yf({session:Ya.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Zf({session:Ya.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":qf({session:Ya.state.sessionId},t.reason)}}));let jf=Vf,Gf=Vf,Wf=Vf,Xf=Vf,Yf=Vf,qf=Vf,Zf=Vf,Kf=t=>{};const $f=t=>{let{callbacks:e,callback:r}=t;Uf(e.sessionGranted)&&(jf=e.sessionGranted),Uf(e.sessionStarted)&&(Gf=e.sessionStarted),Uf(e.imageSubmitted)&&(Wf=e.imageSubmitted),Uf(e.processing)&&(Xf=e.processing),Uf(e.completed)&&(Yf=e.completed),Uf(e.recapture)&&(qf=e.recapture),Uf(e.error)&&(Zf=e.error),Uf(r)&&(Kf=r)};async function Jf(t){if((null==t?void 0:t.strings)&&ds.overrideLanguage(t.strings),Ya.dispatch("setCaptureApprovalSettings",null==t?void 0:t.capture_approval_settings),null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return Ya.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),fs("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;xf[e]={status:Pf.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:o(o({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;xf[e].status=Pf.NOT_AVAILABLE,us(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));us("service worker not available","service_worker_not_available","init")}Ya.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null==t?void 0:t.autocapture_settings})}async function Qf(t,e,r){vi.HEADERS=is(r,e);var n;return(await(n=t,ja({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}async function tp(t,e,r,n){var i;vi.HEADERS=is(e);const a=await(s={start_token:t,accessed_from_desktop:!1,client_type:Ai.client_type.MOBILE_SDK,consent:{granted:!0,document_id:r},image_signing_public_key:n},ja({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:s,mediaType:"application/json"},"init"));var s;const u=a.body.settings,c=null!==(i=null==u?void 0:u.flowType)&&void 0!==i?i:null==u?void 0:u.flow_type,l="string"==typeof c?c:void 0;return o({sessionId:a.body.session_id,userToken:a.body.user_token,requiredImages:a.body.required_images},l&&{flowType:l})}async function ep(t,e,r){let n,i,a,s;try{const t=xa(Pa),e=JSON.parse(t);n=e.sessionId,i=e.userToken,a=e.flowType,s=e.startToken}catch(t){}const u=n&&i&&(!t||s===t),c=!0===Ya.state.isImageSigningEnabled,l=!c&&u&&null!=n&&null!=i;try{let s;if(l){s=(await Qf(n,i,r)).missing_images}else{if(!t)throw new Error(c?"Image signing is enabled but no start token is available to register a public key":"No start token and no valid cached session");let o;if(c){const t=Ma.crypto.createCryptoBinding("sign");if(o=(await t.getPublicData()).publicKey,!o)throw new Error("Image signing is enabled but failed to generate a public key")}const u=await tp(t,r,e,o);n=u.sessionId,i=u.userToken,s=u.requiredImages,a=u.flowType;const l=JSON.stringify({sessionId:n,userToken:i,flowType:a,startToken:t});d=Pa,h=l,sessionStorage.setItem(d,h)}return o({requiredImages:s,sessionId:n.toString(),userToken:i.toString()},void 0!==a&&""!==a&&{flowType:a})}catch(t){throw console.log("Error starting session"),console.error(t),t}var d,h}function rp(t){let{tagName:e,style:r,id:n="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=n,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(r).forEach((t=>{s.style[t]=r[t]})),s}function np(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const op=async(t,e,r,n,i,a,s,u)=>{var c,l,d,h,f,p,g;vi.HEADERS=is(r,e);const m=Qa.UAParser();let w;if(Ya.state.isImageSigningEnabled){const t=Ma.crypto.createCryptoBinding("sign");w=await t.sign(n.data)}const y=await(v=t,_=o({image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:w,raw_barcode_data:s},device_info:{model:null===(c=null==m?void 0:m.device)||void 0===c?void 0:c.model,type:null===(l=null==m?void 0:m.device)||void 0===l?void 0:l.type,manufacturer:null===(d=null==m?void 0:m.device)||void 0===d?void 0:d.vendor,os:null===(h=null==m?void 0:m.os)||void 0===h?void 0:h.name,os_version:null===(f=null==m?void 0:m.os)||void 0===f?void 0:f.version,browser:null===(p=null==m?void 0:m.browser)||void 0===p?void 0:p.name,browser_version:null===(g=null==m?void 0:m.browser)||void 0===g?void 0:g.version,used_camera:null==i?void 0:i.selectedCamera,cameras:null==i?void 0:i.camerasInfo}},u?{acquisition_id:u}:{}),ja({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:v},body:_,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},_.image.image_type));var v,_;const E=function(t,e){const r=[...t].find((t=>t.includes(e)));return void 0!==r?r[1]:void 0}(y.headers,"x-ts-processing-time-ms");return"ok"!==y.body.feedback&&console.error("Error",y),{missing_images:y.body.missing_images,feedback:y.body.feedback,custom_feedback:y.body.custom_feedback,has_barcode:y.body.has_barcode,supported_barcode_symbologies:y.body.supported_barcode_symbologies,serverProcessingTime:E}},ip=()=>{const t=document.getElementById("overlay-frame");if(t){const e=t.getBoundingClientRect(),r=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+e.top,bottom:n+e.bottom,right:r+e.right,left:r+e.left}}},ap=t=>["document_front","document_back"].includes(t)?"environment":"user";function sp(t){switch(t){case"document_front":return Ei.image_type.DOCUMENT_FRONT;case"document_back":return Ei.image_type.DOCUMENT_BACK;case"selfie":return Ei.image_type.SELFIE}}var up={},cp={get exports(){return up},set exports(t){up=t}};cp.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(1),o=r(7);r.d(e,"a",(function(){return o.a})),r.d(e,"d",(function(){return n.b}));var i=n.a.FACING_MODES,a=n.a.IMAGE_TYPES},function(t,e,r){var n=r(6);r.d(e,"a",(function(){return n.a}));var o=r(2);r.d(e,"b",(function(){return o.a}))},function(t,e,r){function n(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var r={};try{n(t,e),r.imageType=t,r.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),r.imageType=h.c.PNG,r.imageCompression=null}return r}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,r){var n=t*parseFloat(r);return{imageWidth:n,imageHeight:e/(t/n)}}function u(t,e,r){return o(e,r).imageType===h.c.JPG?r?t.toDataURL(h.b[h.c.JPG],r):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=r(3)},function(t,e,r){function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(n(o={},"jpg","image/jpeg"),n(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,r){t.exports=r(5)},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);r.d(e,"FACING_MODES",(function(){return n.b})),r.d(e,"IMAGE_TYPES",(function(){return n.c})),r.d(e,"_getDebugPlatformInfo",(function(){return n.d}));var o=r(9);r.d(e,"downloadPhoto",(function(){return o.a})),e.default=n.a},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return s}));var o=r(2),i=r(3),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(){n(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var r=e.sizeFactor,n=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,r),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,n,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),r=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(r){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,r){n.call(navigator,t,e,r)}))}};t=Object.assign(n,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,r){if(!Object(o.e)(e,r))return i.d;var n=t.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:r&&r.width,height:r&&r.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",r);var n=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],i=t.getIdealConstraints(e,{});if(0===r)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=n,i);if(r<n.length){var a=n.slice(0,-r);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return u}));var o=r(1),i=r(8),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){n(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var r=this;return new Promise((function(n,i){var a=o.a.getIdealConstraints(t,e);r.mediaDevices.getUserMedia(a).then((function(t){r._gotStream(t),n(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,r=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==r){var n={};return this._getStreamDevice(t,n)}return new Promise((function(n,o){e.mediaDevices.getUserMedia(r).then((function(t){e._gotStream(t),n(t)})).catch((function(r){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(r)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,r){var n=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&n.push(t)})),e(n)})).catch((function(t){r(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var r=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return r._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,r){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),r(Error("no stream to stop!"))}))}}]),t}()},function(t,e,r){r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=1,o=null,i=!1},function(t,e,r){var n=r(10);r.d(e,"a",(function(){return n.a}))},function(t,e,r){function n(t){for(var e=atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([n],{type:r})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,r){return t+"-"+o(e,4)+"."+i(r)}function s(t,e,r){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=a(e,r,t.type),n.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(t),e,r)}e.a=u;var c=r(0)}]);var lp=a(up);class dp{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return dp.instance||(dp.instance=new dp),dp.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const hp=["tele","telephoto","macro","portrait","zoom"],fp=["ultra","wide","uw","front","selfie"];function pp(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}function gp(t){const e=t.toLowerCase();let r=0;if(pp())"back camera"!==e&&"rear camera"!==e||(r+=5),(e.includes("telephoto")||e.includes("tele"))&&(r-=2),(e.includes("ultra")||e.includes("wide"))&&(r-=3);else{hp.forEach((t=>{e.includes(t)&&(r+="macro"===t?4:3)})),fp.forEach((t=>{e.includes(t)&&(r-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(r+=Math.min(parseFloat(t[1]),6));const n=e.match(/camera2?\s+(\d+)/);if(n){const t=parseInt(n[1]);0===t?r+=3:t>=2&&(r-=2)}}return r}async function mp(t){let e=0;try{const r=dp.getInstance();await r.startNewStream({video:{deviceId:{exact:t}},audio:!1});const n=r.getStream();if(!n)return e;const o=n.getVideoTracks()[0].getCapabilities();return r.stopStream(),o.zoom&&(e+=Math.min(o.zoom.max||0,2)),o.focusMode&&Array.isArray(o.focusMode)&&o.focusMode.includes("continuous")&&(e+=2),o.focusDistance&&(e+=1),e}catch(t){return e}}async function wp(){const t=(await async function(){const t=dp.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return yp.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};if(pp())return{optionalCameras:t};const e=t.map((t=>({camera:t,score:gp(t.label)}))),r=Math.max(...e.map((t=>t.score)));if(r<=0)return{optionalCameras:t,selectedCamera:t[0]};const n=e.filter((t=>t.score===r));if(1===n.length)return{optionalCameras:t,selectedCamera:n[0].camera};let o=n[0].camera,i=-1/0;for(const{camera:t,score:e}of n){const r=e+await mp(t.deviceId);r>i&&(i=r,o=t)}return{optionalCameras:t,selectedCamera:o}}const yp=["rear","back","tele","telephoto","macro","portrait","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक","camera2 0, facing back"],vp={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},_p={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Ep=async t=>{var e,r;let n;return"environment"==t&&(n=await wp()),null!==(r=null===(e=null==n?void 0:n.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==r?r:t},bp=(t,e)=>{var r,n;return"user"===t?null!==(r=null==e?void 0:e.selfieVideoConstraints)&&void 0!==r?r:_p:null!==(n=null==e?void 0:e.environmentVideoConstraints)&&void 0!==n?n:vp},Ap=t=>{const e=rp({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},Cp={title:"other_error_code_title",message:"other_error_code_message"},Ip={ok:Cp,document_face_not_found:Cp,restricted_criteria:Cp,other:Cp,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},Sp={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},Tp=(t,e)=>{const r=rp({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${t}`,testid:`overlay-frame ${t}`});if("environment"===t){!function(t){np(t,rp({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),np(t,rp({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),np(t,rp({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),np(t,rp({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(r);const t=.85*e.clientWidth;r.style.width=`${t}px`,r.style.height=.65*t+"px",r.style.maxHeight=.5*window.innerHeight+"px"}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);r.style.width=.8*t+"px",r.style.height=`${t}px`,r.style.minHeight=.8*t+"px",r.style.maxHeight=.5*window.innerHeight+"px",r.style.borderRadius="50%"}return r};const Dp=t=>{var e;const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("viewBox","0 0 68 68"),r.innerHTML='<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="#fff" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>',null!=t&&(null===(e=r.querySelector("circle"))||void 0===e||e.setAttribute("stroke",t)),r};function Op(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',t}const Rp={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},Mp=t=>{let{text:e,level:r=1,style:n={},id:i,testid:a}=t;const s=rp({tagName:`h${r}`,style:o(o(o({},Rp.all),Rp[r]),n),id:i,testid:a});return s.textContent=e,s.id=i,s};var Np,kp={};let Pp=null;try{Pp=(Np||(Np=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="string"==typeof t?t:t.source;const n={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),r=r.replace(t,o),n},getRegex:()=>new RegExp(r,e)};return n}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E96}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}-\u{16FF6}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1CCF0}-\u{1CCF9}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),v={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:w,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:i,text:/^[^\n]+/},_=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=o(o({},v),{},{table:_,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=o(o({},v),{},{html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C=/^( {2,}|\\)\n(?!\s*$)/,I="\\p{P}\\p{S}",S=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,I).getRegex(),T=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,I).getRegex(),D=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,I).getRegex(),O=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,I).getRegex(),R=a(/\\([punct])/,"gu").replace(/punct/g,I).getRegex(),M=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),N=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),k=a("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",N).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),P=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,x=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",P).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",P).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:i,anyPunctuation:R,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:C,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:T,emStrongRDelimAst:D,emStrongRDelimUnd:O,escape:A,link:x,nolink:F,punctuation:S,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:k,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},z=o(o({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",P).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",P).getRegex()}),U=o(o({},L),{},{escape:a(A).replace("])","~|])").getRegex(),url:a(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=o(o({},U),{},{br:a(C).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:v,gfm:E,pedantic:b},j={normal:L,gfm:U,breaks:V,pedantic:z},G={"&":"&","<":"<",">":">",'"':""","'":"'"},W=t=>G[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function q(t,e){const r=t.replace(s.findPipe,((t,e,r)=>{let n=!1,o=e;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(s.splitPipe);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(s.slashPipe,"|");return r}function Z(t,e,r){const n=t.length;if(0===n)return"";let o=0;for(;o<n;){const i=t.charAt(n-o-1);if(i!==e||r){if(i===e||!r)break;o++}else o++}return t.slice(0,n-o)}function K(t,e,r,n,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){n.state.inLink=!0;const t={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,t}return{type:"image",raw:r,href:i,title:a,text:s}}class ${constructor(e){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Z(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(null===n)return e;const o=n[1];return e.split("\n").map((t=>{const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=Z(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Z(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=Z(e[0],"\n").split("\n"),r="",n="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,n=n.substring(0,n.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,r=r.substring(0,r.length-l.raw.length)+a.raw,n=n.substring(0,n.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let a=!1;for(;t;){let r=!1,n="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(r.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),n+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const r=q(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<r.length;t++)i.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(q(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=Z(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),K(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return K(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let o,i,a=r,s=0;const u="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=u.exec(e));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...n[0]][0].length,u=t.slice(0,r+n.index+e+i);if(Math.min(r,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var r,n;i=e[0],e[0]=null!==(r=null===(n=this.rules.inline._backpedal.exec(e[0]))||void 0===n?void 0:n[0])&&void 0!==r?r:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class J{constructor(e){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:s,block:H.normal,inline:j.normal};this.options.pedantic?(n.block=H.pedantic,n.inline=j.pedantic):this.options.gfm&&(n.block=H.gfm,this.options.breaks?n.inline=j.breaks:n.inline=j.gfm),this.tokenizer.rules=n}static get rules(){return{block:H,inline:j}}static lex(t,e){return new J(e).lex(t)}static lexInline(t,e){return new J(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(e=r.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?o.push(e):(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(r.raw+="\n"+e.raw,r.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(n)))r=o[o.length-1],i&&"paragraph"===(null===(a=r)||void 0===a?void 0:a.type)?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e),i=n.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),r=o[o.length-1],r&&"text"===r.type?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,r,n,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(e=r.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),r=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),r=s[s.length-1],r&&"text"===e.type&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(n))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,r=s[s.length-1],r&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class Q{constructor(e){r(this,"options",void 0),r(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:r,lang:n,escaped:o}=t;const i=null===(e=(n||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=r.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:r}=t;return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e<t.items.length;e++){const r=t.items[e];n+=this.listitem(r)}const o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:r,tokens:n}=t;const o=this.parser.parseInline(n),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return r&&(a+=' title="'+X(r)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:r,text:n}=t;const o=Y(e);if(null===o)return X(n);let i=`<img src="${e=o}" alt="${n}"`;return r&&(i+=` title="${X(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=e||t.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const i=o;switch(i.type){case"space":r+=this.renderer.space(i);continue;case"hr":r+=this.renderer.hr(i);continue;case"heading":r+=this.renderer.heading(i);continue;case"code":r+=this.renderer.code(i);continue;case"table":r+=this.renderer.table(i);continue;case"blockquote":r+=this.renderer.blockquote(i);continue;case"list":r+=this.renderer.list(i);continue;case"html":r+=this.renderer.html(i);continue;case"paragraph":r+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;n+1<t.length&&"text"===t[n+1].type;)o=t[++n],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":r+=e.text(i);break;case"html":r+=e.html(i);break;case"link":r+=e.link(i);break;case"image":r+=e.image(i);break;case"strong":r+=e.strong(i);break;case"em":r+=e.em(i);break;case"codespan":r+=e.codespan(i);break;case"br":r+=e.br(i);break;case"del":r+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class rt{constructor(e){r(this,"options",void 0),r(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?J.lex:J.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}r(rt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class nt{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",et),r(this,"Renderer",Q),r(this,"TextRenderer",tt),r(this,"Lexer",J),r(this,"Tokenizer",$),r(this,"Hooks",rt),this.use(...arguments)}walkTokens(t,e){let r=[];for(const o of t)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(const n of t.rows)for(const t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;r=r.concat(this.walkTokens(t.items,e));break}default:{var n;const t=o;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[t.type]?this.defaults.extensions.childTokens[t.type].forEach((n=>{const o=t[n].flat(1/0);r=r.concat(this.walkTokens(o,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((e=>{const r=o({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=e.renderer.apply(this,n);return!1===i&&(i=r.apply(this,n)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Q(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new rt;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],i=t[n];rt.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const r=o.call(t,e);return i.call(t,r)}:t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults=o(o({},this.defaults),r)})),this}setOptions(t){return this.defaults=o(o({},this.defaults),t),this}lexer(t,e){return J.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,r)=>{const n=o({},r),i=o(o({},this.defaults),n),a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?J.lex:J.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=u(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}const ot=new nt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,n(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,n(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=Q,it.TextRenderer=tt,it.Lexer=J,it.lexer=J.lex,it.Tokenizer=$,it.Hooks=rt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=J.lex;t.Hooks=rt,t.Lexer=J,t.Marked=nt,t.Parser=et,t.Renderer=Q,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(kp)),kp).marked}catch(t){console.log("marked is not supported",t)}const xp=Pp,Bp=t=>{let{text:e,id:r,testid:n,clientHeight:o}=t;const i=!!o&&o<700,a=rp({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:r,testid:n});return np(a,Mp({text:e,level:i?6:5,style:{color:"white"},id:"page-header-text"})),a};const Fp=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Lp;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Lp||(Lp={}));const zp="#ED3232",Up="#01B678",Vp="#FFF",Hp=50;const jp=t=>!t.paused&&0!==t.videoWidth,Gp=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function Wp(t){let{context:e,onDetect:r,frame:n,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Lp.REJECTED){o(function(t){switch(t){case qa.DOCUMENT_DETECTION:return"searching_document_autocapture";case qa.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case qa.BARCODE_DETECTION:return _i.feedback.BARCODE_NOT_FOUND;case qa.BLUR_DETECTION:return _i.feedback.BLUR;case qa.GLARE_DETECTION:return _i.feedback.GLARE;case qa.FACE_DETECTION:return _i.feedback.FACE_NOT_FOUND;case qa.FACE_POSITION:return _i.feedback.FACE_TOO_SMALL}}(e.invalidFramesCause));Xp("border-color",e.invalidFramesCause===qa.DOCUMENT_DETECTION?Vp:zp)}if(a===Lp.VALID)if(i){Xp("border-color",Up);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),Xp("border-color",Vp);a===Lp.ACCEPTED&&(Xp("border-color",Vp),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await r({frame:n,suspendedPreview:!0,isManualCapture:!1,context:e}))}function Xp(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((r=>{r.style[t]=e}))}function Yp(t){let e,r,n,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,threshold:l,iouThreshold:d=.85}=t;if(a/s>=u/c){n=c/s;const t=(a*n-u)/2;e=i.x*n-t,r=i.y*n}else{n=u/a;const t=(s*n-c)/2;e=i.x*n,r=i.y*n-t}const h=e+i.width*n,f=r+i.height*n;!function(t,e,r,n){var o,i;if(null===(i=null===(o=Ya.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,r,i.width*n,i.height*n);const p=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=n-r,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:r,left:e,bottom:f,right:h}),g=p>d,m=i.width*n*(i.height*n)>l*(o.width*o.height);return g&&m}const qp=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',t}(),r=rp({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return np(r,e),np(r,Mp({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),r};const Zp=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',t}(),r=rp({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return np(r,e),np(r,Mp({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),r},Kp=t=>{let{step:e,setImage:r,camera:n}=t;var o,i,a,s;const u=Sp[e];(null===(o=Ya.state.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&"selfie"===e&&(u.instructions="second_title_face_autocapture");const c=((t,e)=>rp({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),l=rp({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=rp({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Ya.state.rootElementId);if(!h)throw new Error("Root element not found");const f=Tp(ap(e),h),p=Fp(e);np(l,p),np(l,f),"document_front"===e&&setTimeout((()=>{const t=document.getElementById(`overlay-frame ${ap(e)}`),r=document.getElementById("front-document-animation");if(t&&r){const e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const d=e.left-n.left+(e.width-u)/2,h=e.top-n.top+(e.height-c)/2;r.setAttribute("width",u.toString()),r.setAttribute("height",c.toString()),r.style.width=`${u}px`,r.style.height=`${c}px`,r.style.left=`${d}px`,r.style.top=`${h}px`}}),0);const g=(()=>{const t=rp({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),e=Op();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",np(t,e),np(t,Mp({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();np(f,g),g.style.visibility="hidden";const m=Bp({text:ds.translate(u.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),w=(t=>{let{click:e,id:r,testid:n,color:o,withLoader:i}=t;if(i){const t=Dp();t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const i=rp({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"});return np(i,t),i.addEventListener("click",e),i}{const t=rp({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(o||"white"),borderRadius:"40px",boxSizing:"border-box",flexShrink:"0",flexGrow:"0"},id:r+"-outer",testid:n+"-outer"});return np(t,rp({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"})),t.addEventListener("click",e),t}})({click:()=>r({frame:Gp(n.videoElement),suspendedPreview:!1,isManualCapture:!0}),id:"submit-image",testid:"submit-image",withLoader:null===(a=null===(i=Ya.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===a?void 0:a.enabled}),y=((t,e)=>{const r=rp({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),n=Zp(t);return np(r,qp(e)),np(r,n),r})(ds.translate("approve_button"),ds.translate("retake_button")),v=(t=>{let{title:e,text:r,clientHeight:n,customTextColor:o}=t;const i=n<700,a=rp({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Mp({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=Mp({text:r,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return np(a,s),np(a,u),a})({text:ds.translate(u.instructions),title:ds.translate(u.title),clientHeight:h.clientHeight}),_=(t=>{const e=t<700,r=rp({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Ya.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=rp({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=Op();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",Ya.state.markdownSupportText?np(n,o):np(r,o);const i=Ya.state.markdownSupportText&&null!=xp?xp.parse(Ya.state.markdownSupportText,{async:!1}):"",a=Mp({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Mp({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,np(n,a)),np(r,i?[n,s]:a),r})(h.clientHeight),E=(null===(s=Ya.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Dp():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',t}();E.style.display="none",np(d,m),np(d,v),np(d,l),np(d,_),np(c,d);const b=rp({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});np(b,E),np(b,w),np(b,y),np(c,b),np(c,n.videoElement);const A=function(t){return rp({tagName:"img",style:{display:"block",position:"absolute",objectFit:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cover",height:"100%",width:"100%",transform:"user"===t?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"})}(ap(e)),C=(t=>{const e=rp({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(A);return np(c,C),{component:c,setLoadingMode:t=>{var e;w.style.display="none",_.style.visibility="hidden",E.style.display="block",(null===(e=Ya.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(E.style.height="63px",E.style.width="63px"),t&&(g.style.visibility="visible")},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:r}=t;var n,o;w.style.display="none",_.style.display="none",y.style.display="flex";const i=y.querySelector("#approve-image"),a=y.querySelector("#retake-image"),s=i.cloneNode(!0);null===(n=i.parentNode)||void 0===n||n.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",r)},hideApprovalRetakeButtons:()=>{y.style.display="none",_.style.display="flex"},setPreviewImage:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{hideSpinner:r=!1,objectFit:o}=e;A.src=t,o&&(A.style.objectFit=o),g.style.visibility="hidden",n.videoElement.style.display="none",w.style.display="none",_.style.visibility="hidden",C.style.display="block",E.style.display=r?"none":"block"},setLoadingComplete:()=>{E.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(_.style.visibility="hidden");let r;r=t==_i.feedback.RESTRICTED_CRITERIA&&e?e:Ip[t]?Ip[t].message:ds.translate(t)!==t?t:Ip.other.message,document.getElementById("image-error-message").innerHTML=ds.translate(r),_.style.visibility="visible"},enableVideoElement:()=>{A.src="",A.style.objectFit="cover",w.style.display="block",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{})),C.style.display="none",E.style.display="none"},setCapturingShowErrorMode:(t,e)=>{w.style.display="block",C.style.display="none",n.videoElement.style.display="block","function"==typeof n.videoElement.play&&n.videoElement.play().catch((()=>{}));const r=t==_i.feedback.RESTRICTED_CRITERIA,o=Ip[t]||Ip.other;document.getElementById("image-error-message").innerHTML=e&&r&&null!=xp?xp.parse(e,{async:!1}):ds.translate(o.message),_.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:r,pageHeader:n}=t;if(n){const t=document.getElementById("page-header-text");t&&(t.textContent=ds.translate(n))}e&&(document.getElementById("step-title").innerHTML=ds.translate(e)),r&&(document.getElementById("step-instructions").innerHTML=ds.translate(r))}}};class $p{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new Jp(t,e,r))}}class Jp{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=r}}class Qp{constructor(){this.name=Lp.ACCEPTED}async handleFrame(){return new $p}}class tg{constructor(){this.name=Lp.VALID}async handleFrame(t){let{context:e,frame:r,deviceInfo:n,detectionStrategy:o}=t;const i=await o.validate({frame:r,deviceInfo:n});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new Qp)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new rg)),i}}class eg{constructor(){this.name=Lp.REJECTED}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Qp):e.setState(new tg),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new rg),i):(e.invalidFramesCounter++,i)}}class rg{constructor(){this.name=Lp.INVALID}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new Qp):e.setState(new tg)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new eg)),i}}class ng{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new rg,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=r}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:r}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:r,detectionStrategy:this.detectionStrategy})}}async function og(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(t,e,r){const n=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=n.getContext("2d");n.width=o.width,n.height=o.height,r?null==i||i.drawImage(t,r.x,r.y,r.width,r.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return n.remove(),a}(e,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),i=await new Promise(((i,a)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),i(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),us(e.data.error.toString(),t,"error"),a(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(o({type:t,imageData:n,height:e.height,width:e.width},r))}))}));return fs(`****** in web-SDK return result for ${t}`,i),i}async function ig(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return og("DETECT_DOCUMENT",t,{},xf[ps.DOCUMENT_DETECTOR].imageDimensions)}async function ag(t,e){return og("BLUR_GLARE_CLASSIFY",t,{},xf[ps.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}class sg{constructor(t,e){this.hasBarcode=t,this.barcodeModel=t?Ff(e):null,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new $p;let i=Date.now();const a=null===(n=await ig(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(qa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Yp({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ya.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Ya.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(qa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await ag(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(qa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(qa.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=Math.min(t.width,Math.max(0,Math.floor(e.x-r))),o=Math.min(t.height,Math.max(0,Math.floor(e.y-r))),i=Math.max(0,Math.min(t.width-n,Math.ceil(e.width+2*r))),a=Math.max(0,Math.min(t.height-o,Math.ceil(e.height+2*r))),s=document.createElement("canvas");if(s.width=i,s.height=a,i>0&&a>0){const e=s.getContext("2d");null==e||e.drawImage(t,n,o,i,a,0,0,i,a)}return s}(e,a),r=this.barcodeModel.detect(t);this.rawBarcodeData=null==r?void 0:r.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const n=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(qa.BARCODE_DETECTION,n,s),!n)return o}return o}}class ug{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class cg{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(qa).forEach((t=>{this.stats.set(t,new ug)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,r,n){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=r,o.countFailed+=n}}let lg=!1;const dg=t=>{lg=t};async function hg(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o,hasBarcode:i,supportedBarcodeSymbologies:a}=t;var s,u,c,l,d;const h=new ng(new sg(i,a),function(t){var e;const r=null===(e=Ya.state.autoCaptureSettings.settings)||void 0===e?void 0:e.stability,n=t?null==r?void 0:r.documentBackStableFramesCountWithBarcode:null==r?void 0:r.documentBackStableFramesCountNoBarcode,o=null!=n?n:null==r?void 0:r.documentBackStableFramesCount;return Number.isFinite(o)&&o>0?o:1}(i)),f=null===(s=Ya.state.autoCaptureSettings.settings)||void 0===s?void 0:s.frameSamplingThreshold;dg(!0);const p=new cg;let g=new cg,m=0;for(;h.state.name!==Lp.ACCEPTED&≶)if(jp(e.videoElement)){try{const t=Date.now(),i=Gp(e.videoElement),a={width:null!==(c=null===(u=e.videoElement.getBoundingClientRect())||void 0===u?void 0:u.width)&&void 0!==c?c:0,height:null!==(d=null===(l=e.videoElement.getBoundingClientRect())||void 0===l?void 0:l.height)&&void 0!==d?d:0},s=await h.handleFrame({frame:i,deviceInfo:a}),w=Date.now()-t+Hp;p.addStats(s,w),g.addStats(s,w),m++,h.stats=p,f&&m>=f&&(null==o||o(g),g=new cg,m=0),await Wp({context:h,onDetect:r,showError:n,frame:i})}catch(t){fs("autocapture back-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,Hp)))}else await new Promise((t=>setTimeout(t,Hp)));m>0&&(null==o||o(g))}class fg{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new $p;let i=Date.now();const a=null===(n=await ig(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(qa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Yp({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ya.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Ya.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(qa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await ag(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(qa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(qa.GLARE_DETECTION,!d,s),o}}let pg=!1;const gg=t=>{pg=t};class mg{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new $p;let i=Date.now();const a=null===(n=await async function(t){return t instanceof HTMLVideoElement&&t.paused?[]:og("DETECT_FACE_LANDMARKS",t)}(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(qa.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=Yp({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:Ya.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Ya.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-i,o.addStepResponse(qa.FACE_POSITION,u,s),o}}let wg=!1;const yg=t=>{wg=t};const vg=new Map;class _g extends Error{constructor(t,e,r){super(r||`Error during ${e}: ${t}`),this.errorCode=t,this.step=e,this.name="CaptureError"}}function Eg(t,e){const r=vg.get(t);r&&(r.reject(e),vg.delete(t))}function bg(t,e,r){const n=vg.get(t);return n&&(n.reject(new _g("other","document"===t?"document_front":"selfie",`New capture${"document"===t?"Document":"Selfie"} call cancelled previous one`)),vg.delete(t)),new Promise(((n,o)=>{vg.set(t,{resolve:n,reject:o,onCapture:r,captures:[],stepType:t,acquisitionId:e})}))}const Ag={document_front:!1,document_back:!1,selfie:!0};function Cg(t){return"document_front"===t||"document_back"===t?"document":"selfie"===t?"selfie":null}async function Ig(t,e){var r,n,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=es.createCameraNotAllowedEvent(e.message,t);await as(null===(r=Ya.state)||void 0===r?void 0:r.step,null===(n=Ya.state)||void 0===n?void 0:n.userToken,null===(o=Ya.state)||void 0===o?void 0:o.sessionId,null===(i=Ya.state)||void 0===i?void 0:i.clientId,s),Ya.dispatch("setIsCapturingProcessStarted",!1);const u=Cg(t);u&&Eg(u,new _g(a,t))}Va(t,a)}function Sg(t){const e=(t=>{var e,r,n,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(r=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===r?void 0:r.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:e.data,format:e.format,captureMargins:ip()}}}const Tg=async t=>{var e,r,n,o;const i=es.createPageViewEvent(t);await as(null===(e=Ya.state)||void 0===e?void 0:e.step,null===(r=Ya.state)||void 0===r?void 0:r.userToken,null===(n=Ya.state)||void 0===n?void 0:n.sessionId,null===(o=Ya.state)||void 0===o?void 0:o.clientId,i)};let Dg,Og=!1;const Rg=async t=>{"expired"===(null==t?void 0:t.status)&&Ha("processing","session-expired",`Session expired for session id: ${Ya.state.sessionId}`)},Mg=t=>{let{step:e}=t;var r,n,o;const i=null===(n=null===(r=Ya.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled;let a=!1,s=0;const u=null===(o=Ya.state)||void 0===o?void 0:o.videoCaptureSettings,c=(t=>{let e,r,n=!1;const o=Ap(t),i=new lp(o),a=async()=>{n&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),n=!1)};return{get videoStream(){return r},startVideoFeed:async t=>{var o,s,u;n&&await a(),"environment"==t&&(e=await wp());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=bp(t,null===(u=Ya.state)||void 0===u?void 0:u.videoCaptureSettings);dp.getInstance().stopStream(),r=await i.startCamera(c,l),n=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(ap(e));!function(t){La({type:"page-load",step:t})}(e),(async()=>{const t=await Qf(Ya.state.sessionId,Ya.state.userToken,Ya.state.clientId);Rg(t)})();const l=Kp({step:e,setImage:d,camera:c});async function d(t){let{suspendedPreview:r=!1,isManualCapture:n=!0,frame:o,context:i}=t;if(o||(o=Gp(c.videoElement)),c.videoElement.style.display="none","function"==typeof c.videoElement.pause&&c.videoElement.pause(),"document_front"===e){gg(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&dg(!1),"selfie"===e&&yg(!1);const d=Date.now(),p=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(c);if(!a)return;const g=function(t,e){var r,n;if("document_front"!==t&&"document_back"!==t&&"selfie"!==t)return!1;const o=e?"manual":"autocapture",i=null===(r=Ya.state.captureApprovalSettings)||void 0===r?void 0:r[o];return null!==(n=null==i?void 0:i[t])&&void 0!==n?n:Ag[t]}(e,n),m=(t=>t.toDataURL("image/jpeg"))(o);g||l.setLoadingMode(null==u?void 0:u.showLoadingBlock),l.setPreviewImage(m,{hideSpinner:g,objectFit:g&&"selfie"!==e?"contain":void 0}),g?function(t,r,n,o,i){Tg(function(t){return`${t}_approval`}(e)),"document_front"===e||"document_back"===e?l.setTitleInstructionsMidStep({pageHeader:"page_header_check_image",title:"main_title_check_image",instructions:"document_approval_instruction"}):l.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"});l.setApprovalRetakeButtons({approveAction:async()=>{l.hideApprovalRetakeButtons(),l.setLoadingMode(null==u?void 0:u.showLoadingBlock),await f(t,r,n,o,i)},retakeAction:async()=>{s++,l.hideApprovalRetakeButtons(),h()}})}(r,m,p,d,i):await f(r,m,p,d,i)}function h(){if(function(){if("document_front"===e||"document_back"===e){const t=Sp[e];l.setTitleInstructionsMidStep({pageHeader:t.page,title:t.title,instructions:t.instructions})}else"selfie"===e&&l.setTitleInstructionsMidStep({instructions:i?"second_title_face_autocapture":"second_title_document_face"})}(),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}c.startVideoFeed(ap(e)).then((()=>{a=!0,l.enableVideoElement(),i&&(l.setAutoCapturingError(null),m(e))})).catch((async t=>{throw await Ig(e,t),t}))}async function f(t,r,n,o,d){var f,p;const g=[],w=s;s=0,function(t,r){var n,o,i,a;const s=es.createUserActionEvent("capture_image",e,t,r);as(null===(n=Ya.state)||void 0===n?void 0:n.step,null===(o=Ya.state)||void 0===o?void 0:o.userToken,null===(i=Ya.state)||void 0===i?void 0:i.sessionId,null===(a=Ya.state)||void 0===a?void 0:a.clientId,s)}(null==d?void 0:d.stats,w),function(t,e){La({type:"capture-image",imageType:e,step:t})}(e,sp(e));try{const s=Date.now(),m=Sg(r);a=!1;const w=Cg(e),y=w?function(t){var e;return null===(e=vg.get(t))||void 0===e?void 0:e.acquisitionId}(w):void 0;g.push(op(Ya.state.sessionId,Ya.state.userToken,Ya.state.clientId,null==m?void 0:m.image,n,sp(e),(null==d?void 0:d.detectionStrategy)instanceof sg?null===(f=d.detectionStrategy)||void 0===f?void 0:f.rawBarcodeData:void 0,y)),g.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),l.setLoadingMode(null==u?void 0:u.showLoadingBlock);const v=(await Promise.all(g))[0];Object.prototype.hasOwnProperty.call(v,"has_barcode")&&(Og=v.has_barcode,Dg=null!==(p=v.supported_barcode_symbologies)&&void 0!==p?p:[]),async function(t){let{step:e,requestStartTime:r,imageProcessingStartTime:n,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s}=t;const u=Date.now()-r,c=n?r-n:0,l=es.createUploadImageEvent(e,String(u),String(o),String(c));await as(e,i,a,s,l)}({step:e,requestStartTime:s,imageProcessingStartTime:o,serverProcessingTime:v.serverProcessingTime,userToken:Ya.state.userToken,sessionId:Ya.state.sessionId,clientId:Ya.state.clientId}),Ya.dispatch("setMissingImages",v.missing_images),l.setLoadingComplete(),function(t,e,r){La({type:"capture-image-result",imageType:e,feedback:r,step:t})}(e,sp(e),v.feedback);const _=Cg(e);if(_&&"modular"===Ya.state.flowType){const t=sp(e);!function(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=vg.get(t);if(n){if(n.onCapture)try{n.onCapture(e)}catch(t){console.error("onCapture callback error:",t)}r&&n.captures.push(e)}}(_,{sessionId:Ya.state.sessionId,type:t===Ei.image_type.DOCUMENT_FRONT?"document_front":t===Ei.image_type.DOCUMENT_BACK?"document_back":"selfie",feedback:v.feedback})}if("ok"!==v.feedback)return await async function(t){Xp("border-color",zp),i?l.setAutoCapturingError(t.feedback,t.custom_feedback):l.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),Xp("border-color",Vp)}(v),void h();if(await c.stopVideoFeed(),Xp("border-color",Up),await new Promise((t=>setTimeout(t,750))),Xp("border-color",Vp),"modular"===Ya.state.flowType)if("document_front"===e&&v.missing_images.includes(Ei.image_type.DOCUMENT_BACK))Ya.dispatch("setStep","document_back");else{const t=document.getElementById(Ya.state.rootElementId);t&&(t.style.visibility="hidden"),_&&function(t){const e=vg.get(t);e&&(e.resolve({captures:[...e.captures]}),vg.delete(t))}(_)}else{const t=(t=>{if("modular"===Ya.state.flowType)return null;let e;return e=t&&t.length>0?t[0]:"processing",e})(Ya.state.missingImages);t&&Ya.dispatch("setStep",t)}}catch(t){l.setLoadingComplete(),l.setCapturingShowErrorMode(_i.feedback.OTHER);const r=Cg(e);r&&"modular"===Ya.state.flowType&&Eg(r,new _g("failed-to-submit-image",e)),c.startVideoFeed(ap(e)).then((()=>{a=!0,i&&m(e)})).catch((async t=>{throw await Ig(e,t),t})),Va(e,"failed-to-submit-image")}}function p(t){var r,n,o,i;const a=es.createUserActionEvent("autocapture_stats",e,t);as(null===(r=Ya.state)||void 0===r?void 0:r.step,null===(n=Ya.state)||void 0===n?void 0:n.userToken,null===(o=Ya.state)||void 0===o?void 0:o.sessionId,null===(i=Ya.state)||void 0===i?void 0:i.clientId,a)}async function g(){var t,r,n,o,i;try{const a=c.getCameraInfo(),s=function(t,e){const r=pp(),n={label:e,is_ios:r};if(r||!t)return n;const o=t.getVideoTracks()[0];if(!o)return n;try{const t=o.getSettings();n.width=t.width,n.height=t.height,n.frame_rate=t.frameRate?Math.round(t.frameRate):void 0}catch(t){}try{const t=o.getCapabilities(),e=Array.isArray(t.focusMode)?t.focusMode:[];e.length>0&&(n.has_continuous_focus=e.includes("continuous"))}catch(t){}return n}(c.videoStream,null===(t=null==a?void 0:a.selectedCamera)||void 0===t?void 0:t.label),u=await es.createCaptureStartEvent(e,s);as(null===(r=Ya.state)||void 0===r?void 0:r.step,null===(n=Ya.state)||void 0===n?void 0:n.userToken,null===(o=Ya.state)||void 0===o?void 0:o.sessionId,null===(i=Ya.state)||void 0===i?void 0:i.clientId,u)}catch(t){fs("Failed to send `capture_start` event",t)}}async function m(t){if("document_front"===t){for(;!a||!jp(c.videoElement);)await new Promise((t=>setTimeout(t,100)));return c.videoElement.onloadedmetadata=()=>{var t;fs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new ng(new fg,null!==(s=null===(a=null===(i=Ya.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.documentFrontStableFramesCount)&&void 0!==s?s:2),p=null===(u=Ya.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold,g=new cg;let m=new cg,w=0;for(gg(!0);f.state.name!==Lp.ACCEPTED&&pg;)if(jp(e.videoElement)){try{const t=Date.now(),i=Gp(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t+Hp;g.addStats(s,u),m.addStats(s,u),w++,f.stats=g,p&&w>=p&&(null==o||o(m),m=new cg,w=0),await Wp({context:f,onDetect:r,showError:n,frame:i})}catch(t){fs("autocapture front-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,Hp)))}else await new Promise((t=>setTimeout(t,Hp)));w>0&&(null==o||o(m))}({camera:c,onDetect:d,showError:l.setAutoCapturingError,onMetricsBatch:p})}if("document_back"===t){for(;!a||!jp(c.videoElement);)await new Promise((t=>setTimeout(t,100)));return c.videoElement.onloadedmetadata=()=>{var t;fs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await hg({camera:c,onDetect:d,showError:l.setAutoCapturingError,onMetricsBatch:p,hasBarcode:Og,supportedBarcodeSymbologies:Dg})}if("selfie"===t){for(;!a||!jp(c.videoElement);)await new Promise((t=>setTimeout(t,100)));return c.videoElement.onloadedmetadata=()=>{var t;fs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new ng(new mg,null!==(s=null===(a=null===(i=Ya.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.selfieStableFramesCount)&&void 0!==s?s:30),p=null===(u=Ya.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold;yg(!0);const g=new cg;let m=new cg,w=0;for(;f.state.name!==Lp.ACCEPTED&&wg;)if(jp(e.videoElement)){try{const t=Date.now(),i=Gp(e.videoElement),a={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},s=await f.handleFrame({frame:i,deviceInfo:a}),u=Date.now()-t;g.addStats(s,u),m.addStats(s,u),w++,f.stats=g,p&&w>=p&&(null==o||o(m),m=new cg,w=0),await Wp({context:f,onDetect:r,showError:n,frame:i,isSelfie:!0})}catch(t){fs("autocapture selfie frame skipped after error",t)}await new Promise((t=>setTimeout(t,50)))}else await new Promise((t=>setTimeout(t,50)));w>0&&(null==o||o(m))}({camera:c,onDetect:d,showError:l.setAutoCapturingError,onMetricsBatch:p})}}i&&m(e),Tg(e);const w=document.getElementById(Ya.state.rootElementId);return w&&(w.style.visibility="hidden"),c.startVideoFeed(ap(e)).then((async()=>{a=!0,w&&(w.style.visibility="visible");try{c.videoElement.readyState<HTMLMediaElement.HAVE_METADATA&&await Promise.race([new Promise((t=>c.videoElement.addEventListener("loadedmetadata",(()=>t()),{once:!0}))),new Promise((t=>setTimeout(t,3e3)))]),await g()}catch(t){fs("Failed to send `capture_start` event",t)}})).catch((async t=>{throw await Ig(e,t),t})),l.component},Ng=()=>{La({type:"start-verification-processing",step:Ya.state.step}),Ua("processing","processing",Ya.state.sessionId);const t=kg("processing-verification");np(t,Bp({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await Qf(Ya.state.sessionId,Ya.state.userToken,Ya.state.clientId);o(t)},r=()=>{setTimeout(e,3e3)},n=async t=>{Ya.dispatch("setStep",t.status),Ya.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(Ya.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){dp.getInstance().stopStream();const r=es.createProcessingCompleteEvent();await as(Ya.state.step,Ya.state.userToken,null===(e=Ya.state)||void 0===e?void 0:e.sessionId,null===(o=Ya.state)||void 0===o?void 0:o.clientId,r),n(t),Ua("complete",t.status,Ya.state.sessionId),function(t,e,r){La({type:"verification-complete",step:t,sessionId:e,callbackUrl:r})}("complete",Ya.state.sessionId,t.callback_url),i=Pa,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(n(t),Ya.dispatch("setIsCapturingProcessStarted",!1),Ua("recapture",t.status,Ya.state.sessionId),function(t,e,r){La({type:"verification-recapture",step:t,sessionId:e,reason:r})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?Ha("processing","session-expired",`Session expired for session id: ${Ya.state.sessionId}`):r();else"processing"!==t.state&&(n(t),r())};return e(),t},kg=t=>rp({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Pg(t,e){var r;if(!t)return;null===(r=e.firstChild)||void 0===r||r.remove();const n=function(t){switch(t){case"processing":return Ng;case"document_front":case"document_back":case"selfie":return Mg;default:throw new Error("Invalid step")}}(t);np(e,n({step:t}))}function xg(t){let{key:e,state:r}=t;const n=r.rootElementId,o=document.getElementById(n);"step"===e&&"complete"!==r.step&&"recapture"!==r.step&&Pg(r.step,o),o&&"processing"===r.step&&(o.style.visibility="hidden")}function Bg(){const t=function(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}(xa(Pa));if(!t)throw new Error("Error restarting session, stored session data is invalid or missing");const e=t.sessionId,r=t.userToken,n=t.flowType;return Ya.dispatch("setSessionId",e),Ya.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}async function Fg(){var t,e;if(null===(t=Ya.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await Ug(),fs("all models loaded - auto-capture enabled")}catch(t){Ya.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(e=Ya.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),fs("Model loading did not complete on time:",t);us(`timed out loading models: ${Lf.filter((t=>xf[t].status!==Pf.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const r=Object.values(xf).filter((t=>t.status===Pf.LOADED)).map((t=>t.loadingStats));!async function(t,e){const r=es.createSdkInitEvent(t,e);await cs("init",r)}(Date.now()-t,r)}}async function Lg(t){var e;try{await dp.getInstance().startNewStream({video:o(o({},bp("environment",null===(e=Ya.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await Ep("environment")})}),za("init",t),function(t,e,r){const n=document.getElementById(r);if("modular"===Ya.state.flowType)return;n.style.visibility="visible",Pg(t[0],n)}(Ya.state.missingImages,Ya.state.sessionId,Ya.state.rootElementId)}catch(t){await Ig("init",t)}}async function zg(t){let{status:e,sessionId:r,userToken:n,missingImages:o,rootElementId:i,language:a,flowType:s}=t;await async function(){if(Hf)await Hf;else{const t=await Ga(Ya.state.clientId,Ya.state.language);await Jf(t)}}(),void 0!==s&&""!==s&&Ya.dispatch("setFlowType",s),function(t,e){La({type:"session-granted",step:t,sessionId:e})}("init",r),Ya.dispatch("setStatus",e),Ya.dispatch("setSessionId",r),Ya.dispatch("setUserToken",n),Ya.dispatch("setMissingImages",o),Ya.dispatch("setRootElement",i),Ya.dispatch("setLanguage",a),async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";ds.overrideLanguage(hs[r]||hs.en);let n=document.getElementById(e);if(!n){n=rp({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n `,np(document.head,t),np(document.body,n)}"modular"===Ya.state.flowType&&(n.style.visibility="hidden")}(Ya.state.sessionId,Ya.state.rootElementId,Ya.state.language),function(){try{Ma.events.off(ka,xg)}catch(t){}Ma.events.on(ka,xg)}(),await Fg(),"modular"!==Ya.state.flowType?await Lg(r):za("init",r)}const Ug=async()=>{const t=Ya.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([zf(),new Promise(((e,r)=>setTimeout((()=>r(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function Vg(t){if(Ya.state.isCapturingProcessStarted)return void Va(Ya.state.step,"trying-to-initialize-active-session");const e=t?await async function(t){let e,r,n;try{const o=await ep(t,Ya.state.consentVersion,Ya.state.clientId);return e=o.sessionId,r=o.userToken,n=o.flowType,Ya.dispatch("setSessionId",e),Ya.dispatch("setUserToken",r),{sessionId:e,userToken:r,flowType:n}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t):Bg(),r=e.sessionId,n=e.userToken,o=e.flowType;if(!r)return void Va(Ya.state.step,"other");const{missing_images:i,status:a}=await Qf(r,n,Ya.state.clientId);return Ya.dispatch("setIsCapturingProcessStarted",!0),await zg({status:a,sessionId:r,userToken:n,missingImages:i,rootElementId:Ya.state.rootElementId,language:Ya.state.language,flowType:o}),!0}async function Hg(t){if("modular"!==Ya.state.flowType)throw new Error('showStep() is only available when flowType is "modular". Current flowType: '+Ya.state.flowType);if(!Ya.state.isCapturingProcessStarted||!Ya.state.sessionId)throw new Error("Session is not active. Call start() first to start a verification session.");let e;try{e=function(t){if("document"===t)return"document_front";if("selfie"===t)return"selfie";throw new Error(`Invalid step type: ${t}`)}(t)}catch(e){throw new Error(`Cannot show step "${t}": ${e instanceof Error?e.message:"Step type not available in missing_images"}`)}const r=document.getElementById(Ya.state.rootElementId);r&&"modular"===Ya.state.flowType&&(r.style.visibility="hidden"),Ya.dispatch("setStep",e)}async function jg(t){try{return await Vg(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function Gg(){try{return await async function(){if("recapture"===Ya.state.verificationStatus||"pending"===Ya.state.verificationStatus){const{sessionId:t,userToken:e}=Bg(),{missing_images:r,status:n}=await Qf(t,e,Ya.state.clientId);return await zg({status:n,sessionId:t,userToken:e,missingImages:r,rootElementId:Ya.state.rootElementId,language:Ya.state.language}),!0}Va(Ya.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function Wg(t){if(!t||!t.acquisitionId)throw new Error("captureDocument requires an acquisitionId");const e=bg("document",t.acquisitionId,t.onCapture);return Hg("document").catch((t=>{const e=t instanceof Error?t.message:String(t);Eg("document",new _g("other","document_front",e))})),e}async function Xg(t){if(!t||!t.acquisitionId)throw new Error("captureSelfie requires an acquisitionId");const e=bg("selfie",t.acquisitionId,t.onCapture);return Hg("selfie").catch((t=>{const e=t instanceof Error?t.message:String(t);Eg("selfie",new _g("other","selfie",e))})),e}const Yg=()=>rs;var qg=Object.freeze({__proto__:null,CaptureError:_g,captureDocument:Wg,captureSelfie:Xg,recapture:Gg,start:jg,version:Yg});const Zg={initialize:e.initialize,...qg};Object.defineProperty(exports,"initialize",{enumerable:!0,get:function(){return e.initialize}}),exports.CaptureError=_g,exports.PACKAGE_VERSION="2.6.0",exports.captureDocument=Wg,exports.captureSelfie=Xg,exports.idv=Zg,exports.recapture=Gg,exports.start=jg,exports.version=Yg;
|
|
1
|
+
"undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));var t=require("./common.cjs"),e=require("./common.cjs");function n(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={},u={};function c(t){let e=t.length;for(;--e>=0;)t[e]=0}const l=256,d=286,h=30,f=15,p=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),g=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),w=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v=new Array(576);c(v);const y=new Array(60);c(y);const _=new Array(512);c(_);const E=new Array(256);c(E);const b=new Array(29);c(b);const C=new Array(h);function A(t,e,n,r,o){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=t&&t.length}let I,S,T;function D(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}c(C);const O=t=>t<256?_[t]:_[256+(t>>>7)],R=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},M=(t,e,n)=>{t.bi_valid>16-n?(t.bi_buf|=e<<t.bi_valid&65535,R(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},k=(t,e,n)=>{M(t,n[2*e],n[2*e+1])},N=(t,e)=>{let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1},x=(t,e,n)=>{const r=new Array(16);let o,i,a=0;for(o=1;o<=f;o++)r[o]=a=a+n[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=N(r[e]++,e))}},P=t=>{let e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=t=>{t.bi_valid>8?R(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},F=(t,e,n,r)=>{const o=2*e,i=2*n;return t[o]<t[i]||t[o]===t[i]&&r[e]<=r[n]},L=(t,e,n)=>{const r=t.heap[n];let o=n<<1;for(;o<=t.heap_len&&(o<t.heap_len&&F(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!F(e,r,t.heap[o],t.depth));)t.heap[n]=t.heap[o],n=o,o<<=1;t.heap[n]=r},z=(t,e,n)=>{let r,o,i,a,s=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===r?k(t,o,e):(i=E[o],k(t,i+l+1,e),a=p[i],0!==a&&(o-=b[i],M(t,o,a)),r--,i=O(r),k(t,i,n),a=g[i],0!==a&&(r-=C[i],M(t,r,a)))}while(s<t.last_lit);k(t,256,e)},U=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==n[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):n[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,n[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=r[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)L(t,n,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,n,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,n[2*u]=n[2*a]+n[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,n[2*a+1]=n[2*s+1]=u,t.heap[1]=u++,L(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const n=e.dyn_tree,r=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,p,g,m=0;for(h=0;h<=f;h++)t.bl_count[h]=0;for(n[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=n[2*n[2*l+1]+1]+1,h>u&&(h=u,m++),n[2*l+1]=h,l>r||(t.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),g=n[2*l],t.opt_len+=g*(h+p),i&&(t.static_len+=g*(o[2*l+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>r||(n[2*d+1]!==h&&(t.opt_len+=(h-n[2*d+1])*n[2*d],n[2*d+1]=h),l--)}})(t,e),x(n,c,t.bl_count)},V=(t,e,n)=>{let r,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=e[2*(r+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},H=(t,e,n)=>{let r,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(o=a,a=e[2*(r+1)+1],!(++s<u&&o===a)){if(s<c)do{k(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(k(t,o,t.bl_tree),s--),k(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(k(t,17,t.bl_tree),M(t,s-3,3)):(k(t,18,t.bl_tree),M(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let G=!1;const j=(t,e,n,r)=>{M(t,0+(r?1:0),3),((t,e,n,r)=>{B(t),r&&(R(t,n),R(t,~n)),t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n})(t,e,n,!0)};u._tr_init=t=>{G||((()=>{let t,e,n,r,o;const i=new Array(16);for(n=0,r=0;r<28;r++)for(b[r]=n,t=0;t<1<<p[r];t++)E[n++]=r;for(E[n-1]=r,o=0,r=0;r<16;r++)for(C[r]=o,t=0;t<1<<g[r];t++)_[o++]=r;for(o>>=7;r<h;r++)for(C[r]=o<<7,t=0;t<1<<g[r]-7;t++)_[256+o++]=r;for(e=0;e<=f;e++)i[e]=0;for(t=0;t<=143;)v[2*t+1]=8,t++,i[8]++;for(;t<=255;)v[2*t+1]=9,t++,i[9]++;for(;t<=279;)v[2*t+1]=7,t++,i[7]++;for(;t<=287;)v[2*t+1]=8,t++,i[8]++;for(x(v,287,i),t=0;t<h;t++)y[2*t+1]=5,y[2*t]=N(t,5);I=new A(v,p,257,d,f),S=new A(y,g,0,h,f),T=new A(new Array(0),m,0,19,7)})(),G=!0),t.l_desc=new D(t.dyn_ltree,I),t.d_desc=new D(t.dyn_dtree,S),t.bl_desc=new D(t.bl_tree,T),t.bi_buf=0,t.bi_valid=0,P(t)},u._tr_stored_block=j,u._tr_flush_block=(t,e,n,r)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<l;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),a=(t=>{let e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*w[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=n+5,n+4<=o&&-1!==e?j(t,e,n,r):4===t.strategy||i===o?(M(t,2+(r?1:0),3),z(t,v,y)):(M(t,4+(r?1:0),3),((t,e,n,r)=>{let o;for(M(t,e-257,5),M(t,n-1,5),M(t,r-4,4),o=0;o<r;o++)M(t,t.bl_tree[2*w[o]+1],3);H(t,t.dyn_ltree,e-1),H(t,t.dyn_dtree,n-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),z(t,t.dyn_ltree,t.dyn_dtree)),P(t),r&&B(t)},u._tr_tally=(t,e,n)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(E[n]+l+1)]++,t.dyn_dtree[2*O(e)]++),t.last_lit===t.lit_bufsize-1),u._tr_align=t=>{M(t,2,3),k(t,256,v),(t=>{16===t.bi_valid?(R(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var W=(t,e,n,r)=>{let o=65535&t,i=t>>>16&65535,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{o=o+e[r++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16};const X=new Uint32Array((()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e})());var Y=(t,e,n,r)=>{const o=X,i=r+n;t^=-1;for(let n=r;n<i;n++)t=t>>>8^o[255&(t^e[n])];return~t},q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Z={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:$,_tr_flush_block:Q,_tr_tally:J,_tr_align:tt}=u,et=W,nt=Y,rt=q,{Z_NO_FLUSH:ot,Z_PARTIAL_FLUSH:it,Z_FULL_FLUSH:at,Z_FINISH:st,Z_BLOCK:ut,Z_OK:ct,Z_STREAM_END:lt,Z_STREAM_ERROR:dt,Z_DATA_ERROR:ht,Z_BUF_ERROR:ft,Z_DEFAULT_COMPRESSION:pt,Z_FILTERED:gt,Z_HUFFMAN_ONLY:mt,Z_RLE:wt,Z_FIXED:vt,Z_DEFAULT_STRATEGY:yt,Z_UNKNOWN:_t,Z_DEFLATED:Et}=Z,bt=258,Ct=262,At=103,It=113,St=666,Tt=(t,e)=>(t.msg=rt[e],e),Dt=t=>(t<<1)-(t>4?9:0),Ot=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Rt=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask;const Mt=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))},kt=(t,e)=>{Q(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Mt(t.strm)},Nt=(t,e)=>{t.pending_buf[t.pending++]=e},xt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Pt=(t,e,n,r)=>{let o=t.avail_in;return o>r&&(o=r),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),n),1===t.state.wrap?t.adler=et(t.adler,e,o,n):2===t.state.wrap&&(t.adler=nt(t.adler,e,o,n)),t.next_in+=o,t.total_in+=o,o)},Bt=(t,e)=>{let n,r,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-Ct?t.strstart-(t.w_size-Ct):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+bt;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(n=e,c[n+a]===p&&c[n+a-1]===f&&c[n]===c[i]&&c[++n]===c[i+1]){i+=2,n++;do{}while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&i<h);if(r=bt-(h-i),i=h-bt,r>a){if(t.match_start=e,a=r,r>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},Ft=t=>{const e=t.w_size;let n,r,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Ct)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,r=t.hash_size,n=r;do{o=t.head[--n],t.head[n]=o>=e?o-e:0}while(--r);r=e,n=r;do{o=t.prev[--n],t.prev[n]=o>=e?o-e:0}while(--r);i+=e}if(0===t.strm.avail_in)break;if(r=Pt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Rt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Rt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<Ct&&0!==t.strm.avail_in)},Lt=(t,e)=>{let n,r;for(;;){if(t.lookahead<Ct){if(Ft(t),t.lookahead<Ct&&e===ot)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-Ct&&(t.match_length=Bt(t,n)),t.match_length>=3)if(r=J(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+1]);else r=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2},zt=(t,e)=>{let n,r,o;for(;;){if(t.lookahead<Ct){if(Ft(t),t.lookahead<Ct&&e===ot)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-Ct&&(t.match_length=Bt(t,n),t.match_length<=5&&(t.strategy===gt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,r=J(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,r&&(kt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(r=J(t,0,t.window[t.strstart-1]),r&&kt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=J(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,n,r,o){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=o}const Vt=[new Ut(0,0,0,0,((t,e)=>{let n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ft(t),0===t.lookahead&&e===ot)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,kt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-Ct&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(kt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(kt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Lt),new Ut(4,5,16,8,Lt),new Ut(4,6,32,32,Lt),new Ut(4,4,16,16,zt),new Ut(8,16,32,32,zt),new Ut(8,16,128,128,zt),new Ut(8,32,128,256,zt),new Ut(32,128,258,1024,zt),new Ut(32,258,258,4096,zt)];function Ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Et,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gt=t=>{if(!t||!t.state)return Tt(t,dt);t.total_in=t.total_out=0,t.data_type=_t;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:It,t.adler=2===e.wrap?0:1,e.last_flush=ot,K(e),ct},jt=t=>{const e=Gt(t);return e===ct&&(t=>{t.window_size=2*t.w_size,Ot(t.head),t.max_lazy_match=Vt[t.level].max_lazy,t.good_match=Vt[t.level].good_length,t.nice_match=Vt[t.level].nice_length,t.max_chain_length=Vt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Wt=(t,e,n,r,o,i)=>{if(!t)return dt;let a=1;if(e===pt&&(e=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),o<1||o>9||n!==Et||r<8||r>15||e<0||e>9||i<0||i>vt)return Tt(t,dt);8===r&&(r=9);const s=new Ht;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=n,jt(t)};s.deflateInit=(t,e)=>Wt(t,e,Et,15,8,yt),s.deflateInit2=Wt,s.deflateReset=jt,s.deflateResetKeep=Gt,s.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?dt:(t.state.gzhead=e,ct):dt,s.deflate=(t,e)=>{let n,r;if(!t||!t.state||e>ut||e<0)return t?Tt(t,dt):dt;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===St&&e!==st)return Tt(t,0===t.avail_out?ft:dt);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,Nt(o,31),Nt(o,139),Nt(o,8),o.gzhead?(Nt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),Nt(o,255&o.gzhead.time),Nt(o,o.gzhead.time>>8&255),Nt(o,o.gzhead.time>>16&255),Nt(o,o.gzhead.time>>24&255),Nt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),Nt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(Nt(o,255&o.gzhead.extra.length),Nt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=nt(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),Nt(o,3),o.status=It);else{let e=Et+(o.w_bits-8<<4)<<8,n=-1;n=o.strategy>=mt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=n<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=It,xt(o,e),0!==o.strstart&&(xt(o,t.adler>>>16),xt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(n=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),Mt(t),n=o.pending,o.pending!==o.pending_buf_size));)Nt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){n=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),Mt(t),n=o.pending,o.pending===o.pending_buf_size)){r=1;break}r=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,Nt(o,r)}while(0!==r);o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),0===r&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){n=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),Mt(t),n=o.pending,o.pending===o.pending_buf_size)){r=1;break}r=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,Nt(o,r)}while(0!==r);o.gzhead.hcrc&&o.pending>n&&(t.adler=nt(t.adler,o.pending_buf,o.pending-n,n)),0===r&&(o.status=At)}else o.status=At;if(o.status===At&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Mt(t),o.pending+2<=o.pending_buf_size&&(Nt(o,255&t.adler),Nt(o,t.adler>>8&255),t.adler=0,o.status=It)):o.status=It),0!==o.pending){if(Mt(t),0===t.avail_out)return o.last_flush=-1,ct}else if(0===t.avail_in&&Dt(e)<=Dt(i)&&e!==st)return Tt(t,ft);if(o.status===St&&0!==t.avail_in)return Tt(t,ft);if(0!==t.avail_in||0!==o.lookahead||e!==ot&&o.status!==St){let n=o.strategy===mt?((t,e)=>{let n;for(;;){if(0===t.lookahead&&(Ft(t),0===t.lookahead)){if(e===ot)return 1;break}if(t.match_length=0,n=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===wt?((t,e)=>{let n,r,o,i;const a=t.window;for(;;){if(t.lookahead<=bt){if(Ft(t),t.lookahead<=bt&&e===ot)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,r=a[o],r===a[++o]&&r===a[++o]&&r===a[++o])){i=t.strstart+bt;do{}while(r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&o<i);t.match_length=bt-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=J(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Vt[o.level].func(o,e);if(3!==n&&4!==n||(o.status=St),1===n||3===n)return 0===t.avail_out&&(o.last_flush=-1),ct;if(2===n&&(e===it?tt(o):e!==ut&&($(o,0,0,!1),e===at&&(Ot(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Mt(t),0===t.avail_out))return o.last_flush=-1,ct}return e!==st?ct:o.wrap<=0?lt:(2===o.wrap?(Nt(o,255&t.adler),Nt(o,t.adler>>8&255),Nt(o,t.adler>>16&255),Nt(o,t.adler>>24&255),Nt(o,255&t.total_in),Nt(o,t.total_in>>8&255),Nt(o,t.total_in>>16&255),Nt(o,t.total_in>>24&255)):(xt(o,t.adler>>>16),xt(o,65535&t.adler)),Mt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?ct:lt)},s.deflateEnd=t=>{if(!t||!t.state)return dt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==At&&e!==It&&e!==St?Tt(t,dt):(t.state=null,e===It?Tt(t,ht):ct)},s.deflateSetDictionary=(t,e)=>{let n=e.length;if(!t||!t.state)return dt;const r=t.state,o=r.wrap;if(2===o||1===o&&42!==r.status||r.lookahead)return dt;if(1===o&&(t.adler=et(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){0===o&&(Ot(r.head),r.strstart=0,r.block_start=0,r.insert=0);let t=new Uint8Array(r.w_size);t.set(e.subarray(n-r.w_size,n),0),e=t,n=r.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,Ft(r);r.lookahead>=3;){let t=r.strstart,e=r.lookahead-2;do{r.ins_h=Rt(r,r.ins_h,r.window[t+3-1]),r.prev[t&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=t,t++}while(--e);r.strstart=t,r.lookahead=2,Ft(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,r.wrap=o,ct},s.deflateInfo="pako deflate (from Nodeca project)";var Xt={};const Yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Xt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const e in n)Yt(n,e)&&(t[e]=n[e])}}return t},Xt.flattenChunks=t=>{let e=0;for(let n=0,r=t.length;n<r;n++)e+=t[n].length;const n=new Uint8Array(e);for(let e=0,r=0,o=t.length;e<o;e++){let o=t[e];n.set(o,r),r+=o.length}return n};var qt={};let Zt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Zt=!1}const Kt=new Uint8Array(256);for(let t=0;t<256;t++)Kt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Kt[254]=Kt[254]=1,qt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,n,r,o,i,a=t.length,s=0;for(o=0;o<a;o++)n=t.charCodeAt(o),55296==(64512&n)&&o+1<a&&(r=t.charCodeAt(o+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)n=t.charCodeAt(o),55296==(64512&n)&&o+1<a&&(r=t.charCodeAt(o+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?e[i++]=n:n<2048?(e[i++]=192|n>>>6,e[i++]=128|63&n):n<65536?(e[i++]=224|n>>>12,e[i++]=128|n>>>6&63,e[i++]=128|63&n):(e[i++]=240|n>>>18,e[i++]=128|n>>>12&63,e[i++]=128|n>>>6&63,e[i++]=128|63&n);return e};qt.buf2string=(t,e)=>{const n=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let r,o;const i=new Array(2*n);for(o=0,r=0;r<n;){let e=t[r++];if(e<128){i[o++]=e;continue}let a=Kt[e];if(a>4)i[o++]=65533,r+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&r<n;)e=e<<6|63&t[r++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Zt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n})(i,o)},qt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let n=e-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+Kt[t[n]]>e?n:e};const $t=s,Qt=Xt,Jt=qt,te=q,ee=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ne=Object.prototype.toString,{Z_NO_FLUSH:re,Z_SYNC_FLUSH:oe,Z_FULL_FLUSH:ie,Z_FINISH:ae,Z_OK:se,Z_STREAM_END:ue,Z_DEFAULT_COMPRESSION:ce,Z_DEFAULT_STRATEGY:le,Z_DEFLATED:de}=Z;function he(t){this.options=Qt.assign({level:ce,method:de,chunkSize:16384,windowBits:15,memLevel:8,strategy:le},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ee,this.strm.avail_out=0;let n=$t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==se)throw new Error(te[n]);if(e.header&&$t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Jt.string2buf(e.dictionary):"[object ArrayBuffer]"===ne.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,n=$t.deflateSetDictionary(this.strm,t),n!==se)throw new Error(te[n]);this._dict_set=!0}}he.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ae:re,"string"==typeof t?n.input=Jt.string2buf(t):"[object ArrayBuffer]"===ne.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(i===oe||i===ie)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(o=$t.deflate(n,i),o===ue)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),o=$t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===se;if(0!==n.avail_out){if(i>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},he.prototype.onData=function(t){this.chunks.push(t)},he.prototype.onEnd=function(t){t===se&&(this.result=Qt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fe=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const n=new he(e);if(n.push(t,!0),n.err)throw n.msg||te[n.err];return n.result}(t,e)};const pe=["enabled","userId","serverPath"];function ge(){var t=["10478331hpsHQd","3lIPbWb","5160436Lblgei","7002gnqAPy","242jFGSCZ","135352swmMbq","drs","8666PgEztw","1292870XfVMeY","10278744RctrCq","2555nLuyWe","92EoGQlk"];return(ge=function(){return t})()}function me(t,e){return t-=367,ge()[t]}var we=me;!function(){for(var t=me,e=ge();;)try{if(671012==parseInt(t(369))/1*(-parseInt(t(373))/2)+-parseInt(t(375))/3*(-parseInt(t(376))/4)+parseInt(t(372))/5*(-parseInt(t(377))/6)+-parseInt(t(367))/7+-parseInt(t(371))/8+-parseInt(t(374))/9+parseInt(t(370))/10*(parseInt(t(378))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var ve=new t(we(368));const ye=be;function _e(){const t=["738810nVKzsi","removeItem","5847714fuaKFH","221586HqkUxX","getItem","FALLBACK_LOCAL_STORAGE","getFullStorageKey","3WUMaWM","removeItemSessionStorageSafe","localStorage","2838540yiWgeb","FALLBACK_SESSION_STORAGE","88RyOPZm","setItem","removeItemLocalStorageSafe","241710AyoFNn","7596869CgTIAU","5273735hOlXxO","sessionStorage","clientId"];return(_e=function(){return t})()}!function(){const t=be,e=_e();for(;;)try{if(738403==parseInt(t(181))/1+-parseInt(t(189))/2*(parseInt(t(173))/3)+parseInt(t(176))/4+parseInt(t(183))/5+-parseInt(t(188))/6+-parseInt(t(182))/7+parseInt(t(178))/8*(parseInt(t(186))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ee{constructor(t){const e=be;this.FALLBACK_SESSION_STORAGE={},this[e(191)]={},this.clientId=t}getClientId(){return this[be(185)]}setClientId(t){this[be(185)]=t}[ye(192)](t){return this[ye(185)]+"_"+t}getItemSessionStorageSafe(t){const e=ye,n=this[e(192)](t);try{return window[e(184)][e(190)](n)}catch(t){return this.FALLBACK_SESSION_STORAGE[n]}}setItemSessionStorageSafe(t,e){const n=ye,r=this[n(192)](t);try{window[n(184)][n(179)](r,e)}catch(t){this[n(177)][r]=e}}[ye(174)](t){const e=ye,n=this[e(192)](t);try{window[e(184)][e(187)](n)}catch(t){this.FALLBACK_SESSION_STORAGE[n]=void 0}}getItemLocalStorageSafe(t){const e=ye,n=this.getFullStorageKey(t);try{return window[e(175)][e(190)](n)}catch(t){return this[e(191)][n]}}setItemLocalStorageSafe(t,e){const n=ye,r=this[n(192)](t);try{window[n(175)].setItem(r,e)}catch(t){this[n(191)][r]=e}}[ye(180)](t){const e=ye,n=this[e(192)](t);try{window[e(175)][e(187)](n)}catch(t){this[e(191)][n]=void 0}}}function be(t,e){return t-=173,_e()[t]}const Ce=Ie;!function(){const t=Ie,e=Te();for(;;)try{if(609341==parseInt(t(391))/1+parseInt(t(404))/2*(-parseInt(t(393))/3)+-parseInt(t(403))/4*(parseInt(t(396))/5)+parseInt(t(408))/6+parseInt(t(412))/7*(-parseInt(t(399))/8)+-parseInt(t(392))/9+-parseInt(t(384))/10*(-parseInt(t(390))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Ae{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=Ie;this[e(400)]=t,this[e(397)]=e(395),this.logsLimit=1e4,this.logs=[],this[e(407)]=[]}[Ce(398)](t,e){this[Ce(388)](3,t,e)}[Ce(405)](t,e){this.pushLog(4,t,e)}[Ce(387)](t,e){this[Ce(388)](5,t,e)}[Ce(385)](){const t=Ce,e=this[t(401)];return this[t(401)]=[],e}[Ce(388)](t,e,n){const r=Ce;this[r(400)]&&console.log("%s %s %s",this[r(397)],e,JSON.stringify(n)),this[r(401)][r(411)]({timestamp:Date[r(409)](),severity:t,text:JSON[r(410)](o(o({},n),{},{message:e}),this[r(394)])}),this[r(401)].length>this[r(386)]&&this.logs[r(389)]();const i=this[r(407)][r(406)]((t=>t()));Promise[r(402)](i).catch((()=>{}))}[Ce(394)](t,e){if(e instanceof Error){const{name:t,stack:n,message:r}=e;return{name:t,stack:n,message:r}}return e}}function Ie(t,e){return t-=384,Te()[t]}const Se=new Ae;function Te(){const t=["13304841igMcRS","617462pTzfQU","3722562MGqLTQ","3hDcHbI","formatter","[AccountProtection SDK]","348265ZYCcIc","logPrefix","info","11832NLFgXa","enabled","logs","all","16UUNLcn","2421212Byffyh","warn","map","middlewares","4182096OJoBQr","now","stringify","push","56IPGitS","10nmtstx","flush","logsLimit","error","pushLog","unshift"];return(Te=function(){return t})()}function De(){var t,e=Re;return null===(t=navigator[e(438)])||void 0===t?void 0:t[e(435)]([e(444),e(442),e(419),"platformVersion",e(428),e(433),e(420),e(443),e(439)])}function Oe(){var t=["11087CkpMZb","executor reached timeout","5PqwXNd","861928CEosLb","950GDIFWY","fullVersionList","27MiuSRG","5231742OxTvZh","6091029TvEILZ","race","bitness","catch","getHighEntropyValues","4150476aGqnsT","name","userAgentData","uaFullVersion","finally","46RbafwC","model","wow64","architecture","249150sJXkms","platform","mobile","warn","46893ezqMxw"];return(Oe=function(){return t})()}function Re(t,e){return t-=419,Oe()[t]}function Me(t,e){var n=Re;let r;const o=[Promise.resolve(t())[n(434)]((()=>{})),new Promise(((t,n)=>r=window.setTimeout(n,e)))];return Promise[n(432)](o)[n(434)]((()=>Se[n(421)](n(424),{fnName:t[n(437)]})))[n(440)]((()=>clearTimeout(r)))}!function(){for(var t=Re,e=Oe();;)try{if(522086==-parseInt(t(423))/1*(parseInt(t(441))/2)+-parseInt(t(422))/3+-parseInt(t(436))/4+parseInt(t(425))/5*(parseInt(t(430))/6)+-parseInt(t(431))/7+-parseInt(t(426))/8*(parseInt(t(429))/9)+parseInt(t(427))/10*(parseInt(t(445))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const ke=Ne;function Ne(t,e){return t-=290,He()[t]}!function(){const t=Ne,e=He();for(;;)try{if(128396==-parseInt(t(547))/1*(-parseInt(t(428))/2)+parseInt(t(598))/3+parseInt(t(641))/4+parseInt(t(379))/5*(parseInt(t(647))/6)+-parseInt(t(582))/7*(-parseInt(t(558))/8)+-parseInt(t(541))/9+-parseInt(t(522))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const xe=ke(459),Pe=ke(388),Be=ke(351),Fe={tts:1e3},Le=t=>{var e;return null!==(e=Fe[t])&&void 0!==e?e:100},ze=t=>t?[...t].reduce(((t,e)=>t+Math[ke(360)](e)),0):0;class Ue{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ke;this[o(624)]=t,this[o(584)]=e,this[o(357)]=n,this.isAgenticCollect=r}async[ke(453)](){const t=ke,e=this[t(584)][t(548)](xe,[]),n=this[t(584)][t(548)](Pe,36e5),r=this[t(309)]||this[t(584)][t(548)](Be,!1),o=await new Ve(e,this[t(357)],r)[t(472)]();return this[t(327)]=o,this[t(624)].setItemLocalStorageSafe(Pe,Date[t(666)]()+n),o}async[ke(448)](){const t=ke;return Number(this[t(624)].getItemLocalStorageSafe(Pe))<Date[t(666)]()||!this[t(327)]?await this[t(453)]()||{}:this[t(327)]||{}}}class Ve{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=ke;this[r(459)]=t,this[r(357)]=e,this.dataPoints=o({battery:this[r(485)],brave:this[r(651)],canvas:this[r(439)],codecs:this.getCodesTests,connection:this[r(553)],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this.getCryptoRandomValues,deviceMemory:this.getDeviceMemory,documentBasedKeys:this[r(414)],hardwareConcurrency:this[r(409)],indexedDB:this[r(464)],fidoEnabled:this[r(650)],languages:this[r(561)],language:this[r(574)],timezoneOffset:this.getTimezoneOffset,localStorage:this.getLocalStorage,navigatorBasedKeys:this[r(648)],navigatorProduct:this[r(310)],navigatorUserAgent:this[r(482)],navigatorUAData:this[r(532)],navigatorHighEntropyData:this.getNavigatorHighEntropyData,navigatorStorageEstimation:this[r(330)],navigatorOnLine:this[r(385)],navigatorIsUserActive:this[r(629)],math:this[r(296)],mediaMatch:this[r(415)],openDatabase:this.getOpenDatabase,windowOrientation:this.getWindowOrientation,platform:this[r(543)],cpuClass:this[r(450)],osClass:this.getOsCpu,addBehavior:this[r(369)],productSub:this[r(498)],mediaDevices:this[r(315)],audioFingerprint:this[r(342)],audioFingerprintExtended:this[r(545)],fonts:this[r(335)],performanceTiming:this[r(567)],performanceMemory:this[r(377)],plugins:this.getPlugins,screen:this[r(389)],sequentum:this[r(376)],sessionStorage:this[r(511)],referrer:this.getReferrer,timezone:this[r(638)],touchSupport:this[r(384)],vendor:this[r(660)],buildID:this.getBuildID,webdriver:this[r(515)],webGlRenderer:this[r(302)],windowBasedKeys:this[r(341)],windowOuter:this[r(490)],webRTCDisabled:this[r(319)],cryptoBindingData:this[r(491)][r(364)](this),notificationState:this[r(608)][r(364)](this,r(581)),geolocationState:this[r(608)][r(364)](this,r(343)),isGeoLocationExists:this[r(434)],isSendBeaconExists:this[r(615)],navigatorPrototype:this[r(291)],installedRelatedApps:this[r(352)],windowConstructorAliasTest:this.windowConstructorAliasTest,windowDocumentAuxVarsTest:this[r(349)],CDPRuntimeDomainTest:this[r(292)]},n&&{tts:this[r(314)],windowAIAPIs:this.getWindowAIAPIs})}[ke(292)](){const t=ke;let e=!1;const n=new(window[t(329)]);return window[t(591)][t(529)](n,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window.console[t(381)](n[t(350)]),e}[ke(349)](){const t=ke;for(const e of window[t(591)][t(536)](window.document))if(e==t(556)||/^\$cdc_[a-zA-Z0-9]{22}_$/.test(e))return!0;for(const e of window[t(591)][t(355)](window[t(591)].getOwnPropertyDescriptors(window[t(307)]))){if(!e[t(312)]||void 0===e[t(312)][t(440)])continue;const n=window[t(591)][t(536)](window[t(591)][t(559)](e[t(312)])),r=["storeItem","retrieveItem",t(530)];if(n[t(326)](),r[t(326)](),n.every(((t,e)=>t==r[e])))return!0}return!1}windowConstructorAliasTest(){const t=ke,e=window.Object.getOwnPropertyNames(window);for(const n of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[t(644)](n))return!0;for(const e of[window.Array,window[t(404)],window[t(483)]])if(n!=(null==e?void 0:e[t(514)])&&n!=t(659)&&n!=t(407)&&window[n]===e)return!0}return!1}async dataPointsExtractor(){const t=this[ke(627)]();return await this.collectPromisesData(t)}[ke(627)](){const t=ke,e={};for(const[n,r]of Object[t(340)](this.dataPoints))if(!this[t(459)].includes(n))try{e[n]=Me(r,Le(n))}catch(r){Se[t(571)]("worker throw error",{e:r,key:n}),e[n]=Promise[t(305)]()}return e}async[ke(519)](t){const e=ke,n={};for(const[r,o]of Object[e(340)](t))try{n[r]=await o}catch(t){Se[e(571)](e(620),{e:t,key:r}),n[r]=void 0}return n}[ke(387)](){const t=ke,e=navigator[t(400)];return Promise[t(305)](e)}async[ke(650)](){const t=ke;return!!navigator[t(497)]&&await window[t(586)][t(506)]()}[ke(542)](){const t=window.crypto.getRandomValues(new Uint8Array(16));return Array.from(t)}[ke(319)](){const t=ke,e=null==window[t(324)];return Promise[t(305)](e)}[ke(341)](){const t=ke,e=["chrome",t(416),t(380),"__gCrWeb","yandex",t(667),t(368),t(595),t(657),t(430),t(347),"samsungAr",t(433),"UCShellJava",t(606),t(317),t(562),"callPhantom","Buffer",t(293),"spawn",t(454),t(665),"__nightmare",t(437),"calledSelenium","callSelenium","_Selenium_IDE_Recorder",t(630),t(501),t(502),t(386),"__fxdriver_unwrapped","__lastWatirAlert",t(664),t(479),t(549),t(649),t(523),t(517),"__webdriver_script_fn",t(605),"__webdriver_script_function","__webdriver_unwrapped",t(425),t(579),t(353),t(493),"cdc_adoQpoasnfa76pfcZLmcfl_Promise",t(374),t(544),t(345),t(625),t(366),t(321),"watinExpressionError",t(435)],n=[];for(const r of e){const e=window[r];void 0!==e&&null!=e&&n[t(412)](r)}return Promise.resolve(n)}[ke(614)](){const t=ke;return{languageModel:t(550)in window,summarizer:t(635)in window,translator:t(578)in window,languageDetector:t(535)in window}}async[ke(314)](){const t=ke;if(!window[t(438)])return null;const e=await new Promise((e=>{const n=t,r=window.speechSynthesis[n(421)]();if(r.length>0)return void e(r);const o=window.setTimeout((()=>{const t=n;window[t(438)][t(538)]=null,e(null)}),Fe[n(601)]);window[n(438)][n(538)]=()=>{const t=n;clearTimeout(o),window[t(438)][t(538)]=null,e(window.speechSynthesis.getVoices())}}));return e?{voiceCount:e[t(304)],hasGoogle:e[t(480)]((e=>/Google/i[t(644)](e.name)))}:null}[ke(415)](){const t=ke,e={"dynamic-range":[t(534),"standard"],"prefers-reduced-motion":[t(441),"reduce"],"prefers-contrast":[t(441),t(534),t(477),t(592),t(481),t(468)],"max-monochrome":["0","10","100",t(488)],"forced-colors":["active",t(555)],"inverted-colors":[t(594),"none"],"color-gamut":[t(496),"p3",t(596)]},n={};for(const[r,o]of Object[t(340)](e))for(const e of o)n[r[t(486)](/-/g,"_")+"_"+e[t(486)](/-/g,"_")]=window.matchMedia("("+r+": "+e+")")[t(362)];return Promise[t(305)](n)}[ke(296)](){const t=ke,e=[Math.acos(.12312423423423424),Math[t(602)](1e308),(n=1e154,Math.log(n+Math[t(403)](n*n-1))),Math[t(344)](.12312423423423424),Math[t(306)](1),Math[t(494)](1+Math[t(403)](2)),Math[t(585)](.5),Math[t(494)](3)/2,Math[t(442)](.5),Math[t(372)](-1e300),Math.sinh(1),Math[t(300)](1)-1/Math[t(300)](1)/2,Math[t(673)](10.000000000123),Math[t(348)](1),(Math[t(300)](1)+1/Math[t(300)](1))/2,Math[t(563)](-1e300),Math[t(457)](1),(Math[t(300)](2)-1)/(Math[t(300)](2)+1),Math[t(300)](1),Math.expm1(1),Math[t(300)](1)-1,Math[t(540)](10),Math[t(494)](11),Math.PI**-100];var n;let r="";for(let n=0;n<e[t(304)];n++)r+=e[n][t(411)]();return Promise.resolve(Ve[t(570)](r))}[ke(553)](){const t=ke,{connection:e}=navigator,n=(t=>{let{downlink:e,effectiveType:n,rtt:r,saveData:o}=t;return{downlink:e,effectiveType:n,rtt:r,saveData:o}})(e);return Promise[t(305)](n)}[ke(511)](){const t=ke;return Promise.resolve(!!window[t(576)])}[ke(467)](){const t=ke;return Promise[t(305)](!!window[t(390)])}[ke(376)](){return-1!==window[ke(516)].toString().indexOf("Sequentum")}getNavigatorBasedKeys(){const t=ke;return[t(526),"__driver_evaluate",t(517),t(549),t(386),"__driver_unwrapped",t(569),t(649),t(399),t(325),t(437),t(607),t(533),t(661),"driver-evaluate",t(332),t(337),t(575),t(668),"__webdriverFunc",t(452),"__$webdriverAsyncExecutor","__lastWatirAlert",t(664),t(479),"$chrome_asyncScriptInfo","$cdc_asdjflasutopfhvcZLmcfl_",t(465)].filter((t=>navigator[t]))}[ke(310)](){const t=ke,e=navigator[t(618)];return Promise[t(305)](e)}getNavigatorUserAgent(){return navigator[ke(365)]}[ke(532)](){return navigator[ke(473)]}[ke(566)](){return De()}[ke(330)](){const t=ke;return navigator[t(631)][t(354)]()}navigatorOnLine(){return navigator[ke(568)]}[ke(629)](){const t=ke;return navigator[t(444)][t(382)]}async[ke(608)](t){const e=ke;try{const n=await navigator[e(590)][e(478)]({name:t});return null==n?void 0:n[e(613)]}catch(t){}}[ke(434)](){return!!navigator[ke(343)]}[ke(615)](){const t=ke;return typeof navigator.sendBeacon===t(295)}[ke(291)](){const t=ke;return{hardwareConcurrency:Object[t(308)](Object[t(559)](navigator),t(577))[t(328)][t(411)](),languages:Object.getOwnPropertyDescriptor(Object[t(559)](navigator),"languages").get[t(411)]()}}async[ke(352)](){const t=ke;if("function"==typeof navigator.getInstalledRelatedApps)try{const{related_applications:e}=await navigator.getInstalledRelatedApps();if(e&&Array[t(610)](e))return e.map((e=>{const n=t;return{platform:e[n(677)],url:e[n(410)]}}))}catch(t){}}[ke(394)](){return document[ke(447)]}[ke(567)](){return performance[ke(557)]}getPerformanceMemory(){const t=ke,{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=performance[t(359)];return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}[ke(464)](){const t=ke;return Promise.resolve(!!window[t(520)])}getOpenDatabase(){const t=ke,{openDatabase:e}=window;return Promise[t(305)](!!e)}[ke(384)](){const t=ke,e=window[t(484)]&&document instanceof DocumentTouch,n={maxTouchPoints:navigator[t(499)]||navigator[t(417)]||0,documentTouch:e,ontouchstart:t(356)in window};return Promise.resolve(n)}[ke(378)](){const t=ke;function e(t){const e=Ne,n=[];for(let r=0;r<t.length;++r)n[e(412)]({type:t[r][e(583)],suffixes:t[r][e(671)]});return n}const n=[];for(let r=0;r<navigator.plugins.length;++r){const o=navigator.plugins[r];o&&n[t(412)]({name:o.name,description:o[t(422)],mimeTypes:e(o)})}return Promise[t(305)](n)}[ke(389)](){const t=ke,e=window[t(633)]||screen,{availLeft:n}=e,{availTop:r}=e,o={availHeight:e.availHeight,availLeft:n,availTop:r,availWidth:e[t(672)],colorDepth:e[t(524)],height:e.height,width:e[t(456)],pixelDepth:e.pixelDepth,orientationAngle:e[t(617)]&&e[t(617)][t(375)],orientationType:e.orientation&&e[t(617)][t(583)],devicePixelRatio:window.devicePixelRatio};return Promise[t(305)](o)}static hashCodeString(t){if(null==t)return;let e=0,n=0;const r=t[ke(304)];for(;n<r;)e=(e<<5)-e+t.charCodeAt(n++)|0;return e}getWindowOuter(){const t=ke,e={outerWidth:window[t(475)],outerHeight:window[t(396)]};return Promise[t(305)](e)}[ke(515)](){const t=ke,e=navigator[t(526)];return Promise[t(305)](e)}[ke(393)](){const t=window[ke(617)];return Promise.resolve(t)}getPlatform(){const t=navigator[ke(677)];return Promise.resolve(t)}getCpuClass(){const t=ke,e=navigator.cpuClass;return Promise[t(305)](e)}getOsCpu(){const t=ke,e=navigator[t(449)];return Promise[t(305)](e)}[ke(369)](){const t=ke,e=!!window[t(609)][t(316)][t(371)];return Promise[t(305)](e)}[ke(498)](){const t=navigator[ke(436)];return Promise.resolve(t)}async getMediaDevices(){const t=ke,e=await navigator[t(336)][t(675)](),n=[];for(const r of e)n[t(412)]({kind:r.kind,label:r[t(521)],deviceId:r[t(662)],groupId:r.groupId});return n}async[ke(342)](){const t=ke,e=window[t(646)]||window[t(637)];if(!e)return-1;const n=new e(1,5e3,44100),r=n[t(656)]();r[t(583)]="triangle",r[t(313)][t(312)]=1e4;const o=n[t(322)]();o[t(573)][t(312)]=-50,o[t(503)].value=40,o.ratio[t(312)]=12,o.attack[t(312)]=0,o.release[t(312)]=.25,r.connect(o),o[t(361)](n[t(621)]),r[t(397)](0);const i=new Promise((async(e,r)=>{const o=t;n.oncomplete=t=>e(t[o(432)]);try{await n.startRendering()}catch(t){r(t)}})),a=(await i)[t(373)](0).subarray(4500);return Ve[t(643)](a)}async[ke(545)](){const t=ke;var e;const n=window.OfflineAudioContext||window[t(637)];if(!n)return{};const r=new n(1,5e3,44100),o=r[t(656)]();o[t(583)]=t(461),o[t(313)][t(312)]=1e4;const i=r.createDynamicsCompressor();i[t(573)][t(312)]=-50,i[t(503)].value=40,i[t(616)][t(312)]=0;const a=r[t(505)]();o.connect(i),i[t(361)](a),i[t(361)](r[t(621)]),o[t(397)](0);try{await r[t(298)](),i[t(471)](),o[t(471)]();const n=new Float32Array(a[t(513)]);null===(e=a[t(469)])||void 0===e||e[t(339)](a,n);const s=new Float32Array(a[t(612)]);return t(539)in a&&a[t(539)](s),{gain:i[t(604)][t(312)]||i[t(604)],freq:ze(n),time:ze(s)}}catch(t){return{}}}static[ke(643)](t){const e=ke;let n=0;for(let r=0;r<t[e(304)];++r)n+=Math[e(360)](t[r]);return n}getFonts(){const t=ke,e=[t(402),t(632),t(603)],n=[t(406),t(427),t(634),t(462),t(551),t(565),t(527),t(413),"Bitstream Vera Sans Mono",t(525),t(663),t(420),t(560),"EUROSTILE",t(512),t(492),t(446),t(626),t(670),t(443),"Haettenschweiler",t(401),t(331),t(639),t(636),"Levenim MT","Lucida Bright",t(423),t(587),t(619),"MS Outlook","MS Reference Specialty",t(600),t(588),"MYRIAD PRO","Marlett","Meiryo UI",t(564),t(654),t(474),"PMingLiU",t(510),"SCRIPTINA",t(460),"Serifa",t(653),"Small Fonts",t(451),t(611),t(445),t(458),t(346)],r=document[t(589)]("div");r.style.visibility="hidden";const o={},i={},a=e=>{const n=t,o=document[n(589)](n(652)),{style:i}=o;return i[n(537)]="absolute",i[n(301)]="0",i.left="0",i[n(489)]=e,i[n(640)]=n(398),o[n(363)]="mmMwWLliI0O&1",r[n(572)](o),o},s=e[t(645)](a),u=(()=>{const r=t,o={};for(const t of n)o[t]=e[r(645)]((e=>a("'"+t+"',"+e)));return o})();document.body[t(572)](r);try{for(let n=0;n<e[t(304)];n++)o[e[n]]=s[n].offsetWidth,i[e[n]]=s[n][t(466)];const r=n[t(546)]((n=>{return r=u[n],e[t(480)](((t,e)=>r[e].offsetWidth!==o[t]||r[e].offsetHeight!==i[t]));var r}));return Promise[t(305)](r)}finally{document[t(504)][t(509)](r)}}[ke(426)](){const t=ke,e=(new Date)[t(426)]();return Promise[t(305)](e)}getLanguage(){const t=ke,e=navigator.language;return Promise[t(305)](e)}[ke(561)](){const t=ke,e=navigator[t(294)];return Promise[t(305)](e)}getHardwareConcurrency(){const t=navigator.hardwareConcurrency;return Promise.resolve(t)}[ke(658)](){const t=ke,e=navigator[t(676)];return Promise[t(305)](e)}[ke(414)](){const t=ke;return[t(517),"__selenium_evaluate","__webdriver_script_function",t(605),t(452),t(386),"__driver_unwrapped","__webdriver_unwrapped",t(501),t(649),t(399)][t(546)]((t=>document[t]))}[ke(638)](){const t=ke,e=Intl[t(487)]().resolvedOptions().timeZone;return Promise[t(305)](e)}[ke(660)](){const t=ke,e=navigator.vendor;return Promise[t(305)](e)}[ke(334)](){const t=ke,e=navigator[t(358)];return Promise[t(305)](e)}async[ke(439)](){const t=ke,e=document[t(589)]("canvas");e.width=1,e.height=1;const n=e.getContext("2d"),r={winding:(o=n,o[Ne(470)](0,0,10,10),o.rect(2,2,6,6),!o.isPointInPath(5,5,"evenodd")),geometry:function(t,e){const n=Ne;t[n(456)]=122,t[n(391)]=110,e.globalCompositeOperation=n(419);const r=[[n(418),40,40],[n(318),80,40],[n(338),60,80]];for(const[t,o,i]of r)e[n(405)]=t,e[n(580)](),e[n(622)](o,i,40,0,2*Math.PI,!0),e[n(367)](),e.fill();return e[n(405)]="#f9c",e.arc(60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e[n(424)](n(408)),Ve.hashCodeString(t[n(623)]())}(e,n),text:function(t,e){const n=Ne;t[n(456)]=240,t.height=60,e[n(333)]=n(518),e[n(405)]=n(383),e[n(508)](100,1,62,20),e[n(405)]=n(290),e[n(597)]='11pt "Times New Roman"';const r=n(392)+String.fromCharCode(55357,56835);return e[n(303)](r,2,15),e.fillStyle=n(476),e[n(597)]="18pt Arial",e[n(303)](r,4,45),Ve[n(570)](t[n(623)]())}(e,n)};var o;return Promise[t(305)](r)}async getBattery(){const t=ke,e=await navigator.getBattery();return{charging:e[t(463)],chargingTime:e[t(655)],dischargingTime:e[t(500)],level:e.level}}async[ke(651)](){const t=ke;return!!navigator.brave&&await navigator[t(599)][t(674)]()}async[ke(302)](){const t=ke,e=document[t(589)]("canvas"),n=e[t(429)](t(628))||e[t(429)](t(593)),r=n.getExtension(t(495));return Promise[t(305)](n[t(669)](r[t(642)]))}async[ke(395)](){const t=ke,e=document[t(589)](t(311)),n={basic:""===e[t(320)](t(528)),advanced:""===e[t(320)](t(370))};return Promise[t(305)](n)}async[ke(491)](){const t=ke,{publicKey:e,keyIdentifier:n,errors:r}=await this[t(357)][t(297)](),o={publicKey:e,keyIdentifier:n};return(null==r?void 0:r[0])&&(o[t(455)]=r[0]),o}static[ke(531)](){const t=ke;return/iPhone|iPad|iPod|Android|MiuiBrowser/i[t(644)](navigator[t(365)])||null!=window[t(617)]||window[t(299)](t(323))[t(362)]}static[ke(431)](){const t=ke,e=navigator[t(473)];if(e&&typeof e[t(552)]===t(507))return e[t(552)];const n=/iPhone|iPad|iPod|Android|MiuiBrowser/i[t(644)](navigator[t(365)]),r=window[t(299)](t(554)).matches&&window[t(299)](t(323)).matches;return n||null!=window.orientation||r}}function He(){const t=["brave","MS UI Gothic","tts","acosh","serif","reduction","__webdriver_script_func","puffinDevice","calledSelenium","getNavigatorPermissionsState","HTMLElement","isArray","TRAJAN PRO","fftSize","state","getWindowAIAPIs","isSendBeaconFunction","attack","orientation","product","MS Mincho","worker promise rejected","destination","arc","toDataURL","storageManager","geb","GOTHAM","startPromisesLoop","webgl","navigatorIsUserActive","__$webdriverAsyncExecutor","storage","sans-serif","screen","Agency FB","Summarizer","Letter Gothic","webkitOfflineAudioContext","getTimezone","Leelawadee","fontSize","57440ELCCqr","UNMASKED_RENDERER_WEBGL","getHash","test","map","OfflineAudioContext","18882XucRWr","getNavigatorBasedKeys","__selenium_unwrapped","getFIDOEnabled","getBrave","span","SimHei","Minion Pro","chargingTime","createOscillator","__edgeTrackingPreventionStatistics","getDeviceMemory","token","getVendor","ChromeDriverw","deviceId","Century","__lastWatirConfirm","domAutomation","now","__yb","webdriver-evaluate-response","getParameter","Gill Sans","suffixes","availWidth","cos","isBrave","enumerateDevices","deviceMemory","platform","#069","getNavigatorPrototype","CDPRuntimeDomainTest","emit","languages","function","getMathFingerprint","getPublicData","startRendering","matchMedia","exp","top","getWebGlRenderer","fillText","length","resolve","asinh","document","getOwnPropertyDescriptor","isAgenticCollect","getNavigatorProduct","video","value","frequency","getTTS","getMediaDevices","prototype","_phantom","#2ff","webRTCDisabled","canPlayType","spynner_additional_js_loaded","createDynamicsCompressor","only screen and (max-width: 600px)","RTCPeerConnection","_Selenium_IDE_Recorder","sort","lastDeviceData","get","Error","navigatorStorageEstimation","Humanst521 BT","webdriver-evaluate","textBaseline","getBuildID","getFonts","mediaDevices","selenium-evaluate","#ff2","call","entries","getWindowBasedKeys","getAudioFingerprint","geolocation","asin","fmget_targets","ZWAdobeF","oprt","cosh","windowDocumentAuxVarsTest","stack","agenticIdentityEnabled","getInstalledRelatedApps","calledPhantom","estimate","values","ontouchstart","cryptoBinding","buildID","memory","abs","connect","matches","textContent","bind","userAgent","OSMJIF","closePath","__ybro","getAddBehavior","video/mp4;;Codecs =avc1.42E01E","addBehavior","sin","getChannelData","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","angle","hasSequentum","getPerformanceMemory","getPlugins","70zbicUp","__crWeb","debug","isActive","#f60","getTouchSupport","navigatorOnLine","__fxdriver_evaluate","getCookieEnabled","deviceDataCalculationExpiry","getScreen","localStorage","height","Cwm fjordbank gly ","getWindowOrientation","getReferrer","getCodesTests","outerHeight","start","10px","__fxdriver_unwrapped","cookieEnabled","Helvetica Neue","monospace","sqrt","Promise","fillStyle","sans-serif-thin","getAsyncToken","evenodd","getHardwareConcurrency","url","toString","push","Batang","getDocumentBasedKeys","getMediaMatch","safari","msMaxTouchPoints","#f2f","multiply","Century Gothic","getVoices","description","Lucida Sans","fill","__webdriverFuncgeb","getTimezoneOffset","ARNO PRO","284dMRJyF","getContext","webkit","isMobileForAgentic","renderedBuffer","ucweb","isGeoLocationExists","watinExpressionResult","productSub","_selenium","speechSynthesis","getCanvasFingerprint","cache_","no-preference","atan","HELV","userActivation","Univers CE 55 Medium","Futura Md BT","referrer","getDeviceData","oscpu","getCpuClass","Staccato222 BT","__webdriver_script_fn","calculate","domAutomationController","invalidPublicKeyId","width","tanh","Vrinda","sdkDeviceDataCollectionIgnoreList","Segoe UI Light","triangle","Arabic Typesetting","charging","getIndexedDB","serviceWorker","offsetHeight","getLocalStorage","forced","getFloatFrequencyData","rect","disconnect","dataPointsExtractor","userAgentData","Monotype Corsiva","outerWidth","rgba(102, 204, 0, 0.2)","low","query","__lastWatirPrompt","some","less","getNavigatorUserAgent","Symbol","DocumentTouch","getBattery","replace","DateTimeFormat","1000","fontFamily","getWindowOuter","getCryptoBindingData","Futura Bk BT","cdc_adoQpoasnfa76pfcZLmcfl_Array","log","WEBGL_debug_renderer_info","rec2020","credentials","getProductSub","maxTouchPoints","dischargingTime","__driver_evaluate","__driver_unwrapped","knee","body","createAnalyser","isUserVerifyingPlatformAuthenticatorAvailable","boolean","fillRect","removeChild","Pristina","getSessionStorage","Franklin Gothic","frequencyBinCount","name","getWebDriver","external","__webdriver_evaluate","alphabetic","collectPromisesData","indexedDB","label","865800uKiLCI","__webdriver__chr","colorDepth","Calibri","webdriver","BankGothic Md BT",'video/mp4; codecs="avc1.42E01E"',"defineProperty","isNodeReachable_","isMobile","getNavigatorUAData","_WEBDRIVER_ELEM_CACHE","high","LanguageDetector","getOwnPropertyNames","position","onvoiceschanged","getFloatTimeDomainData","log1p","539586DNWYnq","getCryptoRandomValues","getPlatform","chrome_asyncScriptInfo","getAudioFingerprintExtended","filter","913YREPun","getConfValue","__selenium_evaluate","LanguageModel","Arial Unicode MS","mobile","getConnection","(pointer: coarse)","none","$chrome_asyncScriptInfo","timing","8AVTnjg","getPrototypeOf","Clarendon","getLanguages","__phantomas","tan","Microsoft Uighur","AvantGarde Bk BT","getNavigatorHighEntropyData","getPerformanceTiming","onLine","__webdriver_unwrapped","hashCodeString","warn","appendChild","threshold","getLanguage","webdriverCommand","sessionStorage","hardwareConcurrency","Translator","awesomium","beginPath","notifications","382081mjFNEM","type","configManager","atanh","PublicKeyCredential","Menlo","MT Extra","createElement","permissions","Object","more","webgl-experimental","inverted","__firefox__","srgb","font","96849rwKqBr"];return(He=function(){return t})()}const Ge=We;var je;function We(t,e){return t-=439,Ye()[t]}!function(){const t=We,e=Ye();for(;;)try{if(215803==parseInt(t(445))/1+parseInt(t(442))/2+-parseInt(t(440))/3*(-parseInt(t(447))/4)+-parseInt(t(443))/5+-parseInt(t(455))/6+parseInt(t(450))/7+parseInt(t(439))/8*(-parseInt(t(453))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(t){const e=We;t[e(448)]=e(452),t[e(446)]="device",t.EVENT_TYPE_INTERACTION=e(454),t[e(449)]="identification",t[e(444)]=e(456)}(je||(je={}));const Xe=Ge(441);function Ye(){const t=["734405FsLaUe","EVENT_TYPE_ACTION_RESULT","325053cHFIFD","EVENT_TYPE_DEVICE","4NnaOuA","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","473095izeAIK","mobile_web","action","99AnLvRM","interaction","787794uKPsJK","action_result","213448XicfnL","612363MzXInW","desktop_web","381430FFEfme"];return(Ye=function(){return t})()}const qe=Ge(451);function Ze(){const t=["24AqYNol","4322169ptOIaG","ric","21261696AbZocG","296838qTBKeQ","&type=","10ulejVa","storageManager","42hzzHGK","3068732JimZRi","error fetching config","106844SZlIoQ","getData","shouldUpdateConf","parse","now","device/conf?tenantId=","isMobile","120ZfytSQ","conf","getItemLocalStorageSafe","requestsManager","stringify","error","10049182FEUEyZ","error loading config","fetchConf","setItemLocalStorageSafe","1453434WSqCgo","loadConf","getConfValue","1EZrsdb"];return(Ze=function(){return t})()}const Ke=Qe;!function(){const t=Qe,e=Ze();for(;;)try{if(783461==parseInt(t(165))/1*(parseInt(t(175))/2)+-parseInt(t(167))/3+parseInt(t(177))/4*(-parseInt(t(152))/5)+parseInt(t(162))/6*(-parseInt(t(174))/7)+-parseInt(t(166))/8*(-parseInt(t(170))/9)+-parseInt(t(172))/10*(-parseInt(t(158))/11)+parseInt(t(169))/12)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const $e=Ke(168);function Qe(t,e){return t-=149,Ze()[t]}class Je{constructor(t,e){const n=Ke;this[n(173)]=t,this[n(155)]=e,this.conf=this[n(163)]()}async[Ke(160)](t){const e=Ke;try{const n=Ve[e(151)]()?qe:Xe,r=e(150)+t+e(171)+n,o=await this[e(155)][e(178)](r);return null!=o?o:{}}catch(n){return Se[e(157)](e(176),{clientId:t,error:n}),{}}}loadConf(){const t=Ke,e=this[t(173)][t(154)]($e);if(null!=e)try{return JSON[t(180)](e)}catch(e){Se[t(157)](t(159),{error:e})}return{}}[Ke(179)](){const t=Ke,e=this[t(164)]("timestamp",0);return Date[t(149)]()-e>36e5}async refreshConf(t){const e=Ke;if(!this.shouldUpdateConf())return!1;let n=await this[e(160)](t);return 0==Object.keys(n).length?n=this.loadConf():this[e(173)][e(161)]($e,JSON[e(156)](n)),this[e(153)]=n,!0}[Ke(164)](t,e){const n=Ke,r=void 0!==this[n(153)]?this[n(153)][t]:void 0;return null!=r?r:e}}const tn=nn;function en(){const t=["function","toString","timeOrigin","950467xXGLIu","length","base64ToBase64Url","1676TUFXzS","splice","randomUUID","56BdUDiJ","slice","push","319524rOPezT","floor","fromCharCode","getRandomValues","12UeTaiT","replace","7355uECNXK","45QUrhSb","random","join","112312DQEVqh","getEventHighResTimestamp","now","encode","220bnHLYa","46515dErrfm","timeStamp","maintainLastXItems","undefined","22442ErpqQd","4864760jFWRvY"];return(en=function(){return t})()}function nn(t,e){return t-=349,en()[t]}!function(){const t=nn,e=en();for(;;)try{if(350788==-parseInt(t(367))/1+-parseInt(t(378))/2*(-parseInt(t(363))/3)+-parseInt(t(375))/4*(-parseInt(t(354))/5)+parseInt(t(352))/6*(parseInt(t(372))/7)+-parseInt(t(358))/8*(-parseInt(t(355))/9)+-parseInt(t(368))/10+-parseInt(t(362))/11*(parseInt(t(381))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class rn{static[tn(365)](t,e,n){const r=tn;return t.length>=e&&t[r(376)](0,1),t[r(380)](n),t}static[tn(359)](t){const e=tn;var n,r;return(null!==(n=performance[e(371)])&&void 0!==n?n:Date[e(360)]()-performance.now())+(null!==(r=null==t?void 0:t[e(364)])&&void 0!==r?r:performance[e(360)]())}static base64UrlEncode(t){const e=tn,n=(new TextEncoder)[e(361)](t),r=String[e(350)](...n);return btoa(r)[e(353)](/\+/g,"-")[e(353)](/\//g,"_")[e(353)](/=/g,"")}static[tn(374)](t){return t[tn(353)](/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static[tn(377)](){const t=tn;if(typeof crypto!==t(366)&&typeof crypto[t(377)]===t(369))return crypto.randomUUID();const e=new Uint8Array(16);if("undefined"!=typeof crypto&&"function"==typeof crypto[t(351)])crypto[t(351)](e);else for(let n=0;n<e[t(373)];n++)e[n]=Math[t(349)](256*Math[t(356)]());e[6]=15&e[6]|64,e[8]=63&e[8]|128;const n=[];for(let r=0;r<e[t(373)];r++)n[t(380)](e[r][t(370)](16).padStart(2,"0"));return n[t(379)](0,4)[t(357)]("")+"-"+n[t(379)](4,6)[t(357)]("")+"-"+n[t(379)](6,8)[t(357)]("")+"-"+n[t(379)](8,10)[t(357)]("")+"-"+n[t(379)](10,16).join("")}}const on=cn;!function(){const t=cn,e=sn();for(;;)try{if(891307==parseInt(t(140))/1*(parseInt(t(122))/2)+parseInt(t(127))/3+parseInt(t(121))/4+parseInt(t(117))/5*(-parseInt(t(139))/6)+-parseInt(t(147))/7*(-parseInt(t(116))/8)+-parseInt(t(133))/9*(parseInt(t(135))/10)+parseInt(t(134))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class an{constructor(t){const e=cn;this[e(152)]=[],this[e(149)]=t}[on(120)](t){const e=on,n=this[e(129)](t);rn.maintainLastXItems(this[e(152)],this[e(149)],n)}[on(150)](){return this.data}[on(129)](t){const e=on;return o({x:t.x,y:t.y,tspl:Date[e(126)]()},this.extractButtonsPressedData(t))}[on(144)](t){const e=on;return o(o(o(o({},t[e(146)]&&{ctrlKey:!0}),t[e(128)]&&{altKey:!0}),t[e(145)]&&{shiftKey:!0}),0!=t[e(130)]&&{buttons:t[e(130)]})}}function sn(){const t=["function","maintainLastXItems","6DLtpez","1211201ogCNGL","bufferSize","getCoalescedEvents","detail","extractButtonsPressedData","shiftKey","ctrlKey","7567YbAqlc","cancelable","buffer","getData","firesTouchEvents","data","isTrusted","offsetY","parentId","forEach","10776IsyHGr","7078360iAmtHT","offsetX","target","collect","2095588xZkDKw","2YDqsMW","composed","view","sourceCapabilities","now","1689234qceEon","altKey","extractEventData","buttons","getEventHighResTimestamp","inputType","3624237fSeFxR","1798148NqtmAp","40flJXoh","metaKey"];return(sn=function(){return t})()}class un{constructor(t){const e=on;this[e(152)]=[],this[e(141)]=t}[on(120)](t){const e=on,n=rn[e(131)](t);if(typeof t[e(142)]===e(137)){const r=t[e(142)]();if(r&&r.length>0)return void r[e(115)]((t=>{const r=this[e(129)](t,n,!0);rn.maintainLastXItems(this.data,this.bufferSize,r)}))}const r=this[e(129)](t,n,!1);rn[e(138)](this.data,this[e(141)],r)}getData(){return this[on(152)]}[on(129)](t,e,n){const r=on,i=o({x:t.x,y:t.y,timestampHighRes:rn.getEventHighResTimestamp(t)},this[r(144)](t));return n&&(i[r(114)]=e),i}[on(144)](t){const e=on;return o(o(o(o({},t.ctrlKey&&{ctrlKey:!0}),t[e(128)]&&{altKey:!0}),t.shiftKey&&{shiftKey:!0}),0!=t.buttons&&{buttons:t[e(130)]})}}function cn(t,e){return t-=112,sn()[t]}class ln{constructor(t){const e=on;this[e(152)]=[],this[e(149)]=t}[on(120)](t){const e=on;var n;const r={x:t.x,y:t.y,timestamp:Date[e(126)](),mouseButtonType:t[e(143)],offsetX:t[e(118)],offsetY:t[e(113)],isPressed:null==(null===(n=t[e(125)])||void 0===n?void 0:n.firesTouchEvents)?null:!t[e(125)][e(151)],target_id:t[e(119)].id};rn[e(138)](this.data,this.buffer,r)}[on(150)](){const t=on,e=[...this[t(152)]];return this[t(152)]=[],e}}class dn{constructor(t){this[on(152)]=[],this.bufferSize=t}collect(t){const e=on;var n;const r={isTrusted:t[e(112)],cancelable:t.cancelable,composed:t.composed,isView:!!t[e(124)],shiftKey:t.shiftKey,metaKey:t[e(136)],ctrlKey:t[e(146)],altKey:t[e(128)],firesTouchEvents:null===(n=t.sourceCapabilities)||void 0===n?void 0:n.firesTouchEvents,timestamp:Date[e(126)]()};rn[e(138)](this.data,this[e(141)],r)}getData(){const t=on,e=[...this.data];return this[t(152)]=[],e}}class hn{constructor(t){const e=on;this.data=[],this[e(141)]=t}collect(t){const e=on;var n;const r={isTrusted:t[e(112)],cancelable:t[e(148)],composed:t[e(123)],isView:!!t.view,location:t.location,shiftKey:t.shiftKey,ctrlKey:t[e(146)],altKey:t.altKey,firesTouchEvents:null===(n=t.sourceCapabilities)||void 0===n?void 0:n[e(151)],timestamp:Date[e(126)]()};rn.maintainLastXItems(this[e(152)],this[e(141)],r)}[on(150)](){const t=on,e=this[t(152)];return this[t(152)]=[],e}}class fn{constructor(t){this[on(152)]=[],this.bufferSize=t}[on(120)](t){const e=on,n={isTrusted:t[e(112)],cancelable:t[e(148)],composed:t[e(123)],inputType:t[e(132)],isView:!!t[e(124)],timestamp:Date.now()};rn.maintainLastXItems(this[e(152)],this[e(141)],n)}[on(150)](){const t=on,e=this[t(152)];return this[t(152)]=[],e}}class pn{constructor(t){const e=on;this[e(152)]=[],this[e(141)]=t}[on(120)](t){const e=on,n={isTrusted:t.isTrusted,cancelable:t[e(148)],composed:t.composed,timestamp:Date[e(126)]()};rn.maintainLastXItems(this[e(152)],this.bufferSize,n)}getData(){const t=on,e=this[t(152)];return this[t(152)]=[],e}}const gn=mn;function mn(t,e){return t-=215,wn()[t]}function wn(){const t=["addSafeInteractionListener","13712150eeRLQh","pageshow","cmet","blur","getGenericAttributes","287695OQbwhc","24460ThpPBz","addEventListener","registerEventListeners","mousedown","219nQquFF","dropEffect","filter","selectMoveEventTypeBasedOnRollout","handleEvent","error","pagehide","tagName","INPUT","random","safeEventCallback","mousemove","getAttachedData","cancelable","inputTypeFilter","getStoredMoveEventType","target","keys","deviceEventDataCollectionIgnoreList","moveEventType","virtualKeyboard","pecrp","Error while adding listener","entries","offsetX","clipboardData","hasFocus","submit","SELECT","visibilityState","mouseEventsCollectionBuffer","click","998063LhiNCG","828SSSkut","includes","paste","pointermove","TEXTAREA","effectAllowed","getItemLocalStorageSafe","collect","input","error adding interaction listener","storageManager","composed","detectMoveEventType","isTrusted","pointerMoveRolloutPercentage","PointerEvent","getEventHighResTimestamp","persistRolloutAndMoveEventTypeSelections","mouseup","1413189bLAehI","sourceCapabilities","8549728WuHuAA","36RgHGlq","offsetY","getData","forEach","interactionEventsCollectorsData","4382oaqJVk","firesTouchEvents","overlaysContent","undefined"];return(wn=function(){return t})()}!function(){const t=mn,e=wn();for(;;)try{if(564034==parseInt(t(282))/1+parseInt(t(246))/2*(-parseInt(t(250))/3)+-parseInt(t(230))/4*(-parseInt(t(245))/5)+parseInt(t(283))/6*(parseInt(t(235))/7)+parseInt(t(229))/8+parseInt(t(227))/9+-parseInt(t(240))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const vn="change",yn=gn(281),_n=gn(285),En=gn(261),bn=gn(286),Cn=gn(226),An=gn(249),In=gn(277),Sn="keyup",Tn="keydown",Dn=gn(216),On="focusout",Rn="focus",Mn=gn(243),kn="visibilitychange",Nn=gn(256),xn=gn(241),Pn=[gn(258),gn(278),gn(287)],Bn=gn(271),Fn=gn(242);class Ln{constructor(t,e,n,r,i){const a=gn;this[a(218)]=r,this[a(268)]=t,this[a(280)]=e,this[a(260)]=n,this[a(222)]=i,this.moveEventType=this.detectMoveEventType(),this[a(234)]={[yn]:{eventTypesToAttach:[this[a(269)],Cn,An],attributesMapper:t=>{const e=a;var n;return{x:t.x,y:t.y,mouseButtonType:t.detail,isPressed:null==(null===(n=t[e(228)])||void 0===n?void 0:n[e(236)])?null:!t[e(228)][e(236)],offsetX:t[e(274)],offsetY:t[e(231)],target_id:t[e(266)].id}}},[_n]:{attributesMapper:t=>{const e=a;return{target_id:t[e(266)].id,isTrusted:t[e(221)],cancelable:t[e(263)],composed:t[e(219)],dropEffect:t[e(275)][e(251)],effectAllowed:t[e(275)][e(288)]}}},[In]:{attributesMapper:t=>({target_id:t[a(266)].id})},[En]:{continousCollectors:[new an(this[a(280)])]},[bn]:{continousCollectors:[new un(this[a(280)])]},[Cn]:{continousCollectors:[new ln(1)]},[An]:{continousCollectors:[new ln(1)]},[On]:{eventTypesToAttach:[Dn,Sn,Tn,vn],filter:this[a(264)],attributesMapper:t=>{const e=a,{target:n,isTrusted:r,cancelable:i,composed:s}=t;return o({target_id:n.id,dataset_keys:Object[e(267)](n.dataset||{}),isTrusted:r,cancelable:i,composed:s},navigator[e(270)]&&{navigator_virtualKeyboard:navigator[e(270)][e(237)]})}},[Dn]:{filter:this.inputTypeFilter,continousCollectors:[new fn(50)]},[Sn]:{filter:this[a(264)],continousCollectors:[new hn(50)]},[Tn]:{filter:this.inputTypeFilter,continousCollectors:[new dn(50)]},[vn]:{continousCollectors:[new pn(50)]},[Rn]:{attributesMapper:t=>{const e=a;var n;return{visibilityState:document.visibilityState,hasFocus:document[e(276)](),timestampHighRes:rn[e(224)](t),target_id:null===(n=t[e(266)])||void 0===n?void 0:n.id}}},[Mn]:{attributesMapper:t=>{const e=a;var n;return{visibilityState:document[e(279)],hasFocus:document[e(276)](),timestampHighRes:rn[e(224)](t),target_id:null===(n=t[e(266)])||void 0===n?void 0:n.id}}},[kn]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(279)],hasFocus:document[e(276)](),timestampHighRes:rn[e(224)](t)}}},[Nn]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(279)],hasFocus:document[e(276)](),timestampHighRes:rn[e(224)](t)}}},[xn]:{attributesMapper:t=>{const e=a;return{visibilityState:document[e(279)],hasFocus:document[e(276)](),timestampHighRes:rn.getEventHighResTimestamp(t)}}}}}[gn(220)](){const t=gn;return typeof window!==t(238)&&window[t(223)]?this[t(253)]():En}[gn(253)](){const t=gn,e=this[t(218)][t(289)](Bn);if((null!=e?Number(e):null)!==this.pointerMoveRolloutPercentage){const e=Math[t(259)]()<this[t(222)]/100?bn:En;return this[t(225)](e),e}return this[t(265)]()}[gn(225)](t){const e=gn;this.storageManager.setItemLocalStorageSafe(Bn,this[e(222)]),this[e(218)].setItemLocalStorageSafe(Fn,t)}[gn(265)](){const t=gn,e=this[t(218)][t(289)](Fn);return(n=e)===bn||n===En?e:En;var n}[gn(264)](t){const e=gn;var n;const r=null===(n=t[e(266)])||void 0===n?void 0:n[e(257)];return Pn.includes(r)}[gn(248)](){const t=gn;for(const[e,n]of Object[t(273)](this[t(234)]))if(!this[t(268)][t(284)](e)&&!(e===En&&this.moveEventType===bn||e===bn&&this[t(269)]===En))try{this[t(239)](e,n)}catch(n){Se[t(255)](t(272),{error:n,eventType:e})}}[gn(252)](t,e){return!t[gn(252)]||t.filter(e)}async[gn(254)](t,e,n){const r=gn,{attributesMapper:i,continousCollectors:a}=t;if(!this[r(252)](t,e))return!1;if(a)a.forEach((t=>{t[r(215)](e)}));else{const t=this[r(244)](),a=this[r(262)](n),s=o(o(o({},t),i(e)),a&&{attachedEventsData:a});await this[r(260)](n,s)}return!0}[gn(239)](t,e){const n=gn;window[n(247)](t,(async r=>{const o=n;try{await this[o(254)](e,r,t)}catch(t){Se.error(o(217),{error:t})}}),t===Rn||t===Mn)}[gn(262)](t){const e=gn;let n;const r=this[e(234)][t].eventTypesToAttach;return r&&(n={},r[e(233)]((t=>{const r=e,{continousCollectors:o}=this[r(234)][t];if(o){const e=t===bn?"pointerevents":t;o[r(233)]((t=>n[e]=t[r(232)]()))}}))),n}[gn(244)](){return{location:window.location.href}}}function zn(t,e){return t-=122,Un()[t]}function Un(){var t=["TRUST","CHALLENGE","714DhcGGR","compress","DENY","1647446HCIikn","6739888hfWGlv","2960298sYHoQR","1379385FjvEln","10hCcnry","uncompressed","7404867XlCiHD","1TnbUEc","ALLOW","compressed","325FzNmuK","27916HwESTZ","37261gFEjiI"];return(Un=function(){return t})()}var Vn,Hn,Gn,jn,Wn,Xn;!function(){for(var t=zn,e=Un();;)try{if(434303==-parseInt(t(125))/1*(parseInt(t(136))/2)+parseInt(t(139))/3+-parseInt(t(129))/4*(-parseInt(t(128))/5)+parseInt(t(133))/6*(parseInt(t(130))/7)+-parseInt(t(137))/8+parseInt(t(124))/9*(parseInt(t(122))/10)+-parseInt(t(138))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(Hn=Vn||(Vn={}))[(Gn=zn)(134)]=Gn(127),Hn[Gn(123)]=Gn(123),(Wn=jn||(jn={}))[(Xn=zn)(126)]=Xn(126),Wn[Xn(132)]=Xn(132),Wn.DENY=Xn(135),Wn[Xn(131)]=Xn(131);const Yn=qn;function qn(t,e){return t-=323,Kn()[t]}!function(){const t=qn,e=Kn();for(;;)try{if(886101==-parseInt(t(352))/1*(parseInt(t(340))/2)+-parseInt(t(344))/3+parseInt(t(351))/4*(-parseInt(t(323))/5)+-parseInt(t(329))/6+-parseInt(t(341))/7+parseInt(t(334))/8+parseInt(t(346))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Zn{constructor(t){this[qn(354)]=t}[Yn(335)](){const t=Yn;return window.crypto.subtle[t(343)]({name:"AES-GCM",length:256},!0,[t(353),t(356)])}async[Yn(336)](t,e){const n=Yn,r=typeof t===n(339)?(new TextEncoder)[n(331)](t):t,o=window[n(348)][n(328)](new Uint8Array(12)),i={name:n(347),iv:o},a=await window[n(348)].subtle[n(353)](i,e,r);return{payloadCipherText:this[n(325)](a),iv:o}}async[Yn(333)](t,e,n){const r=Yn,o=await window[r(348)][r(350)][r(345)](r(330),t),i=this.arrayBufferToBase64(o),a=this.arrayBufferToBase64(e),s=(new TextEncoder).encode(JSON[r(342)]({symKey:i,iv:a})),u=await window[r(348)][r(350)][r(353)]({name:r(349)},n,s);return this.arrayBufferToBase64(u)}[Yn(325)](t){const e=Yn;let n="";const r=new Uint8Array(t),o=r[e(327)];for(let t=0;t<o;t++)n+=String[e(332)](r[t]);return window[e(357)](n)}[Yn(326)](t){const e=Yn;return window.crypto[e(350)][e(338)](e(337),JSON.parse(t),{name:e(349),hash:e(355)},!0,[e(353)])}async[Yn(353)](t,e){const n=Yn;if(!window.crypto||!window.crypto[n(350)])throw new Error(n(324));const r=await this[n(335)](),{payloadCipherText:o,iv:i}=await this[n(336)](e,r),a=await this[n(326)](t);return{encryptedData:o,encryptedKey:await this[n(333)](r,i,a)}}}function Kn(){const t=["1783620weUzYo","raw","encode","fromCharCode","encryptSymKeyBundle","6655352grtuDI","generateSymKey","encryptPayload","jwk","importKey","string","1453682fMZCOB","5527354dLwELh","stringify","generateKey","4626555FShDod","exportKey","44805987fDyaYv","AES-GCM","crypto","RSA-OAEP","subtle","1016lkkLPF","2NOrATu","encrypt","configManager","SHA-256","decrypt","btoa","16565BhJnIT","crypto is not supported","arrayBufferToBase64","importPublicKey","byteLength","getRandomValues"];return(Kn=function(){return t})()}var $n,Qn,Jn,tr=er;function er(t,e){return t-=225,rr()[t]}!function(){for(var t=er,e=rr();;)try{if(467065==parseInt(t(232))/1*(-parseInt(t(227))/2)+parseInt(t(230))/3*(parseInt(t(243))/4)+parseInt(t(241))/5+-parseInt(t(244))/6*(parseInt(t(226))/7)+parseInt(t(225))/8*(-parseInt(t(234))/9)+parseInt(t(245))/10+parseInt(t(247))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),(Qn=$n||($n={}))[(Jn=er)(242)]=Jn(228),Qn.SERVER=Jn(240),Qn[Jn(233)]="communication";class nr extends Error{constructor(t,e,n){var r,o,i=er;super(),this[i(238)]=t,this[i(246)]=e,this[i(229)]=n,this.message=(null===(r=this[i(238)])||void 0===r?void 0:r.message)||this[i(238)][i(236)](),this[i(239)]=(null===(o=this[i(238)])||void 0===o?void 0:o[i(239)])||nr[i(239)]}[tr(236)](){var t=tr;return t(231)+this[t(235)]+(this[t(246)]?t(248)+this[t(246)]:"")+(this[t(229)]?", errorCode: "+this[t(229)]:"")}[tr(237)](){var t=tr;return o(o({name:this[t(239)],message:this[t(235)]},this[t(246)]&&{errorSpace:this.errorSpace}),this[t(229)]&&{errorCode:this.errorCode})}}function rr(){var t=["331240SOxrIH","errorSpace","20069676RvdWJJ",", errorSpace: ","3184344rpSsYI","15939eceTjQ","16514WYiqFL","client","errorCode","27wCtiKt","SDKError: ","110XQFUHe","COMMUNICATION","9nKRLgM","message","toString","toLog","error","name","server","2903875PGGzXR","CLIENT","113276OGGmSB","2424WhQWtn"];return(rr=function(){return t})()}function or(){const t=["26955140kXtVhn","1110082ZkjHht","40sCMpUx","363578JCYMOS","5SxCuww","10719436UKhbFg","275571sSJzWP","10061772HSJcIN","4JzkGzH","2456859NUBuHH"];return(or=function(){return t})()}function ir(t,e){return t-=328,or()[t]}!function(){const t=ir,e=or();for(;;)try{if(965423==-parseInt(t(329))/1+-parseInt(t(337))/2+parseInt(t(335))/3*(-parseInt(t(334))/4)+parseInt(t(330))/5*(-parseInt(t(333))/6)+parseInt(t(331))/7+-parseInt(t(328))/8*(-parseInt(t(332))/9)+parseInt(t(336))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const ar=ur;function sr(){const t=["errorCode","[Lightweight] clearQueue() called in standard mode - ignoring","get","performance","delete","extractWindowRespurces","publicKey","7584705olvGfW","unified-platform","key_rotation_status","includes","deviceId","refreshSessionToken","lightweight","buildEncryptedRequestBody","isArray","mobile_web","postData","events","Error while emitting event","tier","EVENT_TYPE_INTERACTION","EVENT_TYPE_DEVICE","setSessionToken","stringify","getPublicData","enableSessionToken","map","collectionSuppressed","getRotationData","fetchEventsFromLocalStorage","desktop_web","resources","getUserId","actionTokenCache","Failed to refresh data","device/events","flush","1913326qRcfRa","sdkPlatform","identityManager","value","call","correlationId","forEach","eventsQueue","sendDeviceDataEvent","maxLocalStoredEvents","__UNIFIED_SDK_VERSIONS__","undefined","pollingSessionToken","getTabId","index","getCachedActionToken","toString","next","COMMUNICATION","Crypto-binding is not supported. ","sort","error","refreshConf","Failed to parse events from localStorage","enablePendingQueue","clearQueue","location","push","pendingQueueEnabled","warn","getConfValue","flushTimeoutHandle","3vKeILV","[Lightweight] Building fresh device payload","configManager","actionToken","isTokenExpired","emitEvent","min","processingEvents","cryptoBinding","eventIdMap","key_rotation_data","length","lse","keys","getDeviceData","href","compressData","703680HmEtda","bufferSize","catch","storageManager","ACTION_TOKEN_CACHE_TTL","platform","EVENT_TYPE_ACTION","requestsManager","setInteractionObserver","cleanupSentEvents","navigatorHighEntropyData","generateEventIdentifier","eventIndex","no need to send device event","standDown","has","[Lightweight] Event queue cleared","21988710yUnpmq","enrichUADataIfDoesNotExist","parse","setItemLocalStorageSafe","timestamp","EVENT_TYPE_IDENTIFICATION","[Lightweight] getPayload() can only be called in lightweight mode","17146hkBDcG","getSnapshot","tabId","ACTION_TOKEN_CACHE_MAX_SIZE","getEntriesByType","isNaN","getDeviceId","deviceDataManager","userId","keyIdentifier","5bTeJAY","flushLock","EVENT_TYPE_ACTION_RESULT","initiatorType","getItemLocalStorageSafe","set","increaseEventIndex","history","action_type","[Lightweight] Failed to collect device data","setDeviceId","cleanLocalStorageEvents","agenticSignalsManager","Encryption error - missing public key","removeItemLocalStorageSafe","attributes","5954140MUAPeX","add","SUPPRESSIBLE_COLLECTION_EVENT_TYPES","uncompressed","addEventToLocalStorage","sendPageLoadEvent","clientId","info","pollingInterval","interactionObserver","crypto","data","ddls","5831250smpxkO","headers","pointerEventRolloutPercentage","type","safeEventCallback","sessionToken","getClientId","isMobile","shouldSendDeviceEvent","49iVnbdS","eventTypesToStore","popAllEvents","now","localStoredEventTypes","pop","maxEventStored","compress","registerEventListeners","find","lastDeviceInDeviceEvent","interactionEventsManager","cacheActionToken","standard","toLog","serverPath","encrypt","getActionEventCacheKey","Failed to polling data","handleRotateResponse"];return(sr=function(){return t})()}function ur(t,e){return t-=418,sr()[t]}!function(){const t=ur,e=sr();for(;;)try{if(974031==-parseInt(t(439))/1+-parseInt(t(545))/2*(-parseInt(t(577))/3)+-parseInt(t(465))/4*(-parseInt(t(449))/5)+parseInt(t(478))/6+-parseInt(t(487))/7*(-parseInt(t(594))/8)+-parseInt(t(514))/9+-parseInt(t(432))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const cr=ar(477),lr=ar(497),dr=ar(589),hr="deviceEventDataCollectionIgnoreList",fr=ar(513),pr=ar(595),gr=[je[ar(421)],je.EVENT_TYPE_IDENTIFICATION,je[ar(529)],je[ar(451)]],mr=[je.EVENT_TYPE_ACTION,je[ar(437)]],wr=ar(491),vr=ar(554),yr=ar(587),_r=ar(516),Er=ar(480);function br(){const t=ar;var e;return typeof globalThis!==t(556)?null===(e=globalThis[t(555)])||void 0===e?void 0:e[t(515)]:void 0}class Cr{get pendingQueueEnabled(){const t=ar;return this[t(579)].getConfValue(t(569),!1)}constructor(t,e,n,r,i,a,s,u,c){let l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:ar(500);const d=ar;this.configManager=t,this[d(418)]=e,this[d(446)]=n,this[d(422)]=r,this[d(547)]=i,this[d(461)]=a,this[d(585)]=s,this[d(502)]=u,this[d(533)]=c,this[d(527)]=l,this[d(427)]=null,this[d(586)]=new WeakMap,this[d(450)]=!1,this[d(535)]=!1,this[d(474)]=null,this[d(584)]=new Map,this[d(541)]=new Map,this.ACTION_TOKEN_CACHE_TTL=36e5,this[d(442)]=100,this[d(576)]=null,this[d(482)]=async(t,e)=>{const n=d;var r;try{null===(r=this.interactionObserver)||void 0===r||r[n(549)](this,t);const i=this[n(461)].getSnapshot(),a=o({},o(o({interaction_type:t},e),i&&{aiAgentSignals:i})),s={type:je[n(528)],attributes:a};return await this[n(582)](s)}catch(t){}},this[d(533)]=c,this[d(552)]=[],this[d(475)]=new Zn(t),this.interactionEventsManager=new Ln(this.configManager[d(575)](hr,[]),this[d(579)][d(575)]("mouseEventsCollectionBuffer",100),this[d(482)],this[d(418)],this[d(579)][d(575)](Er,0)),this[d(485)]=Ve[d(485)](),this.eventTypesToStore=this[d(579)].getConfValue(wr,[je.EVENT_TYPE_ACTION,je.EVENT_TYPE_DEVICE]),this[d(493)]=this[d(579)].getConfValue(vr,4),this.pollingInterval=36e4,this[d(527)]!==d(520)&&this[d(557)]()}[ar(426)](t){const e=ar;var n;if(this[e(586)][e(430)](t))return this[e(586)][e(509)](t);const r=[t[e(481)]||"",this[e(547)][e(484)](),this.identityManager[e(445)]()||"",this[e(547)][e(540)]()||"",t[e(436)],void 0!==(o=t[e(559)])?o:"",(null===(n=t.attributes)||void 0===n?void 0:n[e(457)])||""].filter((t=>""!==t)).join("-");var o;return this.eventIdMap[e(454)](t,r),r}getActionEventCacheKey(t){const e=ar;var n;return((null==t?void 0:t[e(481)])||"")+"-"+(this[e(547)][e(484)]()||"")+"-"+(this[e(547)][e(445)]()||"")+"-"+((null==t?void 0:t[e(447)])||this[e(547)].getUserId()||"")+"-"+((null==t?void 0:t.timestamp)||"")+"-"+((null==t?void 0:t.index)||"")+"-"+((null===(n=null==t?void 0:t[e(464)])||void 0===n?void 0:n[e(457)])||(null==t?void 0:t[e(550)])||"")}[ar(560)](t){const e=ar;if(!mr[e(517)](null==t?void 0:t[e(481)]))return null;const n=this[e(504)](t),r=this[e(541)][e(509)](n);return r?Date[e(490)]()-r[e(436)]>this[e(419)]?(this.actionTokenCache.delete(n),null):r.token:null}[ar(499)](t,e){const n=ar;if(!mr[n(517)](null==t?void 0:t[n(481)])||!e)return;if(this[n(541)].size>=this[n(442)]){const t=this[n(541)][n(590)]()[n(562)]()[n(548)];this.actionTokenCache[n(511)](t)}const r=this[n(504)](t);this.actionTokenCache.set(r,{token:e,timestamp:Date.now()})}[ar(429)](){const t=ar;this[t(544)]()[t(596)]((()=>{})),this[t(535)]=!0,this.flushTimeoutHandle&&(clearTimeout(this[t(576)]),this.flushTimeoutHandle=null)}async[ar(582)](t){const e=ar;if(this[e(535)]&&Cr[e(467)][e(517)](null==t?void 0:t[e(481)]))return{};if(this[e(573)]&&mr[e(517)](null==t?void 0:t.type)){const n=this[e(560)](t);if(n)return Se[e(472)]("Returning cached action token",{actionType:t[e(481)],correlationId:t[e(550)]}),{actionToken:n}}t[e(559)]=this[e(455)](),t.location=location[e(561)](),t[e(420)]=navigator[e(420)],t.sdkVersion="2.6.3",t.serverPath=this[e(502)],t[e(441)]=this.identityManager[e(558)](),t.timestamp=Date.now();const n=br();n&&(t.attributes=o(o({},t[e(464)]),{},{platform_sdk_version:n})),await this.enrichUADataIfDoesNotExist(t);let r=0;if(this[e(488)][e(517)](t[e(481)])?r=this[e(469)](t):this[e(552)][e(572)](t),"lightweight"===this[e(527)])return{};const i=this.configManager.getConfValue(pr,2);if(this[e(552)][e(588)]+r>=i||gr[e(517)](t[e(481)])){this[e(576)]&&(clearTimeout(this[e(576)]),this.flushTimeoutHandle=null);try{return await this.flush()}catch(n){throw Se[e(566)](e(526),{clientId:this[e(547)].getClientId(),eventType:t[e(481)],error:n[e(507)]?n[e(501)]():n}),n}}if(!this[e(576)]&&this.eventsQueue[e(588)]>0){const n=this.configManager[e(575)]("bufferInterval",2),r=Math[e(583)](n,30);this.flushTimeoutHandle=setTimeout((()=>{const n=e;this[n(576)]=null,this[n(544)]().catch((e=>{const r=n;Se.error("Error while emitting event (delayed flush)",{clientId:this[r(547)][r(484)](),eventType:t[r(481)],error:e[r(507)]?e[r(501)]():e})}))}),1e3*r)}return{}}async[ar(519)](){const t=ar;try{return this[t(552)].length>0||await this[t(553)](!0),await this[t(544)]()}catch(e){Se[t(566)](t(542),{e:e})}}async[ar(557)](){const t=ar;try{this[t(547)][t(581)]()&&await this[t(519)]()}catch(e){Se[t(566)](t(505),{e:e})}finally{setTimeout((async()=>{await this.pollingSessionToken()}),this[t(473)])}}async[ar(433)](t){const e=ar;var n;if(!(null===(n=t.attributes)||void 0===n?void 0:n[e(425)]))try{t[e(464)][e(425)]=await De()}catch(t){}}[ar(489)](){const t=ar;if(this[t(573)]){const e=[],n=new Set;for(;this.eventsQueue[t(588)];){const r=this[t(552)][t(492)]();if(!r)break;const o=this[t(426)](r);this.processingEvents[t(430)](o)||!n.has(o)&&(n[t(466)](o),e[t(572)](r))}const r=this[t(537)]();return(null==r?void 0:r[t(588)])&&r.forEach((r=>{const o=t,i=this[o(426)](r);this[o(584)][o(430)](i)||!n[o(430)](i)&&(n[o(466)](i),e[o(572)](r))})),e[t(565)](((e,n)=>e.timestamp-n[t(436)]))}{const e=[],n=this[t(537)]();for(;this[t(552)].length;){const n=this[t(552)].pop();if(!n)break;e[t(572)](n)}return(null==n?void 0:n[t(588)])&&e.push(...n),e[t(565)](((e,n)=>e[t(436)]-n[t(436)]))}}async flush(){const t=ar;let e=[];if(this[t(573)]){for(;this[t(450)];)await new Promise((t=>setTimeout(t,10)));this[t(450)]=!0;try{if(e=this[t(489)](),0===e.length)return{};e[t(551)]((e=>{const n=this[t(426)](e);this.processingEvents.set(n,e)}))}finally{this[t(450)]=!1}}else if(e=this.popAllEvents(),0===e[t(588)])return{};const n={};n[t(471)]=this[t(547)][t(484)](),n.deviceId=this[t(547)].getDeviceId(),n[t(447)]=this.identityManager[t(540)](),n[t(546)]=this[t(485)]?qe:Xe,n[t(525)]=e;try{const{keyIdentifier:e,publicKeyId:r}=await this[t(585)][t(532)]();n[t(448)]=e,n.publicKeyId=r}catch(e){Se[t(574)](t(564)+e)}this[t(533)]&&(n[t(483)]=!0);try{const r=await this[t(521)](n,!0),i=await this[t(585)][t(536)]();let a;i&&(a=[{type:yr,data:i[t(476)],signature:i.signature}]);const s=await this[t(422)][t(524)](t(543),o(o({},r),a?{headers:a}:{}));if(s[t(479)]){const e=s[t(479)][t(496)]((e=>e[t(481)]===_r));e&&e[t(548)]&&this[t(585)][t(506)](e[t(548)])}return s[t(518)]&&this.identityManager[t(459)](s[t(518)]),s[t(483)]&&this[t(547)][t(530)](s.sessionToken),s.userId&&this[t(547)].setUserId(s[t(447)]),this[t(573)]?(e[t(551)]((e=>{const n=t;mr[n(517)](e[n(481)])&&s[n(580)]&&this[n(499)](e,s[n(580)])})),this[t(424)](e),e[t(551)]((e=>{const n=t,r=this.generateEventIdentifier(e);this[n(584)][n(511)](r)}))):this[t(460)](),s}catch(n){throw this[t(573)]&&e.forEach((e=>{const n=t,r=this[n(426)](e);this[n(584)].delete(r)})),n}}async[ar(521)](t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=ar,r=this[n(579)][n(575)](fr,null);if(null===r&&e)return await this[n(579)][n(567)](this[n(547)].getClientId()),await this[n(521)](t);if(null===r)throw new nr(new Error(n(462)),$n[n(563)]);try{const e=JSON[n(531)](t),o=this[n(593)](e),i=o||e,{encryptedData:a,encryptedKey:s}=await this[n(475)][n(503)](r,i);return{data:a,key:s,dataType:o?Vn[n(494)]:Vn[n(468)]}}catch(t){throw new nr(t,$n.CLIENT)}}[ar(593)](t){const e=ar;try{return fe(t)}catch(t){Se[e(566)]("Failed to compress data, sending the data to the service uncompressed",{clientId:this[e(547)][e(484)](),error:t})}}[ar(423)](t){this.interactionObserver=t}[ar(455)](){const t=ar;if(null===this[t(427)]){const e=this[t(418)].getItemLocalStorageSafe("rei"),n=Number.parseInt(e);this[t(427)]=Number[t(444)](n)?-1:n}return this[t(427)]++,this[t(418)][t(435)]("rei",this[t(427)][t(561)]()),this[t(427)]}shouldSendDeviceEvent(){const t=ar,e=this.storageManager[t(453)](cr),n=this[t(418)][t(453)](lr);return!e||!n||Date[t(490)]()-e>864e5||n!=this[t(547)].getDeviceId()}async[ar(553)](t){const e=ar;if(!t&&!this[e(486)]())return Se[e(472)](e(428)),!1;const n=await this[e(446)][e(591)](),r={type:je.EVENT_TYPE_DEVICE,attributes:n},o=await this.emitEvent(r);return o&&!this[e(535)]&&(this[e(418)][e(435)](cr,Date[e(490)]()),this[e(418)][e(435)](lr,this[e(547)].getDeviceId())),o}async[ar(470)](){const t=ar,e="page_load";if(this[t(579)][t(575)](hr,[])[t(517)](e))return!1;const n=this[t(512)](),r=this[t(461)][t(440)]();return await this[t(582)]({type:je[t(528)],attributes:o(o(o({interaction_type:e,location:window[t(571)][t(592)],referrer:document.referrer},window[t(456)]&&{window_historyLength:window[t(456)][t(588)]}),n&&{windowResources:n}),r&&{aiAgentSignals:r})}),!0}[ar(512)](){const t=ar;try{const e=window[t(510)][t(443)](t(539));return e&&Array[t(522)](e)?e[t(534)]((e=>{const n=t;return{name:e.name,initiatorType:e[n(452)]}})):void 0}catch(t){}}registerEventListeners(){const t=ar;this[t(498)][t(495)](),this[t(547)][t(495)]()}async getPayload(){const t=ar;if(this[t(527)]!==t(520))throw new Error(t(438));let e;Se.info(t(578));try{e=await this.deviceDataManager[t(591)]()}catch(e){throw Se[t(566)](t(458),{error:e}),new Error(t(458))}const n=br(),r=[{type:je[t(529)],attributes:o(o({},e),n&&{platform_sdk_version:n}),timestamp:Date.now(),index:this[t(455)](),location:location[t(561)](),platform:navigator.platform,sdkVersion:"2.6.3",serverPath:this[t(502)],tabId:this.identityManager[t(558)]()}],i=this[t(547)][t(445)]();return{clientId:this[t(547)][t(484)](),deviceId:i||void 0,userId:this[t(547)][t(540)]()||null,sdkPlatform:this.isMobile?t(523):t(538),events:r}}[ar(570)](){const t=ar;this.tier===t(520)?(this[t(552)]=[],this[t(418)][t(463)](dr),Se[t(472)](t(431))):Se[t(574)](t(508))}[ar(537)](){const t=ar,e=this[t(418)][t(453)](dr);if(!e)return[];try{return JSON[t(434)](e)}catch(e){return Se[t(566)](t(568),{error:e}),[]}}[ar(469)](t){const e=ar,n=this.fetchEventsFromLocalStorage();return rn.maintainLastXItems(n,this[e(493)],t),this[e(418)][e(435)](dr,JSON[e(531)](n)),n[e(588)]}cleanLocalStorageEvents(){const t=ar;this[t(418)][t(463)](dr)}cleanupSentEvents(t){const e=ar;if(0===t[e(588)])return;const n=this.fetchEventsFromLocalStorage();if(!n||0===n[e(588)])return;const r=new Set;for(const n of t)r.add(this[e(426)](n));const o=n.filter((t=>!r.has(this[e(426)](t))));o[e(588)]!==n[e(588)]&&(o[e(588)]>0?this.storageManager[e(435)](dr,JSON[e(531)](o)):this.storageManager.removeItemLocalStorageSafe(dr))}}Cr[ar(467)]=[je[ar(528)],je[ar(529)]];const Ar=Sr;function Ir(){const t=["setCryptoBinding","getDeviceId","setItemLocalStorageSafe","floor","stringify","rci","loadTabId","expirationSeconds","sstReplayMaxUses","sign","7291510xYXVTL","setUserId","addEventListener","setDeviceId","storageManager","getItemLocalStorageSafe","CryptoBinding not available for secure session token generation","tabId","removeItemLocalStorageSafe","43446656zazOav","now","split","getSecureSessionToken","removeItemSessionStorageSafe","getUserId","JWT","deviceId","base64UrlEncode","cryptoBinding","setSessionToken","42yMGwdp","getTabId","1510598JFmFYl","setItemSessionStorageSafe","190824YPFmeM","load","base64ToBase64Url","getClientId","beforeunload","removeUserId","MAX_SAFE_INTEGER","loadDeviceId","getItemSessionStorageSafe","isTokenExpired","warn","actionType","getConfValue","clientId","parse","toString","1342668IdCtSH","setClientId","No backend session token available","error","info","rst","exp","userId","random","RS256","6727496fcqjDl","rdi","12162500GbedlL","iat"];return(Ir=function(){return t})()}function Sr(t,e){return t-=291,Ir()[t]}!function(){const t=Sr,e=Ir();for(;;)try{if(958012==-parseInt(t(354))/1+parseInt(t(292))/2*(-parseInt(t(352))/3)+-parseInt(t(318))/4+-parseInt(t(332))/5+-parseInt(t(308))/6+parseInt(t(320))/7+parseInt(t(341))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Tr="rui",Dr=Ar(327),Or=Ar(319),Rr="rdit",Mr="rti",kr=Ar(313);class Nr{constructor(t,e,n){const r=Ar;this.storageManager=t,this.configManager=e,this[r(305)]=n,this.cryptoBinding=null,this.setClientId(this[r(305)])}[Ar(322)](t){this[Ar(350)]=t}[Ar(293)](){const t=Ar;this[t(299)](),this[t(328)]()}registerEventListeners(){const t=Ar;window[t(334)](t(296),(async()=>this.saveTabIdOnUnload()))}[Ar(323)](){return this[Ar(348)]}[Ar(335)](t){const e=Ar;this[e(348)]!==t&&(Se[e(312)]("Updating DeviceId",{deviceId:t}),this[e(348)]=t,this.storageManager[e(291)](Or,t),this[e(336)].setItemLocalStorageSafe(Or,t))}[Ar(299)](){const t=Ar,e=this.storageManager[t(300)](Or)||this[t(336)][t(337)](Or);return null!=e&&this.setDeviceId(e),e}getClientId(){return this[Ar(305)]}[Ar(309)](t){const e=Ar;this[e(336)][e(295)]()!=t&&this[e(336)][e(309)](t),this[e(336)].setItemSessionStorageSafe(Dr,t)}getUserId(){const t=Ar;if(Number(this[t(336)][t(337)](Rr))+this.configManager.getConfValue("userIdStorageExpiry",864e5)<Date[t(342)]())return this[t(297)](),null;const e=this.storageManager[t(300)](Tr);return null!=e?e:this.storageManager[t(337)](Tr)}[Ar(333)](t){const e=Ar;this[e(315)]=t,this[e(336)].setItemSessionStorageSafe(Tr,t),this.storageManager.setItemLocalStorageSafe(Tr,t),this[e(336)][e(324)](Rr,Date.now())}[Ar(297)](){const t=Ar;this[t(336)][t(345)](Tr),this.storageManager[t(340)](Tr),this[t(336)][t(340)](Rr)}[Ar(328)](){const t=Ar,e=this[t(336)][t(300)](Mr);e?(this[t(336)][t(345)](Mr),this.tabId=e):this.tabId=Math[t(325)](Math[t(316)]()*Number[t(298)])[t(307)]()}[Ar(353)](){return this[Ar(339)]}saveTabIdOnUnload(){const t=Ar;this.storageManager.setItemSessionStorageSafe(Mr,this[t(339)])}[Ar(351)](t){this[Ar(336)].setItemLocalStorageSafe(kr,t)}getSessionToken(){const t=Ar;return this[t(336)][t(337)](kr)||this[t(336)][t(300)](kr)}async[Ar(344)](t){const e=Ar;var n,r;const i=null!==(n=null==t?void 0:t[e(303)])&&void 0!==n?n:null,a=null!==(r=null==t?void 0:t[e(329)])&&void 0!==r?r:300,s=this.configManager[e(304)](e(330),0)||null;if(!this[e(350)])return Se.warn(e(338)),null;const u=this.getSessionToken();if(!u)return Se[e(302)](e(310)),null;try{const{publicKey:t}=await this[e(350)].getPublicData(),n=Math[e(325)](Date.now()/1e3),r=n+a,c=o(o({backendSessionToken:u,securedToken:!0,version:"1.0",jti:rn.randomUUID(),clientParams:{clientId:this.getClientId(),deviceId:this[e(323)](),userId:this[e(346)]()},iat:n,exp:r,publicKey:t},i&&{actionType:i}),s&&{maxUses:s}),l={alg:e(317),typ:e(347)},d=rn[e(349)](JSON[e(326)](l))+"."+rn[e(349)](JSON[e(326)](c)),h=await this[e(350)][e(331)](d);return d+"."+rn[e(294)](h)}catch(t){return Se.error("Failed to generate secure session token:",{error:t}),null}}[Ar(301)](){const t=Ar;var e;const n=this.getSessionToken();if(!n)return!0;try{const r=JSON[t(306)](atob(n[t(343)](".")[1]));let o=(null!==(e=r[t(314)])&&void 0!==e?e:r[t(321)])*(r[t(314)]&&r[t(314)]<1e12?1e3:1);return!r.exp&&(o+=9e5),Date[t(342)]()>=o}catch(e){return Se[t(311)]("Invalid JWT:",{error:e}),!0}}}const xr=Hr;!function(){const t=Hr,e=Gr();for(;;)try{if(498902==parseInt(t(497))/1+parseInt(t(501))/2*(parseInt(t(502))/3)+parseInt(t(491))/4+parseInt(t(500))/5*(-parseInt(t(511))/6)+-parseInt(t(492))/7+-parseInt(t(506))/8*(-parseInt(t(510))/9)+-parseInt(t(493))/10*(parseInt(t(509))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Pr="__tsDrsInstances",Br=xr(499),Fr="ts-drs:initialized";function Lr(t){const e=xr;try{return t[e(505)],!0}catch(t){return!1}}function zr(){const t=xr;let e=window;try{for(;e[t(495)]!==e&&Lr(e[t(495)]);)e=e[t(495)]}catch(t){}return e}function Ur(){const t=xr,e=zr(),n=e[Pr];if(Array[t(504)](n))return n;const r=[];return e[Pr]=r,r}function Vr(t){const e=xr,n={mode:t,v:1};Ur()[e(503)](n);const r=window[Br];Array[e(504)](r)?r[e(503)](n):window[Br]=[n],zr()[e(498)](new CustomEvent(Fr,{detail:{mode:t,v:1}}))}function Hr(t,e){return t-=490,Gr()[t]}function Gr(){const t=["standard","11gejsCB","936lqCBvD","6nOgsCj","some","1649952lgNiJG","5498360ABYkhv","1424580QbQIkN","mode","parent","detail","412577fjBsqB","dispatchEvent","__tsDrsLocalInstances","4208605HgIjwL","8hDPjes","621408SFmran","push","isArray","document","47304KcXuGD","addEventListener"];return(Gr=function(){return t})()}const jr=qr;function Wr(){const t=["href","location","1317pSkMmh","origin","1586lMwskN","searchParams","function","get","754852cgrrgb","3567843FPQYMk","addon_a","push","getEntriesByType","PerformanceObserver","tss","name","endsWith","5rlhdrn","getEntries","/device/events","forEach","/device/logs","performance","8018280HZddqI","2438228xCmPYW","pathname","observe","prototype","frames","3416hBHfZx","10776rUKCzv","8574500YlxHOQ","8qOUSxD","some","resource"];return(Wr=function(){return t})()}!function(){const t=qr,e=Wr();for(;;)try{if(513933==parseInt(t(344))/1+parseInt(t(340))/2*(-parseInt(t(338))/3)+parseInt(t(360))/4*(parseInt(t(353))/5)+-parseInt(t(366))/6*(parseInt(t(365))/7)+-parseInt(t(333))/8*(-parseInt(t(345))/9)+-parseInt(t(359))/10+parseInt(t(332))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Xr=jr(350),Yr=jr(346);function qr(t,e){return t-=332,Wr()[t]}const Zr=[jr(355),jr(357),"/device/conf"];function Kr(t,e){const n=jr;try{const r=new URL(t,window[n(337)][n(336)]);return r[n(339)]===e&&!!function(t){const e=jr;return Zr[e(334)]((n=>t===n||t[e(352)](n)))}(r[n(361)])&&r[n(341)][n(343)](Xr)!==Yr}catch(t){return!1}}const $r=Jr;function Qr(){const t=["application/json","stringify","statusText","2uXnVKD","639EmNMCT","1779852cqaAqx","139762RDEjff","isAgenticSelfTagged","169elRFvY","callServer","COMMUNICATION","getData","150943VuLrqE","message","includes","30ppEVve","include","json","1059330nrdyLl","GET","POST","tagPath","fetch","SERVER","postDataFromURL","serverPath","3901185KOrRxE","86092GuEWWL","postData","CLIENT","status","89264PZUOeJ","143mSImsc","230wYXOBb"];return(Qr=function(){return t})()}function Jr(t,e){return t-=306,Qr()[t]}!function(){const t=Jr,e=Qr();for(;;)try{if(802284==parseInt(t(306))/1*(parseInt(t(331))/2)+parseInt(t(320))/3+-parseInt(t(321))/4*(parseInt(t(327))/5)+-parseInt(t(309))/6*(-parseInt(t(334))/7)+-parseInt(t(325))/8*(-parseInt(t(332))/9)+-parseInt(t(312))/10*(-parseInt(t(326))/11)+parseInt(t(333))/12*(-parseInt(t(336))/13))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class to{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Jr;this[n(319)]=t,this[n(335)]=e}[$r(315)](t){const e=$r;if(!this[e(335)])return t;const n=t[e(308)]("?")?"&":"?";return""+t+n+Xr+"="+Yr}async[$r(322)](t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=$r;return this[r(318)](this[r(319)]+this.tagPath(t),e,n)}async postDataFromURL(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=$r,i={method:r(314),credentials:"include",headers:new Headers(o({"Content-Type":r(328)},n)),body:JSON[r(329)](e)};return await this.callServer(t,i)}async[$r(339)](t){const e=$r,n=this[e(319)]+this[e(315)](t),r={method:e(313),credentials:e(310)};return await this[e(337)](n,r)}async[$r(337)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=$r;if(!(n(316)in window))throw new nr(new Error("fetch-api is not supported"),$n[n(323)]);try{const r=await fetch(t,e),o=await r[n(311)]();if(r.ok)return o;throw new nr(new Error(o[n(307)]||r[n(330)]),$n[n(317)],r[n(324)])}catch(t){if(!(t instanceof nr))throw new nr(new Error(t[n(307)]),$n[n(338)]);throw t}}}const eo=no;function no(t,e){return t-=398,ro()[t]}function ro(){const t=["string","keys","590823fvVAhc","10NNlcYJ","options","24013CUObZK","lightweight","serverPath","length","tier","filter","info","validateSDKParams","47892BWNdAP","REQUIRED_SDK_PARAMS","537822GHnueD","logIfInvalid","1304499RCPLEY","1569488XKkQJV","throwOrReturnResult","490272iamrUi"];return(ro=function(){return t})()}!function(){const t=no,e=ro();for(;;)try{if(159189==parseInt(t(407))/1+-parseInt(t(417))/2+parseInt(t(404))/3+-parseInt(t(415))/4+-parseInt(t(405))/5*(parseInt(t(401))/6)+parseInt(t(398))/7+parseInt(t(399))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class oo{constructor(){const t=no;this[t(416)]={clientId:t(402)}}[eo(400)](t,e,n){const r=eo;if(!t&&((null==e?void 0:e[r(418)])&&Se[r(413)](n),null==e?void 0:e.throwError))throw new Error(n);return t}[eo(414)](t,e){const n=eo;var r,o,i,a;const s=Object[n(403)](this[n(416)])[n(412)]((e=>typeof t[e]!=this[n(416)][e]));if((null!==(r=t.tier)&&void 0!==r?r:null===(o=t[n(406)])||void 0===o?void 0:o[n(411)])!==n(408)){const e=null!==(a=null===(i=t[n(406)])||void 0===i?void 0:i[n(409)])&&void 0!==a?a:t[n(409)];(typeof e!==n(402)||!e)&&s.push("serverPath")}return this[n(400)](0==s[n(410)],e,"Invalid SDK params was provided: "+JSON.stringify(s))}}const io=ao;function ao(t,e){return t-=346,uo()[t]}!function(){const t=ao,e=uo();for(;;)try{if(445519==-parseInt(t(356))/1+-parseInt(t(370))/2*(parseInt(t(366))/3)+parseInt(t(363))/4*(parseInt(t(368))/5)+parseInt(t(357))/6*(-parseInt(t(355))/7)+-parseInt(t(364))/8*(-parseInt(t(347))/9)+-parseInt(t(374))/10*(-parseInt(t(369))/11)+parseInt(t(351))/12*(-parseInt(t(373))/13))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class so{constructor(t,e,n){const r=ao;this[r(371)]=t,this.identityManager=e,this[r(346)]=n,this[r(367)]=0,this[r(352)]=async()=>{try{await this.reportLogs()}catch(t){}},Se.middlewares[r(360)](this.logMiddleware)}async[io(365)](){const t=io;if(!this.configManager[t(349)](t(362),!1))return;const e=this[t(346)].getConfValue(t(358),6),n=this[t(346)][t(349)](t(350),12e4);if(Se.logs[t(375)]<e||this[t(367)]+n>Date[t(361)]())return;this[t(367)]=Date[t(361)]();const r=Se[t(353)](),o=this[t(372)][t(359)](),i=Math[t(348)](Date.now()/1e3),a={sdkVersion:"2.6.3",platform:navigator.platform,clientId:o,timestamp:i,logEntries:r};await this[t(371)][t(354)](t(376),a)}}function uo(){const t=["getClientId","push","now","enableLogsReporting","152eSxcTA","8LBepLe","reportLogs","744oEwpfD","lastTimeLogsSent","22855krikMn","4431317BOCtgG","904CGrRJL","requestsManager","identityManager","22204dNyaBd","10pKPuhi","length","device/logs","configManager","4533597SXHhoB","floor","getConfValue","logsMinimumDelay","600UWDeqG","logMiddleware","flush","postData","7mZcrxG","375567jHGrIK","370176IWQGAN","logsMinimumBatch"];return(uo=function(){return t})()}const co=ho;function lo(){const t=["refAttributeMutation","getAttribute","navigator","1181992WEMqCp","change","ELEMENT_NODE","div","encode","resolve","data-openclaw-browser-ref","left","addEventListener","0px","voiceschanged","setTimeout","viewportBarShift","bottom","test","265432rVTrsh","maskHostToggle","opacity","innerHeight","pressure","style","Chromium","some","setAttribute","position","pointerover","syntheticSelectChange","hidden","right","fixed","querySelectorAll","injectedInputFlag","time","manus-action-mask-host","nodeType","inner","removeEventListener","outerHeight","disconnect","4832716vXDHge","data-openclaw-labels","pointerdown","observe","visibility","2389230JJFlBq","now","glowBorderToggle","speechSynthesis","true","hasAttribute","__codexPlaywrightInjected","immediate","data-codex-agent-overlay-root","documentElement","getElementById","name","clearTimeout","abs","119WouniF","addedNodes","none","mcpOverlay","pointerEvents","continuous","attributes","getBoundingClientRect","timeStamp","unique_id","437418ONcjGB","find","createElement","userAgentData","screenY","labelsOverlay","remove","voiceSignatureMatch","top","from","forEach","delete","codex-agent-overlay-root","appendChild","data-openclaw-mcp-overlay","viewportProbe","oldValue","resize","every","getVoices","type","input","oneTime","display","length","absolute","3701705gKWwUb","attributeName","composed","target","removedNodes","DIV","tagName","aria-hidden","set","isTrusted","size","735546qmsFnI","overlayRootInjected","chromeLikeUa","brands"];return(lo=function(){return t})()}function ho(t,e){return t-=401,lo()[t]}!function(){const t=ho,e=lo();for(;;)try{if(622032==parseInt(t(447))/1+-parseInt(t(469))/2+-parseInt(t(410))/3+-parseInt(t(493))/4+-parseInt(t(436))/5+-parseInt(t(498))/6+parseInt(t(512))/7*(parseInt(t(454))/8))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const fo=[71,111,111,103,108,101,32,230,153,174,233,128,154,232,175,157,239,188,136,228,184,173,229,155,189,229,164,167,233,153,134,239,188,137],po="claude-agent-glow-border",go=t=>t[co(488)]===Node[co(456)]&&t.tagName===co(441)&&t.id===po,mo=(t,e)=>t[co(488)]===Node[co(456)]&&t[co(442)]===co(441)&&t[co(503)](e),wo=t=>e=>{const n=co;let r=null;const o=new MutationObserver((n=>{const o=ho;n[o(420)]((n=>{const i=o;n[i(439)]===document[i(507)]&&(n[i(401)][i(420)]((e=>{const n=i;mo(e,t)&&(r=performance[n(499)]())})),n.removedNodes.forEach((n=>{const o=i;mo(n,t)&&null!==r&&performance[o(499)]()-r<300&&e()})))}))}));return o.observe(document.documentElement,{childList:!0}),()=>o[n(492)]()},vo=wo(co(424)),yo=wo(co(494)),_o=co(460),Eo=co(487),bo=t=>t[co(488)]===Node[co(456)]&&t[co(442)]===co(441)&&t.id===Eo,Co=co(422),Ao=co(506),Io=co(409),So=/^[A-Za-z0-9]{4}$/,To=t=>{var e;return So[co(468)](null!==(e=t.getAttribute(Io))&&void 0!==e?e:"")},Do=t=>{const e=co;if(t[e(488)]!==Node[e(456)])return!1;const n=t;return To(n)||Array.from(n[e(484)]("["+Io+"]"))[e(476)](To)},Oo=[{name:co(449),kind:co(505),run:()=>{const t=ho;var e,n;const r=null!==(n=null===(e=window[t(453)][t(413)])||void 0===e?void 0:e[t(450)])&&void 0!==n?n:[],o=r[t(411)]((e=>e.brand===t(475))),i=r.find((t=>"Google Chrome"===t.brand));return Boolean(o)&&Boolean(i)&&o.version===i.version}},{name:co(417),kind:co(505),run:async()=>{const t=ho;var e,n;const r=await(()=>{const t=ho;if(!("speechSynthesis"in window))return Promise[t(459)]([]);const e=window[t(501)][t(429)]();return e[t(434)]?Promise.resolve(e):new Promise((e=>{const n=t,r=window[n(465)]((()=>{const t=n;window[t(501)].removeEventListener(t(464),o),e([])}),1500),o=()=>{const t=n,i=window.speechSynthesis[t(429)]();i[t(434)]&&(window[t(510)](r),window[t(501)][t(490)](t(464),o),e(i))};window[n(501)][n(462)]("voiceschanged",o),o()}))})(),o=null!==(n=null===(e=r[r[t(434)]-3])||void 0===e?void 0:e[t(509)])&&void 0!==n?n:"",i=Array[t(419)]((new TextEncoder)[t(458)](o));return i[t(434)]===fo[t(434)]&&i[t(428)](((t,e)=>t===fo[e]))}},{name:co(425),kind:"oneTime",install:t=>{const e=ho,n=new Map,r=new MutationObserver((e=>{const r=ho,o=performance[r(499)]();let i=0;e[r(420)]((t=>{const e=r;t.addedNodes[e(420)]((t=>{const r=e;(t=>{const e=ho;if(t[e(488)]!==Node[e(456)])return!1;const n=t;if("DIV"!==n[e(442)]&&"SPAN"!==n.tagName)return!1;const r=n[e(474)];if(!r||r[e(434)]<4)return!1;if(r[e(478)]!==e(483)&&r[e(478)]!==e(435))return!1;if(r[e(418)]!==e(463)||r[e(482)]!==e(463)||r[e(467)]!==e(463)||r[e(461)]!==e(463))return!1;if(r[e(404)]!==e(402))return!1;const o=parseFloat(r[e(471)]),i=!isNaN(o)&&o<.1,a="hidden"===r[e(497)];return i||a})(t)&&n[r(444)](t,o)})),t[e(440)][e(420)]((t=>{const r=e,a=n.get(t);void 0!==a&&(o-a<10&&i++,n[r(421)](t))}))})),n[r(446)]>50&&n[r(420)](((t,e)=>{o-t>1e3&&n.delete(e)})),i>0&&t()}));return r.observe(document[e(507)],{childList:!0,subtree:!1}),()=>r[e(492)]()}},{name:co(500),kind:co(405),install:t=>{const e=co;document.getElementById(po)&&t(!0);const n=new MutationObserver((e=>{const n=ho;e[n(420)]((e=>{const r=n;e[r(439)]===document.body&&(e[r(401)].forEach((e=>{go(e)&&t(!0)})),e.removedNodes[r(420)]((e=>{go(e)&&t(!1)})))}))}));return n.observe(document.body,{childList:!0}),()=>n[e(492)]()}},{name:co(466),kind:co(405),install:t=>{const e=co;let n=null,r={time:performance[e(499)](),inner:window[e(472)],outer:window[e(491)]},o=null;const i=()=>{const i=e,a={time:performance.now(),inner:window.innerHeight,outer:window[i(491)]};null!==o&&window[i(510)](o),a.time-r[i(486)]<50||(n=r),r=a,o=window.setTimeout((()=>{const e=i;if(!n||r.outer!==n.outer)return;const o=r[e(489)]<n.inner-10,a=r[e(489)]>n[e(489)]+10;o?t(!0):a&&t(!1)}),50)};return window[e(462)](e(427),i),()=>{const t=e;window[t(490)](t(427),i),null!==o&&window[t(510)](o)}}},{name:co(403),kind:co(432),install:vo},{name:co(415),kind:"oneTime",install:yo},{name:co(451),kind:co(432),install:t=>{const e=co,n=document[e(412)](e(457));n[e(477)](_o,"1"),n.setAttribute(e(443),e(502)),n[e(481)]=!0,n[e(474)][e(433)]=e(402),n[e(474)][e(404)]=e(402),document.body[e(423)](n);const r=new MutationObserver((n=>{const r=e;n[r(476)]((t=>"attributes"===t[r(430)]&&t[r(437)]===_o&&null!==t[r(426)]))&&t()}));return r[e(496)](n,{attributeFilter:[_o],attributeOldValue:!0,attributes:!0}),()=>{const t=e;r[t(492)](),n[t(416)]()}}},{name:"syntheticCenteredClick",kind:co(432),install:t=>{const e=co;let n=null;const r=t=>{n={x:t.x,y:t.y}},o=e=>{const r=ho;if(!n||0!==e[r(473)])return;const o=e[r(439)][r(407)](),i=o.x+o.width/2,a=o.y+o.height/2,s=Math[r(511)](e.x-i)<1&&Math[r(511)](e.y-a)<1,u=n.x===e.x&&n.y===e.y,c=e.clientY===e[r(414)];s&&u&&c&&t()};return window[e(462)](e(479),r),window[e(462)](e(495),o),()=>{const t=e;window[t(490)](t(479),r),window[t(490)]("pointerdown",o)}}},{name:co(480),kind:co(432),install:t=>{const e=co;let n=null,r=null;const o=t=>{const e=ho;t[e(439)]instanceof HTMLSelectElement&&!1===t[e(445)]&&!1===t[e(438)]?(n=t[e(439)],r=t.timeStamp):(n=null,r=null)},i=e=>{const o=ho;e.target instanceof HTMLSelectElement&&e.target===n&&!1===e[o(445)]&&null!==r&&e[o(408)]-r<10&&t(),n=null,r=null};return window[e(462)](e(431),o,!0),window[e(462)]("change",i,!0),()=>{const t=e;window[t(490)]("input",o,!0),window[t(490)](t(455),i,!0)}}},{name:co(470),kind:co(405),install:t=>{const e=co;document[e(508)](Eo)&&t(!0);const n=new MutationObserver((n=>{const r=e;n[r(420)]((e=>{const n=r;e[n(439)]===document[n(507)]&&(e[n(401)][n(420)]((e=>{bo(e)&&t(!0)})),e[n(440)][n(420)]((e=>{bo(e)&&t(!1)})))}))}));return n.observe(document[e(507)],{childList:!0}),()=>n.disconnect()}},{name:co(448),kind:co(432),install:t=>{const e=co;if((()=>{const t=co,e=document[t(508)](Co);return null!==e&&"true"===e[t(452)](Ao)})())return t(),()=>{};const n=new MutationObserver((e=>{const n=ho;e[n(420)]((e=>{const r=n;e.target===document[r(507)]&&e[r(401)].forEach((e=>{var n;(n=e)[co(488)]===Node[co(456)]&&n[co(442)]===co(441)&&n.id===Co&&n[co(452)](Ao)===co(502)&&t()}))}))}));return n.observe(document[e(507)],{childList:!0}),()=>n[e(492)]()}},{name:co(485),kind:co(432),install:t=>{const e=co,n=()=>{const e=ho;void 0!==window[e(504)]&&(window[e(490)](e(431),n,!0),t())};return window[e(462)]("input",n,!0),()=>window[e(490)](e(431),n,!0)}},{name:"shortIdAttributeScrape",kind:co(432),install:t=>{let e=!1;const n=new MutationObserver((r=>{const o=ho;for(const n of r){if(e)break;if(n[o(430)]===o(406)&&n[o(437)]===Io&&null===n.oldValue&&To(n.target)){e=!0,t();break}if("childList"===n[o(430)])for(const r of Array.from(n.addedNodes))if(Do(r)){e=!0,t();break}}e&&n.disconnect()}));return n.observe(document.documentElement,{attributeFilter:[Io],attributeOldValue:!0,attributes:!0,childList:!0,subtree:!0}),()=>n.disconnect()}}],Ro=Mo;function Mo(t,e){return t-=156,ko()[t]}function ko(){const t=["oneTime","Failed to install one-time signal","runImmediateSignal","disconnectors","initSignals","12735810EOXlid","29046fhtjsq","immediate","kind","enabled","Failed to run immediate signal","320HoyOoG","9RYeqUU","2405704XnSmDD","installContinuousSignal","configManager","isEnabled","state","getConfValue","run","4611810JocuPn","1WnFlVv","362690SsdqyV","name","error","installOneTimeSignal","Failed to install continuous signal","2094732LCxWHj","call","install","420040XgIyhI"];return(ko=function(){return t})()}!function(){const t=Mo,e=ko();for(;;)try{if(416103==parseInt(t(182))/1*(-parseInt(t(183))/2)+parseInt(t(157))/3+-parseInt(t(160))/4+-parseInt(t(172))/5*(parseInt(t(167))/6)+-parseInt(t(181))/7+-parseInt(t(174))/8+parseInt(t(173))/9*(parseInt(t(166))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class No{constructor(t){const e=Mo;this[e(176)]=t,this.state={},this[e(164)]={},this.enabled=this[e(177)](),this[e(170)]&&this[e(165)]()}[Ro(177)](){const t=Ro;return this[t(176)][t(179)]("agenticIdentityEnabled",!1)}initSignals(){const t=Ro;for(const e of Oo)this.state[e[t(184)]]=!1,e[t(169)]===t(168)?this[t(163)](e):e.kind===t(161)?this[t(186)](e):this[t(175)](e)}async runImmediateSignal(t){const e=Ro;try{this.state[t[e(184)]]=Boolean(await t[e(180)]())}catch(n){Se[e(185)](e(171),{signal:t})}}installOneTimeSignal(t){const e=Ro;try{const n=t[e(159)]((()=>{const n=e;var r,o;this[n(178)][t[n(184)]]=!0,null===(o=(r=this[n(164)])[t[n(184)]])||void 0===o||o[n(158)](r),delete this[n(164)][t[n(184)]]}));this[e(164)][t.name]=n}catch(n){Se[e(185)](e(162),{signal:t})}}[Ro(175)](t){const e=Ro;try{const n=t[e(159)]((n=>{this[e(178)][t.name]=n}));this.disconnectors[t[e(184)]]=n}catch(n){Se[e(185)](e(156),{signal:t})}}getSnapshot(){const t=Ro;return this[t(170)]?o({},this[t(178)]):null}}const xo=Po;function Po(t,e){return t-=248,Bo()[t]}function Bo(){const t=["2sPqvSX","209955TIoaPs","deviceId","true","218176BzbVNC","10542220iPgJDM","getItemLocalStorageSafe","storageManager","requestsManager","2171RPnBVV","90kAiNAT","rimd","setItemLocalStorageSafe","getClientId","endsWith","migrateIdentifiers","46818ELsqkh","identityManager","1376610WbtilQ","210fCDeHQ","590048owNAum"];return(Bo=function(){return t})()}!function(){const t=Po,e=Bo();for(;;)try{if(192392==-parseInt(t(252))/1+parseInt(t(264))/2*(parseInt(t(265))/3)+-parseInt(t(263))/4+-parseInt(t(261))/5+-parseInt(t(259))/6*(parseInt(t(262))/7)+parseInt(t(268))/8*(-parseInt(t(253))/9)+parseInt(t(248))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Fo=xo(254);class Lo{constructor(t,e,n){const r=xo;this[r(260)]=t,this[r(251)]=e,this.storageManager=n}async[xo(258)](t){const e=xo;if("true"!=this[e(250)][e(249)](Fo)){const n=this[e(260)].getDeviceId(),r=this[e(260)][e(256)](),o=(t[e(257)]("/")?t:t+"/")+"device/migrate-identifiers",i=await this.requestsManager.postDataFromURL(o,{deviceId:n,clientId:r});i[e(266)]&&i.deviceId==n&&this.storageManager[e(255)](Fo,e(267))}}}const zo=Vo;function Uo(){const t=["atc","publishGraceMs","slice","resetFrequencyCounter","parse","getItemLocalStorageSafe","pathname","agenticConfig","getConfValue","configManager","includes","setItemLocalStorageSafe","neverCountInteractions","fireAction","1875632gaqNAE","resetCountedInteractions","stringify","error","isActionAllowed","toString","172VyULmN","resetCounterOnRealAction","writeFrequencyCounter","triggerFrequency","some","2972484wkedUu","startsWith","string","filter","isArray","130520uPUUeL","16PAqYhg","atci","isFinite","5rPHwkY","2924580uqrzEI","Agentic checkpoint failed","3352370xABhla","length","readCountedInteractions","storageManager","config","object","number","catch","ignoredPaths","31683ZTkikc","recordCountedInteraction","377443nYQoCU","location","readFrequencyCounter"];return(Uo=function(){return t})()}function Vo(t,e){return t-=488,Uo()[t]}!function(){const t=Vo,e=Uo();for(;;)try{if(532730==parseInt(t(497))/1+-parseInt(t(514))/2+parseInt(t(495))/3*(parseInt(t(520))/4)+parseInt(t(534))/5*(-parseInt(t(535))/6)+parseInt(t(537))/7+parseInt(t(531))/8*(parseInt(t(525))/9)+-parseInt(t(530))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ho="agentic_checkpoint",Go=zo(500),jo=zo(532),Wo=zo(507),Xo=[];class Yo{constructor(t,e,n,r){const o=zo;this[o(509)]=t,this[o(489)]=e,this[o(518)]=n,this.fireAction=r}get config(){const t=zo,e=this[t(509)][t(508)](Wo,{});return typeof e===t(491)&&null!==e?e:{}}get[zo(523)](){const t=zo,e=this[t(490)][t(523)];return Number.isInteger(e)&&e>0?e:5}get neverCountInteractions(){const t=zo,e=this[t(490)][t(512)];return Array[t(529)](e)?e:Xo}get publishGraceMs(){const t=zo,e=this.config[t(501)];return typeof e===t(492)&&Number[t(533)](e)&&e>0?Math.min(e,2e3):0}get ignoredPaths(){const t=zo,e=this[t(490)].ignoredPaths;return Array[t(529)](e)?e[t(528)]((e=>typeof e===t(527)&&e[t(526)]("/"))):[]}isPathIgnored(){const t=zo,e=window[t(498)][t(506)];return this[t(494)][t(524)]((n=>{const r=t,o=n[r(538)]>1&&n.endsWith("/")?n[r(502)](0,-1):n;return e===o||e.startsWith(o+"/")}))}[zo(499)](){const t=zo,e=this.storageManager[t(505)](Go),n=Number.parseInt(e);return Number.isNaN(n)||n<0?0:n}writeFrequencyCounter(t){const e=zo;this.storageManager[e(511)](Go,t[e(519)]())}[zo(503)](){this.writeFrequencyCounter(0)}[zo(488)](){const t=zo,e=this[t(489)][t(505)](jo);if(!e)return{};try{const n=JSON[t(504)](e);return n&&"object"==typeof n?n:{}}catch(t){return{}}}[zo(496)](t){const e=zo;var n;const r=this.readCountedInteractions();r[t]=(null!==(n=r[t])&&void 0!==n?n:0)+1,this[e(489)].setItemLocalStorageSafe(jo,JSON[e(516)](r))}[zo(515)](){const t=zo;this[t(489)].setItemLocalStorageSafe(jo,JSON[t(516)]({}))}[zo(521)](){const t=zo;this.resetFrequencyCounter(),this[t(515)]()}onInteraction(t){const e=zo;if(this.isPathIgnored())return;if(!this[e(518)](Ho))return;if(this[e(512)][e(510)](t))return;const n=this[e(499)]()+1;if(this[e(496)](t),n<this[e(523)])return void this[e(522)](n);const r=this[e(488)]();this.resetFrequencyCounter(),this[e(515)](),this[e(513)](Ho,{agenticCountedInteractions:r})[e(493)]((t=>{const n=e;Se[n(517)](n(536),{error:t})}))}}const qo=Zo;function Zo(t,e){return t-=371,ri()[t]}!function(){const t=Zo,e=ri();for(;;)try{if(150396==parseInt(t(410))/1*(-parseInt(t(403))/2)+parseInt(t(388))/3+parseInt(t(383))/4+parseInt(t(378))/5*(parseInt(t(397))/6)+parseInt(t(402))/7+parseInt(t(398))/8*(-parseInt(t(380))/9)+parseInt(t(382))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Ko=qo(374),$o=[qo(387),qo(389),qo(399),qo(401)],Qo=[qo(399),"ts-platform-websdk"],Jo=$o.filter((t=>!Qo[qo(407)](t))),ti=qo(377);function ei(){return Ko+":"+(window[qo(406)].pathname||"/")}function ni(t,e){const n=qo,r={ts:Date[n(405)](),signal:e};t[n(375)](ei(),JSON[n(394)](r))}function ri(){const t=["2026696qiwxnx","2RESqhO","tsAccountProtection","now","location","includes","TSAccountProtection","some","270663tbhCSr","tsPlatformIsOwn","src","RiskID","ag_drs_verdict","setItemLocalStorageSafe","number","data-ts-agentic-self","6515QKRTur","traffic","2205009zFMhpn","riskId","1095610OURARS","364368gMaIbT","verdict-cache","string","hasAttribute","cdn.riskid.security","469002dLHSUE","web_sdk_","scripts","storageManager","ownGlobals","getItemLocalStorageSafe","stringify","from","parse","90uVnflQ","8LZxELM","platform-websdk","tsPlatform","ts-platform-websdk"];return(ri=function(){return t})()}const oi=si;var ii,ai;function si(t,e){return t-=407,mi()[t]}!function(){const t=si,e=mi();for(;;)try{if(385058==-parseInt(t(588))/1*(parseInt(t(452))/2)+-parseInt(t(553))/3+parseInt(t(419))/4*(parseInt(t(570))/5)+parseInt(t(496))/6+parseInt(t(606))/7*(-parseInt(t(572))/8)+parseInt(t(412))/9+parseInt(t(465))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const ui=[null,void 0,"undefined","",0],ci=typeof document!==oi(453)?document[oi(536)]:null,li=oi(499),di=oi(594),hi=oi(445),fi=oi(534),pi=[oi(442),oi(426),oi(410),"ssn",oi(530),oi(510),oi(579),oi(508)];class gi{constructor(t,e){const n=oi;var r,o,i;this[n(593)]=null,this[n(450)]=null,this[n(511)]=!1,this[n(611)]=!1,this[n(578)]=null,this[n(524)]=!1,this[n(583)]=n(477),this[n(448)]=!1,this.agenticActive=!1,this[n(512)]=null,this[n(559)]=0,this[n(569)]="",this[n(435)]=new oo,this[n(533)]=!1,this[n(526)]=!1,this[n(566)]=!1,this.spaRouteHooksRegistered=!1;const a=typeof e===n(597);if(this.clientId=a?e:t,this.options=a?{serverPath:t}:e,this[n(583)]=(null===(r=this[n(513)])||void 0===r?void 0:r.tier)||n(477),this[n(448)]=(null===(o=this[n(513)])||void 0===o?void 0:o[n(448)])||!1,this[n(448)]){if(gi[n(484)])throw new Error(n(481));gi.initializedAgenticInstance=!0}else{if(gi[n(459)])throw new Error("SDK already initialized");gi.initializedInstance=!0}if(this.agenticCollect&&"lightweight"===this[n(583)])throw new Error("agenticCollect is not supported in lightweight tier");const s=typeof(null===(i=this[n(513)])||void 0===i?void 0:i[n(608)])===n(597)&&this[n(513)][n(608)][n(557)]().length>0;if("lightweight"!==this[n(583)]&&!s)throw new Error(n(590));s&&(this[n(513)][n(608)]=new URL(this[n(513)][n(608)])[n(411)]()),this[n(578)]=this[n(513)][n(578)]||null,this[n(583)]===n(537)&&Se[n(552)](n(518),{serverPath:this[n(513)][n(608)]}),Se[n(467)]=!!this[n(513)][n(445)],!this[n(435)][n(521)](this,{throwError:!0,logIfInvalid:!0})&&(this[n(450)]=n(483)),this[n(421)]=new Ee(this[n(586)]),this[n(425)]=new to(this[n(513)][n(608)],this[n(448)]),this[n(504)]=new Je(this[n(421)],this[n(425)]),this[n(409)]=new Nr(this[n(421)],this[n(504)],this.clientId),this[n(409)][n(444)](),this[n(503)]=new Lo(this[n(409)],this[n(425)],this[n(421)]),this[n(511)]=this[n(513)].enableSessionToken||!1,this[n(524)]=this[n(513)][n(524)]||!1,this[n(531)]=new so(this[n(425)],this[n(409)],this.configManager),!this.agenticCollect&&Vr("standard")}[oi(546)](t){const e=oi;var n;if(this[e(533)])return;this[e(533)]=!0;const r=this[e(559)]?Date[e(555)]()-this[e(559)]:void 0;Se[e(552)](e(571),{signal:t,msSinceInit:r}),null===(n=this[e(605)])||void 0===n||n[e(546)]()}runDetectionCascade(){const t=oi;var e,n;if(this.standDownCalled)return;const r=function(t){const e=qo;return function(){const t=xr;return Ur()[t(490)]((e=>(null==e?void 0:e.mode)===t(508)))}()?{detected:!0,signal:"registry"}:function(t){const e=function(t){const e=qo,n=t[e(393)](ei());if(!n)return null;try{const t=JSON[e(396)](n);if(t&&typeof t.ts===e(376)&&typeof t.signal===e(385))return t}catch(t){}return null}(t);return!!e&&Date.now()-e.ts<6048e5}(t[e(391)])?{detected:!0,signal:e(384)}:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=qo;try{const n=t[e(371)]?Jo:$o;if(Array[e(395)](document[e(390)]||[]).some((r=>r!==t.ownScript&&!r[e(386)](ti)&&n[e(409)]((t=>r[e(372)]&&r[e(372)][e(407)](t))))))return!0}catch(t){}const n=window,r=(t,e)=>null!=t&&t!==e;return!!r(n[e(408)],t[e(404)])||!!r(n[e(373)],t[e(381)])||!t[e(371)]&&void 0!==n[e(400)]&&null!==n.tsPlatform}(t[e(392)])?{detected:!0,signal:"script"}:{detected:!1}}({storageManager:this.storageManager,ownGlobals:{tsAccountProtection:gi,riskId:wi,ownScript:ci,tsPlatformIsOwn:!0}}),o=null!==(n=null===(e=this[t(512)])||void 0===e?void 0:e[t(539)]())&&void 0!==n&&n;r.detected||o?(r.detected&&"registry"!==r[t(478)]&&ni(this[t(421)],r[t(478)]),this[t(546)](r[t(430)]?r[t(478)]:t(439))):!this[t(526)]&&(this.standardInitListenerRegistered=!0,function(t){const e=xr;zr()[e(507)](Fr,(n=>{var r;"standard"===(null===(r=n[e(496)])||void 0===r?void 0:r.mode)&&t()}))}((()=>{const e=t;this.standDown(e(500))})))}[oi(604)](){const t=oi;this[t(566)]||(this.trafficWatchStarted=!0,function(t,e){const n=qo;!function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const r=jr;var o;const i=n[r(349)];if("function"!=typeof i||typeof(null===(o=i[r(363)])||void 0===o?void 0:o[r(362)])!==r(342))return;let a;try{a=new URL(e).origin}catch(t){return}let s=!1,u=!1,c=null;const l=[],d=()=>{const t=r;u||(u=!0,null!==c&&(clearTimeout(c),c=null),l[t(356)]((t=>{try{t.disconnect()}catch(t){}})))},h=()=>{s||u||(s=!0,d(),t())},f=t=>{const e=r;for(const n of t){const t=n[e(351)];if(t&&Kr(t,a))return void h()}},p=function(t){const e=[],n=t=>{const r=qr;e[r(347)](t);let o=[];try{o=Array.from(t[r(364)])}catch(t){return}for(const t of o)Lr(t)&&n(t)};return n(t),e}(n);for(const e of p){if(s)break;try{const t=e[r(358)];if(!t)continue;if(f(t[r(348)](r(335))),s)break;const n=e[r(349)];if("function"!=typeof n)continue;const o=new n((t=>f(t[r(354)]())));o[r(362)]({entryTypes:[r(335)]}),l[r(347)](o)}catch(t){}}!u&&(c=setTimeout(d,5e3))}((()=>t(n(379))),e)}((e=>{const n=t;ni(this[n(421)],e),this[n(546)](e)}),this[t(513)].serverPath))}[oi(527)](){const t=oi;if(this[t(532)])return;this.spaRouteHooksRegistered=!0;const e=()=>{const e=t,n=window[e(574)].pathname;n!==this[e(569)]&&(this[e(569)]=n,this[e(466)]())};if(window[t(550)](t(529),e),window[t(550)]("locationchange",e),history[li])return;history[li]=!0;const n=history.pushState;history[t(479)]=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];const i=t,a=n[i(460)](this,r);return window[i(494)](new Event("locationchange")),a};const r=history[t(428)];history[t(428)]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];const i=t,a=r[i(460)](this,n);return window.dispatchEvent(new Event(i(427))),a}}generateDisabledToken(t){const e=oi,n=Date.now();return e(562)+(this[e(450)]||"unknown")+"_"+t+"_"+n}get[oi(534)](){const t=oi;return this[t(504)][t(514)](fi,[])}async getActions(){const t=oi;return await this.isInitialized(),this[t(534)]}async[oi(418)](){const t=oi;if(this.tier===t(537))throw new Error(t(556));if(!this[t(511)])throw new Error(t(436));return await this.isInitialized()?(this[t(409)][t(451)]()&&await this.eventsManager.refreshSessionToken(),this[t(409)][t(418)]()):(Se[t(552)]("SDK disabled"),this[t(486)](t(567)))}async[oi(493)](){const t=oi;if("lightweight"!==this[t(583)])throw new Error(t(438));return await this[t(414)](),await this.eventsManager.getPayload()}[oi(541)](){const t=oi;if(this.tier!==t(537))throw new Error(t(431));this[t(605)].clearQueue()}[oi(432)](t){const e=oi;if(this[e(583)]!==e(537))throw new Error(e(416));if(!t||typeof t!==e(597))throw new Error(e(610));Se[e(552)](e(509),{deviceId:t}),this[e(409)][e(432)](t)}[oi(474)](){const t=oi;return!(!this[t(448)]||this.configManager.getConfValue(di,!1)&&(Se[t(552)]("agentic kill switch active: agentic functionality suppressed"),1))}async[oi(446)](t){const e=oi,n=typeof t!==e(471)?t:null==t?void 0:t[e(547)];return Se[e(552)](e(577)),this.initializationPromise=(async()=>{const t=e;var r,o,i;if(this.agenticCollect){if(Ve[t(429)]())return Se[t(552)](t(505)),!0;if(function(){const t=xr;return Ur()[t(490)]((e=>"agentic"===(null==e?void 0:e[t(494)])))}())return Se[t(552)](t(464)),!0;Vr("agentic"),this[t(559)]=Date[t(555)]()}this[t(583)]!==t(537)&&await this[t(504)][t(489)](this[t(409)].getClientId()),this[t(501)]=this[t(474)]();const a=this[t(504)][t(514)](t(407),null),s=this[t(504)][t(514)](t(573),null),u=this[t(504)][t(514)]("idbWriteTimeoutMs",void 0),c={};if((null==s?void 0:s[t(440)])&&(c[t(573)]={isEnabled:!0,expiryDays:s[t(434)],startedAt:s[t(441)],tenantId:a}),void 0!==u&&(c[t(458)]=u),this[t(524)]&&(c[t(462)]=this.clientId),(null===(r=this[t(513)][t(455)])||void 0===r?void 0:r[t(544)])&&(c[t(544)]=this[t(513)].cryptoBindingConfig.keyScope),this[t(519)]=ve[t(520)][t(468)]("sign",Object[t(422)](c)[t(454)]>0?c:void 0),this.identityManager[t(522)](this[t(519)]),this[t(591)]=new Ue(this[t(421)],this[t(504)],this[t(519)],this[t(501)]),this[t(433)]=new No(this[t(504)]),this[t(605)]=new Cr(this[t(504)],this.storageManager,this.deviceDataManager,this.requestsManager,this.identityManager,this[t(433)],this.cryptoBinding,this.options.serverPath,this[t(511)],this.tier),this[t(448)]&&!this[t(501)]&&this[t(605)][t(546)](),this[t(501)]&&(this[t(512)]=new Yo(this[t(504)],this[t(421)],(t=>this.actions.includes(t)),((e,n)=>this[t(515)](e,n))),this[t(605)][t(551)]((e=>this[t(512)][t(595)](e)))),null!==this[t(450)])return!1;const l=this.configManager.getConfValue("sdkEnabled",void 0);if(!l)return this.disabledReason=void 0===l?"missing_config":t(469),!1;if(this[t(611)]=this[t(611)]||this.configManager[t(514)]("enableIdentifiersMigration",!1),this[t(611)]&&this[t(578)]&&await this[t(503)][t(540)](this.firstPartyMigrationUrl),Se[t(467)]=Se[t(467)]||!!this[t(504)][t(514)](hi,!1),"lightweight"!==this[t(583)])if(this[t(448)]&&!this[t(501)])Se[t(552)](t(456));else{if(this[t(501)]&&this[t(466)](),this.agenticActive&&!this.standDownCalled){const e=null!==(i=null===(o=this[t(512)])||void 0===o?void 0:o[t(564)])&&void 0!==i?i:0;e>0&&(this[t(604)](),await new Promise((t=>setTimeout(t,e))),this[t(466)]())}await this[t(605)][t(592)]()[t(600)]((()=>{})),await this[t(605)][t(523)]()[t(600)]((()=>{})),await this[t(443)](n)[t(600)]((()=>{})),this.agenticActive&&!this[t(533)]&&(this[t(604)](),this.lastCascadePath=window[t(574)][t(516)],this[t(527)]()),(!this[t(533)]||this[t(448)])&&this[t(605)].registerEventListeners(),await this.eventsManager[t(408)]()[t(600)]((()=>{}))}else Se.info(t(423));return Se[t(552)]("sdk init done"),!0})(),await this[e(593)]}async[oi(414)](){const t=oi;if(null===this[t(593)])return!this.disabledReason&&(this.disabledReason="init_not_called"),!1;const e=await this[t(593)];return!e&&!this[t(450)]&&(this[t(450)]=t(420)),e}async[oi(515)](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=oi;var r,i;if("lightweight"===this[n(583)])throw new Error(n(558));const a=Date[n(555)]();if(!await this.isInitialized())return Se[n(552)](n(585)),{actionToken:this.generateDisabledToken(n(589))};if(!this.actions[n(502)](t))return Se[n(587)]("Invalid action type",{actionType:t}),{actionToken:$n[n(561)]+n(517)+t+"'_"+a};this[n(501)]&&t!==Ho&&(null===(r=this[n(512)])||void 0===r||r.resetCounterOnRealAction());const s=null==e?void 0:e[n(457)];if(s&&!pi[n(502)](s))return Se.warn(n(480),{claimedUserIdType:s}),{actionToken:n(461)+s+"_"+a};let u;this[n(504)][n(514)]("enableDeviceAttributesInActions",!1)&&(u=await this[n(591)][n(473)]());const c=this[n(433)][n(580)](),l=null===(i=null==e?void 0:e[n(548)])||void 0===i?void 0:i[n(547)];l&&await this[n(443)](l);const d=o({type:je[n(415)],attributes:o(o(o(o(o(o(o(o(o(o(o(o(o(o(o(o({action_type:t},(null==e?void 0:e[n(498)])&&{trigger_source:e[n(498)]}),(null==e?void 0:e[n(538)])&&{agentic_counted_interactions:e[n(538)]}),(null==e?void 0:e[n(602)])&&{correlation_id:e[n(602)]}),(null==e?void 0:e[n(554)])&&{claimed_user_id:e[n(554)]}),s&&{claimed_user_id_type:s}),(null==e?void 0:e[n(497)])&&{public_key:e[n(497)]}),(null==e?void 0:e.extensionMetadata)&&{extension_metadata:e[n(542)]}),(null==e?void 0:e[n(549)])&&{extension_device_attributes:e[n(549)]}),(null==e?void 0:e.suspiciousSignals)&&{suspicious_signals:e.suspiciousSignals}),(null==e?void 0:e[n(470)])&&{suspicious_context:e[n(470)]}),(null==e?void 0:e[n(584)])&&{download_file:e[n(584)]}),(null==e?void 0:e[n(463)])&&{upload_file:e[n(463)]}),(null==e?void 0:e[n(563)])&&{transactionData:e[n(563)]}),(null==e?void 0:e.authContext)&&{auth_context:o(o(o(o(o({user_id:l},e[n(548)][n(449)]&&{login_timestamp:e[n(548)][n(449)]}),e[n(548)][n(599)]&&{challenge_type:e[n(548)][n(599)]}),void 0!==e[n(548)][n(492)]&&{failed_attempts:e[n(548)][n(492)]}),e.authContext[n(607)]&&{auth_method:e[n(548)][n(607)]}),e[n(548)][n(472)]&&{login_origin:e[n(548)][n(472)]})}),u),c&&{aiAgentSignals:c})},(null==e?void 0:e[n(596)])&&{customAttributes:e[n(596)]});try{const t=await this.eventsManager[n(525)](d),{actionToken:e}=t;if(!e)throw new nr(new Error(n(603)+(typeof t==n(471)?JSON[n(506)](t).slice(15):t)),$n.CLIENT);return t}catch(e){return{actionToken:e instanceof nr?e[n(565)]===$n[n(475)]?e[n(565)]+n(528)+t+"_"+e[n(482)]+"_'"+e.message+"'_"+a:e.errorSpace+n(528)+t+"_'"+e[n(601)]+"'_"+a:n(485)+t+"_"+a}}}async[oi(443)](t){const e=oi;if(ui[e(502)](t))return Se[e(552)](e(424),{userId:t}),!1;t=t[e(411)](),Se[e(552)](e(495),{userId:t});const n=this.identityManager.getUserId();return n===t||(this[e(409)][e(598)](t),!!(await this[e(605)][e(525)]({type:je[e(560)],attributes:{previous_user_id:n,user_id:t}}))[e(568)])}async[oi(543)](t){const e=oi;return await this[e(414)]()?this[e(443)](t):(Se[e(552)](e(585)),!1)}async[oi(487)](t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=oi;if(this[r(583)]===r(537))throw new Error(r(575));if(!await this.isInitialized())return Se.info(r(585)),!1;if(!t||!e)return Se.warn("reportActionResult called without actionToken or result",{result:e}),!1;const i={type:je[r(491)],attributes:o(o(o({action_token:t,result_feedback:e},(null==n?void 0:n[r(599)])&&{challenge_type:n[r(599)]}),(null==n?void 0:n[r(547)])&&{user_id:n[r(547)]}),(null==n?void 0:n[r(535)])&&{privateUserIdentifier:n[r(535)]})};try{const t=await this[r(605)][r(525)](i);return"object"==typeof t&&null!==t}catch(t){return Se[r(587)](r(507),{error:t}),!1}}async[oi(488)](){const t=oi;if(!await this[t(414)]())return Se[t(552)](t(585)),!1;const e=this[t(409)][t(476)]();return null!=e&&this[t(409)].removeUserId(),!!(await this[t(605)].emitEvent({type:je[t(560)],attributes:{previous_user_id:e}}))[t(568)]}async[oi(576)](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;const n=oi;if(this.tier===n(537))throw new Error("[Lightweight] getSecureSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.");if(!this.enableSessionToken)throw new Error("Session token is not enabled");return await this[n(414)]()?(this[n(409)][n(451)]()&&await this.eventsManager[n(417)](),await this.identityManager.getSecureSessionToken({actionType:t,expirationSeconds:e})||this[n(486)](n(567))):(Se[n(552)](n(585)),this[n(486)]("session"))}}function mi(){const t=["passport_number","enableSessionToken","agenticManager","options","getConfValue","triggerActionEvent","pathname","_error_'invalid action type - ","[Lightweight] SDK initialized in lightweight mode","cryptoBinding","crypto","validateSDKParams","setCryptoBinding","sendPageLoadEvent","hasOwnClientId","emitEvent","standardInitListenerRegistered","registerSpaRouteHooks","_error_","popstate","national_id","logsReporter","spaRouteHooksRegistered","standDownCalled","actions","privateUserIdentifier","currentScript","lightweight","agenticCountedInteractions","isPathIgnored","migrateIdentifiers","clearQueue","extensionMetadata","setAuthenticatedUser","keyScope","call","standDown","userId","authContext","extensionDeviceAttributes","addEventListener","setInteractionObserver","info","518358FcGxgt","claimedUserId","now","[Lightweight] getSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.","trim","[Lightweight] triggerActionEvent() cannot be used in lightweight tier. Use getPayload() instead.","agenticInitStartedAt","EVENT_TYPE_IDENTIFICATION","CLIENT","disabled_sdk_","transactionData","publishGraceMs","errorSpace","trafficWatchStarted","session","deviceId","lastCascadePath","227635XigzPg","agentic stand-down: another DRS instance covers this page","8yLLegc","keyRotation","location","[Lightweight] reportActionResult() cannot be used in lightweight tier.","getSecureSessionToken","sdk init started","firstPartyMigrationUrl","drivers_license_number","getSnapshot","setAttribute","TSAccountProtectionReady","tier","downloadFile","SDK disabled","clientId","warn","391303rwQZef","action","serverPath is required","deviceDataManager","sendDeviceDataEvent","initializationPromise","agenticKillSwitch","onInteraction","customAttributes","string","setUserId","challengeType","catch","message","correlationId","Unhandled SDK error. Received eventResponse: ","startTrafficWatch","eventsManager","1413853vCtmoS","authMethod","serverPath","TSAccountProtection","[Lightweight] deviceId must be a non-empty string","identifiersMigrationEnabled","tenantId","flush","identityManager","account_id","toString","1862946tdoftP","mainEntry","isInitialized","EVENT_TYPE_ACTION","[Lightweight] setDeviceId() can only be used in lightweight tier","refreshSessionToken","getSessionToken","4TQwXaD","init_failed","storageManager","keys","[Lightweight] Skipping auto-event collection and event listeners","identifyUser called without a valid userid","requestsManager","phone_number","locationchange","replaceState","isMobileForAgentic","detected","[Lightweight] clearQueue() can only be used in lightweight tier","setDeviceId","agenticSignalsManager","expiryDays","validationManager","Session token is not enabled","initialize","[Lightweight] getPayload() can only be used in lightweight tier","declared-path","isEnabled","startedAt","email","updateUserId","load","verbose","init","RiskIDReady","agenticCollect","loginTimestamp","disabledReason","isTokenExpired","2GQmLMY","undefined","length","cryptoBindingConfig","agentic instance killed by kill switch — no publish, no collection","claimedUserIdType","idbWriteTimeoutMs","initializedInstance","apply","invalid_claimed_user_id_type_","fallbackClientId","uploadFile","agentic inert: another agentic instance already registered","2414280gXNUJX","runDetectionCascade","enabled","createCryptoBinding","config_disabled","suspiciousContext","object","loginOrigin","getDeviceData","resolveAgenticActive","SERVER","getUserId","standard","signal","pushState","Invalid claimedUserIdType","Agentic SDK already initialized","errorCode","invalid_params","initializedAgenticInstance","unexpected_error_","generateDisabledToken","reportActionResult","clearUser","refreshConf","RiskID","EVENT_TYPE_ACTION_RESULT","failedAttempts","getPayload","dispatchEvent","identifyUser","3943062gIljQF","publicKey","triggerSource","__tsDrsHistoryPatched","registry","agenticActive","includes","migrationsManager","configManager","agentic inert: mobile web is not supported","stringify","reportActionResult failed to send","other","[Lightweight] Setting deviceId from backend"];return(mi=function(){return t})()}gi[oi(459)]=!1,gi[oi(484)]=!1;const wi=gi;if(ci){ci.__tsAccountProtection=gi;try{null===(ai=(ii=ci)[oi(581)])||void 0===ai||ai[oi(545)](ii,ti,"")}catch(t){}}document[oi(494)](new CustomEvent(oi(582),{detail:{TSAccountProtection:gi}}));const vi=yi;function yi(t,e){return t-=190,Ci()[t]}!function(){const t=yi,e=Ci();for(;;)try{if(799149==parseInt(t(214))/1+parseInt(t(194))/2*(parseInt(t(191))/3)+parseInt(t(212))/4*(parseInt(t(190))/5)+parseInt(t(215))/6*(parseInt(t(206))/7)+-parseInt(t(210))/8*(-parseInt(t(201))/9)+-parseInt(t(204))/10+-parseInt(t(219))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let _i=null,Ei=null;ve[vi(218)].on(ve[vi(218)][vi(192)],(()=>{const t=vi,{clientId:e,drs:n,cryptoBindingConfig:r}=ve[t(203)][t(217)](),i=n||{},{enabled:a,userId:s,serverPath:u}=i,c=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(i,pe);if(!1===a)return;const l=!!c[t(208)],d=(null==n?void 0:n.clientId)||e,h=!!(null==n?void 0:n[t(198)]),f=new gi(d,o(o({},c),{},{hasOwnClientId:h,serverPath:u,cryptoBindingConfig:r}));l?Ei=f:_i=f,f.init({userId:s})}));const bi=function(){return function(){const t=vi,e=null!=_i?_i:Ei;if(!e)throw new(ve[t(197)][t(207)].TsError)(t(205),t(193));return e}().getSessionToken()};function Ci(){const t=["getInitConfig","events","23787291hSoQEh","125CahayM","6sfPznD","MODULE_INITIALIZED","tsPlatform not initialized","18512YBeeRa","triggerActionEvent","reportActionResult","utils","clientId","clearUser","setAuthenticatedUser","1325682bDmxVL","flush","moduleMetadata","15785470EiZvaa","not_initialized","9142SlMBcP","exceptions","agenticCollect","getSecureSessionToken","32iSYBnT","getClientId","187808YxLJMI","identityManager","1229347wmQwIK","7026PHfxkv","getDeviceId"];return(Ci=function(){return t})()}var Ai="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ii=[],Si=[],Ti="undefined"!=typeof Uint8Array?Uint8Array:Array,Di=!1;function Oi(){Di=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Ii[e]=t[e],Si[t.charCodeAt(e)]=e;Si["-".charCodeAt(0)]=62,Si["_".charCodeAt(0)]=63}function Ri(t,e,n){for(var r,o,i=[],a=e;a<n;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Ii[(o=r)>>18&63]+Ii[o>>12&63]+Ii[o>>6&63]+Ii[63&o]);return i.join("")}function Mi(t){var e;Di||Oi();for(var n=t.length,r=n%3,o="",i=[],a=16383,s=0,u=n-r;s<u;s+=a)i.push(Ri(t,s,s+a>u?u:s+a));return 1===r?(e=t[n-1],o+=Ii[e>>2],o+=Ii[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=Ii[e>>10],o+=Ii[e>>4&63],o+=Ii[e<<2&63],o+="="),i.push(o),i.join("")}function ki(t,e,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,d=n?o-1:0,h=n?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),i-=c}return(f?-1:1)*a*Math.pow(2,i-r)}function Ni(t,e,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*g}var xi={}.toString,Pi=Array.isArray||function(t){return"[object Array]"==xi.call(t)};function Bi(){return Li.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Fi(t,e){if(Bi()<e)throw new RangeError("Invalid typed array length");return Li.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Li.prototype:(null===t&&(t=new Li(e)),t.length=e),t}function Li(t,e,n){if(!(Li.TYPED_ARRAY_SUPPORT||this instanceof Li))return new Li(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Vi(this,t)}return zi(this,t,e,n)}function zi(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);Li.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Li.prototype:t=Hi(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!Li.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Wi(e,n);t=Fi(t,r);var o=t.write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(ji(e)){var n=0|Gi(e.length);return 0===(t=Fi(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?Fi(t,0):Hi(t,e);if("Buffer"===e.type&&Pi(e.data))return Hi(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Ui(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Vi(t,e){if(Ui(e),t=Fi(t,e<0?0:0|Gi(e)),!Li.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function Hi(t,e){var n=e.length<0?0:0|Gi(e.length);t=Fi(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function Gi(t){if(t>=Bi())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bi().toString(16)+" bytes");return 0|t}function ji(t){return!(null==t||!t._isBuffer)}function Wi(t,e){if(ji(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return va(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ya(t).length;default:if(r)return va(t).length;e=(""+e).toLowerCase(),r=!0}}function Xi(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return sa(this,e,n);case"utf8":case"utf-8":return ra(this,e,n);case"ascii":return ia(this,e,n);case"latin1":case"binary":return aa(this,e,n);case"base64":return na(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ua(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Yi(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function qi(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=Li.from(e,r)),ji(e))return 0===e.length?-1:Zi(t,e,n,r,o);if("number"==typeof e)return e&=255,Li.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Zi(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Zi(t,e,n,r,o){var i,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=n;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function Ki(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function $i(t,e,n,r){return _a(va(e,t.length-n),t,n,r)}function Qi(t,e,n,r){return _a(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function Ji(t,e,n,r){return Qi(t,e,n,r)}function ta(t,e,n,r){return _a(ya(e),t,n,r)}function ea(t,e,n,r){return _a(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function na(t,e,n){return 0===e&&n===t.length?Mi(t):Mi(t.slice(e,n))}function ra(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=d}return function(t){var e=t.length;if(e<=oa)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=oa));return n}(r)}Li.TYPED_ARRAY_SUPPORT=void 0===Ai.TYPED_ARRAY_SUPPORT||Ai.TYPED_ARRAY_SUPPORT,Bi(),Li.poolSize=8192,Li._augment=function(t){return t.__proto__=Li.prototype,t},Li.from=function(t,e,n){return zi(null,t,e,n)},Li.TYPED_ARRAY_SUPPORT&&(Li.prototype.__proto__=Uint8Array.prototype,Li.__proto__=Uint8Array),Li.alloc=function(t,e,n){return function(t,e,n,r){return Ui(e),e<=0?Fi(t,e):void 0!==n?"string"==typeof r?Fi(t,e).fill(n,r):Fi(t,e).fill(n):Fi(t,e)}(null,t,e,n)},Li.allocUnsafe=function(t){return Vi(null,t)},Li.allocUnsafeSlow=function(t){return Vi(null,t)},Li.isBuffer=function(t){return null!=t&&(!!t._isBuffer||Ea(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Ea(t.slice(0,0))}(t))},Li.compare=function(t,e){if(!ji(t)||!ji(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},Li.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Li.concat=function(t,e){if(!Pi(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Li.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=Li.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var i=t[n];if(!ji(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},Li.byteLength=Wi,Li.prototype._isBuffer=!0,Li.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Yi(this,e,e+1);return this},Li.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Yi(this,e,e+3),Yi(this,e+1,e+2);return this},Li.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Yi(this,e,e+7),Yi(this,e+1,e+6),Yi(this,e+2,e+5),Yi(this,e+3,e+4);return this},Li.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ra(this,0,t):Xi.apply(this,arguments)},Li.prototype.equals=function(t){if(!ji(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Li.compare(this,t)},Li.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Li.prototype.compare=function(t,e,n,r,o){if(!ji(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(r,o),c=t.slice(e,n),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},Li.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},Li.prototype.indexOf=function(t,e,n){return qi(this,t,e,n,!0)},Li.prototype.lastIndexOf=function(t,e,n){return qi(this,t,e,n,!1)},Li.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return Ki(this,t,e,n);case"utf8":case"utf-8":return $i(this,t,e,n);case"ascii":return Qi(this,t,e,n);case"latin1":case"binary":return Ji(this,t,e,n);case"base64":return ta(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ea(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},Li.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var oa=4096;function ia(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function aa(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function sa(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=wa(t[i]);return o}function ua(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function ca(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function la(t,e,n,r,o,i){if(!ji(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function da(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function ha(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function fa(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function pa(t,e,n,r,o){return o||fa(t,0,n,4),Ni(t,e,n,r,23,4),n+4}function ga(t,e,n,r,o){return o||fa(t,0,n,8),Ni(t,e,n,r,52,8),n+8}Li.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),Li.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=Li.prototype;else{var o=e-t;n=new Li(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},Li.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||ca(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},Li.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||ca(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},Li.prototype.readUInt8=function(t,e){return e||ca(t,1,this.length),this[t]},Li.prototype.readUInt16LE=function(t,e){return e||ca(t,2,this.length),this[t]|this[t+1]<<8},Li.prototype.readUInt16BE=function(t,e){return e||ca(t,2,this.length),this[t]<<8|this[t+1]},Li.prototype.readUInt32LE=function(t,e){return e||ca(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Li.prototype.readUInt32BE=function(t,e){return e||ca(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Li.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||ca(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},Li.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||ca(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},Li.prototype.readInt8=function(t,e){return e||ca(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Li.prototype.readInt16LE=function(t,e){e||ca(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},Li.prototype.readInt16BE=function(t,e){e||ca(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},Li.prototype.readInt32LE=function(t,e){return e||ca(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Li.prototype.readInt32BE=function(t,e){return e||ca(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Li.prototype.readFloatLE=function(t,e){return e||ca(t,4,this.length),ki(this,t,!0,23,4)},Li.prototype.readFloatBE=function(t,e){return e||ca(t,4,this.length),ki(this,t,!1,23,4)},Li.prototype.readDoubleLE=function(t,e){return e||ca(t,8,this.length),ki(this,t,!0,52,8)},Li.prototype.readDoubleBE=function(t,e){return e||ca(t,8,this.length),ki(this,t,!1,52,8)},Li.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||la(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},Li.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||la(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},Li.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,1,255,0),Li.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Li.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,2,65535,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):da(this,t,e,!0),e+2},Li.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,2,65535,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):da(this,t,e,!1),e+2},Li.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,4,4294967295,0),Li.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):ha(this,t,e,!0),e+4},Li.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,4,4294967295,0),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ha(this,t,e,!1),e+4},Li.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);la(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+n},Li.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);la(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+n},Li.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,1,127,-128),Li.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Li.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,2,32767,-32768),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):da(this,t,e,!0),e+2},Li.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,2,32767,-32768),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):da(this,t,e,!1),e+2},Li.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,4,2147483647,-2147483648),Li.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ha(this,t,e,!0),e+4},Li.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||la(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Li.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ha(this,t,e,!1),e+4},Li.prototype.writeFloatLE=function(t,e,n){return pa(this,t,e,!0,n)},Li.prototype.writeFloatBE=function(t,e,n){return pa(this,t,e,!1,n)},Li.prototype.writeDoubleLE=function(t,e,n){return ga(this,t,e,!0,n)},Li.prototype.writeDoubleBE=function(t,e,n){return ga(this,t,e,!1,n)},Li.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!Li.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},Li.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Li.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=ji(t)?t:va(new Li(t,r).toString()),s=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%s]}return this};var ma=/[^+\/0-9A-Za-z-_]/g;function wa(t){return t<16?"0"+t.toString(16):t.toString(16)}function va(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function ya(t){return function(t){var e,n,r,o,i,a;Di||Oi();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Ti(3*s/4-i),r=i>0?s-4:s;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)o=Si[t.charCodeAt(e)]<<18|Si[t.charCodeAt(e+1)]<<12|Si[t.charCodeAt(e+2)]<<6|Si[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=Si[t.charCodeAt(e)]<<2|Si[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=Si[t.charCodeAt(e)]<<10|Si[t.charCodeAt(e+1)]<<4|Si[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ma,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function _a(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function Ea(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}class ba extends Error{constructor(t,e,n){super(n),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const Ca=t=>null!=t,Aa=t=>"string"==typeof t,Ia=t=>Aa(t)&&""!==t,Sa=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),Ta=t=>t instanceof FormData,Da=t=>{const e=[],n=(t,r)=>{Ca(r)&&(Array.isArray(r)?r.forEach((e=>{n(t,e)})):"object"==typeof r?Object.entries(r).forEach((e=>{let[r,o]=e;n(`${t}[${r}]`,o)})):((t,n)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`)})(t,r))};return Object.entries(t).forEach((t=>{let[e,r]=t;n(e,r)})),e.length>0?`?${e.join("&")}`:""},Oa=async(t,e)=>"function"==typeof e?e(t):e,Ra=async(t,e)=>{const n=await Oa(e,t.TOKEN),r=await Oa(e,t.USERNAME),i=await Oa(e,t.PASSWORD),a=await Oa(e,t.HEADERS),s=Object.entries(o(o({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,n]=t;return Ca(n)})).reduce(((t,e)=>{let[n,r]=e;return o(o({},t),{},{[n]:String(r)})}),{});if(Ia(n)&&(s.Authorization=`Bearer ${n}`),Ia(r)&&Ia(i)){const t=(t=>{try{return btoa(t)}catch(e){return Li.from(t).toString("base64")}})(`${r}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Sa(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Aa(e.body)?s["Content-Type"]="text/plain":Ta(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},Ma=(t,e)=>new Promise((async(n,r)=>{try{const r=((t,e)=>{const n=t.ENCODE_PATH||encodeURI,r=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,r)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(r))?n(String(e.path[r])):t})),o=`${t.BASE}${r}`;return e.query?`${o}${Da(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,n=(t,n)=>{Aa(n)||Sa(n)?e.append(t,n):e.append(t,JSON.stringify(n))};return Object.entries(t.formData).filter((t=>{let[e,n]=t;return Ca(n)})).forEach((t=>{let[e,r]=t;Array.isArray(r)?r.forEach((t=>n(e,t))):n(e,r)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Aa(t.body)||Sa(t.body)||Ta(t.body)?t.body:JSON.stringify(t.body)})(e),s=await Ra(t,e),u=await(async(t,e,n,r,o,i)=>{const a=new AbortController,s={headers:i,body:null!=r?r:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),e.keepalive&&(s.keepalive=!0),await fetch(n,s)})(t,e,r,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const n=t.headers.get(e);if(Aa(n))return n}})(u,e.responseHeader),d={url:r,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var n,r;const i=o({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new ba(t,e,i);if(!e.ok){const o=null!==(n=e.status)&&void 0!==n?n:"unknown",i=null!==(r=e.statusText)&&void 0!==r?r:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new ba(t,e,`Generic Error: status: ${o}; status text: ${i}; body: ${a}`)}})(e,d),n(d)}catch(t){r(t)}})),ka=new t("idv"),Na=Symbol(),xa=Symbol(),Pa="verify-id-sdk";function Ba(t){return sessionStorage.getItem(t)}const Fa=new Map;function La(t,e){const n=Fa.get(t);ka.events.emit(n,e)}function za(t){La(Na,t)}function Ua(t,e){za({type:"session-id-acquired",step:t,sessionId:e})}function Va(t,e,n,r,o){za({type:"verification-result",status:e,step:t,state:r,callbackUrl:o,sessionId:n})}function Ha(t,e){za({type:"capture-error",errorCode:e,step:t})}function Ga(t,e,n){za({type:"api-request-error",errorCode:e,step:t,error:n})}Fa.set(Na,Na),Fa.set(xa,xa);var ja={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)},setCaptureApprovalSettings(t,e){t.commit("setCaptureApprovalSettings",e)},setRotatedDocumentCaptureEnabled(t,e){t.commit("setRotatedDocumentCaptureEnabled",e)},setFlowType(t,e){t.commit("setFlowType",e)}},Wa={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t),setCaptureApprovalSettings:(t,e)=>(t.captureApprovalSettings=e,t),setRotatedDocumentCaptureEnabled:(t,e)=>(t.rotatedDocumentCaptureEnabled=e,t),setFlowType:(t,e)=>(t.flowType=e,t)};const Xa=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,n,r){return t[n]=r,La(xa,{key:n,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(n)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const n=this.mutations[t](this.state,e);return this.state=n,!0}}({actions:ja,mutations:Wa,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});function Ya(t,e){return Ma({BASE:Xa.state.serverPath,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include"},t).catch((n=>(t.url.endsWith("/events")||Ga(e,"request-error",n.message),Promise.reject(n))))}async function qa(t,e){var n;const r=await function(t,e){return Ya({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}${e?`&lang=${encodeURIComponent(e)}`:""}`},"init")}(t,e);return{autocapture_settings:null!==(n=r.body.autocapture_settings)&&void 0!==n?n:void 0,autocapture_enabled:r.body.autocapture_enabled,rotated_document_capture_enabled:r.body.rotated_document_capture_enabled,strings:r.body.strings,capture_approval_settings:r.body.capture_approval_settings}}var Za;function Ka(t){const e=[],n=function(t){var e,n,r,o;const i=t.stats.get(Za.BLUR_DETECTION),a=t.stats.get(Za.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=Ja(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(n=null==i?void 0:i.countSuccess)&&void 0!==n?n:null==a?void 0:a.countSuccess;return{name:Qa(Za.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(r=null==a?void 0:a.countFailed)&&void 0!==r?r:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);n&&e.push(n);const r=function(t){var e,n;const r=t.stats.get(Za.FACE_DETECTION),o=t.stats.get(Za.FACE_POSITION);if(!r||0===r.durations.length)return;const i=Ja(r.durations);return{name:Qa(Za.FACE_DETECTION),count_success:null!==(e=null==o?void 0:o.countSuccess)&&void 0!==e?e:r.countSuccess,count_failure:r.countFailed+(null!==(n=null==o?void 0:o.countFailed)&&void 0!==n?n:0),avg_duration:i.duration_avg,std_duration:i.duration_std}}(t);r&&e.push(r);for(const[n,r]of t.stats.entries())n!==Za.BLUR_DETECTION&&n!==Za.GLARE_DETECTION&&n!==Za.FACE_DETECTION&&n!==Za.FACE_POSITION&&r.durations.length>0&&e.push($a(r,n));return t.frameHandleDurations.length>0&&e.push(function(t){const e=Ja(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function $a(t,e){const n=Ja(t.durations);return{name:Qa(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:n.duration_avg,std_duration:n.duration_std}}function Qa(t){switch(t){case Za.BLUR_DETECTION:case Za.GLARE_DETECTION:return"blur_glare_detector";case Za.DOCUMENT_DETECTION:return"doc_detector";case Za.DOCUMENT_POSITION:return"frame_detector";case Za.BARCODE_DETECTION:return"barcode_detector";case Za.FACE_DETECTION:case Za.FACE_POSITION:return"face_detector";default:return t}}function Ja(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const n=t.length,r=t.reduce(((t,e)=>t+e),0)/n;let o=0;for(let e=0;e<n;e++){const n=t[e];o+=Math.pow(n-r,2)}const i=Math.sqrt(o/(n-1));return{duration_avg:Math.round(r),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position",t.FACE_ANGLE="face_angle",t.FACE_ROTATION="face_rotation"}(Za||(Za={}));var ts,es,ns,rs,os={},is={get exports(){return os},set exports(t){os=t}};function as(){return window.innerWidth>window.innerHeight?"landscape":"portrait"}function ss(t){var e,n;const r={rotated_capture_enabled:null!==(n=null===(e=Xa.state)||void 0===e?void 0:e.rotatedDocumentCaptureEnabled)&&void 0!==n&&n,orientation:as()},o=function(t){const e=document.getElementById(`overlay-frame ${t}`),n=document.getElementById("video");if(!e||!n)return;const r=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=o.width||window.innerWidth,a=o.height||window.innerHeight,s=i*a;return r.width&&r.height&&s?{frame_width:Math.round(r.width),frame_height:Math.round(r.height),camera_width:Math.round(i),camera_height:Math.round(a),frame_coverage:Number((r.width*r.height/s).toFixed(3))}:void 0}(t);return o&&(r.frame=o),r}!function(t,e){!function(n,r){var o="function",i="undefined",a="object",s="string",u="major",c="model",l="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",w="tablet",v="smarttv",y="wearable",_="embedded",E="Amazon",b="Apple",C="ASUS",A="BlackBerry",I="Browser",S="Chrome",T="Firefox",D="Google",O="Huawei",R="LG",M="Microsoft",k="Motorola",N="Opera",x="Samsung",P="Sharp",B="Sony",F="Xiaomi",L="Zebra",z="Facebook",U="Chromium OS",V="Mac OS",H=" Browser",G=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},j=function(t,e){return typeof t===s&&-1!==W(e).indexOf(W(t))},W=function(t){return t.toLowerCase()},X=function(t,e){if(typeof t===s)return t=t.replace(/^\s\s*/,""),typeof e===i?t:t.substring(0,500)},Y=function(t,e){for(var n,i,s,u,c,l,d=0;d<e.length&&!c;){var h=e[d],f=e[d+1];for(n=i=0;n<h.length&&!c&&h[n];)if(c=h[n++].exec(t))for(s=0;s<f.length;s++)l=c[++i],typeof(u=f[s])===a&&u.length>0?2===u.length?typeof u[1]==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;d+=2}},q=function(t,e){for(var n in e)if(typeof e[n]===a&&e[n].length>0){for(var o=0;o<e[n].length;o++)if(j(e[n][o],t))return"?"===n?r:n}else if(j(e[n],t))return"?"===n?r:n;return e.hasOwnProperty("*")?e["*"]:t},Z={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,N+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/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)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+I]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+I],f],[/\bfocus\/([\w\.]+)/i],[f,[l,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[f,[l,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,x+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,z],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,S+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,T+" 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,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,W]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,W]]],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],[c,[h,x],[d,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,x],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,b],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,b],[d,w]],[/(macintosh);/i],[c,[h,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,P],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,O],[d,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,O],[d,m]],[/\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],[[c,/_/g," "],[h,F],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,F],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,k],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,k],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,R],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,R],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,D],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,D],[d,m]],[/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],[c,[h,B],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,B],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,E],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,E],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,A],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,C],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,C],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/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],[c,[h,"TCL"],[d,w]],[/(itel) ((\w+))/i],[[h,W],c,[d,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[h,"Nothing"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/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],[h,c,[d,w]],[/(surface duo)/i],[c,[h,M],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,M],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,L],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,L],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,x],[d,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,R],[d,v]],[/(apple) ?tv/i],[h,[c,b+" TV"],[d,v]],[/crkey/i],[[c,S+"cast"],[h,D],[d,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,E],[d,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,P],[d,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,B],[d,v]],[/(mitv-\w{5}) bui/i],[c,[h,F],[d,v]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,X],[c,X],[d,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,B],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,M],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,x],[d,y]],[/((pebble))app/i],[h,c,[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,b],[d,y]],[/droid.+; (glass) \d/i],[c,[h,D],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,L],[d,y]],[/(quest( \d| pro)?)/i],[c,[h,z],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/(aeobc)\b/i],[c,[h,E],[d,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[f,q,Z]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,q,Z],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,U],f],[/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) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},$=function(t,e){if(typeof t===a&&(e=t,t=r),!(this instanceof $))return new $(t,e).getResult();var g=typeof n!==i&&n.navigator?n.navigator:r,v=t||(g&&g.userAgent?g.userAgent:""),y=g&&g.userAgentData?g.userAgentData:r,_=e?function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n}(K,e):K,E=g&&g.userAgent==v;return this.getBrowser=function(){var t={};return t[l]=r,t[f]=r,Y.call(t,v,_.browser),t[u]=function(t){return typeof t===s?t.replace(/[^\d\.]/g,"").split(".")[0]:r}(t[f]),E&&g&&g.brave&&typeof g.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var t={};return t[p]=r,Y.call(t,v,_.cpu),t},this.getDevice=function(){var t={};return t[h]=r,t[c]=r,t[d]=r,Y.call(t,v,_.device),E&&!t[d]&&y&&y.mobile&&(t[d]=m),E&&"Macintosh"==t[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(t[c]="iPad",t[d]=w),t},this.getEngine=function(){var t={};return t[l]=r,t[f]=r,Y.call(t,v,_.engine),t},this.getOS=function(){var t={};return t[l]=r,t[f]=r,Y.call(t,v,_.os),E&&!t[l]&&y&&y.platform&&"Unknown"!=y.platform&&(t[l]=y.platform.replace(/chrome os/i,U).replace(/macos/i,V)),t},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 v},this.setUA=function(t){return v=typeof t===s&&t.length>500?X(t,500):t,this},this.setUA(v),this};$.VERSION="1.0.39",$.BROWSER=G([l,f,u]),$.CPU=G([p]),$.DEVICE=G([c,h,d,g,m,v,w,y,_]),$.ENGINE=$.OS=G([l,f]),t.exports&&(e=t.exports=$),e.UAParser=$;var Q=typeof n!==i&&(n.jQuery||n.Zepto);if(Q&&!Q.ua){var J=new $;Q.ua=J.getResult(),Q.ua.get=function(){return J.getUA()},Q.ua.set=function(t){J.setUA(t);var e=J.getResult();for(var n in e)Q.ua[n]=e[n]}}}("object"==typeof window?window:i)}(is,os),function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(ts||(ts={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(es||(es={})),function(t){var e,n;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(n=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",n.DOCUMENT_EXPIRED="document_expired",n.DOCUMENT_NOT_SUPPORTED="document_not_supported",n.DOCUMENT_DAMAGED="document_damaged",n.POOR_IMAGE_QUALITY="poor_image_quality",n.DOCUMENT_NOT_FOUND="document_not_found",n.OBSTRUCTED="obstructed",n.BLUR="blur",n.GLARE="glare",n.DOCUMENT_NOT_MATCHING="document_not_matching",n.WRONG_DOCUMENT_SIDE="wrong_document_side",n.FACE_NOT_FOUND="face_not_found",n.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",n.INVALID_INPUT="invalid_input",n.MULTI_FACE="multi_face",n.FACE_ROTATED="face_rotated",n.FACE_TOO_SMALL="face_too_small",n.FACE_TOO_CLOSE="face_too_close",n.CLOSED_EYES="closed_eyes",n.FACE_ANGLE_TOO_LARGE="face_angle_too_large",n.FACE_CLOSE_TO_BORDER="face_close_to_border",n.FACE_OCCLUDED="face_occluded",n.FACE_CROPPED="face_cropped",n.BARCODE_NOT_FOUND="barcode_not_found",n.GLARE_SELFIE="glare_selfie",n.BLUR_SELFIE="blur_selfie",n.NO_FACE="no_face",n.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(ns||(ns={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(rs||(rs={}));const us=t=>["document_front","document_back"].includes(t)?"environment":"user";function cs(t){switch(t){case"document_front":return es.image_type.DOCUMENT_FRONT;case"document_back":return es.image_type.DOCUMENT_BACK;case"selfie":return es.image_type.SELFIE}}const ls=new class{createUploadImageEvent(t,e,n,r,i){return{event_type:"upload_image",upload_image_req:o({process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(n),request_build_time_ms:String(r)},null!=i?i:{})}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}async createCaptureStartEvent(t,e){var n,r,i;const a=await async function(){var t,e,n,r,o,i,a,s;const u=os.UAParser(),c={vendor:null===(t=u.device)||void 0===t?void 0:t.vendor,model:null===(e=u.device)||void 0===e?void 0:e.model,type:null===(n=u.device)||void 0===n?void 0:n.type,os:null===(r=u.os)||void 0===r?void 0:r.name,os_version:null===(o=u.os)||void 0===o?void 0:o.version,browser:null===(i=u.browser)||void 0===i?void 0:i.name,browser_version:null===(a=u.browser)||void 0===a?void 0:a.version},l=navigator.userAgentData;if(!l)return c;try{const t=await l.getHighEntropyValues(["model","platformVersion","fullVersionList"]);t.model&&(c.model=t.model),l.platform&&(c.os=l.platform),t.platformVersion&&(c.os_version=t.platformVersion);const e=(null!==(s=t.fullVersionList)&&void 0!==s?s:[]).find((t=>!t.brand.includes("Not")&&"Chromium"!==t.brand));e&&(c.browser=e.brand,c.browser_version=e.version)}catch(t){}return c}();return{event_type:"capture_start",capture_start_req:o({page_name:t,autocapture_enabled:null!==(i=null===(r=null===(n=Xa.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&void 0!==i&&i,camera:o({},e),device:a},ss(us(t)))}}createUserActionEvent(t,e,n,r,o,i,a,s){var u,c,l;const d={user_action_type:t,page_name:e,autocapture:!!n,autocapture_enabled:null!==(l=null===(c=null===(u=Xa.state)||void 0===u?void 0:u.autoCaptureSettings)||void 0===c?void 0:c.enabled)&&void 0!==l&&l};if(void 0!==r&&(d.retake_count=r),n){const t=Ka(n);d.stats=t}void 0!==o&&(d.success=o),void 0!==i&&(d.failure_reason=i),void 0!==a&&(d.attempt_number=a),void 0!==s&&(d.total_time_ms=s);return{event_type:"user_action",user_action_req:d}}createManualCaptureFallbackShownEvent(t,e){return{event_type:"manual_capture_fallback_shown",manual_capture_fallback_shown_req:{page_name:t,failed_auto_attempts:e}}}createManualCaptureTriggeredEvent(t){return{event_type:"manual_capture_triggered",manual_capture_triggered_req:{page_name:t}}}createCaptureAbandonedEvent(t,e){return{event_type:"capture_abandoned",capture_abandoned_req:{page_name:t,last_state:e}}}createRotationGateEvent(t,e,n){var r,o,i,a,s;const u={user_action_type:t,page_name:e,autocapture_enabled:null!==(i=null===(o=null===(r=Xa.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&void 0!==i&&i,rotated_capture_enabled:null!==(s=null===(a=Xa.state)||void 0===a?void 0:a.rotatedDocumentCaptureEnabled)&&void 0!==s&&s,orientation:as()};return void 0!==n&&(u.time_to_rotate_ms=Math.round(n)),{event_type:"user_action",user_action_req:u}}createErrorEvent(t,e,n){return{event_type:"error",error_req:{error_name:e,error_description:t,step:n}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}},ds="1.6.13",hs=os.UAParser(),fs=ds;function ps(t,e){var n,r,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":fs,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(n=null==hs?void 0:hs.os)||void 0===n?void 0:n.name,"ts-os-version":null===(r=null==hs?void 0:hs.os)||void 0===r?void 0:r.version,"ts-device-model":null===(o=null==hs?void 0:hs.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==hs?void 0:hs.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==hs?void 0:hs.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}async function gs(t,e,n,r,o){n?await function(t,e,n,r){return Ya({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},headers:r,body:e},n)}(n,o,t,ps(r,e)):console.error("cannot send event, sessionId or startToken is not set")}const ms=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${Xa.state.serverPath}/verify/api/v1/verification/${Xa.state.sessionId}/risk-session-token`,e=Xa.state.clientId,n=ps(e,Xa.state.userToken);bi().then((e=>{ka.http.httpPost(t,{session_token:e},null,n).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var n,r,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=ls.createDrsInitFailureEvent(a,"init");gs(null===(n=Xa.state)||void 0===n?void 0:n.step,null===(r=Xa.state)||void 0===r?void 0:r.userToken,null===(o=Xa.state)||void 0===o?void 0:o.sessionId,null===(i=Xa.state)||void 0===i?void 0:i.clientId,s).then((()=>{za({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function ws(t,e,n){const r=ls.createErrorEvent(t,e,n);await vs(n,r)}async function vs(t,e){var n,r,o,i,a;const s=null===(n=Xa.state)||void 0===n?void 0:n.userToken,u=(null===(r=Xa.state)||void 0===r?void 0:r.sessionId)||(null===(o=Xa.state)||void 0===o?void 0:o.startToken),c=null===(i=Xa.state)||void 0===i?void 0:i.clientId,l=(null===(a=Xa.state)||void 0===a?void 0:a.step)||t;await gs(l,s,u,c,e)}async function ys(t,e,n){const r=ls.createRotationGateEvent(t,e,n);await vs(e,r)}const _s={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",manual_capture_fallback_prompt:"Having trouble? Try manual capture",manual_capture_mode_instruction:"Center the document, then tap",capture_mode_auto:"Auto",capture_mode_manual:"Manual",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue",approve_button:"Approve",retake_button:"Retake"};const Es=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,n){return t[e]=n,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}hasTranslation(t){return Boolean(this.translations[t])}translate(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==n[e]?n[e]:t}))}}(_s),bs={en:_s,es:{blur_message:"Favor enfoca la cámara en tú cédula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"Asegúrate de que la cédula esté completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"Asegúrate de utilizar una cédula valida",document_not_found_title:"Cédula no detectada",document_not_matching_message:"Favor Asegúrate de capturar la parte trasera de tu cédula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cédula",document_not_supported_title:"Cédula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cédula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cédula",obstructed_message:"Parte de la cédula documento no está visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"Escanéa tu cédula",page_header_face:"Reconocimiento Facial",second_title_document_back:"Asegúrate de poner su cédula en una superfice plana con la parte trasera visible.",second_title_document_face:"Asegúrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"Asegúrate de poner su cédula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cédula ha sido detectado",wrong_document_side_title:"Lado de tu cédula incorrecto",face_angle_too_large_title:"Tu rostro no está directamente alineado con la cámara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro está demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegúrate de que todo tu rostro esté dentro del marco.",face_too_small_title:"Tu rostro está demasiado lejos del borde.",face_too_small_message:"Por favor, acércate más a la cámara para que tu rostro esté más claro y sea más fácil de detectar.",face_too_close_title:"Tu rostro está demasiado cerca",face_too_close_message:"Acomode la posición y asegúrese de que toda su rostro esté dentro del marco.",face_cropped_title:"Tu rostro está parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegúrate de que todo tu rostro esté dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acércate más a la cámara o ajusta tu posición para que tu rostro esté más claro y sea más fácil de detectar.",multi_face_title:"Se detectaron múltiples rostros.",multi_face_message:"Por favor, asegúrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato está fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque más claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro está parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro está fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque más claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",manual_capture_fallback_prompt:"¿Problemas? Prueba la captura manual",manual_capture_mode_instruction:"Centra el documento y luego toca",capture_mode_auto:"Auto",capture_mode_manual:"Manual",glare_blur_issues_autocapture:"Por favor, asegúrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegúrese de que esté completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"¡Prepárate! Tu selfie se capturará automáticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"¡Buen trabajo! Aprueba tu selfie para continuar",approve_button:"Aprobar",retake_button:"Volver a tomar"},pt:{blur_message:"Por favor, foque a câmera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento válido emitido pelo governo",document_not_found_title:"Documento não detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento não suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto não esteja coberto e esteja totalmente visível",face_not_found_title:"Rosto não detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estão encobertas ou ausentes",obstructed_title:"Informações incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfície sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfície sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto não está diretamente alinhado com a câmera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_close_to_border_title:"Seu rosto está muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto está muito longe da borda.",face_too_small_message:"Aproxime-se da câmera para que seu rosto fique mais claro e fácil de detectar.",face_too_close_title:"Seu rosto está muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto está parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto não encontrado..",no_face_message:"Aproxime-se da câmera ou ajuste sua posição para que seu rosto fique mais claro e fácil de detectar.",multi_face_title:"Vários rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visível no quadro para continuar.",blur_selfie_title:"O autorretrato está fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexão em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estão fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto está parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_rotated_title:"Seu rosto está fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",manual_capture_fallback_prompt:"Dificuldades? Tente a captura manual",manual_capture_mode_instruction:"Centralize o documento e toque",capture_mode_auto:"Auto",capture_mode_manual:"Manual",glare_blur_issues_autocapture:"Por favor, certifique-se de que não há reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que está totalmente dentro da moldura de captura para uma imagem nítida",second_title_face_autocapture:"Prepare-se! Sua selfie será capturada automaticamente, ou toque para capturá-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ótimo trabalho! Aprove sua selfie para continuar",approve_button:"Aprovar",retake_button:"Tirar novamente"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une pièce d’identité valide délivrée par le gouvernement",document_not_found_title:"Document non détecté",document_not_matching_message:"Veillez à capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre pièce d’identité délivrée par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entièrement visible",face_not_found_title:"Visage non détecté",glare_message:"Évitez la lumière directe qui pourrait se refléter sur le document",glare_title:"Reflet détecté",main_title_document_back:"Verso",main_title_document_face:"Égoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez réessayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"Numériser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais côté du document a été détecté",wrong_document_side_title:"Mauvais côté du document détecté",face_angle_too_large_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_close_to_border_title:"Votre visage est trop près du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop éloigné du bord",face_too_small_message:"Veuillez vous rapprocher de la caméra pour que votre visage soit plus clair et plus facile à détecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rogné",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la caméra ou ajuster votre position pour que votre visage soit plus clair et plus facile à détecter",multi_face_title:"Plusieurs visages détectés",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure détection",glare_selfie_title:"Trop de reflets sur votre égoportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur éclairage et sans reflet pour une détection précise",closed_eyes_title:"Il semble que vos yeux soient fermés.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement caché.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_rotated_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",barcode_not_found_title:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",barcode_not_found_message:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",manual_capture_fallback_prompt:"Des difficultés? Essayez la capture manuelle",manual_capture_mode_instruction:"Centrez le document, puis touchez",capture_mode_auto:"Auto",capture_mode_manual:"Manuel",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumière avant de réessayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entièrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"Préparez-vous! Votre selfie sera capturé automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer",approve_button:"Approuver",retake_button:"Reprendre"}};const Cs=function(){var t,e;(null===(e=null===(t=Xa.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)};var As;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(As||(As={}));var Is,Ss,Ts=(Is=function(t,e){return Is=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Is(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Is(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Ds=function(t){function e(e,n){var r,o,i,a=this.constructor,s=t.call(this,e,n)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),r=s,o=a.prototype,(i=Object.setPrototypeOf)?i(r,o):r.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var n=Error.captureStackTrace;n&&n(t,e)}(s),s}return Ts(e,t),e}(Error),Os=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rs=function(t){function e(e){void 0===e&&(e=void 0);var n=t.call(this,e)||this;return n.message=e,n}return Os(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Ds),Ms=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ks=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ms(e,t),e.kind="ArgumentException",e}(Rs),Ns=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ns(e,t),e.kind="IllegalArgumentException",e}(Rs),Ps=function(){function t(t){if(this.binarizer=t,null===t)throw new xs("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,n,r,o){var i=this.binarizer.getLuminanceSource().crop(e,n,r,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Bs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bs(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(Rs),Ls=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),zs=function(){function t(){}return t.arraycopy=function(t,e,n,r,o){for(;o--;)n[r++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Us=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Us(e,t),e.kind="IndexOutOfBoundsException",e}(Rs),Hs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gs=function(t){function e(e,n){void 0===e&&(e=void 0),void 0===n&&(n=void 0);var r=t.call(this,n)||this;return r.index=e,r.message=n,r}return Hs(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Vs),js=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ws=function(){function t(){}return t.fill=function(t,e){for(var n=0,r=t.length;n<r;n++)t[n]=e},t.fillWithin=function(e,n,r,o){t.rangeCheck(e.length,n,r);for(var i=n;i<r;i++)e[i]=o},t.rangeCheck=function(t,e,n){if(e>n)throw new xs("fromIndex("+e+") > toIndex("+n+")");if(e<0)throw new Gs(e);if(n>t)throw new Gs(n)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,n){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(n)}))},t.createInt32Array=function(t,e,n){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(n)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0},t.hashCode=function(t){var e,n;if(null===t)return 0;var r=1;try{for(var o=js(t),i=o.next();!i.done;i=o.next()){r=31*r+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r},t.fillUint8Array=function(t,e){for(var n=0;n!==t.length;n++)t[n]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var n=new Uint8Array(e);return n.set(t),n}return t.slice(0,e)},t.copyOfRange=function(t,e,n){var r=n-e,o=new Int32Array(r);return zs.arraycopy(t,e,o,0,r),o},t.binarySearch=function(e,n,r){void 0===r&&(r=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=r(n,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Xs=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var n=31;return 0!==(e=t<<16)&&(n-=16,t=e),0!==(e=t<<8)&&(n-=8,t=e),0!==(e=t<<4)&&(n-=4,t=e),0!==(e=t<<2)&&(n-=2,t=e),n-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ys=function(){function t(e,n){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==n?t.makeArray(e):n)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var n=t.makeArray(e);zs.arraycopy(this.bits,0,n,0,this.bits.length),this.bits=n}},t.prototype.get=function(t){return!!(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,r=Math.floor(t/32),o=n[r];o&=~((1<<(31&t))-1);for(var i=n.length;0===o;){if(++r===i)return e;o=n[r]}var a=32*r+Xs.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,r=Math.floor(t/32),o=~n[r];o&=~((1<<(31&t))-1);for(var i=n.length;0===o;){if(++r===i)return e;o=~n[r]}var a=32*r+Xs.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new xs;if(e!==t){e--;for(var n=Math.floor(t/32),r=Math.floor(e/32),o=this.bits,i=n;i<=r;i++){var a=(2<<(i<r?31:31&e))-(1<<(i>n?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,n=0;n<t;n++)e[n]=0},t.prototype.isRange=function(t,e,n){if(e<t||t<0||e>this.size)throw new xs;if(e===t)return!0;e--;for(var r=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=r;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>r?0:31&t))&4294967295;if((i[a]&s)!==(n?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new xs("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var n=e;n>0;n--)this.appendBit(1==(t>>n-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var n=0;n<e;n++)this.appendBit(t.get(n))},t.prototype.xor=function(t){if(this.size!==t.size)throw new xs("Sizes don't match");for(var e=this.bits,n=0,r=e.length;n<r;n++)e[n]^=t.bits[n]},t.prototype.toBytes=function(t,e,n,r){for(var o=0;o<r;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[n+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),n=e+1,r=this.bits,o=0;o<n;o++){var i=r[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*n){var a=32*n-this.size,s=t[0]>>>a;for(o=1;o<n;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[n-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.size===n.size&&Ws.equals(this.bits,n.bits)},t.prototype.hashCode=function(){return 31*this.size+Ws.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,n=this.size;e<n;e++)7&e||(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,n=this.size;e<n;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(Ss||(Ss={}));var qs,Zs=Ss,Ks=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ks(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(Rs),Qs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(qs||(qs={}));var Js,tu=function(){function t(e,n,r){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=r,this.values="number"==typeof n?Int32Array.from([n]):n,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(r,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=Qs(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new $s("incorect value");var n=t.VALUES_TO_ECI.get(e);if(void 0===n)throw new $s("incorect value");return n},t.getCharacterSetECIByName=function(e){var n=t.NAME_TO_ECI.get(e);if(void 0===n)throw new $s("incorect value");return n},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.getName()===n.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(qs.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(qs.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(qs.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(qs.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(qs.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(qs.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(qs.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(qs.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(qs.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(qs.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(qs.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(qs.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(qs.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(qs.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(qs.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(qs.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(qs.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(qs.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(qs.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(qs.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(qs.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(qs.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(qs.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(qs.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(qs.Big5,28,"Big5"),t.GB18030=new t(qs.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(qs.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),eu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eu(e,t),e.kind="UnsupportedOperationException",e}(Rs),ru=function(){function t(){}return t.decode=function(t,e){var n=this.encodingName(e);return this.customDecoder?this.customDecoder(t,n):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(n)?this.decodeFallback(t,n):new TextDecoder(n).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var n=this.encodingName(e);return this.customEncoder?this.customEncoder(t,n):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof tu?t:tu.getCharacterSetECIByName(t)},t.decodeFallback=function(e,n){var r=this.encodingCharacterSet(n);if(t.isDecodeFallbackSupported(r)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(r.equals(tu.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new nu("Encoding "+this.encodingName(n)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(tu.UTF8)||t.equals(tu.ISO8859_1)||t.equals(tu.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),n=[],r=0;r<e.length;r++)n.push(e[r].charCodeAt(0));return new Uint8Array(n)},t}(),ou=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var n=e?e.getName():this.ISO88591;return ru.decode(new Uint8Array([t]),n)},t.guessEncoding=function(e,n){if(null!=n&&void 0!==n.get(Zs.CHARACTER_SET))return n.get(Zs.CHARACTER_SET).toString();for(var r=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,w=0,v=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],y=0;y<r&&(o||i||a);y++){var _=255&e[y];a&&(s>0?128&_?s--:a=!1:128&_&&(64&_?(s++,32&_?(s++,16&_?(s++,8&_?a=!1:l++):c++):u++):a=!1)),o&&(_>127&&_<160?o=!1:_>159&&(_<192||215===_||247===_)&&w++),i&&(d>0?_<64||127===_||_>252?i=!1:d--:128===_||160===_||_>239?i=!1:_>160&&_<224?(h++,p=0,++f>g&&(g=f)):_>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(v||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*w>=r?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.getBytes=function(t,e){return ru.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=tu.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=tu.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=tu.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),iu=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=ou.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,n){for(var r=e;e<e+n;r++)this.append(t[r]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),au=function(){function t(t,e,n,r){if(this.width=t,this.height=e,this.rowSize=n,this.bits=r,null==e&&(e=t),this.height=e,t<1||e<1)throw new xs("Both dimensions must be greater than 0");null==n&&(n=Math.floor((t+31)/32)),this.rowSize=n,null==r&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var n=e.length,r=e[0].length,o=new t(r,n),i=0;i<n;i++)for(var a=e[i],s=0;s<r;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,n,r){if(null===e)throw new xs("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new xs("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+n.length)===n)c+=n.length,o[i]=!0,i++;else{if(e.substring(c,c+r.length)!==r)throw new xs("illegal character encountered: "+e.substring(c));c+=r.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new xs("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var n=e*this.rowSize+Math.floor(t/32);return!!(this.bits[n]>>>(31&t)&1)},t.prototype.set=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new xs("input matrix dimensions do not match");for(var e=new Ys(Math.floor(this.width/32)+1),n=this.rowSize,r=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*n,s=t.getRow(o,e).getBitArray(),u=0;u<n;u++)r[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,n=0;n<e;n++)t[n]=0},t.prototype.setRegion=function(t,e,n,r){if(e<0||t<0)throw new xs("Left and top must be nonnegative");if(r<1||n<1)throw new xs("Height and width must be at least 1");var o=t+n,i=e+r;if(i>this.height||o>this.width)throw new xs("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new Ys(this.width):e.clear();for(var n=this.rowSize,r=this.bits,o=t*n,i=0;i<n;i++)e.setBulk(32*i,r[o+i]);return e},t.prototype.setRow=function(t,e){zs.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),n=new Ys(t),r=new Ys(t),o=0,i=Math.floor((e+1)/2);o<i;o++)n=this.getRow(o,n),r=this.getRow(e-1-o,r),n.reverse(),r.reverse(),this.setRow(o,r),this.setRow(e-1-o,n)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,n=this.rowSize,r=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<n;c++){var l=r[u*n+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;!(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,n=0;n<e.length&&0===e[n];)n++;if(n===e.length)return null;for(var r=n/t,o=n%t*32,i=e[n],a=0;!(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,r])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,n=e.length-1;n>=0&&0===e[n];)n--;if(n<0)return null;for(var r=Math.floor(n/t),o=32*Math.floor(n%t),i=e[n],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,r])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.width===n.width&&this.height===n.height&&this.rowSize===n.rowSize&&Ws.equals(this.bits,n.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+Ws.hashCode(this.bits)},t.prototype.toString=function(t,e,n){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===n&&(n="\n"),this.buildToString(t,e,n)},t.prototype.buildToString=function(t,e,n){for(var r=new iu,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)r.append(this.get(a,o)?t:e);r.append(n)}return r.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),su=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return su(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(Rs),cu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lu=function(t){function e(n){var r=t.call(this,n)||this;return r.luminances=e.EMPTY,r.buckets=new Int32Array(e.LUMINANCE_BUCKETS),r}return cu(e,t),e.prototype.getBlackRow=function(t,n){var r=this.getLuminanceSource(),o=r.getWidth();null==n||n.getSize()<o?n=new Ys(o):n.clear(),this.initArrays(o);for(var i=r.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&n.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&n.set(s),c=l,l=d}}return n},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),n=t.getWidth(),r=t.getHeight(),o=new au(n,r);this.initArrays(n);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(r*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*n/5),l=Math.floor(n/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<r;a++){var f=a*n;for(l=0;l<n;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var n=this.buckets,r=0;r<e.LUMINANCE_BUCKETS;r++)n[r]=0},e.estimateBlackPoint=function(t){for(var n=t.length,r=0,o=0,i=0,a=0;a<n;a++)t[a]>i&&(o=a,i=t[a]),t[a]>r&&(r=t[a]);var s=0,u=0;for(a=0;a<n;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=n/16)throw new uu;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(r-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Ls),du=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hu=function(t){function e(e){var n=t.call(this,e)||this;return n.matrix=null,n}return du(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight();if(r>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=n.getMatrix(),a=r>>e.BLOCK_SIZE_POWER;r&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var u=e.calculateBlackPoints(i,a,s,r,o),c=new au(r,o);e.calculateThresholdForBlock(i,a,s,r,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,n,r,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<r;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,r-3),f=0;f<n;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,n-3),m=0,w=-2;w<=2;w++){var v=a[h+w];m+=v[g-2]+v[g-1]+v[g]+v[g+1]+v[g+2]}var y=m/25;e.thresholdBlock(t,p,d,y,o,s)}}},e.cap=function(t,e,n){return t<e?e:t>n?n:t},e.thresholdBlock=function(t,n,r,o,i,a){for(var s=0,u=r*i+n;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(n+c,r+s)},e.calculateBlackPoints=function(t,n,r,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(r),c=0;c<r;c++){u[c]=new Int32Array(n);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<n;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,w=l*o+h;m<e.BLOCK_SIZE;m++,w+=o){for(var v=0;v<e.BLOCK_SIZE;v++){var y=255&t[w+v];f+=y,y<p&&(p=y),y>g&&(g=y)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,w+=o;m<e.BLOCK_SIZE;m++,w+=o)for(v=0;v<e.BLOCK_SIZE;v++)f+=255&t[w+v]}var _=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(_=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(_=E)}u[c][d]=_}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(lu),fu=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,n,r){throw new nu("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new nu("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new nu("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new iu,n=0;n<this.height;n++){for(var r=this.getRow(n,t),o=0;o<this.width;o++){var i=255&r[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),pu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gu=function(t){function e(e){var n=t.call(this,e.getWidth(),e.getHeight())||this;return n.delegate=e,n}return pu(e,t),e.prototype.getRow=function(t,e){for(var n=this.delegate.getRow(t,e),r=this.getWidth(),o=0;o<r;o++)n[o]=255-(255&n[o]);return n},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),n=new Uint8ClampedArray(e),r=0;r<e;r++)n[r]=255-(255&t[r]);return n},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,n,r,o){return new e(this.delegate.crop(t,n,r,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(fu),mu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(t){function e(n,r){void 0===r&&(r=!1);var o=t.call(this,n.width,n.height)||this;return o.canvas=n,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(n,r),o}return mu(e,t),e.makeBufferFromCanvasImageData=function(t,n){void 0===n&&(n=!1);var r=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(r.data,t.width,t.height,n)},e.toGrayscaleBuffer=function(t,n,r,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(n*r);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new xs("Requested row is outside the image: "+t);var n=this.getWidth(),r=t*n;return null===e?e=this.buffer.slice(r,r+n):(e.length<n&&(e=new Uint8ClampedArray(n)),e.set(this.buffer.slice(r,r+n))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,n,r,o){return t.prototype.crop.call(this,e,n,r,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var n=this.getTempCanvasElement(),r=n.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return n.width=s,n.height=u,r.translate(s/2,u/2),r.rotate(o),r.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new gu(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(fu),vu=function(){function t(t,e,n){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),yu=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},_u=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Eu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bu=function(){function t(t,e,n){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return yu(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c,l,d;return _u(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(n=Eu(t),r=n.next();!r.done;r=n.next())o=r.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{r&&!r.done&&(d=n.return)&&d.call(n)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return yu(this,void 0,void 0,(function(){return _u(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new vu(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return yu(this,void 0,void 0,(function(){var e;return _u(this,(function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=n.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return yu(this,void 0,void 0,(function(){return _u(this,(function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return yu(this,void 0,void 0,(function(){var n;return _u(this,(function(r){switch(r.label){case 0:return this.reset(),n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return yu(this,void 0,void 0,(function(){var n;return _u(this,(function(r){switch(r.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=r.sent(),[4,this.decodeOnceFromStream(n,e)];case 2:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return yu(this,void 0,void 0,(function(){var n;return _u(this,(function(r){switch(r.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=r.sent(),[4,this.decodeOnce(n)];case 2:return[2,r.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,n){return yu(this,void 0,void 0,(function(){return _u(this,(function(r){switch(r.label){case 0:return[4,this.decodeFromVideoDevice(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,n){return yu(this,void 0,void 0,(function(){var r;return _u(this,(function(o){switch(o.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(r,e,n)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,n){return yu(this,void 0,void 0,(function(){var r;return _u(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=o.sent(),[4,this.decodeFromStream(r,e,n)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,n){return yu(this,void 0,void 0,(function(){var r;return _u(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=o.sent(),[4,this.decodeContinuously(r,n)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return yu(this,void 0,void 0,(function(){var n;return _u(this,(function(r){switch(r.label){case 0:return n=this.prepareVideoElement(e),this.addVideoSource(n,t),this.videoElement=n,this.stream=t,[4,this.playVideoOnLoadAsync(n)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(n,r){return e.playVideoOnLoad(t,(function(){return n()}))}))},t.prototype.playVideoOnLoad=function(t,e){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return yu(this,void 0,void 0,(function(){return _u(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var n=document.getElementById(t);if(!n)throw new ks("element with id '"+t+"' not found");if(n.nodeName.toLowerCase()!==e.toLowerCase())throw new ks("element with id '"+t+"' must be an "+e+" element");return n},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new ks("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new ks("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,n){if(void 0===t&&void 0===e)throw new ks("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,n):this.decodeFromVideoElementContinuously(t,n)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new ks("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var n=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(n,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new ks("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new ks("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var n=this._decodeOnLoadImage(e);return e.src=t,n},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new ks("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),n=this.decodeFromVideoElement(e);return e.src=t,n},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new ks("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),r=this.decodeFromVideoElementContinuously(n,e);return n.src=t,r},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(n,r){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(n,r)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return yu(this,void 0,void 0,(function(){return _u(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return yu(this,void 0,void 0,(function(){return _u(this,(function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return n.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,n){var r=this;void 0===e&&(e=!0),void 0===n&&(n=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(r._stopAsyncDecode)return a(new uu("Video stream has ended before any code could be detected.")),void(r._stopAsyncDecode=void 0);try{i(r.decode(t))}catch(t){if(e&&t instanceof uu||(t instanceof Fs||t instanceof $s)&&n)return setTimeout(o,r._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var n=this;this._stopContinuousDecode=!1;var r=function(){if(n._stopContinuousDecode)n._stopContinuousDecode=void 0;else try{var o=n.decode(t);e(o,null),setTimeout(r,n.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Fs||t instanceof $s||t instanceof uu)&&setTimeout(r,n._timeBetweenDecodingAttempts)}};r()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var n=this.getCaptureCanvas(t),r=new wu(n,e),o=new hu(r);return new Ps(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),n=void 0;try{n=e.getContext("2d",{willReadFrequently:!0})}catch(t){n=e.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,n){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===n&&(n=this.captureCanvasContext),n.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,n){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===n&&(n=this.captureCanvasContext),n.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,n,r=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),r.style.width=e+"px",r.style.height=n+"px",r.width=e,r.height=n,r},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(n){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),Cu=function(){function t(t,e,n,r,o,i){void 0===n&&(n=null==e?0:8*e.length),void 0===i&&(i=zs.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=n,this.resultPoints=r,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==n?null==e?0:8*e.length:n,this.resultPoints=r,this.format=o,this.resultMetadata=null,this.timestamp=null==i?zs.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var n=new Array(e.length+t.length);zs.arraycopy(e,0,n,0,e.length),zs.arraycopy(t,0,n,e.length,t.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(Js||(Js={}));var Au,Iu=Js;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(Au||(Au={}));var Su,Tu=Au,Du=function(){function t(t,e,n,r,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=n,this.ecLevel=r,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),Ou=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new xs;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),Ru=function(){function t(t,e){if(0===e.length)throw new xs;this.field=t;var n=e.length;if(n>1&&0===e[0]){for(var r=1;r<n&&0===e[r];)r++;r===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-r),zs.arraycopy(e,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,n=this.coefficients;if(1===t){e=0;for(var r=0,o=n.length;r!==o;r++){var i=n[r];e=Ou.addOrSubtract(e,i)}return e}e=n[0];var a=n.length,s=this.field;for(r=1;r<a;r++)e=Ou.addOrSubtract(s.multiply(t,e),n[r]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new xs("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var n=this.coefficients,r=e.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;zs.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=Ou.addOrSubtract(n[s-a],r[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new xs("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var n=this.coefficients,r=n.length,o=e.coefficients,i=o.length,a=new Int32Array(r+i-1),s=this.field,u=0;u<r;u++)for(var c=n[u],l=0;l<i;l++)a[u+l]=Ou.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var n=this.coefficients.length,r=this.field,o=new Int32Array(n),i=this.coefficients,a=0;a<n;a++)o[a]=r.multiply(i[a],e);return new t(r,o)},t.prototype.multiplyByMonomial=function(e,n){if(e<0)throw new xs;if(0===n)return this.field.getZero();for(var r=this.coefficients,o=r.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(r[s],n);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new xs("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new xs("Divide by 0");for(var e=this.field,n=e.getZero(),r=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);r.getDegree()>=t.getDegree()&&!r.isZero();){var a=r.getDegree()-t.getDegree(),s=e.multiply(r.getCoefficient(r.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);n=n.addOrSubtract(c),r=r.addOrSubtract(u)}return[n,r]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var n=this.getCoefficient(e);if(0!==n){if(n<0?(t+=" - ",n=-n):t.length>0&&(t+=" + "),0===e||1!==n){var r=this.field.log(n);0===r?t+="1":1===r?t+="a":(t+="a^",t+=r)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Mu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ku=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mu(e,t),e.kind="ArithmeticException",e}(Rs),Nu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xu=function(t){function e(e,n,r){var o=t.call(this)||this;o.primitive=e,o.size=n,o.generatorBase=r;for(var i=new Int32Array(n),a=1,s=0;s<n;s++)i[s]=a,(a*=2)>=n&&(a^=e,a&=n-1);o.expTable=i;var u=new Int32Array(n);for(s=0;s<n-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new Ru(o,Int32Array.from([0])),o.one=new Ru(o,Int32Array.from([1])),o}return Nu(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new xs;if(0===e)return this.zero;var n=new Int32Array(t+1);return n[0]=e,new Ru(this,n)},e.prototype.inverse=function(t){if(0===t)throw new ku;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Xs.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(Ou),Pu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Pu(e,t),e.kind="ReedSolomonException",e}(Rs),Fu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fu(e,t),e.kind="IllegalStateException",e}(Rs),zu=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var n=this.field,r=new Ru(n,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=r.evaluateAt(n.exp(a+n.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new Ru(n,o),c=this.runEuclideanAlgorithm(n.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-n.log(h[a]);if(p<0)throw new Bu("Bad error location");t[p]=xu.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,n){if(t.getDegree()<e.getDegree()){var r=t;t=e,e=r}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(n/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Bu("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new Lu("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Bu("sigmaTilde(0) was zero");var w=o.inverse(m);return[u.multiplyScalar(w),a.multiplyScalar(w)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var n=new Int32Array(e),r=0,o=this.field,i=1;i<o.getSize()&&r<e;i++)0===t.evaluateAt(i)&&(n[r]=o.inverse(i),r++);if(r!==e)throw new Bu("Error locator degree does not match number of roots");return n},t.prototype.findErrorMagnitudes=function(t,e){for(var n=e.length,r=new Int32Array(n),o=this.field,i=0;i<n;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<n;u++)if(i!==u){var c=o.multiply(e[u],a),l=1&c?-2&c:1|c;s=o.multiply(s,l)}r[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(r[i]=o.multiply(r[i],a))}return r},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(Su||(Su={}));var Uu=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var n=e.getBits(),r=this.extractBits(n),o=this.correctBits(r),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Du(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var n=e.length,r=Su.UPPER,o=Su.UPPER,i="",a=0;a<n;)if(o===Su.BINARY){if(n-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(n-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(n-a<8){a=n;break}var c=t.readCode(e,a,8);i+=ou.castAsNonUtf8Char(c),a+=8}o=r}else{var l=o===Su.DIGIT?4:5;if(n-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(r=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(r=o)):(i+=d,o=r)}return i},t.getTable=function(t){switch(t){case"L":return Su.LOWER;case"P":return Su.PUNCT;case"M":return Su.MIXED;case"D":return Su.DIGIT;case"B":return Su.BINARY;default:return Su.UPPER}},t.getCharacter=function(e,n){switch(e){case Su.UPPER:return t.UPPER_TABLE[n];case Su.LOWER:return t.LOWER_TABLE[n];case Su.MIXED:return t.MIXED_TABLE[n];case Su.PUNCT:return t.PUNCT_TABLE[n];case Su.DIGIT:return t.DIGIT_TABLE[n];default:throw new Lu("Bad table")}},t.prototype.correctBits=function(e){var n,r;this.ddata.getNbLayers()<=2?(r=6,n=xu.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(r=8,n=xu.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(r=10,n=xu.AZTEC_DATA_10):(r=12,n=xu.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/r;if(i<o)throw new $s;for(var a=e.length%r,s=new Int32Array(i),u=0;u<i;u++,a+=r)s[u]=t.readCode(e,a,r);try{new zu(n).decode(s,i-o)}catch(t){throw new $s(t)}var c=(1<<r)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new $s;1!==f&&f!==c-1||l++}var d=new Array(o*r-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+r-1),h+=r-1;else for(var p=r-1;p>=0;--p)d[h++]=!!(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),n=this.ddata.getNbLayers(),r=(e?11:14)+4*n,o=new Int32Array(r),i=new Array(this.totalBitsInLayer(n,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=r+1+2*Xs.truncDivision(Xs.truncDivision(r,2)-1,15),u=r/2,c=Xs.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Xs.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<n;a++){for(var h=4*(n-a)+(e?9:12),f=2*a,p=r-1-f,g=0;g<h;g++)for(var m=2*g,w=0;w<2;w++)i[d+m+w]=t.get(o[f+w],o[f+g]),i[d+2*h+m+w]=t.get(o[f+g],o[p-w]),i[d+4*h+m+w]=t.get(o[p-w],o[p-g]),i[d+6*h+m+w]=t.get(o[p-g],o[f+w]);d+=8*h}return i},t.readCode=function(t,e,n){for(var r=0,o=e;o<e+n;o++)r<<=1,t[o]&&(r|=1);return r},t.readByte=function(e,n){var r=e.length-n;return r>=8?t.readCode(e,n,8):t.readCode(e,n,r)<<8-r},t.convertBoolArrayToByteArray=function(e){for(var n=new Uint8Array((e.length+7)/8),r=0;r<n.length;r++)n[r]=t.readByte(e,8*r);return n},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Vu=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,n,r){var o=t-n,i=e-r;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,n=0,r=t.length;n!==r;n++){e+=t[n]}return e},t}(),Hu=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Gu=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var n=e;return this.x===n.x&&this.y===n.y}return!1},t.prototype.hashCode=function(){return 31*Hu.floatToIntBits(this.x)+Hu.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,n,r,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(n=t[0],e=t[1],r=t[2]):a>=i&&a>=o?(n=t[1],e=t[0],r=t[2]):(n=t[2],e=t[0],r=t[1]),this.crossProductZ(e,n,r)<0){var s=e;e=r,r=s}t[0]=e,t[1]=n,t[2]=r},t.distance=function(t,e){return Vu.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,n){var r=e.x,o=e.y;return(n.x-r)*(t.y-o)-(n.y-o)*(t.x-r)},t}(),ju=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Wu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xu=function(t){function e(e,n,r,o,i){var a=t.call(this,e,n)||this;return a.compact=r,a.nbDatablocks=o,a.nbLayers=i,a}return Wu(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(ju),Yu=function(){function t(e,n,r,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==n&&(n=t.INIT_SIZE),null==r&&(r=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=n/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new uu}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,n=this.upInit,r=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(n,r,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&r<h;)(p=this.containsBlackPoint(t,e,r,!0))?(r++,i=!0,u=!0):u||r++;if(r>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(n,r,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&n>=0;)(m=this.containsBlackPoint(t,e,n,!0))?(n--,i=!0,l=!0):l||n--;if(n<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var w=e-t,v=null,y=1;null===v&&y<w;y++)v=this.getBlackPointOnSegment(t,r-y,t+y,r);if(null==v)throw new uu;var _=null;for(y=1;null===_&&y<w;y++)_=this.getBlackPointOnSegment(t,n+y,t+y,n);if(null==_)throw new uu;var E=null;for(y=1;null===E&&y<w;y++)E=this.getBlackPointOnSegment(e,n+y,e-y,n);if(null==E)throw new uu;var b=null;for(y=1;null===b&&y<w;y++)b=this.getBlackPointOnSegment(e,r-y,e-y,r);if(null==b)throw new uu;return this.centerEdges(b,v,E,_)}throw new uu},t.prototype.getBlackPointOnSegment=function(t,e,n,r){for(var o=Vu.round(Vu.distance(t,e,n,r)),i=(n-t)/o,a=(r-e)/o,s=this.image,u=0;u<o;u++){var c=Vu.round(t+u*i),l=Vu.round(e+u*a);if(s.get(c,l))return new Gu(c,l)}return null},t.prototype.centerEdges=function(e,n,r,o){var i=e.getX(),a=e.getY(),s=n.getX(),u=n.getY(),c=r.getX(),l=r.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new Gu(d-f,h+f),new Gu(s+f,u+f),new Gu(c-f,l-f),new Gu(i+f,a-f)]:[new Gu(d+f,h+f),new Gu(s+f,u-f),new Gu(c-f,l+f),new Gu(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,n,r){var o=this.image;if(r){for(var i=t;i<=e;i++)if(o.get(i,n))return!0}else for(var a=t;a<=e;a++)if(o.get(n,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),qu=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var n=t.getWidth(),r=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>n||s<-1||s>r)throw new uu;o=!1,-1===a?(e[i]=0,o=!0):a===n&&(e[i]=n-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===r&&(e[i+1]=r-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>n||s<-1||s>r)throw new uu;o=!1,-1===a?(e[i]=0,o=!0):a===n&&(e[i]=n-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===r&&(e[i+1]=r-1,o=!0)}},t}(),Zu=function(){function t(t,e,n,r,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=n,this.a12=r,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,n,r,o,i,a,s,u,c,l,d,h,f,p,g,m){var w=t.quadrilateralToSquare(e,n,r,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(w)},t.prototype.transformPoints=function(t){for(var e=t.length,n=this.a11,r=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(n*h+i*f+u)/p,t[d+1]=(r*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var n=this.a11,r=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(n*f+i*p+u)/g,e[h]=(r*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,n,r,o,i,a,s,u){var c=e-r+i-s,l=n-o+a-u;if(0===c&&0===l)return new t(r-e,i-r,e,o-n,a-o,n,0,0,1);var d=r-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,w=(d*l-c*f)/g;return new t(r-e+m*r,s-e+w*s,e,o-n+m*o,u-n+w*u,n,m,w,1)},t.quadrilateralToSquare=function(e,n,r,o,i,a,s,u){return t.squareToQuadrilateral(e,n,r,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),Ku=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ku(e,t),e.prototype.sampleGrid=function(t,e,n,r,o,i,a,s,u,c,l,d,h,f,p,g,m,w,v){var y=Zu.quadrilateralToQuadrilateral(r,o,i,a,s,u,c,l,d,h,f,p,g,m,w,v);return this.sampleGridWithTransform(t,e,n,y)},e.prototype.sampleGridWithTransform=function(t,e,n,r){if(e<=0||n<=0)throw new uu;for(var o=new au(e,n),i=new Float32Array(2*e),a=0;a<n;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;r.transformPoints(i),qu.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new uu}}return o},e}(qu),Qu=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new $u,t}(),Ju=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new Gu(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),tc=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),n=this.getBullsEyeCorners(e);if(t){var r=n[0];n[0]=n[2],n[2]=r}this.extractParameters(n);var o=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),i=this.getMatrixCornerPoints(n);return new Xu(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new uu;var e=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(n,e);for(var r=0,o=0;o<4;o++){var i=n[(this.shift+o)%4];this.compact?(r<<=7,r+=i>>1&127):(r<<=10,r+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(r,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var n=0;t.forEach((function(t,r,o){n=(n<<3)+((t>>e-2<<1)+(1&t))})),n=((1&n)<<11)+(n>>1);for(var r=0;r<4;r++)if(Xs.bitCount(n^this.EXPECTED_CORNER_BITS[r])<=2)return r;throw new uu},t.prototype.getCorrectedParameterData=function(t,e){var n,r;e?(n=7,r=2):(n=10,r=4);for(var o=n-r,i=new Int32Array(n),a=n-1;a>=0;--a)i[a]=15&t,t>>=4;try{new zu(xu.AZTEC_PARAM).decode(i,o)}catch(t){throw new uu}var s=0;for(a=0;a<r;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,n=t,r=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(n,i,1,1),u=this.getFirstDifferent(r,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,n=s,r=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new uu;this.compact=5===this.nbCenterLayers;var d=new Gu(e.getX()+.5,e.getY()-.5),h=new Gu(n.getX()+.5,n.getY()+.5),f=new Gu(r.getX()-.5,r.getY()+.5),p=new Gu(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,n,r;try{t=(u=new Yu(this.image).detect())[0],e=u[1],n=u[2],r=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new Ju(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Ju(o+7,i+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Ju(o-7,i+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Ju(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Vu.round((t.getX()+r.getX()+e.getX()+n.getX())/4),s=Vu.round((t.getY()+r.getY()+e.getY()+n.getY())/4);try{var u;t=(u=new Yu(this.image,15,a,s).detect())[0],e=u[1],n=u[2],r=u[3]}catch(o){t=this.getFirstDifferent(new Ju(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new Ju(a+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Ju(a-7,s+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Ju(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Vu.round((t.getX()+r.getX()+e.getX()+n.getX())/4),s=Vu.round((t.getY()+r.getY()+e.getY()+n.getY())/4),new Ju(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,n,r,o){var i=Qu.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),n.getX(),n.getY(),r.getX(),r.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,n){for(var r=0,o=this.distanceResultPoint(t,e),i=o/n,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<n;l++)this.image.get(Vu.round(a+l*u),Vu.round(s+l*c))&&(r|=1<<n-l-1);return r},t.prototype.isWhiteOrBlackRectangle=function(t,e,n,r){t=new Ju(t.getX()-3,t.getY()+3),e=new Ju(e.getX()-3,e.getY()-3),n=new Ju(n.getX()+3,n.getY()-3),r=new Ju(r.getX()+3,r.getY()+3);var o=this.getColor(r,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,n))===o&&(i=this.getColor(n,r))===o)},t.prototype.getColor=function(t,e){for(var n=this.distancePoint(t,e),r=(e.getX()-t.getX())/n,o=(e.getY()-t.getY())/n,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(n),l=0;l<c;l++)a+=r,s+=o,this.image.get(Vu.round(a),Vu.round(s))!==u&&i++;var d=i/n;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,n,r){for(var o=t.getX()+n,i=t.getY()+r;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=n,i+=r;for(o-=n,i-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=n;for(o-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=r;return new Ju(o,i-=r)},t.prototype.expandSquare=function(t,e,n){var r=n/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new Gu(a+r*o,s+r*i),c=new Gu(a-r*o,s-r*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new Gu(a+r*o,s+r*i),c,new Gu(a-r*o,s-r*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Vu.round(t.getX()),n=Vu.round(t.getY());return this.isValid(e,n)},t.prototype.distancePoint=function(t,e){return Vu.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Vu.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Xs.truncDivision(this.nbLayers-4,8)+1)+15},t}(),ec=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var n=null,r=new tc(t.getBlackMatrix()),o=null,i=null;try{o=(a=r.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Uu).decode(a)}catch(t){n=t}if(null==i)try{var a;o=(a=r.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Uu).decode(a)}catch(t){if(null!=n)throw n;throw t}var s=new Cu(i.getText(),i.getRawBytes(),i.getNumBits(),o,Iu.AZTEC,zs.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(Tu.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(Tu.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var n=t.get(Zs.NEED_RESULT_POINT_CALLBACK);null!=n&&e.forEach((function(t,e,r){n.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),nc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new ec,e)||this}nc(e,t)}(bu);var rc=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(Zs.TRY_HARDER)&&t.isRotateSupported()){var n=t.rotateCounterClockwise(),r=this.doDecode(n,e),o=r.getResultMetadata(),i=270;null!==o&&!0===o.get(Tu.ORIENTATION)&&(i+=o.get(Tu.ORIENTATION)%360),r.putMetadata(Tu.ORIENTATION,i);var a=r.getResultPoints();if(null!==a)for(var s=n.getHeight(),u=0;u<a.length;u++)a[u]=new Gu(s-a[u].getY()-1,a[u].getX());return r}throw new uu}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var n,r=t.getWidth(),o=t.getHeight(),i=new Ys(r),a=e&&!0===e.get(Zs.TRY_HARDER),s=Math.max(1,o>>(a?8:5));n=a?o:15;for(var u=Math.trunc(o/2),c=0;c<n;c++){var l=Math.trunc((c+1)/2),d=u+s*(!(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(Zs.NEED_RESULT_POINT_CALLBACK))){var n=new Map;e.forEach((function(t,e){return n.set(e,t)})),n.delete(Zs.NEED_RESULT_POINT_CALLBACK),e=n}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(Tu.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new Gu(r-a[0].getX()-1,a[0].getY()),a[1]=new Gu(r-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new uu},t.recordPattern=function(t,e,n){for(var r=n.length,o=0;o<r;o++)n[o]=0;var i=t.getSize();if(e>=i)throw new uu;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)n[s]++;else{if(++s===r)break;n[s]=1,a=!a}u++}if(s!==r&&(s!==r-1||u!==i))throw new uu},t.recordPatternInReverse=function(e,n,r){for(var o=r.length,i=e.get(n);n>0&&o>=0;)e.get(--n)!==i&&(o--,i=!i);if(o>=0)throw new uu;t.recordPattern(e,n+1,r)},t.patternMatchVariance=function(t,e,n){for(var r=t.length,o=0,i=0,a=0;a<r;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;n*=s;for(var u=0,c=0;c<r;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>n)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),oc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ic=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oc(e,t),e.findStartPattern=function(t){for(var n=t.getSize(),r=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=r,s=!1,u=r;u<n;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=rc.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new uu},e.decodeCode=function(t,n,r){rc.recordPattern(t,r,n);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(n,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new uu},e.prototype.decodeRow=function(t,n,r){var o,i=r&&!0===r.get(Zs.ASSUME_GS1),a=e.findStartPattern(n),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new $s}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,w=0,v=s,y=0,_=!0,E=!1,b=!1;!l;){var C=d;switch(d=!1,m=w,w=e.decodeCode(n,g,p),c[u++]=w,w!==e.CODE_STOP&&(_=!0),w!==e.CODE_STOP&&(v+=++y*w),f=p,p+=g.reduce((function(t,e){return t+e}),0),w){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new $s}switch(o){case e.CODE_CODE_A:if(w<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else if(w<96)h+=b===E?String.fromCharCode(w-64):String.fromCharCode(w+64),b=!1;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(w<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(w<100)w<10&&(h+="0"),h+=w;else switch(w!==e.CODE_STOP&&(_=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}C&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var A=p-f;if(p=n.getNextUnset(p),!n.isRange(p,Math.min(n.getSize(),p+(p-f)/2),!1))throw new uu;if((v-=y*m)%103!==m)throw new Fs;var I=h.length;if(0===I)throw new uu;I>0&&_&&(h=o===e.CODE_CODE_C?h.substring(0,I-2):h.substring(0,I-1));for(var S=(a[1]+a[0])/2,T=f+A/2,D=c.length,O=new Uint8Array(D),R=0;R<D;R++)O[R]=c[R];var M=[new Gu(S,t),new Gu(T,t)];return new Cu(h,O,0,M,Iu.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(rc),ac=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uc=function(t){function e(e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=t.call(this)||this;return r.usingCheckDigit=e,r.extendedMode=n,r.decodeRowResult="",r.counters=new Int32Array(9),r}return ac(e,t),e.prototype.decodeRow=function(t,n,r){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(n,u),h=n.getNextSet(d[1]),f=n.getSize();do{e.recordPattern(n,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new uu;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,sc(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=n.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w,v=0;try{for(var y=sc(u),_=y.next();!_.done;_=y.next()){v+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-v)<v)throw new uu;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,C=0;C<E;C++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(C));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Fs;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new uu;w=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var A=(d[1]+d[0])/2,I=l+v/2;return new Cu(w,null,0,[new Gu(A,t),new Gu(I,t)],Iu.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,n){for(var r=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=n.length,c=o;c<r;c++)if(t.get(c)!==s)n[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=n[0]+n[1],n.copyWithin(0,2,2+i-1),n[i-1]=0,n[i]=0,i--}else i++;n[i]=1,s=!s}throw new uu},e.toNarrowWidePattern=function(t){var e,n,r,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,sc(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}i=a,r=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,r++,c+=h)}if(3===r){for(d=0;d<o&&r>0;d++){var h;if((h=t[d])>i&&(r--,2*h>=c))return-1}return l}}while(r>3);return-1},e.patternToChar=function(t){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===t)return e.ALPHABET_STRING.charAt(n);if(t===e.ASTERISK_ENCODING)return"*";throw new uu},e.decodeExtended=function(t){for(var e=t.length,n="",r=0;r<e;r++){var o=t.charAt(r);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(r+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new $s;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new $s;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new $s;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new $s;a=":"}}n+=a,r++}else n+=o}return n},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(rc),cc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dc=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return cc(e,t),e.prototype.decodeRow=function(t,n,r){var o,i,a,s,u,c,l=this.findAsteriskPattern(n),d=n.getNextSet(l[1]),h=n.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(n,d,f);var p=this.toPattern(f);if(p<0)throw new uu;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,lc(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=n.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w=0;try{for(var v=lc(f),y=v.next();!y.done;y=v.next()){w+=y.value}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(d===h||!n.get(d))throw new uu;if(this.decodeRowResult.length<2)throw new uu;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var _=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+w/2;return new Cu(_,null,0,[new Gu(E,t),new Gu(b,t)],Iu.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var n=t.getSize(),r=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=r,a=!1,s=o.length,u=0,c=r;c<n;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new uu},e.prototype.toPattern=function(t){var e,n,r=0;try{for(var o=lc(t),i=o.next();!i.done;i=o.next()){r+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/r);if(c<1||c>4)return-1;if(1&u)a<<=c;else for(var l=0;l<c;l++)a=a<<1|1}return a},e.prototype.patternToChar=function(t){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===t)return e.ALPHABET_STRING.charAt(n);throw new uu},e.prototype.decodeExtended=function(t){for(var e=t.length,n="",r=0;r<e;r++){var o=t.charAt(r);if(o>="a"&&o<="d"){if(r>=e-1)throw new $s;var i=t.charAt(r+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new $s;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new $s;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new $s;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new $s;a=":"}}n+=a,r++}else n+=o}return n},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,n,r){for(var o=1,i=0,a=n-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>r&&(o=1);if(t.charAt(n)!==e.ALPHABET_STRING[i%47])throw new Fs},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(rc),hc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return hc(e,t),e.prototype.decodeRow=function(t,n,r){var o,i,a=this.decodeStart(n),s=this.decodeEnd(n),u=new iu;e.decodeMiddle(n,a[1],s[0],u);var c=u.toString(),l=null;null!=r&&(l=r.get(Zs.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=fc(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new $s;var w=[new Gu(a[1],t),new Gu(s[0],t)];return new Cu(c,null,0,w,Iu.ITF,(new Date).getTime())},e.decodeMiddle=function(t,n,r,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);n<r;){rc.recordPattern(t,n,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){n+=t}))}},e.prototype.decodeStart=function(t){var n=e.skipWhiteSpace(t),r=e.findGuardPattern(t,n,e.START_PATTERN);return this.narrowLineWidth=(r[1]-r[0])/4,this.validateQuietZone(t,r[0]),r},e.prototype.validateQuietZone=function(t,e){var n=10*this.narrowLineWidth;n=n<e?n:e;for(var r=e-1;n>0&&r>=0&&!t.get(r);r--)n--;if(0!==n)throw new uu},e.skipWhiteSpace=function(t){var e=t.getSize(),n=t.getNextSet(0);if(n===e)throw new uu;return n},e.prototype.decodeEnd=function(t){t.reverse();try{var n=e.skipWhiteSpace(t),r=void 0;try{r=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof uu&&(r=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,r[0]);var o=r[0];return r[0]=t.getSize()-r[1],r[1]=t.getSize()-o,r}finally{t.reverse()}},e.findGuardPattern=function(t,n,r){var o=r.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=n;i.fill(0);for(var l=n;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(rc.patternMatchVariance(i,r,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],zs.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new uu},e.decodeDigit=function(t){for(var n=e.MAX_AVG_VARIANCE,r=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=rc.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<n?(n=s,r=i):s===n&&(r=-1)}if(r>=0)return r%10;throw new uu},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(rc),gc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return gc(e,t),e.findStartGuardPattern=function(t){for(var n,r=!1,o=0,i=Int32Array.from([0,0,0]);!r;){i=Int32Array.from([0,0,0]);var a=(n=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=n[1])-a);s>=0&&(r=t.isRange(s,a,!1))}return n},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var n=t.length;if(0===n)return!1;var r=parseInt(t.charAt(n-1),10);return e.getStandardUPCEANChecksum(t.substring(0,n-1))===r},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,n=0,r=e-1;r>=0;r-=2){if((o=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new $s;n+=o}n*=3;for(r=e-2;r>=0;r-=2){var o;if((o=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new $s;n+=o}return(1e3-n)%10},e.decodeEnd=function(t,n){return e.findGuardPattern(t,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,n,r){return this.findGuardPattern(t,e,n,r,new Int32Array(r.length))},e.findGuardPattern=function(t,n,r,o,i){for(var a=t.getSize(),s=0,u=n=r?t.getNextUnset(n):t.getNextSet(n),c=o.length,l=r,d=n;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(rc.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new uu},e.decodeDigit=function(t,n,r,o){this.recordPattern(t,r,n);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=rc.patternMatchVariance(n,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new uu},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(rc),wc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vc=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Gu((r[0]+r[1])/2,e),new Gu(i,e)],c=new Cu(a,null,0,u,Iu.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,n,r){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=n[1],c=0,l=0;l<5&&u<s;l++){var d=mc.decodeDigit(e,a,u,mc.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,wc(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==r.length)throw new uu;var p=this.determineCheckDigit(c);if(t.extensionChecksum(r.toString())!==p)throw new uu;return u},t.extensionChecksum=function(t){for(var e=t.length,n=0,r=e-2;r>=0;r-=2)n+=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0);n*=3;for(r=e-1;r>=0;r-=2)n+=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0);return(n*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new uu},t.parseExtensionString=function(e){if(5!==e.length)return null;var n=t.parseExtension5String(e);return null==n?null:new Map([[Tu.SUGGESTED_PRICE,n]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var n=parseInt(t.substring(1)),r=n%100;return e+(n/100).toString()+"."+(r<10?"0"+r:r.toString())},t}(),yc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Gu((r[0]+r[1])/2,e),new Gu(i,e)],c=new Cu(a,null,0,u,Iu.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,n){var r,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=mc.decodeDigit(t,i,s,mc.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(r=void 0,yc(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){r={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==n.length)throw new uu;if(parseInt(n.toString())%4!==u)throw new uu;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[Tu.ISSUE_NUMBER,parseInt(t)]])},t}(),Ec=function(){function t(){}return t.decodeRow=function(t,e,n){var r=mc.findGuardPattern(e,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new vc).decodeRow(t,e,r)}catch(n){return(new _c).decodeRow(t,e,r)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),bc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cc=function(t){function e(){var n=t.call(this)||this;n.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var r=10;r<20;r++){for(var o=e.L_PATTERNS[r-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[r]=i}return n}return bc(e,t),e.prototype.decodeRow=function(t,n,r){var o=e.findStartGuardPattern(n),i=null==r?null:r.get(Zs.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new Gu((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(n,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new Gu(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(n,u);if(null!=i){var h=new Gu((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=n.getSize()||!n.isRange(f,p,!1))throw new uu;var g=c.toString();if(g.length<8)throw new $s;if(!e.checkChecksum(g))throw new Fs;var m=(o[1]+o[0])/2,w=(d[1]+d[0])/2,v=this.getBarcodeFormat(),y=[new Gu(m,t),new Gu(w,t)],_=new Cu(g,null,0,y,v,(new Date).getTime()),E=0;try{var b=Ec.decodeRow(t,n,d[1]);_.putMetadata(Tu.UPC_EAN_EXTENSION,b.getText()),_.putAllMetadata(b.getResultMetadata()),_.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var C=null==r?null:r.get(Zs.ALLOWED_EAN_EXTENSIONS);if(null!=C){var A=!1;for(var I in C)if(E.toString()===I){A=!0;break}if(!A)throw new uu}return v===Iu.EAN_13||Iu.UPC_A,_},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var n=t.length;if(0===n)return!1;var r=parseInt(t.charAt(n-1),10);return e.getStandardUPCEANChecksum(t.substring(0,n-1))===r},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,n=0,r=e-1;r>=0;r-=2){if((o=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new $s;n+=o}n*=3;for(r=e-2;r>=0;r-=2){var o;if((o=t.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new $s;n+=o}return(1e3-n)%10},e.decodeEnd=function(t,n){return e.findGuardPattern(t,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(mc),Ac=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ic=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Ac(e,t),e.prototype.decodeMiddle=function(t,n,r){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=n[1],d=0,h=0;h<6&&l<c;h++){var f=Cc.decodeDigit(t,u,l,Cc.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,Ic(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}r=e.determineFirstDigit(r,d),l=Cc.findGuardPattern(t,l,!0,Cc.MIDDLE_PATTERN,new Int32Array(Cc.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=Cc.decodeDigit(t,u,l,Cc.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,Ic(u)),w=m.next();!w.done;w=m.next()){l+=w.value}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:r}},e.prototype.getBarcodeFormat=function(){return Iu.EAN_13},e.determineFirstDigit=function(t,e){for(var n=0;n<10;n++)if(e===this.FIRST_DIGIT_ENCODINGS[n])return t=String.fromCharCode("0".charCodeAt(0)+n)+t;throw new uu},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(Cc),Tc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Tc(e,t),e.prototype.decodeMiddle=function(t,e,n){var r,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=Cc.decodeDigit(t,s,c,Cc.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(r=void 0,Dc(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}c=Cc.findGuardPattern(t,c,!0,Cc.MIDDLE_PATTERN,new Int32Array(Cc.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=Cc.decodeDigit(t,s,c,Cc.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,Dc(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:n}},e.prototype.getBarcodeFormat=function(){return Iu.EAN_8},e}(Cc),Rc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new Sc,e}return Rc(e,t),e.prototype.getBarcodeFormat=function(){return Iu.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,n){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,n))},e.prototype.decodeMiddle=function(t,e,n){return this.ean13Reader.decodeMiddle(t,e,n)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var n=new Cu(e.substring(1),null,null,t.getResultPoints(),Iu.UPC_A);return null!=t.getResultMetadata()&&n.putAllMetadata(t.getResultMetadata()),n}throw new uu},e.prototype.reset=function(){this.ean13Reader.reset()},e}(Cc),kc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xc=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return kc(e,t),e.prototype.decodeMiddle=function(t,n,r){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=n[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,Nc(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new iu(r),c),u},e.prototype.decodeEnd=function(t,n){return e.findGuardPatternWithoutCounters(t,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return Cc.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var n=0;n<=1;n++)for(var r=0;r<10;r++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[n][r])return t.insert(0,"0"+n),void t.append("0"+r);throw uu.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Iu.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),n=new iu;n.append(t.charAt(0));var r=e[5];switch(r){case 0:case 1:case 2:n.appendChars(e,0,2),n.append(r),n.append("0000"),n.appendChars(e,2,3);break;case 3:n.appendChars(e,0,3),n.append("00000"),n.appendChars(e,3,2);break;case 4:n.appendChars(e,0,4),n.append("00000"),n.append(e[4]);break;default:n.appendChars(e,0,5),n.append("0000"),n.append(r)}return t.length>=8&&n.append(t.charAt(7)),n.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(Cc),Pc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fc=function(t){function e(e){var n=t.call(this)||this,r=null==e?null:e.get(Zs.POSSIBLE_FORMATS),o=[];return null!=r&&(r.indexOf(Iu.EAN_13)>-1&&o.push(new Sc),r.indexOf(Iu.UPC_A)>-1&&o.push(new Mc),r.indexOf(Iu.EAN_8)>-1&&o.push(new Oc),r.indexOf(Iu.UPC_E)>-1&&o.push(new xc)),0===o.length&&(o.push(new Sc),o.push(new Mc),o.push(new Oc),o.push(new xc)),n.readers=o,n}return Pc(e,t),e.prototype.decodeRow=function(t,e,n){var r,o;try{for(var i=Bc(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,n),c=u.getBarcodeFormat()===Iu.EAN_13&&"0"===u.getText().charAt(0),l=null==n?null:n.get(Zs.POSSIBLE_FORMATS),d=null==l||l.includes(Iu.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new Cu(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),Iu.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}throw new uu},e.prototype.reset=function(){var t,e;try{for(var n=Bc(this.readers),r=n.next();!r.done;r=n.next()){r.value.reset()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e}(rc),Lc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return Lc(e,t),e.prototype.decodeRow=function(t,e,n){var r=this.getValidRowData(e);if(!r)throw new uu;var o=this.codaBarDecodeRow(r.row);if(!o)throw new uu;return new Cu(o,null,0,[new Gu(r.left,t),new Gu(r.right,t)],Iu.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),n=e.indexOf(!0);if(-1===n)return null;var r=e.lastIndexOf(!0);if(r<=n)return null;for(var o=[],i=(e=e.slice(n,r+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:n,right:r}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],n=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var r=t.splice(0,8).splice(0,7).map((function(t){return t<n?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[r])return null;e.push(this.CODA_BAR_CHAR_SET[r])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(rc),Uc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hc=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Uc(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,n){for(var r=0;r<n.length;r++)if(rc.patternMatchVariance(t,n[r],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return r;throw new uu},e.count=function(t){return Vu.sum(new Int32Array(t))},e.increment=function(t,e){for(var n=0,r=e[0],o=1;o<t.length;o++)e[o]>r&&(r=e[o],n=o);t[n]++},e.decrement=function(t,e){for(var n=0,r=e[0],o=1;o<t.length;o++)e[o]<r&&(r=e[o],n=o);t[n]--},e.isFinderPattern=function(t){var n,r,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Vc(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(rc),Gc=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.value===n.value&&this.checksumPortion===n.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),jc=function(){function t(t,e,n,r,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new Gu(n,o)),this.resultPoints.push(new Gu(r,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.value===n.value},t.prototype.hashCode=function(){return this.value},t}(),Wc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xc=function(){function t(){}return t.getRSSvalue=function(e,n,r){var o,i,a=0;try{for(var s=Wc(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(r&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>n;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>n&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var n,r;t-e>e?(r=e,n=t-e):(r=t-e,n=e);for(var o=1,i=1,a=t;a>n;a--)o*=a,i<=r&&(o/=i,i++);for(;i<=r;)o/=i,i++;return o},t}(),Yc=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var n=new Ys(12*e),r=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)o&1<<i&&n.set(r),r++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)s&1<<u&&n.set(r),r++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)c&1<<u&&n.set(r),r++}}return n},t}(),qc=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Zc=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),Kc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return Kc(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Zc),Qc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jc=function(t){function e(e,n,r){var o=t.call(this,e)||this;return r?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=n,o}return Qc(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Zc),tl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),el=function(t){function e(e,n,r){var o=t.call(this,e)||this;if(n<0||n>10||r<0||r>10)throw new $s;return o.firstDigit=n,o.secondDigit=r,o}return tl(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Zc),nl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rl=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var n,r,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new uu;var l=e.substring(0,2);try{for(var d=nl(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}if(e.length<3)throw new uu;var f=e.substring(0,3);try{for(var p=nl(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=nl(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),w=m.next();!w.done;w=m.next()){if((E=w.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new uu;var v=e.substring(0,4);try{for(var y=nl(t.FOUR_DIGIT_DATA_LENGTH),_=y.next();!_.done;_=y.next()){var E;if((E=_.value)[0]===v)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{_&&!_.done&&(c=y.return)&&c.call(y)}finally{if(u)throw u.error}}throw new uu},t.processFixedAI=function(e,n,r){if(r.length<e)throw new uu;var o=r.substring(0,e);if(r.length<e+n)throw new uu;var i=r.substring(e,e+n),a=r.substring(e+n),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,n,r){var o,i=r.substring(0,e);o=r.length<e+n?r.length:e+n;var a=r.substring(e,o),s=r.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),ol=function(){function t(t){this.buffer=new iu,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var n=e,r=null;;){var o=this.decodeGeneralPurposeField(n,r),i=rl.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),r=o.isRemaining()?""+o.getRemainingValue():null,n===o.getNewPosition())break;n=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new el(this.information.getSize(),0===e?el.FNC1:e-1,el.FNC1)}var n=this.extractNumericValueFromBitArray(t,7);return new el(t+7,(n-8)/11,(n-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,n){return t.extractNumericValueFromBitArray(this.information,e,n)},t.extractNumericValueFromBitArray=function(t,e,n){for(var r=0,o=0;o<n;++o)t.get(e+o)&&(r|=1<<n-o-1);return r},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var n=this.parseBlocks();return null!=n&&n.isRemaining()?new Jc(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new Jc(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var n=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(n!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new Jc(this.current.getPosition(),this.buffer.toString()):new Jc(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new qc(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new Jc(this.current.getPosition(),this.buffer.toString());return new qc(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new qc(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Jc(this.current.getPosition(),this.buffer.toString());return new qc(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new qc(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Jc(this.current.getPosition(),this.buffer.toString());return new qc(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new qc(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<116)return!0;if(t+8>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,8);return r>=232&&r<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new $c(t+5,$c.FNC1);if(e>=5&&e<15)return new $c(t+5,"0"+(e-5));var n,r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<90)return new $c(t+7,""+(r+1));if(r>=90&&r<116)return new $c(t+7,""+(r+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:n="!";break;case 233:n='"';break;case 234:n="%";break;case 235:n="&";break;case 236:n="'";break;case 237:n="(";break;case 238:n=")";break;case 239:n="*";break;case 240:n="+";break;case 241:n=",";break;case 242:n="-";break;case 243:n=".";break;case 244:n="/";break;case 245:n=":";break;case 246:n=";";break;case 247:n="<";break;case 248:n="=";break;case 249:n=">";break;case 250:n="?";break;case 251:n="_";break;case 252:n=" ";break;default:throw new $s}return new $c(t+8,n)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,6);return n>=16&&n<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new $c(t+5,$c.FNC1);if(e>=5&&e<15)return new $c(t+5,"0"+(e-5));var n,r=this.extractNumericValueFromBitArray(t,6);if(r>=32&&r<58)return new $c(t+6,""+(r+33));switch(r){case 58:n="*";break;case 59:n=",";break;case 60:n="-";break;case 61:n=".";break;case 62:n="/";break;default:throw new Lu("Decoding invalid alphanumeric value: "+r)}return new $c(t+6,n)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),il=function(){function t(t){this.information=t,this.generalDecoder=new ol(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sl=function(t){function e(e){return t.call(this,e)||this}return al(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var n=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,n)},e.prototype.encodeCompressedGtinWithoutAI=function(t,n,r){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,r)},e.appendCheckDigit=function(t,e){for(var n=0,r=0;r<13;r++){var o=t.charAt(r+e).charCodeAt(0)-"0".charCodeAt(0);n+=1&r?o:3*o}10===(n=10-n%10)&&(n=0),t.append(n)},e.GTIN_SIZE=40,e}(il),ul=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cl=function(t){function e(e){return t.call(this,e)||this}return ul(e,t),e.prototype.parseInformation=function(){var t=new iu;t.append("(01)");var n=t.length(),r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(r),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(sl),ll=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dl=function(t){function e(e){return t.call(this,e)||this}return ll(e,t),e.prototype.parseInformation=function(){var t=new iu;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(il),hl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fl=function(t){function e(e){return t.call(this,e)||this}return hl(e,t),e.prototype.encodeCompressedWeight=function(t,e,n){var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e,n);this.addWeightCode(t,r);for(var o=this.checkWeight(r),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(sl),pl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gl=function(t){function e(e){return t.call(this,e)||this}return pl(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+fl.GTIN_SIZE+e.WEIGHT_SIZE)throw new uu;var t=new iu;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+fl.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(fl),ml=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wl=function(t){function e(e){return t.call(this,e)||this}return ml(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(gl),vl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yl=function(t){function e(e){return t.call(this,e)||this}return vl(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(gl),_l=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),El=function(t){function e(e){return t.call(this,e)||this}return _l(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+sl.GTIN_SIZE)throw new uu;var t=new iu;this.encodeCompressedGtin(t,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+sl.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(n),t.append(")");var r=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+sl.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(r.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(sl),bl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cl=function(t){function e(e){return t.call(this,e)||this}return bl(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+sl.GTIN_SIZE)throw new uu;var t=new iu;this.encodeCompressedGtin(t,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+sl.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(n),t.append(")");var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+sl.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);r/100==0&&t.append("0"),r/10==0&&t.append("0"),t.append(r);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+sl.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(sl),Al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Il=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.dateCode=r,o.firstAIdigits=n,o}return Al(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new uu;var t=new iu;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,n){var r=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(38400!==r){t.append("("),t.append(this.dateCode),t.append(")");var o=r%32,i=(r/=32)%12+1,a=r/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(fl);var Sl=function(){function t(t,e,n,r){this.leftchar=t,this.rightchar=e,this.finderpattern=n,this.maybeLast=r}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,n){return e instanceof t&&(t.equalsOrNull(e.leftchar,n.leftchar)&&t.equalsOrNull(e.rightchar,n.rightchar)&&t.equalsOrNull(e.finderpattern,n.finderpattern))},t.equalsOrNull=function(e,n){return null===e?null===n:t.equals(e,n)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),Tl=function(){function t(t,e,n){this.pairs=t,this.rowNumber=e,this.wasReversed=n}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,n){return e instanceof t&&(this.checkEqualitity(e,n)&&e.wasReversed===n.wasReversed)},t.prototype.checkEqualitity=function(t,e){var n;if(t&&e)return t.forEach((function(t,r){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(n=!0)}))})),n},t}(),Dl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ol=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.pairs=new Array(e.MAX_PAIRS),n.rows=new Array,n.startEnd=[2],n}return Dl(e,t),e.prototype.decodeRow=function(t,n,r){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,n))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var n,r=!1;!r;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof uu){if(!this.pairs.length)throw new uu;r=!0}}if(this.checkChecksum())return this.pairs;if(n=!!this.rows.length,this.storeRow(t,!1),n){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new uu},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,n){for(var r,o,i=n;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(r=void 0,Ol(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new uu},e.isValidSequence=function(t){var n,r;try{for(var o=Ol(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(t,n){for(var r=0,o=!1,i=!1;r<this.rows.length;){var a=this.rows[r];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),r++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new Tl(this.pairs,t,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var n,r,o,i,a,s;try{for(var u=Ol(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,Ol(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,Ol(t)),m=g.next();!m.done;m=g.next()){var w=m.value;if(Sl.equals(f,w)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},e.isPartialRow=function(t,e){var n,r,o,i,a,s;try{for(var u=Ol(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,Ol(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,Ol(l.getPairs())),w=m.next();!w.done;w=m.next()){var v=w.value;if(p.equals(v)){g=!0;break}}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new cl(t);if(!t.get(2))return new dl(t);switch(ol.extractNumericValueFromBitArray(t,1,4)){case 4:return new wl(t);case 5:return new yl(t)}switch(ol.extractNumericValueFromBitArray(t,1,5)){case 12:return new El(t);case 13:return new Cl(t)}switch(ol.extractNumericValueFromBitArray(t,1,7)){case 56:return new Il(t,"310","11");case 57:return new Il(t,"320","11");case 58:return new Il(t,"310","13");case 59:return new Il(t,"320","13");case 60:return new Il(t,"310","15");case 61:return new Il(t,"320","15");case 62:return new Il(t,"310","17");case 63:return new Il(t,"320","17")}}catch(e){throw console.log(e),new Lu("unknown decoder: "+t)}}(Yc.buildBitArray(t)).parseInformation(),n=t[0].getFinderPattern().getResultPoints(),r=t[t.length-1].getFinderPattern().getResultPoints(),o=[n[0],n[1],r[0],r[1]];return new Cu(e,null,null,o,Iu.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),n=t.getRightChar();if(null===n)return!1;for(var r=n.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);r+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(r+=s.getChecksumPortion(),o++)}return 211*(o-4)+(r%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var n;return t.get(e)?(n=t.getNextUnset(e),n=t.getNextSet(n)):(n=t.getNextSet(e),n=t.getNextUnset(n)),n},e.prototype.retrieveNextPair=function(t,n,r){var o,i=n.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,n,s),null===(o=this.parseFoundFinderPattern(t,r,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new uu;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new Sl(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,n,r){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(r>=0)i=r;else if(this.isEmptyPair(n))i=0;else{i=n[n.length-1].getFinderPattern().getStartEnd()[1]}var s=n.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new uu},e.reverseCounters=function(t){for(var e=t.length,n=0;n<e/2;++n){var r=t[n];t[n]=t[e-n-1],t[e-n-1]=r}},e.prototype.parseFoundFinderPattern=function(t,n,r){var o,i,a;if(r){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();zs.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new jc(u,[i,a],i,a,n)},e.prototype.decodeDataCharacter=function(t,n,r,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,n.getStartEnd()[0],i);else{e.recordPattern(t,n.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Vu.sum(new Int32Array(i))/17,d=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new uu;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,w=m+.5;if(w<1){if(m<.3)throw new uu;w=1}else if(w>8){if(m>8.7)throw new uu;w=8}var v=s/2;1&s?(f[v]=w,g[v]=m-w):(h[v]=w,p[v]=m-w)}this.adjustOddEvenCounts(17);var y=4*n.getValue()+(r?0:2)+(o?0:1)-1,_=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(n,r,o)){var b=e.WEIGHTS[y][2*s];E+=h[s]*b}_+=h[s]}var C=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(n,r,o)){b=e.WEIGHTS[y][2*s+1];C+=f[s]*b}var A=E+C;if(1&_||_>13||_<4)throw new uu;var I=(13-_)/2,S=e.SYMBOL_WIDEST[I],T=9-S,D=Xc.getRSSvalue(h,S,!0),O=Xc.getRSSvalue(f,T,!1),R=e.EVEN_TOTAL_SUBSET[I],M=e.GSUM[I];return new Gc(D*R+O+M,A)},e.isNotA1left=function(t,e,n){return!(0===t.getValue()&&e&&n)},e.prototype.adjustOddEvenCounts=function(t){var n=Vu.sum(new Int32Array(this.getOddCounts())),r=Vu.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;n>13?i=!0:n<4&&(o=!0);var a=!1,s=!1;r>13?s=!0:r<4&&(a=!0);var u=n+r-t,c=!(1&~n),l=!(1&r);if(1===u)if(c){if(l)throw new uu;i=!0}else{if(!l)throw new uu;s=!0}else if(-1===u)if(c){if(l)throw new uu;o=!0}else{if(!l)throw new uu;a=!0}else{if(0!==u)throw new uu;if(c){if(!l)throw new uu;n<r?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new uu}if(o){if(i)throw new uu;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new uu;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Hc),Ml=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kl=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.count=0,o.finderPattern=r,o}return Ml(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Gc),Nl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Nl(e,t),e.prototype.decodeRow=function(t,n,r){var o,i,a,s,u=this.decodePair(n,!1,t,r);e.addOrTally(this.possibleLeftPairs,u),n.reverse();var c=this.decodePair(n,!0,t,r);e.addOrTally(this.possibleRightPairs,c),n.reverse();try{for(var l=xl(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,xl(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new uu},e.addOrTally=function(t,e){var n,r;if(null!=e){var o=!1;try{for(var i=xl(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var n=4537077*t.getValue()+e.getValue(),r=new String(n).toString(),o=new iu,i=13-r.length;i>0;i--)o.append("0");o.append(r);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=1&i?s:3*s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new Cu(o.toString(),null,0,[u[0],u[1],c[0],c[1]],Iu.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var n=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,r=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return r>72&&r--,r>8&&r--,n===r},e.prototype.decodePair=function(t,e,n,r){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,n,e,o),a=null==r?null:r.get(Zs.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new Gu(s,n))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new kl(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,n,r){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(r)rc.recordPatternInReverse(t,n.getStartEnd()[0],o);else{rc.recordPattern(t,n.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=r?16:15,l=Vu.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var w=Math.floor(a/2);1&a?(h[w]=m,p[w]=g-m):(d[w]=m,f[w]=g-m)}this.adjustOddEvenCounts(r,c);var v=0,y=0;for(a=d.length-1;a>=0;a--)y*=9,y+=d[a],v+=d[a];var _=0,E=0;for(a=h.length-1;a>=0;a--)_*=9,_+=h[a],E+=h[a];var b=y+3*_;if(r){if(1&v||v>12||v<4)throw new uu;var C=(12-v)/2,A=9-(O=e.OUTSIDE_ODD_WIDEST[C]),I=Xc.getRSSvalue(d,O,!1),S=Xc.getRSSvalue(h,A,!0),T=e.OUTSIDE_EVEN_TOTAL_SUBSET[C],D=e.OUTSIDE_GSUM[C];return new Gc(I*T+S+D,b)}if(1&E||E>10||E<4)throw new uu;C=(10-E)/2,A=9-(O=e.INSIDE_ODD_WIDEST[C]),I=Xc.getRSSvalue(d,O,!0),S=Xc.getRSSvalue(h,A,!1);var O,R=e.INSIDE_ODD_TOTAL_SUBSET[C];D=e.INSIDE_GSUM[C];return new Gc(S*R+I+D,b)},e.prototype.findFinderPattern=function(t,e){var n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;for(var r=t.getSize(),o=!1,i=0;i<r&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<r;u++)if(t.get(u)!==o)n[a]++;else{if(3===a){if(Hc.isFinderPattern(n))return[s,u];s+=n[0]+n[1],n[0]=n[2],n[1]=n[3],n[2]=0,n[3]=0,a--}else a++;n[a]=1,o=!o}throw new uu},e.prototype.parseFoundFinderPattern=function(t,n,r,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);zs.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return r&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new jc(l,[a,o[1]],d,h,n)},e.prototype.adjustOddEvenCounts=function(t,e){var n=Vu.sum(new Int32Array(this.getOddCounts())),r=Vu.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(n>12?i=!0:n<4&&(o=!0),r>12?s=!0:r<4&&(a=!0)):(n>11?i=!0:n<5&&(o=!0),r>10?s=!0:r<4&&(a=!0));var u=n+r-e,c=(1&n)==(t?1:0),l=!(1&~r);if(1===u)if(c){if(l)throw new uu;i=!0}else{if(!l)throw new uu;s=!0}else if(-1===u)if(c){if(l)throw new uu;o=!0}else{if(!l)throw new uu;a=!0}else{if(0!==u)throw new uu;if(c){if(!l)throw new uu;n<r?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new uu}if(o){if(i)throw new uu;Hc.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Hc.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new uu;Hc.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Hc.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Hc),Bl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fl=function(t){function e(e){var n=t.call(this)||this;n.readers=[];var r=e?e.get(Zs.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(Zs.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(Zs.ENABLE_CODE_39_EXTENDED_MODE);return r&&((r.includes(Iu.EAN_13)||r.includes(Iu.UPC_A)||r.includes(Iu.EAN_8)||r.includes(Iu.UPC_E))&&n.readers.push(new Fc(e)),r.includes(Iu.CODE_39)&&n.readers.push(new uc(o,i)),r.includes(Iu.CODE_93)&&n.readers.push(new dc),r.includes(Iu.CODE_128)&&n.readers.push(new ic),r.includes(Iu.ITF)&&n.readers.push(new pc),r.includes(Iu.CODABAR)&&n.readers.push(new zc),r.includes(Iu.RSS_14)&&n.readers.push(new Pl),r.includes(Iu.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new Rl))),0===n.readers.length&&(n.readers.push(new Fc(e)),n.readers.push(new uc),n.readers.push(new dc),n.readers.push(new Fc(e)),n.readers.push(new ic),n.readers.push(new pc),n.readers.push(new Pl)),n}return Bl(e,t),e.prototype.decodeRow=function(t,e,n){for(var r=0;r<this.readers.length;r++)try{return this.readers[r].decodeRow(t,e,n)}catch(t){}throw new uu},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(rc),Ll=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return void 0===e&&(e=500),t.call(this,new Fl(n),e,n)||this}Ll(e,t)}(bu);var zl,Ul=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vl=function(){function t(t,e,n){this.ecCodewords=t,this.ecBlocks=[e],n&&this.ecBlocks.push(n)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Hl=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Gl=function(){function t(t,e,n,r,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=n,this.dataRegionSizeRows=r,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Ul(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,n){var r,o;if(1&e||1&n)throw new $s;try{for(var i=Ul(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===n)return s}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}throw new $s},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Vl(5,new Hl(1,3))),new t(2,12,12,10,10,new Vl(7,new Hl(1,5))),new t(3,14,14,12,12,new Vl(10,new Hl(1,8))),new t(4,16,16,14,14,new Vl(12,new Hl(1,12))),new t(5,18,18,16,16,new Vl(14,new Hl(1,18))),new t(6,20,20,18,18,new Vl(18,new Hl(1,22))),new t(7,22,22,20,20,new Vl(20,new Hl(1,30))),new t(8,24,24,22,22,new Vl(24,new Hl(1,36))),new t(9,26,26,24,24,new Vl(28,new Hl(1,44))),new t(10,32,32,14,14,new Vl(36,new Hl(1,62))),new t(11,36,36,16,16,new Vl(42,new Hl(1,86))),new t(12,40,40,18,18,new Vl(48,new Hl(1,114))),new t(13,44,44,20,20,new Vl(56,new Hl(1,144))),new t(14,48,48,22,22,new Vl(68,new Hl(1,174))),new t(15,52,52,24,24,new Vl(42,new Hl(2,102))),new t(16,64,64,14,14,new Vl(56,new Hl(2,140))),new t(17,72,72,16,16,new Vl(36,new Hl(4,92))),new t(18,80,80,18,18,new Vl(48,new Hl(4,114))),new t(19,88,88,20,20,new Vl(56,new Hl(4,144))),new t(20,96,96,22,22,new Vl(68,new Hl(4,174))),new t(21,104,104,24,24,new Vl(56,new Hl(6,136))),new t(22,120,120,18,18,new Vl(68,new Hl(6,175))),new t(23,132,132,20,20,new Vl(62,new Hl(8,163))),new t(24,144,144,22,22,new Vl(62,new Hl(8,156),new Hl(2,155))),new t(25,8,18,6,16,new Vl(7,new Hl(1,5))),new t(26,8,32,6,14,new Vl(11,new Hl(1,10))),new t(27,12,26,10,24,new Vl(14,new Hl(1,16))),new t(28,12,36,10,16,new Vl(18,new Hl(1,22))),new t(29,16,36,14,16,new Vl(24,new Hl(1,32))),new t(30,16,48,14,22,new Vl(28,new Hl(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),jl=function(){function t(e){var n=e.getHeight();if(n<8||n>144||1&n)throw new $s;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new au(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),n=t.getWidth();return Gl.getVersionForDimensions(e,n)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,n=4,r=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(n!==o||0!==r||a)if(n===o-2&&0===r&&3&i&&!s)t[e++]=255&this.readCorner2(o,i),n-=2,r+=2,s=!0;else if(n!==o+4||2!==r||7&i||u)if(n!==o-2||0!==r||4!=(7&i)||c){do{n<o&&r>=0&&!this.readMappingMatrix.get(r,n)&&(t[e++]=255&this.readUtah(n,r,o,i)),n-=2,r+=2}while(n>=0&&r<i);n+=1,r+=3;do{n>=0&&r<i&&!this.readMappingMatrix.get(r,n)&&(t[e++]=255&this.readUtah(n,r,o,i)),n+=2,r-=2}while(n<o&&r>=0);n+=3,r+=1}else t[e++]=255&this.readCorner4(o,i),n-=2,r+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),n-=2,r+=2,u=!0;else t[e++]=255&this.readCorner1(o,i),n-=2,r+=2,a=!0}while(n<o||r<i);if(e!==this.version.getTotalCodewords())throw new $s;return t},t.prototype.readModule=function(t,e,n,r){return t<0&&(t+=n,e+=4-(n+4&7)),e<0&&(e+=r,t+=4-(r+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,n,r){var o=0;return this.readModule(t-2,e-2,n,r)&&(o|=1),o<<=1,this.readModule(t-2,e-1,n,r)&&(o|=1),o<<=1,this.readModule(t-1,e-2,n,r)&&(o|=1),o<<=1,this.readModule(t-1,e-1,n,r)&&(o|=1),o<<=1,this.readModule(t-1,e,n,r)&&(o|=1),o<<=1,this.readModule(t,e-2,n,r)&&(o|=1),o<<=1,this.readModule(t,e-1,n,r)&&(o|=1),o<<=1,this.readModule(t,e,n,r)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var n=0;return this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,1,t,e)&&(n|=1),n<<=1,this.readModule(t-1,2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(2,e-1,t,e)&&(n|=1),n<<=1,this.readModule(3,e-1,t,e)&&(n|=1),n},t.prototype.readCorner2=function(t,e){var n=0;return this.readModule(t-3,0,t,e)&&(n|=1),n<<=1,this.readModule(t-2,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(0,e-4,t,e)&&(n|=1),n<<=1,this.readModule(0,e-3,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n},t.prototype.readCorner3=function(t,e){var n=0;return this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(0,e-3,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-3,t,e)&&(n|=1),n<<=1,this.readModule(1,e-2,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n},t.prototype.readCorner4=function(t,e){var n=0;return this.readModule(t-3,0,t,e)&&(n|=1),n<<=1,this.readModule(t-2,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(2,e-1,t,e)&&(n|=1),n<<=1,this.readModule(3,e-1,t,e)&&(n|=1),n},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new xs("Dimension of bitMatrix must match the version size");for(var r=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/r|0,a=n/o|0,s=new au(a*o,i*r),u=0;u<i;++u)for(var c=u*r,l=0;l<a;++l)for(var d=l*o,h=0;h<r;++h)for(var f=u*(r+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var w=d+g;s.set(w,p)}}return s},t}(),Wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xl=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,n){var r,o,i,a,s=n.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=Wl(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}var h=new Array(u),f=0;try{for(var p=Wl(c),g=p.next();!g.done;g=p.next())for(var m=g.value,w=0;w<m.getCount();w++){var v=m.getDataCodewords(),y=s.getECCodewords()+v;h[f++]=new t(v,new Uint8Array(y))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var _=h[0].codewords.length-s.getECCodewords(),E=_-1,b=0;for(w=0;w<E;w++)for(var C=0;C<f;C++)h[C].codewords[w]=e[b++];var A=24===n.getVersionNumber(),I=A?8:f;for(C=0;C<I;C++)h[C].codewords[_-1]=e[b++];var S=h[0].codewords.length;for(w=_;w<S;w++)for(C=0;C<f;C++){var T=A?(C+8)%f:C,D=A&&T>7?w-1:w;h[T].codewords[D]=e[b++]}if(b!==e.length)throw new xs;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Yl=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new xs(""+t);var e=0,n=this.bitOffset,r=this.byteOffset,o=this.bytes;if(n>0){var i=8-n,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[r]&s)>>u,t-=a,8===(n+=a)&&(n=0,r++)}if(t>0){for(;t>=8;)e=e<<8|255&o[r],r++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[r]&s)>>u,n+=t}}return this.bitOffset=n,this.byteOffset=r,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(zl||(zl={}));var ql,Zl=function(){function t(){}return t.decode=function(t){var e=new Yl(t),n=new iu,r=new iu,o=new Array,i=zl.ASCII_ENCODE;do{if(i===zl.ASCII_ENCODE)i=this.decodeAsciiSegment(e,n,r);else{switch(i){case zl.C40_ENCODE:this.decodeC40Segment(e,n);break;case zl.TEXT_ENCODE:this.decodeTextSegment(e,n);break;case zl.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,n);break;case zl.EDIFACT_ENCODE:this.decodeEdifactSegment(e,n);break;case zl.BASE256_ENCODE:this.decodeBase256Segment(e,n,o);break;default:throw new $s}i=zl.ASCII_ENCODE}}while(i!==zl.PAD_ENCODE&&e.available()>0);return r.length()>0&&n.append(r.toString()),new Du(t,n.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,n){var r=!1;do{var o=t.readBits(8);if(0===o)throw new $s;if(o<=128)return r&&(o+=128),e.append(String.fromCharCode(o-1)),zl.ASCII_ENCODE;if(129===o)return zl.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return zl.C40_ENCODE;case 231:return zl.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:r=!0;break;case 236:e.append("[)>05"),n.insert(0,"");break;case 237:e.append("[)>06"),n.insert(0,"");break;case 238:return zl.ANSIX12_ENCODE;case 239:return zl.TEXT_ENCODE;case 240:return zl.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new $s}}while(t.available()>0);return zl.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var n=!1,r=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),r);for(var a=0;a<3;a++){var s=r[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new $s;var u=this.C40_BASIC_SET_CHARS[s];n?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):e.append(u)}break;case 1:n?(e.append(String.fromCharCode(s+128)),n=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];n?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new $s}o=0;break;case 3:n?(e.append(String.fromCharCode(s+224)),n=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new $s}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var n=!1,r=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),r);for(var a=0;a<3;a++){var s=r[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new $s;var u=this.TEXT_BASIC_SET_CHARS[s];n?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):e.append(u)}break;case 1:n?(e.append(String.fromCharCode(s+128)),n=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];n?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new $s}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new $s;u=this.TEXT_SHIFT3_SET_CHARS[s];n?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):e.append(u),o=0;break;default:throw new $s}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var n=[];do{if(8===t.available())return;var r=t.readBits(8);if(254===r)return;this.parseTwoBytes(r,t.readBits(8),n);for(var o=0;o<3;o++){var i=n[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new $s;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,n){var r=(t<<8)+e-1,o=Math.floor(r/1600);n[0]=o,r-=1600*o,o=Math.floor(r/40),n[1]=o,n[2]=r-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var n=0;n<4;n++){var r=t.readBits(6);if(31===r){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}32&r||(r|=64),e.append(String.fromCharCode(r))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,n){var r,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((r=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new $s;for(var a=new Uint8Array(r),s=0;s<r;s++){if(t.available()<8)throw new $s;a[s]=this.unrandomize255State(t.readBits(8),o++)}n.push(a);try{e.append(ru.decode(a,ou.ISO88591))}catch(t){throw new Lu("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var n=t-(149*e%255+1);return n>=0?n:n+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),Kl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$l=function(){function t(){this.rsDecoder=new zu(xu.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,n,r=new jl(t),o=r.getVersion(),i=r.readCodewords(),a=Xl.getDataBlocks(i,o),s=0;try{for(var u=Kl(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return Zl.decode(l)},t.prototype.correctErrors=function(t,e){var n=new Int32Array(t);try{this.rsDecoder.decode(n,t.length-e)}catch(t){throw new Fs}for(var r=0;r<e;r++)t[r]=n[r]},t}(),Ql=function(){function t(t){this.image=t,this.rectangleDetector=new Yu(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),n=this.detectSolid1(e);if((n=this.detectSolid2(n))[3]=this.correctTopRight(n),!n[3])throw new uu;var r=(n=this.shiftToModuleCenter(n))[0],o=n[1],i=n[2],a=n[3],s=this.transitionsBetween(r,a)+1,u=this.transitionsBetween(i,a)+1;1&~s||(s+=1),1&~u||(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,r,o,i,a,s,u);return new ju(c,[r,o,i,a])},t.shiftPoint=function(t,e,n){var r=(e.getX()-t.getX())/(n+1),o=(e.getY()-t.getY())/(n+1);return new Gu(t.getX()+r,t.getY()+o)},t.moveAway=function(t,e,n){var r=t.getX(),o=t.getY();return r<e?r-=1:r+=1,o<n?o-=1:o+=1,new Gu(r,o)},t.prototype.detectSolid1=function(t){var e=t[0],n=t[1],r=t[3],o=t[2],i=this.transitionsBetween(e,n),a=this.transitionsBetween(n,r),s=this.transitionsBetween(r,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,n,r];return c>a&&(c=a,l[0]=e,l[1]=n,l[2]=r,l[3]=o),c>s&&(c=s,l[0]=n,l[1]=r,l[2]=o,l[3]=e),c>u&&(l[0]=r,l[1]=o,l[2]=e,l[3]=n),l},t.prototype.detectSolid2=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i),s=t.shiftPoint(r,o,4*(a+1)),u=t.shiftPoint(o,r,4*(a+1));return this.transitionsBetween(s,n)<this.transitionsBetween(u,i)?(e[0]=n,e[1]=r,e[2]=o,e[3]=i):(e[0]=r,e[1]=o,e[2]=i,e[3]=n),e},t.prototype.correctTopRight=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i),s=this.transitionsBetween(r,i),u=t.shiftPoint(n,r,4*(s+1)),c=t.shiftPoint(o,r,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new Gu(i.getX()+(o.getX()-r.getX())/(a+1),i.getY()+(o.getY()-r.getY())/(a+1)),d=new Gu(i.getX()+(n.getX()-r.getX())/(s+1),i.getY()+(n.getY()-r.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(n,r,4*s),c=t.shiftPoint(o,r,4*a);1&~(a=this.transitionsBetween(u,i)+1)||(a+=1),1&~(s=this.transitionsBetween(c,i)+1)||(s+=1);var l,d,h=(n.getX()+r.getX()+o.getX()+i.getX())/4,f=(n.getY()+r.getY()+o.getY()+i.getY())/4;return n=t.moveAway(n,h,f),r=t.moveAway(r,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(n,r,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(r,n,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,r,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,n,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,n,r,o,i,a){return Qu.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),r.getX(),r.getY(),n.getX(),n.getY())},t.prototype.transitionsBetween=function(t,e){var n=Math.trunc(t.getX()),r=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-r)>Math.abs(o-n);if(a){var s=n;n=r,r=s,s=o,o=i,i=s}for(var u=Math.abs(o-n),c=Math.abs(i-r),l=-u/2,d=r<i?1:-1,h=n<o?1:-1,f=0,p=this.image.get(a?r:n,a?n:r),g=n,m=r;g!==o;g+=h){var w=this.image.get(a?m:g,a?g:m);if(w!==p&&(f++,p=w),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),Jl=function(){function t(){this.decoder=new $l}return t.prototype.decode=function(e,n){var r,o;if(void 0===n&&(n=null),null!=n&&n.has(Zs.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());r=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Ql(e.getBlackMatrix()).detect();r=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=r.getRawBytes(),u=new Cu(r.getText(),s,8*s.length,o,Iu.DATA_MATRIX,zs.currentTimeMillis()),c=r.getByteSegments();null!=c&&u.putMetadata(Tu.BYTE_SEGMENTS,c);var l=r.getECLevel();return null!=l&&u.putMetadata(Tu.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(null==e||null==n)throw new uu;var r=this.moduleSize(e,t),o=e[1],i=n[1],a=e[0],s=(n[0]-a+1)/r,u=(i-o+1)/r;if(s<=0||u<=0)throw new uu;var c=r/2;o+=c,a+=c;for(var l=new au(s,u),d=0;d<u;d++)for(var h=o+d*r,f=0;f<s;f++)t.get(a+f*r,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var n=e.getWidth(),r=t[0],o=t[1];r<n&&e.get(r,o);)r++;if(r===n)throw new uu;var i=r-t[0];if(0===i)throw new uu;return i},t.NO_POINTS=[],t}(),td=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Jl,e)||this}td(e,t)}(bu),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(ql||(ql={}));var ed,nd=function(){function t(e,n,r){this.value=e,this.stringValue=n,this.bits=r,t.FOR_BITS.set(r,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new ks(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.value===n.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new xs;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(ql.L,"L",1),t.M=new t(ql.M,"M",0),t.Q=new t(ql.Q,"Q",3),t.H=new t(ql.H,"H",2),t}(),rd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},od=function(){function t(t){this.errorCorrectionLevel=nd.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Xs.bitCount(t^e)},t.decodeFormatInformation=function(e,n){var r=t.doDecodeFormatInformation(e,n);return null!==r?r:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,n^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,n){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=rd(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===n)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==n&&(d=t.numBitsDiffering(n,l))<i&&(a=c[1],i=d)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.errorCorrectionLevel===n.errorCorrectionLevel&&this.dataMask===n.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),id=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ad=function(){function t(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,n=0,r=this.ecBlocks;try{for(var o=id(r),i=o.next();!i.done;i=o.next()){n+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),sd=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),ud=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cd=function(){function t(t,e){for(var n,r,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=ud(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new $s;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new $s}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new xs;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var n=Number.MAX_SAFE_INTEGER,r=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=od.numBitsDiffering(e,i);a<n&&(r=o+7,n=a)}return n<=3?t.getVersionForNumber(r):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new au(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var n=this.alignmentPatternCenters.length,r=0;r<n;r++)for(var o=this.alignmentPatternCenters[r]-2,i=0;i<n;i++)0===r&&(0===i||i===n-1)||r===n-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new ad(7,new sd(1,19)),new ad(10,new sd(1,16)),new ad(13,new sd(1,13)),new ad(17,new sd(1,9))),new t(2,Int32Array.from([6,18]),new ad(10,new sd(1,34)),new ad(16,new sd(1,28)),new ad(22,new sd(1,22)),new ad(28,new sd(1,16))),new t(3,Int32Array.from([6,22]),new ad(15,new sd(1,55)),new ad(26,new sd(1,44)),new ad(18,new sd(2,17)),new ad(22,new sd(2,13))),new t(4,Int32Array.from([6,26]),new ad(20,new sd(1,80)),new ad(18,new sd(2,32)),new ad(26,new sd(2,24)),new ad(16,new sd(4,9))),new t(5,Int32Array.from([6,30]),new ad(26,new sd(1,108)),new ad(24,new sd(2,43)),new ad(18,new sd(2,15),new sd(2,16)),new ad(22,new sd(2,11),new sd(2,12))),new t(6,Int32Array.from([6,34]),new ad(18,new sd(2,68)),new ad(16,new sd(4,27)),new ad(24,new sd(4,19)),new ad(28,new sd(4,15))),new t(7,Int32Array.from([6,22,38]),new ad(20,new sd(2,78)),new ad(18,new sd(4,31)),new ad(18,new sd(2,14),new sd(4,15)),new ad(26,new sd(4,13),new sd(1,14))),new t(8,Int32Array.from([6,24,42]),new ad(24,new sd(2,97)),new ad(22,new sd(2,38),new sd(2,39)),new ad(22,new sd(4,18),new sd(2,19)),new ad(26,new sd(4,14),new sd(2,15))),new t(9,Int32Array.from([6,26,46]),new ad(30,new sd(2,116)),new ad(22,new sd(3,36),new sd(2,37)),new ad(20,new sd(4,16),new sd(4,17)),new ad(24,new sd(4,12),new sd(4,13))),new t(10,Int32Array.from([6,28,50]),new ad(18,new sd(2,68),new sd(2,69)),new ad(26,new sd(4,43),new sd(1,44)),new ad(24,new sd(6,19),new sd(2,20)),new ad(28,new sd(6,15),new sd(2,16))),new t(11,Int32Array.from([6,30,54]),new ad(20,new sd(4,81)),new ad(30,new sd(1,50),new sd(4,51)),new ad(28,new sd(4,22),new sd(4,23)),new ad(24,new sd(3,12),new sd(8,13))),new t(12,Int32Array.from([6,32,58]),new ad(24,new sd(2,92),new sd(2,93)),new ad(22,new sd(6,36),new sd(2,37)),new ad(26,new sd(4,20),new sd(6,21)),new ad(28,new sd(7,14),new sd(4,15))),new t(13,Int32Array.from([6,34,62]),new ad(26,new sd(4,107)),new ad(22,new sd(8,37),new sd(1,38)),new ad(24,new sd(8,20),new sd(4,21)),new ad(22,new sd(12,11),new sd(4,12))),new t(14,Int32Array.from([6,26,46,66]),new ad(30,new sd(3,115),new sd(1,116)),new ad(24,new sd(4,40),new sd(5,41)),new ad(20,new sd(11,16),new sd(5,17)),new ad(24,new sd(11,12),new sd(5,13))),new t(15,Int32Array.from([6,26,48,70]),new ad(22,new sd(5,87),new sd(1,88)),new ad(24,new sd(5,41),new sd(5,42)),new ad(30,new sd(5,24),new sd(7,25)),new ad(24,new sd(11,12),new sd(7,13))),new t(16,Int32Array.from([6,26,50,74]),new ad(24,new sd(5,98),new sd(1,99)),new ad(28,new sd(7,45),new sd(3,46)),new ad(24,new sd(15,19),new sd(2,20)),new ad(30,new sd(3,15),new sd(13,16))),new t(17,Int32Array.from([6,30,54,78]),new ad(28,new sd(1,107),new sd(5,108)),new ad(28,new sd(10,46),new sd(1,47)),new ad(28,new sd(1,22),new sd(15,23)),new ad(28,new sd(2,14),new sd(17,15))),new t(18,Int32Array.from([6,30,56,82]),new ad(30,new sd(5,120),new sd(1,121)),new ad(26,new sd(9,43),new sd(4,44)),new ad(28,new sd(17,22),new sd(1,23)),new ad(28,new sd(2,14),new sd(19,15))),new t(19,Int32Array.from([6,30,58,86]),new ad(28,new sd(3,113),new sd(4,114)),new ad(26,new sd(3,44),new sd(11,45)),new ad(26,new sd(17,21),new sd(4,22)),new ad(26,new sd(9,13),new sd(16,14))),new t(20,Int32Array.from([6,34,62,90]),new ad(28,new sd(3,107),new sd(5,108)),new ad(26,new sd(3,41),new sd(13,42)),new ad(30,new sd(15,24),new sd(5,25)),new ad(28,new sd(15,15),new sd(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new ad(28,new sd(4,116),new sd(4,117)),new ad(26,new sd(17,42)),new ad(28,new sd(17,22),new sd(6,23)),new ad(30,new sd(19,16),new sd(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new ad(28,new sd(2,111),new sd(7,112)),new ad(28,new sd(17,46)),new ad(30,new sd(7,24),new sd(16,25)),new ad(24,new sd(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new ad(30,new sd(4,121),new sd(5,122)),new ad(28,new sd(4,47),new sd(14,48)),new ad(30,new sd(11,24),new sd(14,25)),new ad(30,new sd(16,15),new sd(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new ad(30,new sd(6,117),new sd(4,118)),new ad(28,new sd(6,45),new sd(14,46)),new ad(30,new sd(11,24),new sd(16,25)),new ad(30,new sd(30,16),new sd(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new ad(26,new sd(8,106),new sd(4,107)),new ad(28,new sd(8,47),new sd(13,48)),new ad(30,new sd(7,24),new sd(22,25)),new ad(30,new sd(22,15),new sd(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new ad(28,new sd(10,114),new sd(2,115)),new ad(28,new sd(19,46),new sd(4,47)),new ad(28,new sd(28,22),new sd(6,23)),new ad(30,new sd(33,16),new sd(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new ad(30,new sd(8,122),new sd(4,123)),new ad(28,new sd(22,45),new sd(3,46)),new ad(30,new sd(8,23),new sd(26,24)),new ad(30,new sd(12,15),new sd(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new ad(30,new sd(3,117),new sd(10,118)),new ad(28,new sd(3,45),new sd(23,46)),new ad(30,new sd(4,24),new sd(31,25)),new ad(30,new sd(11,15),new sd(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new ad(30,new sd(7,116),new sd(7,117)),new ad(28,new sd(21,45),new sd(7,46)),new ad(30,new sd(1,23),new sd(37,24)),new ad(30,new sd(19,15),new sd(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new ad(30,new sd(5,115),new sd(10,116)),new ad(28,new sd(19,47),new sd(10,48)),new ad(30,new sd(15,24),new sd(25,25)),new ad(30,new sd(23,15),new sd(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new ad(30,new sd(13,115),new sd(3,116)),new ad(28,new sd(2,46),new sd(29,47)),new ad(30,new sd(42,24),new sd(1,25)),new ad(30,new sd(23,15),new sd(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new ad(30,new sd(17,115)),new ad(28,new sd(10,46),new sd(23,47)),new ad(30,new sd(10,24),new sd(35,25)),new ad(30,new sd(19,15),new sd(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new ad(30,new sd(17,115),new sd(1,116)),new ad(28,new sd(14,46),new sd(21,47)),new ad(30,new sd(29,24),new sd(19,25)),new ad(30,new sd(11,15),new sd(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new ad(30,new sd(13,115),new sd(6,116)),new ad(28,new sd(14,46),new sd(23,47)),new ad(30,new sd(44,24),new sd(7,25)),new ad(30,new sd(59,16),new sd(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new ad(30,new sd(12,121),new sd(7,122)),new ad(28,new sd(12,47),new sd(26,48)),new ad(30,new sd(39,24),new sd(14,25)),new ad(30,new sd(22,15),new sd(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new ad(30,new sd(6,121),new sd(14,122)),new ad(28,new sd(6,47),new sd(34,48)),new ad(30,new sd(46,24),new sd(10,25)),new ad(30,new sd(2,15),new sd(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new ad(30,new sd(17,122),new sd(4,123)),new ad(28,new sd(29,46),new sd(14,47)),new ad(30,new sd(49,24),new sd(10,25)),new ad(30,new sd(24,15),new sd(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new ad(30,new sd(4,122),new sd(18,123)),new ad(28,new sd(13,46),new sd(32,47)),new ad(30,new sd(48,24),new sd(14,25)),new ad(30,new sd(42,15),new sd(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new ad(30,new sd(20,117),new sd(4,118)),new ad(28,new sd(40,47),new sd(7,48)),new ad(30,new sd(43,24),new sd(22,25)),new ad(30,new sd(10,15),new sd(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new ad(30,new sd(19,118),new sd(6,119)),new ad(28,new sd(18,47),new sd(31,48)),new ad(30,new sd(34,24),new sd(34,25)),new ad(30,new sd(20,15),new sd(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(ed||(ed={}));var ld,dd=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var n=0;n<e;n++)for(var r=0;r<e;r++)this.isMasked(n,r)&&t.flip(r,n)},t.values=new Map([[ed.DATA_MASK_000,new t(ed.DATA_MASK_000,(function(t,e){return!(t+e&1)}))],[ed.DATA_MASK_001,new t(ed.DATA_MASK_001,(function(t,e){return!(1&t)}))],[ed.DATA_MASK_010,new t(ed.DATA_MASK_010,(function(t,e){return e%3==0}))],[ed.DATA_MASK_011,new t(ed.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[ed.DATA_MASK_100,new t(ed.DATA_MASK_100,(function(t,e){return!(Math.floor(t/2)+Math.floor(e/3)&1)}))],[ed.DATA_MASK_101,new t(ed.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[ed.DATA_MASK_110,new t(ed.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[ed.DATA_MASK_111,new t(ed.DATA_MASK_111,(function(t,e){return!(t+e+t*e%3&1)}))]]),t}(),hd=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new $s;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var n=5;n>=0;n--)t=this.copyBit(8,n,t);var r=this.bitMatrix.getHeight(),o=0,i=r-7;for(n=r-1;n>=i;n--)o=this.copyBit(8,n,o);for(e=r-8;e<r;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=od.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new $s},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return cd.getVersionForNumber(e);for(var n=0,r=t-11,o=5;o>=0;o--)for(var i=t-9;i>=r;i--)n=this.copyBit(i,o,n);var a=cd.decodeVersionInformation(n);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;n=0;for(i=5;i>=0;i--)for(o=t-9;o>=r;o--)n=this.copyBit(i,o,n);if(null!==(a=cd.decodeVersionInformation(n))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new $s},t.prototype.copyBit=function(t,e,n){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?n<<1|1:n<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),n=dd.values.get(t.getDataMask()),r=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,r);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=r-1;l>0;l-=2){6===l&&l--;for(var d=0;d<r;d++)for(var h=i?r-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new $s;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=dd.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,n=t.getWidth();e<n;e++)for(var r=e+1,o=t.getHeight();r<o;r++)t.get(e,r)!==t.get(r,e)&&(t.flip(r,e),t.flip(e,r))},t}(),fd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pd=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,n,r){var o,i,a,s;if(e.length!==n.getTotalCodewords())throw new xs;var u=n.getECBlocksForLevel(r),c=0,l=u.getECBlocks();try{for(var d=fd(l),h=d.next();!h.done;h=d.next()){c+=(w=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=fd(l),m=g.next();!m.done;m=g.next())for(var w=m.value,v=0;v<w.getCount();v++){var y=w.getDataCodewords(),_=u.getECCodewordsPerBlock()+y;f[p++]=new t(y,new Uint8Array(_))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var C=E-u.getECCodewordsPerBlock(),A=0;for(v=0;v<C;v++)for(var I=0;I<p;I++)f[I].codewords[v]=e[A++];for(I=b;I<p;I++)f[I].codewords[C]=e[A++];var S=f[0].codewords.length;for(v=C;v<S;v++)for(I=0;I<p;I++){var T=I<b?v:v+1;f[I].codewords[T]=e[A++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(ld||(ld={}));var gd,md,wd=function(){function t(e,n,r,o){this.value=e,this.stringValue=n,this.characterCountBitsForVersions=r,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var n=t.FOR_BITS.get(e);if(void 0===n)throw new xs;return n},t.prototype.getCharacterCountBits=function(t){var e,n=t.getVersionNumber();return e=n<=9?0:n<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.value===n.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(ld.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(ld.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(ld.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(ld.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(ld.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(ld.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(ld.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(ld.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(ld.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(ld.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),vd=function(){function t(){}return t.decode=function(e,n,r,o){var i=new Yl(e),a=new iu,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=wd.TERMINATOR;else{var f=i.readBits(4);h=wd.forBits(f)}switch(h){case wd.TERMINATOR:break;case wd.FNC1_FIRST_POSITION:case wd.FNC1_SECOND_POSITION:d=!0;break;case wd.STRUCTURED_APPEND:if(i.available()<16)throw new $s;u=i.readBits(8),c=i.readBits(8);break;case wd.ECI:var p=t.parseECIValue(i);if(null===(l=tu.getCharacterSetECIByValue(p)))throw new $s;break;case wd.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(n));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var w=i.readBits(h.getCharacterCountBits(n));switch(h){case wd.NUMERIC:t.decodeNumericSegment(i,a,w);break;case wd.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,w,d);break;case wd.BYTE:t.decodeByteSegment(i,a,w,l,s,o);break;case wd.KANJI:t.decodeKanjiSegment(i,a,w);break;default:throw new $s}}}while(h!==wd.TERMINATOR)}catch(t){throw new $s}return new Du(e,a.toString(),0===s.length?null:s,null===r?null:r.toString(),u,c)},t.decodeHanziSegment=function(t,e,n){if(13*n>t.available())throw new $s;for(var r=new Uint8Array(2*n),o=0;n>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,r[o]=a>>8&255,r[o+1]=255&a,o+=2,n--}try{e.append(ru.decode(r,ou.GB2312))}catch(t){throw new $s(t)}},t.decodeKanjiSegment=function(t,e,n){if(13*n>t.available())throw new $s;for(var r=new Uint8Array(2*n),o=0;n>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,r[o]=a>>8,r[o+1]=a,o+=2,n--}try{e.append(ru.decode(r,ou.SHIFT_JIS))}catch(t){throw new $s(t)}},t.decodeByteSegment=function(t,e,n,r,o,i){if(8*n>t.available())throw new $s;for(var a,s=new Uint8Array(n),u=0;u<n;u++)s[u]=t.readBits(8);a=null===r?ou.guessEncoding(s,i):r.getName();try{e.append(ru.decode(s,a))}catch(t){throw new $s(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new $s;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,n,r,o){for(var i=n.length();r>1;){if(e.available()<11)throw new $s;var a=e.readBits(11);n.append(t.toAlphaNumericChar(Math.floor(a/45))),n.append(t.toAlphaNumericChar(a%45)),r-=2}if(1===r){if(e.available()<6)throw new $s;n.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<n.length();s++)"%"===n.charAt(s)&&(s<n.length()-1&&"%"===n.charAt(s+1)?n.deleteCharAt(s+1):n.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,n,r){for(;r>=3;){if(e.available()<10)throw new $s;var o=e.readBits(10);if(o>=1e3)throw new $s;n.append(t.toAlphaNumericChar(Math.floor(o/100))),n.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),n.append(t.toAlphaNumericChar(o%10)),r-=3}if(2===r){if(e.available()<7)throw new $s;var i=e.readBits(7);if(i>=100)throw new $s;n.append(t.toAlphaNumericChar(Math.floor(i/10))),n.append(t.toAlphaNumericChar(i%10))}else if(1===r){if(e.available()<4)throw new $s;var a=e.readBits(4);if(a>=10)throw new $s;n.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new $s},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),yd=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),_d=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ed=function(){function t(){this.rsDecoder=new zu(xu.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(au.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var n=new hd(t),r=null;try{return this.decodeBitMatrixParser(n,e)}catch(t){r=t}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var o=this.decodeBitMatrixParser(n,e);return o.setOther(new yd(!0)),o}catch(t){if(null!==r)throw r;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var n,r,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=pd.getDataBlocks(u,a,s),l=0;try{for(var d=_d(c),h=d.next();!h.done;h=d.next()){l+=(w=h.value).getNumDataCodewords()}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}var f=new Uint8Array(l),p=0;try{for(var g=_d(c),m=g.next();!m.done;m=g.next()){var w,v=(w=m.value).getCodewords(),y=w.getNumDataCodewords();this.correctErrors(v,y);for(var _=0;_<y;_++)f[p++]=v[_]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return vd.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var n=new Int32Array(t);try{this.rsDecoder.decode(n,t.length-e)}catch(t){throw new Fs}for(var r=0;r<e;r++)t[r]=n[r]},t}(),bd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cd=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.estimatedModuleSize=r,o}return bd(e,t),e.prototype.aboutEquals=function(t,e,n){if(Math.abs(e-this.getY())<=t&&Math.abs(n-this.getX())<=t){var r=Math.abs(t-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,r){return new e((this.getX()+n)/2,(this.getY()+t)/2,(this.estimatedModuleSize+r)/2)},e}(Gu),Ad=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Id=function(){function t(t,e,n,r,o,i,a){this.image=t,this.startX=e,this.startY=n,this.width=r,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,n=t+this.width,r=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=r+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<n&&!i.get(u,s);)u++;for(var c=0;u<n;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,n)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new uu},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,n=e/2,r=0;r<3;r++)if(Math.abs(e-t[r])>=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,n,r,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(n,u)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&!i.get(n,u)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=e+1;u<a&&i.get(n,u)&&s[1]<=r;)s[1]++,u++;if(u===a||s[1]>r)return NaN;for(;u<a&&!i.get(n,u)&&s[2]<=r;)s[2]++,u++;if(s[2]>r)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,n,r){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,r),u=this.crossCheckVertical(n,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=Ad(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new Cd(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),Sd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Td=function(t){function e(e,n,r,o){var i=t.call(this,e,n)||this;return i.estimatedModuleSize=r,i.count=o,void 0===o&&(i.count=1),i}return Sd(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,n){if(Math.abs(e-this.getY())<=t&&Math.abs(n-this.getX())<=t){var r=Math.abs(t-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,r){var o=this.count+1;return new e((this.count*this.getX()+n)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+r)/o,o)},e}(Gu),Dd=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),Od=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rd=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var n=null!=e&&void 0!==e.get(Zs.TRY_HARDER),r=null!=e&&void 0!==e.get(Zs.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||n)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1&~d||d++,c[d]++;else if(1&d)c[d]++;else if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,r)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,r)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return Gu.orderBestPatterns(p),new Dd(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,n=0;n<5;n++){var r=t[n];if(0===r)return!1;e+=r}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,n,r,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&n>=a&&s.get(n-a,e-a);)i[2]++,a++;if(e<a||n<a)return!1;for(;e>=a&&n>=a&&!s.get(n-a,e-a)&&i[1]<=r;)i[1]++,a++;if(e<a||n<a||i[1]>r)return!1;for(;e>=a&&n>=a&&s.get(n-a,e-a)&&i[0]<=r;)i[0]++,a++;if(i[0]>r)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&n+a<c&&s.get(n+a,e+a);)i[2]++,a++;if(e+a>=u||n+a>=c)return!1;for(;e+a<u&&n+a<c&&!s.get(n+a,e+a)&&i[3]<r;)i[3]++,a++;if(e+a>=u||n+a>=c||i[3]>=r)return!1;for(;e+a<u&&n+a<c&&s.get(n+a,e+a)&&i[4]<r;)i[4]++,a++;if(i[4]>=r)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,n,r,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(n,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(n,u)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&i.get(n,u)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=e+1;u<a&&i.get(n,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(n,u)&&s[3]<r;)s[3]++,u++;if(u===a||s[3]>=r)return NaN;for(;u<a&&i.get(n,u)&&s[4]<r;)s[4]++,u++;if(s[4]>=r)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,n,r,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,n);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,n)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&i.get(u,n)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=e+1;u<a&&i.get(u,n);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,n)&&s[3]<r;)s[3]++,u++;if(u===a||s[3]>=r)return NaN;for(;u<a&&i.get(u,n)&&s[4]<r;)s[4]++,u++;if(s[4]>=r)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,n,r,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,r),s=this.crossCheckVertical(n,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new Td(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,n;if(this.possibleCenters.length<=1)return 0;var r=null;try{for(var o=Od(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=r)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,n,r,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=Od(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=Od(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,n,r,o=this.possibleCenters.length;if(o<3)throw new uu;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=Od(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var n=Math.abs(e.getEstimatedModuleSize()-i),r=Math.abs(t.getEstimatedModuleSize()-i);return n<r?-1:n>r?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=Od(a),w=m.next();!w.done;w=m.next()){s+=w.value.getEstimatedModuleSize()}}catch(t){n={error:t}}finally{try{w&&!w.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var n=Math.abs(e.getEstimatedModuleSize()-i),r=Math.abs(t.getEstimatedModuleSize()-i);return n<r?1:n>r?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Md=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(Zs.NEED_RESULT_POINT_CALLBACK);var e=new Rd(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var n=e.getTopLeft(),r=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(n,r,o);if(i<1)throw new uu("No pattern found in proccess finder.");var a=t.computeDimension(n,r,o,i),s=cd.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=r.getX()-n.getX()+o.getX(),d=r.getY()-n.getY()+o.getY(),h=1-3/u,f=Math.floor(n.getX()+h*(l-n.getX())),p=Math.floor(n.getY()+h*(d-n.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof uu))throw t}var m=t.createTransform(n,r,o,c,a),w=t.sampleGrid(this.image,m,a);return new ju(w,null===c?[o,n,r]:[o,n,r,c])},t.createTransform=function(t,e,n,r,o){var i,a,s,u,c=o-3.5;return null!==r?(i=r.getX(),a=r.getY(),u=s=c-3):(i=e.getX()-t.getX()+n.getX(),a=e.getY()-t.getY()+n.getY(),s=c,u=c),Zu.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,n.getX(),n.getY())},t.sampleGrid=function(t,e,n){return Qu.getInstance().sampleGridWithTransform(t,n,n,e)},t.computeDimension=function(t,e,n,r){var o=Vu.round(Gu.distance(t,e)/r),i=Vu.round(Gu.distance(t,n)/r),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new uu("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,n){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,n))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(n)?r/7:isNaN(r)?n/7:(n+r)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,n,r){var o=this.sizeOfBlackWhiteBlackRun(t,e,n,r),i=1,a=t-(n-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(r-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,n,r){var o=Math.abs(r-e)>Math.abs(n-t);if(o){var i=t;t=e,e=i,i=n,n=r,r=i}for(var a=Math.abs(n-t),s=Math.abs(r-e),u=-a/2,c=t<n?1:-1,l=e<r?1:-1,d=0,h=n+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Vu.distance(f,p,t,e);d++}if((u+=s)>0){if(p===r)break;p+=l,u-=a}}return 2===d?Vu.distance(n+c,r,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,n,r){var o=Math.floor(r*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new uu("Alignment top exceeds estimated module size.");var s=Math.max(0,n-o),u=Math.min(this.image.getHeight()-1,n+o);if(u-s<3*t)throw new uu("Alignment bottom exceeds estimated module size.");return new Id(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),kd=function(){function t(){this.decoder=new Ed}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,n){var r,o;if(null!=n&&void 0!==n.get(Zs.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,n),o=t.NO_POINTS}else{var a=new Md(e.getBlackMatrix()).detect(n);r=this.decoder.decodeBitMatrix(a.getBits(),n),o=a.getPoints()}r.getOther()instanceof yd&&r.getOther().applyMirroredCorrection(o);var s=new Cu(r.getText(),r.getRawBytes(),void 0,o,Iu.QR_CODE,void 0),u=r.getByteSegments();null!==u&&s.putMetadata(Tu.BYTE_SEGMENTS,u);var c=r.getECLevel();return null!==c&&s.putMetadata(Tu.ERROR_CORRECTION_LEVEL,c),r.hasStructuredAppend()&&(s.putMetadata(Tu.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),s.putMetadata(Tu.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(null===e||null===n)throw new uu;var r=this.moduleSize(e,t),o=e[1],i=n[1],a=e[0],s=n[0];if(a>=s||o>=i)throw new uu;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new uu;var u=Math.round((s-a+1)/r),c=Math.round((i-o+1)/r);if(u<=0||c<=0)throw new uu;if(c!==u)throw new uu;var l=Math.floor(r/2);o+=l;var d=(a+=l)+Math.floor((u-1)*r)-s;if(d>0){if(d>l)throw new uu;a-=d}var h=o+Math.floor((c-1)*r)-i;if(h>0){if(h>l)throw new uu;o-=h}for(var f=new au(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*r),m=0;m<u;m++)t.get(a+Math.floor(m*r),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var n=e.getHeight(),r=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<r&&i<n;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===r||i===n)throw new uu;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Nd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xd=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Vu.sum(t)},t.toIntArray=function(e){var n,r;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=Nd(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},t.getCodeword=function(e){var n=Ws.binarySearch(t.SYMBOL_TABLE,262143&e);return n<0?-1:(t.CODEWORD_TABLE[n]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Pd=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Bd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fd=function(){function t(){}return t.detectMultiple=function(e,n,r){var o=e.getBlackMatrix(),i=t.detect(r,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(r,o)),new Pd(o,i)},t.detect=function(e,n){for(var r,o,i=new Array,a=0,s=0,u=!1;a<n.getHeight();){var c=t.findVertices(n,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(r=void 0,Bd(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,n,r){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,n,r,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(r=Math.trunc(a[4].getX()),n=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,n,r,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,n){for(var r=0;r<n.length;r++)t[n[r]]=e[r]},t.findRowsWithPattern=function(e,n,r,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<n;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,r,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,r,!1,a,c))){o++;break}f=h}s[0]=new Gu(f[0],o),s[1]=new Gu(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<n;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,r,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new Gu(h[0],l),s[3]=new Gu(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&Ws.fill(s,null),s},t.findGuardPattern=function(e,n,r,o,i,a,s){Ws.fillWithin(s,0,s.length,0);for(var u=n,c=0;e.get(u,r)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,r)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],zs.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,n){for(var r=t.length,o=0,i=0,a=0;a<r;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;n*=s;for(var u=0,c=0;c<r;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>n)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Ld=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zd=function(){function t(t,e){if(0===e.length)throw new xs;this.field=t;var n=e.length;if(n>1&&0===e[0]){for(var r=1;r<n&&0===e[r];)r++;r===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-r),zs.arraycopy(e,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,n;if(0===t)return this.getCoefficient(0);if(1===t){var r=0;try{for(var o=Ld(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;r=this.field.add(r,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new xs("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var n=this.coefficients,r=e.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;zs.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=this.field.add(n[s-a],r[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new xs("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new xs("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var n=this.coefficients,r=n.length,o=e.coefficients,i=o.length,a=new Int32Array(r+i-1),s=0;s<r;s++)for(var u=n[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,n=new Int32Array(e),r=0;r<e;r++)n[r]=this.field.subtract(0,this.coefficients[r]);return new t(this.field,n)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var n=this.coefficients.length,r=new Int32Array(n),o=0;o<n;o++)r[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,r)},t.prototype.multiplyByMonomial=function(e,n){if(e<0)throw new xs;if(0===n)return new t(this.field,new Int32Array([0]));for(var r=this.coefficients.length,o=new Int32Array(r+e),i=0;i<r;i++)o[i]=this.field.multiply(this.coefficients[i],n);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new iu,e=this.getDegree();e>=0;e--){var n=this.getCoefficient(e);0!==n&&(n<0?(t.append(" - "),n=-n):t.length()>0&&t.append(" + "),0!==e&&1===n||t.append(n),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Ud=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new xs;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new ku;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Vd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hd=function(t){function e(e,n){var r=t.call(this)||this;r.modulus=e,r.expTable=new Int32Array(e),r.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)r.expTable[i]=o,o=o*n%e;for(i=0;i<e-1;i++)r.logTable[r.expTable[i]]=i;return r.zero=new zd(r,new Int32Array([0])),r.one=new zd(r,new Int32Array([1])),r}return Vd(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new xs;if(0===e)return this.zero;var n=new Int32Array(t+1);return n[0]=e,new zd(this,n)},e.PDF417_GF=new e(xd.NUMBER_OF_CODEWORDS,3),e}(Ud),Gd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jd=function(){function t(){this.field=Hd.PDF417_GF}return t.prototype.decode=function(t,e,n){for(var r,o,i=new zd(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=n)try{for(var d=Gd(n),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new zd(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}var m=new zd(this.field,a),w=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),v=w[0],y=w[1],_=this.findErrorLocations(v),E=this.findErrorMagnitudes(y,v,_);for(u=0;u<_.length;u++){var b=t.length-1-this.field.log(_[u]);if(b<0)throw Fs.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return _.length},t.prototype.runEuclideanAlgorithm=function(t,e,n){if(t.getDegree()<e.getDegree()){var r=t;t=e,e=r}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(n/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Fs.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Fs.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),n=new Int32Array(e),r=0,o=1;o<this.field.getSize()&&r<e;o++)0===t.evaluateAt(o)&&(n[r]=this.field.inverse(o),r++);if(r!==e)throw Fs.getChecksumInstance();return n},t.prototype.findErrorMagnitudes=function(t,e,n){for(var r=e.getDegree(),o=new Int32Array(r),i=1;i<=r;i++)o[r-i]=this.field.multiply(i,e.getCoefficient(i));var a=new zd(this.field,o),s=n.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(n[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),Wd=function(){function t(e,n,r,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,n,r,o,i)}return t.prototype.constructor_1=function(t,e,n,r,o){var i=null==e||null==n,a=null==r||null==o;if(i&&a)throw new uu;i?(e=new Gu(0,r.getY()),n=new Gu(0,o.getY())):a&&(r=new Gu(t.getWidth()-1,e.getY()),o=new Gu(t.getWidth()-1,n.getY())),this.image=t,this.topLeft=e,this.bottomLeft=n,this.topRight=r,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),n.getX())),this.maxX=Math.trunc(Math.max(r.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),r.getY())),this.maxY=Math.trunc(Math.max(n.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,n){return null==e?n:null==n?e:new t(e.image,e.topLeft,e.bottomLeft,n.topRight,n.bottomRight)},t.prototype.addMissingRows=function(e,n,r){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=r?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new Gu(u.getX(),c);r?o=l:a=l}if(n>0){var d=r?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+n);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new Gu(d.getX(),h);r?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Xd=function(){function t(t,e,n,r){this.columnCount=t,this.errorCorrectionLevel=r,this.rowCountUpperPart=e,this.rowCountLowerPart=n,this.rowCount=e+n}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Yd=function(){function t(){this.buffer=""}return t.form=function(t,e){var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.buffer+=t.form(e,n)},t.prototype.toString=function(){return this.buffer},t}(),qd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zd=function(){function t(t){this.boundingBox=new Wd(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var n=this.getCodeword(e);if(null!=n)return n;for(var r=1;r<t.MAX_NEARBY_DISTANCE;r++){var o=this.imageRowToCodewordIndex(e)-r;if(o>=0&&null!=(n=this.codewords[o]))return n;if((o=this.imageRowToCodewordIndex(e)+r)<this.codewords.length&&null!=(n=this.codewords[o]))return n}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,n=new Yd,r=0;try{for(var o=qd(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?n.format("%3d: %3d|%3d%n",r++,a.getRowNumber(),a.getValue()):n.format("%3d: | %n",r++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Kd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Qd=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,n=-1,r=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>n?(n=i(),(r=[]).push(o())):i()===n&&r.push(o())};try{for(var i=Kd(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=$d(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return xd.toIntArray(r)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),Jd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),th=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eh=function(t){function e(e,n){var r=t.call(this,e)||this;return r._isLeft=n,r}return Jd(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var n=th(this.getCodewords()),r=n.next();!r.done;r=n.next()){var o=r.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var n=this.getBoundingBox(),r=this._isLeft?n.getTopLeft():n.getTopRight(),o=this._isLeft?n.getBottomLeft():n.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,n=this.getBarcodeMetadata();if(null==n)return null;this.adjustIncompleteIndicatorColumnRowNumbers(n);var r=new Int32Array(n.getRowCount());try{for(var o=th(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=r.length)continue;r[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),n=this._isLeft?e.getTopLeft():e.getTopRight(),r=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,n=this.getCodewords(),r=new Qd,o=new Qd,i=new Qd,a=new Qd;try{for(var s=th(n),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:r.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===r.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||r.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<xd.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>xd.MAX_ROWS_IN_BARCODE)return null;var h=new Xd(r.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(n,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(null!=t[n]){var o=r.getValue()%30,i=r.getRowNumber();if(i>e.getRowCount())t[n]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[n]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[n]=null);break;case 2:o+1!==e.getColumnCount()&&(t[n]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Zd),nh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rh=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=xd.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var n=this.detectionResultColumns[e].getCodewords(),r=0;r<n.length;r++)null!=n[r]&&(n[r].hasValidRowNumber()||this.adjustRowNumbers(e,r,n));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<t.length;n++)if(null!=t[n]&&null!=e[n]&&t[n].getRowNumber()===e[n].getRowNumber())for(var r=1;r<=this.barcodeColumnCount;r++){var o=this.detectionResultColumns[r].getCodewords()[n];null!=o&&(o.setRowNumber(t[n].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[r].getCodewords()[n]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,n=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<n.length;r++)if(null!=n[r])for(var o=n[r].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[r];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,n=this.detectionResultColumns[0].getCodewords(),r=0;r<n.length;r++)if(null!=n[r])for(var o=n[r].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[r];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,n){return null==n||n.hasValidRowNumber()||(n.isValidRowNumber(t)?(n.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,n,r){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=r[n],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[n],c[3]=u[n],n>0&&(c[0]=r[n-1],c[4]=s[n-1],c[5]=u[n-1]),n>1&&(c[8]=r[n-2],c[10]=s[n-2],c[11]=u[n-2]),n<r.length-1&&(c[1]=r[n+1],c[6]=s[n+1],c[7]=u[n+1]),n<r.length-2&&(c[9]=r[n+2],c[12]=s[n+2],c[13]=u[n+2]);try{for(var l=nh(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new Yd,n=0;n<t.getCodewords().length;n++){e.format("CW %3d:",n);for(var r=0;r<this.barcodeColumnCount+2;r++)if(null!=this.detectionResultColumns[r]){var o=this.detectionResultColumns[r].getCodewords()[n];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),oh=function(){function t(e,n,r,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(n),this.bucket=Math.trunc(r),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),ih=function(){function t(){}return t.initialize=function(){for(var e=0;e<xd.SYMBOL_TABLE.length;e++)for(var n=xd.SYMBOL_TABLE[e],r=1&n,o=0;o<xd.BARS_IN_MODULE;o++){for(var i=0;(1&n)===r;)i+=1,n>>=1;r=1&n,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(xd.BARS_IN_MODULE)),t.RATIOS_TABLE[e][xd.BARS_IN_MODULE-o-1]=Math.fround(i/xd.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var n=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==n?n:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Vu.sum(t),n=new Int32Array(xd.BARS_IN_MODULE),r=0,o=0,i=0;i<xd.MODULES_IN_CODEWORD;i++){var a=e/(2*xd.MODULES_IN_CODEWORD)+i*e/xd.MODULES_IN_CODEWORD;o+t[r]<=a&&(o+=t[r],r++),n[r]++}return n},t.getDecodedCodewordValue=function(e){var n=t.getBitValue(e);return-1===xd.getCodeword(n)?-1:n},t.getBitValue=function(t){for(var e=0,n=0;n<t.length;n++)for(var r=0;r<t[n];r++)e=e<<1|(n%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var n=Vu.sum(e),r=new Array(xd.BARS_IN_MODULE);if(n>1)for(var o=0;o<r.length;o++)r[o]=Math.fround(e[o]/n);var i=Hu.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<xd.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-r[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=xd.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(xd.SYMBOL_TABLE.length).map((function(t){return new Array(xd.BARS_IN_MODULE)})),t}(),ah=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),sh=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),uh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return uh(e,t),e.kind="NullPointerException",e}(Rs),lh=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,n){if(null==t)throw new ch;if(e<0||e>t.length||n<0||e+n>t.length||e+n<0)throw new Vs;if(0!==n)for(var r=0;r<n;r++)this.write(t[e+r])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),dh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dh(e,t),e}(Rs),fh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ph=function(t){function e(e){void 0===e&&(e=32);var n=t.call(this)||this;if(n.count=0,e<0)throw new xs("Negative initial size: "+e);return n.buf=new Uint8Array(e),n}return fh(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new hh;e=Xs.MAX_VALUE}this.buf=Ws.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,n){if(e<0||e>t.length||n<0||e+n-t.length>0)throw new Vs;this.ensureCapacity(this.count+n),zs.arraycopy(t,e,this.buf,this.count,n),this.count+=n},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return Ws.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(lh);function gh(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Ai)return Ai.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function mh(t){if(void 0===md&&(md=gh()),null===md)throw new Error("BigInt is not supported!");return md(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(gd||(gd={}));var wh=function(){function t(){}return t.decode=function(e,n){var r=new iu(""),o=tu.ISO8859_1;r.enableDecoding(o);for(var i=1,a=e[i++],s=new ah;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,r);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,r);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,r);break;case t.ECI_CHARSET:tu.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new $s;default:i--,i=t.textCompaction(e,i,r)}if(!(i<e.length))throw $s.getFormatInstance();a=e[i++]}if(0===r.length())throw $s.getFormatInstance();var u=new Du(null,r.toString(),null,n);return u.setOther(s),u},t.decodeMacroBlock=function(e,n,r){if(n+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw $s.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,n++)o[i]=e[n];r.setSegmentIndex(Xs.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new iu;n=t.textCompaction(e,n,a),r.setFileId(a.toString());var s=-1;for(e[n]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=n+1);n<e[0];)switch(e[n]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++n]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new iu;n=t.textCompaction(e,n+1,u),r.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new iu;n=t.textCompaction(e,n+1,c),r.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new iu;n=t.textCompaction(e,n+1,l),r.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new iu;n=t.numericCompaction(e,n+1,d),r.setSegmentCount(Xs.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new iu;n=t.numericCompaction(e,n+1,h),r.setTimestamp(sh.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new iu;n=t.numericCompaction(e,n+1,f),r.setChecksum(Xs.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new iu;n=t.numericCompaction(e,n+1,p),r.setFileSize(sh.parseLong(p.toString()));break;default:throw $s.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:n++,r.setLastSegment(!0);break;default:throw $s.getFormatInstance()}if(-1!==s){var g=n-s;r.isLastSegment()&&g--,r.setOptionalData(Ws.copyOfRange(e,s,s+g))}return n},t.textCompaction=function(e,n,r){for(var o=new Int32Array(2*(e[0]-n)),i=new Int32Array(2*(e[0]-n)),a=0,s=!1;n<e[0]&&!s;){var u=e[n++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:n--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[n++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,r),n},t.decodeTextCompaction=function(e,n,r,o){for(var i=gd.ALPHA,a=gd.ALPHA,s=0;s<r;){var u=e[s],c="";switch(i){case gd.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=gd.LOWER;break;case t.ML:i=gd.MIXED;break;case t.PS:a=i,i=gd.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}break;case gd.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=gd.ALPHA_SHIFT;break;case t.ML:i=gd.MIXED;break;case t.PS:a=i,i=gd.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}break;case gd.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=gd.PUNCT;break;case 26:c=" ";break;case t.LL:i=gd.LOWER;break;case t.AL:i=gd.ALPHA;break;case t.PS:a=i,i=gd.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}break;case gd.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=gd.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}break;case gd.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}break;case gd.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=gd.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=gd.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,n,r,o,i){var a=new ph,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=n[o++];o<n[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=n[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(mh(u)>>mh(8*(5-h))));u=0,s=0}}o===n[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<n[0]&&!c;){var p=n[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(mh(u)>>mh(8*(5-h))));u=0,s=0}}}return i.append(ru.decode(a.toByteArray(),r)),o},t.numericCompaction=function(e,n,r){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);n<e[0]&&!i;){var s=e[n++];if(n===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:n--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(r.append(t.decodeBase900toBase10(a,o)),o=0)}return n},t.decodeBase900toBase10=function(e,n){for(var r=mh(0),o=0;o<n;o++)r+=t.EXP900[n-o-1]*mh(e[o]);var i=r.toString();if("1"!==i.charAt(0))throw new $s;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=gh()?function(){var t=[];t[0]=mh(1);var e=mh(900);t[1]=e;for(var n=2;n<16;n++)t[n]=t[n-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),vh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yh=function(){function t(){}return t.decode=function(e,n,r,o,i,a,s){for(var u,c=new Wd(e,n,r,o,i),l=null,d=null,h=!0;;h=!1){if(null!=n&&(l=t.getRowIndicatorColumn(e,c,n,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw uu.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var w=g?m:p-m;if(void 0===u.getDetectionResultColumn(w)){var v=void 0;v=0===w||w===p?new eh(c,0===w):new Zd(c),u.setDetectionResultColumn(w,v);for(var y=-1,_=y,E=c.getMinY();E<=c.getMaxY();E++){if((y=t.getStartColumn(u,w,E,g))<0||y>c.getMaxX()){if(-1===_)continue;y=_}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,y,E,a,s);null!=b&&(v.setCodeword(E,b),_=y,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,n){if(null==e&&null==n)return null;var r=t.getBarcodeMetadata(e,n);if(null==r)return null;var o=Wd.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(n));return new rh(r,o)},t.adjustBoundingBox=function(e){var n,r;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=vh(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,n,r=-1;try{for(var o=vh(t),i=o.next();!i.done;i=o.next()){var a=i.value;r=Math.max(r,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r},t.getBarcodeMetadata=function(t,e){var n,r;return null==t||null==(n=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(r=e.getBarcodeMetadata())?n:n.getColumnCount()!==r.getColumnCount()&&n.getErrorCorrectionLevel()!==r.getErrorCorrectionLevel()&&n.getRowCount()!==r.getRowCount()?null:n},t.getRowIndicatorColumn=function(e,n,r,o,i,a){for(var s=new eh(n,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(r.getX())),d=Math.trunc(Math.trunc(r.getY()));d<=n.getMaxY()&&d>=n.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,n){var r=n[0][1],o=r.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>xd.MAX_CODEWORDS_IN_BARCODE)throw uu.getNotFoundInstance();r.setValue(i)}else o[0]!==i&&r.setValue(i)},t.createDecoderResult=function(e){var n=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,n);for(var r=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=n[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?r.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,xd.toIntArray(r),xd.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,n,r,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)n[o[u]]=i[u][a[u]];try{return t.decodeCodewords(n,e,r)}catch(t){if(!(t instanceof Fs))throw t}if(0===a.length)throw Fs.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Fs.getChecksumInstance()}}throw Fs.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,n,r,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Qd;var u=0;try{for(var c=vh(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(r=void 0,vh(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,n,r,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,n-s)&&(u=e.getDetectionResultColumn(n-s).getCodeword(r)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(n).getCodewordNearby(r)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,n-s)&&(u=e.getDetectionResultColumn(n-s).getCodewordNearby(r)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,n-s);){n-=s;try{for(var l=(i=void 0,vh(e.getDetectionResultColumn(n).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,n,r,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,n,r,o,i,a);var c,l=t.getModuleBitCount(e,n,r,o,i,a);if(null==l)return null;var d=Vu.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=ih.getDecodedValue(l),g=xd.getCodeword(p);return-1===g?null:new oh(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,n,r,o,i){for(var a=o,s=new Int32Array(8),u=0,c=r?1:-1,l=r;(r?a<n:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(r?n:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,n,r,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=n:s<r)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,n,r){return n-t.CODEWORD_SKEW_SIZE<=e&&e<=r+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,n,r){if(0===e.length)throw $s.getFormatInstance();var o=1<<n+1,i=t.correctErrors(e,r,o);t.verifyCodewordCount(e,o);var a=wh.decode(e,""+n);return a.setErrorsCorrected(i),a.setErasures(r.length),a},t.correctErrors=function(e,n,r){if(null!=n&&n.length>r/2+t.MAX_ERRORS||r<0||r>t.MAX_EC_CODEWORDS)throw Fs.getChecksumInstance();return t.errorCorrection.decode(e,r,n)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw $s.getFormatInstance();var n=t[0];if(n>t.length)throw $s.getFormatInstance();if(0===n){if(!(e<t.length))throw $s.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),n=0,r=e.length-1;!((1&t)!==n&&(n=1&t,--r<0));)e[r]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new Yd,n=0;n<t.length;n++){e.format("Row %2d: ",n);for(var r=0;r<t[n].length;r++){var o=t[n][r];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new jd,t}(),_h=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Eh=function(){function t(){}return t.prototype.decode=function(e,n){void 0===n&&(n=null);var r=t.decode(e,n,!1);if(null==r||0===r.length||null==r[0])throw uu.getNotFoundInstance();return r[0]},t.prototype.decodeMultiple=function(e,n){void 0===n&&(n=null);try{return t.decode(e,n,!0)}catch(t){if(t instanceof $s||t instanceof Fs)throw uu.getNotFoundInstance();throw t}},t.decode=function(e,n,r){var o,i,a=new Array,s=Fd.detectMultiple(e,n,r);try{for(var u=_h(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=yh.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new Cu(d.getText(),d.getRawBytes(),void 0,l,Iu.PDF_417);h.putMetadata(Tu.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(Tu.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Xs.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*xd.MODULES_IN_CODEWORD/xd.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*xd.MODULES_IN_CODEWORD/xd.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*xd.MODULES_IN_CODEWORD/xd.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*xd.MODULES_IN_CODEWORD/xd.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),bh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return bh(e,t),e.kind="ReaderException",e}(Rs),Ah=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ih=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(Zs.TRY_HARDER),n=null==t?null:t.get(Zs.POSSIBLE_FORMATS),r=new Array;if(null!=n){var o=n.some((function(t){return t===Iu.UPC_A||t===Iu.UPC_E||t===Iu.EAN_13||t===Iu.EAN_8||t===Iu.CODABAR||t===Iu.CODE_39||t===Iu.CODE_93||t===Iu.CODE_128||t===Iu.ITF||t===Iu.RSS_14||t===Iu.RSS_EXPANDED}));o&&!e&&r.push(new Fl(t)),n.includes(Iu.QR_CODE)&&r.push(new kd),n.includes(Iu.DATA_MATRIX)&&r.push(new Jl),n.includes(Iu.AZTEC)&&r.push(new ec),n.includes(Iu.PDF_417)&&r.push(new Eh),o&&e&&r.push(new Fl(t))}0===r.length&&(e||r.push(new Fl(t)),r.push(new kd),r.push(new Jl),r.push(new ec),r.push(new Eh),e&&r.push(new Fl(t))),this.readers=r},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var n=Ah(this.readers),r=n.next();!r.done;r=n.next()){r.value.reset()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,n;if(null===this.readers)throw new Ch("No readers where selected, nothing can be read.");try{for(var r=Ah(this.readers),o=r.next();!o.done;o=r.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof Ch)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}throw new uu("No MultiFormat Readers were able to detect the code.")},t}(),Sh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=500);var r=new Ih;return r.setHints(e),t.call(this,r,n)||this}Sh(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(bu);var Th=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Eh,e)||this}Th(e,t)}(bu);var Dh,Oh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new kd,e)||this}Oh(e,t)}(bu),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(Dh||(Dh={}));var Rh=Dh,Mh=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new Ru(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var n=e[e.length-1],r=this.field,o=e.length;o<=t;o++){var i=n.multiply(new Ru(r,Int32Array.from([1,r.exp(o-1+r.getGeneratorBase())])));e.push(i),n=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new xs("No error correction bytes");var n=t.length-e;if(n<=0)throw new xs("No data bytes provided");var r=this.buildGenerator(e),o=new Int32Array(n);zs.arraycopy(t,0,o,0,n);for(var i=new Ru(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(r)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[n+u]=0;zs.arraycopy(a,0,t,n+s,a.length)},t}(),kh=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=r[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===r[a+1][u]&&c===r[a+1][u+1]&&n++}return t.N2*n},t.applyMaskPenaltyRule3=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=r[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&n++,a+6<i&&1===r[a][s]&&0===r[a+1][s]&&1===r[a+2][s]&&1===r[a+3][s]&&1===r[a+4][s]&&0===r[a+5][s]&&1===r[a+6][s]&&(t.isWhiteVertical(r,s,a-4,a)||t.isWhiteVertical(r,s,a+7,a+11))&&n++}return n*t.N3},t.isWhiteHorizontal=function(t,e,n){e=Math.max(e,0),n=Math.min(n,t.length);for(var r=e;r<n;r++)if(1===t[r])return!1;return!0},t.isWhiteVertical=function(t,e,n,r){n=Math.max(n,0),r=Math.min(r,t.length);for(var o=n;o<r;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=r[a],u=0;u<o;u++)1===s[u]&&n++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*n-c)/c)*t.N4},t.getDataMaskBit=function(t,e,n){var r,o;switch(t){case 0:r=n+e&1;break;case 1:r=1&n;break;case 2:r=e%3;break;case 3:r=(n+e)%3;break;case 4:r=Math.floor(n/2)+Math.floor(e/3)&1;break;case 5:r=(1&(o=n*e))+o%3;break;case 6:r=(1&(o=n*e))+o%3&1;break;case 7:r=(o=n*e)%3+(n+e&1)&1;break;default:throw new xs("Invalid mask pattern: "+t)}return 0===r},t.applyMaskPenaltyRule1Internal=function(e,n){for(var r=0,o=n?e.getHeight():e.getWidth(),i=n?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=n?a[s][l]:a[l][s];d===c?u++:(u>=5&&(r+=t.N1+(u-5)),u=1,c=d)}u>=5&&(r+=t.N1+(u-5))}return r},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),Nh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xh=function(){function t(t,e){this.width=t,this.height=e;for(var n=new Array(e),r=0;r!==e;r++)n[r]=new Uint8Array(t);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,n){this.bytes[e][t]=n},t.prototype.setBoolean=function(t,e,n){this.bytes[e][t]=n?1:0},t.prototype.clear=function(t){var e,n;try{for(var r=Nh(this.bytes),o=r.next();!o.done;o=r.next()){var i=o.value;Ws.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;if(this.width!==n.width)return!1;if(this.height!==n.height)return!1;for(var r=0,o=this.height;r<o;++r)for(var i=this.bytes[r],a=n.bytes[r],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new iu,e=0,n=this.height;e<n;++e){for(var r=this.bytes[e],o=0,i=this.width;o<i;++o)switch(r[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),Ph=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new iu;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Bh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bh(e,t),e.kind="WriterException",e}(Rs),Lh=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,n,r,o,i){t.clearMatrix(i),t.embedBasicPatterns(r,i),t.embedTypeInfo(n,o,i),t.maybeEmbedVersionInfo(r,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,n){t.embedPositionDetectionPatternsAndSeparators(n),t.embedDarkDotAtLeftBottomCorner(n),t.maybeEmbedPositionAdjustmentPatterns(e,n),t.embedTimingPatterns(n)},t.embedTypeInfo=function(e,n,r){var o=new Ys;t.makeTypeInfoBits(e,n,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(r.setBoolean(c,l,s),i<8){var d=r.getWidth()-i-1,h=8;r.setBoolean(d,h,s)}else{d=8,h=r.getHeight()-7+(i-8);r.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,n){if(!(e.getVersionNumber()<7)){var r=new Ys;t.makeVersionInfoBits(e,r);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=r.get(o);o--,n.setBoolean(i,n.getHeight()-11+a,s),n.setBoolean(n.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,n,r){for(var o=0,i=-1,a=r.getWidth()-1,s=r.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<r.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(r.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==n&&kh.getDataMaskBit(n,c,s)&&(l=!l),r.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Fh("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Xs.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,n){if(0===n)throw new xs("0 polynomial");var r=t.findMSBSet(n);for(e<<=r-1;t.findMSBSet(e)>=r;)e^=n<<t.findMSBSet(e)-r;return e},t.makeTypeInfoBits=function(e,n,r){if(!Ph.isValidMaskPattern(n))throw new Fh("Invalid mask pattern");var o=e.getBits()<<3|n;r.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);r.appendBits(i,10);var a=new Ys;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),r.xor(a),15!==r.getSize())throw new Fh("should not happen but we got: "+r.getSize())},t.makeVersionInfoBits=function(e,n){n.appendBits(e.getVersionNumber(),6);var r=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(n.appendBits(r,12),18!==n.getSize())throw new Fh("should not happen but we got: "+n.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var n=8;n<e.getWidth()-8;++n){var r=(n+1)%2;t.isEmpty(e.get(n,6))&&e.setNumber(n,6,r),t.isEmpty(e.get(6,n))&&e.setNumber(6,n,r)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Fh;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,n,r){for(var o=0;o<8;++o){if(!t.isEmpty(r.get(e+o,n)))throw new Fh;r.setNumber(e+o,n,0)}},t.embedVerticalSeparationPattern=function(e,n,r){for(var o=0;o<7;++o){if(!t.isEmpty(r.get(e,n+o)))throw new Fh;r.setNumber(e,n+o,0)}},t.embedPositionAdjustmentPattern=function(e,n,r){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)r.setNumber(e+a,n+o,i[a])},t.embedPositionDetectionPattern=function(e,n,r){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)r.setNumber(e+a,n+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var n=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-n,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-n,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,n){if(!(e.getVersionNumber()<2))for(var r=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(n.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,n)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),zh=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Uh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return kh.applyMaskPenaltyRule1(t)+kh.applyMaskPenaltyRule2(t)+kh.applyMaskPenaltyRule3(t)+kh.applyMaskPenaltyRule4(t)},t.encode=function(e,n,r){void 0===r&&(r=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==r&&void 0!==r.get(Rh.CHARACTER_SET);i&&(o=r.get(Rh.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new Ys;if(a===wd.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=tu.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new Ys;if(this.appendBytes(e,a,l,o),null!==r&&void 0!==r.get(Rh.QR_VERSION)){var d=Number.parseInt(r.get(Rh.QR_VERSION).toString(),10);c=cd.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,n))throw new Fh("Data too big for requested version")}else c=this.recommendVersion(n,a,s,l);var f=new Ys;f.appendBitArray(s);var p=a===wd.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(n),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var w=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),v=new Ph;v.setECLevel(n),v.setMode(a),v.setVersion(c);var y=c.getDimensionForVersion(),_=new xh(y,y),E=this.chooseMaskPattern(w,n,c,_);return v.setMaskPattern(E),Lh.buildMatrix(w,n,c,E,_),v.setMatrix(_),v},t.recommendVersion=function(t,e,n,r){var o=this.calculateBitsNeeded(e,n,r,cd.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,n,r,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,n,r){return e.getSize()+t.getCharacterCountBits(r)+n.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,n){if(void 0===n&&(n=null),tu.SJIS.getName()===n&&this.isOnlyDoubleByteKanji(e))return wd.KANJI;for(var r=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))r=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return wd.BYTE;o=!0}}return o?wd.ALPHANUMERIC:r?wd.NUMERIC:wd.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=ru.encode(t,tu.SJIS)}catch(t){return!1}var n=e.length;if(n%2!=0)return!1;for(var r=0;r<n;r+=2){var o=255&e[r];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,n,r){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Ph.NUM_MASK_PATTERNS;a++){Lh.buildMatrix(t,e,n,a,r);var s=this.calculateMaskPenalty(r);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,n){for(var r=1;r<=40;r++){var o=cd.getVersionForNumber(r);if(t.willFit(e,o,n))return o}throw new Fh("Data too big")},t.willFit=function(t,e,n){return e.getTotalCodewords()-e.getECBlocksForLevel(n).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var n=8*t;if(e.getSize()>n)throw new Fh("data bits cannot fit in the QR Code"+e.getSize()+" > "+n);for(var r=0;r<4&&e.getSize()<n;++r)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(r=o;r<8;r++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(r=0;r<i;++r)e.appendBits(1&r?17:236,8);if(e.getSize()!==n)throw new Fh("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,n,r,o,i){if(r>=n)throw new Fh("Block ID too large");var a=t%n,s=n-a,u=Math.floor(t/n),c=u+1,l=Math.floor(e/n),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Fh("EC bytes mismatch");if(n!==s+a)throw new Fh("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Fh("Total bytes mismatch");r<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,n,r,o){var i,a,s,u;if(e.getSizeInBytes()!==r)throw new Fh("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(n,r,o,f,p,g);var m=p[0],w=new Uint8Array(m);e.toBytes(8*c,w,0,m);var v=t.generateECBytes(w,g[0]);h.push(new zh(w,v)),l=Math.max(l,m),d=Math.max(d,v.length),c+=p[0]}if(r!==c)throw new Fh("Data bytes does not match offset");var y=new Ys;for(f=0;f<l;++f)try{for(var _=(i=void 0,Uh(h)),E=_.next();!E.done;E=_.next()){f<(w=E.value.getDataBytes()).length&&y.appendBits(w[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Uh(h)),C=b.next();!C.done;C=b.next()){f<(v=C.value.getErrorCorrectionBytes()).length&&y.appendBits(v[f],8)}}catch(t){s={error:t}}finally{try{C&&!C.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(n!==y.getSizeInBytes())throw new Fh("Interleaving error: "+n+" and "+y.getSizeInBytes()+" differ.");return y},t.generateECBytes=function(t,e){for(var n=t.length,r=new Int32Array(n+e),o=0;o<n;o++)r[o]=255&t[o];new Mh(xu.QR_CODE_FIELD_256).encode(r,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=r[n+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,n,r){var o=n.getCharacterCountBits(e);if(t>=1<<o)throw new Fh(t+" is bigger than "+((1<<o)-1));r.appendBits(t,o)},t.appendBytes=function(e,n,r,o){switch(n){case wd.NUMERIC:t.appendNumericBytes(e,r);break;case wd.ALPHANUMERIC:t.appendAlphanumericBytes(e,r);break;case wd.BYTE:t.append8BitBytes(e,r,o);break;case wd.KANJI:t.appendKanjiBytes(e,r);break;default:throw new Fh("Invalid mode: "+n)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var n=t.getDigit(e);return n>=0&&n<=9},t.appendNumericBytes=function(e,n){for(var r=e.length,o=0;o<r;){var i=t.getDigit(e.charAt(o));if(o+2<r){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));n.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<r){a=t.getDigit(e.charAt(o+1));n.appendBits(10*i+a,7),o+=2}else n.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,n){for(var r=e.length,o=0;o<r;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Fh;if(o+1<r){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Fh;n.appendBits(45*i+a,11),o+=2}else n.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,n){var r;try{r=ru.encode(t,n)}catch(t){throw new Fh(t)}for(var o=0,i=r.length;o!==i;o++){var a=r[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var n;try{n=ru.encode(t,tu.SJIS)}catch(t){throw new Fh(t)}for(var r=n.length,o=0;o<r;o+=2){var i=(255&n[o])<<8&4294967295|255&n[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Fh("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(wd.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=tu.UTF8.getName()}();var Vh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=n,c.dataHeight=r,c.left=o,c.top=i,o+a>n||i+s>r)throw new xs("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Vh(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new xs("Requested row is outside the image: "+t);var n=this.getWidth();(null==e||e.length<n)&&(e=new Uint8ClampedArray(n));var r=(t+this.top)*this.dataWidth+this.left;return zs.arraycopy(this.yuvData,r,e,0,n),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var n=t*e,r=new Uint8ClampedArray(n),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return zs.arraycopy(this.yuvData,o,r,0,n),r;for(var i=0;i<e;i++){var a=i*t;zs.arraycopy(this.yuvData,o,r,a,t),o+=this.dataWidth}return r},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,n,r,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+n,r,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,r=new Int32Array(t*n),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<n;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];r[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return r},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var n=this.yuvData,r=0,o=this.top*this.dataWidth+this.left;r<e;r++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=n[a];n[a]=n[s],n[s]=u}},e.prototype.invert=function(){return new gu(this)},e.THUMBNAIL_SCALE_FACTOR=2}(fu);var Hh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r,o,i,a,s){var u=t.call(this,n,r)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=n*r,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=n),void 0===i&&(u.dataHeight=r),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+n>u.dataWidth||u.top+r>u.dataHeight)throw new xs("Crop rectangle does not fit within image data.");return u}Hh(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new xs("Requested row is outside the image: "+t);var n=this.getWidth();(null==e||e.length<n)&&(e=new Uint8ClampedArray(n));var r=(t+this.top)*this.dataWidth+this.left;return zs.arraycopy(this.luminances,r,e,0,n),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var n=t*e,r=new Uint8ClampedArray(n),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return zs.arraycopy(this.luminances,o,r,0,n),r;for(var i=0;i<e;i++){var a=i*t;zs.arraycopy(this.luminances,o,r,a,t),o+=this.dataWidth}return r},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,n,r,o){return new e(this.luminances,r,o,this.dataWidth,this.dataHeight,this.left+t,this.top+n)},e.prototype.invert=function(){return new gu(this)}}(fu);var Gh,jh,Wh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wh(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(tu),Yh=function(){function t(){}return t.ISO_8859_1=tu.ISO8859_1,t}();Gh=function(t,e){for(var n=1,r=0;r<255;r++)e[r]=n,t[n]=r,(n*=2)>=256&&(n^=301);return{LOG:t,ALOG:e}}([],[]),Gh.LOG,Gh.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(jh||(jh={}));var qh,Zh="[)>05",Kh="[)>06",$h=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(ff.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),n=ff.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(n!==this.getEncodingMode())switch(n){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+n)}else ff.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(ff.isDigit(t)&&ff.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),Qh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new iu;for(e.append(0);t.hasMoreCharacters();){var n=t.getCurrentChar();if(e.append(n),t.pos++,ff.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var r=e.length()-1,o=t.getCodewordCount()+r+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(r<=249)e.setCharAt(0,ou.getCharAt(r));else{if(!(r<=1555))throw new Error("Message length not in valid ranges: "+r);e.setCharAt(0,ou.getCharAt(Math.floor(r/250)+249)),e.insert(1,ou.getCharAt(r%250))}var a=0;for(n=e.length();a<n;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var n=t+(149*e%255+1);return n<=255?n:n-256},t}(),Jh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new iu,n=0,r=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,n=this.encodeChar(i,e),e.length()%3==0&&(r=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(n>3||1!==u))&&(t.pos=r)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new iu;t.hasMoreCharacters();){var n=t.getCurrentChar();t.pos++;var r=this.encodeChar(n,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new iu;for(e.length()%3==2&&2!==a&&(r=this.backtrackOneCharacter(t,e,s,r));e.length()%3==1&&(r>3||1!==a);)r=this.backtrackOneCharacter(t,e,s,r);break}if(e.length()%3==0)if(ff.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,n,r){var o=e.length(),i=e.toString().substring(0,o-r);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return r=this.encodeChar(a,n),t.resetSymbolInfo(),r},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(3);e.setLengthToZero(),e.append(n)},t.prototype.handleEOD=function(t,e){var n=Math.floor(e.length()/3*2),r=e.length()%3,o=t.getCodewordCount()+n;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===r){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===r){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==r)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var n=2;return n+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,n=e/256,r=e%256,o=new iu;return o.append(n),o.append(r),o.toString()},t}(),tf=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new iu;t.hasMoreCharacters();){var n=t.getCurrentChar();if(this.encodeChar(n,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(4);if(e.setLengthToZero(),e.append(r),ff.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(ou.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var n=e.length();if(0===n)return;if(1===n){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>r&&(t.updateSymbolInfo(t.getCodewordCount()+1),r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=r&&r<=2)return}if(n>4)throw new Error("Count must not exceed 4");var i=n-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(ou.getCharAt(t-64)):ff.illegalCharacter(ou.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var n=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),r=n>>16&255,o=n>>8&255,i=255&n,a=new iu;return a.append(r),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),ef=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rf=function(){function t(t,e,n,r,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=n,this.matrixWidth=r,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,n,r,o){var i,a;void 0===e&&(e=0),void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!0);try{for(var s=nf(af),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==n||!(c.getSymbolWidth()<n.getWidth()||c.getSymbolHeight()<n.getHeight()))&&(null==r||!(c.getSymbolWidth()>r.getWidth()||c.getSymbolHeight()>r.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),of=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return ef(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(rf),af=[new rf(!1,3,5,8,8,1),new rf(!1,5,7,10,10,1),new rf(!0,5,7,16,6,1),new rf(!1,8,10,12,12,1),new rf(!0,10,11,14,6,2),new rf(!1,12,12,14,14,1),new rf(!0,16,14,24,10,1),new rf(!1,18,14,16,16,1),new rf(!1,22,18,18,18,1),new rf(!0,22,18,16,10,2),new rf(!1,30,20,20,20,1),new rf(!0,32,24,16,14,2),new rf(!1,36,24,22,22,1),new rf(!1,44,28,24,24,1),new rf(!0,49,28,22,14,2),new rf(!1,62,36,14,14,4),new rf(!1,86,42,16,16,4),new rf(!1,114,48,18,18,4),new rf(!1,144,56,20,20,4),new rf(!1,174,68,22,22,4),new rf(!1,204,84,24,24,4,102,42),new rf(!1,280,112,14,14,16,140,56),new rf(!1,368,144,16,16,16,92,36),new rf(!1,456,192,18,18,16,114,48),new rf(!1,576,224,20,20,16,144,56),new rf(!1,696,272,22,22,16,174,68),new rf(!1,816,336,24,24,16,136,56),new rf(!1,1050,408,18,18,36,175,68),new rf(!1,1304,496,20,20,36,163,62),new of],sf=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),n=new iu,r=0,o=e.length;r<o;r++){var i=String.fromCharCode(255&e[r]);if("?"===i&&"?"!==t.charAt(r))throw new Error("Message contains characters outside ISO-8859-1 encoding.");n.append(i)}this.msg=n.toString(),this.shape=0,this.codewords=new iu,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=rf.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),uf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return uf(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new iu;t.hasMoreCharacters();){var n=t.getCurrentChar();if(t.pos++,this.encodeChar(n,e),e.length()%3==0)if(this.writeNextTriplet(t,e),ff.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):ff.illegalCharacter(ou.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),r=e.length();t.pos-=r,(t.getRemainingCharacters()>1||n>1||t.getRemainingCharacters()!==n)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(Jh),lf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),df=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lf(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var n=2;return n+=this.encodeChar(t-128,e)},e}(Jh),hf=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=!1);var i=new Jh,a=[new $h,i,new df,new cf,new tf,new Qh],s=new sf(t);s.setSymbolShape(e),s.setSizeConstraints(n,r),t.startsWith(Zh)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=7):t.startsWith(Kh)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=7);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,n){var r=this.lookAheadTestIntern(t,e,n);if(3===n&&3===r){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===n&&4===r)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return r},t.lookAheadTestIntern=function(t,e,n){if(e>=t.length)return n;var r;0===n?r=[0,1,1,1,1,1.25]:(r=[1,2,2,2,2,2.25])[n]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){Ws.fill(i,0),Ws.fill(a,0);var s=this.findMinimums(r,a,Xs.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?r[0]+=.5:this.isExtendedASCII(c)?(r[0]=Math.ceil(r[0]),r[0]+=2):(r[0]=Math.ceil(r[0]),r[0]++),this.isNativeC40(c)?r[1]+=2/3:this.isExtendedASCII(c)?r[1]+=8/3:r[1]+=4/3,this.isNativeText(c)?r[2]+=2/3:this.isExtendedASCII(c)?r[2]+=8/3:r[2]+=4/3,this.isNativeX12(c)?r[3]+=2/3:this.isExtendedASCII(c)?r[3]+=13/3:r[3]+=10/3,this.isNativeEDIFACT(c)?r[4]+=3/4:this.isExtendedASCII(c)?r[4]+=4.25:r[4]+=3.25,this.isSpecialB256(c)?r[5]+=4:r[5]++,o>=4){if(Ws.fill(i,0),Ws.fill(a,0),this.findMinimums(r,a,Xs.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,n,r,o){var i=Math.min(t,Math.min(e,Math.min(n,r)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,n,r){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);n>i&&(n=i,Ws.fill(r,0)),n===i&&(r[o]=r[o]+1)}return n},t.getMinimumCount=function(t){for(var e=0,n=0;n<6;n++)e+=t[n];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var n=t.length,r=e;r<n&&this.isDigit(t.charCodeAt(r));)r++;return r-e},t.illegalCharacter=function(t){var e=Xs.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),ff=hf,pf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gf=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=ru.encode(t,this.charset)}catch(t){return!1}},t}(),mf=function(){function t(t,e,n){var r,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new gf(Xh.forName(t))})),this.encoders=[];var c=[];c.push(new gf(Yh.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(r=void 0,pf(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===n||g.canEncode(m)){h=!0;break}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}if(!h)try{for(var w=(i=void 0,pf(this.ENCODERS)),v=w.next();!v.done;v=w.next()){if((g=v.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{v&&!v.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var y=0;try{for(var _=pf(c),E=_.next();!E.done;E=_.next()){g=E.value;this.encoders[y++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return ru.encode(ou.getCharAt(t),this.encoders[e].name)},t}(),wf=function(){function t(t,e,n){this.fnc1=n;var r=new mf(t,e,n);if(1===r.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===n?1e3:i}else this.bytes=this.encodeMinimally(t,r,n)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var n=0;n<e;n++)if(this.isECI(t+n))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var n=new iu,r=t;r<e;r++){if(this.isECI(r))throw new Error("value at "+r+" is not a character but an ECI");n.append(this.charAt(r))}return n.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,n){(null==t[e][n.encoderIndex]||t[e][n.encoderIndex].cachedTotalSize>n.cachedTotalSize)&&(t[e][n.encoderIndex]=n)},t.prototype.addEdges=function(t,e,n,r,o,i){var a=t.charAt(r).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(n,r+1,new vf(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,n){var r=t.length,o=new(vf[r+1][e.length()]);this.addEdges(t,e,o,0,null,n);for(var i=1;i<=r;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<r&&this.addEdges(t,e,o,i,o[i][a],n);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Xs.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[r][a]){var c=o[r][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[r][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),vf=function(){function t(t,e,n,r,o){this.c=t,this.encoderSet=e,this.encoderIndex=n,this.previous=r,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,n).length;(null===r?0:r.encoderIndex)!==n&&(i+=3),null!=r&&(i+=r.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),yf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(qh||(qh={})),function(t){function e(e,n,r,o,i){var a=t.call(this,e,n,r)||this;return a.shape=o,a.macroId=i,a}yf(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(wf);var _f=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),Ef=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bf=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.value=n,o.bitCount=r,o}return Ef(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,n){return new e(this,t,n)},e.prototype.addBinaryShift=function(t,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,n)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Xs.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(_f),Cf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=n,o.binaryShiftByteCount=r,o}Cf(e,t),e.prototype.appendTo=function(t,e){for(var n=0;n<this.binaryShiftByteCount;n++)(0===n||31===n&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===n?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+n],8)},e.prototype.addBinaryShift=function(t,n){return new e(this,t,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(bf);new bf(null,0,0);var Af=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,n;try{for(var r=Af(t),o=r.next();!o.done;o=r.next()){var i=o.value;Ws.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(Ws.createInt32Array(6,6)),function(t){var e=ou.getCharCode(" "),n=ou.getCharCode("."),r=ou.getCharCode(",");t[0][e]=1;for(var o=ou.getCharCode("Z"),i=ou.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=ou.getCharCode("z"),u=ou.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=ou.getCharCode("9"),l=ou.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][r]=12,t[2][n]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][ou.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)ou.getCharCode(f[h])>0&&(t[4][ou.getCharCode(f[h])]=h)}(Ws.createInt32Array(5,256));var If=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sf=function(t){function e(n){var r=t.call(this,n.width,n.height)||this;return r.canvas=n,r.tempCanvasElement=null,r.buffer=e.makeBufferFromCanvasImageData(n),r}return If(e,t),e.makeBufferFromCanvasImageData=function(t){var n;try{n=t.getContext("2d",{willReadFrequently:!0})}catch(e){n=t.getContext("2d")}if(!n)throw new Error("Couldn't get canvas context.");var r=n.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(r.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,n){for(var r=new Uint8ClampedArray(e*n),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;r[i]=s}return r},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new xs("Requested row is outside the image: "+t);var n=this.getWidth(),r=t*n;return null===e?e=this.buffer.slice(r,r+n):(e.length<n&&(e=new Uint8ClampedArray(n)),e.set(this.buffer.slice(r,r+n))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,n,r,o){return t.prototype.crop.call(this,e,n,r,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new gu(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var n=this.getTempCanvasElement();if(!n)throw new Error("Could not create a Canvas element.");var r=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(r))*o+Math.abs(Math.sin(r))*i),s=Math.ceil(Math.abs(Math.sin(r))*o+Math.abs(Math.cos(r))*i);n.width=a,n.height=s;var u=n.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(r),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(fu);function Tf(){return"undefined"!=typeof navigator}function Df(){return!!(Tf()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var Of=function(){return Of=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Of.apply(this,arguments)},Rf=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Mf=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},kf=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nf={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},xf=function(){function t(t,e,n){void 0===e&&(e=new Map),void 0===n&&(n={}),this.reader=t,this.hints=e,this.options=Of(Of({},Nf),n)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(Zs.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return Rf(this,void 0,void 0,(function(){return Mf(this,(function(n){switch(n.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return n.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var n,r,o=e.getVideoTracks();try{for(var i=kf(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var n=document.getElementById(t);if(!n)throw new ks("element with id '".concat(t,"' not found"));if(n.nodeName.toLowerCase()!==e.toLowerCase())throw new ks("element with id '".concat(t,"' must be an ").concat(e," element"));return n},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var n=document.createElement("video");return n.width=200,n.height=200,n}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var n=document.createElement("img");return n.width=200,n.height=200,n}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var n=t.createVideoElement(e);return n.setAttribute("autoplay","true"),n.setAttribute("muted","true"),n.setAttribute("playsinline","true"),n},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new Sf(t),n=new hu(e);return new Ps(n)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new ks("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var n=document.createElement("canvas"),r=t.getMediaElementDimensions(e),o=r.width,i=r.height;return n.style.width=o+"px",n.style.height=i+"px",n.width=o,n.height=i,n},t.tryPlayVideo=function(e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[2,!0];case 3:return n=r.sent(),console.warn("It was not possible to play the video.",n),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var n=t.createCaptureCanvas(e),r=n.getContext("2d");if(!r)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(r,e),n},t.createBinaryBitmapFromMediaElem=function(e){var n=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(n)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return Rf(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c,l,d;return Mf(this,(function(h){switch(h.label){case 0:if(!Tf())throw new Error("Can't enumerate devices, navigator is not present.");if(!Df())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(n=kf(t),r=n.next();!r.done;r=n.next())o=r.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{r&&!r.done&&(d=n.return)&&d.call(n)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(n=r.sent())?[2,n.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,n){return Rf(this,void 0,void 0,(function(){return Mf(this,(function(r){switch(r.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return r.sent()?[2,!0]:[2,new Promise((function(r,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),n),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),r(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,n,r){return void 0===r&&(r=5e3),Rf(this,void 0,void 0,(function(){var o;return Mf(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(n),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,r)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(n,r){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),r())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),n()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new ks("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var n=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(n)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var n=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(n)},t.prototype.decodeFromImageElement=function(e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:if(!e)throw new ks("An image element must be provided.");return n=t.prepareImageElement(e),[4,this._decodeOnLoadImage(n)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:if(!e)throw new ks("An URL must be provided.");(n=t.prepareImageElement()).src=e,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.decodeFromImageElement(n)];case 2:return[2,r.sent()];case 3:return t.destroyImageElement(n),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,n,r){return Rf(this,void 0,void 0,(function(){var o,i;return Mf(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(r),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,n,r)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,n,r){return Rf(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return Mf(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(r),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,n,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,r,a),u=e.getVideoTracks(),c=Of(Of({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return Rf(this,void 0,void 0,(function(){var n,r,o,i,a,s;return Mf(this,(function(c){switch(c.label){case 0:n=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),r=kf(n),o=r.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=r.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return Rf(h,void 0,void 0,(function(){return Mf(this,(function(n){switch(n.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return n.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return Rf(h,void 0,void 0,(function(){return Mf(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,n,r){return Rf(this,void 0,void 0,(function(){var o;return Mf(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(r),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,n,r)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,n){return Rf(this,void 0,void 0,(function(){var r,o;return Mf(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(n),!e)throw new ks("A video element must be provided.");return r=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,o)];case 1:return i.sent(),[2,this.scan(r,n)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,n){return Rf(this,void 0,void 0,(function(){var r,o,i;return Mf(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(n),!e)throw new ks("An URL must be provided.");return(r=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(r)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,i)];case 1:return a.sent(),[2,this.scan(r,n,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:return[4,this.getUserMedia(t)];case 1:return n=r.sent(),[4,this.decodeOnceFromStream(n,e)];case 2:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,n){return Rf(this,void 0,void 0,(function(){var r,o;return Mf(this,(function(i){switch(i.label){case 0:return r=Boolean(n),[4,t.attachStreamToVideo(e,n)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return r||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return Rf(this,void 0,void 0,(function(){var n,r;return Mf(this,(function(o){switch(o.label){case 0:if(!e)throw new ks("A video element must be provided.");return n=t.prepareVideoElement(e),r=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,r)];case 1:return o.sent(),[4,this.scanOneResult(n)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return Rf(this,void 0,void 0,(function(){var n,r;return Mf(this,(function(o){switch(o.label){case 0:if(!e)throw new ks("An URL must be provided.");(n=t.prepareVideoElement()).src=e,r=this.decodeOnceFromVideoElement(n),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,r];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(n),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,n,r){var o=this;return void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof uu&&e)return;if(o instanceof Fs&&n)return;if(o instanceof $s&&r)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,n,r){var o=this;t.checkCallbackFnOrThrow(n);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),r&&r()}},d=function(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);n(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(n(void 0,t,l),t instanceof Fs||t instanceof $s||t instanceof uu)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),r&&r(t)}};return d(),l},t.prototype._decodeOnLoadImage=function(e){return Rf(this,void 0,void 0,(function(){return Mf(this,(function(n){switch(n.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:n.sent(),n.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return Rf(this,void 0,void 0,(function(){var n;return Mf(this,(function(r){switch(r.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=r.sent(),t.streamTracker.push(n),[2,n]}}))}))},t.streamTracker=[],t}(),Pf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return t.call(this,new ec,e,n)||this}Pf(e,t)}(xf);var Bf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return t.call(this,new Fl(e),e,n)||this}Bf(e,t)}(xf);var Ff=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return t.call(this,new Jl,e,n)||this}Ff(e,t)}(xf);var Lf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zf=function(t){function e(e,n){var r=this,o=new Ih;return o.setHints(e),(r=t.call(this,o,e,n)||this).reader=o,r}return Lf(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(Zs.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(xf),Uf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return t.call(this,new Eh,e,n)||this}Uf(e,t)}(xf);var Vf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){return t.call(this,new kd,e,n)||this}Vf(e,t)}(xf);const Hf=[Iu.PDF_417,Iu.QR_CODE];class Gf{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hf;this.lastSweepEndedAt=null,this.reader=new zf,this.formats=t,this.reader.possibleFormats=t,Cs("Barcode detector initialized",t.map((t=>Iu[t])))}resetSweepCooldown(){this.lastSweepEndedAt=null}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,n=-1/0,r=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>n&&(n=t),a<r&&(r=a),a>o&&(o=a)}return{x:e,y:r,width:n-e,height:o-r}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const n=e.getContext("2d");if(!n)return Cs("Warning: Unable to get 2D context for canvas."),[];null==n||n.drawImage(t,0,0)}let n=this.decodeCanvas(e);return 0===n.length&&(null===this.lastSweepEndedAt||Date.now()-this.lastSweepEndedAt>=1500)&&(n=this.decodeWithRotationSweep(e),this.lastSweepEndedAt=Date.now()),n}decodeCanvas(t){const e=[],n=new Set,r=r=>{try{const r=this.reader.decodeFromCanvas(t);Cs("Barcode detected:",r);const o=this.getXYWidthHeight(r.getResultPoints()),i=Iu[r.getBarcodeFormat()],a=r.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};e.push(u),Cs("Barcode result:",u)}catch(t){Cs(void 0!==r?`Barcode not detected for format ${Iu[r]}`:"Barcode not detected"),"NotFoundException"!==(null==t?void 0:t.name)&&Cs("Barcode detection error:",t)}};if(0===this.formats.length)return r(),e;for(const t of this.formats){const e=new Map;e.set(Zs.POSSIBLE_FORMATS,[t]),e.set(Zs.TRY_HARDER,!0),this.reader.setHints(e),r(t)}return e}decodeWithRotationSweep(t){const e=Math.min(1,1100/Math.max(t.width,t.height)),n=Math.max(1,Math.round(t.width*e)),r=Math.max(1,Math.round(t.height*e)),o=[];for(let t=1;t<=10;t++)o.push(-t,t);const i=performance.now();for(const e of o){if(performance.now()-i>=250)break;const o=this.rotateCanvas(t,e,n,r),a=this.decodeCanvas(o);if(a.length>0)return a}return[]}rotateCanvas(t,e,n,r){const o=e*Math.PI/180,i=Math.abs(Math.cos(o)),a=Math.abs(Math.sin(o)),s=document.createElement("canvas");s.width=Math.ceil(n*i+r*a),s.height=Math.ceil(n*a+r*i);const u=s.getContext("2d");return u?(u.fillStyle="#ffffff",u.fillRect(0,0,s.width,s.height),u.translate(s.width/2,s.height/2),u.rotate(o),u.drawImage(t,0,0,t.width,t.height,-n/2,-r/2,n,r),s):t}}var jf;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(jf||(jf={}));const Wf={[As.DOCUMENT_DETECTOR]:{status:jf.LOADING},[As.BLUR_GLARE_CLASSIFIER]:{status:jf.LOADING},[As.FACE_LANDMARK]:{status:jf.LOADING}};let Xf=null;function Yf(t){if(Xf)return Cs("Reusing existing barcode detector instance"),Xf;try{return Xf=new Gf((t=>{const e={Aztec:Iu.AZTEC,Codabar:Iu.CODABAR,Code39:Iu.CODE_39,Code93:Iu.CODE_93,Code128:Iu.CODE_128,DataMatrix:Iu.DATA_MATRIX,EAN8:Iu.EAN_8,EAN13:Iu.EAN_13,ITF:Iu.ITF,MaxiCode:Iu.MAXICODE,PDF417:Iu.PDF_417,QRCode:Iu.QR_CODE,UPCA:Iu.UPC_A,UPCE:Iu.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),Cs("Created new barcode detector instance"),Xf}catch(t){throw Cs("Error initializing barcode model",t),ws("Error initializing barcode model","barcode_model_not_supported","init"),t}}const qf=[As.DOCUMENT_DETECTOR,As.BLUR_GLARE_CLASSIFIER],Zf=async()=>{let t=!1;for(;!t;){const e=Object.values(Wf).filter((t=>t.status===jf.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=qf.every((t=>Wf[t].status===jf.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Kf=t=>"function"==typeof t,$f=function(t){};let Qf;ka.events.on(ka.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=ka.moduleMetadata.getInitConfig();if(!t||!e)return!1;const n=(null==e?void 0:e.serverPath)&&(r=null==e?void 0:e.serverPath,o="/verify",(null==r?void 0:r.endsWith(o))?r.slice(0,r.length-o.length):r);var r,o;if(!n)throw new Error("Failed to load SDK: serverPath param required");Xa.dispatch("setClientId",t),Xa.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),Xa.dispatch("setServerPath",n),Xa.dispatch("setLanguage",null==e?void 0:e.language),Xa.dispatch("setCallback",null==e?void 0:e.callback),Xa.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),Xa.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),Xa.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),Xa.dispatch("setCdnHost",null==e?void 0:e.cdnHost),void 0!==(null==e?void 0:e.isImageSigningEnabled)&&Xa.dispatch("setIsImageSigningEnabled",e.isImageSigningEnabled);(null==e?void 0:e.callbacks)&&sp(e);return Xa.dispatch("setStartToken",null==e?void 0:e.startToken),Qf=qa(Xa.state.clientId,null==e?void 0:e.language).then((t=>up(t))),function(t){za({type:"init",step:t})}("init"),!0})),ka.events.on(Na,(function(t){switch(ms.handelEventData(t),ap(t),t.type){case"session-granted":Jf({session:Xa.state.sessionId});break;case"session-id-acquired":tp({session:Xa.state.sessionId});break;case"capture-image-result":ep({session:Xa.state.sessionId},t.imageType);break;case"start-verification-processing":np({session:Xa.state.sessionId});break;case"verification-complete":rp({session:Xa.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":ip({session:Xa.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":op({session:Xa.state.sessionId},t.reason)}}));let Jf=$f,tp=$f,ep=$f,np=$f,rp=$f,op=$f,ip=$f,ap=t=>{};const sp=t=>{let{callbacks:e,callback:n}=t;Kf(e.sessionGranted)&&(Jf=e.sessionGranted),Kf(e.sessionStarted)&&(tp=e.sessionStarted),Kf(e.imageSubmitted)&&(ep=e.imageSubmitted),Kf(e.processing)&&(np=e.processing),Kf(e.completed)&&(rp=e.completed),Kf(e.recapture)&&(op=e.recapture),Kf(e.error)&&(ip=e.error),Kf(n)&&(ap=n)};async function up(t){var e;if((null==t?void 0:t.strings)&&Es.overrideLanguage(t.strings),Xa.dispatch("setCaptureApprovalSettings",null==t?void 0:t.capture_approval_settings),Xa.dispatch("setRotatedDocumentCaptureEnabled",null!==(e=null==t?void 0:t.rotated_document_capture_enabled)&&void 0!==e&&e),null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return Xa.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),Cs("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;Wf[e]={status:jf.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:o(o({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;Wf[e].status=jf.NOT_AVAILABLE,ws(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));ws("service worker not available","service_worker_not_available","init")}Xa.dispatch("setAutoCaptureSettings",{enabled:!1,settings:null==t?void 0:t.autocapture_settings})}async function cp(t,e,n){var r,o;return(await(r=t,o=ps(n,e),Ya({method:"GET",url:`/verify/api/v1/verification/${r}/status`,path:{sid:r},headers:o,errors:{404:"Session not found"}},"processing"))).body}async function lp(t,e,n,r){var i;const a=await(s={start_token:t,accessed_from_desktop:!1,client_type:rs.client_type.MOBILE_SDK,consent:{granted:!0,document_id:n},image_signing_public_key:r},u=ps(e),Ya({method:"POST",url:"/verify/api/v1/verification/start",headers:u,body:s,mediaType:"application/json"},"init"));var s,u;const c=a.body.settings,l=null!==(i=null==c?void 0:c.flowType)&&void 0!==i?i:null==c?void 0:c.flow_type,d="string"==typeof l?l:void 0;return o({sessionId:a.body.session_id,userToken:a.body.user_token,requiredImages:a.body.required_images},d&&{flowType:d})}async function dp(t,e,n){let r,i,a,s;try{const t=Ba(Pa),e=JSON.parse(t);r=e.sessionId,i=e.userToken,a=e.flowType,s=e.startToken}catch(t){}const u=r&&i&&(!t||s===t),c=!0===Xa.state.isImageSigningEnabled,l=!c&&u&&null!=r&&null!=i;try{let s;if(l){s=(await cp(r,i,n)).missing_images}else{if(!t)throw new Error(c?"Image signing is enabled but no start token is available to register a public key":"No start token and no valid cached session");let o;if(c){const t=ka.crypto.createCryptoBinding("sign");if(o=(await t.getPublicData()).publicKey,!o)throw new Error("Image signing is enabled but failed to generate a public key")}const u=await lp(t,n,e,o);r=u.sessionId,i=u.userToken,s=u.requiredImages,a=u.flowType;const l=JSON.stringify({sessionId:r,userToken:i,flowType:a,startToken:t});d=Pa,h=l,sessionStorage.setItem(d,h)}return o({requiredImages:s,sessionId:r.toString(),userToken:i.toString()},void 0!==a&&""!==a&&{flowType:a})}catch(t){throw console.log("Error starting session"),console.error(t),t}var d,h}function hp(t){let{tagName:e,style:n,id:r="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=r,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(n).forEach((t=>{s.style[t]=n[t]})),s}function fp(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const pp=async(t,e,n,r,i,a,s,u)=>{var c,l,d,h,f,p,g;const m=os.UAParser();let w;if(Xa.state.isImageSigningEnabled){const t=ka.crypto.createCryptoBinding("sign");w=await t.sign(r.data)}const v=await(y=t,_=o({image:{format:r.format,image_type:a,content:r.data,capture_margins:r.captureMargins,signature:w,raw_barcode_data:s},device_info:{model:null===(c=null==m?void 0:m.device)||void 0===c?void 0:c.model,type:null===(l=null==m?void 0:m.device)||void 0===l?void 0:l.type,manufacturer:null===(d=null==m?void 0:m.device)||void 0===d?void 0:d.vendor,os:null===(h=null==m?void 0:m.os)||void 0===h?void 0:h.name,os_version:null===(f=null==m?void 0:m.os)||void 0===f?void 0:f.version,browser:null===(p=null==m?void 0:m.browser)||void 0===p?void 0:p.name,browser_version:null===(g=null==m?void 0:m.browser)||void 0===g?void 0:g.version,used_camera:null==i?void 0:i.selectedCamera,cameras:null==i?void 0:i.camerasInfo}},u?{acquisition_id:u}:{}),E=ps(n,e),Ya({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:y},headers:E,body:_,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},_.image.image_type));var y,_,E;const b=function(t,e){const n=[...t].find((t=>t.includes(e)));return void 0!==n?n[1]:void 0}(v.headers,"x-ts-processing-time-ms");return"ok"!==v.body.feedback&&console.error("Error",v),{missing_images:v.body.missing_images,feedback:v.body.feedback,custom_feedback:v.body.custom_feedback,has_barcode:v.body.has_barcode,supported_barcode_symbologies:v.body.supported_barcode_symbologies,serverProcessingTime:b}};const gp=t=>{const e=document.getElementById(`overlay-frame ${t}`);if(e){const t=e.getBoundingClientRect(),{width:n,height:r}=window.innerWidth>window.innerHeight!=screen.width>screen.height?{width:screen.height,height:screen.width}:{width:screen.width,height:screen.height},o=(3840-n)/2,i=(2160-r)/2;return{top:i+t.top,bottom:i+t.bottom,right:o+t.right,left:o+t.left}}};var mp={},wp={get exports(){return mp},set exports(t){mp=t}};wp.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,n){n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a}));var r=n(1),o=n(7);n.d(e,"a",(function(){return o.a})),n.d(e,"d",(function(){return r.b}));var i=r.a.FACING_MODES,a=r.a.IMAGE_TYPES},function(t,e,n){var r=n(6);n.d(e,"a",(function(){return r.a}));var o=n(2);n.d(e,"b",(function(){return o.a}))},function(t,e,n){function r(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var n={};try{r(t,e),n.imageType=t,n.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),n.imageType=h.c.PNG,n.imageCompression=null}return n}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,n){var r=t*parseFloat(n);return{imageWidth:r,imageHeight:e/(t/r)}}function u(t,e,n){return o(e,n).imageType===h.c.JPG?n?t.toDataURL(h.b[h.c.JPG],n):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=n(3)},function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"e",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(r(o={},"jpg","image/jpeg"),r(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,n){t.exports=n(5)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);n.d(e,"FACING_MODES",(function(){return r.b})),n.d(e,"IMAGE_TYPES",(function(){return r.c})),n.d(e,"_getDebugPlatformInfo",(function(){return r.d}));var o=n(9);n.d(e,"downloadPhoto",(function(){return o.a})),e.default=r.a},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return s}));var o=n(2),i=n(3),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(){function t(){r(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var n=e.sizeFactor,r=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,n),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,r,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),n=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(n){var r=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,n){r.call(navigator,t,e,n)}))}};t=Object.assign(r,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,n){if(!Object(o.e)(e,n))return i.d;var r=t.getNavigatorMediaDevices().getSupportedConstraints();if(!r.width||!r.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:n&&n.width,height:n&&n.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",n);var r=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],i=t.getIdealConstraints(e,{});if(0===n)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=r,i);if(n<r.length){var a=r.slice(0,-n);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return u}));var o=n(1),i=n(8),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){r(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var n=this;return new Promise((function(r,i){var a=o.a.getIdealConstraints(t,e);n.mediaDevices.getUserMedia(a).then((function(t){n._gotStream(t),r(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,n=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==n){var r={};return this._getStreamDevice(t,r)}return new Promise((function(r,o){e.mediaDevices.getUserMedia(n).then((function(t){e._gotStream(t),r(t)})).catch((function(n){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(n)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,n){var r=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&r.push(t)})),e(r)})).catch((function(t){n(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var n=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return n._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,n){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),n(Error("no stream to stop!"))}))}}]),t}()},function(t,e,n){n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=1,o=null,i=!1},function(t,e,n){var r=n(10);n.d(e,"a",(function(){return r.a}))},function(t,e,n){function r(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),o=new Uint8Array(r),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([r],{type:n})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,n){return t+"-"+o(e,4)+"."+i(n)}function s(t,e,n){window.URL=window.webkitURL||window.URL;var r=document.createElement("a");r.download=a(e,n,t.type),r.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(r(t),e,n)}e.a=u;var c=n(0)}]);var vp=a(mp);class yp{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return yp.instance||(yp.instance=new yp),yp.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const _p=["tele","telephoto","macro","portrait","zoom"],Ep=["ultra","wide","uw","front","selfie"];function bp(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}function Cp(t){const e=t.toLowerCase();let n=0;if(bp())"back camera"!==e&&"rear camera"!==e||(n+=5),(e.includes("telephoto")||e.includes("tele"))&&(n-=2),(e.includes("ultra")||e.includes("wide"))&&(n-=3);else{_p.forEach((t=>{e.includes(t)&&(n+="macro"===t?4:3)})),Ep.forEach((t=>{e.includes(t)&&(n-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(n+=Math.min(parseFloat(t[1]),6));const r=e.match(/camera2?\s+(\d+)/);if(r){const t=parseInt(r[1]);0===t?n+=3:t>=2&&(n-=2)}}return n}async function Ap(t){let e=0;try{const n=yp.getInstance();await n.startNewStream({video:{deviceId:{exact:t}},audio:!1});const r=n.getStream();if(!r)return e;const o=r.getVideoTracks()[0].getCapabilities();return n.stopStream(),o.zoom&&(e+=Math.min(o.zoom.max||0,2)),o.focusMode&&Array.isArray(o.focusMode)&&o.focusMode.includes("continuous")&&(e+=2),o.focusDistance&&(e+=1),e}catch(t){return e}}async function Ip(){const t=(await async function(){const t=yp.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return Sp.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};if(bp())return{optionalCameras:t};const e=t.map((t=>({camera:t,score:Cp(t.label)}))),n=Math.max(...e.map((t=>t.score)));if(n<=0)return{optionalCameras:t,selectedCamera:t[0]};const r=e.filter((t=>t.score===n));if(1===r.length)return{optionalCameras:t,selectedCamera:r[0].camera};let o=r[0].camera,i=-1/0;for(const{camera:t,score:e}of r){const n=e+await Ap(t.deviceId);n>i&&(i=n,o=t)}return{optionalCameras:t,selectedCamera:o}}const Sp=["rear","back","tele","telephoto","macro","portrait","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक","camera2 0, facing back"],Tp={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Dp={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Op=async t=>{var e,n;let r;return"environment"==t&&(r=await Ip()),null!==(n=null===(e=null==r?void 0:r.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==n?n:t},Rp=(t,e)=>{var n,r;return"user"===t?null!==(n=null==e?void 0:e.selfieVideoConstraints)&&void 0!==n?n:Dp:null!==(r=null==e?void 0:e.environmentVideoConstraints)&&void 0!==r?r:Tp},Mp=t=>{const e=hp({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},kp={title:"other_error_code_title",message:"other_error_code_message"},Np={ok:kp,document_face_not_found:kp,restricted_criteria:kp,other:kp,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},xp={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},Pp=(t,e)=>{const n=hp({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${t}`,testid:`overlay-frame ${t}`});"environment"===t&&function(t){fp(t,hp({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),fp(t,hp({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),fp(t,hp({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),fp(t,hp({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(n);const r=()=>{var r,o;if("environment"===t){if(null!==(r=Xa.state.rotatedDocumentCaptureEnabled)&&void 0!==r&&r&&window.innerWidth>window.innerHeight){const t=document.getElementById("video"),e=null==t?void 0:t.getBoundingClientRect(),r=e?e.left:0,i=e?e.top:0,a=e&&e.width?e.width:window.innerWidth,s=e&&e.height?e.height:window.innerHeight;document.documentElement.style.setProperty("--idv-cam-top",`${i}px`);const u=1/.65,c=12,l=document.getElementById("trigger-section"),d=null!==(o=null==l?void 0:l.getBoundingClientRect().left)&&void 0!==o?o:0,h=.02*a,f=r+h,p=(d>f?Math.min(r+a-h,d-6):r+a-Math.max(h,92))-f,g=Math.max(s-30-c,.5*s),m=Math.max(s-20-c,.5*s),w=p/u,v=Math.min(1.1*Math.min(g,w),m,w),y=v*u,_=Math.max(20,Math.min(30,s-v-c)),E=f+(p-y)/2,b=i+_+(Math.max(s-_-c,v)-v)/2;n.style.position="fixed",n.style.zIndex="1",n.style.width=`${y}px`,n.style.height=`${v}px`,n.style.maxHeight="",n.style.left=`${E}px`,n.style.top=`${b}px`,document.documentElement.style.setProperty("--idv-title-band",`${_}px`),document.documentElement.style.setProperty("--idv-frame-left",`${E}px`),document.documentElement.style.setProperty("--idv-frame-width",`${y}px`),document.documentElement.style.setProperty("--idv-toast-bottom",window.innerHeight-(b+v)+10+"px")}else{n.style.position="relative",n.style.left="",n.style.top="",n.style.zIndex="1";const t=.85*e.clientWidth;n.style.width=`${t}px`,n.style.height=.65*t+"px",n.style.maxHeight=.5*window.innerHeight+"px"}}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);n.style.width=.8*t+"px",n.style.height=`${t}px`,n.style.minHeight=.8*t+"px",n.style.maxHeight=.5*window.innerHeight+"px",n.style.borderRadius="50%"}};r();let o=[],i=null,a=null,s=null;const u=()=>{window.removeEventListener("resize",c),window.removeEventListener("orientationchange",c),null==i||i.removeEventListener("resize",c),null==i||i.removeEventListener("loadedmetadata",c),null!==a&&(clearTimeout(a),a=null),o.forEach((t=>clearTimeout(t))),o=[],null==s||s.disconnect(),s=null},c=()=>{document.body.contains(n)?(r(),o.forEach((t=>clearTimeout(t))),o=[250,600].map((t=>window.setTimeout((()=>{document.body.contains(n)&&r()}),t)))):u()};return window.addEventListener("resize",c),window.addEventListener("orientationchange",c),s=new MutationObserver((t=>{if(n.isConnected)return;t.some((t=>Array.from(t.removedNodes).some((t=>t===n||t.contains(n)))))&&u()})),s.observe(document.body,{childList:!0,subtree:!0}),"environment"===t&&(a=window.setTimeout((()=>{a=null,i=document.getElementById("video"),i&&(i.addEventListener("resize",c),i.videoWidth?r():i.addEventListener("loadedmetadata",c,{once:!0}))}),0)),n};const Bp=(t,e)=>{var n,r;const o=document.createElementNS("http://www.w3.org/2000/svg","svg");return o.setAttribute("viewBox","0 0 68 68"),e?(o.innerHTML='<g class="idv-autocapture-spinner"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="#fff" stroke-dasharray="50 12.83" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1.5s" values="0 34 34;360 34 34" repeatCount="indefinite" /></circle> </g>',null!=t&&(null===(r=o.querySelector("circle"))||void 0===r||r.setAttribute("stroke",t)),o):(o.innerHTML='<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="#fff" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>',null!=t&&(null===(n=o.querySelector("circle"))||void 0===n||n.setAttribute("stroke",t)),o)},Fp=t=>{let{click:e,id:n,testid:r,color:i,withLoader:a,disabled:s,manualFallback:u,ariaLabel:c}=t;if(a){if(!u){const t=Bp(i,!1);t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const o=hp({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:i||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:n+"-inner",testid:r+"-inner"});return c&&o.setAttribute("aria-label",c),fp(o,t),o.addEventListener("click",e),o}const t=Bp(i,!0);t.style.display="block",t.style.width="65px",t.style.height="65px";const a=hp({tagName:"button",style:o({width:"65px",height:"65px",backgroundColor:"transparent",border:"none",padding:"0",margin:"0 auto"},s?{cursor:"default",pointerEvents:"none"}:{}),id:n+"-inner",testid:r+"-inner"});return s&&(a.disabled=!0),c&&a.setAttribute("aria-label",c),fp(a,t),a.addEventListener("click",e),a}{const t=hp({tagName:"button",style:o({width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(i||"white"),borderRadius:"40px",boxSizing:"border-box",flexShrink:"0",flexGrow:"0"},s?{opacity:"0.5",cursor:"default",pointerEvents:"none"}:{}),id:n+"-outer",testid:r+"-outer"});s&&(t.disabled=!0),c&&t.setAttribute("aria-label",c);return fp(t,hp({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:i||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:n+"-inner",testid:r+"-inner"})),t.addEventListener("click",e),t}};function Lp(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',t}const zp={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},Up=t=>{let{text:e,level:n=1,style:r={},id:i,testid:a}=t;const s=hp({tagName:`h${n}`,style:o(o(o({},zp.all),zp[n]),r),id:i,testid:a});return s.textContent=e,s.id=i,s};var Vp,Hp={};let Gp=null;try{Gp=(Vp||(Vp=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function r(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof t?t:t.source;const r={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),n=n.replace(t,o),r},getRegex:()=>new RegExp(n,e)};return r}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10940}-\u{10959}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E96}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}-\u{16FF6}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1CCF0}-\u{1CCF9}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),y={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:w,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:v,table:i,text:/^[^\n]+/},_=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=o(o({},y),{},{table:_,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=o(o({},y),{},{html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),C=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,A=/^( {2,}|\\)\n(?!\s*$)/,I="\\p{P}\\p{S}",S=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,I).getRegex(),T=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,I).getRegex(),D=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,I).getRegex(),O=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,I).getRegex(),R=a(/\\([punct])/,"gu").replace(/punct/g,I).getRegex(),M=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),k=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),N=a("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",k).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),x=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",x).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",x).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:i,anyPunctuation:R,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:A,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:T,emStrongRDelimAst:D,emStrongRDelimUnd:O,escape:C,link:P,nolink:F,punctuation:S,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:N,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},z=o(o({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",x).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x).getRegex()}),U=o(o({},L),{},{escape:a(C).replace("])","~|])").getRegex(),url:a(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=o(o({},U),{},{br:a(A).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:y,gfm:E,pedantic:b},G={normal:L,gfm:U,breaks:V,pedantic:z},j={"&":"&","<":"<",">":">",'"':""","'":"'"},W=t=>j[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function q(t,e){const n=t.replace(s.findPipe,((t,e,n)=>{let r=!1,o=e;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(s.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(s.slashPipe,"|");return n}function Z(t,e,n){const r=t.length;if(0===r)return"";let o=0;for(;o<r;){const i=t.charAt(r-o-1);if(i!==e||n){if(i===e||!n)break;o++}else o++}return t.slice(0,r-o)}function K(t,e,n,r,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;const t={type:"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,t}return{type:"image",raw:n,href:i,title:a,text:s}}class ${constructor(e){n(this,"options",void 0),n(this,"rules",void 0),n(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Z(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(null===r)return e;const o=r[1];return e.split("\n").map((t=>{const e=t.match(n.other.beginningSpace);if(null===e)return t;const[r]=e;return r.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=Z(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Z(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=Z(e[0],"\n").split("\n"),n="",r="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,n=n.substring(0,n.length-e.raw.length)+a.raw,r=r.substring(0,r.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,n=n.substring(0,n.length-l.raw.length)+a.raw,r=r.substring(0,r.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let a=!1;for(;t;){let n=!1,r="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(n.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),r+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=n}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const n=q(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<n.length;t++)i.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(q(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=Z(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),K(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return K(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(t);if(r&&(!r[3]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let o,i,a=n,s=0;const u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=u.exec(e));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...r[0]][0].length,u=t.slice(0,n+r.index+e+i);if(Math.min(n,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var n,r;i=e[0],e[0]=null!==(n=null===(r=this.rules.inline._backpedal.exec(e[0]))||void 0===r?void 0:r[0])&&void 0!==n?n:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class Q{constructor(e){n(this,"tokens",void 0),n(this,"options",void 0),n(this,"state",void 0),n(this,"tokenizer",void 0),n(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:s,block:H.normal,inline:G.normal};this.options.pedantic?(r.block=H.pedantic,r.inline=G.pedantic):this.options.gfm&&(r.block=H.gfm,this.options.breaks?r.inline=G.breaks:r.inline=G.gfm),this.tokenizer.rules=r}static get rules(){return{block:H,inline:G}}static lex(t,e){return new Q(e).lex(t)}static lexInline(t,e){return new Q(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(e=n.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(e):(n.raw+="\n"+e.raw,n.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(n.raw+="\n"+e.raw,n.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(r=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},n),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(r=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(r)))n=o[o.length-1],i&&"paragraph"===(null===(a=n)||void 0===a?void 0:a.type)?(n.raw+="\n"+e.raw,n.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(e),i=r.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+e.raw,n.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,n,r,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(e=n.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),n=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),n=s[s.length-1],n&&"text"===e.type&&"text"===n.type?(n.raw+=e.raw,n.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(r=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},n),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(r=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(r))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,n=s[s.length-1],n&&"text"===n.type?(n.raw+=e.raw,n.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class J{constructor(e){n(this,"options",void 0),n(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:n,lang:r,escaped:o}=t;const i=null===(e=(r||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=n.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:n}=t;return`<h${n}>${this.parser.parseInline(e)}</h${n}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e<t.items.length;e++){const n=t.items[e];r+=this.listitem(n)}const o=e?"ol":"ul";return"<"+o+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];n="";for(let t=0;t<o.length;t++)n+=this.tablecell(o[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:n,tokens:r}=t;const o=this.parser.parseInline(r),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return n&&(a+=' title="'+X(n)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:n,text:r}=t;const o=Y(e);if(null===o)return X(r);let i=`<img src="${e=o}" alt="${r}"`;return n&&(i+=` title="${X(n)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){n(this,"options",void 0),n(this,"renderer",void 0),n(this,"textRenderer",void 0),this.options=e||t.defaults,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r<t.length;r++){const o=t[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}const i=o;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;r+1<t.length&&"text"===t[r+1].type;)o=t[++r],a+="\n"+this.renderer.text(o);n+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let r=0;r<t.length;r++){const o=t[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":n+=e.text(i);break;case"html":n+=e.html(i);break;case"link":n+=e.link(i);break;case"image":n+=e.image(i);break;case"strong":n+=e.strong(i);break;case"em":n+=e.em(i);break;case"codespan":n+=e.codespan(i);break;case"br":n+=e.br(i);break;case"del":n+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}}class nt{constructor(e){n(this,"options",void 0),n(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Q.lex:Q.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}n(nt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class rt{constructor(){n(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),n(this,"options",this.setOptions),n(this,"parse",this.parseMarkdown(!0)),n(this,"parseInline",this.parseMarkdown(!1)),n(this,"Parser",et),n(this,"Renderer",J),n(this,"TextRenderer",tt),n(this,"Lexer",Q),n(this,"Tokenizer",$),n(this,"Hooks",nt),this.use(...arguments)}walkTokens(t,e){let n=[];for(const o of t)switch(n=n.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;n=n.concat(this.walkTokens(t.items,e));break}default:{var r;const t=o;null!==(r=this.defaults.extensions)&&void 0!==r&&null!==(r=r.childTokens)&&void 0!==r&&r[t.type]?this.defaults.extensions.childTokens[t.type].forEach((r=>{const o=t[r].flat(1/0);n=n.concat(this.walkTokens(o,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((e=>{const n=o({},e);if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];let i=e.renderer.apply(this,r);return!1===i&&(i=n.apply(this,r)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new J(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,o=e.renderer[r],i=t[r];t[r]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=o.apply(t,n);return!1===a&&(a=i.apply(t,n)),a||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=o.apply(t,n);return!1===a&&(a=i.apply(t,n)),a}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new nt;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,o=e.hooks[r],i=t[r];nt.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const n=o.call(t,e);return i.call(t,n)}:t[r]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=o.apply(t,n);return!1===a&&(a=i.apply(t,n)),a}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults=o(o({},this.defaults),n)})),this}setOptions(t){return this.defaults=o(o({},this.defaults),t),this}lexer(t,e){return Q.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,n)=>{const r=o({},n),i=o(o({},this.defaults),r),a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?Q.lex:Q.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let n=u(t,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(t){return a(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}}const ot=new rt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,r(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,r(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=J,it.TextRenderer=tt,it.Lexer=Q,it.lexer=Q.lex,it.Tokenizer=$,it.Hooks=nt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=Q.lex;t.Hooks=nt,t.Lexer=Q,t.Marked=rt,t.Parser=et,t.Renderer=J,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(Hp)),Hp).marked}catch(t){console.log("marked is not supported",t)}const jp=Gp,Wp=t=>{let{text:e,id:n,testid:r,clientHeight:o}=t;const i=!!o&&o<700,a=hp({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:n,testid:r});return fp(a,Up({text:e,level:i?6:5,style:{color:"white"},id:"page-header-text"})),a};const Xp=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Yp;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Yp||(Yp={}));const qp="#ED3232",Zp="#01B678",Kp="#FFF",$p=50,Qp=1e4;const Jp=(t,e)=>Es.hasTranslation(t)?t:e;const tg=t=>!t.paused&&0!==t.videoWidth,eg=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};let ng;const rg=t=>{const e=null!=ng?ng:ng=document.createElement("canvas");e.width===t.videoWidth&&e.height===t.videoHeight||(e.width=t.videoWidth,e.height=t.videoHeight);return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function og(t){let{context:e,onDetect:n,frame:r,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Yp.REJECTED){o(function(t){switch(t){case Za.DOCUMENT_DETECTION:return"searching_document_autocapture";case Za.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Za.BARCODE_DETECTION:return ts.feedback.BARCODE_NOT_FOUND;case Za.BLUR_DETECTION:return ts.feedback.BLUR;case Za.GLARE_DETECTION:return ts.feedback.GLARE;case Za.FACE_DETECTION:return ts.feedback.FACE_NOT_FOUND;case Za.FACE_POSITION:return ts.feedback.FACE_TOO_SMALL;case Za.FACE_ANGLE:return Jp("face_angle_too_large_autocapture_message",ts.feedback.FACE_ANGLE_TOO_LARGE);case Za.FACE_ROTATION:return Jp("face_rotated_autocapture_message",ts.feedback.FACE_ROTATED)}}(e.invalidFramesCause));ig("border-color",e.invalidFramesCause===Za.DOCUMENT_DETECTION?Kp:qp)}if(a===Yp.VALID)if(i){ig("border-color",Zp);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),ig("border-color",Kp);a===Yp.ACCEPTED&&(ig("border-color",Kp),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await n({frame:r,suspendedPreview:!0,isManualCapture:!1,context:e}))}function ig(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((n=>{n.style[t]=e}))}function ag(t){let e,n,r,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,deviceLeft:l=0,deviceTop:d=0,threshold:h,iouThreshold:f=.85}=t;if(a/s>=u/c){r=c/s;const t=(a*r-u)/2;e=i.x*r-t,n=i.y*r}else{r=u/a;const t=(s*r-c)/2;e=i.x*r,n=i.y*r-t}e+=l,n+=d;const p=e+i.width*r,g=n+i.height*r;!function(t,e,n,r){var o,i;if(null===(i=null===(o=Xa.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${n}px`,i.style.height=`${r}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${n}px`,i.style.height=`${r}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,n,i.width*r,i.height*r);const m=function(t,e){const n=Math.max(t.left,e.left),r=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=r-n,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:n,left:e,bottom:g,right:p}),w=m>f,v=i.width*r*(i.height*r)>h*(o.width*o.height);return w&&v}const sg=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',t}(),n=hp({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return fp(n,e),fp(n,Up({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),n};const ug=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',t}(),n=hp({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return fp(n,e),fp(n,Up({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),n};const cg=t=>{let{step:e,setImage:n,camera:r,isManualCaptureAllowed:o}=t;var i,a,s,u,c,l,d,h,f,p,g;!function(){if(document.getElementById("idv-landscape-capture-styles"))return;const t=document.createElement("style");t.id="idv-landscape-capture-styles",t.textContent='\n @media (orientation: landscape) {\n /* The host page uses viewport-fit=cover, so the layout extends under the\n iOS safe areas (sensor housing on one side, home indicator on the\n other). The rail grows by the left inset — its 44px text zone stays\n clear of the notch — and the shutter shifts in by the right inset.\n env() resolves to 0 wherever safe areas don\'t apply. */\n .rotated-capture { --idv-rail-width: calc(44px + env(safe-area-inset-left, 0px)); }\n /* Fallback for hosts WITHOUT viewport-fit=cover: iOS then keeps the page\n out of the safe-area strip and paints that strip with the page\n background — recolor it to the header-rail gray so it never flashes\n white beside the camera. Invisible when the strip doesn\'t exist. */\n html:has(.rotated-capture #document-capture),\n html:has(.rotated-capture #document-capture) body {\n background: #262626 !important;\n }\n /* The feed fills everything right of the narrow header rail, cropped like\n the portrait flow (cover) — no letterbox bars anywhere. The document\n frame is JS-positioned inside the video box, and the --idv-* vars used\n below are published by the overlay\'s sizing code in\n camera-overlay.component.ts. */\n .rotated-capture #document-capture { background: #000 !important; }\n .rotated-capture #document-capture #video {\n object-fit: cover !important;\n left: var(--idv-rail-width) !important;\n width: calc(100% - var(--idv-rail-width)) !important;\n background: #000 !important;\n }\n .rotated-capture #document-capture #central-container { height: 100% !important; }\n /* Portrait\'s top header ("Scan document" / "Face Recognition") becomes a\n narrow vertical rail on the left, its text rotated as if the portrait\n layout were turned with the device. (Selectors are doubled up —\n #document-capture #page-header — to out-cascade the small-screen height\n rule in the root stylesheet.) */\n .rotated-capture #document-capture #page-header {\n display: flex !important;\n position: fixed !important;\n left: 0 !important;\n top: 0 !important;\n width: var(--idv-rail-width) !important;\n height: 100% !important;\n min-height: 0 !important;\n padding-left: env(safe-area-inset-left, 0px) !important;\n box-sizing: border-box !important;\n z-index: 4 !important;\n }\n .rotated-capture #document-capture #page-header-text {\n writing-mode: vertical-rl;\n transform: rotate(180deg);\n white-space: nowrap;\n }\n /* The step title ("Front side") sits in the band the overlay reserves\n above the frame, centred over the frame. */\n .rotated-capture #document-capture #page-info {\n position: fixed !important;\n left: var(--idv-frame-left, 0px) !important;\n top: var(--idv-cam-top, 0px) !important;\n width: var(--idv-frame-width, 100vw) !important;\n margin: 0 !important;\n padding: 0 !important;\n z-index: 3 !important;\n }\n .rotated-capture #document-capture #step-title {\n font-size: 16px !important;\n font-weight: 600 !important;\n /* centres the text in the title band the overlay reserved — the band\n shrinks when the enlarged frame needs the space */\n line-height: var(--idv-title-band, 30px) !important;\n margin: 0 !important;\n }\n /* The long static instruction has no room in landscape; live guidance\n arrives through the toast at the bottom instead. */\n .rotated-capture #document-capture #step-instructions { display: none !important; }\n /* Error/guidance toast sits INSIDE the frame, just above its bottom edge. */\n .rotated-capture #document-capture #error-block {\n position: fixed !important;\n left: calc(var(--idv-frame-left, 0px) + var(--idv-frame-width, 100vw) / 2) !important;\n bottom: var(--idv-toast-bottom, 8px) !important;\n transform: translateX(-50%) !important;\n width: auto !important;\n max-width: calc(var(--idv-frame-width, 100vw) - 32px) !important;\n margin: 0 !important;\n z-index: 5 !important;\n }\n .rotated-capture #document-capture #image-error-message { width: auto !important; }\n /* The animated ID-card guide doesn\'t fit the rotated frame; the static\n frame is the guide in landscape. */\n .rotated-capture #front-document-animation { display: none !important; }\n /* Float the capture button on the right edge, vertically centred. */\n .rotated-capture #trigger-section {\n position: fixed !important;\n right: calc(14px + env(safe-area-inset-right, 0px)) !important;\n left: auto !important;\n top: 50% !important;\n bottom: auto !important;\n transform: translateY(-50%) !important;\n width: auto !important;\n margin: 0 !important;\n z-index: 5 !important;\n }\n }\n ',document.head.appendChild(t)}();const m=xp[e];(null===(i=Xa.state.autoCaptureSettings)||void 0===i?void 0:i.enabled)&&"selfie"===e&&(m.instructions="second_title_face_autocapture");const w=((t,e)=>hp({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),v=hp({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),y=hp({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),_=document.getElementById(Xa.state.rootElementId);if(!_)throw new Error("Root element not found");const E=Pp(us(e),_),b=Xp(e);fp(v,b),fp(v,E);const C=null!==(a=Xa.state.rotatedDocumentCaptureEnabled)&&void 0!==a&&a&&window.innerWidth>window.innerHeight;"document_front"!==e||C||setTimeout((()=>{const t=document.getElementById(`overlay-frame ${us(e)}`),n=document.getElementById("front-document-animation");if(t&&n){const e=t.getBoundingClientRect(),r=v.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const l=e.left-r.left+(e.width-u)/2,d=e.top-r.top+(e.height-c)/2;n.setAttribute("width",u.toString()),n.setAttribute("height",c.toString()),n.style.width=`${u}px`,n.style.height=`${c}px`,n.style.left=`${l}px`,n.style.top=`${d}px`}}),0);const A=(()=>{const t=hp({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),e=Lp();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",fp(t,e),fp(t,Up({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();fp(E,A),A.style.visibility="hidden";const I=Wp({text:Es.translate(m.page),id:"page-header",testid:"page-header",clientHeight:_.clientHeight}),S=!!(null===(u=null===(s=Xa.state.autoCaptureSettings)||void 0===s?void 0:s.settings)||void 0===u?void 0:u.autocaptureFallback);let T=Fp({click:()=>{o()&&n({frame:eg(r.videoElement),suspendedPreview:!1,isManualCapture:!0})},id:"submit-image",testid:"submit-image",withLoader:null===(l=null===(c=Xa.state)||void 0===c?void 0:c.autoCaptureSettings)||void 0===l?void 0:l.enabled,disabled:!!(null===(h=null===(d=Xa.state)||void 0===d?void 0:d.autoCaptureSettings)||void 0===h?void 0:h.enabled)&&S,manualFallback:S,ariaLabel:Es.translate("click_manual_autocapture")}),D=!!(null===(p=null===(f=Xa.state)||void 0===f?void 0:f.autoCaptureSettings)||void 0===p?void 0:p.enabled)&&S;const O=((t,e)=>{const n=hp({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),r=ug(t);return fp(n,sg(e)),fp(n,r),n})(Es.translate("approve_button"),Es.translate("retake_button")),R=(t=>{let{title:e,text:n,clientHeight:r,customTextColor:o}=t;const i=r<700,a=hp({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Up({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=Up({text:n,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return fp(a,s),fp(a,u),a})({text:Es.translate(m.instructions),title:Es.translate(m.title),clientHeight:_.clientHeight}),M=(t=>{const e=t<700,n=hp({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Xa.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"24px",marginBottom:"24px"},id:"error-block",testid:"error-block"}),r=hp({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=Lp();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",Xa.state.markdownSupportText?fp(r,o):fp(n,o);const i=Xa.state.markdownSupportText&&null!=jp?jp.parse(Xa.state.markdownSupportText,{async:!1}):"",a=Up({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Up({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,fp(r,a)),fp(n,i?[r,s]:a),n})(_.clientHeight),k=(null===(g=Xa.state.autoCaptureSettings)||void 0===g?void 0:g.enabled)?Bp(void 0,S):function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',t}();k.style.display="none";const N=hp({tagName:"div",style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",flex:"2 1 0%",minHeight:"0"},id:"content-section",testid:"content-section"});fp(N,I),fp(N,R),fp(N,v),fp(N,M),fp(y,N),fp(w,y),y.style.height="100%";const x=hp({tagName:"div",style:{width:"100%",margin:"10%",transform:"translateY(10px)",zIndex:"1",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"65px"},id:"trigger-section",testid:"trigger-section"});fp(x,k),fp(x,T),fp(x,O);const P=hp({tagName:"div",style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:"1 1 0%",flexShrink:"0",position:"relative",zIndex:"3"},id:"capture-controls-section",testid:"capture-controls-section"});fp(P,x),fp(y,P),fp(w,r.videoElement);const B=function(t){return hp({tagName:"img",style:{display:"block",position:"absolute",objectFit:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cover",height:"100%",width:"100%",transform:"user"===t?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"})}(us(e)),F=(t=>{const e=hp({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(B);return fp(w,F),{component:w,setLoadingMode:t=>{var e;M.style.visibility="hidden",t&&(A.style.visibility="visible"),D||(T.style.display="none",k.style.display="block",(null===(e=Xa.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(k.style.height="63px",k.style.width="63px"))},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:n}=t;var r,o;T.style.display="none",M.style.display="none",O.style.display="flex";const i=O.querySelector("#approve-image"),a=O.querySelector("#retake-image"),s=i.cloneNode(!0);null===(r=i.parentNode)||void 0===r||r.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",n)},hideApprovalRetakeButtons:()=>{O.style.display="none",M.style.display="flex"},setPreviewImage:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{hideSpinner:n=!1,objectFit:o}=e;B.src=t,o&&(B.style.objectFit=o),A.style.visibility="hidden",r.videoElement.style.display="none",M.style.visibility="hidden",F.style.display="block",D||(T.style.display="none",k.style.display=n?"none":"block")},setLoadingComplete:()=>{k.style.display="none",A.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(M.style.visibility="hidden");let n;n=t==ts.feedback.RESTRICTED_CRITERIA&&e?e:Np[t]?Np[t].message:Es.translate(t)!==t?t:Np.other.message,document.getElementById("image-error-message").innerHTML=Es.translate(n),M.style.visibility="visible"},enableVideoElement:()=>{B.src="",B.style.objectFit="cover",T.style.display="block",r.videoElement.style.display="block","function"==typeof r.videoElement.play&&r.videoElement.play().catch((()=>{})),F.style.display="none",k.style.display="none"},setCapturingShowErrorMode:(t,e)=>{T.style.display="block",F.style.display="none",r.videoElement.style.display="block","function"==typeof r.videoElement.play&&r.videoElement.play().catch((()=>{}));const n=t==ts.feedback.RESTRICTED_CRITERIA,o=Np[t]||Np.other;document.getElementById("image-error-message").innerHTML=e&&n&&null!=jp?jp.parse(e,{async:!1}):Es.translate(o.message),M.style.visibility="visible",A.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:n,pageHeader:r}=t;if(r){const t=document.getElementById("page-header-text");t&&(t.textContent=Es.translate(r))}e&&(document.getElementById("step-title").innerHTML=Es.translate(e)),n&&(document.getElementById("step-instructions").innerHTML=Es.translate(n))},enableManualCapture:()=>{const t=Fp({click:()=>{o()&&n({frame:eg(r.videoElement),suspendedPreview:!1,isManualCapture:!0})},id:"submit-image",testid:"submit-image",withLoader:!1,disabled:!1,ariaLabel:Es.translate("click_manual_autocapture")});t.style.display=T.style.display,x.replaceChild(t,T),T=t,D=!1}}};class lg{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new dg(t,e,n))}}class dg{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=n}}class hg{constructor(){this.name=Yp.ACCEPTED}async handleFrame(){return new lg}}class fg{constructor(){this.name=Yp.VALID}async handleFrame(t){let{context:e,frame:n,deviceInfo:r,detectionStrategy:o}=t;const i=await o.validate({frame:n,deviceInfo:r});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new hg)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new gg)),i}}class pg{constructor(){this.name=Yp.REJECTED}async handleFrame(t){let{context:e,frame:n,detectionStrategy:r,deviceInfo:o}=t;const i=await r.validate({frame:n,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new hg):e.setState(new fg),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new gg),i):(e.invalidFramesCounter++,i)}}class gg{constructor(){this.name=Yp.INVALID}async handleFrame(t){let{context:e,frame:n,detectionStrategy:r,deviceInfo:o}=t;const i=await r.validate({frame:n,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new hg):e.setState(new fg)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new pg)),i}}class mg{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new gg,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=n}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:n}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:n,detectionStrategy:this.detectionStrategy})}}async function wg(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(t,e,n){const r=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=r.getContext("2d");r.width=o.width,r.height=o.height,n?null==i||i.drawImage(t,n.x,n.y,n.width,n.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return r.remove(),a}(e,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),i=await new Promise(((i,a)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),i(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),ws(e.data.error.toString(),t,"error"),a(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(o({type:t,imageData:r,height:e.height,width:e.width},n))}))}));return Cs(`****** in web-SDK return result for ${t}`,i),i}async function vg(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return wg("DETECT_DOCUMENT",t,{},Wf[As.DOCUMENT_DETECTOR].imageDimensions)}async function yg(t,e){return wg("BLUR_GLARE_CLASSIFY",t,{},Wf[As.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}async function _g(t){var e,n,r,i,a;if(t instanceof HTMLVideoElement&&t.paused)return[];const s=null!==(a=null===(i=null===(r=null===(n=null===(e=Xa.state)||void 0===e?void 0:e.autoCaptureSettings)||void 0===n?void 0:n.settings)||void 0===r?void 0:r.faceDetector)||void 0===i?void 0:i.detectionInputLongEdge)&&void 0!==a?a:640,u=function(t,e,n){const r=Math.max(t,e);if(!t||!e||r<=n)return;const o=n/r;return{width:Math.round(t*o),height:Math.round(e*o)}}(t.width,t.height,s),c=await wg("DETECT_FACE_LANDMARKS",t,{},u);return u?(l=c,d=t.width/u.width,(null!=l?l:[]).map((t=>{var e;return o(o({},t),{},{x:t.x*d,y:t.y*d,width:t.width*d,height:t.height*d,extra:(null===(e=t.extra)||void 0===e?void 0:e.landmarks)?o(o({},t.extra),{},{landmarks:t.extra.landmarks.map((t=>o(o({},t),{},{x:t.x*d,y:t.y*d},void 0!==t.z?{z:t.z*d}:{})))}):t.extra})}))):c;var l,d}class Eg{constructor(t,e){this.hasBarcode=t;const n=t?Yf(e):null;null==n||n.resetSweepCooldown(),this.barcodeModel=n,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:n}=t;var r;const o=new lg;let i=Date.now();const a=null===(r=await vg(e))||void 0===r?void 0:r[0];let s=Date.now()-i;if(o.addStepResponse(Za.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=ag({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:n.width,deviceHeight:n.height,deviceLeft:n.left,deviceTop:n.top,threshold:Xa.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Xa.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(Za.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await yg(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Za.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(Za.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Math.min(t.width,Math.max(0,Math.floor(e.x-n))),o=Math.min(t.height,Math.max(0,Math.floor(e.y-n))),i=Math.max(0,Math.min(t.width-r,Math.ceil(e.width+2*n))),a=Math.max(0,Math.min(t.height-o,Math.ceil(e.height+2*n))),s=document.createElement("canvas");if(s.width=i,s.height=a,i>0&&a>0){const e=s.getContext("2d");null==e||e.drawImage(t,r,o,i,a,0,0,i,a)}return s}(e,a),n=this.barcodeModel.detect(t);this.rawBarcodeData=null==n?void 0:n.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const r=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(Za.BARCODE_DETECTION,r,s),!r)return o}return o}}class bg{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Cg{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Za).forEach((t=>{this.stats.set(t,new bg)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,n,r){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=n,o.countFailed+=r}}let Ag=!1;const Ig=t=>{Ag=t};async function Sg(t){let{camera:e,onDetect:n,showError:r,onMetricsBatch:o,hasBarcode:i,supportedBarcodeSymbologies:a}=t;var s,u,c,l,d;const h=new mg(new Eg(i,a),function(t){var e;const n=null===(e=Xa.state.autoCaptureSettings.settings)||void 0===e?void 0:e.stability,r=t?null==n?void 0:n.documentBackStableFramesCountWithBarcode:null==n?void 0:n.documentBackStableFramesCountNoBarcode,o=null!=r?r:null==n?void 0:n.documentBackStableFramesCount;return Number.isFinite(o)&&o>0?o:1}(i)),f=null===(s=Xa.state.autoCaptureSettings.settings)||void 0===s?void 0:s.frameSamplingThreshold;Ig(!0);const p=new Cg;let g=new Cg,m=0;for(;h.state.name!==Yp.ACCEPTED&&Ag;)if(tg(e.videoElement)){try{const t=Date.now(),i=rg(e.videoElement),a=e.videoElement.getBoundingClientRect(),s={width:null!==(u=null==a?void 0:a.width)&&void 0!==u?u:0,height:null!==(c=null==a?void 0:a.height)&&void 0!==c?c:0,left:null!==(l=null==a?void 0:a.left)&&void 0!==l?l:0,top:null!==(d=null==a?void 0:a.top)&&void 0!==d?d:0},w=await h.handleFrame({frame:i,deviceInfo:s}),v=Date.now()-t+$p;p.addStats(w,v),g.addStats(w,v),m++,h.stats=p,f&&m>=f&&(null==o||o(g),g=new Cg,m=0),await og({context:h,onDetect:n,showError:r,frame:i})}catch(t){Cs("autocapture back-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,$p)))}else await new Promise((t=>setTimeout(t,$p)));m>0&&(null==o||o(g))}class Tg{async validate(t){let{frame:e,deviceInfo:n}=t;var r;const o=new lg;let i=Date.now();const a=null===(r=await vg(e))||void 0===r?void 0:r[0];let s=Date.now()-i;if(o.addStepResponse(Za.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=ag({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:n.width,deviceHeight:n.height,deviceLeft:n.left,deviceTop:n.top,threshold:Xa.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Xa.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(Za.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await yg(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(Za.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(Za.GLARE_DETECTION,!d,s),o}}let Dg=!1;const Og=t=>{Dg=t};const Rg=t=>"number"==typeof(null==t?void 0:t.x)&&"number"==typeof(null==t?void 0:t.y);function Mg(t,e,n,r){return t.x>0&&t.y>0&&t.x+t.width<n&&t.y+t.height<r&&[e.leftEye,e.rightEye,e.nose].every((t=>(t=>{let{x:e,y:o}=t;return e>0&&o>0&&e<n&&o<r})(t)))}function kg(t,e,n){const r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y},i=Math.hypot(r.x,r.y)*Math.hypot(o.x,o.y);if(0===i)return NaN;const a=Math.min(1,Math.max(-1,(r.x*o.x+r.y*o.y)/i));return 180*Math.acos(a)/Math.PI}function Ng(t){let{leftEye:e,rightEye:n,nose:r}=t;return{leftEyeAngle:kg(e,n,r),rightEyeAngle:kg(n,e,r),rollRadians:Math.atan2(n.y-e.y,n.x-e.x)}}class xg{async validate(t){let{frame:e,deviceInfo:n}=t;var r;const o=new lg;let i=Date.now();const a=null===(r=await _g(e))||void 0===r?void 0:r[0];let s=Date.now()-i;if(o.addStepResponse(Za.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=ag({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:n.width,deviceHeight:n.height,deviceLeft:n.left,deviceTop:n.top,threshold:Xa.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Xa.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});if(s=Date.now()-i,o.addStepResponse(Za.FACE_POSITION,u,s),!u)return o;const c=function(t){var e,n;const r=null!==(n=null===(e=null==t?void 0:t.extra)||void 0===e?void 0:e.landmarks)&&void 0!==n?n:[];if(!r.length)return null;let o=r.find((t=>"leftEye"===(null==t?void 0:t.name))),i=r.find((t=>"rightEye"===(null==t?void 0:t.name))),a=r.find((t=>"noseTip"===(null==t?void 0:t.name)));if(Rg(o)&&Rg(i)&&Rg(a)||(o=r[133],i=r[362],a=r[1]),!Rg(o)||!Rg(i)||!Rg(a))return null;const[s,u]=o.x<=i.x?[o,i]:[i,o];return{leftEye:s,rightEye:u,nose:a}}(a);if(!c)return Cs("selfie face angle checks skipped - no landmarks in the detection response"),o;if(!Mg(a,c,e.width,e.height))return Cs("selfie face angle checks skipped - face is not fully inside the frame"),o;i=Date.now();const l=Xa.state.autoCaptureSettings.settings.faceDetector;Cs("selfie face angles",Ng(c));const d=!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:26,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70;const{leftEyeAngle:r,rightEyeAngle:o}=Ng(t);return!(e<r&&r<n&&e<o&&o<n)}(c,l.selfieMinFrontalAngle,l.selfieMaxFrontalAngle);if(s=Date.now()-i,o.addStepResponse(Za.FACE_ANGLE,d,s),!d)return o;i=Date.now();const h=!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25;return Math.abs(Ng(t).rollRadians)>e}(c,l.selfieRotationThreshold);return s=Date.now()-i,o.addStepResponse(Za.FACE_ROTATION,h,s),o}}let Pg=!1;const Bg=t=>{Pg=t};const Fg=new Map;class Lg extends Error{constructor(t,e,n){super(n||`Error during ${e}: ${t}`),this.errorCode=t,this.step=e,this.name="CaptureError"}}function zg(t,e){const n=Fg.get(t);n&&(n.reject(e),Fg.delete(t))}function Ug(t,e,n){const r=Fg.get(t);return r&&(r.reject(new Lg("other","document"===t?"document_front":"selfie",`New capture${"document"===t?"Document":"Selfie"} call cancelled previous one`)),Fg.delete(t)),new Promise(((r,o)=>{Fg.set(t,{resolve:r,reject:o,onCapture:n,captures:[],stepType:t,acquisitionId:e})}))}const Vg={document_front:!1,document_back:!1,selfie:!0};function Hg(t){return"document_front"===t||"document_back"===t?"document":"selfie"===t?"selfie":null}async function Gg(t,e){var n,r,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=ls.createCameraNotAllowedEvent(e.message,t);await gs(null===(n=Xa.state)||void 0===n?void 0:n.step,null===(r=Xa.state)||void 0===r?void 0:r.userToken,null===(o=Xa.state)||void 0===o?void 0:o.sessionId,null===(i=Xa.state)||void 0===i?void 0:i.clientId,s),Xa.dispatch("setIsCapturingProcessStarted",!1);const u=Hg(t);u&&zg(u,new Lg(a,t))}Ha(t,a)}function jg(t,e){const n=(t=>{var e,n,r,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(r=null===(n=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===n?void 0:n.split(":"))||void 0===r?void 0:r[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:n.data,format:n.format,captureMargins:gp(e)}}}const Wg=async t=>{var e,n,r,o;const i=ls.createPageViewEvent(t);await gs(null===(e=Xa.state)||void 0===e?void 0:e.step,null===(n=Xa.state)||void 0===n?void 0:n.userToken,null===(r=Xa.state)||void 0===r?void 0:r.sessionId,null===(o=Xa.state)||void 0===o?void 0:o.clientId,i)};let Xg,Yg=!1;const qg=async t=>{"expired"===(null==t?void 0:t.status)&&Ga("processing","session-expired",`Session expired for session id: ${Xa.state.sessionId}`)},Zg=t=>{let{step:e}=t;var n,r,o;const i=null===(r=null===(n=Xa.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled;let a,s,u,c=!1,l=0,d=!1,h=0,f=!1,p=!1,g="auto_detecting";const m=null===(o=Xa.state)||void 0===o?void 0:o.videoCaptureSettings,w=(t=>{let e,n,r=!1;const o=Mp(t),i=new vp(o),a=async()=>{r&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),r=!1)};return{get videoStream(){return n},startVideoFeed:async t=>{var o,s,u;r&&await a(),"environment"==t&&(e=await Ip());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=Rp(t,null===(u=Xa.state)||void 0===u?void 0:u.videoCaptureSettings);yp.getInstance().stopStream(),n=await i.startCamera(c,l),r=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(us(e));function v(){void 0!==a&&(clearTimeout(a),a=void 0)}function y(t,e){d||O.setAutoCapturingError(t,e)}function _(){d&&"approval_pending"!==g&&O.setAutoCapturingError("manual_capture_fallback_prompt")}function E(){var t,n;if(!(null===(n=null===(t=Xa.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autocaptureFallback))return;if(p||void 0!==a||d||f)return;void 0===s&&(s=Date.now()+function(){var t,n,r,o,i;const a=null===(n=null===(t=Xa.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autocaptureFallbackSettings;return"document_front"===e?null!==(r=null==a?void 0:a.documentFrontTimeoutMs)&&void 0!==r?r:Qp:"document_back"===e?null!==(o=null==a?void 0:a.documentBackTimeoutMs)&&void 0!==o?o:Qp:"selfie"===e&&null!==(i=null==a?void 0:a.selfieTimeoutMs)&&void 0!==i?i:Qp}());const r=s-Date.now();r<=0?Promise.resolve().then(b):a=setTimeout((()=>{a=void 0,b()}),r)}function b(){p||d||f||"approval_pending"===g||(d=!0,g="manual_fallback_shown",O.enableManualCapture(),O.setAutoCapturingError("manual_capture_fallback_prompt"),function(){var t,n,r,o;const i=ls.createManualCaptureFallbackShownEvent(e,h);gs(null===(t=Xa.state)||void 0===t?void 0:t.step,null===(n=Xa.state)||void 0===n?void 0:n.userToken,null===(r=Xa.state)||void 0===r?void 0:r.sessionId,null===(o=Xa.state)||void 0===o?void 0:o.clientId,i)}())}async function C(){const t=u;if(t)try{await t}catch(t){}p||f||u!==t||(u=B(e))}!function(t){za({type:"page-load",step:t})}(e),(async()=>{const t=await cp(Xa.state.sessionId,Xa.state.userToken,Xa.state.clientId);qg(t)})();let A=!1;function I(){f||A||(A=!0,function(){var t,n,r,o;const i=ls.createCaptureAbandonedEvent(e,g);gs(null===(t=Xa.state)||void 0===t?void 0:t.step,null===(n=Xa.state)||void 0===n?void 0:n.userToken,null===(r=Xa.state)||void 0===r?void 0:r.sessionId,null===(o=Xa.state)||void 0===o?void 0:o.clientId,i)}())}function S(){I()}function T(){I()}function D(){p=!0,v(),"document_front"===e&&Og(!1),"document_back"===e&&Ig(!1),"selfie"===e&&Bg(!1),window.removeEventListener("beforeunload",S),window.removeEventListener("pagehide",T)}window.addEventListener("beforeunload",S),window.addEventListener("pagehide",T);const O=cg({step:e,setImage:R,camera:w,isManualCaptureAllowed:function(){var t,e;return!(null===(e=null===(t=Xa.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.autocaptureFallback)||(!i||d)}});async function R(t){let{suspendedPreview:n=!1,isManualCapture:r=!0,frame:o,context:a}=t;var s;if(p)return;if(o||(o=eg(w.videoElement)),w.videoElement.style.display="none","function"==typeof w.videoElement.pause&&w.videoElement.pause(),"document_front"===e){Og(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&Ig(!1),"selfie"===e&&Bg(!1);const u=Date.now(),h=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(w);if(!c)return;g=r?"manual_capturing":"auto_detecting",r&&i&&d&&function(){var t,n,r,o;const i=ls.createManualCaptureTriggeredEvent(e);gs(null===(t=Xa.state)||void 0===t?void 0:t.step,null===(n=Xa.state)||void 0===n?void 0:n.userToken,null===(r=Xa.state)||void 0===r?void 0:r.sessionId,null===(o=Xa.state)||void 0===o?void 0:o.clientId,i)}();const f=function(t,e){var n,r;if("document_front"!==t&&"document_back"!==t&&"selfie"!==t)return!1;const o=e?"manual":"autocapture",i=null===(n=Xa.state.captureApprovalSettings)||void 0===n?void 0:n[o];return null!==(r=null==i?void 0:i[t])&&void 0!==r?r:Vg[t]}(e,r),y=(t=>t.toDataURL("image/jpeg"))(o),E=function(t,e){var n,r,o;const i=null!==(n=null==e?void 0:e.split(",")[1])&&void 0!==n?n:"";return{image_width:null!==(r=null==t?void 0:t.width)&&void 0!==r?r:0,image_height:null!==(o=null==t?void 0:t.height)&&void 0!==o?o:0,image_size_bytes:Math.round(3*i.length/4)}}(o,y);f||O.setLoadingMode(null==m?void 0:m.showLoadingBlock);const b=("document_front"===e||"document_back"===e)&&null!==(s=Xa.state.rotatedDocumentCaptureEnabled)&&void 0!==s&&s&&window.innerWidth>window.innerHeight,C=!f&&b;C||O.setPreviewImage(y,{hideSpinner:f,objectFit:f&&"selfie"!==e?"contain":void 0}),_();const A=n&&!C&&!f;f?(c=!1,g="approval_pending",v(),function(t,n,r,o,i,a){Wg(function(t){return`${t}_approval`}(e)),"document_front"===e||"document_back"===e?O.setTitleInstructionsMidStep({pageHeader:"page_header_check_image",title:"main_title_check_image",instructions:"document_approval_instruction"}):O.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"});O.setApprovalRetakeButtons({approveAction:async()=>{O.hideApprovalRetakeButtons(),O.setLoadingMode(null==m?void 0:m.showLoadingBlock),_(),await k(!1,t,n,r,o,i,a)},retakeAction:async()=>{l++,O.hideApprovalRetakeButtons(),M()}})}(y,h,u,a,r,E)):(Wg(function(t){return`${t}_confirmation`}(e)),v(),await k(A,y,h,u,a,r,E))}function M(){if(g="auto_detecting",function(){if("document_front"===e||"document_back"===e){const t=xp[e];O.setTitleInstructionsMidStep({pageHeader:t.page,title:t.title,instructions:t.instructions})}else"selfie"===e&&O.setTitleInstructionsMidStep({instructions:i?"second_title_face_autocapture":"second_title_document_face"})}(),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}w.startVideoFeed(us(e)).then((()=>{p||(c=!0,O.enableVideoElement(),y(null),_(),i&&C())})).catch((async t=>{throw await Gg(e,t),t}))}async function k(t,n,r,o,a,s,u){var d,v;const E=[],b=l;l=0,function(t,e){za({type:"capture-image",imageType:e,step:t})}(e,cs(e));let A=!1;try{const l=Date.now(),p=jg(n,us(e));c=!1;const g=Hg(e),C=g?function(t){var e;return null===(e=Fg.get(t))||void 0===e?void 0:e.acquisitionId}(g):void 0;E.push(pp(Xa.state.sessionId,Xa.state.userToken,Xa.state.clientId,null==p?void 0:p.image,r,cs(e),(null==a?void 0:a.detectionStrategy)instanceof Eg?null===(d=a.detectionStrategy)||void 0===d?void 0:d.rawBarcodeData:void 0,C)),E.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),O.setLoadingMode(null==m?void 0:m.showLoadingBlock),_();const I=(await Promise.all(E))[0];Object.prototype.hasOwnProperty.call(I,"has_barcode")&&(Yg=I.has_barcode,Xg=null!==(v=I.supported_barcode_symbologies)&&void 0!==v?v:[]),async function(t){let{step:e,requestStartTime:n,imageProcessingStartTime:r,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s,capturedImage:u}=t;const c=Date.now()-n,l=r?n-r:0,d=ls.createUploadImageEvent(e,String(c),String(o),String(l),u);await gs(e,i,a,s,d)}({step:e,requestStartTime:l,imageProcessingStartTime:o,serverProcessingTime:I.serverProcessingTime,userToken:Xa.state.userToken,sessionId:Xa.state.sessionId,clientId:Xa.state.clientId,capturedImage:u}),Xa.dispatch("setMissingImages",I.missing_images),O.setLoadingComplete(),function(t,e,n){za({type:"capture-image-result",imageType:e,feedback:n,step:t})}(e,cs(e),I.feedback);const S=Hg(e);if(S&&"modular"===Xa.state.flowType){const t=cs(e);!function(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=Fg.get(t);if(r){if(r.onCapture)try{r.onCapture(e)}catch(t){console.error("onCapture callback error:",t)}n&&r.captures.push(e)}}(S,{sessionId:Xa.state.sessionId,type:t===es.image_type.DOCUMENT_FRONT?"document_front":t===es.image_type.DOCUMENT_BACK?"document_back":"selfie",feedback:I.feedback})}if("ok"!==I.feedback)return s||h++,N(null==a?void 0:a.stats,b,!1,I.feedback,s?void 0:h),A=!0,await async function(t,e){ig("border-color",qp),e?O.setAutoCapturingError(t.feedback,t.custom_feedback):i?y(t.feedback,t.custom_feedback):O.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),ig("border-color",Kp)}(I,s),void M();if(f=!0,D(),N(null==a?void 0:a.stats,b,!0,void 0,s?void 0:h+1,s?Date.now()-o:void 0),A=!0,await w.stopVideoFeed(),ig("border-color",Zp),await new Promise((t=>setTimeout(t,750))),ig("border-color",Kp),"modular"===Xa.state.flowType)if("document_front"===e&&I.missing_images.includes(es.image_type.DOCUMENT_BACK))Xa.dispatch("setStep","document_back");else{const t=document.getElementById(Xa.state.rootElementId);t&&(t.style.visibility="hidden"),S&&function(t){const e=Fg.get(t);e&&(e.resolve({captures:[...e.captures]}),Fg.delete(t))}(S)}else{const t=(t=>{if("modular"===Xa.state.flowType)return null;let e;return e=t&&t.length>0?t[0]:"processing",e})(Xa.state.missingImages);t&&Xa.dispatch("setStep",t)}}catch(t){if(f)return void ws(t instanceof Error?t.message:"error after successful capture","failed-to-submit-image",e);O.setLoadingComplete(),O.setCapturingShowErrorMode(ts.feedback.OTHER),g=s?"manual_capturing":"auto_detecting";const n=Hg(e);n&&"modular"===Xa.state.flowType&&zg(n,new Lg("failed-to-submit-image",e)),w.startVideoFeed(us(e)).then((()=>{p||(c=!0,y(null),_(),i&&C())})).catch((async t=>{throw await Gg(e,t),t})),Ha(e,"failed-to-submit-image"),ws(t instanceof Error?t.message:"failed to submit image","failed-to-submit-image",e),A||(s||h++,N(null==a?void 0:a.stats,b,!1,ts.feedback.OTHER,s?void 0:h))}}function N(t,n,r,o,i,a){var s,u,c,l;const d=ls.createUserActionEvent("capture_image",e,t,n,r,o,i,a);gs(null===(s=Xa.state)||void 0===s?void 0:s.step,null===(u=Xa.state)||void 0===u?void 0:u.userToken,null===(c=Xa.state)||void 0===c?void 0:c.sessionId,null===(l=Xa.state)||void 0===l?void 0:l.clientId,d)}function x(t){var n,r,o,i;const a=ls.createUserActionEvent("autocapture_stats",e,t);gs(null===(n=Xa.state)||void 0===n?void 0:n.step,null===(r=Xa.state)||void 0===r?void 0:r.userToken,null===(o=Xa.state)||void 0===o?void 0:o.sessionId,null===(i=Xa.state)||void 0===i?void 0:i.clientId,a)}async function P(){var t,n,r,o,i;try{const a=w.getCameraInfo(),s=function(t,e){const n=bp(),r={label:e,is_ios:n};if(n||!t)return r;const o=t.getVideoTracks()[0];if(!o)return r;try{const t=o.getSettings();r.width=t.width,r.height=t.height,r.frame_rate=t.frameRate?Math.round(t.frameRate):void 0}catch(t){}try{const t=o.getCapabilities(),e=Array.isArray(t.focusMode)?t.focusMode:[];e.length>0&&(r.has_continuous_focus=e.includes("continuous"))}catch(t){}return r}(w.videoStream,null===(t=null==a?void 0:a.selectedCamera)||void 0===t?void 0:t.label),u=await ls.createCaptureStartEvent(e,s);gs(null===(n=Xa.state)||void 0===n?void 0:n.step,null===(r=Xa.state)||void 0===r?void 0:r.userToken,null===(o=Xa.state)||void 0===o?void 0:o.sessionId,null===(i=Xa.state)||void 0===i?void 0:i.clientId,u)}catch(t){Cs("Failed to send `capture_start` event",t)}}async function B(t){if(E(),"document_front"===t){for(;!c||!tg(w.videoElement);)if(await new Promise((t=>setTimeout(t,100))),p)return;if(p)return;return w.videoElement.onloadedmetadata=()=>{var t;Cs("video dimensions (width, height, orientation): ",w.videoElement.videoWidth,w.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:n,showError:r,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new mg(new Tg,null!==(s=null===(a=null===(i=Xa.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.documentFrontStableFramesCount)&&void 0!==s?s:2),p=null===(u=Xa.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold,g=new Cg;let m=new Cg,w=0;for(Og(!0);f.state.name!==Yp.ACCEPTED&&Dg;)if(tg(e.videoElement)){try{const t=Date.now(),i=rg(e.videoElement),a=e.videoElement.getBoundingClientRect(),s={width:null!==(c=null==a?void 0:a.width)&&void 0!==c?c:0,height:null!==(l=null==a?void 0:a.height)&&void 0!==l?l:0,left:null!==(d=null==a?void 0:a.left)&&void 0!==d?d:0,top:null!==(h=null==a?void 0:a.top)&&void 0!==h?h:0},u=await f.handleFrame({frame:i,deviceInfo:s}),v=Date.now()-t+$p;g.addStats(u,v),m.addStats(u,v),w++,f.stats=g,p&&w>=p&&(null==o||o(m),m=new Cg,w=0),await og({context:f,onDetect:n,showError:r,frame:i})}catch(t){Cs("autocapture front-doc frame skipped after error",t)}await new Promise((t=>setTimeout(t,$p)))}else await new Promise((t=>setTimeout(t,$p)));w>0&&(null==o||o(m))}({camera:w,onDetect:R,showError:y,onMetricsBatch:x})}if("document_back"===t){for(;!c||!tg(w.videoElement);)if(await new Promise((t=>setTimeout(t,100))),p)return;if(p)return;return w.videoElement.onloadedmetadata=()=>{var t;Cs("video dimensions (width, height, orientation): ",w.videoElement.videoWidth,w.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await Sg({camera:w,onDetect:R,showError:y,onMetricsBatch:x,hasBarcode:Yg,supportedBarcodeSymbologies:Xg})}if("selfie"===t){for(;!c||!tg(w.videoElement);)if(await new Promise((t=>setTimeout(t,100))),p)return;if(p)return;return w.videoElement.onloadedmetadata=()=>{var t;Cs("video dimensions (width, height, orientation): ",w.videoElement.videoWidth,w.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:n,showError:r,onMetricsBatch:o}=t;var i,a,s,u,c,l,d,h;const f=new mg(new xg,null!==(s=null===(a=null===(i=Xa.state.autoCaptureSettings.settings)||void 0===i?void 0:i.stability)||void 0===a?void 0:a.selfieStableFramesCount)&&void 0!==s?s:30),p=null===(u=Xa.state.autoCaptureSettings.settings)||void 0===u?void 0:u.frameSamplingThreshold;Bg(!0);const g=new Cg;let m=new Cg,w=0;for(;f.state.name!==Yp.ACCEPTED&&Pg;)if(tg(e.videoElement)){try{const t=Date.now(),i=rg(e.videoElement),a=e.videoElement.getBoundingClientRect(),s={width:null!==(c=null==a?void 0:a.width)&&void 0!==c?c:0,height:null!==(l=null==a?void 0:a.height)&&void 0!==l?l:0,left:null!==(d=null==a?void 0:a.left)&&void 0!==d?d:0,top:null!==(h=null==a?void 0:a.top)&&void 0!==h?h:0},u=await f.handleFrame({frame:i,deviceInfo:s}),v=Date.now()-t;g.addStats(u,v),m.addStats(u,v),w++,f.stats=g,p&&w>=p&&(null==o||o(m),m=new Cg,w=0),await og({context:f,onDetect:n,showError:r,frame:i,isSelfie:!0})}catch(t){Cs("autocapture selfie frame skipped after error",t)}await new Promise((t=>setTimeout(t,50)))}else await new Promise((t=>setTimeout(t,50)));w>0&&(null==o||o(m))}({camera:w,onDetect:R,showError:y,onMetricsBatch:x})}}i&&(u=B(e)),Wg(e);const F=document.getElementById(Xa.state.rootElementId);F&&(F.style.visibility="hidden"),w.startVideoFeed(us(e)).then((async()=>{if(!p){c=!0,F&&(F.style.visibility="visible");try{w.videoElement.readyState<HTMLMediaElement.HAVE_METADATA&&await Promise.race([new Promise((t=>w.videoElement.addEventListener("loadedmetadata",(()=>t()),{once:!0}))),new Promise((t=>setTimeout(t,3e3)))]),await P()}catch(t){Cs("Failed to send `capture_start` event",t)}}})).catch((async t=>{throw await Gg(e,t),t}));const L=O.component;return L.disposeStep=D,L},Kg=()=>{za({type:"start-verification-processing",step:Xa.state.step}),Va("processing","processing",Xa.state.sessionId);const t=$g("processing-verification");fp(t,Wp({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await cp(Xa.state.sessionId,Xa.state.userToken,Xa.state.clientId);o(t)},n=()=>{setTimeout(e,3e3)},r=async t=>{Xa.dispatch("setStep",t.status),Xa.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(Xa.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){yp.getInstance().stopStream();const n=ls.createProcessingCompleteEvent();await gs(Xa.state.step,Xa.state.userToken,null===(e=Xa.state)||void 0===e?void 0:e.sessionId,null===(o=Xa.state)||void 0===o?void 0:o.clientId,n),r(t),Va("complete",t.status,Xa.state.sessionId),function(t,e,n){za({type:"verification-complete",step:t,sessionId:e,callbackUrl:n})}("complete",Xa.state.sessionId,t.callback_url),i=Pa,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(r(t),Xa.dispatch("setIsCapturingProcessStarted",!1),Va("recapture",t.status,Xa.state.sessionId),function(t,e,n){za({type:"verification-recapture",step:t,sessionId:e,reason:n})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?Ga("processing","session-expired",`Session expired for session id: ${Xa.state.sessionId}`):n();else"processing"!==t.state&&(r(t),n())};return e(),t},$g=t=>hp({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Qg(t,e){var n;if(!t)return;!function(t){var e;null===(e=null==t?void 0:t.disposeStep)||void 0===e||e.call(t)}(e.firstChild),null===(n=e.firstChild)||void 0===n||n.remove();const r=function(t){switch(t){case"processing":return Kg;case"document_front":case"document_back":case"selfie":return Zg;default:throw new Error("Invalid step")}}(t);fp(e,r({step:t}))}let Jg=null,tm=0;function em(){window.removeEventListener("resize",rm),window.removeEventListener("orientationchange",rm)}function nm(){em(),Jg=null,tm=0}function rm(){if(!Jg)return void em();if("landscape"!==as())return;const t=Jg,e=tm?Date.now()-tm:0;nm(),ys("rotate_completed",t,e)}function om(t,e){var n,r;const o=("document_front"===t||"document_back"===t)&&null!==(n=Xa.state.rotatedDocumentCaptureEnabled)&&void 0!==n&&n;null==e||e.classList.toggle("rotated-capture",o),null===(r=document.querySelector(".app-root"))||void 0===r||r.classList.toggle("rotated-capture",o),function(t,e){e&&t?Jg!==t&&(nm(),"landscape"!==as()?(Jg=t,tm=Date.now(),ys("rotate_prompt_shown",Jg),window.addEventListener("resize",rm),window.addEventListener("orientationchange",rm)):ys("rotate_completed",t,0)):nm()}(t,o)}function im(t){let{key:e,state:n}=t;const r=n.rootElementId,o=document.getElementById(r);"step"===e&&(om(n.step,o),"complete"!==n.step&&"recapture"!==n.step&&Qg(n.step,o)),o&&"processing"===n.step&&(o.style.visibility="hidden")}function am(){const t=function(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}(Ba(Pa));if(!t)throw new Error("Error restarting session, stored session data is invalid or missing");const e=t.sessionId,n=t.userToken,r=t.flowType;return Xa.dispatch("setSessionId",e),Xa.dispatch("setUserToken",n),{sessionId:e,userToken:n,flowType:r}}async function sm(){var t,e;if(null===(t=Xa.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await lm(),Cs("all models loaded - auto-capture enabled")}catch(t){Xa.dispatch("setAutoCaptureSettings",{enabled:!1,settings:null===(e=Xa.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),Cs("Model loading did not complete on time:",t);ws(`timed out loading models: ${qf.filter((t=>Wf[t].status!==jf.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const n=Object.values(Wf).filter((t=>t.status===jf.LOADED)).map((t=>t.loadingStats));!async function(t,e){const n=ls.createSdkInitEvent(t,e);await vs("init",n)}(Date.now()-t,n)}}async function um(t){var e;try{await yp.getInstance().startNewStream({video:o(o({},Rp("environment",null===(e=Xa.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await Op("environment")})}),Ua("init",t),function(t,e,n){const r=document.getElementById(n);if("modular"===Xa.state.flowType)return;r.style.visibility="visible";const o=t[0];om(o,r),Qg(o,r)}(Xa.state.missingImages,Xa.state.sessionId,Xa.state.rootElementId)}catch(t){await Gg("init",t)}}async function cm(t){let{status:e,sessionId:n,userToken:r,missingImages:o,rootElementId:i,language:a,flowType:s}=t;await async function(){if(Qf)await Qf;else{const t=await qa(Xa.state.clientId,Xa.state.language);await up(t)}}(),void 0!==s&&""!==s&&Xa.dispatch("setFlowType",s),function(t,e){za({type:"session-granted",step:t,sessionId:e})}("init",n),Xa.dispatch("setStatus",e),Xa.dispatch("setSessionId",n),Xa.dispatch("setUserToken",r),Xa.dispatch("setMissingImages",o),Xa.dispatch("setRootElement",i),Xa.dispatch("setLanguage",a),async function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";Es.overrideLanguage(bs[n]||bs.en);let r=document.getElementById(e);if(!r){r=hp({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n /* Landscape (rotated capture): fill the *visible* viewport exactly. 100vh\n overshoots on mobile (includes the address-bar area) → the page scrolls\n and shows white below the camera. 100dvh = the dynamic (visible) height,\n so the camera fills the screen with no scroll/white. The background goes\n black too, so no white strip can peek out beside the capture button or\n the header rail. */\n @media (orientation: landscape) {\n #${e}.rotated-capture {\n height: 100vh !important;\n height: 100dvh !important;\n overflow: hidden !important;\n background: #000 !important;\n }\n }\n `,fp(document.head,t),fp(document.body,r)}"modular"===Xa.state.flowType&&(r.style.visibility="hidden")}(Xa.state.sessionId,Xa.state.rootElementId,Xa.state.language),function(){try{ka.events.off(xa,im)}catch(t){}ka.events.on(xa,im)}(),await sm(),"modular"!==Xa.state.flowType?await um(n):Ua("init",n)}const lm=async()=>{const t=Xa.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Zf(),new Promise(((e,n)=>setTimeout((()=>n(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function dm(t){if(Xa.state.isCapturingProcessStarted)return void Ha(Xa.state.step,"trying-to-initialize-active-session");const e=t?await async function(t){let e,n,r;try{const o=await dp(t,Xa.state.consentVersion,Xa.state.clientId);return e=o.sessionId,n=o.userToken,r=o.flowType,Xa.dispatch("setSessionId",e),Xa.dispatch("setUserToken",n),{sessionId:e,userToken:n,flowType:r}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t):am(),n=e.sessionId,r=e.userToken,o=e.flowType;if(!n)return void Ha(Xa.state.step,"other");const{missing_images:i,status:a}=await cp(n,r,Xa.state.clientId);return Xa.dispatch("setIsCapturingProcessStarted",!0),await cm({status:a,sessionId:n,userToken:r,missingImages:i,rootElementId:Xa.state.rootElementId,language:Xa.state.language,flowType:o}),!0}async function hm(t){if("modular"!==Xa.state.flowType)throw new Error('showStep() is only available when flowType is "modular". Current flowType: '+Xa.state.flowType);if(!Xa.state.isCapturingProcessStarted||!Xa.state.sessionId)throw new Error("Session is not active. Call start() first to start a verification session.");let e;try{e=function(t){if("document"===t)return"document_front";if("selfie"===t)return"selfie";throw new Error(`Invalid step type: ${t}`)}(t)}catch(e){throw new Error(`Cannot show step "${t}": ${e instanceof Error?e.message:"Step type not available in missing_images"}`)}const n=document.getElementById(Xa.state.rootElementId);n&&"modular"===Xa.state.flowType&&(n.style.visibility="hidden"),Xa.dispatch("setStep",e)}async function fm(t){try{return await dm(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function pm(){try{return await async function(){if("recapture"===Xa.state.verificationStatus||"pending"===Xa.state.verificationStatus){const{sessionId:t,userToken:e}=am(),{missing_images:n,status:r}=await cp(t,e,Xa.state.clientId);return await cm({status:r,sessionId:t,userToken:e,missingImages:n,rootElementId:Xa.state.rootElementId,language:Xa.state.language}),!0}Ha(Xa.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function gm(t){if(!t||!t.acquisitionId)throw new Error("captureDocument requires an acquisitionId");const e=Ug("document",t.acquisitionId,t.onCapture);return hm("document").catch((t=>{const e=t instanceof Error?t.message:String(t);zg("document",new Lg("other","document_front",e))})),e}async function mm(t){if(!t||!t.acquisitionId)throw new Error("captureSelfie requires an acquisitionId");const e=Ug("selfie",t.acquisitionId,t.onCapture);return hm("selfie").catch((t=>{const e=t instanceof Error?t.message:String(t);zg("selfie",new Lg("other","selfie",e))})),e}const wm=()=>ds;var vm=Object.freeze({__proto__:null,CaptureError:Lg,captureDocument:gm,captureSelfie:mm,recapture:pm,start:fm,version:wm});const ym={initialize:e.initialize,...vm};Object.defineProperty(exports,"initialize",{enumerable:!0,get:function(){return e.initialize}}),exports.CaptureError=Lg,exports.PACKAGE_VERSION="2.6.2",exports.captureDocument=gm,exports.captureSelfie=mm,exports.idv=ym,exports.recapture=pm,exports.start=fm,exports.version=wm;
|