@transmitsecurity/platform-web-sdk 1.16.0 → 1.16.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/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));const e=Symbol("MODULE_INITIALIZED"),t=new Map;function i(e,i){var n,r;null===(n=t.get(e))||void 0===n||n.forEach((r=e=>e(i),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}let n=null;function r(e){n=e}var a=Object.freeze({__proto__:null,getInitConfig:function(){return n},get initConfig(){return n},setInitConfig:r});function o(t){r(t),i(e,void 0)}var s=Object.freeze({__proto__:null,initialize:o});function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){d(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function d(e,t,i){return(t=c(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function g(e,t){return Object.entries(t).reduce(((t,i)=>{let[n,r]=i;return u(u({},t),{},{[n]:p.isPrototypeOf(r)?new r(e.slug):"function"==typeof r?r.bind(e):"object"==typeof r&&!Array.isArray(r)&&r?g(e,r):r})}),{})}class p{constructor(e){this.slug=e}static create(e){return class extends p{constructor(t){super(t),Object.assign(this,g(this,e(this)))}}}}var f=Object.freeze({__proto__:null,Agent:p}),m=Object.freeze({__proto__:null,MODULE_INITIALIZED:e,emit:i,off:function(e,i){const n=t.get(e);if(!n)return;const r=n.indexOf(i);-1!==r&&n.splice(r,1)},on:function(e,i){var n;t.has(e)?null===(n=t.get(e))||void 0===n||n.push(i):t.set(e,[i])}});function x(e,t){const i=!e||"object"!=typeof e||Array.isArray(e)?{}:e;return[t.reduce(((e,t)=>{if(t in e){const i=e[t];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return e[t]=i,i}),i),i]}function _(e,t){let i=e;return t.every((e=>!(!i||"object"!=typeof i||Array.isArray(i)||!(e in i))&&(i=i[e],!0)),e)}const v="tsec",b="general";function y(e){return e?b:n.clientId}function w(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(v))}function E(e,t){const i=e?sessionStorage:localStorage,n=t(w(e));i.setItem(v,JSON.stringify(n))}var k=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:v,GENERAL_ID_KEY:b,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly),[r]=x(n,[this.slug.toString(),i]);return r[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly);return _(n,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral);E(!!t.sessionOnly,(t=>{const[n,r]=x(t,[this.slug.toString(),i]);return delete n[e],r}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=y(!!i.isGeneral);E(!!i.sessionOnly,(i=>{const[r,a]=x(i,[this.slug.toString(),n]);return r[e]=t,a}))}});const A="RSA-PSS",C=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),D=async()=>await C("RSA-OAEP",["encrypt","decrypt"]),S=async()=>await C(A,["sign"]),T=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:A,saltLength:32},e,i)};class I{constructor(e,t,i){this.slug=e,this.dbName=t,this.dbVersion=i}queryObjectStore(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);n.onupgradeneeded=()=>{var t;const i=n.result;(null===(t=null==i?void 0:i.objectStoreNames)||void 0===t?void 0:t.contains)&&!i.objectStoreNames.contains(e)&&i.createObjectStore(e,{keyPath:"key"})},n.onsuccess=()=>{const r=n.result,a=r.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{r.close()}}}put(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}add(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.add({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{const t=e.target.error;r(t)}}))}))}get(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.get(t);r.onsuccess=()=>{var e;r.result?i(null===(e=r.result)||void 0===e?void 0:e.value):i(void 0)},r.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.getAll(null,t);r.onsuccess=()=>{if(r.result){const e=r.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},r.onerror=e=>{n("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.delete(t);r.onsuccess=()=>{i()},r.onerror=e=>{n(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const n=e.clear();n.onsuccess=()=>{t()},n.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const M="platform",R="init",B="completed",F="RSA2048",z=[R,B];class O{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,a,o,s;this.agent=e,this.keysType=t,this.options=i,this._extractingKeysPromise=null;const l=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=l||!(null===(a=this.options)||void 0===a?void 0:a.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=l?1:(null===(o=this.options)||void 0===o?void 0:o.dbVersion)||1,this.keysStoreName=l||!(null===(s=this.options)||void 0===s?void 0:s.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new I(l?M:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new I((l?M:e.slug)+`:${n.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}getRotatedKeysRecordKey(){return`rotated_${this.keysType}_keys`}getRotatedKeysRecordKeyPending(){return`rotated_pending_${this.keysType}_keys`}arrayBufferToBase64(e){return window.btoa(String.fromCharCode(...new Uint8Array(e)))}async getPKRepresentations(e){const t=await crypto.subtle.exportKey("spki",e);return{arrayBufferKey:t,base64Key:this.arrayBufferToBase64(t)}}async generateKeyPair(){return"sign"==this.keysType?await S():await D()}async calcKeyIdentifier(e){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){if(this._extractingKeysPromise)return this._extractingKeysPromise;this._extractingKeysPromise=(async()=>{var e,t;const i=(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled)?await this.getRotatedKeysData():await this.getKeysData(),{base64Key:n}=await this.getPKRepresentations(i.publicKey);return this.publicKeyBase64=n,this.keyIdentifier=i.keyIdentifier,i})();try{return await this._extractingKeysPromise}finally{this._extractingKeysPromise=null}}async generateKeyPairData(e){const t=await this.generateKeyPair(),{arrayBufferKey:i}=await this.getPKRepresentations(t.publicKey),n=e||await this.calcKeyIdentifier(i);return u(u({},t),{},{keyIdentifier:n,createdDate:Date.now()})}shouldKeyBeRotated(e){var t;const i=null===(t=this.options)||void 0===t?void 0:t.keyRotation;if(!(null==i?void 0:i.isEnabled)||!i.expiryDays||void 0===i.startedAt)return!1;const n=24*i.expiryDays*60*60*1e3,r=e.createdDate&&e.createdDate>=i.startedAt?e.createdDate:i.startedAt;return Date.now()-r>n-2592e6}async extractMainKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getKeysRecordKey())}async extractFallbackMainKeysData(){return await this.indexedDBClientFallback.get(this.keysStoreName,this.getKeysRecordKey())}async extractRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKey())}async extractPendingRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKeyPending())}async saveKeyData(e,t){try{return await this.indexedDBClient.add(this.keysStoreName,e,t),t}catch(t){if(t instanceof DOMException&&"ConstraintError"===t.name){const t=await this.indexedDBClient.get(this.keysStoreName,e);if(t)return t}throw t}}async getKeysData(){const e=this.getKeysRecordKey();let t=await this.extractMainKeysData();if(t)return t;if(t=await this.extractFallbackMainKeysData(),t)return this.saveKeyData(e,t);const i=await this.generateKeyPairData();return this.saveKeyData(e,i)}async getOrCreateRotatedKeys(){let e=await this.extractRotatedKeysData();if(!e){const t=this.getRotatedKeysRecordKey(),i=await this.getKeysData(),n=u(u({},i),{},{createdDate:i.createdDate||Date.now()});e=await this.saveKeyData(t,n)}return e}async getRotatedKeysData(){const e=await this.getOrCreateRotatedKeys();if(this.shouldKeyBeRotated(e)){if(!await this.extractPendingRotatedKeysData()){const t=this.getRotatedKeysRecordKeyPending(),i=await this.generateKeyPairData(e.keyIdentifier);await this.saveKeyData(t,i)}}return e}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(e){if("sign"==this.keysType){const{privateKey:t}=await this.extractKeysData(),i=await T(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}getBaseRotationPayload(){return{keyIdentifier:this.keyIdentifier,slot:this.getRotatedKeysRecordKey(),publicKey:this.publicKeyBase64,publicKeyType:F,tenantId:this.options.keyRotation.tenantId}}async getRotationData(){var e,t;if(!(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled))return;this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData();const i=await this.extractPendingRotatedKeysData();if(i){const{base64Key:e}=await this.getPKRepresentations(i.publicKey),{privateKey:t}=await this.extractKeysData(),n=u(u({},this.getBaseRotationPayload()),{},{newPublicKey:e,createdDate:i.createdDate,newPublicKeyType:F}),r=JSON.stringify(n);return{data:r,signature:await this.signPayload(r,t)}}const n=await this.extractRotatedKeysData();if(n&&!1===n.confirmed){await this.extractKeysData();const e=JSON.stringify(this.getBaseRotationPayload());return{data:e,signature:await this.signPayload(e,n.privateKey)}}}async signPayload(e,t){const i=await T(t,e);return this.arrayBufferToBase64(i)}async handleRotateResponse(e){if(z.includes(e))if(e===R){const e=await this.extractPendingRotatedKeysData();if(e){await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKey());const t=u(u({},e),{},{confirmed:!1});await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),t),await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKeyPending());const{base64Key:i}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=i,this.keyIdentifier=e.keyIdentifier}}else if(e===B){const e=await this.extractRotatedKeysData();e&&!1===e.confirmed&&await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),u(u({},e),{},{confirmed:!0}))}}}var P=Object.freeze({__proto__:null,createCryptoBinding:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",t=arguments.length>1?arguments[1]:void 0;return new O(this,e,t)},generateRSAKeyPair:D,generateRSASignKeyPair:S,signAssymetric:T,verifyAssymetric:async(e,t,i)=>{const n=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(A,e,i,n)}}),N=Object.freeze({__proto__:null});const L=p.create((e=>{class t extends Error{constructor(t,i){super(`${e.slug}-${t} ${i}`)}}return{TsError:t,TsInternalError:class extends t{constructor(e){super(e,"Internal error")}}}}));var U=p.create((()=>u({exceptions:L},f)));class j{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=e,this.middlewares=t,this.logs=[]}info(e,t){this.pushLog(3,e,t)}warn(e,t){this.pushLog(4,e,t)}error(e,t){this.pushLog(5,e,t)}pushLog(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:e,fields:i,message:t});const n=this.middlewares.map((e=>e(this)));Promise.all(n).catch((()=>{}))}}var q=Object.freeze({__proto__:null,consoleMiddleware:function(e){const t=e.logs[e.logs.length-1];console.log(`${t.severity} ${t.message}`,t.fields)},createSdkLogger:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new j(this,e)}});function K(e,t){if(!(null==e?void 0:e.trim()))return"";if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;const i="http://mock.com",n=new URL(i);n.search=(null==t?void 0:t.toString())||"",n.pathname=e;return n.href.replace(i,"")}const $={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function V(e,t,i){var n;const r=(a=t||{},encodeURI(JSON.stringify(a)).split(/%..|./).length-1);var a;return{method:e,headers:u(u(u({},{"X-TS-body-size":String(r)}),$),i||{}),body:null!==(n=t&&JSON.stringify(t||{}))&&void 0!==n?n:void 0}}function H(e,t,i,n,r){const a=K(e,n),o=V(t,i,r);return fetch(a,o)}async function G(e,t,i,n,r){let a;if(a=await H(e,t,i,n,r),!a.ok)throw new Error("Request failed");return a}var Z=Object.freeze({__proto__:null,httpDelete:async function(e,t){const i=await G(e,"DELETE",void 0,void 0,t);return u(u({data:await i.json()},i),{},{headers:i.headers})},httpGet:async function(e,t,i){const n=await G(e,"GET",void 0,t,i);return u(u({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,t,i,n){const r=await G(e,"POST",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},httpPut:async function(e,t,i,n){const r=await G(e,"PUT",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},init:V}),Y=p.create((()=>({events:m,moduleMetadata:a,mainEntry:s,utils:U,storage:k,crypto:P,indexedDB:N,logger:q,http:Z}))),W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={},Q={};function ee(e){let t=e.length;for(;--t>=0;)e[t]=0}const te=256,ie=286,ne=30,re=15,ae=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]),oe=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]),se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),le=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ue=new Array(576);ee(ue);const ce=new Array(60);ee(ce);const de=new Array(512);ee(de);const he=new Array(256);ee(he);const ge=new Array(29);ee(ge);const pe=new Array(ne);function fe(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let me,xe,_e;function ve(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}ee(pe);const be=e=>e<256?de[e]:de[256+(e>>>7)],ye=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},we=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,ye(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Ee=(e,t,i)=>{we(e,i[2*t],i[2*t+1])},ke=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Ae=(e,t,i)=>{const n=new Array(16);let r,a,o=0;for(r=1;r<=re;r++)n[r]=o=o+i[r-1]<<1;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=ke(n[t]++,t))}},Ce=e=>{let t;for(t=0;t<ie;t++)e.dyn_ltree[2*t]=0;for(t=0;t<ne;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},De=e=>{e.bi_valid>8?ye(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Se=(e,t,i,n)=>{const r=2*t,a=2*i;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]},Te=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Se(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Se(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},Ie=(e,t,i)=>{let n,r,a,o,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],r=e.pending_buf[e.l_buf+s],s++,0===n?Ee(e,r,t):(a=he[r],Ee(e,a+te+1,t),o=ae[a],0!==o&&(r-=ge[a],we(e,r,o)),n--,a=be(n),Ee(e,a,i),o=oe[a],0!==o&&(n-=pe[a],we(e,n,o)))}while(s<e.last_lit);Ee(e,256,t)},Me=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,l,u=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)0!==i[2*o]?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,i[2*l]=1,e.depth[l]=0,e.opt_len--,r&&(e.static_len-=n[2*l+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)Te(e,i,o);l=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Te(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,i[2*l]=i[2*o]+i[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,i[2*o+1]=i[2*s+1]=l,e.heap[1]=l++,Te(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,h,g,p,f=0;for(h=0;h<=re;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)c=e.heap[u],h=i[2*i[2*c+1]+1]+1,h>l&&(h=l,f++),i[2*c+1]=h,c>n||(e.bl_count[h]++,g=0,c>=s&&(g=o[c-s]),p=i[2*c],e.opt_len+=p*(h+g),a&&(e.static_len+=p*(r[2*c+1]+g)));if(0!==f){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(h=l;0!==h;h--)for(c=e.bl_count[h];0!==c;)d=e.heap[--u],d>n||(i[2*d+1]!==h&&(e.opt_len+=(h-i[2*d+1])*i[2*d],i[2*d+1]=h),c--)}})(e,t),Ae(i,u,e.bl_count)},Re=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++s<l&&r===o||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==a&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4))},Be=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++s<l&&r===o)){if(s<u)do{Ee(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==a&&(Ee(e,r,e.bl_tree),s--),Ee(e,16,e.bl_tree),we(e,s-3,2)):s<=10?(Ee(e,17,e.bl_tree),we(e,s-3,3)):(Ee(e,18,e.bl_tree),we(e,s-11,7));s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4)}};let Fe=!1;const ze=(e,t,i,n)=>{we(e,0+(n?1:0),3),((e,t,i,n)=>{De(e),n&&(ye(e,i),ye(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};Q._tr_init=e=>{Fe||((()=>{let e,t,i,n,r;const a=new Array(16);for(i=0,n=0;n<28;n++)for(ge[n]=i,e=0;e<1<<ae[n];e++)he[i++]=n;for(he[i-1]=n,r=0,n=0;n<16;n++)for(pe[n]=r,e=0;e<1<<oe[n];e++)de[r++]=n;for(r>>=7;n<ne;n++)for(pe[n]=r<<7,e=0;e<1<<oe[n]-7;e++)de[256+r++]=n;for(t=0;t<=re;t++)a[t]=0;for(e=0;e<=143;)ue[2*e+1]=8,e++,a[8]++;for(;e<=255;)ue[2*e+1]=9,e++,a[9]++;for(;e<=279;)ue[2*e+1]=7,e++,a[7]++;for(;e<=287;)ue[2*e+1]=8,e++,a[8]++;for(Ae(ue,287,a),e=0;e<ne;e++)ce[2*e+1]=5,ce[2*e]=ke(e,5);me=new fe(ue,ae,257,ie,re),xe=new fe(ce,oe,0,ne,re),_e=new fe(new Array(0),se,0,19,7)})(),Fe=!0),e.l_desc=new ve(e.dyn_ltree,me),e.d_desc=new ve(e.dyn_dtree,xe),e.bl_desc=new ve(e.bl_tree,_e),e.bi_buf=0,e.bi_valid=0,Ce(e)},Q._tr_stored_block=ze,Q._tr_flush_block=(e,t,i,n)=>{let r,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<te;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Me(e,e.l_desc),Me(e,e.d_desc),o=(e=>{let t;for(Re(e,e.dyn_ltree,e.l_desc.max_code),Re(e,e.dyn_dtree,e.d_desc.max_code),Me(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*le[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=i+5,i+4<=r&&-1!==t?ze(e,t,i,n):4===e.strategy||a===r?(we(e,2+(n?1:0),3),Ie(e,ue,ce)):(we(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(we(e,t-257,5),we(e,i-1,5),we(e,n-4,4),r=0;r<n;r++)we(e,e.bl_tree[2*le[r]+1],3);Be(e,e.dyn_ltree,t-1),Be(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ie(e,e.dyn_ltree,e.dyn_dtree)),Ce(e),n&&De(e)},Q._tr_tally=(e,t,i)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(he[i]+te+1)]++,e.dyn_dtree[2*be(t)]++),e.last_lit===e.lit_bufsize-1),Q._tr_align=e=>{we(e,2,3),Ee(e,256,ue),(e=>{16===e.bi_valid?(ye(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)};var Oe=(e,t,i,n)=>{let r=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{r=r+t[n++]|0,a=a+r|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};const Pe=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Ne=(e,t,i,n)=>{const r=Pe,a=n+i;e^=-1;for(let i=n;i<a;i++)e=e>>>8^r[255&(e^t[i])];return-1^e},Le={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"},Ue={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:je,_tr_stored_block:qe,_tr_flush_block:Ke,_tr_tally:$e,_tr_align:Ve}=Q,He=Oe,Ge=Ne,Ze=Le,{Z_NO_FLUSH:Ye,Z_PARTIAL_FLUSH:We,Z_FULL_FLUSH:Je,Z_FINISH:Xe,Z_BLOCK:Qe,Z_OK:et,Z_STREAM_END:tt,Z_STREAM_ERROR:it,Z_DATA_ERROR:nt,Z_BUF_ERROR:rt,Z_DEFAULT_COMPRESSION:at,Z_FILTERED:ot,Z_HUFFMAN_ONLY:st,Z_RLE:lt,Z_FIXED:ut,Z_DEFAULT_STRATEGY:ct,Z_UNKNOWN:dt,Z_DEFLATED:ht}=Ue,gt=258,pt=262,ft=103,mt=113,xt=666,_t=(e,t)=>(e.msg=Ze[t],t),vt=e=>(e<<1)-(e>4?9:0),bt=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let yt=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const wt=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Et=(e,t)=>{Ke(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wt(e.strm)},kt=(e,t)=>{e.pending_buf[e.pending++]=t},At=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ct=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=He(e.adler,t,r,i):2===e.state.wrap&&(e.adler=Ge(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},Dt=(e,t)=>{let i,n,r=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-pt?e.strstart-(e.w_size-pt):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+gt;let g=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,u[i+o]===p&&u[i+o-1]===g&&u[i]===u[a]&&u[++i]===u[a+1]){a+=2,i++;do{}while(u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&a<h);if(n=gt-(h-a),a=h-gt,n>o){if(e.match_start=t,o=n,n>=s)break;g=u[a+o-1],p=u[a+o]}}}while((t=d[t&c])>l&&0!=--r);return o<=e.lookahead?o:e.lookahead},St=e=>{const t=e.w_size;let i,n,r,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-pt)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=Ct(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=yt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=yt(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<pt&&0!==e.strm.avail_in)},Tt=(e,t)=>{let i,n;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-pt&&(e.match_length=Dt(e,i)),e.match_length>=3)if(n=$e(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=yt(e,e.ins_h,e.window[e.strstart+1]);else n=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2},It=(e,t)=>{let i,n,r;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-pt&&(e.match_length=Dt(e,i),e.match_length<=5&&(e.strategy===ot||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=$e(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Et(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=$e(e,0,e.window[e.strstart-1]),n&&Et(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=$e(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2};function Mt(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const Rt=[new Mt(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(St(e),0===e.lookahead&&t===Ye)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Et(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-pt&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out),1)})),new Mt(4,4,8,4,Tt),new Mt(4,5,16,8,Tt),new Mt(4,6,32,32,Tt),new Mt(4,4,16,16,It),new Mt(8,16,32,32,It),new Mt(8,16,128,128,It),new Mt(8,32,128,256,It),new Mt(32,128,258,1024,It),new Mt(32,258,258,4096,It)];function Bt(){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=ht,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),bt(this.dyn_ltree),bt(this.dyn_dtree),bt(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),bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),bt(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 Ft=e=>{if(!e||!e.state)return _t(e,it);e.total_in=e.total_out=0,e.data_type=dt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:mt,e.adler=2===t.wrap?0:1,t.last_flush=Ye,je(t),et},zt=e=>{const t=Ft(e);return t===et&&(e=>{e.window_size=2*e.w_size,bt(e.head),e.max_lazy_match=Rt[e.level].max_lazy,e.good_match=Rt[e.level].good_length,e.nice_match=Rt[e.level].nice_length,e.max_chain_length=Rt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Ot=(e,t,i,n,r,a)=>{if(!e)return it;let o=1;if(t===at&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||i!==ht||n<8||n>15||t<0||t>9||a<0||a>ut)return _t(e,it);8===n&&(n=9);const s=new Bt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+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<<r+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=t,s.strategy=a,s.method=i,zt(e)};X.deflateInit=(e,t)=>Ot(e,t,ht,15,8,ct),X.deflateInit2=Ot,X.deflateReset=zt,X.deflateResetKeep=Ft,X.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?it:(e.state.gzhead=t,et):it,X.deflate=(e,t)=>{let i,n;if(!e||!e.state||t>Qe||t<0)return e?_t(e,it):it;const r=e.state;if(!e.output||!e.input&&0!==e.avail_in||r.status===xt&&t!==Xe)return _t(e,0===e.avail_out?rt:it);r.strm=e;const a=r.last_flush;if(r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kt(r,31),kt(r,139),kt(r,8),r.gzhead?(kt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kt(r,255&r.gzhead.time),kt(r,r.gzhead.time>>8&255),kt(r,r.gzhead.time>>16&255),kt(r,r.gzhead.time>>24&255),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kt(r,255&r.gzhead.extra.length),kt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ge(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,3),r.status=mt);else{let t=ht+(r.w_bits-8<<4)<<8,i=-1;i=r.strategy>=st||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,r.status=mt,At(r,t),0!==r.strstart&&(At(r,e.adler>>>16),At(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending!==r.pending_buf_size));)kt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.status=ft)}else r.status=ft;if(r.status===ft&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&wt(e),r.pending+2<=r.pending_buf_size&&(kt(r,255&e.adler),kt(r,e.adler>>8&255),e.adler=0,r.status=mt)):r.status=mt),0!==r.pending){if(wt(e),0===e.avail_out)return r.last_flush=-1,et}else if(0===e.avail_in&&vt(t)<=vt(a)&&t!==Xe)return _t(e,rt);if(r.status===xt&&0!==e.avail_in)return _t(e,rt);if(0!==e.avail_in||0!==r.lookahead||t!==Ye&&r.status!==xt){let i=r.strategy===st?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(St(e),0===e.lookahead)){if(t===Ye)return 1;break}if(e.match_length=0,i=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===lt?((e,t)=>{let i,n,r,a;const o=e.window;for(;;){if(e.lookahead<=gt){if(St(e),e.lookahead<=gt&&t===Ye)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=o[r],n===o[++r]&&n===o[++r]&&n===o[++r])){a=e.strstart+gt;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<a);e.match_length=gt-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=$e(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(r,t):Rt[r.level].func(r,t);if(3!==i&&4!==i||(r.status=xt),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),et;if(2===i&&(t===We?Ve(r):t!==Qe&&(qe(r,0,0,!1),t===Je&&(bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),wt(e),0===e.avail_out))return r.last_flush=-1,et}return t!==Xe?et:r.wrap<=0?tt:(2===r.wrap?(kt(r,255&e.adler),kt(r,e.adler>>8&255),kt(r,e.adler>>16&255),kt(r,e.adler>>24&255),kt(r,255&e.total_in),kt(r,e.total_in>>8&255),kt(r,e.total_in>>16&255),kt(r,e.total_in>>24&255)):(At(r,e.adler>>>16),At(r,65535&e.adler)),wt(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?et:tt)},X.deflateEnd=e=>{if(!e||!e.state)return it;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==ft&&t!==mt&&t!==xt?_t(e,it):(e.state=null,t===mt?_t(e,nt):et)},X.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return it;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return it;if(1===r&&(e.adler=He(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(bt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,St(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,St(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,e.next_in=o,e.input=s,e.avail_in=a,n.wrap=r,et},X.deflateInfo="pako deflate (from Nodeca project)";var Pt={};const Nt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Pt.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Nt(i,t)&&(e[t]=i[t])}}return e},Pt.flattenChunks=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i};var Lt={};let Ut=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ut=!1}const jt=new Uint8Array(256);for(let e=0;e<256;e++)jt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;jt[254]=jt[254]=1,Lt.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,a,o=e.length,s=0;for(r=0;r<o;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,r=0;a<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t};Lt.buf2string=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const a=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){a[r++]=t;continue}let o=jt[t];if(o>4)a[r++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n<i;)t=t<<6|63&e[n++],o--;o>1?a[r++]=65533:t<65536?a[r++]=t:(t-=65536,a[r++]=55296|t>>10&1023,a[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ut)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(a,r)},Lt.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+jt[e[i]]>t?i:t};const qt=X,Kt=Pt,$t=Lt,Vt=Le,Ht=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},Gt=Object.prototype.toString,{Z_NO_FLUSH:Zt,Z_SYNC_FLUSH:Yt,Z_FULL_FLUSH:Wt,Z_FINISH:Jt,Z_OK:Xt,Z_STREAM_END:Qt,Z_DEFAULT_COMPRESSION:ei,Z_DEFAULT_STRATEGY:ti,Z_DEFLATED:ii}=Ue;function ni(e){this.options=Kt.assign({level:ei,method:ii,chunkSize:16384,windowBits:15,memLevel:8,strategy:ti},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ht,this.strm.avail_out=0;let i=qt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Xt)throw new Error(Vt[i]);if(t.header&&qt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?$t.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=qt.deflateSetDictionary(this.strm,e),i!==Xt)throw new Error(Vt[i]);this._dict_set=!0}}ni.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Jt:Zt,"string"==typeof e?i.input=$t.string2buf(e):"[object ArrayBuffer]"===Gt.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(a===Yt||a===Wt)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=qt.deflate(i,a),r===Qt)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=qt.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Xt;if(0!==i.avail_out){if(a>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},ni.prototype.onData=function(e){this.chunks.push(e)},ni.prototype.onEnd=function(e){e===Xt&&(this.result=Kt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ri=function(e,t){return(t=t||{}).gzip=!0,function(e,t){const i=new ni(t);if(i.push(e,!0),i.err)throw i.msg||Vt[i.err];return i.result}(e,t)};const ai=["enabled","userId"];var oi,si,li=["drs"];oi=li,si=391,function(e){for(;--e;)oi.push(oi.shift())}(++si);var ui,ci,di,hi=new Y((ui="0x0",li[ui-=0])),gi=["getItem","sessionStorage","setItem","removeItemSessionStorageSafe","removeItem","localStorage","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","getFullStorageKey","getItemSessionStorageSafe"];ci=gi,di=378,function(e){for(;--e;)ci.push(ci.shift())}(++di);var pi=function(e,t){return gi[e-=0]};class fi{constructor(e){this[pi("0x0")]={},this[pi("0x1")]={},this[pi("0x2")]=e}[pi("0x3")](){return this[pi("0x2")]}setClientId(e){this[pi("0x2")]=e}[pi("0x4")](e){return this[pi("0x2")]+"_"+e}[pi("0x5")](e){const t=this[pi("0x4")](e);try{return window.sessionStorage[pi("0x6")](t)}catch(e){return this[pi("0x0")][t]}}setItemSessionStorageSafe(e,t){const i=this[pi("0x4")](e);try{window[pi("0x7")][pi("0x8")](i,t)}catch(e){this[pi("0x0")][i]=t}}[pi("0x9")](e){const t=this.getFullStorageKey(e);try{window[pi("0x7")][pi("0xa")](t)}catch(e){this.FALLBACK_SESSION_STORAGE[t]=void 0}}getItemLocalStorageSafe(e){const t=this.getFullStorageKey(e);try{return window.localStorage[pi("0x6")](t)}catch(e){return this.FALLBACK_LOCAL_STORAGE[t]}}setItemLocalStorageSafe(e,t){const i=this[pi("0x4")](e);try{window[pi("0xb")][pi("0x8")](i,t)}catch(e){this[pi("0x1")][i]=t}}removeItemLocalStorageSafe(e){const t=this[pi("0x4")](e);try{window.localStorage[pi("0xa")](t)}catch(e){this[pi("0x1")][t]=void 0}}}var mi,xi,_i=["pushLog","warn","error","flush","log","logPrefix","stringify","push","now","formatter","unshift","enabled","logsLimit","logs","middlewares","info"];mi=_i,xi=235,function(e){for(;--e;)mi.push(mi.shift())}(++xi);var vi=function(e,t){return _i[e-=0]};class bi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[vi("0x0")]=e,this.logPrefix="[AccountProtection SDK]",this[vi("0x1")]=1e4,this[vi("0x2")]=[],this[vi("0x3")]=[]}[vi("0x4")](e,t){this[vi("0x5")](3,e,t)}[vi("0x6")](e,t){this[vi("0x5")](4,e,t)}[vi("0x7")](e,t){this.pushLog(5,e,t)}[vi("0x8")](){const e=this[vi("0x2")];return this[vi("0x2")]=[],e}pushLog(e,t,i){this.enabled&&console[vi("0x9")]("%s %s %s",this[vi("0xa")],t,JSON[vi("0xb")](i)),this.logs[vi("0xc")]({timestamp:Date[vi("0xd")](),severity:e,text:JSON[vi("0xb")](u(u({},i),{},{message:t}),this[vi("0xe")])}),this[vi("0x2")].length>this[vi("0x1")]&&this.logs[vi("0xf")]();const n=this[vi("0x3")].map((e=>e()));Promise.all(n).catch((()=>{}))}[vi("0xe")](e,t){if(t instanceof Error){const{name:e,stack:i,message:n}=t;return{name:e,stack:i,message:n}}return t}}const yi=new bi;var wi,Ei,ki=["refreshConf","keys","setItemLocalStorageSafe","stringify","timestamp","ric","storageManager","requestsManager","conf","loadConf","device/conf?tenantId=","error","error fetching config","getItemLocalStorageSafe","parse","error loading config","getConfValue"];wi=ki,Ei=174,function(e){for(;--e;)wi.push(wi.shift())}(++Ei);var Ai=function(e,t){return ki[e-=0]};const Ci=Ai("0x0"),Di=Ai("0x1");class Si{constructor(e,t){this[Ai("0x2")]=e,this[Ai("0x3")]=t,this[Ai("0x4")]=this[Ai("0x5")]()}async fetchConf(e){try{const t=Ai("0x6")+e,i=await this[Ai("0x3")].getData(t);return null!=i?i:{}}catch(t){return yi[Ai("0x7")](Ai("0x8"),{clientId:e,error:t}),{}}}[Ai("0x5")](){const e=this[Ai("0x2")][Ai("0x9")](Di);if(null!=e)try{return JSON[Ai("0xa")](e)}catch(e){yi[Ai("0x7")](Ai("0xb"),{error:e})}return{}}shouldUpdateConf(){const e=this[Ai("0xc")](Ci,0);return Date.now()-e>36e5}async[Ai("0xd")](e){if(!this.shouldUpdateConf())return!1;let t=await this.fetchConf(e);return 0==Object[Ai("0xe")](t).length?t=this.loadConf():this[Ai("0x2")][Ai("0xf")](Di,JSON[Ai("0x10")](t)),this[Ai("0x4")]=t,!0}[Ai("0xc")](e,t){const i=void 0!==this[Ai("0x4")]?this[Ai("0x4")][e]:void 0;return null!=i?i:t}}var Ti,Ii,Mi=["EVENT_TYPE_INTERACTION","interaction","EVENT_TYPE_IDENTIFICATION","desktop_web","mobile_web","device"];Ti=Mi,Ii=419,function(e){for(;--e;)Ti.push(Ti.shift())}(++Ii);var Ri,Bi,Fi=function(e,t){return Mi[e-=0]};(Bi=Ri||(Ri={})).EVENT_TYPE_ACTION="action",Bi.EVENT_TYPE_DEVICE=Fi("0x0"),Bi[Fi("0x1")]=Fi("0x2"),Bi[Fi("0x3")]="identification";const zi=Fi("0x4"),Oi=Fi("0x5");var Pi,Ni,Li=["length","splice","push","maintainLastXItems"];Pi=Li,Ni=131,function(e){for(;--e;)Pi.push(Pi.shift())}(++Ni);var Ui=function(e,t){return Li[e-=0]};class ji{static[Ui("0x0")](e,t,i){return e[Ui("0x1")]>=t&&e[Ui("0x2")](0,1),e[Ui("0x3")](i),e}}var qi,Ki,$i=["location","shiftKey","inputType","view","data","buffer","collect","extractEventData","maintainLastXItems","getData","now","extractButtonsPressedData","altKey","buttons","offsetX","offsetY","firesTouchEvents","sourceCapabilities","target","isTrusted","cancelable","metaKey","bufferSize","composed"];qi=$i,Ki=292,function(e){for(;--e;)qi.push(qi.shift())}(++Ki);var Vi=function(e,t){return $i[e-=0]};class Hi{constructor(e){this[Vi("0x0")]=[],this[Vi("0x1")]=e}[Vi("0x2")](e){const t=this[Vi("0x3")](e);ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x1")],t)}[Vi("0x5")](){return this[Vi("0x0")]}[Vi("0x3")](e){return u({x:e.x,y:e.y,tspl:Date[Vi("0x6")]()},this.extractButtonsPressedData(e))}[Vi("0x7")](e){return u(u(u(u({},e.ctrlKey&&{ctrlKey:!0}),e[Vi("0x8")]&&{altKey:!0}),e.shiftKey&&{shiftKey:!0}),0!=e.buttons&&{buttons:e[Vi("0x9")]})}}class Gi{constructor(e){this[Vi("0x0")]=[],this.buffer=e}[Vi("0x2")](e){var t;const i={x:e.x,y:e.y,timestamp:Date[Vi("0x6")](),mouseButtonType:e.detail,offsetX:e[Vi("0xa")],offsetY:e[Vi("0xb")],isPressed:null==(null===(t=e.sourceCapabilities)||void 0===t?void 0:t[Vi("0xc")])?null:!e[Vi("0xd")].firesTouchEvents,target_id:e[Vi("0xe")].id};ji[Vi("0x4")](this.data,this.buffer,i)}[Vi("0x5")](){const e=[...this[Vi("0x0")]];return this.data=[],e}}class Zi{constructor(e){this[Vi("0x0")]=[],this.bufferSize=e}[Vi("0x2")](e){var t;const i={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e.composed,isView:!!e.view,shiftKey:e.shiftKey,metaKey:e[Vi("0x11")],firesTouchEvents:null===(t=e[Vi("0xd")])||void 0===t?void 0:t.firesTouchEvents,timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],i)}[Vi("0x5")](){const e=[...this[Vi("0x0")]];return this[Vi("0x0")]=[],e}}class Yi{constructor(e){this.data=[],this.bufferSize=e}[Vi("0x2")](e){var t;const i={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e[Vi("0x13")],isView:!!e.view,location:e[Vi("0x14")],shiftKey:e[Vi("0x15")],firesTouchEvents:null===(t=e[Vi("0xd")])||void 0===t?void 0:t[Vi("0xc")],timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this.bufferSize,i)}[Vi("0x5")](){const e=this[Vi("0x0")];return this.data=[],e}}class Wi{constructor(e){this.data=[],this[Vi("0x12")]=e}[Vi("0x2")](e){const t={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e[Vi("0x13")],inputType:e[Vi("0x16")],isView:!!e[Vi("0x17")],timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],t)}[Vi("0x5")](){const e=this[Vi("0x0")];return this[Vi("0x0")]=[],e}}class Ji{constructor(e){this[Vi("0x0")]=[],this[Vi("0x12")]=e}[Vi("0x2")](e){const t={isTrusted:e.isTrusted,cancelable:e[Vi("0x10")],composed:e.composed,timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],t)}[Vi("0x5")](){const e=this[Vi("0x0")];return this[Vi("0x0")]=[],e}}var Xi,Qi,en=["getGenericAttributes","getAttachedData","error","error adding interaction listener","eventTypesToAttach","getData","href","change","paste","mousemove","mouseup","mousedown","submit","keyup","input","focusout","SELECT","TEXTAREA","safeEventCallback","interactionEventsCollectorsData","detail","sourceCapabilities","firesTouchEvents","offsetX","offsetY","target","isTrusted","cancelable","composed","dropEffect","clipboardData","effectAllowed","mouseEventsCollectionBuffer","dataset","virtualKeyboard","inputTypeFilter","tagName","includes","entries","addSafeInteractionListener","Error while adding listener","filter","handleEvent","forEach"];Xi=en,Qi=227,function(e){for(;--e;)Xi.push(Xi.shift())}(++Qi);var tn=function(e,t){return en[e-=0]};const nn=tn("0x0"),rn=tn("0x1"),an=tn("0x2"),on=tn("0x3"),sn=tn("0x4"),ln=tn("0x5"),un=tn("0x6"),cn="keydown",dn=tn("0x7"),hn=tn("0x8"),gn=["INPUT",tn("0x9"),tn("0xa")];class pn{constructor(e,t,i){this.deviceEventDataCollectionIgnoreList=e,this.mouseEventsCollectionBuffer=t,this[tn("0xb")]=i,this[tn("0xc")]={click:{eventTypesToAttach:[an,on,sn],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[tn("0xd")],isPressed:null==(null===(t=e[tn("0xe")])||void 0===t?void 0:t[tn("0xf")])?null:!e[tn("0xe")][tn("0xf")],offsetX:e[tn("0x10")],offsetY:e[tn("0x11")],target_id:e[tn("0x12")].id}}},[rn]:{attributesMapper:e=>({target_id:e.target.id,isTrusted:e[tn("0x13")],cancelable:e[tn("0x14")],composed:e[tn("0x15")],dropEffect:e.clipboardData[tn("0x16")],effectAllowed:e[tn("0x17")][tn("0x18")]})},[ln]:{attributesMapper:e=>({target_id:e[tn("0x12")].id})},[an]:{continousCollectors:[new Hi(this[tn("0x19")])]},[on]:{continousCollectors:[new Gi(1)]},[sn]:{continousCollectors:[new Gi(1)]},[hn]:{eventTypesToAttach:[dn,un,cn,nn],filter:this.inputTypeFilter,attributesMapper:e=>{const{target:t,isTrusted:i,cancelable:n,composed:r}=e;return u({target_id:t.id,dataset_keys:Object.keys(t[tn("0x1a")]||{}),isTrusted:i,cancelable:n,composed:r},navigator[tn("0x1b")]&&{navigator_virtualKeyboard:navigator[tn("0x1b")].overlaysContent})}},[dn]:{filter:this[tn("0x1c")],continousCollectors:[new Wi(50)]},[un]:{filter:this[tn("0x1c")],continousCollectors:[new Yi(50)]},[cn]:{filter:this[tn("0x1c")],continousCollectors:[new Zi(50)]},[nn]:{continousCollectors:[new Ji(50)]}}}inputTypeFilter(e){var t;const i=null===(t=e[tn("0x12")])||void 0===t?void 0:t[tn("0x1d")];return gn[tn("0x1e")](i)}registerEventListeners(){for(const[e,t]of Object[tn("0x1f")](this[tn("0xc")]))if(!this.deviceEventDataCollectionIgnoreList[tn("0x1e")](e))try{this[tn("0x20")](e,t)}catch(t){yi.error(tn("0x21"),{error:t,eventType:e})}}[tn("0x22")](e,t){return!e.filter||e[tn("0x22")](t)}async[tn("0x23")](e,t,i){const{attributesMapper:n,continousCollectors:r}=e;if(!this[tn("0x22")](e,t))return!1;if(r)r[tn("0x24")]((e=>{e.collect(t)}));else{const e=this[tn("0x25")](),r=this[tn("0x26")](i),a=u(u(u({},e),n(t)),r&&{attachedEventsData:r});await this.safeEventCallback(i,a)}return!0}addSafeInteractionListener(e,t){window.addEventListener(e,(async i=>{try{await this[tn("0x23")](t,i,e)}catch(e){yi[tn("0x27")](tn("0x28"),{error:e})}}))}[tn("0x26")](e){let t;const i=this[tn("0xc")][e][tn("0x29")];return i&&(t={},i[tn("0x24")]((e=>{const{continousCollectors:i}=this[tn("0xc")][e];i&&i[tn("0x24")]((i=>t[e]=i[tn("0x2a")]()))}))),t}[tn("0x25")](){return{location:window.location[tn("0x2b")]}}}var fn,mn,xn=["race","catch","warn","executor reached timeout","finally","getHighEntropyValues","model","platform","platformVersion","fullVersionList","bitness","mobile","wow64","resolve","setTimeout"];fn=xn,mn=140,function(e){for(;--e;)fn.push(fn.shift())}(++mn);var _n=function(e,t){return xn[e-=0]};function vn(){var e;return null===(e=navigator.userAgentData)||void 0===e?void 0:e[_n("0x0")](["architecture",_n("0x1"),_n("0x2"),_n("0x3"),_n("0x4"),_n("0x5"),_n("0x6"),_n("0x7"),"uaFullVersion"])}function bn(e,t){let i;const n=[Promise[_n("0x8")](e()).catch((()=>{})),new Promise(((e,n)=>i=window[_n("0x9")](n,t)))];return Promise[_n("0xa")](n)[_n("0xb")]((()=>yi[_n("0xc")](_n("0xd"),{fnName:e.name})))[_n("0xe")]((()=>clearTimeout(i)))}var yn,wn,En=["worker throw error","resolve","collectPromisesData","worker promise rejected","getCookieEnabled","getFIDOEnabled","credentials","PublicKeyCredential","crypto","getRandomValues","from","RTCPeerConnection","getWindowBasedKeys","chrome","safari","__crWeb","yandex","__yb","__ybro","__edgeTrackingPreventionStatistics","webkit","samsungAr","ucweb","UCShellJava","puffinDevice","_phantom","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__driver_evaluate","__driver_unwrapped","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped","__webdriver__chr","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","__webdriver_unwrapped","awesomium","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Promise","chrome_asyncScriptInfo","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","getMediaMatch","standard","no-preference","high","low","more","less","forced","100","active","none","inverted","rec2020","replace","matchMedia","matches","log","sqrt","exp","acos","acosh","asin","asinh","atanh","atan","sinh","cos","cosh","expm1","log1p","length","hashCodeString","getSessionStorage","sessionStorage","localStorage","external","toString","indexOf","Sequentum","webdriver","__fxdriver_unwrapped","calledSelenium","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","webdriver-evaluate","selenium-evaluate","webdriverCommand","webdriver-evaluate-response","__webdriverFunc","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","userAgent","userAgentData","storage","estimate","navigatorOnLine","userActivation","isActive","permissions","state","sendBeacon","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","function","platform","url","referrer","memory","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","getPlugins","type","plugins","name","description","screen","availHeight","availWidth","height","pixelDepth","orientation","angle","devicePixelRatio","outerWidth","outerHeight","getCpuClass","getOsCpu","oscpu","HTMLElement","prototype","addBehavior","enumerateDevices","kind","label","groupId","OfflineAudioContext","webkitOfflineAudioContext","createOscillator","triangle","frequency","createDynamicsCompressor","knee","ratio","release","connect","destination","start","renderedBuffer","startRendering","getChannelData","subarray","getHash","threshold","attack","createAnalyser","disconnect","frequencyBinCount","getFloatFrequencyData","call","fftSize","getFloatTimeDomainData","reduction","abs","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","AvantGarde Bk BT","BankGothic Md BT","Calibri","Century","Century Gothic","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Outlook","MS Reference Specialty","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Minion Pro","Monotype Corsiva","PMingLiU","SCRIPTINA","Segoe UI Light","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","ZWAdobeF","createElement","style","visibility","hidden","span","top","left","fontSize","10px","textContent","appendChild","map","some","offsetWidth","offsetHeight","body","removeChild","language","DateTimeFormat","resolvedOptions","timeZone","vendor","getBuildID","buildID","width","textBaseline","alphabetic","fillStyle","#f60","#069","font",'11pt "Times New Roman"',"fillText","rgba(102, 204, 0, 0.2)","18pt Arial","globalCompositeOperation","multiply","#f2f","#2ff","arc","fill","#f9c","toDataURL","rect","getContext","charging","chargingTime","dischargingTime","level","brave","isBrave","canvas","webgl","webgl-experimental","getExtension","WEBGL_debug_renderer_info","getParameter","UNMASKED_RENDERER_WEBGL","getCodesTests","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getPublicData","isMobile","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","storageManager","configManager","cryptoBinding","calculate","getConfValue","dataPointsExtractor","lastDeviceData","now","getDeviceData","getItemLocalStorageSafe","dataPoints","getBattery","getBrave","getCanvasFingerprint","getConnection","getCryptoRandomValues","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getIndexedDB","getLanguages","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getOpenDatabase","getWindowOrientation","getPlatform","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprintExtended","getFonts","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getWebGlRenderer","getWindowOuter","webRTCDisabled","getCryptoBindingData","bind","getNavigatorPermissionsState","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","windowConstructorAliasTest","CDPRuntimeDomainTest","Error","Object","console","debug","windowDocumentAuxVarsTest","getOwnPropertyNames","document","$chrome_asyncScriptInfo","values","value","cache_","getPrototypeOf","storeItem","retrieveItem","isNodeReachable_","sort","Promise","Symbol","token","getAsyncToken","startPromisesLoop","entries","includes","warn"];yn=En,wn=295,function(e){for(;--e;)yn.push(yn.shift())}(++wn);var kn=function(e,t){return En[e-=0]};const An=kn("0x0"),Cn=kn("0x1"),Dn=e=>e?[...e][kn("0x2")](((e,t)=>e+Math.abs(t)),0):0;class Sn{constructor(e,t,i){this[kn("0x3")]=e,this[kn("0x4")]=t,this[kn("0x5")]=i}async[kn("0x6")](){const e=this[kn("0x4")][kn("0x7")](An,[]),t=this[kn("0x4")][kn("0x7")](Cn,36e5),i=await new Tn(e,this[kn("0x5")])[kn("0x8")]();return this[kn("0x9")]=i,this[kn("0x3")].setItemLocalStorageSafe(Cn,Date[kn("0xa")]()+t),i}async[kn("0xb")](){return Number(this[kn("0x3")][kn("0xc")](Cn))<Date.now()||!this.lastDeviceData?await this.calculate():this[kn("0x9")]}}class Tn{constructor(e,t){this[kn("0x0")]=e,this[kn("0x5")]=t,this[kn("0xd")]={battery:this[kn("0xe")],brave:this[kn("0xf")],canvas:this[kn("0x10")],codecs:this.getCodesTests,connection:this[kn("0x11")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this[kn("0x12")],deviceMemory:this[kn("0x13")],documentBasedKeys:this[kn("0x14")],hardwareConcurrency:this[kn("0x15")],indexedDB:this[kn("0x16")],fidoEnabled:this.getFIDOEnabled,languages:this[kn("0x17")],language:this[kn("0x18")],timezoneOffset:this[kn("0x19")],localStorage:this[kn("0x1a")],navigatorBasedKeys:this[kn("0x1b")],navigatorProduct:this[kn("0x1c")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[kn("0x1d")],navigatorHighEntropyData:this[kn("0x1e")],navigatorStorageEstimation:this[kn("0x1f")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[kn("0x20")],math:this[kn("0x21")],mediaMatch:this.getMediaMatch,openDatabase:this[kn("0x22")],windowOrientation:this[kn("0x23")],platform:this[kn("0x24")],cpuClass:this.getCpuClass,osClass:this.getOsCpu,addBehavior:this[kn("0x25")],productSub:this[kn("0x26")],mediaDevices:this[kn("0x27")],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this[kn("0x28")],fonts:this[kn("0x29")],performanceTiming:this.getPerformanceTiming,performanceMemory:this[kn("0x2a")],plugins:this.getPlugins,screen:this[kn("0x2b")],sequentum:this[kn("0x2c")],sessionStorage:this.getSessionStorage,referrer:this[kn("0x2d")],timezone:this[kn("0x2e")],touchSupport:this[kn("0x2f")],vendor:this[kn("0x30")],buildID:this.getBuildID,webdriver:this.getWebDriver,webGlRenderer:this[kn("0x31")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[kn("0x32")],webRTCDisabled:this[kn("0x33")],cryptoBindingData:this[kn("0x34")][kn("0x35")](this),notificationState:this[kn("0x36")].bind(this,"notifications"),geolocationState:this.getNavigatorPermissionsState[kn("0x35")](this,kn("0x37")),isGeoLocationExists:this[kn("0x38")],isSendBeaconExists:this[kn("0x39")],navigatorPrototype:this[kn("0x3a")],installedRelatedApps:this[kn("0x3b")],windowConstructorAliasTest:this[kn("0x3c")],windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[kn("0x3d")]}}[kn("0x3d")](){let e=!1;const t=new(window[kn("0x3e")]);return window[kn("0x3f")].defineProperty(t,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[kn("0x40")][kn("0x41")](t.stack),e}[kn("0x42")](){for(const e of window[kn("0x3f")][kn("0x43")](window[kn("0x44")]))if(e==kn("0x45")||/^\$cdc_[a-zA-Z0-9]{22}_$/.test(e))return!0;for(const e of window[kn("0x3f")][kn("0x46")](window.Object.getOwnPropertyDescriptors(window[kn("0x44")]))){if(!e[kn("0x47")]||void 0===e[kn("0x47")][kn("0x48")])continue;const t=window.Object[kn("0x43")](window[kn("0x3f")][kn("0x49")](e[kn("0x47")])),i=[kn("0x4a"),kn("0x4b"),kn("0x4c")];if(t[kn("0x4d")](),i[kn("0x4d")](),t.every(((e,t)=>e==i[t])))return!0}return!1}[kn("0x3c")](){const e=window[kn("0x3f")].getOwnPropertyNames(window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/.test(t))return!0;for(const e of[window.Array,window[kn("0x4e")],window[kn("0x4f")]])if(t!=(null==e?void 0:e.name)&&t!=kn("0x50")&&t!=kn("0x51")&&window[t]===e)return!0}return!1}async[kn("0x8")](){const e=this.startPromisesLoop();return await this.collectPromisesData(e)}[kn("0x52")](){const e={};for(const[t,i]of Object[kn("0x53")](this[kn("0xd")]))if(!this.sdkDeviceDataCollectionIgnoreList[kn("0x54")](t))try{e[t]=bn(i,100)}catch(i){yi[kn("0x55")](kn("0x56"),{e:i,key:t}),e[t]=Promise[kn("0x57")]()}return e}async[kn("0x58")](e){const t={};for(const[i,n]of Object[kn("0x53")](e))try{t[i]=await n}catch(e){yi[kn("0x55")](kn("0x59"),{e:e,key:i}),t[i]=void 0}return t}[kn("0x5a")](){const e=navigator.cookieEnabled;return Promise[kn("0x57")](e)}async[kn("0x5b")](){return!!navigator[kn("0x5c")]&&await window[kn("0x5d")].isUserVerifyingPlatformAuthenticatorAvailable()}[kn("0x12")](){const e=window[kn("0x5e")][kn("0x5f")](new Uint8Array(16));return Array[kn("0x60")](e)}[kn("0x33")](){const e=null==window[kn("0x61")];return Promise[kn("0x57")](e)}[kn("0x62")](){const e=[kn("0x63"),kn("0x64"),kn("0x65"),"__gCrWeb",kn("0x66"),kn("0x67"),kn("0x68"),"__firefox__",kn("0x69"),kn("0x6a"),"oprt",kn("0x6b"),kn("0x6c"),kn("0x6d"),kn("0x6e"),kn("0x6f"),"__phantomas",kn("0x70"),kn("0x71"),kn("0x72"),kn("0x73"),kn("0x74"),kn("0x75"),kn("0x76"),kn("0x77"),"calledSelenium",kn("0x78"),kn("0x79"),kn("0x7a"),kn("0x7b"),kn("0x7c"),kn("0x7d"),"__fxdriver_unwrapped",kn("0x7e"),kn("0x7f"),kn("0x80"),kn("0x81"),kn("0x82"),kn("0x83"),kn("0x84"),kn("0x85"),kn("0x86"),kn("0x87"),kn("0x88"),"__webdriverFuncgeb",kn("0x89"),"calledPhantom",kn("0x8a"),kn("0x8b"),"cdc_adoQpoasnfa76pfcZLmcfl_Symbol",kn("0x8c"),"fmget_targets","geb",kn("0x8d"),kn("0x8e"),kn("0x8f"),kn("0x90")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[kn("0x91")](i)}return Promise[kn("0x57")](t)}[kn("0x92")](){const e={"dynamic-range":["high",kn("0x93")],"prefers-reduced-motion":[kn("0x94"),kn("0x2")],"prefers-contrast":[kn("0x94"),kn("0x95"),kn("0x96"),kn("0x97"),kn("0x98"),kn("0x99")],"max-monochrome":["0","10",kn("0x9a"),"1000"],"forced-colors":[kn("0x9b"),kn("0x9c")],"inverted-colors":[kn("0x9d"),kn("0x9c")],"color-gamut":[kn("0x9e"),"p3","srgb"]},t={};for(const[i,n]of Object[kn("0x53")](e))for(const e of n)t[i[kn("0x9f")](/-/g,"_")+"_"+e[kn("0x9f")](/-/g,"_")]=window[kn("0xa0")]("("+i+": "+e+")")[kn("0xa1")];return Promise[kn("0x57")](t)}getMathFingerprint(){const e=[Math[kn("0xa5")](.12312423423423424),Math[kn("0xa6")](1e308),(t=1e154,Math[kn("0xa2")](t+Math[kn("0xa3")](t*t-1))),Math[kn("0xa7")](.12312423423423424),Math[kn("0xa8")](1),Math[kn("0xa2")](1+Math[kn("0xa3")](2)),Math[kn("0xa9")](.5),Math[kn("0xa2")](3)/2,Math[kn("0xaa")](.5),Math.sin(-1e300),Math[kn("0xab")](1),Math[kn("0xa4")](1)-1/Math[kn("0xa4")](1)/2,Math[kn("0xac")](10.000000000123),Math[kn("0xad")](1),(Math[kn("0xa4")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math.tanh(1),(Math[kn("0xa4")](2)-1)/(Math[kn("0xa4")](2)+1),Math[kn("0xa4")](1),Math[kn("0xae")](1),Math[kn("0xa4")](1)-1,Math[kn("0xaf")](10),Math[kn("0xa2")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e[kn("0xb0")];t++)i+=e[t].toString();return Promise[kn("0x57")](Tn[kn("0xb1")](i))}[kn("0x11")](){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:n,saveData:r}=e;return{downlink:t,effectiveType:i,rtt:n,saveData:r}})(e);return Promise[kn("0x57")](t)}[kn("0xb2")](){return Promise[kn("0x57")](!!window[kn("0xb3")])}[kn("0x1a")](){return Promise[kn("0x57")](!!window[kn("0xb4")])}[kn("0x2c")](){return-1!==window[kn("0xb5")][kn("0xb6")]()[kn("0xb7")](kn("0xb8"))}[kn("0x1b")](){return[kn("0xb9"),kn("0x7b"),kn("0x84"),kn("0x81"),kn("0x7d"),kn("0x7c"),"__webdriver_unwrapped",kn("0x82"),kn("0xba"),kn("0x79"),kn("0x77"),kn("0xbb"),kn("0xbc"),kn("0xbd"),"driver-evaluate",kn("0xbe"),kn("0xbf"),kn("0xc0"),kn("0xc1"),kn("0xc2"),"__webdriver_script_fn","__$webdriverAsyncExecutor",kn("0x7e"),"__lastWatirConfirm","__lastWatirPrompt",kn("0x45"),kn("0xc3"),kn("0xc4")][kn("0xc5")]((e=>navigator[e]))}[kn("0x1c")](){const e=navigator[kn("0xc6")];return Promise.resolve(e)}getNavigatorUserAgent(){return navigator[kn("0xc7")]}[kn("0x1d")](){return navigator[kn("0xc8")]}getNavigatorHighEntropyData(){return vn()}[kn("0x1f")](){return navigator[kn("0xc9")][kn("0xca")]()}[kn("0xcb")](){return navigator.onLine}[kn("0x20")](){return navigator[kn("0xcc")][kn("0xcd")]}async[kn("0x36")](e){try{const t=await navigator[kn("0xce")].query({name:e});return null==t?void 0:t[kn("0xcf")]}catch(e){}}[kn("0x38")](){return!!navigator.geolocation}[kn("0x39")](){return"function"==typeof navigator[kn("0xd0")]}[kn("0x3a")](){return{hardwareConcurrency:Object[kn("0xd1")](Object.getPrototypeOf(navigator),kn("0xd2")).get[kn("0xb6")](),languages:Object[kn("0xd1")](Object.getPrototypeOf(navigator),kn("0xd3"))[kn("0xd4")][kn("0xb6")]()}}async[kn("0x3b")](){if(typeof navigator[kn("0x3b")]===kn("0xd5"))try{const{related_applications:e}=await navigator[kn("0x3b")]();if(e&&Array.isArray(e))return e.map((e=>({platform:e[kn("0xd6")],url:e[kn("0xd7")]})))}catch(e){}}[kn("0x2d")](){return document[kn("0xd8")]}getPerformanceTiming(){return performance.timing}[kn("0x2a")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance[kn("0xd9")];return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[kn("0x16")](){return Promise[kn("0x57")](!!window[kn("0xda")])}getOpenDatabase(){const{openDatabase:e}=window;return Promise.resolve(!!e)}[kn("0x2f")](){const e=window[kn("0xdb")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[kn("0xdc")]||navigator[kn("0xdd")]||0,documentTouch:e,ontouchstart:"ontouchstart"in window};return Promise[kn("0x57")](t)}[kn("0xde")](){function e(e){const t=[];for(let i=0;i<e[kn("0xb0")];++i)t[kn("0x91")]({type:e[i][kn("0xdf")],suffixes:e[i].suffixes});return t}const t=[];for(let i=0;i<navigator.plugins[kn("0xb0")];++i){const n=navigator[kn("0xe0")][i];n&&t[kn("0x91")]({name:n[kn("0xe1")],description:n[kn("0xe2")],mimeTypes:e(n)})}return Promise[kn("0x57")](t)}[kn("0x2b")](){const e=window[kn("0xe3")]||screen,{availLeft:t}=e,{availTop:i}=e,n={availHeight:e[kn("0xe4")],availLeft:t,availTop:i,availWidth:e[kn("0xe5")],colorDepth:e.colorDepth,height:e[kn("0xe6")],width:e.width,pixelDepth:e[kn("0xe7")],orientationAngle:e[kn("0xe8")]&&e[kn("0xe8")][kn("0xe9")],orientationType:e[kn("0xe8")]&&e[kn("0xe8")].type,devicePixelRatio:window[kn("0xea")]};return Promise[kn("0x57")](n)}static[kn("0xb1")](e){if(null==e)return;let t=0,i=0;const n=e[kn("0xb0")];for(;i<n;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}[kn("0x32")](){const e={outerWidth:window[kn("0xeb")],outerHeight:window[kn("0xec")]};return Promise[kn("0x57")](e)}getWebDriver(){const e=navigator[kn("0xb9")];return Promise[kn("0x57")](e)}[kn("0x23")](){const e=window[kn("0xe8")];return Promise[kn("0x57")](e)}[kn("0x24")](){const e=navigator[kn("0xd6")];return Promise[kn("0x57")](e)}[kn("0xed")](){const e=navigator.cpuClass;return Promise[kn("0x57")](e)}[kn("0xee")](){const e=navigator[kn("0xef")];return Promise[kn("0x57")](e)}[kn("0x25")](){const e=!!window[kn("0xf0")][kn("0xf1")][kn("0xf2")];return Promise[kn("0x57")](e)}getProductSub(){const e=navigator.productSub;return Promise.resolve(e)}async getMediaDevices(){const e=await navigator.mediaDevices[kn("0xf3")](),t=[];for(const i of e)t.push({kind:i[kn("0xf4")],label:i[kn("0xf5")],deviceId:i.deviceId,groupId:i[kn("0xf6")]});return t}async getAudioFingerprint(){const e=window[kn("0xf7")]||window[kn("0xf8")];if(!e)return-1;const t=new e(1,5e3,44100),i=t[kn("0xf9")]();i[kn("0xdf")]=kn("0xfa"),i[kn("0xfb")][kn("0x47")]=1e4;const n=t[kn("0xfc")]();n.threshold.value=-50,n[kn("0xfd")].value=40,n[kn("0xfe")][kn("0x47")]=12,n.attack[kn("0x47")]=0,n[kn("0xff")][kn("0x47")]=.25,i[kn("0x100")](n),n[kn("0x100")](t[kn("0x101")]),i[kn("0x102")](0);const r=new Promise((async(e,i)=>{t.oncomplete=t=>e(t[kn("0x103")]);try{await t[kn("0x104")]()}catch(e){i(e)}})),a=(await r)[kn("0x105")](0)[kn("0x106")](4500);return Tn[kn("0x107")](a)}async[kn("0x28")](){var e;const t=window[kn("0xf7")]||window[kn("0xf8")];if(!t)return{};const i=new t(1,5e3,44100),n=i[kn("0xf9")]();n[kn("0xdf")]="triangle",n[kn("0xfb")][kn("0x47")]=1e4;const r=i[kn("0xfc")]();r[kn("0x108")][kn("0x47")]=-50,r[kn("0xfd")][kn("0x47")]=40,r[kn("0x109")][kn("0x47")]=0;const a=i[kn("0x10a")]();n[kn("0x100")](r),r[kn("0x100")](a),r[kn("0x100")](i[kn("0x101")]),n[kn("0x102")](0);try{await i[kn("0x104")](),r[kn("0x10b")](),n[kn("0x10b")]();const t=new Float32Array(a[kn("0x10c")]);null===(e=a[kn("0x10d")])||void 0===e||e[kn("0x10e")](a,t);const o=new Float32Array(a[kn("0x10f")]);return kn("0x110")in a&&a[kn("0x110")](o),{gain:r[kn("0x111")][kn("0x47")]||r[kn("0x111")],freq:Dn(t),time:Dn(o)}}catch(e){return{}}}static[kn("0x107")](e){let t=0;for(let i=0;i<e.length;++i)t+=Math[kn("0x112")](e[i]);return t}[kn("0x29")](){const e=[kn("0x113"),kn("0x114"),kn("0x115")],t=[kn("0x116"),kn("0x117"),kn("0x118"),"Arabic Typesetting","Arial Unicode MS",kn("0x119"),kn("0x11a"),"Batang","Bitstream Vera Sans Mono",kn("0x11b"),kn("0x11c"),kn("0x11d"),"Clarendon",kn("0x11e"),kn("0x11f"),kn("0x120"),kn("0x121"),kn("0x122"),"Gill Sans",kn("0x123"),kn("0x124"),kn("0x125"),kn("0x126"),"Leelawadee","Letter Gothic",kn("0x127"),kn("0x128"),kn("0x129"),"Menlo",kn("0x12a"),kn("0x12b"),kn("0x12c"),"MS UI Gothic",kn("0x12d"),kn("0x12e"),kn("0x12f"),kn("0x130"),"Microsoft Uighur",kn("0x131"),kn("0x132"),kn("0x133"),"Pristina",kn("0x134"),kn("0x135"),"Serifa","SimHei",kn("0x136"),kn("0x137"),kn("0x138"),kn("0x139"),"Vrinda",kn("0x13a")],i=document[kn("0x13b")]("div");i[kn("0x13c")][kn("0x13d")]=kn("0x13e");const n={},r={},a=e=>{const t=document[kn("0x13b")](kn("0x13f")),{style:n}=t;return n.position="absolute",n[kn("0x140")]="0",n[kn("0x141")]="0",n.fontFamily=e,n[kn("0x142")]=kn("0x143"),t[kn("0x144")]="mmMwWLliI0O&1",i[kn("0x145")](t),t},o=(e,t)=>a("'"+e+"',"+t),s=e[kn("0x146")](a),l=(()=>{const i={};for(const n of t)i[n]=e[kn("0x146")]((e=>o(n,e)));return i})();document.body[kn("0x145")](i);try{for(let t=0;t<e[kn("0xb0")];t++)n[e[t]]=s[t][kn("0x148")],r[e[t]]=s[t][kn("0x149")];const i=t.filter((t=>{return i=l[t],e[kn("0x147")](((e,t)=>i[t].offsetWidth!==n[e]||i[t].offsetHeight!==r[e]));var i}));return Promise[kn("0x57")](i)}finally{document[kn("0x14a")][kn("0x14b")](i)}}getTimezoneOffset(){const e=(new Date)[kn("0x19")]();return Promise[kn("0x57")](e)}[kn("0x18")](){const e=navigator[kn("0x14c")];return Promise[kn("0x57")](e)}[kn("0x17")](){const e=navigator[kn("0xd3")];return Promise[kn("0x57")](e)}[kn("0x15")](){const e=navigator[kn("0xd2")];return Promise[kn("0x57")](e)}[kn("0x13")](){const e=navigator.deviceMemory;return Promise.resolve(e)}[kn("0x14")](){return[kn("0x84"),kn("0x81"),kn("0x87"),kn("0x86"),kn("0x85"),kn("0x7d"),kn("0x7c"),"__webdriver_unwrapped",kn("0x7b"),"__selenium_unwrapped",kn("0xba")][kn("0xc5")]((e=>document[e]))}[kn("0x2e")](){const e=Intl[kn("0x14d")]()[kn("0x14e")]()[kn("0x14f")];return Promise.resolve(e)}[kn("0x30")](){const e=navigator[kn("0x150")];return Promise.resolve(e)}[kn("0x151")](){const e=navigator[kn("0x152")];return Promise[kn("0x57")](e)}async[kn("0x10")](){const e=document[kn("0x13b")]("canvas");e.width=1,e[kn("0xe6")]=1;const t=e[kn("0x167")]("2d"),i={winding:function(e){return e[kn("0x166")](0,0,10,10),e[kn("0x166")](2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(t),geometry:function(e,t){e[kn("0x153")]=122,e[kn("0xe6")]=110,t[kn("0x15e")]=kn("0x15f");const i=[[kn("0x160"),40,40],[kn("0x161"),80,40],["#ff2",60,80]];for(const[e,n,r]of i)t[kn("0x156")]=e,t.beginPath(),t[kn("0x162")](n,r,40,0,2*Math.PI,!0),t.closePath(),t[kn("0x163")]();return t[kn("0x156")]=kn("0x164"),t[kn("0x162")](60,60,60,0,2*Math.PI,!0),t[kn("0x162")](60,60,20,0,2*Math.PI,!0),t[kn("0x163")]("evenodd"),Tn[kn("0xb1")](e[kn("0x165")]())}(e,t),text:function(e,t){e[kn("0x153")]=240,e.height=60,t[kn("0x154")]=kn("0x155"),t[kn("0x156")]=kn("0x157"),t.fillRect(100,1,62,20),t[kn("0x156")]=kn("0x158"),t[kn("0x159")]=kn("0x15a");const i="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return t[kn("0x15b")](i,2,15),t.fillStyle=kn("0x15c"),t[kn("0x159")]=kn("0x15d"),t.fillText(i,4,45),Tn[kn("0xb1")](e.toDataURL())}(e,t)};return Promise[kn("0x57")](i)}async getBattery(){const e=await navigator[kn("0xe")]();return{charging:e[kn("0x168")],chargingTime:e[kn("0x169")],dischargingTime:e[kn("0x16a")],level:e[kn("0x16b")]}}async[kn("0xf")](){return!!navigator[kn("0x16c")]&&await navigator[kn("0x16c")][kn("0x16d")]()}async[kn("0x31")](){const e=document[kn("0x13b")](kn("0x16e")),t=e[kn("0x167")](kn("0x16f"))||e.getContext(kn("0x170")),i=t[kn("0x171")](kn("0x172"));return Promise[kn("0x57")](t[kn("0x173")](i[kn("0x174")]))}async[kn("0x175")](){const e=document[kn("0x13b")](kn("0x176")),t={basic:""===e[kn("0x177")](kn("0x178")),advanced:""===e[kn("0x177")](kn("0x179"))};return Promise.resolve(t)}async[kn("0x34")](){const{publicKey:e,keyIdentifier:t}=await this.cryptoBinding[kn("0x17a")]();return{publicKey:e,keyIdentifier:t}}static[kn("0x17b")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[kn("0xc7")])||null!=window[kn("0xe8")]||window[kn("0xa0")](kn("0x17c"))[kn("0xa1")]}}var In,Mn,Rn=["uncompressed","ALLOW","CHALLENGE","DENY","TRUST","compress","compressed"];In=Rn,Mn=271,function(e){for(;--e;)In.push(In.shift())}(++Mn);var Bn,Fn,zn,On,Pn=function(e,t){return Rn[e-=0]};(Fn=Bn||(Bn={}))[Pn("0x0")]=Pn("0x1"),Fn[Pn("0x2")]=Pn("0x2"),(On=zn||(zn={}))[Pn("0x3")]=Pn("0x3"),On.CHALLENGE=Pn("0x4"),On[Pn("0x5")]="DENY",On[Pn("0x6")]=Pn("0x6");var Nn,Ln,Un=["parse","SHA-256","crypto is not supported","generateSymKey","subtle","generateKey","AES-GCM","encrypt","decrypt","encryptPayload","string","encode","crypto","arrayBufferToBase64","encryptSymKeyBundle","exportKey","raw","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey"];Nn=Un,Ln=483,function(e){for(;--e;)Nn.push(Nn.shift())}(++Ln);var jn=function(e,t){return Un[e-=0]};class qn{constructor(e){this.configManager=e}[jn("0x0")](){return window.crypto[jn("0x1")][jn("0x2")]({name:jn("0x3"),length:256},!0,[jn("0x4"),jn("0x5")])}async[jn("0x6")](e,t){const i=typeof e===jn("0x7")?(new TextEncoder)[jn("0x8")](e):e,n=window.crypto.getRandomValues(new Uint8Array(12)),r={name:jn("0x3"),iv:n},a=await window[jn("0x9")].subtle.encrypt(r,t,i);return{payloadCipherText:this[jn("0xa")](a),iv:n}}async[jn("0xb")](e,t,i){const n=await window[jn("0x9")].subtle[jn("0xc")](jn("0xd"),e),r=this[jn("0xa")](n),a=this[jn("0xa")](t),o=(new TextEncoder)[jn("0x8")](JSON[jn("0xe")]({symKey:r,iv:a})),s=await window[jn("0x9")][jn("0x1")][jn("0x4")]({name:jn("0xf")},i,o);return this[jn("0xa")](s)}[jn("0xa")](e){let t="";const i=new Uint8Array(e),n=i[jn("0x10")];for(let e=0;e<n;e++)t+=String[jn("0x11")](i[e]);return window[jn("0x12")](t)}[jn("0x13")](e){return window[jn("0x9")][jn("0x1")][jn("0x14")]("jwk",JSON[jn("0x15")](e),{name:jn("0xf"),hash:jn("0x16")},!0,["encrypt"])}async[jn("0x4")](e,t){if(!window[jn("0x9")]||!window[jn("0x9")][jn("0x1")])throw new Error(jn("0x17"));const i=await this[jn("0x0")](),{payloadCipherText:n,iv:r}=await this.encryptPayload(t,i),a=await this[jn("0x13")](e);return{encryptedData:n,encryptedKey:await this[jn("0xb")](i,r,a)}}}var Kn,$n,Vn=["error","name","toString","SDKError: ",", errorSpace: ","toLog","CLIENT","SERVER","server","COMMUNICATION","communication","errorSpace","errorCode","message"];Kn=Vn,$n=468,function(e){for(;--e;)Kn.push(Kn.shift())}(++$n);var Hn,Gn,Zn=function(e,t){return Vn[e-=0]};(Gn=Hn||(Hn={}))[Zn("0x0")]="client",Gn[Zn("0x1")]=Zn("0x2"),Gn[Zn("0x3")]=Zn("0x4");class Yn extends Error{constructor(e,t,i){var n,r;super(),this.error=e,this[Zn("0x5")]=t,this[Zn("0x6")]=i,this[Zn("0x7")]=(null===(n=this[Zn("0x8")])||void 0===n?void 0:n.message)||this[Zn("0x8")].toString(),this[Zn("0x9")]=(null===(r=this[Zn("0x8")])||void 0===r?void 0:r.name)||Yn[Zn("0x9")]}[Zn("0xa")](){return Zn("0xb")+this.message+(this[Zn("0x5")]?Zn("0xc")+this[Zn("0x5")]:"")+(this[Zn("0x6")]?", errorCode: "+this[Zn("0x6")]:"")}[Zn("0xd")](){return u(u({name:this[Zn("0x9")],message:this[Zn("0x7")]},this[Zn("0x5")]&&{errorSpace:this.errorSpace}),this[Zn("0x6")]&&{errorCode:this[Zn("0x6")]})}}var Wn,Jn,Xn=["identityManager","getTabId","timestamp","includes","type","addEventToLocalStorage","push","length","flushTimeoutHandle","flush","Error while emitting event","getClientId","errorCode","toLog","min","catch","Error while emitting event (delayed flush)","refreshSessionToken","sendDeviceDataEvent","Failed to refresh data","isTokenExpired","error","Failed to polling data","enrichUADataIfDoesNotExist","navigatorHighEntropyData","popAllEvents","pop","sort","clientId","deviceId","userId","getUserId","sdkPlatform","events","keyIdentifier","warn","sessionToken","buildEncryptedRequestBody","getRotationData","data","signature","postData","device/events","headers","find","value","setDeviceId","setUserId","cleanLocalStorageEvents","COMMUNICATION","stringify","uncompressed","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","shouldSendDeviceEvent","now","info","no need to send device event","getDeviceData","emitEvent","getDeviceId","page_load","referrer","history","extractWindowRespurces","performance","getEntriesByType","resources","isArray","map","name","initiatorType","registerEventListeners","fetchEventsFromLocalStorage","parse","removeItemLocalStorageSafe","ddls","rei","mouseEventsCollectionBuffer","bufferSize","bufferInterval","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","configManager","storageManager","requestsManager","cryptoBinding","serverPath","enableSessionToken","safeEventCallback","EVENT_TYPE_INTERACTION","eventsQueue","crypto","interactionEventsManager","getConfValue","isMobile","eventTypesToStore","maxEventStored","pollingInterval","pollingSessionToken","index","location","toString","platform","sdkVersion","tabId"];Wn=Xn,Jn=410,function(e){for(;--e;)Wn.push(Wn.shift())}(++Jn);var Qn=function(e,t){return Xn[e-=0]};const er=Qn("0x0"),tr="lastDeviceInDeviceEvent",ir=Qn("0x1"),nr="lse",rr=Qn("0x2"),ar="deviceEventDataCollectionIgnoreList",or=Qn("0x3"),sr=Qn("0x4"),lr=[Ri.EVENT_TYPE_ACTION,Ri[Qn("0x5")]],ur=Qn("0x6");class cr{constructor(e,t,i,n,r,a,o,s){this[Qn("0x7")]=e,this[Qn("0x8")]=t,this.deviceDataManager=i,this[Qn("0x9")]=n,this.identityManager=r,this[Qn("0xa")]=a,this[Qn("0xb")]=o,this[Qn("0xc")]=s,this.eventIndex=null,this.flushTimeoutHandle=null,this[Qn("0xd")]=async(e,t)=>{try{const i=u({},u({interaction_type:e},t)),n={type:Ri[Qn("0xe")],attributes:i};return await this.emitEvent(n)}catch(e){}},this.enableSessionToken=s,this[Qn("0xf")]=[],this[Qn("0x10")]=new qn(e),this[Qn("0x11")]=new pn(this.configManager[Qn("0x12")](ar,[]),this[Qn("0x7")][Qn("0x12")](rr,100),this.safeEventCallback),this[Qn("0x13")]=Tn.isMobile(),this[Qn("0x14")]=this[Qn("0x7")][Qn("0x12")](ur,[Ri.EVENT_TYPE_ACTION]),this[Qn("0x15")]=this.configManager[Qn("0x12")]("maxLocalStoredEvents",4),this[Qn("0x16")]=36e4,this[Qn("0x17")]()}async emitEvent(e){e[Qn("0x18")]=this.increaseEventIndex(),e[Qn("0x19")]=location[Qn("0x1a")](),e.platform=navigator[Qn("0x1b")],e[Qn("0x1c")]="1.52.0",e[Qn("0xb")]=this.serverPath,e[Qn("0x1d")]=this[Qn("0x1e")][Qn("0x1f")](),e[Qn("0x20")]=Date.now(),await this.enrichUADataIfDoesNotExist(e);let t=0;this[Qn("0x14")][Qn("0x21")](e[Qn("0x22")])?t=this[Qn("0x23")](e):this[Qn("0xf")][Qn("0x24")](e);const i=this[Qn("0x7")][Qn("0x12")](or,2);if(this.eventsQueue[Qn("0x25")]+t>=i||lr[Qn("0x21")](e[Qn("0x22")])){this[Qn("0x26")]&&(clearTimeout(this.flushTimeoutHandle),this[Qn("0x26")]=null);try{return await this[Qn("0x27")]()}catch(t){throw yi.error(Qn("0x28"),{clientId:this[Qn("0x1e")][Qn("0x29")](),eventType:e[Qn("0x22")],error:t[Qn("0x2a")]?t[Qn("0x2b")]():t}),t}}if(!this.flushTimeoutHandle&&this[Qn("0xf")][Qn("0x25")]>0){const t=this[Qn("0x7")][Qn("0x12")](sr,2),i=Math[Qn("0x2c")](t,30);this.flushTimeoutHandle=setTimeout((()=>{this[Qn("0x26")]=null,this[Qn("0x27")]()[Qn("0x2d")]((t=>{yi.error(Qn("0x2e"),{clientId:this[Qn("0x1e")][Qn("0x29")](),eventType:e[Qn("0x22")],error:t[Qn("0x2a")]?t.toLog():t})}))}),1e3*i)}return{}}async[Qn("0x2f")](){try{return this[Qn("0xf")][Qn("0x25")]>0||await this[Qn("0x30")](!0),await this.flush()}catch(e){yi.error(Qn("0x31"),{e:e})}}async[Qn("0x17")](){try{this[Qn("0x1e")][Qn("0x32")]()&&await this[Qn("0x2f")]()}catch(e){yi[Qn("0x33")](Qn("0x34"),{e:e})}finally{setTimeout((async()=>{await this[Qn("0x17")]()}),this[Qn("0x16")])}}async[Qn("0x35")](e){var t;if(!(null===(t=e.attributes)||void 0===t?void 0:t.navigatorHighEntropyData))try{e.attributes[Qn("0x36")]=await vn()}catch(e){}}[Qn("0x37")](){const e=[],t=this.fetchEventsFromLocalStorage();for(;this.eventsQueue[Qn("0x25")];)e[Qn("0x24")](this[Qn("0xf")][Qn("0x38")]());return(null==t?void 0:t[Qn("0x25")])&&e[Qn("0x24")](...t),e[Qn("0x39")](((e,t)=>e[Qn("0x20")]-t[Qn("0x20")]))}async flush(){const e=this[Qn("0x37")]();if(0===e[Qn("0x25")])return{};const t={};t[Qn("0x3a")]=this[Qn("0x1e")][Qn("0x29")](),t[Qn("0x3b")]=this[Qn("0x1e")].getDeviceId(),t[Qn("0x3c")]=this[Qn("0x1e")][Qn("0x3d")](),t[Qn("0x3e")]=this[Qn("0x13")]?Oi:zi,t[Qn("0x3f")]=e;try{const{keyIdentifier:e}=await this[Qn("0xa")].getPublicData();t[Qn("0x40")]=e}catch(e){yi[Qn("0x41")]("Crypto-binding is not supported. "+e)}this.enableSessionToken&&(t[Qn("0x42")]=!0);const i=await this[Qn("0x43")](t),n=await this[Qn("0xa")][Qn("0x44")]();let r;n&&(r=[{type:"key_rotation_data",data:n[Qn("0x45")],signature:n[Qn("0x46")]}]);const a=await this.requestsManager[Qn("0x47")](Qn("0x48"),u(u({},i),r?{headers:r}:{}));if(a[Qn("0x49")]){const e=a[Qn("0x49")][Qn("0x4a")]((e=>"key_rotation_status"===e[Qn("0x22")]));e&&e[Qn("0x4b")]&&this[Qn("0xa")].handleRotateResponse(e[Qn("0x4b")])}return a[Qn("0x3b")]&&this[Qn("0x1e")][Qn("0x4c")](a.deviceId),a[Qn("0x42")]&&this[Qn("0x1e")].setSessionToken(a[Qn("0x42")]),a[Qn("0x3c")]&&this[Qn("0x1e")][Qn("0x4d")](a[Qn("0x3c")]),this[Qn("0x4e")](),a}async buildEncryptedRequestBody(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this[Qn("0x7")][Qn("0x12")]("publicKey",null);if(null===i&&t)return await this[Qn("0x7")].refreshConf(this[Qn("0x1e")][Qn("0x29")]()),await this[Qn("0x43")](e);if(null===i)throw new Yn(new Error("Encryption error - missing public key"),Hn[Qn("0x4f")]);try{const t=JSON[Qn("0x50")](e),n=this.compressData(t),r=n||t,{encryptedData:a,encryptedKey:o}=await this[Qn("0x10")].encrypt(i,r);return{data:a,key:o,dataType:n?Bn.compress:Bn[Qn("0x51")]}}catch(e){throw new Yn(e,Hn.CLIENT)}}compressData(e){try{return ri(e)}catch(e){yi.error("Failed to compress data, sending the data to the service uncompressed",{clientId:this[Qn("0x1e")][Qn("0x29")](),error:e})}}[Qn("0x52")](){if(null===this[Qn("0x53")]){const e=this[Qn("0x8")][Qn("0x54")](ir),t=Number[Qn("0x55")](e);this[Qn("0x53")]=Number[Qn("0x56")](t)?-1:t}return this[Qn("0x53")]++,this[Qn("0x8")][Qn("0x57")](ir,this.eventIndex[Qn("0x1a")]()),this[Qn("0x53")]}[Qn("0x58")](){const e=this[Qn("0x8")][Qn("0x54")](er),t=this[Qn("0x8")][Qn("0x54")](tr);return!e||!t||Date[Qn("0x59")]()-e>864e5||t!=this[Qn("0x1e")].getDeviceId()}async[Qn("0x30")](e){if(!e&&!this.shouldSendDeviceEvent())return yi[Qn("0x5a")](Qn("0x5b")),!1;const t=await this.deviceDataManager[Qn("0x5c")](),i={type:Ri.EVENT_TYPE_DEVICE,attributes:t},n=await this[Qn("0x5d")](i);return n&&(this.storageManager[Qn("0x57")](er,Date.now()),this[Qn("0x8")][Qn("0x57")](tr,this.identityManager[Qn("0x5e")]())),n}async sendPageLoadEvent(){const e=Qn("0x5f");if(this.configManager.getConfValue(ar,[])[Qn("0x21")](e))return!1;const t=this.extractWindowRespurces();return await this.emitEvent({type:Ri[Qn("0xe")],attributes:u(u({interaction_type:e,location:window[Qn("0x19")].href,referrer:document[Qn("0x60")]},window[Qn("0x61")]&&{window_historyLength:window[Qn("0x61")].length}),t&&{windowResources:t})}),!0}[Qn("0x62")](){try{const e=window[Qn("0x63")][Qn("0x64")](Qn("0x65"));return e&&Array[Qn("0x66")](e)?e[Qn("0x67")]((e=>({name:e[Qn("0x68")],initiatorType:e[Qn("0x69")]}))):void 0}catch(e){}}registerEventListeners(){this.interactionEventsManager[Qn("0x6a")](),this[Qn("0x1e")][Qn("0x6a")]()}[Qn("0x6b")](){const e=this[Qn("0x8")][Qn("0x54")](nr);return e?JSON[Qn("0x6c")](e):[]}[Qn("0x23")](e){const t=this.fetchEventsFromLocalStorage();return ji.maintainLastXItems(t,this[Qn("0x15")],e),this[Qn("0x8")].setItemLocalStorageSafe(nr,JSON.stringify(t)),t[Qn("0x25")]}cleanLocalStorageEvents(){this[Qn("0x8")][Qn("0x6d")](nr)}}var dr,hr,gr=["userId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","random","setSessionToken","getSessionToken","parse","iat","exp","now","rti","rst","userIdStorageExpiry","configManager","setClientId","clientId","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","storageManager","setItemLocalStorageSafe","getItemSessionStorageSafe","getItemLocalStorageSafe","getClientId","getUserId","getConfValue","setUserId"];dr=gr,hr=344,function(e){for(;--e;)dr.push(dr.shift())}(++hr);var pr=function(e,t){return gr[e-=0]};const fr="rui",mr="rdi",xr="rdit",_r=pr("0x0"),vr=pr("0x1"),br=pr("0x2");class yr{constructor(e,t,i){this.storageManager=e,this[pr("0x3")]=t,this.clientId=i,this[pr("0x4")](this[pr("0x5")])}load(){this[pr("0x6")](),this[pr("0x7")]()}[pr("0x8")](){window[pr("0x9")](pr("0xa"),(async()=>this[pr("0xb")]()))}[pr("0xc")](){return this.deviceId}[pr("0xd")](e){this[pr("0xe")]!==e&&(yi[pr("0xf")](pr("0x10"),{deviceId:e}),this[pr("0xe")]=e,this.storageManager[pr("0x11")](mr,e),this[pr("0x12")][pr("0x13")](mr,e))}[pr("0x6")](){const e=this.storageManager[pr("0x14")](mr)||this[pr("0x12")][pr("0x15")](mr);return null!=e&&this[pr("0xd")](e),e}[pr("0x16")](){return this[pr("0x5")]}setClientId(e){this[pr("0x12")][pr("0x16")]()!=e&&this.storageManager[pr("0x4")](e),this[pr("0x12")].setItemSessionStorageSafe("rci",e)}[pr("0x17")](){if(Number(this[pr("0x12")].getItemLocalStorageSafe(xr))+this[pr("0x3")][pr("0x18")](br,864e5)<Date.now())return this.removeUserId(),null;const e=this[pr("0x12")][pr("0x14")](fr);return null!=e?e:this[pr("0x12")][pr("0x15")](fr)}[pr("0x19")](e){this[pr("0x1a")]=e,this.storageManager[pr("0x11")](fr,e),this[pr("0x12")].setItemLocalStorageSafe(fr,e),this[pr("0x12")][pr("0x13")](xr,Date.now())}removeUserId(){this.storageManager[pr("0x1b")](fr),this[pr("0x12")][pr("0x1c")](fr),this[pr("0x12")][pr("0x1c")](xr)}[pr("0x7")](){const e=this.storageManager[pr("0x14")](_r);e?(this[pr("0x12")][pr("0x1b")](_r),this[pr("0x1d")]=e):this[pr("0x1d")]=Math.floor(Math[pr("0x1e")]()*Number.MAX_SAFE_INTEGER).toString()}getTabId(){return this[pr("0x1d")]}[pr("0xb")](){this[pr("0x12")][pr("0x11")](_r,this[pr("0x1d")])}[pr("0x1f")](e){this[pr("0x12")][pr("0x13")](vr,e)}getSessionToken(){return this[pr("0x12")].getItemLocalStorageSafe(vr)||this.storageManager[pr("0x14")](vr)}isTokenExpired(){var e;const t=this[pr("0x20")]();if(!t)return!0;try{const i=JSON[pr("0x21")](atob(t.split(".")[1]));let n=(null!==(e=i.exp)&&void 0!==e?e:i[pr("0x22")])*(i.exp&&i[pr("0x23")]<1e12?1e3:1);return i.exp||(n+=9e5),Date[pr("0x24")]()>=n}catch(e){return yi.error("Invalid JWT:",{error:e}),!0}}}var wr,Er,kr=["stringify","callServer","getData","GET","fetch","fetch-api is not supported","CLIENT","statusText","status","message","COMMUNICATION","serverPath","postData","postDataFromURL","POST","include","application/json"];wr=kr,Er=198,function(e){for(;--e;)wr.push(wr.shift())}(++Er);var Ar=function(e,t){return kr[e-=0]};class Cr{constructor(e){this[Ar("0x0")]=e}async[Ar("0x1")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[Ar("0x2")](this[Ar("0x0")]+e,t,i)}async[Ar("0x2")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:Ar("0x3"),credentials:Ar("0x4"),headers:new Headers(u({"Content-Type":Ar("0x5")},i)),body:JSON[Ar("0x6")](t)};return await this[Ar("0x7")](e,n)}async[Ar("0x8")](e){const t=this[Ar("0x0")]+e,i={method:Ar("0x9"),credentials:Ar("0x4")};return await this[Ar("0x7")](t,i)}async[Ar("0x7")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(Ar("0xa")in window))throw new Yn(new Error(Ar("0xb")),Hn[Ar("0xc")]);try{const i=await fetch(e,t),n=await i.json();if(i.ok)return n;throw new Yn(new Error(n.message||i[Ar("0xd")]),Hn.SERVER,i[Ar("0xe")])}catch(e){if(!(e instanceof Yn))throw new Yn(new Error(e[Ar("0xf")]),Hn[Ar("0x10")]);throw e}}}var Dr,Sr,Tr=["filter","length","Invalid SDK params was provided: ","stringify","REQUIRED_SDK_PARAMS","string","throwOrReturnResult","info","throwError","validateSDKParams","keys"];Dr=Tr,Sr=224,function(e){for(;--e;)Dr.push(Dr.shift())}(++Sr);var Ir=function(e,t){return Tr[e-=0]};class Mr{constructor(){this[Ir("0x0")]={clientId:Ir("0x1")}}[Ir("0x2")](e,t,i){if(!e&&((null==t?void 0:t.logIfInvalid)&&yi[Ir("0x3")](i),null==t?void 0:t[Ir("0x4")]))throw new Error(i);return e}[Ir("0x5")](e,t){const i=Object[Ir("0x6")](this[Ir("0x0")])[Ir("0x7")]((t=>typeof e[t]!=this[Ir("0x0")][t]));return this[Ir("0x2")](0==i[Ir("0x8")],t,Ir("0x9")+JSON[Ir("0xa")](i))}}var Rr,Br,Fr=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","reportLogs","middlewares","push","getConfValue","enableLogsReporting","logsMinimumDelay","logs","length","now","flush","getClientId","floor"];Rr=Fr,Br=363,function(e){for(;--e;)Rr.push(Rr.shift())}(++Br);var zr=function(e,t){return Fr[e-=0]};class Or{constructor(e,t,i){this[zr("0x0")]=e,this[zr("0x1")]=t,this[zr("0x2")]=i,this[zr("0x3")]=0,this[zr("0x4")]=async()=>{try{await this[zr("0x5")]()}catch(e){}},yi[zr("0x6")][zr("0x7")](this[zr("0x4")])}async[zr("0x5")](){if(!this[zr("0x2")][zr("0x8")](zr("0x9"),!1))return;const e=this[zr("0x2")].getConfValue("logsMinimumBatch",6),t=this[zr("0x2")][zr("0x8")](zr("0xa"),12e4);if(yi[zr("0xb")][zr("0xc")]<e||this[zr("0x3")]+t>Date.now())return;this[zr("0x3")]=Date[zr("0xd")]();const i=yi[zr("0xe")](),n=this[zr("0x1")][zr("0xf")](),r=Math[zr("0x10")](Date[zr("0xd")]()/1e3),a={sdkVersion:"1.52.0",platform:navigator[zr("0x11")],clientId:n,timestamp:r,logEntries:i};await this[zr("0x0")][zr("0x12")](zr("0x13"),a)}}var Pr,Nr,Lr=["getClientId","device/migrate-identifiers","postDataFromURL","deviceId","storageManager","rimd","identityManager","migrateIdentifiers","getItemLocalStorageSafe","true","getDeviceId"];Pr=Lr,Nr=258,function(e){for(;--e;)Pr.push(Pr.shift())}(++Nr);var Ur=function(e,t){return Lr[e-=0]};const jr=Ur("0x0");class qr{constructor(e,t,i){this[Ur("0x1")]=e,this.requestsManager=t,this.storageManager=i}async[Ur("0x2")](e){if(this.storageManager[Ur("0x3")](jr)!=Ur("0x4")){const t=this[Ur("0x1")][Ur("0x5")](),i=this[Ur("0x1")][Ur("0x6")](),n=(e.endsWith("/")?e:e+"/")+Ur("0x7"),r=await this.requestsManager[Ur("0x8")](n,{deviceId:t,clientId:i});r.deviceId&&r[Ur("0x9")]==t&&this[Ur("0xa")].setItemLocalStorageSafe(jr,Ur("0x4"))}}}var Kr,$r,Vr=["identityManager","migrationsManager","storageManager","enableSessionToken","logsReporter","getConfValue","isInitialized","Session token is not enabled","now","info","SDK disabled","disabled_sdk_","eventsManager","refreshSessionToken","getSessionToken","init","object","userId","initializationPromise","refreshConf","tenantId","keyRotation","cryptoBinding","crypto","createCryptoBinding","sign","isEnabled","startedAt","deviceDataManager","enabled","sendDeviceDataEvent","catch","sendPageLoadEvent","updateUserId","registerEventListeners","triggerActionEvent","includes","warn","Invalid action type","CLIENT","claimedUserIdType","invalid_claimed_user_id_type_","getDeviceData","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","emitEvent","Unhandled SDK error. recieved eventResponse: ","errorSpace","SERVER","_error_","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","getUserId","setUserId","EVENT_TYPE_IDENTIFICATION","deviceId","removeUserId","setAuthenticatedUser","setUser","unidentifiedUser","RiskID","TSAccountProtection","dispatchEvent","undefined","sdkEnabled","enableIdentifiersMigration","verbose","actions","https://collect.riskid.security/","email","phone_number","ssn","national_id","passport_number","drivers_license_number","other","isSDKDisabled","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","string","clientId","options","serverPath","toString","validateSDKParams","mainEntry","requestsManager","configManager"];Kr=Vr,$r=487,function(e){for(;--e;)Kr.push(Kr.shift())}(++$r);var Hr=function(e,t){return Vr[e-=0]};const Gr=[null,void 0,Hr("0x0"),"",0],Zr=Hr("0x1"),Yr=Hr("0x2"),Wr=Hr("0x3"),Jr=Hr("0x4"),Xr=Hr("0x5"),Qr=[Hr("0x6"),Hr("0x7"),"account_id",Hr("0x8"),Hr("0x9"),Hr("0xa"),Hr("0xb"),Hr("0xc")];class ea{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this.initializationPromise=null,this[Hr("0xd")]=!1,this.enableSessionToken=!1,this[Hr("0xe")]=!1,this[Hr("0xf")]=null,this[Hr("0x10")]=new Mr,ea[Hr("0x11")])throw new Error(Hr("0x12"));ea[Hr("0x11")]=!0;const n=typeof t===Hr("0x13");this[Hr("0x14")]=n?t:e,this[Hr("0x15")]=n?{serverPath:e}:t,(i=this[Hr("0x15")])[Hr("0x16")]||(i[Hr("0x16")]=Xr),this[Hr("0x15")][Hr("0x16")]=new URL(this.options[Hr("0x16")])[Hr("0x17")](),this[Hr("0xf")]=this.options.firstPartyMigrationUrl||null,yi.enabled=!!this[Hr("0x15")].verbose,this[Hr("0x10")][Hr("0x18")](this,{throwError:!0,logIfInvalid:!0})||(this[Hr("0xd")]=!0),this.storageManager=new fi(this[Hr("0x14")]),this[Hr("0x1a")]=new Cr(this.options[Hr("0x16")]),this[Hr("0x1b")]=new Si(this.storageManager,this.requestsManager),this[Hr("0x1c")]=new yr(this.storageManager,this.configManager,this[Hr("0x14")]),this[Hr("0x1c")].load(),this[Hr("0x1d")]=new qr(this[Hr("0x1c")],this[Hr("0x1a")],this[Hr("0x1e")]),this[Hr("0x1f")]=this[Hr("0x15")][Hr("0x1f")]||!1,this[Hr("0x20")]=new Or(this[Hr("0x1a")],this[Hr("0x1c")],this.configManager)}get[Hr("0x4")](){return this[Hr("0x1b")][Hr("0x21")](Jr,[])}async getActions(){return await this[Hr("0x22")](),this[Hr("0x4")]}async getSessionToken(){if(!this[Hr("0x1f")])throw new Error(Hr("0x23"));if(!await this[Hr("0x22")]()){const e=Date[Hr("0x24")]();return yi[Hr("0x25")](Hr("0x26")),{actionToken:Hr("0x27")+e}}return this[Hr("0x1c")].isTokenExpired()&&await this[Hr("0x28")][Hr("0x29")](),this[Hr("0x1c")][Hr("0x2a")]()}async[Hr("0x2b")](e){const t=typeof e!==Hr("0x2c")?e:null==e?void 0:e[Hr("0x2d")];return yi[Hr("0x25")]("sdk init started"),this[Hr("0x2e")]=(async()=>{await this.configManager[Hr("0x2f")](this[Hr("0x1c")].getClientId());const e=this[Hr("0x1b")].getConfValue(Hr("0x30"),null),i=this[Hr("0x1b")][Hr("0x21")](Hr("0x31"),null);return this[Hr("0x32")]=hi[Hr("0x33")][Hr("0x34")](Hr("0x35"),(null==i?void 0:i[Hr("0x36")])?{keyRotation:{isEnabled:!0,expiryDays:i.expiryDays,startedAt:i[Hr("0x37")],tenantId:e}}:void 0),this[Hr("0x38")]=new Sn(this[Hr("0x1e")],this[Hr("0x1b")],this[Hr("0x32")]),this[Hr("0x28")]=new cr(this[Hr("0x1b")],this[Hr("0x1e")],this[Hr("0x38")],this[Hr("0x1a")],this[Hr("0x1c")],this[Hr("0x32")],this.options.serverPath,this[Hr("0x1f")]),this.isSDKDisabled=this[Hr("0xd")]||!this[Hr("0x1b")][Hr("0x21")](Zr,!1),!this[Hr("0xd")]&&(this[Hr("0xe")]=this[Hr("0xe")]||this.configManager.getConfValue(Yr,!1),this[Hr("0xe")]&&this[Hr("0xf")]&&await this[Hr("0x1d")].migrateIdentifiers(this[Hr("0xf")]),yi[Hr("0x39")]=yi[Hr("0x39")]||!!this.configManager[Hr("0x21")](Wr,!1),await this[Hr("0x28")][Hr("0x3a")]()[Hr("0x3b")]((()=>{})),await this[Hr("0x28")][Hr("0x3c")]()[Hr("0x3b")]((()=>{})),await this[Hr("0x3d")](t)[Hr("0x3b")]((()=>{})),this.eventsManager[Hr("0x3e")](),await this.eventsManager.flush()[Hr("0x3b")]((()=>{})),yi.info("sdk init done"),!0)})(),await this[Hr("0x2e")]}async isInitialized(){return null!==this.initializationPromise&&await this[Hr("0x2e")]}async[Hr("0x3f")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Date[Hr("0x24")]();if(!await this[Hr("0x22")]())return yi[Hr("0x25")]("SDK disabled"),{actionToken:Hr("0x27")+i};if(!this[Hr("0x4")][Hr("0x40")](e))return yi[Hr("0x41")](Hr("0x42"),{actionType:e}),{actionToken:Hn[Hr("0x43")]+"_error_'invalid action type - "+e+"'_"+i};const n=null==t?void 0:t[Hr("0x44")];if(n&&!Qr.includes(n))return yi[Hr("0x41")]("Invalid claimedUserIdType",{claimedUserIdType:n}),{actionToken:Hr("0x45")+n+"_"+i};let r;this[Hr("0x1b")].getConfValue("enableDeviceAttributesInActions",!1)&&(r=await this[Hr("0x38")][Hr("0x46")]());const a=u({type:Ri[Hr("0x47")],attributes:u(u(u(u(u(u(u(u(u(u(u(u({action_type:e},(null==t?void 0:t[Hr("0x48")])&&{correlation_id:t[Hr("0x48")]}),(null==t?void 0:t[Hr("0x49")])&&{claimed_user_id:t[Hr("0x49")]}),n&&{claimed_user_id_type:n}),(null==t?void 0:t[Hr("0x4a")])&&{public_key:t[Hr("0x4a")]}),(null==t?void 0:t[Hr("0x4b")])&&{extension_metadata:t.extensionMetadata}),(null==t?void 0:t.extensionDeviceAttributes)&&{extension_device_attributes:t[Hr("0x4c")]}),(null==t?void 0:t[Hr("0x4d")])&&{suspicious_signals:t[Hr("0x4d")]}),(null==t?void 0:t[Hr("0x4e")])&&{suspicious_context:t.suspiciousContext}),(null==t?void 0:t.downloadFile)&&{download_file:t[Hr("0x4f")]}),(null==t?void 0:t.uploadFile)&&{upload_file:t[Hr("0x50")]}),(null==t?void 0:t[Hr("0x51")])&&{transactionData:t.transactionData}),r)},(null==t?void 0:t.customAttributes)&&{customAttributes:t[Hr("0x52")]});try{const e=await this[Hr("0x28")][Hr("0x53")](a),{actionToken:t}=e;if(!t)throw new Yn(new Error(Hr("0x54")+(typeof e==Hr("0x2c")?JSON.stringify(e).slice(15):e)),Hn.CLIENT);return e}catch(t){return{actionToken:t instanceof Yn?t[Hr("0x55")]===Hn[Hr("0x56")]?t[Hr("0x55")]+Hr("0x57")+e+"_"+t.errorCode+"_'"+t[Hr("0x58")]+"'_"+i:t[Hr("0x55")]+Hr("0x57")+e+"_'"+t.message+"'_"+i:Hr("0x59")+e+"_"+i}}}async[Hr("0x5a")](e){return await this[Hr("0x22")]()?this.updateUserId(e):(yi[Hr("0x25")](Hr("0x26")),!1)}async[Hr("0x3d")](e){if(Gr[Hr("0x40")](e))return yi[Hr("0x25")](Hr("0x5b"),{userId:e}),!1;e=e.toString(),yi.info(Hr("0x5a"),{userId:e});const t=this[Hr("0x1c")][Hr("0x5c")]();return t===e||(this.identityManager[Hr("0x5d")](e),!!(await this[Hr("0x28")].emitEvent({type:Ri[Hr("0x5e")],attributes:{previous_user_id:t,user_id:e}}))[Hr("0x5f")])}async unidentifiedUser(){if(!await this[Hr("0x22")]())return yi[Hr("0x25")](Hr("0x26")),!1;const e=this[Hr("0x1c")][Hr("0x5c")]();return null!=e&&this.identityManager[Hr("0x60")](),!!(await this[Hr("0x28")].emitEvent({type:Ri[Hr("0x5e")],attributes:{previous_user_id:e}}))[Hr("0x5f")]}async[Hr("0x61")](e){return await this[Hr("0x5a")](e)}async[Hr("0x62")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[Hr("0x61")](e,t)}async clearUser(){return await this[Hr("0x63")]()}}ea[Hr("0x11")]=!1,document[Hr("0x66")](new CustomEvent("TSAccountProtectionReady"));var ta,ia,na=["events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","not_initialized","tsPlatform not initialized","setUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager","flush"];ta=na,ia=500,function(e){for(;--e;)ta.push(ta.shift())}(++ia);var ra=function(e,t){return na[e-=0]};let aa=null;hi.events.on(hi[ra("0x0")][ra("0x1")],(()=>{const{clientId:e,drs:t}=hi[ra("0x2")][ra("0x3")](),i=t||{},{enabled:n,userId:r}=i,a=h(i,ai);!1!==n&&(aa=new ea(e,a),aa[ra("0x4")]({userId:r}))}));const oa=function(){return function(e){if(!e)throw new(hi[ra("0x5")][ra("0x6")][ra("0x7")])(ra("0x8"),ra("0x9"))}(aa),aa[ra("0xe")]()};class sa extends Error{constructor(e,t,i){super(i),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}const la={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 ua,ca,da,ha;!function(e){var t;(t=e.feedback||(e.feedback={})).OK="ok",t.OTHER="other",t.DOCUMENT_NOT_FOUND="document_not_found",t.FACE_NOT_FOUND="face_not_found",t.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",t.OBSTRUCTED="obstructed",t.BLUR="blur",t.GLARE="glare",t.DOCUMENT_NOT_SUPPORTED="document_not_supported",t.DOCUMENT_NOT_MATCHING="document_not_matching",t.WRONG_DOCUMENT_SIDE="wrong_document_side",t.MULTI_FACE="multi_face",t.FACE_ROTATED="face_rotated",t.FACE_TOO_SMALL="face_too_small",t.FACE_TOO_CLOSE="face_too_close",t.CLOSED_EYES="closed_eyes",t.FACE_ANGLE_TOO_LARGE="face_angle_too_large",t.FACE_CLOSE_TO_BORDER="face_close_to_border",t.FACE_OCCLUDED="face_occluded",t.FACE_CROPPED="face_cropped",t.BARCODE_NOT_FOUND="barcode_not_found",t.GLARE_SELFIE="glare_selfie",t.BLUR_SELFIE="blur_selfie",t.RESTRICTED_CRITERIA="restricted_criteria"}(ua||(ua={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(ca||(ca={})),function(e){var t,i;(t=e.status||(e.status={})).PENDING="pending",t.CAPTURING="capturing",t.PROCESSING="processing",t.RECAPTURE="recapture",t.COMPLETE="complete",t.ERROR="error",t.EXPIRED="expired",(i=e.recapture_reason||(e.recapture_reason={})).IMAGE_MISSING="image_missing",i.DOCUMENT_EXPIRED="document_expired",i.DOCUMENT_NOT_SUPPORTED="document_not_supported",i.DOCUMENT_DAMAGED="document_damaged",i.POOR_IMAGE_QUALITY="poor_image_quality",i.DOCUMENT_NOT_FOUND="document_not_found",i.OBSTRUCTED="obstructed",i.BLUR="blur",i.GLARE="glare",i.DOCUMENT_NOT_MATCHING="document_not_matching",i.WRONG_DOCUMENT_SIDE="wrong_document_side",i.FACE_NOT_FOUND="face_not_found",i.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",i.INVALID_INPUT="invalid_input",i.MULTI_FACE="multi_face",i.FACE_ROTATED="face_rotated",i.FACE_TOO_SMALL="face_too_small",i.FACE_TOO_CLOSE="face_too_close",i.CLOSED_EYES="closed_eyes",i.FACE_ANGLE_TOO_LARGE="face_angle_too_large",i.FACE_CLOSE_TO_BORDER="face_close_to_border",i.FACE_OCCLUDED="face_occluded",i.FACE_CROPPED="face_cropped",i.BARCODE_NOT_FOUND="barcode_not_found",i.GLARE_SELFIE="glare_selfie",i.BLUR_SELFIE="blur_selfie",i.NO_FACE="no_face",i.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(da||(da={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(ha||(ha={}));var ga={},pa={get exports(){return ga},set exports(e){ga=e}};!function(e,t){!function(i,n){var r="function",a="undefined",o="object",s="string",l="major",u="model",c="name",d="type",h="vendor",g="version",p="architecture",f="console",m="mobile",x="tablet",_="smarttv",v="wearable",b="embedded",y="Amazon",w="Apple",E="ASUS",k="BlackBerry",A="Browser",C="Chrome",D="Firefox",S="Google",T="Huawei",I="LG",M="Microsoft",R="Motorola",B="Opera",F="Samsung",z="Sharp",O="Sony",P="Xiaomi",N="Zebra",L="Facebook",U="Chromium OS",j="Mac OS",q=" Browser",K=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},$=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},G=function(e,t){for(var i,a,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],g=t[d+1];for(i=a=0;i<h.length&&!u&&h[i];)if(u=h[i++].exec(e))for(s=0;s<g.length;s++)c=u[++a],typeof(l=g[s])===o&&l.length>0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}},Z=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var r=0;r<t[i].length;r++)if($(t[i][r],e))return"?"===i?n:i}else if($(t[i],e))return"?"===i?n:i;return t.hasOwnProperty("*")?t["*"]:e},Y={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"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,g],[/opios[\/ ]+([\w\.]+)/i],[g,[c,B+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[g,[c,B+" GX"]],[/\bopr\/([\w\.]+)/i],[g,[c,B]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[g,[c,"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],[c,g],[/quark(?:pc)?\/([-\w\.]+)/i],[g,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[g,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[c,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[g,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[g,[c,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+A],g],[/\bfocus\/([\w\.]+)/i],[g,[c,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[c,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[c,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[c,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[g,[c,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360"+q]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],g],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+q],g],[/samsungbrowser\/([\w\.]+)/i],[g,[c,F+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],g],[/metasr[\/ ]?([\d\.]+)/i],[g,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,g],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,L],g],[/(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],[c,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[c,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[g,Z,{"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],[c,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],g],[/(wolvic)\/([\w\.]+)/i],[c,g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[c,D+" 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],[c,[g,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[g,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?: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/,"",V]],[/(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,V]]],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],[u,[h,F],[d,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,w],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,w],[d,x]],[/(macintosh);/i],[u,[h,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,z],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,T],[d,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,T],[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],[[u,/_/g," "],[h,P],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,P],[d,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[d,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[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],[u,[h,R],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,R],[d,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,I],[d,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,I],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[u,[h,S],[d,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,S],[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],[u,[h,O],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,O],[d,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,y],[d,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,y],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,E],[d,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,E],[d,m]],[/(nexus 9)/i],[u,[h,"HTC"],[d,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/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],[u,[h,"TCL"],[d,x]],[/(itel) ((\w+))/i],[[h,V],u,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[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,u,[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,u,[d,x]],[/(surface duo)/i],[u,[h,M],[d,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[u,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,x]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,x]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,x]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,x]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,x]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,x]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,x]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,m]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,x]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,x]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,x]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,x]],[/(sprint) (\w+)/i],[h,u,[d,m]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,M],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,N],[d,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,N],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,_]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,I],[d,_]],[/(apple) ?tv/i],[h,[u,w+" TV"],[d,_]],[/crkey/i],[[u,C+"cast"],[h,S],[d,_]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,y],[d,_]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,z],[d,_]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,O],[d,_]],[/(mitv-\w{5}) bui/i],[u,[h,P],[d,_]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[d,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,H],[u,H],[d,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,f]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,f]],[/(playstation [345portablevi]+)/i],[u,[h,O],[d,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,M],[d,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,F],[d,v]],[/((pebble))app/i],[h,u,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,w],[d,v]],[/droid.+; (glass) \d/i],[u,[h,S],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,N],[d,v]],[/(quest( \d| pro)?)/i],[u,[h,L],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/(aeobc)\b/i],[u,[h,y],[d,b]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[c,"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],[c,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,g],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[g,Z,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,Z,Y],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,j],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,g],[/\(bb(10);/i],[g,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[c,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[g,[c,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,U],g],[/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],[c,g],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,g]]},J=function e(t,f){if(typeof t===o&&(f=t,t=n),!(this instanceof e))return new e(t,f).getResult();var _=typeof i!==a&&i.navigator?i.navigator:n,v=t||(_&&_.userAgent?_.userAgent:""),b=_&&_.userAgentData?_.userAgentData:n,y=f?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(W,f):W,w=_&&_.userAgent==v;return this.getBrowser=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e[g]),w&&_&&_.brave&&typeof _.brave.isBrave==r&&(e[c]="Brave"),e},this.getCPU=function(){var e={};return e[p]=n,G.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,G.call(e,v,y.device),w&&!e[d]&&b&&b.mobile&&(e[d]=m),w&&"Macintosh"==e[u]&&_&&typeof _.standalone!==a&&_.maxTouchPoints&&_.maxTouchPoints>2&&(e[u]="iPad",e[d]=x),e},this.getEngine=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.os),w&&!e[c]&&b&&b.platform&&"Unknown"!=b.platform&&(e[c]=b.platform.replace(/chrome os/i,U).replace(/macos/i,j)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===s&&e.length>500?H(e,500):e,this},this.setUA(v),this};J.VERSION="1.0.39",J.BROWSER=K([c,g,l]),J.CPU=K([p]),J.DEVICE=K([u,h,d,f,m,_,x,v,b]),J.ENGINE=J.OS=K([c,g]),e.exports&&(t=e.exports=J),t.UAParser=J;var X=typeof i!==a&&(i.jQuery||i.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var i in t)X.ua[i]=t[i]}}}("object"==typeof window?window:W)}(pa,ga);const fa="1.4.8",ma=ga.UAParser(),xa=fa;function _a(e,t){var i,n,r,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":xa,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==ma?void 0:ma.os)||void 0===i?void 0:i.name,"ts-os-version":null===(n=null==ma?void 0:ma.os)||void 0===n?void 0:n.version,"ts-device-model":null===(r=null==ma?void 0:ma.device)||void 0===r?void 0:r.model,"ts-manufacturer":null===(a=null==ma?void 0:ma.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==ma?void 0:ma.browser)||void 0===o?void 0:o.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var va="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ba=[],ya=[],wa="undefined"!=typeof Uint8Array?Uint8Array:Array,Ea=!1;function ka(){Ea=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)ba[t]=e[t],ya[e.charCodeAt(t)]=t;ya["-".charCodeAt(0)]=62,ya["_".charCodeAt(0)]=63}function Aa(e,t,i){for(var n,r,a=[],o=t;o<i;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(ba[(r=n)>>18&63]+ba[r>>12&63]+ba[r>>6&63]+ba[63&r]);return a.join("")}function Ca(e){var t;Ea||ka();for(var i=e.length,n=i%3,r="",a=[],o=16383,s=0,l=i-n;s<l;s+=o)a.push(Aa(e,s,s+o>l?l:s+o));return 1===n?(t=e[i-1],r+=ba[t>>2],r+=ba[t<<4&63],r+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],r+=ba[t>>10],r+=ba[t>>4&63],r+=ba[t<<2&63],r+="="),a.push(r),a.join("")}function Da(e,t,i,n,r){var a,o,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=i?r-1:0,h=i?-1:1,g=e[t+d];for(d+=h,a=g&(1<<-c)-1,g>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),a-=u}return(g?-1:1)*o*Math.pow(2,a-n)}function Sa(e,t,i,n,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[i+g]=255&s,g+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[i+g]=255&o,g+=p,o/=256,u-=8);e[i+g-p]|=128*f}var Ta={}.toString,Ia=Array.isArray||function(e){return"[object Array]"==Ta.call(e)};function Ma(){return Ba.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ra(e,t){if(Ma()<t)throw new RangeError("Invalid typed array length");return Ba.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Ba.prototype:(null===e&&(e=new Ba(t)),e.length=t),e}function Ba(e,t,i){if(!(Ba.TYPED_ARRAY_SUPPORT||this instanceof Ba))return new Ba(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Oa(this,e)}return Fa(this,e,t,i)}function Fa(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n);Ba.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Ba.prototype:e=Pa(e,t);return e}(e,t,i,n):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Ba.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ua(t,i);e=Ra(e,n);var r=e.write(t,i);r!==n&&(e=e.slice(0,r));return e}(e,t,i):function(e,t){if(La(t)){var i=0|Na(t.length);return 0===(e=Ra(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Ra(e,0):Pa(e,t);if("Buffer"===t.type&&Ia(t.data))return Pa(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function za(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Oa(e,t){if(za(t),e=Ra(e,t<0?0:0|Na(t)),!Ba.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Pa(e,t){var i=t.length<0?0:0|Na(t.length);e=Ra(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function Na(e){if(e>=Ma())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ma().toString(16)+" bytes");return 0|e}function La(e){return!(null==e||!e._isBuffer)}function Ua(e,t){if(La(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return po(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return fo(e).length;default:if(n)return po(e).length;t=(""+t).toLowerCase(),n=!0}}function ja(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return io(this,t,i);case"utf8":case"utf-8":return Xa(this,t,i);case"ascii":return eo(this,t,i);case"latin1":case"binary":return to(this,t,i);case"base64":return Ja(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function qa(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Ka(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=Ba.from(t,n)),La(t))return 0===t.length?-1:$a(e,t,i,n,r);if("number"==typeof t)return t&=255,Ba.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):$a(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function $a(e,t,i,n,r){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var c=-1;for(a=i;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(u(e,a+h)!==u(t,h)){d=!1;break}if(d)return a}return-1}function Va(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function Ha(e,t,i,n){return mo(po(t,e.length-i),e,i,n)}function Ga(e,t,i,n){return mo(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function Za(e,t,i,n){return Ga(e,t,i,n)}function Ya(e,t,i,n){return mo(fo(t),e,i,n)}function Wa(e,t,i,n){return mo(function(e,t){for(var i,n,r,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,r=i%256,a.push(r),a.push(n);return a}(t,e.length-i),e,i,n)}function Ja(e,t,i){return 0===t&&i===e.length?Ca(e):Ca(e.slice(t,i))}function Xa(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var a,o,s,l,u=e[r],c=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=i)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[r+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[r+1],o=e[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[r+1],o=e[r+2],s=e[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=d}return function(e){var t=e.length;if(t<=Qa)return String.fromCharCode.apply(String,e);var i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=Qa));return i}(n)}Ba.TYPED_ARRAY_SUPPORT=void 0===va.TYPED_ARRAY_SUPPORT||va.TYPED_ARRAY_SUPPORT,Ma(),Ba.poolSize=8192,Ba._augment=function(e){return e.__proto__=Ba.prototype,e},Ba.from=function(e,t,i){return Fa(null,e,t,i)},Ba.TYPED_ARRAY_SUPPORT&&(Ba.prototype.__proto__=Uint8Array.prototype,Ba.__proto__=Uint8Array),Ba.alloc=function(e,t,i){return function(e,t,i,n){return za(t),t<=0?Ra(e,t):void 0!==i?"string"==typeof n?Ra(e,t).fill(i,n):Ra(e,t).fill(i):Ra(e,t)}(null,e,t,i)},Ba.allocUnsafe=function(e){return Oa(null,e)},Ba.allocUnsafeSlow=function(e){return Oa(null,e)},Ba.isBuffer=function(e){return null!=e&&(!!e._isBuffer||xo(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&xo(e.slice(0,0))}(e))},Ba.compare=function(e,t){if(!La(e)||!La(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},Ba.isEncoding=function(e){switch(String(e).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}},Ba.concat=function(e,t){if(!Ia(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Ba.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=Ba.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var a=e[i];if(!La(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},Ba.byteLength=Ua,Ba.prototype._isBuffer=!0,Ba.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)qa(this,t,t+1);return this},Ba.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)qa(this,t,t+3),qa(this,t+1,t+2);return this},Ba.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)qa(this,t,t+7),qa(this,t+1,t+6),qa(this,t+2,t+5),qa(this,t+3,t+4);return this},Ba.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Xa(this,0,e):ja.apply(this,arguments)},Ba.prototype.equals=function(e){if(!La(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ba.compare(this,e)},Ba.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Ba.prototype.compare=function(e,t,i,n,r){if(!La(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,r),u=e.slice(t,i),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},Ba.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Ba.prototype.indexOf=function(e,t,i){return Ka(this,e,t,i,!0)},Ba.prototype.lastIndexOf=function(e,t,i){return Ka(this,e,t,i,!1)},Ba.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return Va(this,e,t,i);case"utf8":case"utf-8":return Ha(this,e,t,i);case"ascii":return Ga(this,e,t,i);case"latin1":case"binary":return Za(this,e,t,i);case"base64":return Ya(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wa(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Ba.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qa=4096;function eo(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function to(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function io(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",a=t;a<i;++a)r+=go(e[a]);return r}function no(e,t,i){for(var n=e.slice(t,i),r="",a=0;a<n.length;a+=2)r+=String.fromCharCode(n[a]+256*n[a+1]);return r}function ro(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function ao(e,t,i,n,r,a){if(!La(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function oo(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-i,2);r<a;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function so(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-i,4);r<a;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function lo(e,t,i,n,r,a){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function uo(e,t,i,n,r){return r||lo(e,0,i,4),Sa(e,t,i,n,23,4),i+4}function co(e,t,i,n,r){return r||lo(e,0,i,8),Sa(e,t,i,n,52,8),i+8}Ba.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Ba.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Ba.prototype;else{var r=t-e;i=new Ba(r,void 0);for(var a=0;a<r;++a)i[a]=this[a+e]}return i},Ba.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n},Ba.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},Ba.prototype.readUInt8=function(e,t){return t||ro(e,1,this.length),this[e]},Ba.prototype.readUInt16LE=function(e,t){return t||ro(e,2,this.length),this[e]|this[e+1]<<8},Ba.prototype.readUInt16BE=function(e,t){return t||ro(e,2,this.length),this[e]<<8|this[e+1]},Ba.prototype.readUInt32LE=function(e,t){return t||ro(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Ba.prototype.readUInt32BE=function(e,t){return t||ro(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Ba.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},Ba.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=t,r=1,a=this[e+--n];n>0&&(r*=256);)a+=this[e+--n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},Ba.prototype.readInt8=function(e,t){return t||ro(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Ba.prototype.readInt16LE=function(e,t){t||ro(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Ba.prototype.readInt16BE=function(e,t){t||ro(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Ba.prototype.readInt32LE=function(e,t){return t||ro(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Ba.prototype.readInt32BE=function(e,t){return t||ro(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Ba.prototype.readFloatLE=function(e,t){return t||ro(e,4,this.length),Da(this,e,!0,23,4)},Ba.prototype.readFloatBE=function(e,t){return t||ro(e,4,this.length),Da(this,e,!1,23,4)},Ba.prototype.readDoubleLE=function(e,t){return t||ro(e,8,this.length),Da(this,e,!0,52,8)},Ba.prototype.readDoubleBE=function(e,t){return t||ro(e,8,this.length),Da(this,e,!1,52,8)},Ba.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||ao(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,a=0;for(this[t]=255&e;++a<i&&(r*=256);)this[t+a]=e/r&255;return t+i},Ba.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||ao(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+i},Ba.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,1,255,0),Ba.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Ba.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,65535,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oo(this,e,t,!0),t+2},Ba.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,65535,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oo(this,e,t,!1),t+2},Ba.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,4294967295,0),Ba.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):so(this,e,t,!0),t+4},Ba.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,4294967295,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):so(this,e,t,!1),t+4},Ba.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);ao(this,e,t,i,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ba.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);ao(this,e,t,i,r-1,-r)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ba.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,1,127,-128),Ba.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ba.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,32767,-32768),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oo(this,e,t,!0),t+2},Ba.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,32767,-32768),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oo(this,e,t,!1),t+2},Ba.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,2147483647,-2147483648),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):so(this,e,t,!0),t+4},Ba.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):so(this,e,t,!1),t+4},Ba.prototype.writeFloatLE=function(e,t,i){return uo(this,e,t,!0,i)},Ba.prototype.writeFloatBE=function(e,t,i){return uo(this,e,t,!1,i)},Ba.prototype.writeDoubleLE=function(e,t,i){return co(this,e,t,!0,i)},Ba.prototype.writeDoubleBE=function(e,t,i){return co(this,e,t,!1,i)},Ba.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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),e.length-t<n-i&&(n=e.length-t+i);var r,a=n-i;if(this===e&&i<t&&t<n)for(r=a-1;r>=0;--r)e[r+t]=this[r+i];else if(a<1e3||!Ba.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Ba.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Ba.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=La(e)?e:po(new Ba(e,n).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var ho=/[^+\/0-9A-Za-z-_]/g;function go(e){return e<16?"0"+e.toString(16):e.toString(16)}function po(e,t){var i;t=t||1/0;for(var n=e.length,r=null,a=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function fo(e){return function(e){var t,i,n,r,a,o;Ea||ka();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new wa(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0,i=0;t<n;t+=4,i+=3)r=ya[e.charCodeAt(t)]<<18|ya[e.charCodeAt(t+1)]<<12|ya[e.charCodeAt(t+2)]<<6|ya[e.charCodeAt(t+3)],o[l++]=r>>16&255,o[l++]=r>>8&255,o[l++]=255&r;return 2===a?(r=ya[e.charCodeAt(t)]<<2|ya[e.charCodeAt(t+1)]>>4,o[l++]=255&r):1===a&&(r=ya[e.charCodeAt(t)]<<10|ya[e.charCodeAt(t+1)]<<4|ya[e.charCodeAt(t+2)]>>2,o[l++]=r>>8&255,o[l++]=255&r),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ho,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function mo(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function xo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}const _o=e=>null!=e,vo=e=>"string"==typeof e,bo=e=>vo(e)&&""!==e,yo=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),wo=e=>e instanceof FormData,Eo=e=>{const t=[],i=(e,n)=>{_o(n)&&(Array.isArray(n)?n.forEach((t=>{i(e,t)})):"object"==typeof n?Object.entries(n).forEach((t=>{let[n,r]=t;i(`${e}[${n}]`,r)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,n))};return Object.entries(e).forEach((e=>{let[t,n]=e;i(t,n)})),t.length>0?`?${t.join("&")}`:""},ko=async(e,t)=>"function"==typeof t?t(e):t,Ao=async(e,t)=>{const i=await ko(t,e.TOKEN),n=await ko(t,e.USERNAME),r=await ko(t,e.PASSWORD),a=await ko(t,e.HEADERS),o=Object.entries(u(u({Accept:"application/json"},a),t.headers)).filter((e=>{let[t,i]=e;return _o(i)})).reduce(((e,t)=>{let[i,n]=t;return u(u({},e),{},{[i]:String(n)})}),{});if(bo(i)&&(o.Authorization=`Bearer ${i}`),bo(n)&&bo(r)){const e=(e=>{try{return btoa(e)}catch(t){return Ba.from(e).toString("base64")}})(`${n}:${r}`);o.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?o["Content-Type"]=t.mediaType:yo(t.body)?o["Content-Type"]=t.body.type||"application/octet-stream":vo(t.body)?o["Content-Type"]="text/plain":wo(t.body)||(o["Content-Type"]="application/json")),new Headers(o)},Co=(e,t)=>new Promise((async(i,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,n=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,n)=>{var r;return(null===(r=null==t?void 0:t.path)||void 0===r?void 0:r.hasOwnProperty(n))?i(String(t.path[n])):e})),r=`${e.BASE}${n}`;return t.query?`${r}${Eo(t.query)}`:r})(e,t),r=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{vo(i)||yo(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return _o(i)})).forEach((e=>{let[t,n]=e;Array.isArray(n)?n.forEach((e=>i(t,e))):i(t,n)})),t}})(t),a=(e=>{var t;if(void 0!==e.body)return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):vo(e.body)||yo(e.body)||wo(e.body)?e.body:JSON.stringify(e.body)})(t),o=await Ao(e,t),s=await(async(e,t,i,n,r,a)=>{const o=new AbortController,s={headers:a,body:null!=n?n:r,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,t,n,a,r,o),l=await(async e=>{if(204!==e.status)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some((e=>t.toLowerCase().startsWith(e)))?await e.json():await e.text()}catch(e){console.error(e)}})(s),c=((e,t)=>{if(t){const i=e.headers.get(t);if(vo(i))return i}})(s,t.responseHeader),d={url:n,ok:s.ok,status:s.status,statusText:s.statusText,headers:s.headers,body:null!=c?c:l};((e,t)=>{var i,n;const r=u({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(r)throw new sa(e,t,r);if(!t.ok){const r=null!==(i=t.status)&&void 0!==i?i:"unknown",a=null!==(n=t.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(t.body,null,2)}catch(e){return}})();throw new sa(e,t,`Generic Error: status: ${r}; status text: ${a}; body: ${o}`)}})(t,d),i(d)}catch(e){n(e)}})),Do=new Y("idv"),So=Symbol(),To=Symbol(),Io="verify-id-sdk";function Mo(e){return sessionStorage.getItem(e)}const Ro=new Map;function Bo(e,t){const i=Ro.get(e);Do.events.emit(i,t)}function Fo(e){Bo(So,e)}function zo(e,t,i,n,r){Fo({type:"verification-result",status:t,step:e,state:n,callbackUrl:r,sessionId:i})}function Oo(e,t){Fo({type:"capture-error",errorCode:t,step:e})}function Po(e,t,i){Fo({type:"api-request-error",errorCode:t,step:e,error:i})}function No(e,t){return Co(la,e).catch((i=>(e.url.endsWith("/events")||Po(t,"request-error",i.message),Promise.reject(i))))}async function Lo(e){var t;la.HEADERS=_a(e);const i=await function(e){return No({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${e}`},"init")}(e);return{autocapture_settings:null!==(t=i.body.autocapture_settings)&&void 0!==t?t:void 0,autocapture_enabled:i.body.autocapture_enabled}}Ro.set(So,So),Ro.set(To,To);var Uo={setStep(e,t){e.commit("setStep",t)},setSessionId(e,t){e.commit("setSessionId",t)},setIsCapturingProcessStarted(e,t){e.commit("setIsCapturingProcessStarted",t)},setServerPath(e,t){e.commit("setServerPath",t)},setStartToken(e,t){e.commit("setStartToken",t)},setRootElement(e,t){e.commit("setRootElement",t)},setLanguage(e,t){e.commit("setLanguage",t)},setCallback(e,t){e.commit("setCallback",t)},setUserToken(e,t){e.commit("setUserToken",t)},setConsentVersion(e,t){e.commit("setConsentVersion",t)},setMissingImages(e,t){e.commit("setMissingImages",t)},setClientId(e,t){e.commit("setClientId",t)},setStatus(e,t){e.commit("setStatus",t)},setMarkdownSupportText(e,t){e.commit("setMarkdownSupportText",t)},setVideoCaptureSettings(e,t){e.commit("setVideoCaptureSettings",t)},setCdnHost(e,t){e.commit("setCdnHost",t)},setIsImageSigningEnabled(e,t){e.commit("setIsImageSigningEnabled",t)},setAutoCaptureSettings(e,t){e.commit("setAutoCaptureSettings",t)}},jo={setStep:(e,t)=>(e.step=t,e),setSessionId:(e,t)=>(e.sessionId=t,e),setIsCapturingProcessStarted:(e,t)=>(e.isCapturingProcessStarted=t,e),setServerPath:(e,t)=>(e.serverPath=t,e),setStartToken:(e,t)=>(e.startToken=t,e),setRootElement:(e,t)=>(e.rootElementId=t,e),setLanguage:(e,t)=>(e.language=t,e),setCallback:(e,t)=>(e.callback=t,e),setUserToken:(e,t)=>(e.userToken=t,e),setConsentVersion:(e,t)=>(e.consentVersion=t,e),setMissingImages:(e,t)=>(e.missingImages=t,e),setClientId:(e,t)=>(e.clientId=t,e),setStatus:(e,t)=>(e.verificationStatus=t,e),setMarkdownSupportText:(e,t)=>(e.markdownSupportText=t,e),setVideoCaptureSettings:(e,t)=>(e.videoCaptureSettings=t,e),setCdnHost:(e,t)=>(e.cdnHost=t,e),setIsImageSigningEnabled:(e,t)=>(e.isImageSigningEnabled=t,e),setAutoCaptureSettings:(e,t)=>(e.autoCaptureSettings=t,e)};const qo=new class{constructor(e){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(e,"actions")&&(this.actions=e.actions),Object.prototype.hasOwnProperty.call(e,"mutations")&&(this.mutations=e.mutations);const t=this;this.state=new Proxy(e.state||{},{get:function(e,t){return e[t]},set:function(e,i,n){return e[i]=n,Bo(To,{key:i,state:e}),"mutation"!==t.status&&console.warn(`You should use a mutation to set ${String(i)}`),t.status="resting",!0}})}dispatch(e,t){return"function"!=typeof this.actions[e]?(console.error(`Action "${e} doesn't exist.`),!1):(this.status="action",this.actions[e](this,t),!0)}commit(e,t){if("function"!=typeof this.mutations[e])return console.info(`Mutation "${e}" doesn't exist`),!1;this.status="mutation";const i=this.mutations[e](this.state,t);return this.state=i,!0}}({actions:Uo,mutations:jo,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Ko;function $o(e){const t=[],i=function(e){var t,i,n,r;const a=e.stats.get(Ko.BLUR_DETECTION),o=e.stats.get(Ko.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=Go(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),l=a&&o?Math.min(a.countSuccess,o.countSuccess):null!==(i=null==a?void 0:a.countSuccess)&&void 0!==i?i:null==o?void 0:o.countSuccess;return{name:Ho(Ko.BLUR_DETECTION),count_success:l,count_failure_glare:null!==(n=null==o?void 0:o.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(r=null==a?void 0:a.countFailed)&&void 0!==r?r:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,n]of e.stats.entries())i!==Ko.BLUR_DETECTION&&i!==Ko.GLARE_DETECTION&&n.durations.length>0&&t.push(Vo(n,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=Go(e.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(e.stableCounts.reduce(((e,t)=>e+t),0)/e.stableCounts.length),avg_duration:t.duration_avg,std_duration:t.duration_std}}(e)),t}function Vo(e,t){const i=Go(e.durations);return{name:Ho(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function Ho(e){switch(e){case Ko.BLUR_DETECTION:case Ko.GLARE_DETECTION:return"blur_glare_detector";case Ko.DOCUMENT_DETECTION:return"doc_detector";case Ko.DOCUMENT_POSITION:return"doc_frame_detector";case Ko.BARCODE_DETECTION:return"barcode_detector";case Ko.FACE_DETECTION:return"face_detector";case Ko.FACE_POSITION:return"face_frame_detector";default:return e}}function Go(e){var t;if(e.length<2)return{duration_avg:null!==(t=e[0])&&void 0!==t?t:0,duration_std:0};const i=e.length,n=e.reduce(((e,t)=>e+t),0)/i;let r=0;for(let t=0;t<i;t++){const i=e[t];r+=Math.pow(i-n,2)}const a=Math.sqrt(r/(i-1));return{duration_avg:Math.round(n),duration_std:Math.round(a)}}!function(e){e.DOCUMENT_DETECTION="document_detection",e.DOCUMENT_POSITION="document_position",e.GLARE_DETECTION="glare_detection",e.BLUR_DETECTION="blur_detection",e.BARCODE_DETECTION="barcode_detection",e.FACE_DETECTION="face_detection",e.FACE_POSITION="face_position"}(Ko||(Ko={}));const Zo=new class{createUploadImageEvent(e,t,i,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:e,request_total_time_ms:String(t),request_processing_time_ms:String(i),request_build_time_ms:String(n)}}}createPageViewEvent(e){return{event_type:"page_view",page_view_req:{page_name:e}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(e,t){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(e),model_stats:this.convertModelStats(t)}}}convertModelStats(e){return e.map((e=>({model_name:e.modelName,init_duration:Math.round(e.initDuration),download_duration:Math.round(e.downloadDuration)})))}createUserActionEvent(e,t,i){var n,r,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(r=null===(n=qo.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&void 0!==a&&a};if(i){const e=$o(i);o.stats=e}return{event_type:"user_action",user_action_req:o}}createErrorEvent(e,t,i){return{event_type:"error",error_req:{error_name:t,error_description:e,step:i}}}createCameraNotAllowedEvent(e,t){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:e,step:t}}}createDrsInitFailureEvent(e,t){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:e,step:t}}}};async function Yo(e,t,i,n,r){i?(la.HEADERS=_a(n,t),await function(e,t,i){return No({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,r,e)):console.error("cannot send event, sessionId or startToken is not set")}const Wo=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${la.BASE}/verify/api/v1/verification/${qo.state.sessionId}/risk-session-token`,t=qo.state.clientId,i=_a(t,qo.state.userToken);oa().then((t=>{Do.http.httpPost(e,{session_token:t},null,i).catch((t=>{throw console.log("unable to send session token to IDV",e),console.error(t),t}))})).catch((t=>{var i,n,r,a;console.log("unable to get session token from DRS",e),console.error(t);const o=(null==t?void 0:t.message)||"failed to initialize DRS",s=Zo.createDrsInitFailureEvent(o,"init");Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,s).then((()=>{Fo({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(e){throw console.log("Error sending risk session token"),console.error(e),e}}};async function Jo(e,t,i){const n=Zo.createErrorEvent(e,t,i);await Xo(i,n)}async function Xo(e,t){var i,n,r,a,o;const s=null===(i=qo.state)||void 0===i?void 0:i.userToken,l=(null===(n=qo.state)||void 0===n?void 0:n.sessionId)||(null===(r=qo.state)||void 0===r?void 0:r.startToken),u=null===(a=qo.state)||void 0===a?void 0:a.clientId,c=(null===(o=qo.state)||void 0===o?void 0:o.step)||e;await Yo(c,s,l,u,t)}const Qo=function(){var e,t;(null===(t=null===(e=qo.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var es;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(es||(es={}));const ts=["pdf417","qr_code"];class is{constructor(){this.model=new BarcodeDetector({formats:ts})}async detect(e){const t=await this.model.detect(e);return Qo("detectedBarcodes:",t),t.map((e=>({class:e.format,score:1,x:e.boundingBox.x,y:e.boundingBox.y,width:e.boundingBox.width,height:e.boundingBox.height,extra:e.rawValue})))}}var ns;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(ns||(ns={}));const rs={[es.DOCUMENT_DETECTOR]:{status:ns.LOADING},[es.BLUR_GLARE_CLASSIFIER]:{status:ns.LOADING},[es.FACE_LANDMARK]:{status:ns.LOADING}};const as=[es.DOCUMENT_DETECTOR,es.BLUR_GLARE_CLASSIFIER],os=async()=>{let e=!1;for(;!e;){const t=Object.values(rs).filter((e=>e.status===ns.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=as.every((e=>rs[e].status===ns.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},ss=e=>"function"==typeof e,ls=function(e){};Do.events.on(Do.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:t}=Do.moduleMetadata.getInitConfig();if(!e||!t)return!1;const i=(null==t?void 0:t.serverPath)&&(n=null==t?void 0:t.serverPath,r="/verify",(null==n?void 0:n.endsWith(r))?n.slice(0,n.length-r.length):n);var n,r;la.BASE=i||window.location.origin,qo.dispatch("setClientId",e),qo.dispatch("setRootElement",(null==t?void 0:t.rootElement)||"root-element"),qo.dispatch("setServerPath",null==t?void 0:t.serverPath),qo.dispatch("setLanguage",null==t?void 0:t.language),qo.dispatch("setCallback",null==t?void 0:t.callback),qo.dispatch("setConsentVersion",null==t?void 0:t.consentVersion),qo.dispatch("setMarkdownSupportText",null==t?void 0:t.markdownSupportText),qo.dispatch("setVideoCaptureSettings",null==t?void 0:t.videoCaptureSettings),qo.dispatch("setCdnHost",null==t?void 0:t.cdnHost),qo.dispatch("setIsImageSigningEnabled",null==t?void 0:t.isImageSigningEnabled),(null==t?void 0:t.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;ss(t.sessionGranted)&&(us=t.sessionGranted);ss(t.sessionStarted)&&(cs=t.sessionStarted);ss(t.imageSubmitted)&&(ds=t.imageSubmitted);ss(t.processing)&&(hs=t.processing);ss(t.completed)&&(gs=t.completed);ss(t.recapture)&&(ps=t.recapture);ss(t.error)&&(fs=t.error);ss(i)&&(ms=i)})(t);return qo.dispatch("setStartToken",null==t?void 0:t.startToken),Lo(qo.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return qo.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),Qo("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const t=e.data.modelName;rs[t]={status:ns.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:u(u({},e.data.stats),{},{modelName:t})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;rs[t].status=ns.NOT_AVAILABLE,Jo(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));Jo("service worker not available","service_worker_not_available","init")}qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){Fo({type:"init",step:e})}("init"),!0})),Do.events.on(So,(function(e){switch(Wo.handelEventData(e),ms(e),e.type){case"session-granted":us({session:qo.state.sessionId});break;case"session-id-acquired":cs({session:qo.state.sessionId});break;case"capture-image-result":ds({session:qo.state.sessionId},e.imageType);break;case"start-verification-processing":hs({session:qo.state.sessionId});break;case"verification-complete":gs({session:qo.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":fs({session:qo.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":ps({session:qo.state.sessionId},e.reason)}}));let us=ls,cs=ls,ds=ls,hs=ls,gs=ls,ps=ls,fs=ls,ms=e=>{};async function xs(e,t,i){la.HEADERS=_a(i,t);var n;return(await(n=e,No({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function _s(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function vs(e,t,i,n){la.HEADERS=_a(t);const r=await(a={start_token:e,accessed_from_desktop:!1,client_type:ha.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:n},No({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:r.body.session_id,userToken:r.body.user_token,requiredImages:r.body.required_images}}async function bs(e,t,i){let n,r,a;if(n)try{n=Mo(Io);const e=JSON.parse(n);r=e.sessionId,a=e.userToken}catch(e){}try{let l;if(a){l=(await xs(r,a,i)).missing_images}else{const u=Do.crypto.createCryptoBinding("sign"),c=await u.getPublicData(),d=await vs(e,i,t,c.publicKey);r=d.sessionId,a=d.userToken,l=d.requiredImages,n=JSON.stringify({sessionId:r,userToken:a}),o=Io,s=n,sessionStorage.setItem(o,s)}return{requiredImages:l,sessionId:r.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}var o,s}function ys(e){let{tagName:t,style:i,id:n="",className:r="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=n,s.className=r,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function ws(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Es={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"};const ks=new class{constructor(e){this.translations=e,this.translations=new Proxy(this.translations,{get:function(e,t){return e[t]},set:function(e,t,i){return e[t]=i,!0}})}overrideLanguage(e){Object.assign(this.translations,e)}translate(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];let r=this.translations[e];return r||(r=e),r.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Es),As={en:Es,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"},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"},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"}};const Cs=async(e,t,i,n,r,a)=>{var o,s,l,u,c,d,h;la.HEADERS=_a(i,t);const g=ga.UAParser();let p;if(qo.state.isImageSigningEnabled){const e=Do.crypto.createCryptoBinding("sign");p=await e.sign(n.data)}const f=await(m=e,x={image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:p},device_info:{model:null===(o=null==g?void 0:g.device)||void 0===o?void 0:o.model,type:null===(s=null==g?void 0:g.device)||void 0===s?void 0:s.type,manufacturer:null===(l=null==g?void 0:g.device)||void 0===l?void 0:l.vendor,os:null===(u=null==g?void 0:g.os)||void 0===u?void 0:u.name,os_version:null===(c=null==g?void 0:g.os)||void 0===c?void 0:c.version,browser:null===(d=null==g?void 0:g.browser)||void 0===d?void 0:d.name,browser_version:null===(h=null==g?void 0:g.browser)||void 0===h?void 0:h.version,used_camera:null==r?void 0:r.selectedCamera,cameras:null==r?void 0:r.camerasInfo}},No({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:x,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"}},x.image.image_type));var m,x;const _=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(f.headers,"x-ts-processing-time-ms");return"ok"!==f.body.feedback&&console.error("Error",f),{missing_images:f.body.missing_images,feedback:f.body.feedback,custom_feedback:f.body.custom_feedback,has_barcode:f.body.has_barcode,serverProcessingTime:_}},Ds=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+t.top,bottom:n+t.bottom,right:i+t.right,left:i+t.left}}},Ss=e=>["document_front","document_back"].includes(e)?"environment":"user";function Ts(e){switch(e){case"document_front":return ca.image_type.DOCUMENT_FRONT;case"document_back":return ca.image_type.DOCUMENT_BACK;case"selfie":return ca.image_type.SELFIE}}var Is={},Ms={get exports(){return Is},set exports(e){Is=e}};Ms.exports=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o}));var n=i(1),r=i(7);i.d(t,"a",(function(){return r.a})),i.d(t,"d",(function(){return n.b}));var a=n.a.FACING_MODES,o=n.a.IMAGE_TYPES},function(e,t,i){var n=i(6);i.d(t,"a",(function(){return n.a}));var r=i(2);i.d(t,"b",(function(){return r.a}))},function(e,t,i){function n(e,t){if(!(t>=0&&t<=1))throw new Error(t+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(e))throw new Error(e+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function r(e,t){var i={};try{n(e,t),i.imageType=e,i.imageCompression=t}catch(e){console.error(e),console.error("default value of "+h.c.PNG+" is used"),i.imageType=h.c.PNG,i.imageCompression=null}return i}function a(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function o(){return"ontouchend"in document}function s(e,t,i){var n=e*parseFloat(i);return{imageWidth:n,imageHeight:t/(e/n)}}function l(e,t,i){return r(t,i).imageType===h.c.JPG?i?e.toDataURL(h.b[h.c.JPG],i):e.toDataURL(h.b[h.c.JPG]):e.toDataURL(h.b[t])}function u(e,t){return e||t}function c(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:c()}}t.c=s,t.b=l,t.e=u,t.d=c,t.a=d;var h=i(3)},function(e,t,i){function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"b",(function(){return u})),i.d(t,"d",(function(){return c}));var r,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],l={PNG:"png",JPG:"jpg"},u=(n(r={},"jpg","image/jpeg"),n(r,"png","image/png"),r),c={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);i.d(t,"FACING_MODES",(function(){return n.b})),i.d(t,"IMAGE_TYPES",(function(){return n.c})),i.d(t,"_getDebugPlatformInfo",(function(){return n.d}));var r=i(9);i.d(t,"downloadPhoto",(function(){return r.a})),t.default=n.a},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var r=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=function(){function e(){n(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,n=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,l=e.videoHeight,u=Object(r.c)(s,l,i),c=u.imageWidth,d=u.imageHeight,h=document.createElement("canvas");h.width=c,h.height=d;var g=h.getContext("2d");return o&&g.setTransform(-1,0,0,1,h.width,0),g.drawImage(e,0,0,c,d),Object(r.b)(h,n,a)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),i=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(i){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,r={getUserMedia:function(e){return new Promise((function(t,i){n.call(navigator,e,t,i)}))}};e=Object.assign(n,r)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(r.e)(t,i))return a.d;var n=e.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),a.d;var o=void 0,s=void 0;return t&&(a.e.includes(t)?o=t:s={exact:t}),{audio:!1,video:{facingMode:o,deviceId:s,width:i&&i.width,height:i&&i.height}}}},{key:"getMaxResolutionConstraints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",i);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}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(r.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=n,a);if(i<n.length){var o=n.slice(0,-i);return a.video.advanced=o,a}return null}},{key:"FACING_MODES",get:function(){return a.a}},{key:"IMAGE_TYPES",get:function(){return a.c}}]),e}()},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return l}));var r=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=r.a.IMAGE_TYPES.PNG,l=function(){function e(t){n(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=r.a.getWindowURL(),this.mediaDevices=r.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(n,a){var o=r.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),n(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=r.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var n={};return this._getStreamDevice(e,n)}return new Promise((function(n,r){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),n(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){r(i)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(e){if("srcObject"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:"_setSettings",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var e=this;return new Promise((function(t,i){var n=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&n.push(e)})),t(n)})).catch((function(e){i(e)}))}))}},{key:"_gotStream",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then((function(e){setTimeout((function(){e.getTracks().forEach((function(e){e.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return e._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(e,t){var i=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return i._getStreamDevice(e,t)}))}},{key:"startCameraMaxResolution",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return e._getStreamDeviceMaxResolution(t)}))}},{key:"getDataUri",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?a.c:e.sizeFactor,imageType:void 0===e.imageType?s:e.imageType,imageCompression:void 0===e.imageCompression?a.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?a.b:e.isImageMirror};return r.a.getDataUri(this.videoElement,t)}},{key:"stopCamera",value:function(){var e=this;return new Promise((function(t,i){e.stream&&(e.stream.getTracks().forEach((function(e){e.stop()})),e.videoElement.src="",e.stream=null,e._setSettings(null),t()),i(Error("no stream to stop!"))}))}}]),e}()},function(e,t,i){i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=1,r=null,a=!1},function(e,t,i){var n=i(10);i.d(t,"a",(function(){return n.a}))},function(e,t,i){function n(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return new Blob([n],{type:i})}function r(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=u.c.PNG;return"image/jpeg"===e&&(t=u.c.JPG),t}function o(e,t,i){return e+"-"+r(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=o(t,i,e.type),n.href=window.URL.createObjectURL(e);var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(e),t,i)}t.a=l;var u=i(0)}]);var Rs=J(Is);class Bs{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Bs.instance||(Bs.instance=new Bs),Bs.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((e=>"live"===e.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((e=>e.stop())),this.currentStream=null)}areConstraintsEqual(e){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(e)}async startNewStream(e){this.isStreaming()&&this.areConstraintsEqual(e)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(e),this.currentConstraints=e)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(e){throw console.error("Failed to enumerate devices:",e),e}}}const Fs=[{os:{name:"Android"},label:"2 0"}];async function zs(){const e=(await async function(){const e=Bs.getInstance();let t=await e.enumerateDevices();return t.filter((e=>"videoinput"===e.kind)).every((e=>""===e.label))&&(await e.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),t=await e.enumerateDevices(),e.stopStream()),t}()).filter((e=>{if(!(null==e?void 0:e.label)||"videoinput"!==e.kind||""===e.label)return!1;const t=e.label.toLowerCase();return Os.some((e=>t.includes(e)))})),t=ga.UAParser(),i=e.find((e=>Fs.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const Os=["rear","back","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"],Ps={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Ns={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Ls=async e=>{var t,i;let n;return"environment"==e&&(n=await zs()),null!==(i=null===(t=null==n?void 0:n.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},Us=(e,t)=>{var i,n;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:Ns:null!==(n=null==t?void 0:t.environmentVideoConstraints)&&void 0!==n?n:Ps},js=e=>{const t=ys({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return t.style.transform="user"===e?"scaleX(-1)":"",t.autoplay=!0,t.muted=!0,t.setAttribute("playsinline","true"),t},qs={title:"other_error_code_title",message:"other_error_code_message"},Ks={ok:qs,document_face_not_found:qs,restricted_criteria:qs,other:qs,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"},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"}},$s={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"}},Vs=(e,t)=>{const i=ys({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 ${e}`,testid:`overlay-frame ${e}`});if("environment"===e){!function(e){ws(e,ys({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"})),ws(e,ys({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"})),ws(e,ys({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"})),ws(e,ys({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"}))}(i);const e=.85*t.clientWidth;i.style.width=`${e}px`,i.style.height=.65*e+"px",i.style.maxHeight=.5*window.innerHeight+"px"}else{const e=t.clientWidth*(t.clientHeight<700?.8:.85);i.style.width=.8*e+"px",i.style.height=`${e}px`,i.style.minHeight=.8*e+"px",i.style.maxHeight=.5*window.innerHeight+"px",i.style.borderRadius="50%"}return i};const Hs=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 68 68"),t.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="${null!=e?e:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,t};function Gs(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","16px"),e.setAttribute("height","16px"),e.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 ',e}const Zs={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)"}},Ys=e=>{let{text:t,level:i=1,style:n={},id:r,testid:a}=e;const o=ys({tagName:`h${i}`,style:u(u(u({},Zs.all),Zs[i]),n),id:r,testid:a});return o.textContent=t,o.id=r,o};var Ws,Js={};let Xs=null;try{Xs=(Ws||(Ws=1,function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n={exec:()=>null};function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(a.caret,"$1"),i=i.replace(e,r),n},getRegex:()=>new RegExp(i,t)};return n}const a={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-\u088E\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\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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{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{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{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\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{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{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{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{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{14400}-\u{14646}\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{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\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{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{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{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/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:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},o=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).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(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),f="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]*?(?:-->|$))/,x=r("^ {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",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=r(c).replace("hr",o).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",f).getRegex(),v={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:o,html:x,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:n,text:/^[^\n]+/},b=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",o).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",f).getRegex(),y=u(u({},v),{},{table:b,paragraph:r(c).replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).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",f).getRegex()}),w=u(u({},v),{},{html:r("^ *(?: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:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",o).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),E=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,k=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",C=r(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),D=r(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),S=r("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),I=r(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),M=r(/^<(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(),R=r(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=r("^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",R).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=r(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",h).getRegex(),P=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:n,anyPunctuation:I,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:k,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:D,emStrongRDelimAst:S,emStrongRDelimUnd:T,escape:E,link:z,nolink:P,punctuation:C,reflink:O,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",P).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},L=u(u({},N),{},{link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()}),U=u(u({},N),{},{escape:r(E).replace("])","~|])").getRegex(),url:r(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),j=u(u({},U),{},{br:r(k).replace("{2,}","*").getRegex(),text:r(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:v,gfm:y,pedantic:w},K={normal:N,gfm:U,breaks:j,pedantic:L},$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V=e=>$[e];function H(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,V)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,V);return e}function G(e){try{e=encodeURI(e).replace(a.percentDecode,"%")}catch(e){return null}return e}function Z(e,t){const i=e.replace(a.findPipe,((e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"})).split(a.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(a.slashPipe,"|");return i}function Y(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const a=e.charAt(n-r-1);if(a!==t||i){if(a===t||!i)break;r++}else r++}return e.slice(0,n-r)}function W(e,t,i,n,r){const a=t.href,o=t.title||null,s=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class J{constructor(t){d(this,"options",void 0),d(this,"rules",void 0),d(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const n=e.match(i.other.indentCodeCompensation);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Y(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Y(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Y(t[0],"\n").split("\n"),i="",n="";const r=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else{if(t)break;a.push(e[o])}e=e.slice(o);const s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,n=n?`${n}\n${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,0===e.length)break;const c=r[r.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const t=c,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);r[r.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,n=n.substring(0,n.length-t.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const t=c,a=t.raw+"\n"+e.join("\n"),o=this.list(a);r[r.length-1]=o,i=i.substring(0,i.length-c.raw.length)+o.raw,n=n.substring(0,n.length-t.raw.length)+o.raw,e=a.substring(r[r.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,r={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,n="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(d),i=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let g;if(u=h,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),g=u):g=u.replace(this.rules.other.tabCharGlobal," "),r.test(u))break;if(a.test(u))break;if(o.test(u))break;if(t.test(u))break;if(i.test(u))break;if(g.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+g.slice(d);else{if(c)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(l))break;if(a.test(l))break;if(i.test(l))break;s+="\n"+u}c||u.trim()||(c=!0),n+=h+"\n",e=e.substring(h.length+1),l=g.slice(d)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0));let h,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(s),g&&(h="[ ] "!==g[0],s=s.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:n,task:!!g,checked:h,loose:!1,text:s,tokens:[]}),r.raw+=n}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=i}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=Z(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(const e of r)a.rows.push(Z(e,a.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Y(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])i++;else if(e[n]===t[1]&&(i--,i<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i.slice(1):i.slice(1,-1)),W(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return W(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let r,a,o=i,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(a=[...r].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+a);if(Math.min(i,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="mailto:"+e;else{let a;do{var i,n;a=t[0],t[0]=null!==(i=null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class X{constructor(t){d(this,"tokens",void 0),d(this,"options",void 0),d(this,"state",void 0),d(this,"tokenizer",void 0),d(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new J,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 i={other:a,block:q.normal,inline:K.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=K.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=K.breaks:i.inline=K.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:K}}static lex(e,t){return new X(t).lex(e)}static lexInline(e,t){return new X(t).inlineTokens(e)}lex(e){e=e.replace(a.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){let t,i,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal," ").replace(a.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,r))&&(e=e.substring(t.raw.length),r.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&r.length>0?r[r.length-1].raw+="\n":r.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?r.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),r.push(t);else{var s;if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(n)))i=r[r.length-1],o&&"paragraph"===(null===(s=i)||void 0===s?void 0:s.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t),o=n.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=r[r.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,r}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,i,n,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(t=i.call({lexer:this},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=s[s.length-1],s.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=s[s.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(t=this.tokenizer.emStrong(e,l,o))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),s.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(n))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),a=!0,i=s[s.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),s.push(t);return s}}class Q{constructor(t){d(this,"options",void 0),d(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:n,escaped:r}=e;const o=null===(t=(n||"").match(a.notSpaceStart))||void 0===t?void 0:t[0],s=i.replace(a.endingNewline,"")+"\n";return o?'<pre><code class="language-'+H(o)+'">'+(r?s:H(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:H(s,!0))+"</code></pre>\n"}blockquote(e){let{tokens:t}=e;return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:i}=e;return`<h${i}>${this.parser.parseInline(t)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t<e.items.length;t++){const i=e.items[t];n+=this.listitem(i)}const r=t?"ol":"ul";return"<"+r+(t&&1!==i?' start="'+i+'"':"")+">\n"+n+"</"+r+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+H(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox(e){let{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){let{tokens:t}=e;return`<p>${this.parser.parseInline(t)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let n="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];i="";for(let e=0;e<r.length;e++)i+=this.tablecell(r[e]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow(e){let{text:t}=e;return`<tr>\n${t}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong(e){let{tokens:t}=e;return`<strong>${this.parser.parseInline(t)}</strong>`}em(e){let{tokens:t}=e;return`<em>${this.parser.parseInline(t)}</em>`}codespan(e){let{text:t}=e;return`<code>${H(t,!0)}</code>`}br(e){return"<br>"}del(e){let{tokens:t}=e;return`<del>${this.parser.parseInline(t)}</del>`}link(e){let{href:t,title:i,tokens:n}=e;const r=this.parser.parseInline(n),a=G(t);if(null===a)return r;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+H(i)+'"'),o+=">"+r+"</a>",o}image(e){let{href:t,title:i,text:n}=e;const r=G(t);if(null===r)return H(n);let a=`<img src="${t=r}" alt="${n}"`;return i&&(a+=` title="${H(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:H(e.text)}}class ee{strong(e){let{text:t}=e;return t}em(e){let{text:t}=e;return t}codespan(e){let{text:t}=e;return t}del(e){let{text:t}=e;return t}html(e){let{text:t}=e;return t}text(e){let{text:t}=e;return t}link(e){let{text:t}=e;return""+t}image(e){let{text:t}=e;return""+t}br(){return""}}class te{constructor(t){d(this,"options",void 0),d(this,"renderer",void 0),d(this,"textRenderer",void 0),this.options=t||e.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 ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const a=r;switch(a.type){case"space":i+=this.renderer.space(a);continue;case"hr":i+=this.renderer.hr(a);continue;case"heading":i+=this.renderer.heading(a);continue;case"code":i+=this.renderer.code(a);continue;case"table":i+=this.renderer.table(a);continue;case"blockquote":i+=this.renderer.blockquote(a);continue;case"list":i+=this.renderer.list(a);continue;case"html":i+=this.renderer.html(a);continue;case"paragraph":i+=this.renderer.paragraph(a);continue;case"text":{let r=a,o=this.renderer.text(r);for(;n+1<e.length&&"text"===e[n+1].type;)r=e[++n],o+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=e||"";continue}}const a=r;switch(a.type){case"escape":case"text":i+=t.text(a);break;case"html":i+=t.html(a);break;case"link":i+=t.link(a);break;case"image":i+=t.image(a);break;case"strong":i+=t.strong(a);break;case"em":i+=t.em(a);break;case"codespan":i+=t.codespan(a);break;case"br":i+=t.br(a);break;case"del":i+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class ie{constructor(t){d(this,"options",void 0),d(this,"block",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?X.lex:X.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}d(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class ne{constructor(){d(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),d(this,"options",this.setOptions),d(this,"parse",this.parseMarkdown(!0)),d(this,"parseInline",this.parseMarkdown(!1)),d(this,"Parser",te),d(this,"Renderer",Q),d(this,"TextRenderer",ee),d(this,"Lexer",X),d(this,"Tokenizer",J),d(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const r of e)switch(i=i.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const n of e.header)i=i.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;i=i.concat(this.walkTokens(e.items,t));break}default:{var n;const e=r;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{const r=e[n].flat(1/0);i=i.concat(this.walkTokens(r,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((t=>{const i=u({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const i=e.renderers[t.name];e.renderers[t.name]=i?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=t.renderer.apply(this,n);return!1===a&&(a=i.apply(this,n)),a}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),i.extensions=e),t.renderer){const e=this.defaults.renderer||new Q(this.defaults);for(const i in t.renderer){if(!(i in e))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,r=t.renderer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}i.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new J(this.defaults);for(const i in t.tokenizer){if(!(i in e))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,r=t.tokenizer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ie;for(const i in t.hooks){if(!(i in e))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const n=i,r=t.hooks[n],a=e[n];ie.passThroughHooks.has(i)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(r.call(e,t)).then((t=>a.call(e,t)));const i=r.call(e,t);return a.call(e,i)}:e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;i.walkTokens=function(t){let i=[];return i.push(n.call(this,t)),e&&(i=i.concat(e.call(this,t))),i}}this.defaults=u(u({},this.defaults),i)})),this}setOptions(e){return this.defaults=u(u({},this.defaults),e),this}lexer(e,t){return X.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,i)=>{const n=u({},i),r=u(u({},this.defaults),n),a=this.onError(!!r.silent,!!r.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==t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const o=r.hooks?r.hooks.provideLexer():e?X.lex:X.lexInline,s=r.hooks?r.hooks.provideParser():e?te.parse:te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>s(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(a);try{r.hooks&&(t=r.hooks.preprocess(t));let e=o(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let i=s(e,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(e){return a(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+H(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new ne;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(){return re.use(...arguments),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=Q,ae.TextRenderer=ee,ae.Lexer=X,ae.lexer=X.lex,ae.Tokenizer=J,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,le=ae.use,ue=ae.walkTokens,ce=ae.parseInline,de=ae,he=te.parse,ge=X.lex;e.Hooks=ie,e.Lexer=X,e.Marked=ne,e.Parser=te,e.Renderer=Q,e.TextRenderer=ee,e.Tokenizer=J,e.getDefaults=t,e.lexer=ge,e.marked=ae,e.options=oe,e.parse=de,e.parseInline=ce,e.parser=he,e.setOptions=se,e.use=le,e.walkTokens=ue}(Js)),Js).marked}catch(e){console.log("marked is not supported",e)}const Qs=Xs,el=e=>{let{text:t,id:i,testid:n,clientHeight:r}=e;const a=!!r&&r<700,o=ys({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:a?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:i,testid:n});return ws(o,Ys({text:t,level:a?6:5,style:{color:"white"}})),o};const tl=e=>{const t=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","270"),e.setAttribute("height","175"),e.setAttribute("viewBox","40 60 250 140"),e.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 ',e}();return t.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_back"===e&&(t.style.opacity="1",setTimeout((()=>{t.style.opacity="0"}),5e3)),t};var il;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(il||(il={}));const nl="#ED3232",rl="#01B678",al="#FFF";const ol=e=>{const t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;return t.getContext("2d").drawImage(e,0,0,e.videoWidth,e.videoHeight),t};async function sl(e){let{context:t,onDetect:i,frame:n,showError:r,isSelfie:a=!1}=e;const o=t.state.name;if(o===il.REJECTED){r(function(e){switch(e){case Ko.DOCUMENT_DETECTION:return"searching_document_autocapture";case Ko.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Ko.BARCODE_DETECTION:return ua.feedback.BARCODE_NOT_FOUND;case Ko.BLUR_DETECTION:return ua.feedback.BLUR;case Ko.GLARE_DETECTION:return ua.feedback.GLARE;case Ko.FACE_DETECTION:return ua.feedback.FACE_NOT_FOUND;case Ko.FACE_POSITION:return ua.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));ll("border-color",t.invalidFramesCause===Ko.DOCUMENT_DETECTION?al:nl)}if(o===il.VALID)if(a){ll("border-color",rl);r(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else r("capturing_in_progress_message"),ll("border-color",al);o===il.ACCEPTED&&(ll("border-color",al),r(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:n,suspendedPreview:!0,context:t}))}function ll(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function ul(e){let t,i,n,{captureFrame:r,object:a,videoWidth:o,videoHeight:s,deviceWidth:l,deviceHeight:u,threshold:c,iouThreshold:d=.85}=e;if(o/s>=l/u){n=u/s;const e=(o*n-l)/2;t=a.x*n-e,i=a.y*n}else{n=l/o;const e=(s*n-u)/2;t=a.x*n,i=a.y*n-e}const h=t+a.width*n,g=i+a.height*n;!function(e,t,i,n){var r,a;if(null===(a=null===(r=qo.state.autoCaptureSettings)||void 0===r?void 0:r.settings)||void 0===a?void 0:a.debug){const r=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`;else{const a=document.createElement("div");a.id="rectangle",a.style.position="absolute",a.style.border="1px solid yellow",a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,r.appendChild(a)}}}(t,i,a.width*n,a.height*n);const p=function(e,t){const i=Math.max(e.left,t.left),n=Math.min(e.right,t.right),r=Math.max(e.top,t.top),a=n-i,o=Math.min(e.bottom,t.bottom)-r;if(a<=0||o<=0)return 0;const s=a*o;return s/((e.right-e.left)*(e.bottom-e.top)+(t.right-t.left)*(t.bottom-t.top)-s)}({top:r.top,left:r.left,bottom:r.bottom,right:r.right},{top:i,left:t,bottom:g,right:h}),f=p>d,m=a.width*n*(a.height*n)>c*(r.width*r.height);return f&&m}const cl=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.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 ',e}(),t=ys({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 ws(t,e),ws(t,Ys({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const dl=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.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 ',e}(),t=ys({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 ws(t,e),ws(t,Ys({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},hl=e=>{let{step:t,setImage:i,camera:n}=e;var r,a,o,s;const l=$s[t];(null===(r=qo.state.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&"selfie"===t&&(l.instructions="second_title_face_autocapture");const u=((e,t)=>ys({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),c=ys({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=ys({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(qo.state.rootElementId);if(!h)throw new Error("Root element not found");const g=Vs(Ss(t),h);ws(c,tl(t)),ws(c,g);const p=(()=>{const e=ys({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"}),t=Gs();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",ws(e,t),ws(e,Ys({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();ws(g,p),p.style.visibility="hidden";const f=el({text:ks.translate(l.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:n,color:r,withLoader:a}=e;if(a){const e=Hs();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=ys({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"});return ws(a,e),a.addEventListener("click",t),a}{const e=ys({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(r||"white"),borderRadius:"40px"},id:i+"-outer",testid:n+"-outer"});return ws(e,ys({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:ol(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=qo.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),x=(()=>{const e=ys({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",alignItems:"center",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),t=dl();return ws(e,cl()),ws(e,t),e})(),_=(e=>{let{title:t,text:i,clientHeight:n,customTextColor:r}=e;const a=n<700,o=ys({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Ys({text:t,level:a?2:1,style:{color:r||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),l=Ys({text:i,level:a?6:5,style:{color:r||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return ws(o,s),ws(o,l),o})({text:ks.translate(l.instructions),title:ks.translate(l.title),clientHeight:h.clientHeight}),v=(e=>{const t=e<700,i=ys({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:qo.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=ys({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),r=Gs();r.style.width="16px",r.style.height="16px",r.style.margin="0 10px",qo.state.markdownSupportText?ws(n,r):ws(i,r);const a=qo.state.markdownSupportText&&null!=Qs?Qs.parse(qo.state.markdownSupportText,{async:!1}):"",o=Ys({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Ys({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,ws(n,o)),ws(i,a?[n,s]:o),i})(h.clientHeight),b=(null===(s=qo.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Hs():function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","65"),e.setAttribute("height","65"),e.setAttribute("viewBox","0 0 24 24"),e.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 ',e}();b.style.display="none",ws(d,f),ws(d,_),ws(d,c),ws(d,v),ws(u,d);const y=ys({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});ws(y,b),ws(y,m),ws(y,x),ws(u,y),ws(u,n.videoElement);const w=ys({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Ss(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const E=(e=>{const t=ys({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(w);return ws(u,E),{component:u,setLoadingMode:e=>{var t;m.style.display="none",v.style.visibility="hidden",b.style.display="block",(null===(t=qo.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(b.style.height="63px",b.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var n,r;m.style.display="none",v.style.display="none",x.style.display="flex";const a=x.querySelector("#approve-image"),o=x.querySelector("#retake-image"),s=a.cloneNode(!0);null===(n=a.parentNode)||void 0===n||n.replaceChild(s,a),s.addEventListener("click",t);const l=o.cloneNode(!0);null===(r=o.parentNode)||void 0===r||r.replaceChild(l,o),l.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{x.style.display="none",v.style.display="flex"},setPreviewImage:(e,t)=>{w.src=e,p.style.visibility="hidden",n.videoElement.style.display="none",m.style.display="none",v.style.visibility="hidden",E.style.display="block",b.style.display=t?"none":"block"},setLoadingComplete:()=>{b.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(v.style.visibility="hidden");let i;i=e==ua.feedback.RESTRICTED_CRITERIA&&t?t:Ks[e]?Ks[e].message:ks.translate(e)!==e?e:Ks.other.message,document.getElementById("image-error-message").innerHTML=ks.translate(i),v.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",n.videoElement.style.display="block",E.style.display="none",b.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",E.style.display="none",n.videoElement.style.display="block";const i=e==ua.feedback.RESTRICTED_CRITERIA,r=Ks[e]||Ks.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=Qs?Qs.parse(t,{async:!1}):ks.translate(r.message),v.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=ks.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=ks.translate(i))}}};class gl{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(this.isValid=!1,this.failedStep=e),this.steps.push(new pl(e,t,i))}}class pl{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=e,this.success=t,this.duration=i}}class fl{constructor(){this.name=il.ACCEPTED}async handleFrame(){return new gl}}class ml{constructor(){this.name=il.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:n,detectionStrategy:r}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new fl)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new _l)),a}}class xl{constructor(){this.name=il.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new ml),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new _l),a):(t.invalidFramesCounter++,a)}}class _l{constructor(){this.name=il.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new ml)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new xl)),a}}class vl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=e,this.state=new _l,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=t,this.invalidFramesThreshold=i}setState(e){this.state=e}async handleFrame(e){let{frame:t,deviceInfo:i}=e;return await this.state.handleFrame({context:this,frame:t,deviceInfo:i,detectionStrategy:this.detectionStrategy})}}async function bl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const a=yl(t,n,r),o=await new Promise(((n,r)=>{navigator.serviceWorker.ready.then((o=>{var s;const l=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",l),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",l),Jo(t.data.error.toString(),e,"error"),r(t.data.error))};navigator.serviceWorker.addEventListener("message",l),null===(s=o.active)||void 0===s||s.postMessage(u({type:e,imageData:a,height:t.height,width:t.width},i))}))}));return Qo(`****** in web-SDK return result for ${e}`,o),o}function yl(e,t,i){const n=document.createElement("canvas"),r=t||{height:e.height,width:e.width},a=n.getContext("2d");n.width=r.width,n.height=r.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,r.width,r.height):null==a||a.drawImage(e,0,0,r.width,r.height);const o=null==a?void 0:a.getImageData(0,0,r.width,r.height);return n.remove(),o}async function wl(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return bl("DETECT_DOCUMENT",e,{},rs[es.DOCUMENT_DETECTOR].imageDimensions)}async function El(e,t){return bl("BLUR_GLARE_CLASSIFY",e,{},rs[es.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const kl=function(){try{return new is}catch(e){return Qo("Error initializing barcode model",e),Jo("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Al{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=kl}async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await wl(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,r.addStepResponse(Ko.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await El(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(Ko.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));if(r.addStepResponse(Ko.GLARE_DETECTION,!d,s),d)return r;if(this.barcodeModel&&this.hasBarcode){a=Date.now();const e=await this.barcodeModel.detect(t);s=Date.now()-a;const i=(null==e?void 0:e.length)>0;if(r.addStepResponse(Ko.BARCODE_DETECTION,i,s),!i)return r}return r}}class Cl{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Dl{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Ko).forEach((e=>{this.stats.set(e,new Cl)}))}addStats(e,t){this.frameHandleDurations.push(t),e.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),e.steps.forEach((e=>{this.addStat(e.step,e.duration,e.success?1:0,e.success?0:1)}))}addStat(e,t,i,n){const r=this.stats.get(e);if(!r)throw new Error(`Stat for step ${e} not found`);r.durations.push(t),r.countSuccess+=i,r.countFailed+=n}}let Sl=!1;const Tl=e=>{Sl=e};class Il{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await wl(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,r.addStepResponse(Ko.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await El(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(Ko.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));return r.addStepResponse(Ko.GLARE_DETECTION,!d,s),r}}let Ml=!1;const Rl=e=>{Ml=e};class Bl{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:bl("DETECT_FACE_LANDMARKS",e)}(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,r.addStepResponse(Ko.FACE_POSITION,l,s),r}}let Fl=!1;const zl=e=>{Fl=e};async function Ol(e,t){var i,n,r,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=Zo.createCameraNotAllowedEvent(t.message,e);await Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,s),qo.dispatch("setIsCapturingProcessStarted",!1)}Oo(e,o)}function Pl(e){const t=(e=>{var t,i,n,r;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const l=null===(r=s.split("/"))||void 0===r?void 0:r[1];if(!l)throw new Error("unable-to-parse-data-uri");return{data:o,format:l}})(e);return{image:{data:t.data,format:t.format,captureMargins:Ds()}}}let Nl=!1;const Ll=async()=>{const e=await xs(qo.state.sessionId,qo.state.userToken,qo.state.clientId);Ul(e)},Ul=async e=>{var t;"expired"===(null==e?void 0:e.status)?Po("processing","session-expired",`Session expired for session id: ${qo.state.sessionId}`):(null==e?void 0:e.missing_images)&&(null===(t=null==e?void 0:e.missing_images)||void 0===t?void 0:t.length)>0&&setTimeout(Ll,3e3)},jl=e=>{let{step:t}=e;var i,n,r;const a=null===(n=null===(i=qo.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===n?void 0:n.enabled;let o=!1;const s=null===(r=qo.state)||void 0===r?void 0:r.videoCaptureSettings,l=(e=>{let t,i,n=!1;const r=js(e),a=new Rs(r),o=async()=>{n&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),n=!1)};return{videoStream:i,startVideoFeed:async e=>{var r,s,l;n&&await o(),"environment"==e&&(t=await zs());const u=null!==(s=null===(r=null==t?void 0:t.selectedCamera)||void 0===r?void 0:r.deviceId)&&void 0!==s?s:e,c=Us(e,null===(l=qo.state)||void 0===l?void 0:l.videoCaptureSettings);Bs.getInstance().stopStream(),i=await a.startCamera(u,c),n=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Ss(t));!function(e){Fo({type:"page-load",step:e})}(t),Ll();const u=hl({step:t,setImage:c,camera:l});async function c(e){let{suspendedPreview:i=!1,frame:n,context:r}=e;n||(n=ol(l.videoElement)),"document_front"===t&&Rl(!1),"document_back"===t&&Tl(!1),"selfie"===t&&zl(!1);const a=Date.now(),c=function(e){const t=e.getCameraInfo();return{selectedCamera:(null==t?void 0:t.selectedCamera)&&{label:t.selectedCamera.label},camerasInfo:(null==t?void 0:t.optionalCameras)&&t.optionalCameras.map((e=>({label:e.label})))}}(l);if(!o)return;u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(e=>e.toDataURL("image/jpeg"))(n);u.setPreviewImage(g,"selfie"===t),await l.stopVideoFeed(),"selfie"!==t?await h(i,g,c,a,null==r?void 0:r.stats):(u.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),u.setApprovalRetakeButtons({approveAction:async()=>{u.hideApprovalRetakeButtons(),await h(i,g,c,a,null==r?void 0:r.stats)},retakeAction:()=>{u.hideApprovalRetakeButtons(),d()}}))}function d(){"selfie"===t&&u.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),l.startVideoFeed(Ss(t)).then((()=>{o=!0,u.enableVideoElement(),a&&(u.setAutoCapturingError(null),g(t))})).catch((async e=>{throw await Ol(t,e),e}))}async function h(e,i,n,r,c){const h=[];!function(e){var i,n,r,a;const o=Zo.createUserActionEvent("capture_image",t,e);Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,o)}(c),function(e,t){Fo({type:"capture-image",imageType:t,step:e})}(t,Ts(t));try{const l=Date.now(),c=Pl(i);o=!1,h.push(Cs(qo.state.sessionId,qo.state.userToken,qo.state.clientId,null==c?void 0:c.image,n,Ts(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(g,"has_barcode")&&(Nl=g.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:n,serverProcessingTime:r,userToken:a,sessionId:o,clientId:s}=e;const l=Date.now()-i,u=n?i-n:0,c=Zo.createUploadImageEvent(t,String(l),String(r),String(u));await Yo(t,a,o,s,c)}({step:t,requestStartTime:l,imageProcessingStartTime:r,serverProcessingTime:g.serverProcessingTime,userToken:qo.state.userToken,sessionId:qo.state.sessionId,clientId:qo.state.clientId}),qo.dispatch("setMissingImages",g.missing_images),u.setLoadingComplete(),function(e,t,i){Fo({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Ts(t),g.feedback),"ok"!==g.feedback)return await async function(e){ll("border-color",nl),a?u.setAutoCapturingError(e.feedback,e.custom_feedback):u.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),ll("border-color",al)}(g),void d();ll("border-color",rl),await new Promise((e=>setTimeout(e,750))),ll("border-color",al),qo.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(qo.state.missingImages))}catch(e){u.setLoadingComplete(),u.setCapturingShowErrorMode(ua.feedback.OTHER),l.startVideoFeed(Ss(t)).then((()=>{o=!0})).catch((async e=>{throw await Ol(t,e),e})),Oo(t,"failed-to-submit-image")}}async function g(e){if("document_front"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s,l,u,c;const d=new vl(new Il,null!==(o=null===(a=null===(r=qo.state.autoCaptureSettings.settings)||void 0===r?void 0:r.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Dl;for(Rl(!0);d.state.name!==il.ACCEPTED&&Ml;){const e=Date.now(),r=ol(t.videoElement),a={width:null!==(l=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==l?l:0,height:null!==(c=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==c?c:0},o=await d.handleFrame({frame:r,deviceInfo:a}),g=Date.now()-e+50;h.addStats(o,g),d.stats=h,await sl({context:d,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}if("document_back"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n,hasBarcode:r}=e;var a,o,s,l,u,c,d;const h=new vl(new Al(r),null!==(s=null===(o=null===(a=qo.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Tl(!0);const g=new Dl;for(;h.state.name!==il.ACCEPTED&&Sl;){const e=Date.now(),r=ol(t.videoElement),a={width:null!==(u=null===(l=t.videoElement.getBoundingClientRect())||void 0===l?void 0:l.width)&&void 0!==u?u:0,height:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==d?d:0},o=await h.handleFrame({frame:r,deviceInfo:a}),s=Date.now()-e+50;g.addStats(o,s),h.stats=g,await sl({context:h,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError,hasBarcode:Nl})}if("selfie"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s;const l=new vl(new Bl,30);zl(!0);const u=new Dl;for(;l.state.name!==il.ACCEPTED&&Fl;){const e=Date.now(),c=ol(t.videoElement),d={width:null!==(a=null===(r=t.videoElement.getBoundingClientRect())||void 0===r?void 0:r.width)&&void 0!==a?a:0,height:null!==(s=null===(o=t.videoElement.getBoundingClientRect())||void 0===o?void 0:o.height)&&void 0!==s?s:0},h=await l.handleFrame({frame:c,deviceInfo:d}),g=Date.now()-e;u.addStats(h,g),l.stats=u,await sl({context:l,onDetect:i,showError:n,frame:c,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}}return a&&g(t),(async e=>{var t,i,n,r;const a=Zo.createPageViewEvent(e);await Yo(null===(t=qo.state)||void 0===t?void 0:t.step,null===(i=qo.state)||void 0===i?void 0:i.userToken,null===(n=qo.state)||void 0===n?void 0:n.sessionId,null===(r=qo.state)||void 0===r?void 0:r.clientId,a)})(t),l.startVideoFeed(Ss(t)).then((()=>{o=!0})).catch((async e=>{throw await Ol(t,e),e})),u.component},ql=()=>{Fo({type:"start-verification-processing",step:qo.state.step}),zo("processing","processing",qo.state.sessionId);const e=Kl("processing-verification");ws(e,el({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await xs(qo.state.sessionId,qo.state.userToken,qo.state.clientId);r(e)},i=()=>{setTimeout(t,3e3)},n=async e=>{qo.dispatch("setStep",e.status),qo.dispatch("setStatus",e.status)},r=async e=>{var t,r,a;if(qo.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){Bs.getInstance().stopStream();const i=Zo.createProcessingCompleteEvent();await Yo(qo.state.step,qo.state.userToken,null===(t=qo.state)||void 0===t?void 0:t.sessionId,null===(r=qo.state)||void 0===r?void 0:r.clientId,i),n(e),zo("complete",e.status,qo.state.sessionId),function(e,t,i){Fo({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",qo.state.sessionId,e.callback_url),a=Io,sessionStorage.removeItem(a)}else"recapture"===(null==e?void 0:e.status)?(n(e),qo.dispatch("setIsCapturingProcessStarted",!1),zo("recapture",e.status,qo.state.sessionId),function(e,t,i){Fo({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?Po("processing","session-expired",`Session expired for session id: ${qo.state.sessionId}`):i();else"processing"!==e.state&&(n(e),i())};return t(),e},Kl=e=>ys({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function $l(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const n=function(e){switch(e){case"processing":return ql;case"document_front":case"document_back":case"selfie":return jl;default:throw new Error("Invalid step")}}(e);ws(t,n({step:e}))}function Vl(e){let{key:t,state:i}=e;const n=i.rootElementId,r=document.getElementById(n);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&$l(i.step,r),r&&"processing"===i.step&&(r.style.visibility="hidden")}function Hl(){const e=_s(Mo(Io));if(!_s)throw console.log("Error restarting session, stored session data is invalid or missing"),new Error("Error restarting session, stored session data is invalid or missing");const t=e.sessionId,i=e.userToken;return qo.dispatch("setSessionId",t),qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function Gl(){var e,t;if(null===(e=qo.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await Wl(),Qo("all models loaded - auto-capture enabled")}catch(e){qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=qo.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),Qo("Model loading did not complete on time:",e);Jo(`timed out loading models: ${as.filter((e=>rs[e].status!==ns.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(rs).filter((e=>e.status===ns.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=Zo.createSdkInitEvent(e,t);await Xo("init",i)}(Date.now()-e,i)}}async function Zl(e){var t;try{await Bs.getInstance().startNewStream({video:u(u({},Us("environment",null===(t=qo.state)||void 0===t?void 0:t.videoCaptureSettings)),{},{deviceId:await Ls("environment")})}),function(e,t){Fo({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const n=document.getElementById(i);n.style.visibility="visible",$l(e.shift(),n)}(qo.state.missingImages,qo.state.sessionId,qo.state.rootElementId)}catch(e){await Ol("init",e)}}async function Yl(e){let{status:t,sessionId:i,userToken:n,missingImages:r,rootElementId:a,language:o}=e;!function(e,t){Fo({type:"session-granted",step:e,sessionId:t})}("init",i),qo.dispatch("setStatus",t),qo.dispatch("setSessionId",i),qo.dispatch("setUserToken",n),qo.dispatch("setMissingImages",r),qo.dispatch("setRootElement",a),qo.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";ks.overrideLanguage(As[i]||As.en);let n=document.getElementById(t);if(!n){n=ys({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:t,testid:"root"});const e=document.createElement("style");e.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${t} #trigger-section {\n margin: 0 !important;\n }\n #${t} #page-header {\n height: 5% !important;\n }\n }\n `,ws(document.head,e),ws(document.body,n)}}(qo.state.sessionId,qo.state.rootElementId,qo.state.language),function(){try{Do.events.off(To,Vl)}catch(e){}Do.events.on(To,Vl)}(),await Gl(),await Zl(i)}const Wl=async()=>{const e=qo.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([os(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function Jl(e){if(qo.state.isCapturingProcessStarted)return void Oo(qo.state.step,"trying-to-initialize-active-session");let t,i;if(e){const n=await async function(e){let t,i;try{const n=await bs(e,qo.state.consentVersion,qo.state.clientId);return t=n.sessionId,i=n.userToken,qo.dispatch("setSessionId",t),qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=n.sessionId,i=n.userToken}else{const e=Hl();t=e.sessionId,i=e.userToken}if(!t)return void Oo(qo.state.step,"other");const{missing_images:n,status:r}=await xs(t,i,qo.state.clientId);return qo.dispatch("setIsCapturingProcessStarted",!0),await Yl({status:r,sessionId:t,userToken:i,missingImages:n,rootElementId:qo.state.rootElementId,language:qo.state.language}),!0}async function Xl(e){try{return await Jl(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}}async function Ql(){try{return await async function(){if("recapture"===qo.state.verificationStatus||"pending"===qo.state.verificationStatus){const{sessionId:e,userToken:t}=Hl(),{missing_images:i,status:n}=await xs(e,t,qo.state.clientId);return await Yl({status:n,sessionId:e,userToken:t,missingImages:i,rootElementId:qo.state.rootElementId,language:qo.state.language}),!0}Oo(qo.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}async function eu(){return Ql()}const tu=()=>fa;const iu={initialize:o,...Object.freeze({__proto__:null,recapture:Ql,restart:eu,start:Xl,version:tu})};exports.PACKAGE_VERSION="1.16.0",exports.idv=iu,exports.initialize=o,exports.recapture=Ql,exports.restart=eu,exports.start=Xl,exports.version=tu;
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));const e=Symbol("MODULE_INITIALIZED"),t=new Map;function i(e,i){var n,r;null===(n=t.get(e))||void 0===n||n.forEach((r=e=>e(i),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}let n=null;function r(e){n=e}var a=Object.freeze({__proto__:null,getInitConfig:function(){return n},get initConfig(){return n},setInitConfig:r});function o(t){r(t),i(e,void 0)}var s=Object.freeze({__proto__:null,initialize:o});function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){d(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function d(e,t,i){return(t=c(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function g(e,t){return Object.entries(t).reduce(((t,i)=>{let[n,r]=i;return u(u({},t),{},{[n]:p.isPrototypeOf(r)?new r(e.slug):"function"==typeof r?r.bind(e):"object"==typeof r&&!Array.isArray(r)&&r?g(e,r):r})}),{})}class p{constructor(e){this.slug=e}static create(e){return class extends p{constructor(t){super(t),Object.assign(this,g(this,e(this)))}}}}var f=Object.freeze({__proto__:null,Agent:p}),m=Object.freeze({__proto__:null,MODULE_INITIALIZED:e,emit:i,off:function(e,i){const n=t.get(e);if(!n)return;const r=n.indexOf(i);-1!==r&&n.splice(r,1)},on:function(e,i){var n;t.has(e)?null===(n=t.get(e))||void 0===n||n.push(i):t.set(e,[i])}});function x(e,t){const i=!e||"object"!=typeof e||Array.isArray(e)?{}:e;return[t.reduce(((e,t)=>{if(t in e){const i=e[t];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return e[t]=i,i}),i),i]}function _(e,t){let i=e;return t.every((e=>!(!i||"object"!=typeof i||Array.isArray(i)||!(e in i))&&(i=i[e],!0)),e)}const v="tsec",b="general";function y(e){return e?b:n.clientId}function w(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(v))}function E(e,t){const i=e?sessionStorage:localStorage,n=t(w(e));i.setItem(v,JSON.stringify(n))}var k=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:v,GENERAL_ID_KEY:b,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly),[r]=x(n,[this.slug.toString(),i]);return r[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly);return _(n,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral);E(!!t.sessionOnly,(t=>{const[n,r]=x(t,[this.slug.toString(),i]);return delete n[e],r}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=y(!!i.isGeneral);E(!!i.sessionOnly,(i=>{const[r,a]=x(i,[this.slug.toString(),n]);return r[e]=t,a}))}});const A="RSA-PSS",C=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),D=async()=>await C("RSA-OAEP",["encrypt","decrypt"]),S=async()=>await C(A,["sign"]),T=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:A,saltLength:32},e,i)};class I{constructor(e,t,i){this.slug=e,this.dbName=t,this.dbVersion=i}queryObjectStore(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);n.onupgradeneeded=()=>{var t;const i=n.result;(null===(t=null==i?void 0:i.objectStoreNames)||void 0===t?void 0:t.contains)&&!i.objectStoreNames.contains(e)&&i.createObjectStore(e,{keyPath:"key"})},n.onsuccess=()=>{const r=n.result,a=r.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{r.close()}}}put(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}add(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.add({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{const t=e.target.error;r(t)}}))}))}get(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.get(t);r.onsuccess=()=>{var e;r.result?i(null===(e=r.result)||void 0===e?void 0:e.value):i(void 0)},r.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.getAll(null,t);r.onsuccess=()=>{if(r.result){const e=r.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},r.onerror=e=>{n("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.delete(t);r.onsuccess=()=>{i()},r.onerror=e=>{n(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const n=e.clear();n.onsuccess=()=>{t()},n.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const M="platform",R="init",B="completed",F="RSA2048",z=[R,B];class O{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,a,o,s;this.agent=e,this.keysType=t,this.options=i,this._extractingKeysPromise=null;const l=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=l||!(null===(a=this.options)||void 0===a?void 0:a.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=l?1:(null===(o=this.options)||void 0===o?void 0:o.dbVersion)||1,this.keysStoreName=l||!(null===(s=this.options)||void 0===s?void 0:s.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new I(l?M:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new I((l?M:e.slug)+`:${n.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}getRotatedKeysRecordKey(){return`rotated_${this.keysType}_keys`}getRotatedKeysRecordKeyPending(){return`rotated_pending_${this.keysType}_keys`}arrayBufferToBase64(e){return window.btoa(String.fromCharCode(...new Uint8Array(e)))}async getPKRepresentations(e){const t=await crypto.subtle.exportKey("spki",e);return{arrayBufferKey:t,base64Key:this.arrayBufferToBase64(t)}}async generateKeyPair(){return"sign"==this.keysType?await S():await D()}async calcKeyIdentifier(e){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){if(this._extractingKeysPromise)return this._extractingKeysPromise;this._extractingKeysPromise=(async()=>{var e,t;const i=(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled)?await this.getRotatedKeysData():await this.getKeysData(),{base64Key:n}=await this.getPKRepresentations(i.publicKey);return this.publicKeyBase64=n,this.keyIdentifier=i.keyIdentifier,i})();try{return await this._extractingKeysPromise}finally{this._extractingKeysPromise=null}}async generateKeyPairData(e){const t=await this.generateKeyPair(),{arrayBufferKey:i}=await this.getPKRepresentations(t.publicKey),n=e||await this.calcKeyIdentifier(i);return u(u({},t),{},{keyIdentifier:n,createdDate:Date.now()})}shouldKeyBeRotated(e){var t;const i=null===(t=this.options)||void 0===t?void 0:t.keyRotation;if(!(null==i?void 0:i.isEnabled)||!i.expiryDays||void 0===i.startedAt)return!1;const n=24*i.expiryDays*60*60*1e3,r=e.createdDate&&e.createdDate>=i.startedAt?e.createdDate:i.startedAt;return Date.now()-r>n-2592e6}async extractMainKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getKeysRecordKey())}async extractFallbackMainKeysData(){return await this.indexedDBClientFallback.get(this.keysStoreName,this.getKeysRecordKey())}async extractRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKey())}async extractPendingRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKeyPending())}async saveKeyData(e,t){try{return await this.indexedDBClient.add(this.keysStoreName,e,t),t}catch(t){if(t instanceof DOMException&&"ConstraintError"===t.name){const t=await this.indexedDBClient.get(this.keysStoreName,e);if(t)return t}throw t}}async getKeysData(){const e=this.getKeysRecordKey();let t=await this.extractMainKeysData();if(t)return t;if(t=await this.extractFallbackMainKeysData(),t)return this.saveKeyData(e,t);const i=await this.generateKeyPairData();return this.saveKeyData(e,i)}async getOrCreateRotatedKeys(){let e=await this.extractRotatedKeysData();if(!e){const t=this.getRotatedKeysRecordKey(),i=await this.getKeysData(),n=u(u({},i),{},{createdDate:i.createdDate||Date.now()});e=await this.saveKeyData(t,n)}return e}async getRotatedKeysData(){const e=await this.getOrCreateRotatedKeys();if(this.shouldKeyBeRotated(e)){if(!await this.extractPendingRotatedKeysData()){const t=this.getRotatedKeysRecordKeyPending(),i=await this.generateKeyPairData(e.keyIdentifier);await this.saveKeyData(t,i)}}return e}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(e){if("sign"==this.keysType){const{privateKey:t}=await this.extractKeysData(),i=await T(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}getBaseRotationPayload(){return{keyIdentifier:this.keyIdentifier,slot:this.getRotatedKeysRecordKey(),publicKey:this.publicKeyBase64,publicKeyType:F,tenantId:this.options.keyRotation.tenantId}}async getRotationData(){var e,t;if(!(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled))return;this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData();const i=await this.extractPendingRotatedKeysData();if(i){const{base64Key:e}=await this.getPKRepresentations(i.publicKey),{privateKey:t}=await this.extractKeysData(),n=u(u({},this.getBaseRotationPayload()),{},{newPublicKey:e,createdDate:i.createdDate,newPublicKeyType:F}),r=JSON.stringify(n);return{data:r,signature:await this.signPayload(r,t)}}const n=await this.extractRotatedKeysData();if(n&&!1===n.confirmed){await this.extractKeysData();const e=JSON.stringify(this.getBaseRotationPayload());return{data:e,signature:await this.signPayload(e,n.privateKey)}}}async signPayload(e,t){const i=await T(t,e);return this.arrayBufferToBase64(i)}async handleRotateResponse(e){if(z.includes(e))if(e===R){const e=await this.extractPendingRotatedKeysData();if(e){await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKey());const t=u(u({},e),{},{confirmed:!1});await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),t),await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKeyPending());const{base64Key:i}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=i,this.keyIdentifier=e.keyIdentifier}}else if(e===B){const e=await this.extractRotatedKeysData();e&&!1===e.confirmed&&await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),u(u({},e),{},{confirmed:!0}))}}}var P=Object.freeze({__proto__:null,createCryptoBinding:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",t=arguments.length>1?arguments[1]:void 0;return new O(this,e,t)},generateRSAKeyPair:D,generateRSASignKeyPair:S,signAssymetric:T,verifyAssymetric:async(e,t,i)=>{const n=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(A,e,i,n)}}),N=Object.freeze({__proto__:null});const L=p.create((e=>{class t extends Error{constructor(t,i){super(`${e.slug}-${t} ${i}`)}}return{TsError:t,TsInternalError:class extends t{constructor(e){super(e,"Internal error")}}}}));var U=p.create((()=>u({exceptions:L},f)));class j{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=e,this.middlewares=t,this.logs=[]}info(e,t){this.pushLog(3,e,t)}warn(e,t){this.pushLog(4,e,t)}error(e,t){this.pushLog(5,e,t)}pushLog(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:e,fields:i,message:t});const n=this.middlewares.map((e=>e(this)));Promise.all(n).catch((()=>{}))}}var q=Object.freeze({__proto__:null,consoleMiddleware:function(e){const t=e.logs[e.logs.length-1];console.log(`${t.severity} ${t.message}`,t.fields)},createSdkLogger:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new j(this,e)}});function K(e,t){if(!(null==e?void 0:e.trim()))return"";if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;const i="http://mock.com",n=new URL(i);n.search=(null==t?void 0:t.toString())||"",n.pathname=e;return n.href.replace(i,"")}const $={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function V(e,t,i){var n;const r=(a=t||{},encodeURI(JSON.stringify(a)).split(/%..|./).length-1);var a;return{method:e,headers:u(u(u({},{"X-TS-body-size":String(r)}),$),i||{}),body:null!==(n=t&&JSON.stringify(t||{}))&&void 0!==n?n:void 0}}function H(e,t,i,n,r){const a=K(e,n),o=V(t,i,r);return fetch(a,o)}async function G(e,t,i,n,r){let a;if(a=await H(e,t,i,n,r),!a.ok)throw new Error("Request failed");return a}var Z=Object.freeze({__proto__:null,httpDelete:async function(e,t){const i=await G(e,"DELETE",void 0,void 0,t);return u(u({data:await i.json()},i),{},{headers:i.headers})},httpGet:async function(e,t,i){const n=await G(e,"GET",void 0,t,i);return u(u({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,t,i,n){const r=await G(e,"POST",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},httpPut:async function(e,t,i,n){const r=await G(e,"PUT",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},init:V}),Y=p.create((()=>({events:m,moduleMetadata:a,mainEntry:s,utils:U,storage:k,crypto:P,indexedDB:N,logger:q,http:Z}))),W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={},Q={};function ee(e){let t=e.length;for(;--t>=0;)e[t]=0}const te=256,ie=286,ne=30,re=15,ae=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]),oe=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]),se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),le=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ue=new Array(576);ee(ue);const ce=new Array(60);ee(ce);const de=new Array(512);ee(de);const he=new Array(256);ee(he);const ge=new Array(29);ee(ge);const pe=new Array(ne);function fe(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let me,xe,_e;function ve(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}ee(pe);const be=e=>e<256?de[e]:de[256+(e>>>7)],ye=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},we=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,ye(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Ee=(e,t,i)=>{we(e,i[2*t],i[2*t+1])},ke=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Ae=(e,t,i)=>{const n=new Array(16);let r,a,o=0;for(r=1;r<=re;r++)n[r]=o=o+i[r-1]<<1;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=ke(n[t]++,t))}},Ce=e=>{let t;for(t=0;t<ie;t++)e.dyn_ltree[2*t]=0;for(t=0;t<ne;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},De=e=>{e.bi_valid>8?ye(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Se=(e,t,i,n)=>{const r=2*t,a=2*i;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]},Te=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Se(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Se(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},Ie=(e,t,i)=>{let n,r,a,o,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],r=e.pending_buf[e.l_buf+s],s++,0===n?Ee(e,r,t):(a=he[r],Ee(e,a+te+1,t),o=ae[a],0!==o&&(r-=ge[a],we(e,r,o)),n--,a=be(n),Ee(e,a,i),o=oe[a],0!==o&&(n-=pe[a],we(e,n,o)))}while(s<e.last_lit);Ee(e,256,t)},Me=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,l,u=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)0!==i[2*o]?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,i[2*l]=1,e.depth[l]=0,e.opt_len--,r&&(e.static_len-=n[2*l+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)Te(e,i,o);l=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Te(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,i[2*l]=i[2*o]+i[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,i[2*o+1]=i[2*s+1]=l,e.heap[1]=l++,Te(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,h,g,p,f=0;for(h=0;h<=re;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)c=e.heap[u],h=i[2*i[2*c+1]+1]+1,h>l&&(h=l,f++),i[2*c+1]=h,c>n||(e.bl_count[h]++,g=0,c>=s&&(g=o[c-s]),p=i[2*c],e.opt_len+=p*(h+g),a&&(e.static_len+=p*(r[2*c+1]+g)));if(0!==f){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(h=l;0!==h;h--)for(c=e.bl_count[h];0!==c;)d=e.heap[--u],d>n||(i[2*d+1]!==h&&(e.opt_len+=(h-i[2*d+1])*i[2*d],i[2*d+1]=h),c--)}})(e,t),Ae(i,u,e.bl_count)},Re=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++s<l&&r===o||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==a&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4))},Be=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++s<l&&r===o)){if(s<u)do{Ee(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==a&&(Ee(e,r,e.bl_tree),s--),Ee(e,16,e.bl_tree),we(e,s-3,2)):s<=10?(Ee(e,17,e.bl_tree),we(e,s-3,3)):(Ee(e,18,e.bl_tree),we(e,s-11,7));s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4)}};let Fe=!1;const ze=(e,t,i,n)=>{we(e,0+(n?1:0),3),((e,t,i,n)=>{De(e),n&&(ye(e,i),ye(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};Q._tr_init=e=>{Fe||((()=>{let e,t,i,n,r;const a=new Array(16);for(i=0,n=0;n<28;n++)for(ge[n]=i,e=0;e<1<<ae[n];e++)he[i++]=n;for(he[i-1]=n,r=0,n=0;n<16;n++)for(pe[n]=r,e=0;e<1<<oe[n];e++)de[r++]=n;for(r>>=7;n<ne;n++)for(pe[n]=r<<7,e=0;e<1<<oe[n]-7;e++)de[256+r++]=n;for(t=0;t<=re;t++)a[t]=0;for(e=0;e<=143;)ue[2*e+1]=8,e++,a[8]++;for(;e<=255;)ue[2*e+1]=9,e++,a[9]++;for(;e<=279;)ue[2*e+1]=7,e++,a[7]++;for(;e<=287;)ue[2*e+1]=8,e++,a[8]++;for(Ae(ue,287,a),e=0;e<ne;e++)ce[2*e+1]=5,ce[2*e]=ke(e,5);me=new fe(ue,ae,257,ie,re),xe=new fe(ce,oe,0,ne,re),_e=new fe(new Array(0),se,0,19,7)})(),Fe=!0),e.l_desc=new ve(e.dyn_ltree,me),e.d_desc=new ve(e.dyn_dtree,xe),e.bl_desc=new ve(e.bl_tree,_e),e.bi_buf=0,e.bi_valid=0,Ce(e)},Q._tr_stored_block=ze,Q._tr_flush_block=(e,t,i,n)=>{let r,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<te;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Me(e,e.l_desc),Me(e,e.d_desc),o=(e=>{let t;for(Re(e,e.dyn_ltree,e.l_desc.max_code),Re(e,e.dyn_dtree,e.d_desc.max_code),Me(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*le[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=i+5,i+4<=r&&-1!==t?ze(e,t,i,n):4===e.strategy||a===r?(we(e,2+(n?1:0),3),Ie(e,ue,ce)):(we(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(we(e,t-257,5),we(e,i-1,5),we(e,n-4,4),r=0;r<n;r++)we(e,e.bl_tree[2*le[r]+1],3);Be(e,e.dyn_ltree,t-1),Be(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ie(e,e.dyn_ltree,e.dyn_dtree)),Ce(e),n&&De(e)},Q._tr_tally=(e,t,i)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(he[i]+te+1)]++,e.dyn_dtree[2*be(t)]++),e.last_lit===e.lit_bufsize-1),Q._tr_align=e=>{we(e,2,3),Ee(e,256,ue),(e=>{16===e.bi_valid?(ye(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)};var Oe=(e,t,i,n)=>{let r=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{r=r+t[n++]|0,a=a+r|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};const Pe=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Ne=(e,t,i,n)=>{const r=Pe,a=n+i;e^=-1;for(let i=n;i<a;i++)e=e>>>8^r[255&(e^t[i])];return-1^e},Le={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"},Ue={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:je,_tr_stored_block:qe,_tr_flush_block:Ke,_tr_tally:$e,_tr_align:Ve}=Q,He=Oe,Ge=Ne,Ze=Le,{Z_NO_FLUSH:Ye,Z_PARTIAL_FLUSH:We,Z_FULL_FLUSH:Je,Z_FINISH:Xe,Z_BLOCK:Qe,Z_OK:et,Z_STREAM_END:tt,Z_STREAM_ERROR:it,Z_DATA_ERROR:nt,Z_BUF_ERROR:rt,Z_DEFAULT_COMPRESSION:at,Z_FILTERED:ot,Z_HUFFMAN_ONLY:st,Z_RLE:lt,Z_FIXED:ut,Z_DEFAULT_STRATEGY:ct,Z_UNKNOWN:dt,Z_DEFLATED:ht}=Ue,gt=258,pt=262,ft=103,mt=113,xt=666,_t=(e,t)=>(e.msg=Ze[t],t),vt=e=>(e<<1)-(e>4?9:0),bt=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let yt=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const wt=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Et=(e,t)=>{Ke(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wt(e.strm)},kt=(e,t)=>{e.pending_buf[e.pending++]=t},At=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ct=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=He(e.adler,t,r,i):2===e.state.wrap&&(e.adler=Ge(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},Dt=(e,t)=>{let i,n,r=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-pt?e.strstart-(e.w_size-pt):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+gt;let g=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,u[i+o]===p&&u[i+o-1]===g&&u[i]===u[a]&&u[++i]===u[a+1]){a+=2,i++;do{}while(u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&a<h);if(n=gt-(h-a),a=h-gt,n>o){if(e.match_start=t,o=n,n>=s)break;g=u[a+o-1],p=u[a+o]}}}while((t=d[t&c])>l&&0!=--r);return o<=e.lookahead?o:e.lookahead},St=e=>{const t=e.w_size;let i,n,r,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-pt)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=Ct(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=yt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=yt(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<pt&&0!==e.strm.avail_in)},Tt=(e,t)=>{let i,n;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-pt&&(e.match_length=Dt(e,i)),e.match_length>=3)if(n=$e(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=yt(e,e.ins_h,e.window[e.strstart+1]);else n=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2},It=(e,t)=>{let i,n,r;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-pt&&(e.match_length=Dt(e,i),e.match_length<=5&&(e.strategy===ot||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=$e(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=yt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Et(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=$e(e,0,e.window[e.strstart-1]),n&&Et(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=$e(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2};function Mt(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const Rt=[new Mt(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(St(e),0===e.lookahead&&t===Ye)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Et(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-pt&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out),1)})),new Mt(4,4,8,4,Tt),new Mt(4,5,16,8,Tt),new Mt(4,6,32,32,Tt),new Mt(4,4,16,16,It),new Mt(8,16,32,32,It),new Mt(8,16,128,128,It),new Mt(8,32,128,256,It),new Mt(32,128,258,1024,It),new Mt(32,258,258,4096,It)];function Bt(){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=ht,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),bt(this.dyn_ltree),bt(this.dyn_dtree),bt(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),bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),bt(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 Ft=e=>{if(!e||!e.state)return _t(e,it);e.total_in=e.total_out=0,e.data_type=dt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:mt,e.adler=2===t.wrap?0:1,t.last_flush=Ye,je(t),et},zt=e=>{const t=Ft(e);return t===et&&(e=>{e.window_size=2*e.w_size,bt(e.head),e.max_lazy_match=Rt[e.level].max_lazy,e.good_match=Rt[e.level].good_length,e.nice_match=Rt[e.level].nice_length,e.max_chain_length=Rt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Ot=(e,t,i,n,r,a)=>{if(!e)return it;let o=1;if(t===at&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||i!==ht||n<8||n>15||t<0||t>9||a<0||a>ut)return _t(e,it);8===n&&(n=9);const s=new Bt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+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<<r+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=t,s.strategy=a,s.method=i,zt(e)};X.deflateInit=(e,t)=>Ot(e,t,ht,15,8,ct),X.deflateInit2=Ot,X.deflateReset=zt,X.deflateResetKeep=Ft,X.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?it:(e.state.gzhead=t,et):it,X.deflate=(e,t)=>{let i,n;if(!e||!e.state||t>Qe||t<0)return e?_t(e,it):it;const r=e.state;if(!e.output||!e.input&&0!==e.avail_in||r.status===xt&&t!==Xe)return _t(e,0===e.avail_out?rt:it);r.strm=e;const a=r.last_flush;if(r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kt(r,31),kt(r,139),kt(r,8),r.gzhead?(kt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kt(r,255&r.gzhead.time),kt(r,r.gzhead.time>>8&255),kt(r,r.gzhead.time>>16&255),kt(r,r.gzhead.time>>24&255),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kt(r,255&r.gzhead.extra.length),kt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ge(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,3),r.status=mt);else{let t=ht+(r.w_bits-8<<4)<<8,i=-1;i=r.strategy>=st||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,r.status=mt,At(r,t),0!==r.strstart&&(At(r,e.adler>>>16),At(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending!==r.pending_buf_size));)kt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.status=ft)}else r.status=ft;if(r.status===ft&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&wt(e),r.pending+2<=r.pending_buf_size&&(kt(r,255&e.adler),kt(r,e.adler>>8&255),e.adler=0,r.status=mt)):r.status=mt),0!==r.pending){if(wt(e),0===e.avail_out)return r.last_flush=-1,et}else if(0===e.avail_in&&vt(t)<=vt(a)&&t!==Xe)return _t(e,rt);if(r.status===xt&&0!==e.avail_in)return _t(e,rt);if(0!==e.avail_in||0!==r.lookahead||t!==Ye&&r.status!==xt){let i=r.strategy===st?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(St(e),0===e.lookahead)){if(t===Ye)return 1;break}if(e.match_length=0,i=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===lt?((e,t)=>{let i,n,r,a;const o=e.window;for(;;){if(e.lookahead<=gt){if(St(e),e.lookahead<=gt&&t===Ye)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=o[r],n===o[++r]&&n===o[++r]&&n===o[++r])){a=e.strstart+gt;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<a);e.match_length=gt-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=$e(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(r,t):Rt[r.level].func(r,t);if(3!==i&&4!==i||(r.status=xt),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),et;if(2===i&&(t===We?Ve(r):t!==Qe&&(qe(r,0,0,!1),t===Je&&(bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),wt(e),0===e.avail_out))return r.last_flush=-1,et}return t!==Xe?et:r.wrap<=0?tt:(2===r.wrap?(kt(r,255&e.adler),kt(r,e.adler>>8&255),kt(r,e.adler>>16&255),kt(r,e.adler>>24&255),kt(r,255&e.total_in),kt(r,e.total_in>>8&255),kt(r,e.total_in>>16&255),kt(r,e.total_in>>24&255)):(At(r,e.adler>>>16),At(r,65535&e.adler)),wt(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?et:tt)},X.deflateEnd=e=>{if(!e||!e.state)return it;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==ft&&t!==mt&&t!==xt?_t(e,it):(e.state=null,t===mt?_t(e,nt):et)},X.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return it;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return it;if(1===r&&(e.adler=He(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(bt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,St(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,St(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,e.next_in=o,e.input=s,e.avail_in=a,n.wrap=r,et},X.deflateInfo="pako deflate (from Nodeca project)";var Pt={};const Nt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Pt.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Nt(i,t)&&(e[t]=i[t])}}return e},Pt.flattenChunks=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i};var Lt={};let Ut=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ut=!1}const jt=new Uint8Array(256);for(let e=0;e<256;e++)jt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;jt[254]=jt[254]=1,Lt.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,a,o=e.length,s=0;for(r=0;r<o;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,r=0;a<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t};Lt.buf2string=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const a=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){a[r++]=t;continue}let o=jt[t];if(o>4)a[r++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n<i;)t=t<<6|63&e[n++],o--;o>1?a[r++]=65533:t<65536?a[r++]=t:(t-=65536,a[r++]=55296|t>>10&1023,a[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ut)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(a,r)},Lt.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+jt[e[i]]>t?i:t};const qt=X,Kt=Pt,$t=Lt,Vt=Le,Ht=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},Gt=Object.prototype.toString,{Z_NO_FLUSH:Zt,Z_SYNC_FLUSH:Yt,Z_FULL_FLUSH:Wt,Z_FINISH:Jt,Z_OK:Xt,Z_STREAM_END:Qt,Z_DEFAULT_COMPRESSION:ei,Z_DEFAULT_STRATEGY:ti,Z_DEFLATED:ii}=Ue;function ni(e){this.options=Kt.assign({level:ei,method:ii,chunkSize:16384,windowBits:15,memLevel:8,strategy:ti},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ht,this.strm.avail_out=0;let i=qt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Xt)throw new Error(Vt[i]);if(t.header&&qt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?$t.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=qt.deflateSetDictionary(this.strm,e),i!==Xt)throw new Error(Vt[i]);this._dict_set=!0}}ni.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Jt:Zt,"string"==typeof e?i.input=$t.string2buf(e):"[object ArrayBuffer]"===Gt.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(a===Yt||a===Wt)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=qt.deflate(i,a),r===Qt)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=qt.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Xt;if(0!==i.avail_out){if(a>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},ni.prototype.onData=function(e){this.chunks.push(e)},ni.prototype.onEnd=function(e){e===Xt&&(this.result=Kt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ri=function(e,t){return(t=t||{}).gzip=!0,function(e,t){const i=new ni(t);if(i.push(e,!0),i.err)throw i.msg||Vt[i.err];return i.result}(e,t)};const ai=["enabled","userId"];var oi,si,li=["drs"];oi=li,si=391,function(e){for(;--e;)oi.push(oi.shift())}(++si);var ui,ci,di,hi=new Y((ui="0x0",li[ui-=0])),gi=["getItem","sessionStorage","setItem","removeItemSessionStorageSafe","removeItem","localStorage","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","getFullStorageKey","getItemSessionStorageSafe"];ci=gi,di=378,function(e){for(;--e;)ci.push(ci.shift())}(++di);var pi=function(e,t){return gi[e-=0]};class fi{constructor(e){this[pi("0x0")]={},this[pi("0x1")]={},this[pi("0x2")]=e}[pi("0x3")](){return this[pi("0x2")]}setClientId(e){this[pi("0x2")]=e}[pi("0x4")](e){return this[pi("0x2")]+"_"+e}[pi("0x5")](e){const t=this[pi("0x4")](e);try{return window.sessionStorage[pi("0x6")](t)}catch(e){return this[pi("0x0")][t]}}setItemSessionStorageSafe(e,t){const i=this[pi("0x4")](e);try{window[pi("0x7")][pi("0x8")](i,t)}catch(e){this[pi("0x0")][i]=t}}[pi("0x9")](e){const t=this.getFullStorageKey(e);try{window[pi("0x7")][pi("0xa")](t)}catch(e){this.FALLBACK_SESSION_STORAGE[t]=void 0}}getItemLocalStorageSafe(e){const t=this.getFullStorageKey(e);try{return window.localStorage[pi("0x6")](t)}catch(e){return this.FALLBACK_LOCAL_STORAGE[t]}}setItemLocalStorageSafe(e,t){const i=this[pi("0x4")](e);try{window[pi("0xb")][pi("0x8")](i,t)}catch(e){this[pi("0x1")][i]=t}}removeItemLocalStorageSafe(e){const t=this[pi("0x4")](e);try{window.localStorage[pi("0xa")](t)}catch(e){this[pi("0x1")][t]=void 0}}}var mi,xi,_i=["pushLog","warn","error","flush","log","logPrefix","stringify","push","now","formatter","unshift","enabled","logsLimit","logs","middlewares","info"];mi=_i,xi=235,function(e){for(;--e;)mi.push(mi.shift())}(++xi);var vi=function(e,t){return _i[e-=0]};class bi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[vi("0x0")]=e,this.logPrefix="[AccountProtection SDK]",this[vi("0x1")]=1e4,this[vi("0x2")]=[],this[vi("0x3")]=[]}[vi("0x4")](e,t){this[vi("0x5")](3,e,t)}[vi("0x6")](e,t){this[vi("0x5")](4,e,t)}[vi("0x7")](e,t){this.pushLog(5,e,t)}[vi("0x8")](){const e=this[vi("0x2")];return this[vi("0x2")]=[],e}pushLog(e,t,i){this.enabled&&console[vi("0x9")]("%s %s %s",this[vi("0xa")],t,JSON[vi("0xb")](i)),this.logs[vi("0xc")]({timestamp:Date[vi("0xd")](),severity:e,text:JSON[vi("0xb")](u(u({},i),{},{message:t}),this[vi("0xe")])}),this[vi("0x2")].length>this[vi("0x1")]&&this.logs[vi("0xf")]();const n=this[vi("0x3")].map((e=>e()));Promise.all(n).catch((()=>{}))}[vi("0xe")](e,t){if(t instanceof Error){const{name:e,stack:i,message:n}=t;return{name:e,stack:i,message:n}}return t}}const yi=new bi;var wi,Ei,ki=["refreshConf","keys","setItemLocalStorageSafe","stringify","timestamp","ric","storageManager","requestsManager","conf","loadConf","device/conf?tenantId=","error","error fetching config","getItemLocalStorageSafe","parse","error loading config","getConfValue"];wi=ki,Ei=174,function(e){for(;--e;)wi.push(wi.shift())}(++Ei);var Ai=function(e,t){return ki[e-=0]};const Ci=Ai("0x0"),Di=Ai("0x1");class Si{constructor(e,t){this[Ai("0x2")]=e,this[Ai("0x3")]=t,this[Ai("0x4")]=this[Ai("0x5")]()}async fetchConf(e){try{const t=Ai("0x6")+e,i=await this[Ai("0x3")].getData(t);return null!=i?i:{}}catch(t){return yi[Ai("0x7")](Ai("0x8"),{clientId:e,error:t}),{}}}[Ai("0x5")](){const e=this[Ai("0x2")][Ai("0x9")](Di);if(null!=e)try{return JSON[Ai("0xa")](e)}catch(e){yi[Ai("0x7")](Ai("0xb"),{error:e})}return{}}shouldUpdateConf(){const e=this[Ai("0xc")](Ci,0);return Date.now()-e>36e5}async[Ai("0xd")](e){if(!this.shouldUpdateConf())return!1;let t=await this.fetchConf(e);return 0==Object[Ai("0xe")](t).length?t=this.loadConf():this[Ai("0x2")][Ai("0xf")](Di,JSON[Ai("0x10")](t)),this[Ai("0x4")]=t,!0}[Ai("0xc")](e,t){const i=void 0!==this[Ai("0x4")]?this[Ai("0x4")][e]:void 0;return null!=i?i:t}}var Ti,Ii,Mi=["EVENT_TYPE_INTERACTION","interaction","EVENT_TYPE_IDENTIFICATION","desktop_web","mobile_web","device"];Ti=Mi,Ii=419,function(e){for(;--e;)Ti.push(Ti.shift())}(++Ii);var Ri,Bi,Fi=function(e,t){return Mi[e-=0]};(Bi=Ri||(Ri={})).EVENT_TYPE_ACTION="action",Bi.EVENT_TYPE_DEVICE=Fi("0x0"),Bi[Fi("0x1")]=Fi("0x2"),Bi[Fi("0x3")]="identification";const zi=Fi("0x4"),Oi=Fi("0x5");var Pi,Ni,Li=["length","splice","push","maintainLastXItems"];Pi=Li,Ni=131,function(e){for(;--e;)Pi.push(Pi.shift())}(++Ni);var Ui=function(e,t){return Li[e-=0]};class ji{static[Ui("0x0")](e,t,i){return e[Ui("0x1")]>=t&&e[Ui("0x2")](0,1),e[Ui("0x3")](i),e}}var qi,Ki,$i=["location","shiftKey","inputType","view","data","buffer","collect","extractEventData","maintainLastXItems","getData","now","extractButtonsPressedData","altKey","buttons","offsetX","offsetY","firesTouchEvents","sourceCapabilities","target","isTrusted","cancelable","metaKey","bufferSize","composed"];qi=$i,Ki=292,function(e){for(;--e;)qi.push(qi.shift())}(++Ki);var Vi=function(e,t){return $i[e-=0]};class Hi{constructor(e){this[Vi("0x0")]=[],this[Vi("0x1")]=e}[Vi("0x2")](e){const t=this[Vi("0x3")](e);ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x1")],t)}[Vi("0x5")](){return this[Vi("0x0")]}[Vi("0x3")](e){return u({x:e.x,y:e.y,tspl:Date[Vi("0x6")]()},this.extractButtonsPressedData(e))}[Vi("0x7")](e){return u(u(u(u({},e.ctrlKey&&{ctrlKey:!0}),e[Vi("0x8")]&&{altKey:!0}),e.shiftKey&&{shiftKey:!0}),0!=e.buttons&&{buttons:e[Vi("0x9")]})}}class Gi{constructor(e){this[Vi("0x0")]=[],this.buffer=e}[Vi("0x2")](e){var t;const i={x:e.x,y:e.y,timestamp:Date[Vi("0x6")](),mouseButtonType:e.detail,offsetX:e[Vi("0xa")],offsetY:e[Vi("0xb")],isPressed:null==(null===(t=e.sourceCapabilities)||void 0===t?void 0:t[Vi("0xc")])?null:!e[Vi("0xd")].firesTouchEvents,target_id:e[Vi("0xe")].id};ji[Vi("0x4")](this.data,this.buffer,i)}[Vi("0x5")](){const e=[...this[Vi("0x0")]];return this.data=[],e}}class Zi{constructor(e){this[Vi("0x0")]=[],this.bufferSize=e}[Vi("0x2")](e){var t;const i={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e.composed,isView:!!e.view,shiftKey:e.shiftKey,metaKey:e[Vi("0x11")],firesTouchEvents:null===(t=e[Vi("0xd")])||void 0===t?void 0:t.firesTouchEvents,timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],i)}[Vi("0x5")](){const e=[...this[Vi("0x0")]];return this[Vi("0x0")]=[],e}}class Yi{constructor(e){this.data=[],this.bufferSize=e}[Vi("0x2")](e){var t;const i={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e[Vi("0x13")],isView:!!e.view,location:e[Vi("0x14")],shiftKey:e[Vi("0x15")],firesTouchEvents:null===(t=e[Vi("0xd")])||void 0===t?void 0:t[Vi("0xc")],timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this.bufferSize,i)}[Vi("0x5")](){const e=this[Vi("0x0")];return this.data=[],e}}class Wi{constructor(e){this.data=[],this[Vi("0x12")]=e}[Vi("0x2")](e){const t={isTrusted:e[Vi("0xf")],cancelable:e[Vi("0x10")],composed:e[Vi("0x13")],inputType:e[Vi("0x16")],isView:!!e[Vi("0x17")],timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],t)}[Vi("0x5")](){const e=this[Vi("0x0")];return this[Vi("0x0")]=[],e}}class Ji{constructor(e){this[Vi("0x0")]=[],this[Vi("0x12")]=e}[Vi("0x2")](e){const t={isTrusted:e.isTrusted,cancelable:e[Vi("0x10")],composed:e.composed,timestamp:Date[Vi("0x6")]()};ji[Vi("0x4")](this[Vi("0x0")],this[Vi("0x12")],t)}[Vi("0x5")](){const e=this[Vi("0x0")];return this[Vi("0x0")]=[],e}}var Xi,Qi,en=["getGenericAttributes","getAttachedData","error","error adding interaction listener","eventTypesToAttach","getData","href","change","paste","mousemove","mouseup","mousedown","submit","keyup","input","focusout","SELECT","TEXTAREA","safeEventCallback","interactionEventsCollectorsData","detail","sourceCapabilities","firesTouchEvents","offsetX","offsetY","target","isTrusted","cancelable","composed","dropEffect","clipboardData","effectAllowed","mouseEventsCollectionBuffer","dataset","virtualKeyboard","inputTypeFilter","tagName","includes","entries","addSafeInteractionListener","Error while adding listener","filter","handleEvent","forEach"];Xi=en,Qi=227,function(e){for(;--e;)Xi.push(Xi.shift())}(++Qi);var tn=function(e,t){return en[e-=0]};const nn=tn("0x0"),rn=tn("0x1"),an=tn("0x2"),on=tn("0x3"),sn=tn("0x4"),ln=tn("0x5"),un=tn("0x6"),cn="keydown",dn=tn("0x7"),hn=tn("0x8"),gn=["INPUT",tn("0x9"),tn("0xa")];class pn{constructor(e,t,i){this.deviceEventDataCollectionIgnoreList=e,this.mouseEventsCollectionBuffer=t,this[tn("0xb")]=i,this[tn("0xc")]={click:{eventTypesToAttach:[an,on,sn],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[tn("0xd")],isPressed:null==(null===(t=e[tn("0xe")])||void 0===t?void 0:t[tn("0xf")])?null:!e[tn("0xe")][tn("0xf")],offsetX:e[tn("0x10")],offsetY:e[tn("0x11")],target_id:e[tn("0x12")].id}}},[rn]:{attributesMapper:e=>({target_id:e.target.id,isTrusted:e[tn("0x13")],cancelable:e[tn("0x14")],composed:e[tn("0x15")],dropEffect:e.clipboardData[tn("0x16")],effectAllowed:e[tn("0x17")][tn("0x18")]})},[ln]:{attributesMapper:e=>({target_id:e[tn("0x12")].id})},[an]:{continousCollectors:[new Hi(this[tn("0x19")])]},[on]:{continousCollectors:[new Gi(1)]},[sn]:{continousCollectors:[new Gi(1)]},[hn]:{eventTypesToAttach:[dn,un,cn,nn],filter:this.inputTypeFilter,attributesMapper:e=>{const{target:t,isTrusted:i,cancelable:n,composed:r}=e;return u({target_id:t.id,dataset_keys:Object.keys(t[tn("0x1a")]||{}),isTrusted:i,cancelable:n,composed:r},navigator[tn("0x1b")]&&{navigator_virtualKeyboard:navigator[tn("0x1b")].overlaysContent})}},[dn]:{filter:this[tn("0x1c")],continousCollectors:[new Wi(50)]},[un]:{filter:this[tn("0x1c")],continousCollectors:[new Yi(50)]},[cn]:{filter:this[tn("0x1c")],continousCollectors:[new Zi(50)]},[nn]:{continousCollectors:[new Ji(50)]}}}inputTypeFilter(e){var t;const i=null===(t=e[tn("0x12")])||void 0===t?void 0:t[tn("0x1d")];return gn[tn("0x1e")](i)}registerEventListeners(){for(const[e,t]of Object[tn("0x1f")](this[tn("0xc")]))if(!this.deviceEventDataCollectionIgnoreList[tn("0x1e")](e))try{this[tn("0x20")](e,t)}catch(t){yi.error(tn("0x21"),{error:t,eventType:e})}}[tn("0x22")](e,t){return!e.filter||e[tn("0x22")](t)}async[tn("0x23")](e,t,i){const{attributesMapper:n,continousCollectors:r}=e;if(!this[tn("0x22")](e,t))return!1;if(r)r[tn("0x24")]((e=>{e.collect(t)}));else{const e=this[tn("0x25")](),r=this[tn("0x26")](i),a=u(u(u({},e),n(t)),r&&{attachedEventsData:r});await this.safeEventCallback(i,a)}return!0}addSafeInteractionListener(e,t){window.addEventListener(e,(async i=>{try{await this[tn("0x23")](t,i,e)}catch(e){yi[tn("0x27")](tn("0x28"),{error:e})}}))}[tn("0x26")](e){let t;const i=this[tn("0xc")][e][tn("0x29")];return i&&(t={},i[tn("0x24")]((e=>{const{continousCollectors:i}=this[tn("0xc")][e];i&&i[tn("0x24")]((i=>t[e]=i[tn("0x2a")]()))}))),t}[tn("0x25")](){return{location:window.location[tn("0x2b")]}}}var fn,mn,xn=["race","catch","warn","executor reached timeout","finally","getHighEntropyValues","model","platform","platformVersion","fullVersionList","bitness","mobile","wow64","resolve","setTimeout"];fn=xn,mn=140,function(e){for(;--e;)fn.push(fn.shift())}(++mn);var _n=function(e,t){return xn[e-=0]};function vn(){var e;return null===(e=navigator.userAgentData)||void 0===e?void 0:e[_n("0x0")](["architecture",_n("0x1"),_n("0x2"),_n("0x3"),_n("0x4"),_n("0x5"),_n("0x6"),_n("0x7"),"uaFullVersion"])}function bn(e,t){let i;const n=[Promise[_n("0x8")](e()).catch((()=>{})),new Promise(((e,n)=>i=window[_n("0x9")](n,t)))];return Promise[_n("0xa")](n)[_n("0xb")]((()=>yi[_n("0xc")](_n("0xd"),{fnName:e.name})))[_n("0xe")]((()=>clearTimeout(i)))}var yn,wn,En=["worker throw error","resolve","collectPromisesData","worker promise rejected","getCookieEnabled","getFIDOEnabled","credentials","PublicKeyCredential","crypto","getRandomValues","from","RTCPeerConnection","getWindowBasedKeys","chrome","safari","__crWeb","yandex","__yb","__ybro","__edgeTrackingPreventionStatistics","webkit","samsungAr","ucweb","UCShellJava","puffinDevice","_phantom","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__driver_evaluate","__driver_unwrapped","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped","__webdriver__chr","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","__webdriver_unwrapped","awesomium","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Promise","chrome_asyncScriptInfo","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","getMediaMatch","standard","no-preference","high","low","more","less","forced","100","active","none","inverted","rec2020","replace","matchMedia","matches","log","sqrt","exp","acos","acosh","asin","asinh","atanh","atan","sinh","cos","cosh","expm1","log1p","length","hashCodeString","getSessionStorage","sessionStorage","localStorage","external","toString","indexOf","Sequentum","webdriver","__fxdriver_unwrapped","calledSelenium","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","webdriver-evaluate","selenium-evaluate","webdriverCommand","webdriver-evaluate-response","__webdriverFunc","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","userAgent","userAgentData","storage","estimate","navigatorOnLine","userActivation","isActive","permissions","state","sendBeacon","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","function","platform","url","referrer","memory","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","getPlugins","type","plugins","name","description","screen","availHeight","availWidth","height","pixelDepth","orientation","angle","devicePixelRatio","outerWidth","outerHeight","getCpuClass","getOsCpu","oscpu","HTMLElement","prototype","addBehavior","enumerateDevices","kind","label","groupId","OfflineAudioContext","webkitOfflineAudioContext","createOscillator","triangle","frequency","createDynamicsCompressor","knee","ratio","release","connect","destination","start","renderedBuffer","startRendering","getChannelData","subarray","getHash","threshold","attack","createAnalyser","disconnect","frequencyBinCount","getFloatFrequencyData","call","fftSize","getFloatTimeDomainData","reduction","abs","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","AvantGarde Bk BT","BankGothic Md BT","Calibri","Century","Century Gothic","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Outlook","MS Reference Specialty","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Minion Pro","Monotype Corsiva","PMingLiU","SCRIPTINA","Segoe UI Light","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","ZWAdobeF","createElement","style","visibility","hidden","span","top","left","fontSize","10px","textContent","appendChild","map","some","offsetWidth","offsetHeight","body","removeChild","language","DateTimeFormat","resolvedOptions","timeZone","vendor","getBuildID","buildID","width","textBaseline","alphabetic","fillStyle","#f60","#069","font",'11pt "Times New Roman"',"fillText","rgba(102, 204, 0, 0.2)","18pt Arial","globalCompositeOperation","multiply","#f2f","#2ff","arc","fill","#f9c","toDataURL","rect","getContext","charging","chargingTime","dischargingTime","level","brave","isBrave","canvas","webgl","webgl-experimental","getExtension","WEBGL_debug_renderer_info","getParameter","UNMASKED_RENDERER_WEBGL","getCodesTests","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getPublicData","isMobile","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","storageManager","configManager","cryptoBinding","calculate","getConfValue","dataPointsExtractor","lastDeviceData","now","getDeviceData","getItemLocalStorageSafe","dataPoints","getBattery","getBrave","getCanvasFingerprint","getConnection","getCryptoRandomValues","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getIndexedDB","getLanguages","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getOpenDatabase","getWindowOrientation","getPlatform","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprintExtended","getFonts","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getWebGlRenderer","getWindowOuter","webRTCDisabled","getCryptoBindingData","bind","getNavigatorPermissionsState","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","windowConstructorAliasTest","CDPRuntimeDomainTest","Error","Object","console","debug","windowDocumentAuxVarsTest","getOwnPropertyNames","document","$chrome_asyncScriptInfo","values","value","cache_","getPrototypeOf","storeItem","retrieveItem","isNodeReachable_","sort","Promise","Symbol","token","getAsyncToken","startPromisesLoop","entries","includes","warn"];yn=En,wn=295,function(e){for(;--e;)yn.push(yn.shift())}(++wn);var kn=function(e,t){return En[e-=0]};const An=kn("0x0"),Cn=kn("0x1"),Dn=e=>e?[...e][kn("0x2")](((e,t)=>e+Math.abs(t)),0):0;class Sn{constructor(e,t,i){this[kn("0x3")]=e,this[kn("0x4")]=t,this[kn("0x5")]=i}async[kn("0x6")](){const e=this[kn("0x4")][kn("0x7")](An,[]),t=this[kn("0x4")][kn("0x7")](Cn,36e5),i=await new Tn(e,this[kn("0x5")])[kn("0x8")]();return this[kn("0x9")]=i,this[kn("0x3")].setItemLocalStorageSafe(Cn,Date[kn("0xa")]()+t),i}async[kn("0xb")](){return Number(this[kn("0x3")][kn("0xc")](Cn))<Date.now()||!this.lastDeviceData?await this.calculate():this[kn("0x9")]}}class Tn{constructor(e,t){this[kn("0x0")]=e,this[kn("0x5")]=t,this[kn("0xd")]={battery:this[kn("0xe")],brave:this[kn("0xf")],canvas:this[kn("0x10")],codecs:this.getCodesTests,connection:this[kn("0x11")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this[kn("0x12")],deviceMemory:this[kn("0x13")],documentBasedKeys:this[kn("0x14")],hardwareConcurrency:this[kn("0x15")],indexedDB:this[kn("0x16")],fidoEnabled:this.getFIDOEnabled,languages:this[kn("0x17")],language:this[kn("0x18")],timezoneOffset:this[kn("0x19")],localStorage:this[kn("0x1a")],navigatorBasedKeys:this[kn("0x1b")],navigatorProduct:this[kn("0x1c")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[kn("0x1d")],navigatorHighEntropyData:this[kn("0x1e")],navigatorStorageEstimation:this[kn("0x1f")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[kn("0x20")],math:this[kn("0x21")],mediaMatch:this.getMediaMatch,openDatabase:this[kn("0x22")],windowOrientation:this[kn("0x23")],platform:this[kn("0x24")],cpuClass:this.getCpuClass,osClass:this.getOsCpu,addBehavior:this[kn("0x25")],productSub:this[kn("0x26")],mediaDevices:this[kn("0x27")],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this[kn("0x28")],fonts:this[kn("0x29")],performanceTiming:this.getPerformanceTiming,performanceMemory:this[kn("0x2a")],plugins:this.getPlugins,screen:this[kn("0x2b")],sequentum:this[kn("0x2c")],sessionStorage:this.getSessionStorage,referrer:this[kn("0x2d")],timezone:this[kn("0x2e")],touchSupport:this[kn("0x2f")],vendor:this[kn("0x30")],buildID:this.getBuildID,webdriver:this.getWebDriver,webGlRenderer:this[kn("0x31")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[kn("0x32")],webRTCDisabled:this[kn("0x33")],cryptoBindingData:this[kn("0x34")][kn("0x35")](this),notificationState:this[kn("0x36")].bind(this,"notifications"),geolocationState:this.getNavigatorPermissionsState[kn("0x35")](this,kn("0x37")),isGeoLocationExists:this[kn("0x38")],isSendBeaconExists:this[kn("0x39")],navigatorPrototype:this[kn("0x3a")],installedRelatedApps:this[kn("0x3b")],windowConstructorAliasTest:this[kn("0x3c")],windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[kn("0x3d")]}}[kn("0x3d")](){let e=!1;const t=new(window[kn("0x3e")]);return window[kn("0x3f")].defineProperty(t,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[kn("0x40")][kn("0x41")](t.stack),e}[kn("0x42")](){for(const e of window[kn("0x3f")][kn("0x43")](window[kn("0x44")]))if(e==kn("0x45")||/^\$cdc_[a-zA-Z0-9]{22}_$/.test(e))return!0;for(const e of window[kn("0x3f")][kn("0x46")](window.Object.getOwnPropertyDescriptors(window[kn("0x44")]))){if(!e[kn("0x47")]||void 0===e[kn("0x47")][kn("0x48")])continue;const t=window.Object[kn("0x43")](window[kn("0x3f")][kn("0x49")](e[kn("0x47")])),i=[kn("0x4a"),kn("0x4b"),kn("0x4c")];if(t[kn("0x4d")](),i[kn("0x4d")](),t.every(((e,t)=>e==i[t])))return!0}return!1}[kn("0x3c")](){const e=window[kn("0x3f")].getOwnPropertyNames(window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/.test(t))return!0;for(const e of[window.Array,window[kn("0x4e")],window[kn("0x4f")]])if(t!=(null==e?void 0:e.name)&&t!=kn("0x50")&&t!=kn("0x51")&&window[t]===e)return!0}return!1}async[kn("0x8")](){const e=this.startPromisesLoop();return await this.collectPromisesData(e)}[kn("0x52")](){const e={};for(const[t,i]of Object[kn("0x53")](this[kn("0xd")]))if(!this.sdkDeviceDataCollectionIgnoreList[kn("0x54")](t))try{e[t]=bn(i,100)}catch(i){yi[kn("0x55")](kn("0x56"),{e:i,key:t}),e[t]=Promise[kn("0x57")]()}return e}async[kn("0x58")](e){const t={};for(const[i,n]of Object[kn("0x53")](e))try{t[i]=await n}catch(e){yi[kn("0x55")](kn("0x59"),{e:e,key:i}),t[i]=void 0}return t}[kn("0x5a")](){const e=navigator.cookieEnabled;return Promise[kn("0x57")](e)}async[kn("0x5b")](){return!!navigator[kn("0x5c")]&&await window[kn("0x5d")].isUserVerifyingPlatformAuthenticatorAvailable()}[kn("0x12")](){const e=window[kn("0x5e")][kn("0x5f")](new Uint8Array(16));return Array[kn("0x60")](e)}[kn("0x33")](){const e=null==window[kn("0x61")];return Promise[kn("0x57")](e)}[kn("0x62")](){const e=[kn("0x63"),kn("0x64"),kn("0x65"),"__gCrWeb",kn("0x66"),kn("0x67"),kn("0x68"),"__firefox__",kn("0x69"),kn("0x6a"),"oprt",kn("0x6b"),kn("0x6c"),kn("0x6d"),kn("0x6e"),kn("0x6f"),"__phantomas",kn("0x70"),kn("0x71"),kn("0x72"),kn("0x73"),kn("0x74"),kn("0x75"),kn("0x76"),kn("0x77"),"calledSelenium",kn("0x78"),kn("0x79"),kn("0x7a"),kn("0x7b"),kn("0x7c"),kn("0x7d"),"__fxdriver_unwrapped",kn("0x7e"),kn("0x7f"),kn("0x80"),kn("0x81"),kn("0x82"),kn("0x83"),kn("0x84"),kn("0x85"),kn("0x86"),kn("0x87"),kn("0x88"),"__webdriverFuncgeb",kn("0x89"),"calledPhantom",kn("0x8a"),kn("0x8b"),"cdc_adoQpoasnfa76pfcZLmcfl_Symbol",kn("0x8c"),"fmget_targets","geb",kn("0x8d"),kn("0x8e"),kn("0x8f"),kn("0x90")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[kn("0x91")](i)}return Promise[kn("0x57")](t)}[kn("0x92")](){const e={"dynamic-range":["high",kn("0x93")],"prefers-reduced-motion":[kn("0x94"),kn("0x2")],"prefers-contrast":[kn("0x94"),kn("0x95"),kn("0x96"),kn("0x97"),kn("0x98"),kn("0x99")],"max-monochrome":["0","10",kn("0x9a"),"1000"],"forced-colors":[kn("0x9b"),kn("0x9c")],"inverted-colors":[kn("0x9d"),kn("0x9c")],"color-gamut":[kn("0x9e"),"p3","srgb"]},t={};for(const[i,n]of Object[kn("0x53")](e))for(const e of n)t[i[kn("0x9f")](/-/g,"_")+"_"+e[kn("0x9f")](/-/g,"_")]=window[kn("0xa0")]("("+i+": "+e+")")[kn("0xa1")];return Promise[kn("0x57")](t)}getMathFingerprint(){const e=[Math[kn("0xa5")](.12312423423423424),Math[kn("0xa6")](1e308),(t=1e154,Math[kn("0xa2")](t+Math[kn("0xa3")](t*t-1))),Math[kn("0xa7")](.12312423423423424),Math[kn("0xa8")](1),Math[kn("0xa2")](1+Math[kn("0xa3")](2)),Math[kn("0xa9")](.5),Math[kn("0xa2")](3)/2,Math[kn("0xaa")](.5),Math.sin(-1e300),Math[kn("0xab")](1),Math[kn("0xa4")](1)-1/Math[kn("0xa4")](1)/2,Math[kn("0xac")](10.000000000123),Math[kn("0xad")](1),(Math[kn("0xa4")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math.tanh(1),(Math[kn("0xa4")](2)-1)/(Math[kn("0xa4")](2)+1),Math[kn("0xa4")](1),Math[kn("0xae")](1),Math[kn("0xa4")](1)-1,Math[kn("0xaf")](10),Math[kn("0xa2")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e[kn("0xb0")];t++)i+=e[t].toString();return Promise[kn("0x57")](Tn[kn("0xb1")](i))}[kn("0x11")](){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:n,saveData:r}=e;return{downlink:t,effectiveType:i,rtt:n,saveData:r}})(e);return Promise[kn("0x57")](t)}[kn("0xb2")](){return Promise[kn("0x57")](!!window[kn("0xb3")])}[kn("0x1a")](){return Promise[kn("0x57")](!!window[kn("0xb4")])}[kn("0x2c")](){return-1!==window[kn("0xb5")][kn("0xb6")]()[kn("0xb7")](kn("0xb8"))}[kn("0x1b")](){return[kn("0xb9"),kn("0x7b"),kn("0x84"),kn("0x81"),kn("0x7d"),kn("0x7c"),"__webdriver_unwrapped",kn("0x82"),kn("0xba"),kn("0x79"),kn("0x77"),kn("0xbb"),kn("0xbc"),kn("0xbd"),"driver-evaluate",kn("0xbe"),kn("0xbf"),kn("0xc0"),kn("0xc1"),kn("0xc2"),"__webdriver_script_fn","__$webdriverAsyncExecutor",kn("0x7e"),"__lastWatirConfirm","__lastWatirPrompt",kn("0x45"),kn("0xc3"),kn("0xc4")][kn("0xc5")]((e=>navigator[e]))}[kn("0x1c")](){const e=navigator[kn("0xc6")];return Promise.resolve(e)}getNavigatorUserAgent(){return navigator[kn("0xc7")]}[kn("0x1d")](){return navigator[kn("0xc8")]}getNavigatorHighEntropyData(){return vn()}[kn("0x1f")](){return navigator[kn("0xc9")][kn("0xca")]()}[kn("0xcb")](){return navigator.onLine}[kn("0x20")](){return navigator[kn("0xcc")][kn("0xcd")]}async[kn("0x36")](e){try{const t=await navigator[kn("0xce")].query({name:e});return null==t?void 0:t[kn("0xcf")]}catch(e){}}[kn("0x38")](){return!!navigator.geolocation}[kn("0x39")](){return"function"==typeof navigator[kn("0xd0")]}[kn("0x3a")](){return{hardwareConcurrency:Object[kn("0xd1")](Object.getPrototypeOf(navigator),kn("0xd2")).get[kn("0xb6")](),languages:Object[kn("0xd1")](Object.getPrototypeOf(navigator),kn("0xd3"))[kn("0xd4")][kn("0xb6")]()}}async[kn("0x3b")](){if(typeof navigator[kn("0x3b")]===kn("0xd5"))try{const{related_applications:e}=await navigator[kn("0x3b")]();if(e&&Array.isArray(e))return e.map((e=>({platform:e[kn("0xd6")],url:e[kn("0xd7")]})))}catch(e){}}[kn("0x2d")](){return document[kn("0xd8")]}getPerformanceTiming(){return performance.timing}[kn("0x2a")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance[kn("0xd9")];return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[kn("0x16")](){return Promise[kn("0x57")](!!window[kn("0xda")])}getOpenDatabase(){const{openDatabase:e}=window;return Promise.resolve(!!e)}[kn("0x2f")](){const e=window[kn("0xdb")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[kn("0xdc")]||navigator[kn("0xdd")]||0,documentTouch:e,ontouchstart:"ontouchstart"in window};return Promise[kn("0x57")](t)}[kn("0xde")](){function e(e){const t=[];for(let i=0;i<e[kn("0xb0")];++i)t[kn("0x91")]({type:e[i][kn("0xdf")],suffixes:e[i].suffixes});return t}const t=[];for(let i=0;i<navigator.plugins[kn("0xb0")];++i){const n=navigator[kn("0xe0")][i];n&&t[kn("0x91")]({name:n[kn("0xe1")],description:n[kn("0xe2")],mimeTypes:e(n)})}return Promise[kn("0x57")](t)}[kn("0x2b")](){const e=window[kn("0xe3")]||screen,{availLeft:t}=e,{availTop:i}=e,n={availHeight:e[kn("0xe4")],availLeft:t,availTop:i,availWidth:e[kn("0xe5")],colorDepth:e.colorDepth,height:e[kn("0xe6")],width:e.width,pixelDepth:e[kn("0xe7")],orientationAngle:e[kn("0xe8")]&&e[kn("0xe8")][kn("0xe9")],orientationType:e[kn("0xe8")]&&e[kn("0xe8")].type,devicePixelRatio:window[kn("0xea")]};return Promise[kn("0x57")](n)}static[kn("0xb1")](e){if(null==e)return;let t=0,i=0;const n=e[kn("0xb0")];for(;i<n;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}[kn("0x32")](){const e={outerWidth:window[kn("0xeb")],outerHeight:window[kn("0xec")]};return Promise[kn("0x57")](e)}getWebDriver(){const e=navigator[kn("0xb9")];return Promise[kn("0x57")](e)}[kn("0x23")](){const e=window[kn("0xe8")];return Promise[kn("0x57")](e)}[kn("0x24")](){const e=navigator[kn("0xd6")];return Promise[kn("0x57")](e)}[kn("0xed")](){const e=navigator.cpuClass;return Promise[kn("0x57")](e)}[kn("0xee")](){const e=navigator[kn("0xef")];return Promise[kn("0x57")](e)}[kn("0x25")](){const e=!!window[kn("0xf0")][kn("0xf1")][kn("0xf2")];return Promise[kn("0x57")](e)}getProductSub(){const e=navigator.productSub;return Promise.resolve(e)}async getMediaDevices(){const e=await navigator.mediaDevices[kn("0xf3")](),t=[];for(const i of e)t.push({kind:i[kn("0xf4")],label:i[kn("0xf5")],deviceId:i.deviceId,groupId:i[kn("0xf6")]});return t}async getAudioFingerprint(){const e=window[kn("0xf7")]||window[kn("0xf8")];if(!e)return-1;const t=new e(1,5e3,44100),i=t[kn("0xf9")]();i[kn("0xdf")]=kn("0xfa"),i[kn("0xfb")][kn("0x47")]=1e4;const n=t[kn("0xfc")]();n.threshold.value=-50,n[kn("0xfd")].value=40,n[kn("0xfe")][kn("0x47")]=12,n.attack[kn("0x47")]=0,n[kn("0xff")][kn("0x47")]=.25,i[kn("0x100")](n),n[kn("0x100")](t[kn("0x101")]),i[kn("0x102")](0);const r=new Promise((async(e,i)=>{t.oncomplete=t=>e(t[kn("0x103")]);try{await t[kn("0x104")]()}catch(e){i(e)}})),a=(await r)[kn("0x105")](0)[kn("0x106")](4500);return Tn[kn("0x107")](a)}async[kn("0x28")](){var e;const t=window[kn("0xf7")]||window[kn("0xf8")];if(!t)return{};const i=new t(1,5e3,44100),n=i[kn("0xf9")]();n[kn("0xdf")]="triangle",n[kn("0xfb")][kn("0x47")]=1e4;const r=i[kn("0xfc")]();r[kn("0x108")][kn("0x47")]=-50,r[kn("0xfd")][kn("0x47")]=40,r[kn("0x109")][kn("0x47")]=0;const a=i[kn("0x10a")]();n[kn("0x100")](r),r[kn("0x100")](a),r[kn("0x100")](i[kn("0x101")]),n[kn("0x102")](0);try{await i[kn("0x104")](),r[kn("0x10b")](),n[kn("0x10b")]();const t=new Float32Array(a[kn("0x10c")]);null===(e=a[kn("0x10d")])||void 0===e||e[kn("0x10e")](a,t);const o=new Float32Array(a[kn("0x10f")]);return kn("0x110")in a&&a[kn("0x110")](o),{gain:r[kn("0x111")][kn("0x47")]||r[kn("0x111")],freq:Dn(t),time:Dn(o)}}catch(e){return{}}}static[kn("0x107")](e){let t=0;for(let i=0;i<e.length;++i)t+=Math[kn("0x112")](e[i]);return t}[kn("0x29")](){const e=[kn("0x113"),kn("0x114"),kn("0x115")],t=[kn("0x116"),kn("0x117"),kn("0x118"),"Arabic Typesetting","Arial Unicode MS",kn("0x119"),kn("0x11a"),"Batang","Bitstream Vera Sans Mono",kn("0x11b"),kn("0x11c"),kn("0x11d"),"Clarendon",kn("0x11e"),kn("0x11f"),kn("0x120"),kn("0x121"),kn("0x122"),"Gill Sans",kn("0x123"),kn("0x124"),kn("0x125"),kn("0x126"),"Leelawadee","Letter Gothic",kn("0x127"),kn("0x128"),kn("0x129"),"Menlo",kn("0x12a"),kn("0x12b"),kn("0x12c"),"MS UI Gothic",kn("0x12d"),kn("0x12e"),kn("0x12f"),kn("0x130"),"Microsoft Uighur",kn("0x131"),kn("0x132"),kn("0x133"),"Pristina",kn("0x134"),kn("0x135"),"Serifa","SimHei",kn("0x136"),kn("0x137"),kn("0x138"),kn("0x139"),"Vrinda",kn("0x13a")],i=document[kn("0x13b")]("div");i[kn("0x13c")][kn("0x13d")]=kn("0x13e");const n={},r={},a=e=>{const t=document[kn("0x13b")](kn("0x13f")),{style:n}=t;return n.position="absolute",n[kn("0x140")]="0",n[kn("0x141")]="0",n.fontFamily=e,n[kn("0x142")]=kn("0x143"),t[kn("0x144")]="mmMwWLliI0O&1",i[kn("0x145")](t),t},o=(e,t)=>a("'"+e+"',"+t),s=e[kn("0x146")](a),l=(()=>{const i={};for(const n of t)i[n]=e[kn("0x146")]((e=>o(n,e)));return i})();document.body[kn("0x145")](i);try{for(let t=0;t<e[kn("0xb0")];t++)n[e[t]]=s[t][kn("0x148")],r[e[t]]=s[t][kn("0x149")];const i=t.filter((t=>{return i=l[t],e[kn("0x147")](((e,t)=>i[t].offsetWidth!==n[e]||i[t].offsetHeight!==r[e]));var i}));return Promise[kn("0x57")](i)}finally{document[kn("0x14a")][kn("0x14b")](i)}}getTimezoneOffset(){const e=(new Date)[kn("0x19")]();return Promise[kn("0x57")](e)}[kn("0x18")](){const e=navigator[kn("0x14c")];return Promise[kn("0x57")](e)}[kn("0x17")](){const e=navigator[kn("0xd3")];return Promise[kn("0x57")](e)}[kn("0x15")](){const e=navigator[kn("0xd2")];return Promise[kn("0x57")](e)}[kn("0x13")](){const e=navigator.deviceMemory;return Promise.resolve(e)}[kn("0x14")](){return[kn("0x84"),kn("0x81"),kn("0x87"),kn("0x86"),kn("0x85"),kn("0x7d"),kn("0x7c"),"__webdriver_unwrapped",kn("0x7b"),"__selenium_unwrapped",kn("0xba")][kn("0xc5")]((e=>document[e]))}[kn("0x2e")](){const e=Intl[kn("0x14d")]()[kn("0x14e")]()[kn("0x14f")];return Promise.resolve(e)}[kn("0x30")](){const e=navigator[kn("0x150")];return Promise.resolve(e)}[kn("0x151")](){const e=navigator[kn("0x152")];return Promise[kn("0x57")](e)}async[kn("0x10")](){const e=document[kn("0x13b")]("canvas");e.width=1,e[kn("0xe6")]=1;const t=e[kn("0x167")]("2d"),i={winding:function(e){return e[kn("0x166")](0,0,10,10),e[kn("0x166")](2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(t),geometry:function(e,t){e[kn("0x153")]=122,e[kn("0xe6")]=110,t[kn("0x15e")]=kn("0x15f");const i=[[kn("0x160"),40,40],[kn("0x161"),80,40],["#ff2",60,80]];for(const[e,n,r]of i)t[kn("0x156")]=e,t.beginPath(),t[kn("0x162")](n,r,40,0,2*Math.PI,!0),t.closePath(),t[kn("0x163")]();return t[kn("0x156")]=kn("0x164"),t[kn("0x162")](60,60,60,0,2*Math.PI,!0),t[kn("0x162")](60,60,20,0,2*Math.PI,!0),t[kn("0x163")]("evenodd"),Tn[kn("0xb1")](e[kn("0x165")]())}(e,t),text:function(e,t){e[kn("0x153")]=240,e.height=60,t[kn("0x154")]=kn("0x155"),t[kn("0x156")]=kn("0x157"),t.fillRect(100,1,62,20),t[kn("0x156")]=kn("0x158"),t[kn("0x159")]=kn("0x15a");const i="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return t[kn("0x15b")](i,2,15),t.fillStyle=kn("0x15c"),t[kn("0x159")]=kn("0x15d"),t.fillText(i,4,45),Tn[kn("0xb1")](e.toDataURL())}(e,t)};return Promise[kn("0x57")](i)}async getBattery(){const e=await navigator[kn("0xe")]();return{charging:e[kn("0x168")],chargingTime:e[kn("0x169")],dischargingTime:e[kn("0x16a")],level:e[kn("0x16b")]}}async[kn("0xf")](){return!!navigator[kn("0x16c")]&&await navigator[kn("0x16c")][kn("0x16d")]()}async[kn("0x31")](){const e=document[kn("0x13b")](kn("0x16e")),t=e[kn("0x167")](kn("0x16f"))||e.getContext(kn("0x170")),i=t[kn("0x171")](kn("0x172"));return Promise[kn("0x57")](t[kn("0x173")](i[kn("0x174")]))}async[kn("0x175")](){const e=document[kn("0x13b")](kn("0x176")),t={basic:""===e[kn("0x177")](kn("0x178")),advanced:""===e[kn("0x177")](kn("0x179"))};return Promise.resolve(t)}async[kn("0x34")](){const{publicKey:e,keyIdentifier:t}=await this.cryptoBinding[kn("0x17a")]();return{publicKey:e,keyIdentifier:t}}static[kn("0x17b")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[kn("0xc7")])||null!=window[kn("0xe8")]||window[kn("0xa0")](kn("0x17c"))[kn("0xa1")]}}var In,Mn,Rn=["uncompressed","ALLOW","CHALLENGE","DENY","TRUST","compress","compressed"];In=Rn,Mn=271,function(e){for(;--e;)In.push(In.shift())}(++Mn);var Bn,Fn,zn,On,Pn=function(e,t){return Rn[e-=0]};(Fn=Bn||(Bn={}))[Pn("0x0")]=Pn("0x1"),Fn[Pn("0x2")]=Pn("0x2"),(On=zn||(zn={}))[Pn("0x3")]=Pn("0x3"),On.CHALLENGE=Pn("0x4"),On[Pn("0x5")]="DENY",On[Pn("0x6")]=Pn("0x6");var Nn,Ln,Un=["parse","SHA-256","crypto is not supported","generateSymKey","subtle","generateKey","AES-GCM","encrypt","decrypt","encryptPayload","string","encode","crypto","arrayBufferToBase64","encryptSymKeyBundle","exportKey","raw","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey"];Nn=Un,Ln=483,function(e){for(;--e;)Nn.push(Nn.shift())}(++Ln);var jn=function(e,t){return Un[e-=0]};class qn{constructor(e){this.configManager=e}[jn("0x0")](){return window.crypto[jn("0x1")][jn("0x2")]({name:jn("0x3"),length:256},!0,[jn("0x4"),jn("0x5")])}async[jn("0x6")](e,t){const i=typeof e===jn("0x7")?(new TextEncoder)[jn("0x8")](e):e,n=window.crypto.getRandomValues(new Uint8Array(12)),r={name:jn("0x3"),iv:n},a=await window[jn("0x9")].subtle.encrypt(r,t,i);return{payloadCipherText:this[jn("0xa")](a),iv:n}}async[jn("0xb")](e,t,i){const n=await window[jn("0x9")].subtle[jn("0xc")](jn("0xd"),e),r=this[jn("0xa")](n),a=this[jn("0xa")](t),o=(new TextEncoder)[jn("0x8")](JSON[jn("0xe")]({symKey:r,iv:a})),s=await window[jn("0x9")][jn("0x1")][jn("0x4")]({name:jn("0xf")},i,o);return this[jn("0xa")](s)}[jn("0xa")](e){let t="";const i=new Uint8Array(e),n=i[jn("0x10")];for(let e=0;e<n;e++)t+=String[jn("0x11")](i[e]);return window[jn("0x12")](t)}[jn("0x13")](e){return window[jn("0x9")][jn("0x1")][jn("0x14")]("jwk",JSON[jn("0x15")](e),{name:jn("0xf"),hash:jn("0x16")},!0,["encrypt"])}async[jn("0x4")](e,t){if(!window[jn("0x9")]||!window[jn("0x9")][jn("0x1")])throw new Error(jn("0x17"));const i=await this[jn("0x0")](),{payloadCipherText:n,iv:r}=await this.encryptPayload(t,i),a=await this[jn("0x13")](e);return{encryptedData:n,encryptedKey:await this[jn("0xb")](i,r,a)}}}var Kn,$n,Vn=["error","name","toString","SDKError: ",", errorSpace: ","toLog","CLIENT","SERVER","server","COMMUNICATION","communication","errorSpace","errorCode","message"];Kn=Vn,$n=468,function(e){for(;--e;)Kn.push(Kn.shift())}(++$n);var Hn,Gn,Zn=function(e,t){return Vn[e-=0]};(Gn=Hn||(Hn={}))[Zn("0x0")]="client",Gn[Zn("0x1")]=Zn("0x2"),Gn[Zn("0x3")]=Zn("0x4");class Yn extends Error{constructor(e,t,i){var n,r;super(),this.error=e,this[Zn("0x5")]=t,this[Zn("0x6")]=i,this[Zn("0x7")]=(null===(n=this[Zn("0x8")])||void 0===n?void 0:n.message)||this[Zn("0x8")].toString(),this[Zn("0x9")]=(null===(r=this[Zn("0x8")])||void 0===r?void 0:r.name)||Yn[Zn("0x9")]}[Zn("0xa")](){return Zn("0xb")+this.message+(this[Zn("0x5")]?Zn("0xc")+this[Zn("0x5")]:"")+(this[Zn("0x6")]?", errorCode: "+this[Zn("0x6")]:"")}[Zn("0xd")](){return u(u({name:this[Zn("0x9")],message:this[Zn("0x7")]},this[Zn("0x5")]&&{errorSpace:this.errorSpace}),this[Zn("0x6")]&&{errorCode:this[Zn("0x6")]})}}var Wn,Jn,Xn=["identityManager","getTabId","timestamp","includes","type","addEventToLocalStorage","push","length","flushTimeoutHandle","flush","Error while emitting event","getClientId","errorCode","toLog","min","catch","Error while emitting event (delayed flush)","refreshSessionToken","sendDeviceDataEvent","Failed to refresh data","isTokenExpired","error","Failed to polling data","enrichUADataIfDoesNotExist","navigatorHighEntropyData","popAllEvents","pop","sort","clientId","deviceId","userId","getUserId","sdkPlatform","events","keyIdentifier","warn","sessionToken","buildEncryptedRequestBody","getRotationData","data","signature","postData","device/events","headers","find","value","setDeviceId","setUserId","cleanLocalStorageEvents","COMMUNICATION","stringify","uncompressed","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","shouldSendDeviceEvent","now","info","no need to send device event","getDeviceData","emitEvent","getDeviceId","page_load","referrer","history","extractWindowRespurces","performance","getEntriesByType","resources","isArray","map","name","initiatorType","registerEventListeners","fetchEventsFromLocalStorage","parse","removeItemLocalStorageSafe","ddls","rei","mouseEventsCollectionBuffer","bufferSize","bufferInterval","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","configManager","storageManager","requestsManager","cryptoBinding","serverPath","enableSessionToken","safeEventCallback","EVENT_TYPE_INTERACTION","eventsQueue","crypto","interactionEventsManager","getConfValue","isMobile","eventTypesToStore","maxEventStored","pollingInterval","pollingSessionToken","index","location","toString","platform","sdkVersion","tabId"];Wn=Xn,Jn=410,function(e){for(;--e;)Wn.push(Wn.shift())}(++Jn);var Qn=function(e,t){return Xn[e-=0]};const er=Qn("0x0"),tr="lastDeviceInDeviceEvent",ir=Qn("0x1"),nr="lse",rr=Qn("0x2"),ar="deviceEventDataCollectionIgnoreList",or=Qn("0x3"),sr=Qn("0x4"),lr=[Ri.EVENT_TYPE_ACTION,Ri[Qn("0x5")]],ur=Qn("0x6");class cr{constructor(e,t,i,n,r,a,o,s){this[Qn("0x7")]=e,this[Qn("0x8")]=t,this.deviceDataManager=i,this[Qn("0x9")]=n,this.identityManager=r,this[Qn("0xa")]=a,this[Qn("0xb")]=o,this[Qn("0xc")]=s,this.eventIndex=null,this.flushTimeoutHandle=null,this[Qn("0xd")]=async(e,t)=>{try{const i=u({},u({interaction_type:e},t)),n={type:Ri[Qn("0xe")],attributes:i};return await this.emitEvent(n)}catch(e){}},this.enableSessionToken=s,this[Qn("0xf")]=[],this[Qn("0x10")]=new qn(e),this[Qn("0x11")]=new pn(this.configManager[Qn("0x12")](ar,[]),this[Qn("0x7")][Qn("0x12")](rr,100),this.safeEventCallback),this[Qn("0x13")]=Tn.isMobile(),this[Qn("0x14")]=this[Qn("0x7")][Qn("0x12")](ur,[Ri.EVENT_TYPE_ACTION]),this[Qn("0x15")]=this.configManager[Qn("0x12")]("maxLocalStoredEvents",4),this[Qn("0x16")]=36e4,this[Qn("0x17")]()}async emitEvent(e){e[Qn("0x18")]=this.increaseEventIndex(),e[Qn("0x19")]=location[Qn("0x1a")](),e.platform=navigator[Qn("0x1b")],e[Qn("0x1c")]="1.52.0",e[Qn("0xb")]=this.serverPath,e[Qn("0x1d")]=this[Qn("0x1e")][Qn("0x1f")](),e[Qn("0x20")]=Date.now(),await this.enrichUADataIfDoesNotExist(e);let t=0;this[Qn("0x14")][Qn("0x21")](e[Qn("0x22")])?t=this[Qn("0x23")](e):this[Qn("0xf")][Qn("0x24")](e);const i=this[Qn("0x7")][Qn("0x12")](or,2);if(this.eventsQueue[Qn("0x25")]+t>=i||lr[Qn("0x21")](e[Qn("0x22")])){this[Qn("0x26")]&&(clearTimeout(this.flushTimeoutHandle),this[Qn("0x26")]=null);try{return await this[Qn("0x27")]()}catch(t){throw yi.error(Qn("0x28"),{clientId:this[Qn("0x1e")][Qn("0x29")](),eventType:e[Qn("0x22")],error:t[Qn("0x2a")]?t[Qn("0x2b")]():t}),t}}if(!this.flushTimeoutHandle&&this[Qn("0xf")][Qn("0x25")]>0){const t=this[Qn("0x7")][Qn("0x12")](sr,2),i=Math[Qn("0x2c")](t,30);this.flushTimeoutHandle=setTimeout((()=>{this[Qn("0x26")]=null,this[Qn("0x27")]()[Qn("0x2d")]((t=>{yi.error(Qn("0x2e"),{clientId:this[Qn("0x1e")][Qn("0x29")](),eventType:e[Qn("0x22")],error:t[Qn("0x2a")]?t.toLog():t})}))}),1e3*i)}return{}}async[Qn("0x2f")](){try{return this[Qn("0xf")][Qn("0x25")]>0||await this[Qn("0x30")](!0),await this.flush()}catch(e){yi.error(Qn("0x31"),{e:e})}}async[Qn("0x17")](){try{this[Qn("0x1e")][Qn("0x32")]()&&await this[Qn("0x2f")]()}catch(e){yi[Qn("0x33")](Qn("0x34"),{e:e})}finally{setTimeout((async()=>{await this[Qn("0x17")]()}),this[Qn("0x16")])}}async[Qn("0x35")](e){var t;if(!(null===(t=e.attributes)||void 0===t?void 0:t.navigatorHighEntropyData))try{e.attributes[Qn("0x36")]=await vn()}catch(e){}}[Qn("0x37")](){const e=[],t=this.fetchEventsFromLocalStorage();for(;this.eventsQueue[Qn("0x25")];)e[Qn("0x24")](this[Qn("0xf")][Qn("0x38")]());return(null==t?void 0:t[Qn("0x25")])&&e[Qn("0x24")](...t),e[Qn("0x39")](((e,t)=>e[Qn("0x20")]-t[Qn("0x20")]))}async flush(){const e=this[Qn("0x37")]();if(0===e[Qn("0x25")])return{};const t={};t[Qn("0x3a")]=this[Qn("0x1e")][Qn("0x29")](),t[Qn("0x3b")]=this[Qn("0x1e")].getDeviceId(),t[Qn("0x3c")]=this[Qn("0x1e")][Qn("0x3d")](),t[Qn("0x3e")]=this[Qn("0x13")]?Oi:zi,t[Qn("0x3f")]=e;try{const{keyIdentifier:e}=await this[Qn("0xa")].getPublicData();t[Qn("0x40")]=e}catch(e){yi[Qn("0x41")]("Crypto-binding is not supported. "+e)}this.enableSessionToken&&(t[Qn("0x42")]=!0);const i=await this[Qn("0x43")](t),n=await this[Qn("0xa")][Qn("0x44")]();let r;n&&(r=[{type:"key_rotation_data",data:n[Qn("0x45")],signature:n[Qn("0x46")]}]);const a=await this.requestsManager[Qn("0x47")](Qn("0x48"),u(u({},i),r?{headers:r}:{}));if(a[Qn("0x49")]){const e=a[Qn("0x49")][Qn("0x4a")]((e=>"key_rotation_status"===e[Qn("0x22")]));e&&e[Qn("0x4b")]&&this[Qn("0xa")].handleRotateResponse(e[Qn("0x4b")])}return a[Qn("0x3b")]&&this[Qn("0x1e")][Qn("0x4c")](a.deviceId),a[Qn("0x42")]&&this[Qn("0x1e")].setSessionToken(a[Qn("0x42")]),a[Qn("0x3c")]&&this[Qn("0x1e")][Qn("0x4d")](a[Qn("0x3c")]),this[Qn("0x4e")](),a}async buildEncryptedRequestBody(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this[Qn("0x7")][Qn("0x12")]("publicKey",null);if(null===i&&t)return await this[Qn("0x7")].refreshConf(this[Qn("0x1e")][Qn("0x29")]()),await this[Qn("0x43")](e);if(null===i)throw new Yn(new Error("Encryption error - missing public key"),Hn[Qn("0x4f")]);try{const t=JSON[Qn("0x50")](e),n=this.compressData(t),r=n||t,{encryptedData:a,encryptedKey:o}=await this[Qn("0x10")].encrypt(i,r);return{data:a,key:o,dataType:n?Bn.compress:Bn[Qn("0x51")]}}catch(e){throw new Yn(e,Hn.CLIENT)}}compressData(e){try{return ri(e)}catch(e){yi.error("Failed to compress data, sending the data to the service uncompressed",{clientId:this[Qn("0x1e")][Qn("0x29")](),error:e})}}[Qn("0x52")](){if(null===this[Qn("0x53")]){const e=this[Qn("0x8")][Qn("0x54")](ir),t=Number[Qn("0x55")](e);this[Qn("0x53")]=Number[Qn("0x56")](t)?-1:t}return this[Qn("0x53")]++,this[Qn("0x8")][Qn("0x57")](ir,this.eventIndex[Qn("0x1a")]()),this[Qn("0x53")]}[Qn("0x58")](){const e=this[Qn("0x8")][Qn("0x54")](er),t=this[Qn("0x8")][Qn("0x54")](tr);return!e||!t||Date[Qn("0x59")]()-e>864e5||t!=this[Qn("0x1e")].getDeviceId()}async[Qn("0x30")](e){if(!e&&!this.shouldSendDeviceEvent())return yi[Qn("0x5a")](Qn("0x5b")),!1;const t=await this.deviceDataManager[Qn("0x5c")](),i={type:Ri.EVENT_TYPE_DEVICE,attributes:t},n=await this[Qn("0x5d")](i);return n&&(this.storageManager[Qn("0x57")](er,Date.now()),this[Qn("0x8")][Qn("0x57")](tr,this.identityManager[Qn("0x5e")]())),n}async sendPageLoadEvent(){const e=Qn("0x5f");if(this.configManager.getConfValue(ar,[])[Qn("0x21")](e))return!1;const t=this.extractWindowRespurces();return await this.emitEvent({type:Ri[Qn("0xe")],attributes:u(u({interaction_type:e,location:window[Qn("0x19")].href,referrer:document[Qn("0x60")]},window[Qn("0x61")]&&{window_historyLength:window[Qn("0x61")].length}),t&&{windowResources:t})}),!0}[Qn("0x62")](){try{const e=window[Qn("0x63")][Qn("0x64")](Qn("0x65"));return e&&Array[Qn("0x66")](e)?e[Qn("0x67")]((e=>({name:e[Qn("0x68")],initiatorType:e[Qn("0x69")]}))):void 0}catch(e){}}registerEventListeners(){this.interactionEventsManager[Qn("0x6a")](),this[Qn("0x1e")][Qn("0x6a")]()}[Qn("0x6b")](){const e=this[Qn("0x8")][Qn("0x54")](nr);return e?JSON[Qn("0x6c")](e):[]}[Qn("0x23")](e){const t=this.fetchEventsFromLocalStorage();return ji.maintainLastXItems(t,this[Qn("0x15")],e),this[Qn("0x8")].setItemLocalStorageSafe(nr,JSON.stringify(t)),t[Qn("0x25")]}cleanLocalStorageEvents(){this[Qn("0x8")][Qn("0x6d")](nr)}}var dr,hr,gr=["userId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","random","setSessionToken","getSessionToken","parse","iat","exp","now","rti","rst","userIdStorageExpiry","configManager","setClientId","clientId","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","storageManager","setItemLocalStorageSafe","getItemSessionStorageSafe","getItemLocalStorageSafe","getClientId","getUserId","getConfValue","setUserId"];dr=gr,hr=344,function(e){for(;--e;)dr.push(dr.shift())}(++hr);var pr=function(e,t){return gr[e-=0]};const fr="rui",mr="rdi",xr="rdit",_r=pr("0x0"),vr=pr("0x1"),br=pr("0x2");class yr{constructor(e,t,i){this.storageManager=e,this[pr("0x3")]=t,this.clientId=i,this[pr("0x4")](this[pr("0x5")])}load(){this[pr("0x6")](),this[pr("0x7")]()}[pr("0x8")](){window[pr("0x9")](pr("0xa"),(async()=>this[pr("0xb")]()))}[pr("0xc")](){return this.deviceId}[pr("0xd")](e){this[pr("0xe")]!==e&&(yi[pr("0xf")](pr("0x10"),{deviceId:e}),this[pr("0xe")]=e,this.storageManager[pr("0x11")](mr,e),this[pr("0x12")][pr("0x13")](mr,e))}[pr("0x6")](){const e=this.storageManager[pr("0x14")](mr)||this[pr("0x12")][pr("0x15")](mr);return null!=e&&this[pr("0xd")](e),e}[pr("0x16")](){return this[pr("0x5")]}setClientId(e){this[pr("0x12")][pr("0x16")]()!=e&&this.storageManager[pr("0x4")](e),this[pr("0x12")].setItemSessionStorageSafe("rci",e)}[pr("0x17")](){if(Number(this[pr("0x12")].getItemLocalStorageSafe(xr))+this[pr("0x3")][pr("0x18")](br,864e5)<Date.now())return this.removeUserId(),null;const e=this[pr("0x12")][pr("0x14")](fr);return null!=e?e:this[pr("0x12")][pr("0x15")](fr)}[pr("0x19")](e){this[pr("0x1a")]=e,this.storageManager[pr("0x11")](fr,e),this[pr("0x12")].setItemLocalStorageSafe(fr,e),this[pr("0x12")][pr("0x13")](xr,Date.now())}removeUserId(){this.storageManager[pr("0x1b")](fr),this[pr("0x12")][pr("0x1c")](fr),this[pr("0x12")][pr("0x1c")](xr)}[pr("0x7")](){const e=this.storageManager[pr("0x14")](_r);e?(this[pr("0x12")][pr("0x1b")](_r),this[pr("0x1d")]=e):this[pr("0x1d")]=Math.floor(Math[pr("0x1e")]()*Number.MAX_SAFE_INTEGER).toString()}getTabId(){return this[pr("0x1d")]}[pr("0xb")](){this[pr("0x12")][pr("0x11")](_r,this[pr("0x1d")])}[pr("0x1f")](e){this[pr("0x12")][pr("0x13")](vr,e)}getSessionToken(){return this[pr("0x12")].getItemLocalStorageSafe(vr)||this.storageManager[pr("0x14")](vr)}isTokenExpired(){var e;const t=this[pr("0x20")]();if(!t)return!0;try{const i=JSON[pr("0x21")](atob(t.split(".")[1]));let n=(null!==(e=i.exp)&&void 0!==e?e:i[pr("0x22")])*(i.exp&&i[pr("0x23")]<1e12?1e3:1);return i.exp||(n+=9e5),Date[pr("0x24")]()>=n}catch(e){return yi.error("Invalid JWT:",{error:e}),!0}}}var wr,Er,kr=["stringify","callServer","getData","GET","fetch","fetch-api is not supported","CLIENT","statusText","status","message","COMMUNICATION","serverPath","postData","postDataFromURL","POST","include","application/json"];wr=kr,Er=198,function(e){for(;--e;)wr.push(wr.shift())}(++Er);var Ar=function(e,t){return kr[e-=0]};class Cr{constructor(e){this[Ar("0x0")]=e}async[Ar("0x1")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[Ar("0x2")](this[Ar("0x0")]+e,t,i)}async[Ar("0x2")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:Ar("0x3"),credentials:Ar("0x4"),headers:new Headers(u({"Content-Type":Ar("0x5")},i)),body:JSON[Ar("0x6")](t)};return await this[Ar("0x7")](e,n)}async[Ar("0x8")](e){const t=this[Ar("0x0")]+e,i={method:Ar("0x9"),credentials:Ar("0x4")};return await this[Ar("0x7")](t,i)}async[Ar("0x7")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(Ar("0xa")in window))throw new Yn(new Error(Ar("0xb")),Hn[Ar("0xc")]);try{const i=await fetch(e,t),n=await i.json();if(i.ok)return n;throw new Yn(new Error(n.message||i[Ar("0xd")]),Hn.SERVER,i[Ar("0xe")])}catch(e){if(!(e instanceof Yn))throw new Yn(new Error(e[Ar("0xf")]),Hn[Ar("0x10")]);throw e}}}var Dr,Sr,Tr=["filter","length","Invalid SDK params was provided: ","stringify","REQUIRED_SDK_PARAMS","string","throwOrReturnResult","info","throwError","validateSDKParams","keys"];Dr=Tr,Sr=224,function(e){for(;--e;)Dr.push(Dr.shift())}(++Sr);var Ir=function(e,t){return Tr[e-=0]};class Mr{constructor(){this[Ir("0x0")]={clientId:Ir("0x1")}}[Ir("0x2")](e,t,i){if(!e&&((null==t?void 0:t.logIfInvalid)&&yi[Ir("0x3")](i),null==t?void 0:t[Ir("0x4")]))throw new Error(i);return e}[Ir("0x5")](e,t){const i=Object[Ir("0x6")](this[Ir("0x0")])[Ir("0x7")]((t=>typeof e[t]!=this[Ir("0x0")][t]));return this[Ir("0x2")](0==i[Ir("0x8")],t,Ir("0x9")+JSON[Ir("0xa")](i))}}var Rr,Br,Fr=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","reportLogs","middlewares","push","getConfValue","enableLogsReporting","logsMinimumDelay","logs","length","now","flush","getClientId","floor"];Rr=Fr,Br=363,function(e){for(;--e;)Rr.push(Rr.shift())}(++Br);var zr=function(e,t){return Fr[e-=0]};class Or{constructor(e,t,i){this[zr("0x0")]=e,this[zr("0x1")]=t,this[zr("0x2")]=i,this[zr("0x3")]=0,this[zr("0x4")]=async()=>{try{await this[zr("0x5")]()}catch(e){}},yi[zr("0x6")][zr("0x7")](this[zr("0x4")])}async[zr("0x5")](){if(!this[zr("0x2")][zr("0x8")](zr("0x9"),!1))return;const e=this[zr("0x2")].getConfValue("logsMinimumBatch",6),t=this[zr("0x2")][zr("0x8")](zr("0xa"),12e4);if(yi[zr("0xb")][zr("0xc")]<e||this[zr("0x3")]+t>Date.now())return;this[zr("0x3")]=Date[zr("0xd")]();const i=yi[zr("0xe")](),n=this[zr("0x1")][zr("0xf")](),r=Math[zr("0x10")](Date[zr("0xd")]()/1e3),a={sdkVersion:"1.52.0",platform:navigator[zr("0x11")],clientId:n,timestamp:r,logEntries:i};await this[zr("0x0")][zr("0x12")](zr("0x13"),a)}}var Pr,Nr,Lr=["getClientId","device/migrate-identifiers","postDataFromURL","deviceId","storageManager","rimd","identityManager","migrateIdentifiers","getItemLocalStorageSafe","true","getDeviceId"];Pr=Lr,Nr=258,function(e){for(;--e;)Pr.push(Pr.shift())}(++Nr);var Ur=function(e,t){return Lr[e-=0]};const jr=Ur("0x0");class qr{constructor(e,t,i){this[Ur("0x1")]=e,this.requestsManager=t,this.storageManager=i}async[Ur("0x2")](e){if(this.storageManager[Ur("0x3")](jr)!=Ur("0x4")){const t=this[Ur("0x1")][Ur("0x5")](),i=this[Ur("0x1")][Ur("0x6")](),n=(e.endsWith("/")?e:e+"/")+Ur("0x7"),r=await this.requestsManager[Ur("0x8")](n,{deviceId:t,clientId:i});r.deviceId&&r[Ur("0x9")]==t&&this[Ur("0xa")].setItemLocalStorageSafe(jr,Ur("0x4"))}}}var Kr,$r,Vr=["identityManager","migrationsManager","storageManager","enableSessionToken","logsReporter","getConfValue","isInitialized","Session token is not enabled","now","info","SDK disabled","disabled_sdk_","eventsManager","refreshSessionToken","getSessionToken","init","object","userId","initializationPromise","refreshConf","tenantId","keyRotation","cryptoBinding","crypto","createCryptoBinding","sign","isEnabled","startedAt","deviceDataManager","enabled","sendDeviceDataEvent","catch","sendPageLoadEvent","updateUserId","registerEventListeners","triggerActionEvent","includes","warn","Invalid action type","CLIENT","claimedUserIdType","invalid_claimed_user_id_type_","getDeviceData","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","emitEvent","Unhandled SDK error. recieved eventResponse: ","errorSpace","SERVER","_error_","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","getUserId","setUserId","EVENT_TYPE_IDENTIFICATION","deviceId","removeUserId","setAuthenticatedUser","setUser","unidentifiedUser","RiskID","TSAccountProtection","dispatchEvent","undefined","sdkEnabled","enableIdentifiersMigration","verbose","actions","https://collect.riskid.security/","email","phone_number","ssn","national_id","passport_number","drivers_license_number","other","isSDKDisabled","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","string","clientId","options","serverPath","toString","validateSDKParams","mainEntry","requestsManager","configManager"];Kr=Vr,$r=487,function(e){for(;--e;)Kr.push(Kr.shift())}(++$r);var Hr=function(e,t){return Vr[e-=0]};const Gr=[null,void 0,Hr("0x0"),"",0],Zr=Hr("0x1"),Yr=Hr("0x2"),Wr=Hr("0x3"),Jr=Hr("0x4"),Xr=Hr("0x5"),Qr=[Hr("0x6"),Hr("0x7"),"account_id",Hr("0x8"),Hr("0x9"),Hr("0xa"),Hr("0xb"),Hr("0xc")];class ea{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this.initializationPromise=null,this[Hr("0xd")]=!1,this.enableSessionToken=!1,this[Hr("0xe")]=!1,this[Hr("0xf")]=null,this[Hr("0x10")]=new Mr,ea[Hr("0x11")])throw new Error(Hr("0x12"));ea[Hr("0x11")]=!0;const n=typeof t===Hr("0x13");this[Hr("0x14")]=n?t:e,this[Hr("0x15")]=n?{serverPath:e}:t,(i=this[Hr("0x15")])[Hr("0x16")]||(i[Hr("0x16")]=Xr),this[Hr("0x15")][Hr("0x16")]=new URL(this.options[Hr("0x16")])[Hr("0x17")](),this[Hr("0xf")]=this.options.firstPartyMigrationUrl||null,yi.enabled=!!this[Hr("0x15")].verbose,this[Hr("0x10")][Hr("0x18")](this,{throwError:!0,logIfInvalid:!0})||(this[Hr("0xd")]=!0),this.storageManager=new fi(this[Hr("0x14")]),this[Hr("0x1a")]=new Cr(this.options[Hr("0x16")]),this[Hr("0x1b")]=new Si(this.storageManager,this.requestsManager),this[Hr("0x1c")]=new yr(this.storageManager,this.configManager,this[Hr("0x14")]),this[Hr("0x1c")].load(),this[Hr("0x1d")]=new qr(this[Hr("0x1c")],this[Hr("0x1a")],this[Hr("0x1e")]),this[Hr("0x1f")]=this[Hr("0x15")][Hr("0x1f")]||!1,this[Hr("0x20")]=new Or(this[Hr("0x1a")],this[Hr("0x1c")],this.configManager)}get[Hr("0x4")](){return this[Hr("0x1b")][Hr("0x21")](Jr,[])}async getActions(){return await this[Hr("0x22")](),this[Hr("0x4")]}async getSessionToken(){if(!this[Hr("0x1f")])throw new Error(Hr("0x23"));if(!await this[Hr("0x22")]()){const e=Date[Hr("0x24")]();return yi[Hr("0x25")](Hr("0x26")),{actionToken:Hr("0x27")+e}}return this[Hr("0x1c")].isTokenExpired()&&await this[Hr("0x28")][Hr("0x29")](),this[Hr("0x1c")][Hr("0x2a")]()}async[Hr("0x2b")](e){const t=typeof e!==Hr("0x2c")?e:null==e?void 0:e[Hr("0x2d")];return yi[Hr("0x25")]("sdk init started"),this[Hr("0x2e")]=(async()=>{await this.configManager[Hr("0x2f")](this[Hr("0x1c")].getClientId());const e=this[Hr("0x1b")].getConfValue(Hr("0x30"),null),i=this[Hr("0x1b")][Hr("0x21")](Hr("0x31"),null);return this[Hr("0x32")]=hi[Hr("0x33")][Hr("0x34")](Hr("0x35"),(null==i?void 0:i[Hr("0x36")])?{keyRotation:{isEnabled:!0,expiryDays:i.expiryDays,startedAt:i[Hr("0x37")],tenantId:e}}:void 0),this[Hr("0x38")]=new Sn(this[Hr("0x1e")],this[Hr("0x1b")],this[Hr("0x32")]),this[Hr("0x28")]=new cr(this[Hr("0x1b")],this[Hr("0x1e")],this[Hr("0x38")],this[Hr("0x1a")],this[Hr("0x1c")],this[Hr("0x32")],this.options.serverPath,this[Hr("0x1f")]),this.isSDKDisabled=this[Hr("0xd")]||!this[Hr("0x1b")][Hr("0x21")](Zr,!1),!this[Hr("0xd")]&&(this[Hr("0xe")]=this[Hr("0xe")]||this.configManager.getConfValue(Yr,!1),this[Hr("0xe")]&&this[Hr("0xf")]&&await this[Hr("0x1d")].migrateIdentifiers(this[Hr("0xf")]),yi[Hr("0x39")]=yi[Hr("0x39")]||!!this.configManager[Hr("0x21")](Wr,!1),await this[Hr("0x28")][Hr("0x3a")]()[Hr("0x3b")]((()=>{})),await this[Hr("0x28")][Hr("0x3c")]()[Hr("0x3b")]((()=>{})),await this[Hr("0x3d")](t)[Hr("0x3b")]((()=>{})),this.eventsManager[Hr("0x3e")](),await this.eventsManager.flush()[Hr("0x3b")]((()=>{})),yi.info("sdk init done"),!0)})(),await this[Hr("0x2e")]}async isInitialized(){return null!==this.initializationPromise&&await this[Hr("0x2e")]}async[Hr("0x3f")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Date[Hr("0x24")]();if(!await this[Hr("0x22")]())return yi[Hr("0x25")]("SDK disabled"),{actionToken:Hr("0x27")+i};if(!this[Hr("0x4")][Hr("0x40")](e))return yi[Hr("0x41")](Hr("0x42"),{actionType:e}),{actionToken:Hn[Hr("0x43")]+"_error_'invalid action type - "+e+"'_"+i};const n=null==t?void 0:t[Hr("0x44")];if(n&&!Qr.includes(n))return yi[Hr("0x41")]("Invalid claimedUserIdType",{claimedUserIdType:n}),{actionToken:Hr("0x45")+n+"_"+i};let r;this[Hr("0x1b")].getConfValue("enableDeviceAttributesInActions",!1)&&(r=await this[Hr("0x38")][Hr("0x46")]());const a=u({type:Ri[Hr("0x47")],attributes:u(u(u(u(u(u(u(u(u(u(u(u({action_type:e},(null==t?void 0:t[Hr("0x48")])&&{correlation_id:t[Hr("0x48")]}),(null==t?void 0:t[Hr("0x49")])&&{claimed_user_id:t[Hr("0x49")]}),n&&{claimed_user_id_type:n}),(null==t?void 0:t[Hr("0x4a")])&&{public_key:t[Hr("0x4a")]}),(null==t?void 0:t[Hr("0x4b")])&&{extension_metadata:t.extensionMetadata}),(null==t?void 0:t.extensionDeviceAttributes)&&{extension_device_attributes:t[Hr("0x4c")]}),(null==t?void 0:t[Hr("0x4d")])&&{suspicious_signals:t[Hr("0x4d")]}),(null==t?void 0:t[Hr("0x4e")])&&{suspicious_context:t.suspiciousContext}),(null==t?void 0:t.downloadFile)&&{download_file:t[Hr("0x4f")]}),(null==t?void 0:t.uploadFile)&&{upload_file:t[Hr("0x50")]}),(null==t?void 0:t[Hr("0x51")])&&{transactionData:t.transactionData}),r)},(null==t?void 0:t.customAttributes)&&{customAttributes:t[Hr("0x52")]});try{const e=await this[Hr("0x28")][Hr("0x53")](a),{actionToken:t}=e;if(!t)throw new Yn(new Error(Hr("0x54")+(typeof e==Hr("0x2c")?JSON.stringify(e).slice(15):e)),Hn.CLIENT);return e}catch(t){return{actionToken:t instanceof Yn?t[Hr("0x55")]===Hn[Hr("0x56")]?t[Hr("0x55")]+Hr("0x57")+e+"_"+t.errorCode+"_'"+t[Hr("0x58")]+"'_"+i:t[Hr("0x55")]+Hr("0x57")+e+"_'"+t.message+"'_"+i:Hr("0x59")+e+"_"+i}}}async[Hr("0x5a")](e){return await this[Hr("0x22")]()?this.updateUserId(e):(yi[Hr("0x25")](Hr("0x26")),!1)}async[Hr("0x3d")](e){if(Gr[Hr("0x40")](e))return yi[Hr("0x25")](Hr("0x5b"),{userId:e}),!1;e=e.toString(),yi.info(Hr("0x5a"),{userId:e});const t=this[Hr("0x1c")][Hr("0x5c")]();return t===e||(this.identityManager[Hr("0x5d")](e),!!(await this[Hr("0x28")].emitEvent({type:Ri[Hr("0x5e")],attributes:{previous_user_id:t,user_id:e}}))[Hr("0x5f")])}async unidentifiedUser(){if(!await this[Hr("0x22")]())return yi[Hr("0x25")](Hr("0x26")),!1;const e=this[Hr("0x1c")][Hr("0x5c")]();return null!=e&&this.identityManager[Hr("0x60")](),!!(await this[Hr("0x28")].emitEvent({type:Ri[Hr("0x5e")],attributes:{previous_user_id:e}}))[Hr("0x5f")]}async[Hr("0x61")](e){return await this[Hr("0x5a")](e)}async[Hr("0x62")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[Hr("0x61")](e,t)}async clearUser(){return await this[Hr("0x63")]()}}ea[Hr("0x11")]=!1,document[Hr("0x66")](new CustomEvent("TSAccountProtectionReady"));var ta,ia,na=["events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","not_initialized","tsPlatform not initialized","setUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager","flush"];ta=na,ia=500,function(e){for(;--e;)ta.push(ta.shift())}(++ia);var ra=function(e,t){return na[e-=0]};let aa=null;hi.events.on(hi[ra("0x0")][ra("0x1")],(()=>{const{clientId:e,drs:t}=hi[ra("0x2")][ra("0x3")](),i=t||{},{enabled:n,userId:r}=i,a=h(i,ai);!1!==n&&(aa=new ea(e,a),aa[ra("0x4")]({userId:r}))}));const oa=function(){return function(e){if(!e)throw new(hi[ra("0x5")][ra("0x6")][ra("0x7")])(ra("0x8"),ra("0x9"))}(aa),aa[ra("0xe")]()};class sa extends Error{constructor(e,t,i){super(i),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}const la={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 ua,ca,da,ha;!function(e){var t;(t=e.feedback||(e.feedback={})).OK="ok",t.OTHER="other",t.DOCUMENT_NOT_FOUND="document_not_found",t.FACE_NOT_FOUND="face_not_found",t.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",t.OBSTRUCTED="obstructed",t.BLUR="blur",t.GLARE="glare",t.DOCUMENT_NOT_SUPPORTED="document_not_supported",t.DOCUMENT_NOT_MATCHING="document_not_matching",t.WRONG_DOCUMENT_SIDE="wrong_document_side",t.MULTI_FACE="multi_face",t.FACE_ROTATED="face_rotated",t.FACE_TOO_SMALL="face_too_small",t.FACE_TOO_CLOSE="face_too_close",t.CLOSED_EYES="closed_eyes",t.FACE_ANGLE_TOO_LARGE="face_angle_too_large",t.FACE_CLOSE_TO_BORDER="face_close_to_border",t.FACE_OCCLUDED="face_occluded",t.FACE_CROPPED="face_cropped",t.BARCODE_NOT_FOUND="barcode_not_found",t.GLARE_SELFIE="glare_selfie",t.BLUR_SELFIE="blur_selfie",t.RESTRICTED_CRITERIA="restricted_criteria"}(ua||(ua={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(ca||(ca={})),function(e){var t,i;(t=e.status||(e.status={})).PENDING="pending",t.CAPTURING="capturing",t.PROCESSING="processing",t.RECAPTURE="recapture",t.COMPLETE="complete",t.ERROR="error",t.EXPIRED="expired",(i=e.recapture_reason||(e.recapture_reason={})).IMAGE_MISSING="image_missing",i.DOCUMENT_EXPIRED="document_expired",i.DOCUMENT_NOT_SUPPORTED="document_not_supported",i.DOCUMENT_DAMAGED="document_damaged",i.POOR_IMAGE_QUALITY="poor_image_quality",i.DOCUMENT_NOT_FOUND="document_not_found",i.OBSTRUCTED="obstructed",i.BLUR="blur",i.GLARE="glare",i.DOCUMENT_NOT_MATCHING="document_not_matching",i.WRONG_DOCUMENT_SIDE="wrong_document_side",i.FACE_NOT_FOUND="face_not_found",i.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",i.INVALID_INPUT="invalid_input",i.MULTI_FACE="multi_face",i.FACE_ROTATED="face_rotated",i.FACE_TOO_SMALL="face_too_small",i.FACE_TOO_CLOSE="face_too_close",i.CLOSED_EYES="closed_eyes",i.FACE_ANGLE_TOO_LARGE="face_angle_too_large",i.FACE_CLOSE_TO_BORDER="face_close_to_border",i.FACE_OCCLUDED="face_occluded",i.FACE_CROPPED="face_cropped",i.BARCODE_NOT_FOUND="barcode_not_found",i.GLARE_SELFIE="glare_selfie",i.BLUR_SELFIE="blur_selfie",i.NO_FACE="no_face",i.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(da||(da={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(ha||(ha={}));var ga={},pa={get exports(){return ga},set exports(e){ga=e}};!function(e,t){!function(i,n){var r="function",a="undefined",o="object",s="string",l="major",u="model",c="name",d="type",h="vendor",g="version",p="architecture",f="console",m="mobile",x="tablet",_="smarttv",v="wearable",b="embedded",y="Amazon",w="Apple",E="ASUS",k="BlackBerry",A="Browser",C="Chrome",D="Firefox",S="Google",T="Huawei",I="LG",M="Microsoft",R="Motorola",B="Opera",F="Samsung",z="Sharp",O="Sony",P="Xiaomi",N="Zebra",L="Facebook",U="Chromium OS",j="Mac OS",q=" Browser",K=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},$=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},G=function(e,t){for(var i,a,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],g=t[d+1];for(i=a=0;i<h.length&&!u&&h[i];)if(u=h[i++].exec(e))for(s=0;s<g.length;s++)c=u[++a],typeof(l=g[s])===o&&l.length>0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}},Z=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var r=0;r<t[i].length;r++)if($(t[i][r],e))return"?"===i?n:i}else if($(t[i],e))return"?"===i?n:i;return t.hasOwnProperty("*")?t["*"]:e},Y={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"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,g],[/opios[\/ ]+([\w\.]+)/i],[g,[c,B+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[g,[c,B+" GX"]],[/\bopr\/([\w\.]+)/i],[g,[c,B]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[g,[c,"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],[c,g],[/quark(?:pc)?\/([-\w\.]+)/i],[g,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[g,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[c,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[g,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[g,[c,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+A],g],[/\bfocus\/([\w\.]+)/i],[g,[c,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[c,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[c,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[c,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[g,[c,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360"+q]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],g],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+q],g],[/samsungbrowser\/([\w\.]+)/i],[g,[c,F+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],g],[/metasr[\/ ]?([\d\.]+)/i],[g,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,g],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,L],g],[/(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],[c,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[c,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[g,Z,{"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],[c,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],g],[/(wolvic)\/([\w\.]+)/i],[c,g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[c,D+" 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],[c,[g,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[g,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?: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/,"",V]],[/(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,V]]],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],[u,[h,F],[d,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,w],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,w],[d,x]],[/(macintosh);/i],[u,[h,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,z],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,T],[d,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,T],[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],[[u,/_/g," "],[h,P],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,P],[d,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[d,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[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],[u,[h,R],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,R],[d,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,I],[d,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,I],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[u,[h,S],[d,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,S],[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],[u,[h,O],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,O],[d,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,y],[d,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,y],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,E],[d,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,E],[d,m]],[/(nexus 9)/i],[u,[h,"HTC"],[d,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/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],[u,[h,"TCL"],[d,x]],[/(itel) ((\w+))/i],[[h,V],u,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[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,u,[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,u,[d,x]],[/(surface duo)/i],[u,[h,M],[d,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[u,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,x]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,x]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,x]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,x]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,x]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,x]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,x]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,m]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,x]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,x]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,x]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,x]],[/(sprint) (\w+)/i],[h,u,[d,m]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,M],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,N],[d,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,N],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,_]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,I],[d,_]],[/(apple) ?tv/i],[h,[u,w+" TV"],[d,_]],[/crkey/i],[[u,C+"cast"],[h,S],[d,_]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,y],[d,_]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,z],[d,_]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,O],[d,_]],[/(mitv-\w{5}) bui/i],[u,[h,P],[d,_]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[d,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,H],[u,H],[d,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,f]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,f]],[/(playstation [345portablevi]+)/i],[u,[h,O],[d,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,M],[d,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,F],[d,v]],[/((pebble))app/i],[h,u,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,w],[d,v]],[/droid.+; (glass) \d/i],[u,[h,S],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,N],[d,v]],[/(quest( \d| pro)?)/i],[u,[h,L],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/(aeobc)\b/i],[u,[h,y],[d,b]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[c,"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],[c,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,g],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[g,Z,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,Z,Y],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,j],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,g],[/\(bb(10);/i],[g,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[c,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[g,[c,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,U],g],[/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],[c,g],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,g]]},J=function e(t,f){if(typeof t===o&&(f=t,t=n),!(this instanceof e))return new e(t,f).getResult();var _=typeof i!==a&&i.navigator?i.navigator:n,v=t||(_&&_.userAgent?_.userAgent:""),b=_&&_.userAgentData?_.userAgentData:n,y=f?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(W,f):W,w=_&&_.userAgent==v;return this.getBrowser=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e[g]),w&&_&&_.brave&&typeof _.brave.isBrave==r&&(e[c]="Brave"),e},this.getCPU=function(){var e={};return e[p]=n,G.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,G.call(e,v,y.device),w&&!e[d]&&b&&b.mobile&&(e[d]=m),w&&"Macintosh"==e[u]&&_&&typeof _.standalone!==a&&_.maxTouchPoints&&_.maxTouchPoints>2&&(e[u]="iPad",e[d]=x),e},this.getEngine=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.os),w&&!e[c]&&b&&b.platform&&"Unknown"!=b.platform&&(e[c]=b.platform.replace(/chrome os/i,U).replace(/macos/i,j)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===s&&e.length>500?H(e,500):e,this},this.setUA(v),this};J.VERSION="1.0.39",J.BROWSER=K([c,g,l]),J.CPU=K([p]),J.DEVICE=K([u,h,d,f,m,_,x,v,b]),J.ENGINE=J.OS=K([c,g]),e.exports&&(t=e.exports=J),t.UAParser=J;var X=typeof i!==a&&(i.jQuery||i.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var i in t)X.ua[i]=t[i]}}}("object"==typeof window?window:W)}(pa,ga);const fa="1.4.8",ma=ga.UAParser(),xa=fa;function _a(e,t){var i,n,r,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":xa,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==ma?void 0:ma.os)||void 0===i?void 0:i.name,"ts-os-version":null===(n=null==ma?void 0:ma.os)||void 0===n?void 0:n.version,"ts-device-model":null===(r=null==ma?void 0:ma.device)||void 0===r?void 0:r.model,"ts-manufacturer":null===(a=null==ma?void 0:ma.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==ma?void 0:ma.browser)||void 0===o?void 0:o.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var va="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ba=[],ya=[],wa="undefined"!=typeof Uint8Array?Uint8Array:Array,Ea=!1;function ka(){Ea=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)ba[t]=e[t],ya[e.charCodeAt(t)]=t;ya["-".charCodeAt(0)]=62,ya["_".charCodeAt(0)]=63}function Aa(e,t,i){for(var n,r,a=[],o=t;o<i;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(ba[(r=n)>>18&63]+ba[r>>12&63]+ba[r>>6&63]+ba[63&r]);return a.join("")}function Ca(e){var t;Ea||ka();for(var i=e.length,n=i%3,r="",a=[],o=16383,s=0,l=i-n;s<l;s+=o)a.push(Aa(e,s,s+o>l?l:s+o));return 1===n?(t=e[i-1],r+=ba[t>>2],r+=ba[t<<4&63],r+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],r+=ba[t>>10],r+=ba[t>>4&63],r+=ba[t<<2&63],r+="="),a.push(r),a.join("")}function Da(e,t,i,n,r){var a,o,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=i?r-1:0,h=i?-1:1,g=e[t+d];for(d+=h,a=g&(1<<-c)-1,g>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),a-=u}return(g?-1:1)*o*Math.pow(2,a-n)}function Sa(e,t,i,n,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[i+g]=255&s,g+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[i+g]=255&o,g+=p,o/=256,u-=8);e[i+g-p]|=128*f}var Ta={}.toString,Ia=Array.isArray||function(e){return"[object Array]"==Ta.call(e)};function Ma(){return Ba.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ra(e,t){if(Ma()<t)throw new RangeError("Invalid typed array length");return Ba.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Ba.prototype:(null===e&&(e=new Ba(t)),e.length=t),e}function Ba(e,t,i){if(!(Ba.TYPED_ARRAY_SUPPORT||this instanceof Ba))return new Ba(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Oa(this,e)}return Fa(this,e,t,i)}function Fa(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n);Ba.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Ba.prototype:e=Pa(e,t);return e}(e,t,i,n):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Ba.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ua(t,i);e=Ra(e,n);var r=e.write(t,i);r!==n&&(e=e.slice(0,r));return e}(e,t,i):function(e,t){if(La(t)){var i=0|Na(t.length);return 0===(e=Ra(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Ra(e,0):Pa(e,t);if("Buffer"===t.type&&Ia(t.data))return Pa(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function za(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Oa(e,t){if(za(t),e=Ra(e,t<0?0:0|Na(t)),!Ba.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Pa(e,t){var i=t.length<0?0:0|Na(t.length);e=Ra(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function Na(e){if(e>=Ma())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ma().toString(16)+" bytes");return 0|e}function La(e){return!(null==e||!e._isBuffer)}function Ua(e,t){if(La(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return po(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return fo(e).length;default:if(n)return po(e).length;t=(""+t).toLowerCase(),n=!0}}function ja(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return io(this,t,i);case"utf8":case"utf-8":return Xa(this,t,i);case"ascii":return eo(this,t,i);case"latin1":case"binary":return to(this,t,i);case"base64":return Ja(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function qa(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Ka(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=Ba.from(t,n)),La(t))return 0===t.length?-1:$a(e,t,i,n,r);if("number"==typeof t)return t&=255,Ba.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):$a(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function $a(e,t,i,n,r){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var c=-1;for(a=i;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(u(e,a+h)!==u(t,h)){d=!1;break}if(d)return a}return-1}function Va(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function Ha(e,t,i,n){return mo(po(t,e.length-i),e,i,n)}function Ga(e,t,i,n){return mo(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function Za(e,t,i,n){return Ga(e,t,i,n)}function Ya(e,t,i,n){return mo(fo(t),e,i,n)}function Wa(e,t,i,n){return mo(function(e,t){for(var i,n,r,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,r=i%256,a.push(r),a.push(n);return a}(t,e.length-i),e,i,n)}function Ja(e,t,i){return 0===t&&i===e.length?Ca(e):Ca(e.slice(t,i))}function Xa(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var a,o,s,l,u=e[r],c=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=i)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[r+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[r+1],o=e[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[r+1],o=e[r+2],s=e[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=d}return function(e){var t=e.length;if(t<=Qa)return String.fromCharCode.apply(String,e);var i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=Qa));return i}(n)}Ba.TYPED_ARRAY_SUPPORT=void 0===va.TYPED_ARRAY_SUPPORT||va.TYPED_ARRAY_SUPPORT,Ma(),Ba.poolSize=8192,Ba._augment=function(e){return e.__proto__=Ba.prototype,e},Ba.from=function(e,t,i){return Fa(null,e,t,i)},Ba.TYPED_ARRAY_SUPPORT&&(Ba.prototype.__proto__=Uint8Array.prototype,Ba.__proto__=Uint8Array),Ba.alloc=function(e,t,i){return function(e,t,i,n){return za(t),t<=0?Ra(e,t):void 0!==i?"string"==typeof n?Ra(e,t).fill(i,n):Ra(e,t).fill(i):Ra(e,t)}(null,e,t,i)},Ba.allocUnsafe=function(e){return Oa(null,e)},Ba.allocUnsafeSlow=function(e){return Oa(null,e)},Ba.isBuffer=function(e){return null!=e&&(!!e._isBuffer||xo(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&xo(e.slice(0,0))}(e))},Ba.compare=function(e,t){if(!La(e)||!La(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},Ba.isEncoding=function(e){switch(String(e).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}},Ba.concat=function(e,t){if(!Ia(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Ba.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=Ba.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var a=e[i];if(!La(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},Ba.byteLength=Ua,Ba.prototype._isBuffer=!0,Ba.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)qa(this,t,t+1);return this},Ba.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)qa(this,t,t+3),qa(this,t+1,t+2);return this},Ba.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)qa(this,t,t+7),qa(this,t+1,t+6),qa(this,t+2,t+5),qa(this,t+3,t+4);return this},Ba.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Xa(this,0,e):ja.apply(this,arguments)},Ba.prototype.equals=function(e){if(!La(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ba.compare(this,e)},Ba.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Ba.prototype.compare=function(e,t,i,n,r){if(!La(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,r),u=e.slice(t,i),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},Ba.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Ba.prototype.indexOf=function(e,t,i){return Ka(this,e,t,i,!0)},Ba.prototype.lastIndexOf=function(e,t,i){return Ka(this,e,t,i,!1)},Ba.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return Va(this,e,t,i);case"utf8":case"utf-8":return Ha(this,e,t,i);case"ascii":return Ga(this,e,t,i);case"latin1":case"binary":return Za(this,e,t,i);case"base64":return Ya(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wa(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Ba.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qa=4096;function eo(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function to(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function io(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",a=t;a<i;++a)r+=go(e[a]);return r}function no(e,t,i){for(var n=e.slice(t,i),r="",a=0;a<n.length;a+=2)r+=String.fromCharCode(n[a]+256*n[a+1]);return r}function ro(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function ao(e,t,i,n,r,a){if(!La(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function oo(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-i,2);r<a;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function so(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-i,4);r<a;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function lo(e,t,i,n,r,a){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function uo(e,t,i,n,r){return r||lo(e,0,i,4),Sa(e,t,i,n,23,4),i+4}function co(e,t,i,n,r){return r||lo(e,0,i,8),Sa(e,t,i,n,52,8),i+8}Ba.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Ba.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Ba.prototype;else{var r=t-e;i=new Ba(r,void 0);for(var a=0;a<r;++a)i[a]=this[a+e]}return i},Ba.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n},Ba.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},Ba.prototype.readUInt8=function(e,t){return t||ro(e,1,this.length),this[e]},Ba.prototype.readUInt16LE=function(e,t){return t||ro(e,2,this.length),this[e]|this[e+1]<<8},Ba.prototype.readUInt16BE=function(e,t){return t||ro(e,2,this.length),this[e]<<8|this[e+1]},Ba.prototype.readUInt32LE=function(e,t){return t||ro(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Ba.prototype.readUInt32BE=function(e,t){return t||ro(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Ba.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},Ba.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ro(e,t,this.length);for(var n=t,r=1,a=this[e+--n];n>0&&(r*=256);)a+=this[e+--n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},Ba.prototype.readInt8=function(e,t){return t||ro(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Ba.prototype.readInt16LE=function(e,t){t||ro(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Ba.prototype.readInt16BE=function(e,t){t||ro(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Ba.prototype.readInt32LE=function(e,t){return t||ro(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Ba.prototype.readInt32BE=function(e,t){return t||ro(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Ba.prototype.readFloatLE=function(e,t){return t||ro(e,4,this.length),Da(this,e,!0,23,4)},Ba.prototype.readFloatBE=function(e,t){return t||ro(e,4,this.length),Da(this,e,!1,23,4)},Ba.prototype.readDoubleLE=function(e,t){return t||ro(e,8,this.length),Da(this,e,!0,52,8)},Ba.prototype.readDoubleBE=function(e,t){return t||ro(e,8,this.length),Da(this,e,!1,52,8)},Ba.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||ao(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,a=0;for(this[t]=255&e;++a<i&&(r*=256);)this[t+a]=e/r&255;return t+i},Ba.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||ao(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+i},Ba.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,1,255,0),Ba.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Ba.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,65535,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oo(this,e,t,!0),t+2},Ba.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,65535,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oo(this,e,t,!1),t+2},Ba.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,4294967295,0),Ba.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):so(this,e,t,!0),t+4},Ba.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,4294967295,0),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):so(this,e,t,!1),t+4},Ba.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);ao(this,e,t,i,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ba.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);ao(this,e,t,i,r-1,-r)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ba.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,1,127,-128),Ba.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ba.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,32767,-32768),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oo(this,e,t,!0),t+2},Ba.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,2,32767,-32768),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oo(this,e,t,!1),t+2},Ba.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,2147483647,-2147483648),Ba.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):so(this,e,t,!0),t+4},Ba.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||ao(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ba.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):so(this,e,t,!1),t+4},Ba.prototype.writeFloatLE=function(e,t,i){return uo(this,e,t,!0,i)},Ba.prototype.writeFloatBE=function(e,t,i){return uo(this,e,t,!1,i)},Ba.prototype.writeDoubleLE=function(e,t,i){return co(this,e,t,!0,i)},Ba.prototype.writeDoubleBE=function(e,t,i){return co(this,e,t,!1,i)},Ba.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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),e.length-t<n-i&&(n=e.length-t+i);var r,a=n-i;if(this===e&&i<t&&t<n)for(r=a-1;r>=0;--r)e[r+t]=this[r+i];else if(a<1e3||!Ba.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Ba.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Ba.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=La(e)?e:po(new Ba(e,n).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var ho=/[^+\/0-9A-Za-z-_]/g;function go(e){return e<16?"0"+e.toString(16):e.toString(16)}function po(e,t){var i;t=t||1/0;for(var n=e.length,r=null,a=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function fo(e){return function(e){var t,i,n,r,a,o;Ea||ka();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new wa(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0,i=0;t<n;t+=4,i+=3)r=ya[e.charCodeAt(t)]<<18|ya[e.charCodeAt(t+1)]<<12|ya[e.charCodeAt(t+2)]<<6|ya[e.charCodeAt(t+3)],o[l++]=r>>16&255,o[l++]=r>>8&255,o[l++]=255&r;return 2===a?(r=ya[e.charCodeAt(t)]<<2|ya[e.charCodeAt(t+1)]>>4,o[l++]=255&r):1===a&&(r=ya[e.charCodeAt(t)]<<10|ya[e.charCodeAt(t+1)]<<4|ya[e.charCodeAt(t+2)]>>2,o[l++]=r>>8&255,o[l++]=255&r),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ho,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function mo(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function xo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}const _o=e=>null!=e,vo=e=>"string"==typeof e,bo=e=>vo(e)&&""!==e,yo=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),wo=e=>e instanceof FormData,Eo=e=>{const t=[],i=(e,n)=>{_o(n)&&(Array.isArray(n)?n.forEach((t=>{i(e,t)})):"object"==typeof n?Object.entries(n).forEach((t=>{let[n,r]=t;i(`${e}[${n}]`,r)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,n))};return Object.entries(e).forEach((e=>{let[t,n]=e;i(t,n)})),t.length>0?`?${t.join("&")}`:""},ko=async(e,t)=>"function"==typeof t?t(e):t,Ao=async(e,t)=>{const i=await ko(t,e.TOKEN),n=await ko(t,e.USERNAME),r=await ko(t,e.PASSWORD),a=await ko(t,e.HEADERS),o=Object.entries(u(u({Accept:"application/json"},a),t.headers)).filter((e=>{let[t,i]=e;return _o(i)})).reduce(((e,t)=>{let[i,n]=t;return u(u({},e),{},{[i]:String(n)})}),{});if(bo(i)&&(o.Authorization=`Bearer ${i}`),bo(n)&&bo(r)){const e=(e=>{try{return btoa(e)}catch(t){return Ba.from(e).toString("base64")}})(`${n}:${r}`);o.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?o["Content-Type"]=t.mediaType:yo(t.body)?o["Content-Type"]=t.body.type||"application/octet-stream":vo(t.body)?o["Content-Type"]="text/plain":wo(t.body)||(o["Content-Type"]="application/json")),new Headers(o)},Co=(e,t)=>new Promise((async(i,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,n=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,n)=>{var r;return(null===(r=null==t?void 0:t.path)||void 0===r?void 0:r.hasOwnProperty(n))?i(String(t.path[n])):e})),r=`${e.BASE}${n}`;return t.query?`${r}${Eo(t.query)}`:r})(e,t),r=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{vo(i)||yo(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return _o(i)})).forEach((e=>{let[t,n]=e;Array.isArray(n)?n.forEach((e=>i(t,e))):i(t,n)})),t}})(t),a=(e=>{var t;if(void 0!==e.body)return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):vo(e.body)||yo(e.body)||wo(e.body)?e.body:JSON.stringify(e.body)})(t),o=await Ao(e,t),s=await(async(e,t,i,n,r,a)=>{const o=new AbortController,s={headers:a,body:null!=n?n:r,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,t,n,a,r,o),l=await(async e=>{if(204!==e.status)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some((e=>t.toLowerCase().startsWith(e)))?await e.json():await e.text()}catch(e){console.error(e)}})(s),c=((e,t)=>{if(t){const i=e.headers.get(t);if(vo(i))return i}})(s,t.responseHeader),d={url:n,ok:s.ok,status:s.status,statusText:s.statusText,headers:s.headers,body:null!=c?c:l};((e,t)=>{var i,n;const r=u({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(r)throw new sa(e,t,r);if(!t.ok){const r=null!==(i=t.status)&&void 0!==i?i:"unknown",a=null!==(n=t.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(t.body,null,2)}catch(e){return}})();throw new sa(e,t,`Generic Error: status: ${r}; status text: ${a}; body: ${o}`)}})(t,d),i(d)}catch(e){n(e)}})),Do=new Y("idv"),So=Symbol(),To=Symbol(),Io="verify-id-sdk";function Mo(e){return sessionStorage.getItem(e)}const Ro=new Map;function Bo(e,t){const i=Ro.get(e);Do.events.emit(i,t)}function Fo(e){Bo(So,e)}function zo(e,t,i,n,r){Fo({type:"verification-result",status:t,step:e,state:n,callbackUrl:r,sessionId:i})}function Oo(e,t){Fo({type:"capture-error",errorCode:t,step:e})}function Po(e,t,i){Fo({type:"api-request-error",errorCode:t,step:e,error:i})}function No(e,t){return Co(la,e).catch((i=>(e.url.endsWith("/events")||Po(t,"request-error",i.message),Promise.reject(i))))}async function Lo(e){var t;la.HEADERS=_a(e);const i=await function(e){return No({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${e}`},"init")}(e);return{autocapture_settings:null!==(t=i.body.autocapture_settings)&&void 0!==t?t:void 0,autocapture_enabled:i.body.autocapture_enabled}}Ro.set(So,So),Ro.set(To,To);var Uo={setStep(e,t){e.commit("setStep",t)},setSessionId(e,t){e.commit("setSessionId",t)},setIsCapturingProcessStarted(e,t){e.commit("setIsCapturingProcessStarted",t)},setServerPath(e,t){e.commit("setServerPath",t)},setStartToken(e,t){e.commit("setStartToken",t)},setRootElement(e,t){e.commit("setRootElement",t)},setLanguage(e,t){e.commit("setLanguage",t)},setCallback(e,t){e.commit("setCallback",t)},setUserToken(e,t){e.commit("setUserToken",t)},setConsentVersion(e,t){e.commit("setConsentVersion",t)},setMissingImages(e,t){e.commit("setMissingImages",t)},setClientId(e,t){e.commit("setClientId",t)},setStatus(e,t){e.commit("setStatus",t)},setMarkdownSupportText(e,t){e.commit("setMarkdownSupportText",t)},setVideoCaptureSettings(e,t){e.commit("setVideoCaptureSettings",t)},setCdnHost(e,t){e.commit("setCdnHost",t)},setIsImageSigningEnabled(e,t){e.commit("setIsImageSigningEnabled",t)},setAutoCaptureSettings(e,t){e.commit("setAutoCaptureSettings",t)}},jo={setStep:(e,t)=>(e.step=t,e),setSessionId:(e,t)=>(e.sessionId=t,e),setIsCapturingProcessStarted:(e,t)=>(e.isCapturingProcessStarted=t,e),setServerPath:(e,t)=>(e.serverPath=t,e),setStartToken:(e,t)=>(e.startToken=t,e),setRootElement:(e,t)=>(e.rootElementId=t,e),setLanguage:(e,t)=>(e.language=t,e),setCallback:(e,t)=>(e.callback=t,e),setUserToken:(e,t)=>(e.userToken=t,e),setConsentVersion:(e,t)=>(e.consentVersion=t,e),setMissingImages:(e,t)=>(e.missingImages=t,e),setClientId:(e,t)=>(e.clientId=t,e),setStatus:(e,t)=>(e.verificationStatus=t,e),setMarkdownSupportText:(e,t)=>(e.markdownSupportText=t,e),setVideoCaptureSettings:(e,t)=>(e.videoCaptureSettings=t,e),setCdnHost:(e,t)=>(e.cdnHost=t,e),setIsImageSigningEnabled:(e,t)=>(e.isImageSigningEnabled=t,e),setAutoCaptureSettings:(e,t)=>(e.autoCaptureSettings=t,e)};const qo=new class{constructor(e){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(e,"actions")&&(this.actions=e.actions),Object.prototype.hasOwnProperty.call(e,"mutations")&&(this.mutations=e.mutations);const t=this;this.state=new Proxy(e.state||{},{get:function(e,t){return e[t]},set:function(e,i,n){return e[i]=n,Bo(To,{key:i,state:e}),"mutation"!==t.status&&console.warn(`You should use a mutation to set ${String(i)}`),t.status="resting",!0}})}dispatch(e,t){return"function"!=typeof this.actions[e]?(console.error(`Action "${e} doesn't exist.`),!1):(this.status="action",this.actions[e](this,t),!0)}commit(e,t){if("function"!=typeof this.mutations[e])return console.info(`Mutation "${e}" doesn't exist`),!1;this.status="mutation";const i=this.mutations[e](this.state,t);return this.state=i,!0}}({actions:Uo,mutations:jo,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Ko;function $o(e){const t=[],i=function(e){var t,i,n,r;const a=e.stats.get(Ko.BLUR_DETECTION),o=e.stats.get(Ko.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=Go(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),l=a&&o?Math.min(a.countSuccess,o.countSuccess):null!==(i=null==a?void 0:a.countSuccess)&&void 0!==i?i:null==o?void 0:o.countSuccess;return{name:Ho(Ko.BLUR_DETECTION),count_success:l,count_failure_glare:null!==(n=null==o?void 0:o.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(r=null==a?void 0:a.countFailed)&&void 0!==r?r:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,n]of e.stats.entries())i!==Ko.BLUR_DETECTION&&i!==Ko.GLARE_DETECTION&&n.durations.length>0&&t.push(Vo(n,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=Go(e.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(e.stableCounts.reduce(((e,t)=>e+t),0)/e.stableCounts.length),avg_duration:t.duration_avg,std_duration:t.duration_std}}(e)),t}function Vo(e,t){const i=Go(e.durations);return{name:Ho(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function Ho(e){switch(e){case Ko.BLUR_DETECTION:case Ko.GLARE_DETECTION:return"blur_glare_detector";case Ko.DOCUMENT_DETECTION:return"doc_detector";case Ko.DOCUMENT_POSITION:return"doc_frame_detector";case Ko.BARCODE_DETECTION:return"barcode_detector";case Ko.FACE_DETECTION:return"face_detector";case Ko.FACE_POSITION:return"face_frame_detector";default:return e}}function Go(e){var t;if(e.length<2)return{duration_avg:null!==(t=e[0])&&void 0!==t?t:0,duration_std:0};const i=e.length,n=e.reduce(((e,t)=>e+t),0)/i;let r=0;for(let t=0;t<i;t++){const i=e[t];r+=Math.pow(i-n,2)}const a=Math.sqrt(r/(i-1));return{duration_avg:Math.round(n),duration_std:Math.round(a)}}!function(e){e.DOCUMENT_DETECTION="document_detection",e.DOCUMENT_POSITION="document_position",e.GLARE_DETECTION="glare_detection",e.BLUR_DETECTION="blur_detection",e.BARCODE_DETECTION="barcode_detection",e.FACE_DETECTION="face_detection",e.FACE_POSITION="face_position"}(Ko||(Ko={}));const Zo=new class{createUploadImageEvent(e,t,i,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:e,request_total_time_ms:String(t),request_processing_time_ms:String(i),request_build_time_ms:String(n)}}}createPageViewEvent(e){return{event_type:"page_view",page_view_req:{page_name:e}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(e,t){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(e),model_stats:this.convertModelStats(t)}}}convertModelStats(e){return e.map((e=>({model_name:e.modelName,init_duration:Math.round(e.initDuration),download_duration:Math.round(e.downloadDuration)})))}createUserActionEvent(e,t,i){var n,r,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(r=null===(n=qo.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&void 0!==a&&a};if(i){const e=$o(i);o.stats=e}return{event_type:"user_action",user_action_req:o}}createErrorEvent(e,t,i){return{event_type:"error",error_req:{error_name:t,error_description:e,step:i}}}createCameraNotAllowedEvent(e,t){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:e,step:t}}}createDrsInitFailureEvent(e,t){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:e,step:t}}}};async function Yo(e,t,i,n,r){i?(la.HEADERS=_a(n,t),await function(e,t,i){return No({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,r,e)):console.error("cannot send event, sessionId or startToken is not set")}const Wo=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${la.BASE}/verify/api/v1/verification/${qo.state.sessionId}/risk-session-token`,t=qo.state.clientId,i=_a(t,qo.state.userToken);oa().then((t=>{Do.http.httpPost(e,{session_token:t},null,i).catch((t=>{throw console.log("unable to send session token to IDV",e),console.error(t),t}))})).catch((t=>{var i,n,r,a;console.log("unable to get session token from DRS",e),console.error(t);const o=(null==t?void 0:t.message)||"failed to initialize DRS",s=Zo.createDrsInitFailureEvent(o,"init");Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,s).then((()=>{Fo({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(e){throw console.log("Error sending risk session token"),console.error(e),e}}};async function Jo(e,t,i){const n=Zo.createErrorEvent(e,t,i);await Xo(i,n)}async function Xo(e,t){var i,n,r,a,o;const s=null===(i=qo.state)||void 0===i?void 0:i.userToken,l=(null===(n=qo.state)||void 0===n?void 0:n.sessionId)||(null===(r=qo.state)||void 0===r?void 0:r.startToken),u=null===(a=qo.state)||void 0===a?void 0:a.clientId,c=(null===(o=qo.state)||void 0===o?void 0:o.step)||e;await Yo(c,s,l,u,t)}const Qo=function(){var e,t;(null===(t=null===(e=qo.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var es;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(es||(es={}));const ts=["pdf417","qr_code"];class is{constructor(){this.model=new BarcodeDetector({formats:ts})}async detect(e){const t=await this.model.detect(e);return Qo("detectedBarcodes:",t),t.map((e=>({class:e.format,score:1,x:e.boundingBox.x,y:e.boundingBox.y,width:e.boundingBox.width,height:e.boundingBox.height,extra:e.rawValue})))}}var ns;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(ns||(ns={}));const rs={[es.DOCUMENT_DETECTOR]:{status:ns.LOADING},[es.BLUR_GLARE_CLASSIFIER]:{status:ns.LOADING},[es.FACE_LANDMARK]:{status:ns.LOADING}};const as=[es.DOCUMENT_DETECTOR,es.BLUR_GLARE_CLASSIFIER],os=async()=>{let e=!1;for(;!e;){const t=Object.values(rs).filter((e=>e.status===ns.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=as.every((e=>rs[e].status===ns.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},ss=e=>"function"==typeof e,ls=function(e){};Do.events.on(Do.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:t}=Do.moduleMetadata.getInitConfig();if(!e||!t)return!1;const i=(null==t?void 0:t.serverPath)&&(n=null==t?void 0:t.serverPath,r="/verify",(null==n?void 0:n.endsWith(r))?n.slice(0,n.length-r.length):n);var n,r;la.BASE=i||window.location.origin,qo.dispatch("setClientId",e),qo.dispatch("setRootElement",(null==t?void 0:t.rootElement)||"root-element"),qo.dispatch("setServerPath",null==t?void 0:t.serverPath),qo.dispatch("setLanguage",null==t?void 0:t.language),qo.dispatch("setCallback",null==t?void 0:t.callback),qo.dispatch("setConsentVersion",null==t?void 0:t.consentVersion),qo.dispatch("setMarkdownSupportText",null==t?void 0:t.markdownSupportText),qo.dispatch("setVideoCaptureSettings",null==t?void 0:t.videoCaptureSettings),qo.dispatch("setCdnHost",null==t?void 0:t.cdnHost),qo.dispatch("setIsImageSigningEnabled",null==t?void 0:t.isImageSigningEnabled),(null==t?void 0:t.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;ss(t.sessionGranted)&&(us=t.sessionGranted);ss(t.sessionStarted)&&(cs=t.sessionStarted);ss(t.imageSubmitted)&&(ds=t.imageSubmitted);ss(t.processing)&&(hs=t.processing);ss(t.completed)&&(gs=t.completed);ss(t.recapture)&&(ps=t.recapture);ss(t.error)&&(fs=t.error);ss(i)&&(ms=i)})(t);return qo.dispatch("setStartToken",null==t?void 0:t.startToken),Lo(qo.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return qo.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),Qo("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const t=e.data.modelName;rs[t]={status:ns.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:u(u({},e.data.stats),{},{modelName:t})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;rs[t].status=ns.NOT_AVAILABLE,Jo(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));Jo("service worker not available","service_worker_not_available","init")}qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){Fo({type:"init",step:e})}("init"),!0})),Do.events.on(So,(function(e){switch(Wo.handelEventData(e),ms(e),e.type){case"session-granted":us({session:qo.state.sessionId});break;case"session-id-acquired":cs({session:qo.state.sessionId});break;case"capture-image-result":ds({session:qo.state.sessionId},e.imageType);break;case"start-verification-processing":hs({session:qo.state.sessionId});break;case"verification-complete":gs({session:qo.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":fs({session:qo.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":ps({session:qo.state.sessionId},e.reason)}}));let us=ls,cs=ls,ds=ls,hs=ls,gs=ls,ps=ls,fs=ls,ms=e=>{};async function xs(e,t,i){la.HEADERS=_a(i,t);var n;return(await(n=e,No({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function _s(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function vs(e,t,i,n){la.HEADERS=_a(t);const r=await(a={start_token:e,accessed_from_desktop:!1,client_type:ha.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:n},No({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:r.body.session_id,userToken:r.body.user_token,requiredImages:r.body.required_images}}async function bs(e,t,i){let n,r,a;if(n)try{n=Mo(Io);const e=JSON.parse(n);r=e.sessionId,a=e.userToken}catch(e){}try{let l;if(a){l=(await xs(r,a,i)).missing_images}else{const u=Do.crypto.createCryptoBinding("sign"),c=await u.getPublicData(),d=await vs(e,i,t,c.publicKey);r=d.sessionId,a=d.userToken,l=d.requiredImages,n=JSON.stringify({sessionId:r,userToken:a}),o=Io,s=n,sessionStorage.setItem(o,s)}return{requiredImages:l,sessionId:r.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}var o,s}function ys(e){let{tagName:t,style:i,id:n="",className:r="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=n,s.className=r,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function ws(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Es={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"};const ks=new class{constructor(e){this.translations=e,this.translations=new Proxy(this.translations,{get:function(e,t){return e[t]},set:function(e,t,i){return e[t]=i,!0}})}overrideLanguage(e){Object.assign(this.translations,e)}translate(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];let r=this.translations[e];return r||(r=e),r.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Es),As={en:Es,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"},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"},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"}};const Cs=async(e,t,i,n,r,a)=>{var o,s,l,u,c,d,h;la.HEADERS=_a(i,t);const g=ga.UAParser();let p;if(qo.state.isImageSigningEnabled){const e=Do.crypto.createCryptoBinding("sign");p=await e.sign(n.data)}const f=await(m=e,x={image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:p},device_info:{model:null===(o=null==g?void 0:g.device)||void 0===o?void 0:o.model,type:null===(s=null==g?void 0:g.device)||void 0===s?void 0:s.type,manufacturer:null===(l=null==g?void 0:g.device)||void 0===l?void 0:l.vendor,os:null===(u=null==g?void 0:g.os)||void 0===u?void 0:u.name,os_version:null===(c=null==g?void 0:g.os)||void 0===c?void 0:c.version,browser:null===(d=null==g?void 0:g.browser)||void 0===d?void 0:d.name,browser_version:null===(h=null==g?void 0:g.browser)||void 0===h?void 0:h.version,used_camera:null==r?void 0:r.selectedCamera,cameras:null==r?void 0:r.camerasInfo}},No({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:x,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"}},x.image.image_type));var m,x;const _=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(f.headers,"x-ts-processing-time-ms");return"ok"!==f.body.feedback&&console.error("Error",f),{missing_images:f.body.missing_images,feedback:f.body.feedback,custom_feedback:f.body.custom_feedback,has_barcode:f.body.has_barcode,serverProcessingTime:_}},Ds=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+t.top,bottom:n+t.bottom,right:i+t.right,left:i+t.left}}},Ss=e=>["document_front","document_back"].includes(e)?"environment":"user";function Ts(e){switch(e){case"document_front":return ca.image_type.DOCUMENT_FRONT;case"document_back":return ca.image_type.DOCUMENT_BACK;case"selfie":return ca.image_type.SELFIE}}var Is={},Ms={get exports(){return Is},set exports(e){Is=e}};Ms.exports=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o}));var n=i(1),r=i(7);i.d(t,"a",(function(){return r.a})),i.d(t,"d",(function(){return n.b}));var a=n.a.FACING_MODES,o=n.a.IMAGE_TYPES},function(e,t,i){var n=i(6);i.d(t,"a",(function(){return n.a}));var r=i(2);i.d(t,"b",(function(){return r.a}))},function(e,t,i){function n(e,t){if(!(t>=0&&t<=1))throw new Error(t+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(e))throw new Error(e+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function r(e,t){var i={};try{n(e,t),i.imageType=e,i.imageCompression=t}catch(e){console.error(e),console.error("default value of "+h.c.PNG+" is used"),i.imageType=h.c.PNG,i.imageCompression=null}return i}function a(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function o(){return"ontouchend"in document}function s(e,t,i){var n=e*parseFloat(i);return{imageWidth:n,imageHeight:t/(e/n)}}function l(e,t,i){return r(t,i).imageType===h.c.JPG?i?e.toDataURL(h.b[h.c.JPG],i):e.toDataURL(h.b[h.c.JPG]):e.toDataURL(h.b[t])}function u(e,t){return e||t}function c(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:c()}}t.c=s,t.b=l,t.e=u,t.d=c,t.a=d;var h=i(3)},function(e,t,i){function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"b",(function(){return u})),i.d(t,"d",(function(){return c}));var r,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],l={PNG:"png",JPG:"jpg"},u=(n(r={},"jpg","image/jpeg"),n(r,"png","image/png"),r),c={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);i.d(t,"FACING_MODES",(function(){return n.b})),i.d(t,"IMAGE_TYPES",(function(){return n.c})),i.d(t,"_getDebugPlatformInfo",(function(){return n.d}));var r=i(9);i.d(t,"downloadPhoto",(function(){return r.a})),t.default=n.a},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var r=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=function(){function e(){n(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,n=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,l=e.videoHeight,u=Object(r.c)(s,l,i),c=u.imageWidth,d=u.imageHeight,h=document.createElement("canvas");h.width=c,h.height=d;var g=h.getContext("2d");return o&&g.setTransform(-1,0,0,1,h.width,0),g.drawImage(e,0,0,c,d),Object(r.b)(h,n,a)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),i=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(i){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,r={getUserMedia:function(e){return new Promise((function(t,i){n.call(navigator,e,t,i)}))}};e=Object.assign(n,r)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(r.e)(t,i))return a.d;var n=e.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),a.d;var o=void 0,s=void 0;return t&&(a.e.includes(t)?o=t:s={exact:t}),{audio:!1,video:{facingMode:o,deviceId:s,width:i&&i.width,height:i&&i.height}}}},{key:"getMaxResolutionConstraints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",i);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}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(r.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=n,a);if(i<n.length){var o=n.slice(0,-i);return a.video.advanced=o,a}return null}},{key:"FACING_MODES",get:function(){return a.a}},{key:"IMAGE_TYPES",get:function(){return a.c}}]),e}()},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return l}));var r=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=r.a.IMAGE_TYPES.PNG,l=function(){function e(t){n(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=r.a.getWindowURL(),this.mediaDevices=r.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(n,a){var o=r.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),n(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=r.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var n={};return this._getStreamDevice(e,n)}return new Promise((function(n,r){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),n(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){r(i)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(e){if("srcObject"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:"_setSettings",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var e=this;return new Promise((function(t,i){var n=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&n.push(e)})),t(n)})).catch((function(e){i(e)}))}))}},{key:"_gotStream",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then((function(e){setTimeout((function(){e.getTracks().forEach((function(e){e.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return e._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(e,t){var i=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return i._getStreamDevice(e,t)}))}},{key:"startCameraMaxResolution",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return e._getStreamDeviceMaxResolution(t)}))}},{key:"getDataUri",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?a.c:e.sizeFactor,imageType:void 0===e.imageType?s:e.imageType,imageCompression:void 0===e.imageCompression?a.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?a.b:e.isImageMirror};return r.a.getDataUri(this.videoElement,t)}},{key:"stopCamera",value:function(){var e=this;return new Promise((function(t,i){e.stream&&(e.stream.getTracks().forEach((function(e){e.stop()})),e.videoElement.src="",e.stream=null,e._setSettings(null),t()),i(Error("no stream to stop!"))}))}}]),e}()},function(e,t,i){i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=1,r=null,a=!1},function(e,t,i){var n=i(10);i.d(t,"a",(function(){return n.a}))},function(e,t,i){function n(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return new Blob([n],{type:i})}function r(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=u.c.PNG;return"image/jpeg"===e&&(t=u.c.JPG),t}function o(e,t,i){return e+"-"+r(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=o(t,i,e.type),n.href=window.URL.createObjectURL(e);var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(e),t,i)}t.a=l;var u=i(0)}]);var Rs=J(Is);class Bs{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Bs.instance||(Bs.instance=new Bs),Bs.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((e=>"live"===e.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((e=>e.stop())),this.currentStream=null)}areConstraintsEqual(e){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(e)}async startNewStream(e){this.isStreaming()&&this.areConstraintsEqual(e)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(e),this.currentConstraints=e)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(e){throw console.error("Failed to enumerate devices:",e),e}}}const Fs=[{os:{name:"Android"},label:"2 0"}];async function zs(){const e=(await async function(){const e=Bs.getInstance();let t=await e.enumerateDevices();return t.filter((e=>"videoinput"===e.kind)).every((e=>""===e.label))&&(await e.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),t=await e.enumerateDevices(),e.stopStream()),t}()).filter((e=>{if(!(null==e?void 0:e.label)||"videoinput"!==e.kind||""===e.label)return!1;const t=e.label.toLowerCase();return Os.some((e=>t.includes(e)))})),t=ga.UAParser(),i=e.find((e=>Fs.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const Os=["rear","back","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"],Ps={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Ns={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Ls=async e=>{var t,i;let n;return"environment"==e&&(n=await zs()),null!==(i=null===(t=null==n?void 0:n.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},Us=(e,t)=>{var i,n;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:Ns:null!==(n=null==t?void 0:t.environmentVideoConstraints)&&void 0!==n?n:Ps},js=e=>{const t=ys({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return t.style.transform="user"===e?"scaleX(-1)":"",t.autoplay=!0,t.muted=!0,t.setAttribute("playsinline","true"),t},qs={title:"other_error_code_title",message:"other_error_code_message"},Ks={ok:qs,document_face_not_found:qs,restricted_criteria:qs,other:qs,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"},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"}},$s={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"}},Vs=(e,t)=>{const i=ys({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 ${e}`,testid:`overlay-frame ${e}`});if("environment"===e){!function(e){ws(e,ys({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"})),ws(e,ys({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"})),ws(e,ys({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"})),ws(e,ys({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"}))}(i);const e=.85*t.clientWidth;i.style.width=`${e}px`,i.style.height=.65*e+"px",i.style.maxHeight=.5*window.innerHeight+"px"}else{const e=t.clientWidth*(t.clientHeight<700?.8:.85);i.style.width=.8*e+"px",i.style.height=`${e}px`,i.style.minHeight=.8*e+"px",i.style.maxHeight=.5*window.innerHeight+"px",i.style.borderRadius="50%"}return i};const Hs=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 68 68"),t.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="${null!=e?e:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,t};function Gs(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","16px"),e.setAttribute("height","16px"),e.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 ',e}const Zs={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)"}},Ys=e=>{let{text:t,level:i=1,style:n={},id:r,testid:a}=e;const o=ys({tagName:`h${i}`,style:u(u(u({},Zs.all),Zs[i]),n),id:r,testid:a});return o.textContent=t,o.id=r,o};var Ws,Js={};let Xs=null;try{Xs=(Ws||(Ws=1,function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n={exec:()=>null};function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(a.caret,"$1"),i=i.replace(e,r),n},getRegex:()=>new RegExp(i,t)};return n}const a={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-\u088E\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\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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{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{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{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\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{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{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{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{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{14400}-\u{14646}\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{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\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{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{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{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/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:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},o=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).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(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),f="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]*?(?:-->|$))/,x=r("^ {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",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=r(c).replace("hr",o).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",f).getRegex(),v={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:o,html:x,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:n,text:/^[^\n]+/},b=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",o).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",f).getRegex(),y=u(u({},v),{},{table:b,paragraph:r(c).replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).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",f).getRegex()}),w=u(u({},v),{},{html:r("^ *(?: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:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",o).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),E=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,k=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",C=r(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),D=r(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),S=r("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),I=r(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),M=r(/^<(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(),R=r(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=r("^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",R).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=r(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",h).getRegex(),P=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:n,anyPunctuation:I,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:k,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:D,emStrongRDelimAst:S,emStrongRDelimUnd:T,escape:E,link:z,nolink:P,punctuation:C,reflink:O,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",P).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},L=u(u({},N),{},{link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()}),U=u(u({},N),{},{escape:r(E).replace("])","~|])").getRegex(),url:r(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),j=u(u({},U),{},{br:r(k).replace("{2,}","*").getRegex(),text:r(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:v,gfm:y,pedantic:w},K={normal:N,gfm:U,breaks:j,pedantic:L},$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V=e=>$[e];function H(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,V)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,V);return e}function G(e){try{e=encodeURI(e).replace(a.percentDecode,"%")}catch(e){return null}return e}function Z(e,t){const i=e.replace(a.findPipe,((e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"})).split(a.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(a.slashPipe,"|");return i}function Y(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const a=e.charAt(n-r-1);if(a!==t||i){if(a===t||!i)break;r++}else r++}return e.slice(0,n-r)}function W(e,t,i,n,r){const a=t.href,o=t.title||null,s=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class J{constructor(t){d(this,"options",void 0),d(this,"rules",void 0),d(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const n=e.match(i.other.indentCodeCompensation);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Y(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Y(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Y(t[0],"\n").split("\n"),i="",n="";const r=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else{if(t)break;a.push(e[o])}e=e.slice(o);const s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,n=n?`${n}\n${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,0===e.length)break;const c=r[r.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const t=c,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);r[r.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,n=n.substring(0,n.length-t.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const t=c,a=t.raw+"\n"+e.join("\n"),o=this.list(a);r[r.length-1]=o,i=i.substring(0,i.length-c.raw.length)+o.raw,n=n.substring(0,n.length-t.raw.length)+o.raw,e=a.substring(r[r.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,r={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,n="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(d),i=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let g;if(u=h,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),g=u):g=u.replace(this.rules.other.tabCharGlobal," "),r.test(u))break;if(a.test(u))break;if(o.test(u))break;if(t.test(u))break;if(i.test(u))break;if(g.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+g.slice(d);else{if(c)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(l))break;if(a.test(l))break;if(i.test(l))break;s+="\n"+u}c||u.trim()||(c=!0),n+=h+"\n",e=e.substring(h.length+1),l=g.slice(d)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0));let h,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(s),g&&(h="[ ] "!==g[0],s=s.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:n,task:!!g,checked:h,loose:!1,text:s,tokens:[]}),r.raw+=n}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=i}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=Z(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(const e of r)a.rows.push(Z(e,a.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Y(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])i++;else if(e[n]===t[1]&&(i--,i<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i.slice(1):i.slice(1,-1)),W(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return W(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let r,a,o=i,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(a=[...r].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+a);if(Math.min(i,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="mailto:"+e;else{let a;do{var i,n;a=t[0],t[0]=null!==(i=null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class X{constructor(t){d(this,"tokens",void 0),d(this,"options",void 0),d(this,"state",void 0),d(this,"tokenizer",void 0),d(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new J,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 i={other:a,block:q.normal,inline:K.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=K.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=K.breaks:i.inline=K.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:K}}static lex(e,t){return new X(t).lex(e)}static lexInline(e,t){return new X(t).inlineTokens(e)}lex(e){e=e.replace(a.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){let t,i,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal," ").replace(a.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,r))&&(e=e.substring(t.raw.length),r.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&r.length>0?r[r.length-1].raw+="\n":r.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?r.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),r.push(t);else{var s;if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(n)))i=r[r.length-1],o&&"paragraph"===(null===(s=i)||void 0===s?void 0:s.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t),o=n.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=r[r.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,r}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,i,n,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(t=i.call({lexer:this},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=s[s.length-1],s.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=s[s.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(t=this.tokenizer.emStrong(e,l,o))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),s.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(n))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),a=!0,i=s[s.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),s.push(t);return s}}class Q{constructor(t){d(this,"options",void 0),d(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:n,escaped:r}=e;const o=null===(t=(n||"").match(a.notSpaceStart))||void 0===t?void 0:t[0],s=i.replace(a.endingNewline,"")+"\n";return o?'<pre><code class="language-'+H(o)+'">'+(r?s:H(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:H(s,!0))+"</code></pre>\n"}blockquote(e){let{tokens:t}=e;return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:i}=e;return`<h${i}>${this.parser.parseInline(t)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t<e.items.length;t++){const i=e.items[t];n+=this.listitem(i)}const r=t?"ol":"ul";return"<"+r+(t&&1!==i?' start="'+i+'"':"")+">\n"+n+"</"+r+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+H(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox(e){let{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){let{tokens:t}=e;return`<p>${this.parser.parseInline(t)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let n="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];i="";for(let e=0;e<r.length;e++)i+=this.tablecell(r[e]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow(e){let{text:t}=e;return`<tr>\n${t}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong(e){let{tokens:t}=e;return`<strong>${this.parser.parseInline(t)}</strong>`}em(e){let{tokens:t}=e;return`<em>${this.parser.parseInline(t)}</em>`}codespan(e){let{text:t}=e;return`<code>${H(t,!0)}</code>`}br(e){return"<br>"}del(e){let{tokens:t}=e;return`<del>${this.parser.parseInline(t)}</del>`}link(e){let{href:t,title:i,tokens:n}=e;const r=this.parser.parseInline(n),a=G(t);if(null===a)return r;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+H(i)+'"'),o+=">"+r+"</a>",o}image(e){let{href:t,title:i,text:n}=e;const r=G(t);if(null===r)return H(n);let a=`<img src="${t=r}" alt="${n}"`;return i&&(a+=` title="${H(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:H(e.text)}}class ee{strong(e){let{text:t}=e;return t}em(e){let{text:t}=e;return t}codespan(e){let{text:t}=e;return t}del(e){let{text:t}=e;return t}html(e){let{text:t}=e;return t}text(e){let{text:t}=e;return t}link(e){let{text:t}=e;return""+t}image(e){let{text:t}=e;return""+t}br(){return""}}class te{constructor(t){d(this,"options",void 0),d(this,"renderer",void 0),d(this,"textRenderer",void 0),this.options=t||e.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 ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const a=r;switch(a.type){case"space":i+=this.renderer.space(a);continue;case"hr":i+=this.renderer.hr(a);continue;case"heading":i+=this.renderer.heading(a);continue;case"code":i+=this.renderer.code(a);continue;case"table":i+=this.renderer.table(a);continue;case"blockquote":i+=this.renderer.blockquote(a);continue;case"list":i+=this.renderer.list(a);continue;case"html":i+=this.renderer.html(a);continue;case"paragraph":i+=this.renderer.paragraph(a);continue;case"text":{let r=a,o=this.renderer.text(r);for(;n+1<e.length&&"text"===e[n+1].type;)r=e[++n],o+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=e||"";continue}}const a=r;switch(a.type){case"escape":case"text":i+=t.text(a);break;case"html":i+=t.html(a);break;case"link":i+=t.link(a);break;case"image":i+=t.image(a);break;case"strong":i+=t.strong(a);break;case"em":i+=t.em(a);break;case"codespan":i+=t.codespan(a);break;case"br":i+=t.br(a);break;case"del":i+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class ie{constructor(t){d(this,"options",void 0),d(this,"block",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?X.lex:X.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}d(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class ne{constructor(){d(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),d(this,"options",this.setOptions),d(this,"parse",this.parseMarkdown(!0)),d(this,"parseInline",this.parseMarkdown(!1)),d(this,"Parser",te),d(this,"Renderer",Q),d(this,"TextRenderer",ee),d(this,"Lexer",X),d(this,"Tokenizer",J),d(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const r of e)switch(i=i.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const n of e.header)i=i.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;i=i.concat(this.walkTokens(e.items,t));break}default:{var n;const e=r;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{const r=e[n].flat(1/0);i=i.concat(this.walkTokens(r,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((t=>{const i=u({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const i=e.renderers[t.name];e.renderers[t.name]=i?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=t.renderer.apply(this,n);return!1===a&&(a=i.apply(this,n)),a}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),i.extensions=e),t.renderer){const e=this.defaults.renderer||new Q(this.defaults);for(const i in t.renderer){if(!(i in e))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,r=t.renderer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}i.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new J(this.defaults);for(const i in t.tokenizer){if(!(i in e))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,r=t.tokenizer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ie;for(const i in t.hooks){if(!(i in e))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const n=i,r=t.hooks[n],a=e[n];ie.passThroughHooks.has(i)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(r.call(e,t)).then((t=>a.call(e,t)));const i=r.call(e,t);return a.call(e,i)}:e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;i.walkTokens=function(t){let i=[];return i.push(n.call(this,t)),e&&(i=i.concat(e.call(this,t))),i}}this.defaults=u(u({},this.defaults),i)})),this}setOptions(e){return this.defaults=u(u({},this.defaults),e),this}lexer(e,t){return X.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,i)=>{const n=u({},i),r=u(u({},this.defaults),n),a=this.onError(!!r.silent,!!r.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==t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const o=r.hooks?r.hooks.provideLexer():e?X.lex:X.lexInline,s=r.hooks?r.hooks.provideParser():e?te.parse:te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>s(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(a);try{r.hooks&&(t=r.hooks.preprocess(t));let e=o(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let i=s(e,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(e){return a(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+H(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new ne;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(){return re.use(...arguments),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=Q,ae.TextRenderer=ee,ae.Lexer=X,ae.lexer=X.lex,ae.Tokenizer=J,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,le=ae.use,ue=ae.walkTokens,ce=ae.parseInline,de=ae,he=te.parse,ge=X.lex;e.Hooks=ie,e.Lexer=X,e.Marked=ne,e.Parser=te,e.Renderer=Q,e.TextRenderer=ee,e.Tokenizer=J,e.getDefaults=t,e.lexer=ge,e.marked=ae,e.options=oe,e.parse=de,e.parseInline=ce,e.parser=he,e.setOptions=se,e.use=le,e.walkTokens=ue}(Js)),Js).marked}catch(e){console.log("marked is not supported",e)}const Qs=Xs,el=e=>{let{text:t,id:i,testid:n,clientHeight:r}=e;const a=!!r&&r<700,o=ys({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:a?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:i,testid:n});return ws(o,Ys({text:t,level:a?6:5,style:{color:"white"}})),o};const tl=e=>{const t=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","270"),e.setAttribute("height","175"),e.setAttribute("viewBox","40 60 250 140"),e.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 ',e}();return t.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_back"===e&&(t.style.opacity="1",setTimeout((()=>{t.style.opacity="0"}),5e3)),t};var il;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(il||(il={}));const nl="#ED3232",rl="#01B678",al="#FFF";const ol=e=>{const t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;return t.getContext("2d").drawImage(e,0,0,e.videoWidth,e.videoHeight),t};async function sl(e){let{context:t,onDetect:i,frame:n,showError:r,isSelfie:a=!1}=e;const o=t.state.name;if(o===il.REJECTED){r(function(e){switch(e){case Ko.DOCUMENT_DETECTION:return"searching_document_autocapture";case Ko.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Ko.BARCODE_DETECTION:return ua.feedback.BARCODE_NOT_FOUND;case Ko.BLUR_DETECTION:return ua.feedback.BLUR;case Ko.GLARE_DETECTION:return ua.feedback.GLARE;case Ko.FACE_DETECTION:return ua.feedback.FACE_NOT_FOUND;case Ko.FACE_POSITION:return ua.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));ll("border-color",t.invalidFramesCause===Ko.DOCUMENT_DETECTION?al:nl)}if(o===il.VALID)if(a){ll("border-color",rl);r(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else r("capturing_in_progress_message"),ll("border-color",al);o===il.ACCEPTED&&(ll("border-color",al),r(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:n,suspendedPreview:!0,context:t}))}function ll(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function ul(e){let t,i,n,{captureFrame:r,object:a,videoWidth:o,videoHeight:s,deviceWidth:l,deviceHeight:u,threshold:c,iouThreshold:d=.85}=e;if(o/s>=l/u){n=u/s;const e=(o*n-l)/2;t=a.x*n-e,i=a.y*n}else{n=l/o;const e=(s*n-u)/2;t=a.x*n,i=a.y*n-e}const h=t+a.width*n,g=i+a.height*n;!function(e,t,i,n){var r,a;if(null===(a=null===(r=qo.state.autoCaptureSettings)||void 0===r?void 0:r.settings)||void 0===a?void 0:a.debug){const r=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`;else{const a=document.createElement("div");a.id="rectangle",a.style.position="absolute",a.style.border="1px solid yellow",a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,r.appendChild(a)}}}(t,i,a.width*n,a.height*n);const p=function(e,t){const i=Math.max(e.left,t.left),n=Math.min(e.right,t.right),r=Math.max(e.top,t.top),a=n-i,o=Math.min(e.bottom,t.bottom)-r;if(a<=0||o<=0)return 0;const s=a*o;return s/((e.right-e.left)*(e.bottom-e.top)+(t.right-t.left)*(t.bottom-t.top)-s)}({top:r.top,left:r.left,bottom:r.bottom,right:r.right},{top:i,left:t,bottom:g,right:h}),f=p>d,m=a.width*n*(a.height*n)>c*(r.width*r.height);return f&&m}const cl=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.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 ',e}(),t=ys({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 ws(t,e),ws(t,Ys({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const dl=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.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 ',e}(),t=ys({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 ws(t,e),ws(t,Ys({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},hl=e=>{let{step:t,setImage:i,camera:n}=e;var r,a,o,s;const l=$s[t];(null===(r=qo.state.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&"selfie"===t&&(l.instructions="second_title_face_autocapture");const u=((e,t)=>ys({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),c=ys({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=ys({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(qo.state.rootElementId);if(!h)throw new Error("Root element not found");const g=Vs(Ss(t),h);ws(c,tl(t)),ws(c,g);const p=(()=>{const e=ys({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"}),t=Gs();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",ws(e,t),ws(e,Ys({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();ws(g,p),p.style.visibility="hidden";const f=el({text:ks.translate(l.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:n,color:r,withLoader:a}=e;if(a){const e=Hs();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=ys({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"});return ws(a,e),a.addEventListener("click",t),a}{const e=ys({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(r||"white"),borderRadius:"40px"},id:i+"-outer",testid:n+"-outer"});return ws(e,ys({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:ol(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=qo.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),x=(()=>{const e=ys({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",alignItems:"center",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),t=dl();return ws(e,cl()),ws(e,t),e})(),_=(e=>{let{title:t,text:i,clientHeight:n,customTextColor:r}=e;const a=n<700,o=ys({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Ys({text:t,level:a?2:1,style:{color:r||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),l=Ys({text:i,level:a?6:5,style:{color:r||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return ws(o,s),ws(o,l),o})({text:ks.translate(l.instructions),title:ks.translate(l.title),clientHeight:h.clientHeight}),v=(e=>{const t=e<700,i=ys({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:qo.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=ys({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),r=Gs();r.style.width="16px",r.style.height="16px",r.style.margin="0 10px",qo.state.markdownSupportText?ws(n,r):ws(i,r);const a=qo.state.markdownSupportText&&null!=Qs?Qs.parse(qo.state.markdownSupportText,{async:!1}):"",o=Ys({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Ys({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,ws(n,o)),ws(i,a?[n,s]:o),i})(h.clientHeight),b=(null===(s=qo.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Hs():function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","65"),e.setAttribute("height","65"),e.setAttribute("viewBox","0 0 24 24"),e.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 ',e}();b.style.display="none",ws(d,f),ws(d,_),ws(d,c),ws(d,v),ws(u,d);const y=ys({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});ws(y,b),ws(y,m),ws(y,x),ws(u,y),ws(u,n.videoElement);const w=ys({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Ss(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const E=(e=>{const t=ys({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(w);return ws(u,E),{component:u,setLoadingMode:e=>{var t;m.style.display="none",v.style.visibility="hidden",b.style.display="block",(null===(t=qo.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(b.style.height="63px",b.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var n,r;m.style.display="none",v.style.display="none",x.style.display="flex";const a=x.querySelector("#approve-image"),o=x.querySelector("#retake-image"),s=a.cloneNode(!0);null===(n=a.parentNode)||void 0===n||n.replaceChild(s,a),s.addEventListener("click",t);const l=o.cloneNode(!0);null===(r=o.parentNode)||void 0===r||r.replaceChild(l,o),l.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{x.style.display="none",v.style.display="flex"},setPreviewImage:(e,t)=>{w.src=e,p.style.visibility="hidden",n.videoElement.style.display="none",m.style.display="none",v.style.visibility="hidden",E.style.display="block",b.style.display=t?"none":"block"},setLoadingComplete:()=>{b.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(v.style.visibility="hidden");let i;i=e==ua.feedback.RESTRICTED_CRITERIA&&t?t:Ks[e]?Ks[e].message:ks.translate(e)!==e?e:Ks.other.message,document.getElementById("image-error-message").innerHTML=ks.translate(i),v.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",n.videoElement.style.display="block",E.style.display="none",b.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",E.style.display="none",n.videoElement.style.display="block";const i=e==ua.feedback.RESTRICTED_CRITERIA,r=Ks[e]||Ks.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=Qs?Qs.parse(t,{async:!1}):ks.translate(r.message),v.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=ks.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=ks.translate(i))}}};class gl{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(this.isValid=!1,this.failedStep=e),this.steps.push(new pl(e,t,i))}}class pl{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=e,this.success=t,this.duration=i}}class fl{constructor(){this.name=il.ACCEPTED}async handleFrame(){return new gl}}class ml{constructor(){this.name=il.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:n,detectionStrategy:r}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new fl)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new _l)),a}}class xl{constructor(){this.name=il.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new ml),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new _l),a):(t.invalidFramesCounter++,a)}}class _l{constructor(){this.name=il.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new ml)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new xl)),a}}class vl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=e,this.state=new _l,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=t,this.invalidFramesThreshold=i}setState(e){this.state=e}async handleFrame(e){let{frame:t,deviceInfo:i}=e;return await this.state.handleFrame({context:this,frame:t,deviceInfo:i,detectionStrategy:this.detectionStrategy})}}async function bl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const a=yl(t,n,r),o=await new Promise(((n,r)=>{navigator.serviceWorker.ready.then((o=>{var s;const l=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",l),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",l),Jo(t.data.error.toString(),e,"error"),r(t.data.error))};navigator.serviceWorker.addEventListener("message",l),null===(s=o.active)||void 0===s||s.postMessage(u({type:e,imageData:a,height:t.height,width:t.width},i))}))}));return Qo(`****** in web-SDK return result for ${e}`,o),o}function yl(e,t,i){const n=document.createElement("canvas"),r=t||{height:e.height,width:e.width},a=n.getContext("2d");n.width=r.width,n.height=r.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,r.width,r.height):null==a||a.drawImage(e,0,0,r.width,r.height);const o=null==a?void 0:a.getImageData(0,0,r.width,r.height);return n.remove(),o}async function wl(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return bl("DETECT_DOCUMENT",e,{},rs[es.DOCUMENT_DETECTOR].imageDimensions)}async function El(e,t){return bl("BLUR_GLARE_CLASSIFY",e,{},rs[es.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const kl=function(){try{return new is}catch(e){return Qo("Error initializing barcode model",e),Jo("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Al{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=kl}async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await wl(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,r.addStepResponse(Ko.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await El(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(Ko.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));if(r.addStepResponse(Ko.GLARE_DETECTION,!d,s),d)return r;if(this.barcodeModel&&this.hasBarcode){a=Date.now();const e=await this.barcodeModel.detect(t);s=Date.now()-a;const i=(null==e?void 0:e.length)>0;if(r.addStepResponse(Ko.BARCODE_DETECTION,i,s),!i)return r}return r}}class Cl{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Dl{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Ko).forEach((e=>{this.stats.set(e,new Cl)}))}addStats(e,t){this.frameHandleDurations.push(t),e.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),e.steps.forEach((e=>{this.addStat(e.step,e.duration,e.success?1:0,e.success?0:1)}))}addStat(e,t,i,n){const r=this.stats.get(e);if(!r)throw new Error(`Stat for step ${e} not found`);r.durations.push(t),r.countSuccess+=i,r.countFailed+=n}}let Sl=!1;const Tl=e=>{Sl=e};class Il{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await wl(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,r.addStepResponse(Ko.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await El(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(Ko.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));return r.addStepResponse(Ko.GLARE_DETECTION,!d,s),r}}let Ml=!1;const Rl=e=>{Ml=e};class Bl{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new gl;let a=Date.now();const o=null===(n=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:bl("DETECT_FACE_LANDMARKS",e)}(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(Ko.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return r;a=Date.now();const l=ul({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:qo.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:qo.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,r.addStepResponse(Ko.FACE_POSITION,l,s),r}}let Fl=!1;const zl=e=>{Fl=e};async function Ol(e,t){var i,n,r,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=Zo.createCameraNotAllowedEvent(t.message,e);await Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,s),qo.dispatch("setIsCapturingProcessStarted",!1)}Oo(e,o)}function Pl(e){const t=(e=>{var t,i,n,r;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const l=null===(r=s.split("/"))||void 0===r?void 0:r[1];if(!l)throw new Error("unable-to-parse-data-uri");return{data:o,format:l}})(e);return{image:{data:t.data,format:t.format,captureMargins:Ds()}}}let Nl=!1;const Ll=async()=>{const e=await xs(qo.state.sessionId,qo.state.userToken,qo.state.clientId);Ul(e)},Ul=async e=>{var t;"expired"===(null==e?void 0:e.status)?Po("processing","session-expired",`Session expired for session id: ${qo.state.sessionId}`):(null==e?void 0:e.missing_images)&&(null===(t=null==e?void 0:e.missing_images)||void 0===t?void 0:t.length)>0&&setTimeout(Ll,3e3)},jl=e=>{let{step:t}=e;var i,n,r;const a=null===(n=null===(i=qo.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===n?void 0:n.enabled;let o=!1;const s=null===(r=qo.state)||void 0===r?void 0:r.videoCaptureSettings,l=(e=>{let t,i,n=!1;const r=js(e),a=new Rs(r),o=async()=>{n&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),n=!1)};return{videoStream:i,startVideoFeed:async e=>{var r,s,l;n&&await o(),"environment"==e&&(t=await zs());const u=null!==(s=null===(r=null==t?void 0:t.selectedCamera)||void 0===r?void 0:r.deviceId)&&void 0!==s?s:e,c=Us(e,null===(l=qo.state)||void 0===l?void 0:l.videoCaptureSettings);Bs.getInstance().stopStream(),i=await a.startCamera(u,c),n=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Ss(t));!function(e){Fo({type:"page-load",step:e})}(t),Ll();const u=hl({step:t,setImage:c,camera:l});async function c(e){let{suspendedPreview:i=!1,frame:n,context:r}=e;n||(n=ol(l.videoElement)),"document_front"===t&&Rl(!1),"document_back"===t&&Tl(!1),"selfie"===t&&zl(!1);const a=Date.now(),c=function(e){const t=e.getCameraInfo();return{selectedCamera:(null==t?void 0:t.selectedCamera)&&{label:t.selectedCamera.label},camerasInfo:(null==t?void 0:t.optionalCameras)&&t.optionalCameras.map((e=>({label:e.label})))}}(l);if(!o)return;u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(e=>e.toDataURL("image/jpeg"))(n);u.setPreviewImage(g,"selfie"===t),await l.stopVideoFeed(),"selfie"!==t?await h(i,g,c,a,null==r?void 0:r.stats):(u.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),u.setApprovalRetakeButtons({approveAction:async()=>{u.hideApprovalRetakeButtons(),await h(i,g,c,a,null==r?void 0:r.stats)},retakeAction:()=>{u.hideApprovalRetakeButtons(),d()}}))}function d(){"selfie"===t&&u.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),l.startVideoFeed(Ss(t)).then((()=>{o=!0,u.enableVideoElement(),a&&(u.setAutoCapturingError(null),g(t))})).catch((async e=>{throw await Ol(t,e),e}))}async function h(e,i,n,r,c){const h=[];!function(e){var i,n,r,a;const o=Zo.createUserActionEvent("capture_image",t,e);Yo(null===(i=qo.state)||void 0===i?void 0:i.step,null===(n=qo.state)||void 0===n?void 0:n.userToken,null===(r=qo.state)||void 0===r?void 0:r.sessionId,null===(a=qo.state)||void 0===a?void 0:a.clientId,o)}(c),function(e,t){Fo({type:"capture-image",imageType:t,step:e})}(t,Ts(t));try{const l=Date.now(),c=Pl(i);o=!1,h.push(Cs(qo.state.sessionId,qo.state.userToken,qo.state.clientId,null==c?void 0:c.image,n,Ts(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(g,"has_barcode")&&(Nl=g.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:n,serverProcessingTime:r,userToken:a,sessionId:o,clientId:s}=e;const l=Date.now()-i,u=n?i-n:0,c=Zo.createUploadImageEvent(t,String(l),String(r),String(u));await Yo(t,a,o,s,c)}({step:t,requestStartTime:l,imageProcessingStartTime:r,serverProcessingTime:g.serverProcessingTime,userToken:qo.state.userToken,sessionId:qo.state.sessionId,clientId:qo.state.clientId}),qo.dispatch("setMissingImages",g.missing_images),u.setLoadingComplete(),function(e,t,i){Fo({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Ts(t),g.feedback),"ok"!==g.feedback)return await async function(e){ll("border-color",nl),a?u.setAutoCapturingError(e.feedback,e.custom_feedback):u.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),ll("border-color",al)}(g),void d();ll("border-color",rl),await new Promise((e=>setTimeout(e,750))),ll("border-color",al),qo.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(qo.state.missingImages))}catch(e){u.setLoadingComplete(),u.setCapturingShowErrorMode(ua.feedback.OTHER),l.startVideoFeed(Ss(t)).then((()=>{o=!0})).catch((async e=>{throw await Ol(t,e),e})),Oo(t,"failed-to-submit-image")}}async function g(e){if("document_front"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s,l,u,c;const d=new vl(new Il,null!==(o=null===(a=null===(r=qo.state.autoCaptureSettings.settings)||void 0===r?void 0:r.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Dl;for(Rl(!0);d.state.name!==il.ACCEPTED&&Ml;){const e=Date.now(),r=ol(t.videoElement),a={width:null!==(l=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==l?l:0,height:null!==(c=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==c?c:0},o=await d.handleFrame({frame:r,deviceInfo:a}),g=Date.now()-e+50;h.addStats(o,g),d.stats=h,await sl({context:d,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}if("document_back"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n,hasBarcode:r}=e;var a,o,s,l,u,c,d;const h=new vl(new Al(r),null!==(s=null===(o=null===(a=qo.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Tl(!0);const g=new Dl;for(;h.state.name!==il.ACCEPTED&&Sl;){const e=Date.now(),r=ol(t.videoElement),a={width:null!==(u=null===(l=t.videoElement.getBoundingClientRect())||void 0===l?void 0:l.width)&&void 0!==u?u:0,height:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==d?d:0},o=await h.handleFrame({frame:r,deviceInfo:a}),s=Date.now()-e+50;g.addStats(o,s),h.stats=g,await sl({context:h,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError,hasBarcode:Nl})}if("selfie"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;Qo("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s;const l=new vl(new Bl,30);zl(!0);const u=new Dl;for(;l.state.name!==il.ACCEPTED&&Fl;){const e=Date.now(),c=ol(t.videoElement),d={width:null!==(a=null===(r=t.videoElement.getBoundingClientRect())||void 0===r?void 0:r.width)&&void 0!==a?a:0,height:null!==(s=null===(o=t.videoElement.getBoundingClientRect())||void 0===o?void 0:o.height)&&void 0!==s?s:0},h=await l.handleFrame({frame:c,deviceInfo:d}),g=Date.now()-e;u.addStats(h,g),l.stats=u,await sl({context:l,onDetect:i,showError:n,frame:c,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}}return a&&g(t),(async e=>{var t,i,n,r;const a=Zo.createPageViewEvent(e);await Yo(null===(t=qo.state)||void 0===t?void 0:t.step,null===(i=qo.state)||void 0===i?void 0:i.userToken,null===(n=qo.state)||void 0===n?void 0:n.sessionId,null===(r=qo.state)||void 0===r?void 0:r.clientId,a)})(t),l.startVideoFeed(Ss(t)).then((()=>{o=!0})).catch((async e=>{throw await Ol(t,e),e})),u.component},ql=()=>{Fo({type:"start-verification-processing",step:qo.state.step}),zo("processing","processing",qo.state.sessionId);const e=Kl("processing-verification");ws(e,el({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await xs(qo.state.sessionId,qo.state.userToken,qo.state.clientId);r(e)},i=()=>{setTimeout(t,3e3)},n=async e=>{qo.dispatch("setStep",e.status),qo.dispatch("setStatus",e.status)},r=async e=>{var t,r,a;if(qo.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){Bs.getInstance().stopStream();const i=Zo.createProcessingCompleteEvent();await Yo(qo.state.step,qo.state.userToken,null===(t=qo.state)||void 0===t?void 0:t.sessionId,null===(r=qo.state)||void 0===r?void 0:r.clientId,i),n(e),zo("complete",e.status,qo.state.sessionId),function(e,t,i){Fo({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",qo.state.sessionId,e.callback_url),a=Io,sessionStorage.removeItem(a)}else"recapture"===(null==e?void 0:e.status)?(n(e),qo.dispatch("setIsCapturingProcessStarted",!1),zo("recapture",e.status,qo.state.sessionId),function(e,t,i){Fo({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?Po("processing","session-expired",`Session expired for session id: ${qo.state.sessionId}`):i();else"processing"!==e.state&&(n(e),i())};return t(),e},Kl=e=>ys({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function $l(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const n=function(e){switch(e){case"processing":return ql;case"document_front":case"document_back":case"selfie":return jl;default:throw new Error("Invalid step")}}(e);ws(t,n({step:e}))}function Vl(e){let{key:t,state:i}=e;const n=i.rootElementId,r=document.getElementById(n);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&$l(i.step,r),r&&"processing"===i.step&&(r.style.visibility="hidden")}function Hl(){const e=_s(Mo(Io));if(!_s)throw console.log("Error restarting session, stored session data is invalid or missing"),new Error("Error restarting session, stored session data is invalid or missing");const t=e.sessionId,i=e.userToken;return qo.dispatch("setSessionId",t),qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function Gl(){var e,t;if(null===(e=qo.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await Wl(),Qo("all models loaded - auto-capture enabled")}catch(e){qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=qo.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),Qo("Model loading did not complete on time:",e);Jo(`timed out loading models: ${as.filter((e=>rs[e].status!==ns.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(rs).filter((e=>e.status===ns.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=Zo.createSdkInitEvent(e,t);await Xo("init",i)}(Date.now()-e,i)}}async function Zl(e){var t;try{await Bs.getInstance().startNewStream({video:u(u({},Us("environment",null===(t=qo.state)||void 0===t?void 0:t.videoCaptureSettings)),{},{deviceId:await Ls("environment")})}),function(e,t){Fo({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const n=document.getElementById(i);n.style.visibility="visible",$l(e.shift(),n)}(qo.state.missingImages,qo.state.sessionId,qo.state.rootElementId)}catch(e){await Ol("init",e)}}async function Yl(e){let{status:t,sessionId:i,userToken:n,missingImages:r,rootElementId:a,language:o}=e;!function(e,t){Fo({type:"session-granted",step:e,sessionId:t})}("init",i),qo.dispatch("setStatus",t),qo.dispatch("setSessionId",i),qo.dispatch("setUserToken",n),qo.dispatch("setMissingImages",r),qo.dispatch("setRootElement",a),qo.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";ks.overrideLanguage(As[i]||As.en);let n=document.getElementById(t);if(!n){n=ys({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:t,testid:"root"});const e=document.createElement("style");e.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${t} #trigger-section {\n margin: 0 !important;\n }\n #${t} #page-header {\n height: 5% !important;\n }\n }\n `,ws(document.head,e),ws(document.body,n)}}(qo.state.sessionId,qo.state.rootElementId,qo.state.language),function(){try{Do.events.off(To,Vl)}catch(e){}Do.events.on(To,Vl)}(),await Gl(),await Zl(i)}const Wl=async()=>{const e=qo.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([os(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function Jl(e){if(qo.state.isCapturingProcessStarted)return void Oo(qo.state.step,"trying-to-initialize-active-session");let t,i;if(e){const n=await async function(e){let t,i;try{const n=await bs(e,qo.state.consentVersion,qo.state.clientId);return t=n.sessionId,i=n.userToken,qo.dispatch("setSessionId",t),qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=n.sessionId,i=n.userToken}else{const e=Hl();t=e.sessionId,i=e.userToken}if(!t)return void Oo(qo.state.step,"other");const{missing_images:n,status:r}=await xs(t,i,qo.state.clientId);return qo.dispatch("setIsCapturingProcessStarted",!0),await Yl({status:r,sessionId:t,userToken:i,missingImages:n,rootElementId:qo.state.rootElementId,language:qo.state.language}),!0}async function Xl(e){try{return await Jl(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}}async function Ql(){try{return await async function(){if("recapture"===qo.state.verificationStatus||"pending"===qo.state.verificationStatus){const{sessionId:e,userToken:t}=Hl(),{missing_images:i,status:n}=await xs(e,t,qo.state.clientId);return await Yl({status:n,sessionId:e,userToken:t,missingImages:i,rootElementId:qo.state.rootElementId,language:qo.state.language}),!0}Oo(qo.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}async function eu(){return Ql()}const tu=()=>fa;const iu={initialize:o,...Object.freeze({__proto__:null,recapture:Ql,restart:eu,start:Xl,version:tu})};exports.PACKAGE_VERSION="1.16.2",exports.idv=iu,exports.initialize=o,exports.recapture=Ql,exports.restart=eu,exports.start=Xl,exports.version=tu;