@transmitsecurity/platform-web-sdk 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +479 -0
- package/README.md +72 -0
- package/VITE_CONFIG.md +107 -0
- package/build/drs-entry.d.ts +20 -0
- package/build/drs-entry.js +19 -0
- package/build/drs-only.d.ts +22 -0
- package/build/drs-only.js +25 -0
- package/build/drs.d.ts +13 -0
- package/build/drs.js +45 -0
- package/build/ido-entry.d.ts +17 -0
- package/build/ido-entry.js +19 -0
- package/build/ido.d.ts +8 -0
- package/build/ido.js +27 -0
- package/build/idv-entry.d.ts +17 -0
- package/build/idv-entry.js +19 -0
- package/build/idv.d.ts +8 -0
- package/build/idv.js +27 -0
- package/build/initialize-only.d.ts +7 -0
- package/build/initialize-only.js +40 -0
- package/build/initialize.d.ts +1 -0
- package/build/initialize.js +2 -0
- package/build/mainExport.d.ts +16 -0
- package/build/mainExport.js +43 -0
- package/build/sdk-factory.d.ts +109 -0
- package/build/sdk-factory.js +108 -0
- package/build/shared-state.d.ts +4 -0
- package/build/shared-state.js +32 -0
- package/build/webauthn-entry.d.ts +19 -0
- package/build/webauthn-entry.js +19 -0
- package/build/webauthn.d.ts +12 -0
- package/build/webauthn.js +44 -0
- package/bundler-config.json +15 -0
- package/dist/docs/.nojekyll +1 -0
- package/dist/docs/README.md +72 -0
- package/dist/docs/enums/ErrorCode.md +113 -0
- package/dist/docs/interfaces/ActionEventOptions.md +44 -0
- package/dist/docs/interfaces/ActionResponse.md +9 -0
- package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +61 -0
- package/dist/docs/interfaces/AutofillHandlers.md +50 -0
- package/dist/docs/interfaces/CrossDeviceController.md +27 -0
- package/dist/docs/interfaces/SdkError.md +28 -0
- package/dist/docs/interfaces/WebauthnApis.md +73 -0
- package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +52 -0
- package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +107 -0
- package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +23 -0
- package/dist/docs/interfaces/WebauthnRegistrationOptions.md +55 -0
- package/dist/docs/interfaces/initConfigParams.md +7 -0
- package/dist/docs/modules/drs.md +92 -0
- package/dist/docs/modules/idv.md +106 -0
- package/dist/docs/modules/webauthn.md +197 -0
- package/dist/docs/modules.md +146 -0
- package/dist/drs.cjs +1 -0
- package/dist/drs.d.ts +241 -0
- package/dist/drs.js +1 -0
- package/dist/ido.cjs +1 -0
- package/dist/ido.d.ts +8 -0
- package/dist/ido.js +1 -0
- package/dist/idv.cjs +1 -0
- package/dist/idv.d.ts +68 -0
- package/dist/idv.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.umd.js +1 -0
- package/dist/ts-platform-websdk.js +1 -0
- package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -0
- package/dist/web-sdk.d.ts +1737 -0
- package/dist/webauthn.cjs +1 -0
- package/dist/webauthn.d.ts +461 -0
- package/dist/webauthn.js +1 -0
- package/package.json +98 -0
- package/scripts/make-semver-aliases.sh +11 -0
- package/scripts/upload-dist.sh +6 -0
- package/src/mainExport.ts +75 -0
- package/src/tsconfig.json +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));var tsPlatform=function(e){"use strict";function t(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function i(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?t(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;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 n(e,t,i){return(t=r(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){if(null==e)return{};var i,r,n=function(e,t){if(null==e)return{};var i,r,n={},a=Object.keys(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function o(e,t){return Object.entries(t).reduce(((t,r)=>{let[n,a]=r;return i(i({},t),{},{[n]:s.isPrototypeOf(a)?new a(e.slug):"function"==typeof a?a.bind(e):"object"==typeof a&&!Array.isArray(a)&&a?o(e,a):a})}),{})}class s{constructor(e){this.slug=e}static create(e){return class extends s{constructor(t){super(t),Object.assign(this,o(this,e(this)))}}}}var c=Object.freeze({__proto__:null,Agent:s});const d=new Map;function u(e,t){var i,r;null===(i=d.get(e))||void 0===i||i.forEach((r=e=>e(t),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}const l=Symbol("MODULE_INITIALIZED");var h=Object.freeze({__proto__:null,MODULE_INITIALIZED:l,emit:u,off:function(e,t){const i=d.get(e);if(!i)return;const r=i.indexOf(t);-1!==r&&i.splice(r,1)},on:function(e,t){var i;d.has(e)?null===(i=d.get(e))||void 0===i||i.push(t):d.set(e,[t])}});let f=null;function p(e){f=e}var g=Object.freeze({__proto__:null,getInitConfig:function(){return f},get initConfig(){return f},setInitConfig:p});function m(e){p(e),u(l,void 0)}var b=Object.freeze({__proto__:null,initialize:m});function v(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 y(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 _="tsec",w="general";function x(e){return e?w:f.clientId}function A(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(_))}function E(e,t){const i=e?sessionStorage:localStorage,r=t(A(e));i.setItem(_,JSON.stringify(r))}var S=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:_,GENERAL_ID_KEY:w,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=x(!!t.isGeneral),r=A(!!t.sessionOnly),[n]=v(r,[this.slug.toString(),i]);return n[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=x(!!t.isGeneral),r=A(!!t.sessionOnly);return y(r,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=x(!!t.isGeneral);E(!!t.sessionOnly,(t=>{const[r,n]=v(t,[this.slug.toString(),i]);return delete r[e],n}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=x(!!i.isGeneral);E(!!i.sessionOnly,(i=>{const[n,a]=v(i,[this.slug.toString(),r]);return n[e]=t,a}))}});const k="RSA-OAEP",M="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),I=async()=>await C(k,["encrypt","decrypt"]),D=async()=>await C(M,["sign"]),T=async(e,t)=>await window.crypto.subtle.encrypt({name:k},t,e),R=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:M,saltLength:32},e,i)};class z{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 r=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);r.onupgradeneeded=()=>{var t;const i=r.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"})},r.onsuccess=()=>{const n=r.result,a=n.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{n.close()}}}put(e,t,i){return new Promise(((r,n)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{r(a.result)},a.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}get(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.get(t);n.onsuccess=()=>{var e;n.result?i(null===(e=n.result)||void 0===e?void 0:e.value):i(void 0)},n.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.getAll(null,t);n.onsuccess=()=>{if(n.result){const e=n.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},n.onerror=e=>{r("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.delete(t);n.onsuccess=()=>{i()},n.onerror=e=>{r(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const r=e.clear();r.onsuccess=()=>{t()},r.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const B="platform";class P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,n,a,o;this.agent=e,this.keysType=t,this.options=i;const s=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=s||!(null===(n=this.options)||void 0===n?void 0:n.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=s?1:(null===(a=this.options)||void 0===a?void 0:a.dbVersion)||1,this.keysStoreName=s||!(null===(o=this.options)||void 0===o?void 0:o.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new z(s?B:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new z((s?B:e.slug)+`:${f.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${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 D():await I()}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(){const e=this.getKeysRecordKey();let t=await this.indexedDBClient.get(this.keysStoreName,e);if(!t){if(t=await this.indexedDBClientFallback.get(this.keysStoreName,e),!t){const e=await this.generateKeyPair(),{arrayBufferKey:r,base64Key:n}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=n,this.keyIdentifier=await this.calcKeyIdentifier(r),t=i(i({},e),{},{keyIdentifier:this.keyIdentifier})}await this.indexedDBClient.put(this.keysStoreName,e,t)}if(!this.publicKeyBase64){const{base64Key:e}=await this.getPKRepresentations(t.publicKey);this.publicKeyBase64=e,this.keyIdentifier=t.keyIdentifier}return t}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 R(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async encrypt(e){if("encrypt"==this.keysType){const{privateKey:t}=await this.extractKeysData();return await T(e,t)}throw new Error("keysType must be 'encrypt' in order to use encryption keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}}var F=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 P(this,e,t)},decryptAssymetric:async(e,t)=>new Uint8Array(await window.crypto.subtle.decrypt({name:k},t,e)),encryptAssymetric:T,generateRSAKeyPair:I,generateRSASignKeyPair:D,signAssymetric:R,verifyAssymetric:async(e,t,i)=>{const r=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(M,e,i,r)}}),O=Object.freeze({__proto__:null});const N=s.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 L=s.create((()=>i({exceptions:N},c)));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 r=this.middlewares.map((e=>e(this)));Promise.all(r).catch((()=>{}))}}var U=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 q(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",r=new URL(i);r.search=(null==t?void 0:t.toString())||"",r.pathname=e;return r.href.replace(i,"")}const H={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function K(e,t,r){var n;const a=(o=t||{},encodeURI(JSON.stringify(o)).split(/%..|./).length-1);var o;return{method:e,headers:i(i(i({},{"X-TS-body-size":String(a)}),H),r||{}),body:null!==(n=t&&JSON.stringify(t||{}))&&void 0!==n?n:void 0}}function V(e,t,i,r,n){const a=q(e,r),o=K(t,i,n);return fetch(a,o)}async function $(e,t,i,r,n){let a;if(a=await V(e,t,i,r,n),!a.ok)throw new Error("Request failed");return a}var J=Object.freeze({__proto__:null,httpDelete:async function(e,t){const r=await $(e,"DELETE",void 0,void 0,t);return i(i({data:await r.json()},r),{},{headers:r.headers})},httpGet:async function(e,t,r){const n=await $(e,"GET",void 0,t,r);return i(i({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,t,r,n){const a=await $(e,"POST",t,r,n);return i(i({data:await a.json()},a),{},{headers:a.headers})},httpPut:async function(e,t,r,n){const a=await $(e,"PUT",t,r,n);return i(i({data:await a.json()},a),{},{headers:a.headers})},init:K}),G=s.create((()=>({events:h,moduleMetadata:g,mainEntry:b,utils:L,storage:S,crypto:F,indexedDB:O,logger:U,http:J})));function W(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Z(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}var Y,Q,X,ee,te,ie,re,ne,ae,oe,se={},ce={},de={};function ue(){if(Y)return de;Y=1;function e(e){let t=e.length;for(;--t>=0;)e[t]=0}const t=256,i=286,r=30,n=15,a=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]),o=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]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const u=new Array(60);e(u);const l=new Array(512);e(l);const h=new Array(256);e(h);const f=new Array(29);e(f);const p=new Array(r);function g(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}let m,b,v;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}e(p);const _=e=>e<256?l[e]:l[256+(e>>>7)],w=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},x=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,w(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)},A=(e,t,i)=>{x(e,i[2*t],i[2*t+1])},E=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},S=(e,t,i)=>{const r=new Array(16);let a,o,s=0;for(a=1;a<=n;a++)r[a]=s=s+i[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=E(r[t]++,t))}},k=e=>{let t;for(t=0;t<i;t++)e.dyn_ltree[2*t]=0;for(t=0;t<r;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},M=e=>{e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},C=(e,t,i,r)=>{const n=2*t,a=2*i;return e[n]<e[a]||e[n]===e[a]&&r[t]<=r[i]},I=(e,t,i)=>{const r=e.heap[i];let n=i<<1;for(;n<=e.heap_len&&(n<e.heap_len&&C(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!C(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r},D=(e,i,r)=>{let n,s,c,d,u=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],s=e.pending_buf[e.l_buf+u],u++,0===n?A(e,s,i):(c=h[s],A(e,c+t+1,i),d=a[c],0!==d&&(s-=f[c],x(e,s,d)),n--,c=_(n),A(e,c,r),d=o[c],0!==d&&(n-=p[c],x(e,n,d)))}while(u<e.last_lit);A(e,256,i)},T=(e,t)=>{const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let s,c,d,u=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<o;s++)0!==i[2*s]?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):i[2*s+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=u<2?++u:0,i[2*d]=1,e.depth[d]=0,e.opt_len--,a&&(e.static_len-=r[2*d+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)I(e,i,s);d=o;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],I(e,i,1),c=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=c,i[2*d]=i[2*s]+i[2*c],e.depth[d]=(e.depth[s]>=e.depth[c]?e.depth[s]:e.depth[c])+1,i[2*s+1]=i[2*c+1]=d,e.heap[1]=d++,I(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,c=t.stat_desc.extra_base,d=t.stat_desc.max_length;let u,l,h,f,p,g,m=0;for(f=0;f<=n;f++)e.bl_count[f]=0;for(i[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],f=i[2*i[2*l+1]+1]+1,f>d&&(f=d,m++),i[2*l+1]=f,l>r||(e.bl_count[f]++,p=0,l>=c&&(p=s[l-c]),g=i[2*l],e.opt_len+=g*(f+p),o&&(e.static_len+=g*(a[2*l+1]+p)));if(0!==m){do{for(f=d-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[d]--,m-=2}while(m>0);for(f=d;0!==f;f--)for(l=e.bl_count[f];0!==l;)h=e.heap[--u],h>r||(i[2*h+1]!==f&&(e.opt_len+=(f-i[2*h+1])*i[2*h],i[2*h+1]=f),l--)}})(e,t),S(i,u,e.bl_count)},R=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++s<c&&n===o||(s<d?e.bl_tree[2*n]+=s:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4))},z=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++s<c&&n===o)){if(s<d)do{A(e,n,e.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(A(e,n,e.bl_tree),s--),A(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(A(e,17,e.bl_tree),x(e,s-3,3)):(A(e,18,e.bl_tree),x(e,s-11,7));s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4)}};let B=!1;const P=(e,t,i,r)=>{x(e,0+(r?1:0),3),((e,t,i,r)=>{M(e),r&&(w(e,i),w(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};return de._tr_init=e=>{B||((()=>{let e,t,c,y,_;const w=new Array(16);for(c=0,y=0;y<28;y++)for(f[y]=c,e=0;e<1<<a[y];e++)h[c++]=y;for(h[c-1]=y,_=0,y=0;y<16;y++)for(p[y]=_,e=0;e<1<<o[y];e++)l[_++]=y;for(_>>=7;y<r;y++)for(p[y]=_<<7,e=0;e<1<<o[y]-7;e++)l[256+_++]=y;for(t=0;t<=n;t++)w[t]=0;for(e=0;e<=143;)d[2*e+1]=8,e++,w[8]++;for(;e<=255;)d[2*e+1]=9,e++,w[9]++;for(;e<=279;)d[2*e+1]=7,e++,w[7]++;for(;e<=287;)d[2*e+1]=8,e++,w[8]++;for(S(d,287,w),e=0;e<r;e++)u[2*e+1]=5,u[2*e]=E(e,5);m=new g(d,a,257,i,n),b=new g(u,o,0,r,n),v=new g(new Array(0),s,0,19,7)})(),B=!0),e.l_desc=new y(e.dyn_ltree,m),e.d_desc=new y(e.dyn_dtree,b),e.bl_desc=new y(e.bl_tree,v),e.bi_buf=0,e.bi_valid=0,k(e)},de._tr_stored_block=P,de._tr_flush_block=(e,i,r,n)=>{let a,o,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let i,r=4093624447;for(i=0;i<=31;i++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*i])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(i=32;i<t;i++)if(0!==e.dyn_ltree[2*i])return 1;return 0})(e)),T(e,e.l_desc),T(e,e.d_desc),s=(e=>{let t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),T(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=r+5,r+4<=a&&-1!==i?P(e,i,r,n):4===e.strategy||o===a?(x(e,2+(n?1:0),3),D(e,d,u)):(x(e,4+(n?1:0),3),((e,t,i,r)=>{let n;for(x(e,t-257,5),x(e,i-1,5),x(e,r-4,4),n=0;n<r;n++)x(e,e.bl_tree[2*c[n]+1],3);z(e,e.dyn_ltree,t-1),z(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),D(e,e.dyn_ltree,e.dyn_dtree)),k(e),n&&M(e)},de._tr_tally=(e,i,r)=>(e.pending_buf[e.d_buf+2*e.last_lit]=i>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&i,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===i?e.dyn_ltree[2*r]++:(e.matches++,i--,e.dyn_ltree[2*(h[r]+t+1)]++,e.dyn_dtree[2*_(i)]++),e.last_lit===e.lit_bufsize-1),de._tr_align=e=>{x(e,2,3),A(e,256,d),(e=>{16===e.bi_valid?(w(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)},de}function le(){return re?ie:(re=1,ie={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"})}function he(){return ae?ne:(ae=1,ne={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})}function fe(){if(oe)return ce;oe=1;const{_tr_init:e,_tr_stored_block:t,_tr_flush_block:i,_tr_tally:r,_tr_align:n}=ue(),a=(X||(X=1,Q=(e,t,i,r)=>{let n=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{n=n+t[r++]|0,a=a+n|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}),Q),o=function(){if(te)return ee;te=1;const e=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());return ee=(t,i,r,n)=>{const a=e,o=n+r;t^=-1;for(let e=n;e<o;e++)t=t>>>8^a[255&(t^i[e])];return-1^t},ee}(),s=le(),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:d,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:h,Z_OK:f,Z_STREAM_END:p,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_BUF_ERROR:b,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:y,Z_HUFFMAN_ONLY:_,Z_RLE:w,Z_FIXED:x,Z_DEFAULT_STRATEGY:A,Z_UNKNOWN:E,Z_DEFLATED:S}=he(),k=258,M=262,C=103,I=113,D=666,T=(e,t)=>(e.msg=s[t],t),R=e=>(e<<1)-(e>4?9:0),z=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let B=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const P=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))},F=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,P(e.strm)},O=(e,t)=>{e.pending_buf[e.pending++]=t},N=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},L=(e,t,i,r)=>{let n=e.avail_in;return n>r&&(n=r),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),i),1===e.state.wrap?e.adler=a(e.adler,t,n,i):2===e.state.wrap&&(e.adler=o(e.adler,t,n,i)),e.next_in+=n,e.total_in+=n,n)},j=(e,t)=>{let i,r,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,d=e.window,u=e.w_mask,l=e.prev,h=e.strstart+k;let f=d[a+o-1],p=d[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,d[i+o]===p&&d[i+o-1]===f&&d[i]===d[a]&&d[++i]===d[a+1]){a+=2,i++;do{}while(d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&a<h);if(r=k-(h-a),a=h-k,r>o){if(e.match_start=t,o=r,r>=s)break;f=d[a+o-1],p=d[a+o]}}}while((t=l[t&u])>c&&0!=--n);return o<=e.lookahead?o:e.lookahead},U=e=>{const t=e.w_size;let i,r,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,i=r;do{n=e.head[--i],e.head[i]=n>=t?n-t:0}while(--r);r=t,i=r;do{n=e.prev[--i],e.prev[i]=n>=t?n-t:0}while(--r);a+=t}if(0===e.strm.avail_in)break;if(r=L(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=B(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=B(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<M&&0!==e.strm.avail_in)},q=(e,t)=>{let i,n;for(;;){if(e.lookahead<M){if(U(e),e.lookahead<M&&t===c)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=B(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-M&&(e.match_length=j(e,i)),e.match_length>=3)if(n=r(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=B(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=B(e,e.ins_h,e.window[e.strstart+1]);else n=r(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===l?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2},H=(e,t)=>{let i,n,a;for(;;){if(e.lookahead<M){if(U(e),e.lookahead<M&&t===c)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=B(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-M&&(e.match_length=j(e,i),e.match_length<=5&&(e.strategy===y||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,n=r(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=B(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&&(F(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=r(e,0,e.window[e.strstart-1]),n&&F(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=r(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===l?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2};function K(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}const V=[new K(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(U(e),0===e.lookahead&&t===c)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+i;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,F(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-M&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===l?(F(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),1)})),new K(4,4,8,4,q),new K(4,5,16,8,q),new K(4,6,32,32,q),new K(4,4,16,16,H),new K(8,16,32,32,H),new K(8,16,128,128,H),new K(8,32,128,256,H),new K(32,128,258,1024,H),new K(32,258,258,4096,H)];function $(){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=S,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),z(this.dyn_ltree),z(this.dyn_dtree),z(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),z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),z(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 J=t=>{if(!t||!t.state)return T(t,g);t.total_in=t.total_out=0,t.data_type=E;const i=t.state;return i.pending=0,i.pending_out=0,i.wrap<0&&(i.wrap=-i.wrap),i.status=i.wrap?42:I,t.adler=2===i.wrap?0:1,i.last_flush=c,e(i),f},G=e=>{const t=J(e);return t===f&&(e=>{e.window_size=2*e.w_size,z(e.head),e.max_lazy_match=V[e.level].max_lazy,e.good_match=V[e.level].good_length,e.nice_match=V[e.level].nice_length,e.max_chain_length=V[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},W=(e,t,i,r,n,a)=>{if(!e)return g;let o=1;if(t===v&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>9||i!==S||r<8||r>15||t<0||t>9||a<0||a>x)return T(e,g);8===r&&(r=9);const s=new $;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+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<<n+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,G(e)};return ce.deflateInit=(e,t)=>W(e,t,S,15,8,A),ce.deflateInit2=W,ce.deflateReset=G,ce.deflateResetKeep=J,ce.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?g:(e.state.gzhead=t,f):g,ce.deflate=(e,i)=>{let a,s;if(!e||!e.state||i>h||i<0)return e?T(e,g):g;const m=e.state;if(!e.output||!e.input&&0!==e.avail_in||m.status===D&&i!==l)return T(e,0===e.avail_out?b:g);m.strm=e;const v=m.last_flush;if(m.last_flush=i,42===m.status)if(2===m.wrap)e.adler=0,O(m,31),O(m,139),O(m,8),m.gzhead?(O(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),O(m,255&m.gzhead.time),O(m,m.gzhead.time>>8&255),O(m,m.gzhead.time>>16&255),O(m,m.gzhead.time>>24&255),O(m,9===m.level?2:m.strategy>=_||m.level<2?4:0),O(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(O(m,255&m.gzhead.extra.length),O(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(e.adler=o(e.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(O(m,0),O(m,0),O(m,0),O(m,0),O(m,0),O(m,9===m.level?2:m.strategy>=_||m.level<2?4:0),O(m,3),m.status=I);else{let t=S+(m.w_bits-8<<4)<<8,i=-1;i=m.strategy>=_||m.level<2?0:m.level<6?1:6===m.level?2:3,t|=i<<6,0!==m.strstart&&(t|=32),t+=31-t%31,m.status=I,N(m,t),0!==m.strstart&&(N(m,e.adler>>>16),N(m,65535&e.adler)),e.adler=1}if(69===m.status)if(m.gzhead.extra){for(a=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),P(e),a=m.pending,m.pending!==m.pending_buf_size));)O(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){a=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),P(e),a=m.pending,m.pending===m.pending_buf_size)){s=1;break}s=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0,O(m,s)}while(0!==s);m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),0===s&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){a=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),P(e),a=m.pending,m.pending===m.pending_buf_size)){s=1;break}s=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0,O(m,s)}while(0!==s);m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),0===s&&(m.status=C)}else m.status=C;if(m.status===C&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&P(e),m.pending+2<=m.pending_buf_size&&(O(m,255&e.adler),O(m,e.adler>>8&255),e.adler=0,m.status=I)):m.status=I),0!==m.pending){if(P(e),0===e.avail_out)return m.last_flush=-1,f}else if(0===e.avail_in&&R(i)<=R(v)&&i!==l)return T(e,b);if(m.status===D&&0!==e.avail_in)return T(e,b);if(0!==e.avail_in||0!==m.lookahead||i!==c&&m.status!==D){let a=m.strategy===_?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(U(e),0===e.lookahead)){if(t===c)return 1;break}if(e.match_length=0,i=r(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===l?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(m,i):m.strategy===w?((e,t)=>{let i,n,a,o;const s=e.window;for(;;){if(e.lookahead<=k){if(U(e),e.lookahead<=k&&t===c)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,n=s[a],n===s[++a]&&n===s[++a]&&n===s[++a])){o=e.strstart+k;do{}while(n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&a<o);e.match_length=k-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=r(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=r(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===l?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(m,i):V[m.level].func(m,i);if(3!==a&&4!==a||(m.status=D),1===a||3===a)return 0===e.avail_out&&(m.last_flush=-1),f;if(2===a&&(i===d?n(m):i!==h&&(t(m,0,0,!1),i===u&&(z(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),P(e),0===e.avail_out))return m.last_flush=-1,f}return i!==l?f:m.wrap<=0?p:(2===m.wrap?(O(m,255&e.adler),O(m,e.adler>>8&255),O(m,e.adler>>16&255),O(m,e.adler>>24&255),O(m,255&e.total_in),O(m,e.total_in>>8&255),O(m,e.total_in>>16&255),O(m,e.total_in>>24&255)):(N(m,e.adler>>>16),N(m,65535&e.adler)),P(e),m.wrap>0&&(m.wrap=-m.wrap),0!==m.pending?f:p)},ce.deflateEnd=e=>{if(!e||!e.state)return g;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==C&&t!==I&&t!==D?T(e,g):(e.state=null,t===I?T(e,m):f)},ce.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return g;const r=e.state,n=r.wrap;if(2===n||1===n&&42!==r.status||r.lookahead)return g;if(1===n&&(e.adler=a(e.adler,t,i,0)),r.wrap=0,i>=r.w_size){0===n&&(z(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(i-r.w_size,i),0),t=e,i=r.w_size}const o=e.avail_in,s=e.next_in,c=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,U(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=B(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,U(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=c,e.avail_in=o,r.wrap=n,f},ce.deflateInfo="pako deflate (from Nodeca project)",ce}var pe,ge={};var me,be,ve,ye,_e={};function we(){if(me)return _e;me=1;let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const t=new Uint8Array(256);for(let e=0;e<256;e++)t[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;t[254]=t[254]=1,_e.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,r,n,a,o=e.length,s=0;for(n=0;n<o;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,n=0;a<s;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),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};return _e.buf2string=(i,r)=>{const n=r||i.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(i.subarray(0,r));let a,o;const s=new Array(2*n);for(o=0,a=0;a<n;){let e=i[a++];if(e<128){s[o++]=e;continue}let r=t[e];if(r>4)s[o++]=65533,a+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&a<n;)e=e<<6|63&i[a++],r--;r>1?s[o++]=65533:e<65536?s[o++]=e:(e-=65536,s[o++]=55296|e>>10&1023,s[o++]=56320|1023&e)}}return((t,i)=>{if(i<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let r="";for(let e=0;e<i;e++)r+=String.fromCharCode(t[e]);return r})(s,o)},_e.utf8border=(e,i)=>{(i=i||e.length)>e.length&&(i=e.length);let r=i-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?i:r+t[e[r]]>i?r:i},_e}var xe=function(){if(ye)return se;ye=1;const e=fe(),t=function(){if(pe)return ge;pe=1;const e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);return ge.assign=function(t){const i=Array.prototype.slice.call(arguments,1);for(;i.length;){const r=i.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const i in r)e(r,i)&&(t[i]=r[i])}}return t},ge.flattenChunks=e=>{let t=0;for(let i=0,r=e.length;i<r;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,r=0,n=e.length;t<n;t++){let n=e[t];i.set(n,r),r+=n.length}return i},ge}(),i=we(),r=le(),n=ve?be:(ve=1,be=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}),a=Object.prototype.toString,{Z_NO_FLUSH:o,Z_SYNC_FLUSH:s,Z_FULL_FLUSH:c,Z_FINISH:d,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:h,Z_DEFAULT_STRATEGY:f,Z_DEFLATED:p}=he();function g(o){this.options=t.assign({level:h,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:f},o||{});let s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;let c=e.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(c!==u)throw new Error(r[c]);if(s.header&&e.deflateSetHeader(this.strm,s.header),s.dictionary){let t;if(t="string"==typeof s.dictionary?i.string2buf(s.dictionary):"[object ArrayBuffer]"===a.call(s.dictionary)?new Uint8Array(s.dictionary):s.dictionary,c=e.deflateSetDictionary(this.strm,t),c!==u)throw new Error(r[c]);this._dict_set=!0}}function m(e,t){const i=new g(t);if(i.push(e,!0),i.err)throw i.msg||r[i.err];return i.result}return g.prototype.push=function(t,r){const n=this.strm,h=this.options.chunkSize;let f,p;if(this.ended)return!1;for(p=r===~~r?r:!0===r?d:o,"string"==typeof t?n.input=i.string2buf(t):"[object ArrayBuffer]"===a.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(h),n.next_out=0,n.avail_out=h),(p===s||p===c)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(f=e.deflate(n,p),f===l)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),f=e.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===u;if(0!==n.avail_out){if(p>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===u&&(this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},se.Deflate=g,se.deflate=m,se.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},se.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)},se.constants=he(),se}();const Ae=["enabled","userId"];var Ee,Se,ke=["drs"];Ee=ke,Se=143,function(e){for(;--e;)Ee.push(Ee.shift())}(++Se);var Me,Ce,Ie,De=new G((Me="0x0",ke[Me-=0])),Te=["removeItemSessionStorageSafe","getItemLocalStorageSafe","setItemLocalStorageSafe","localStorage","removeItem","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","setClientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","setItem"];Ce=Te,Ie=215,function(e){for(;--e;)Ce.push(Ce.shift())}(++Ie);var Re=function(e,t){return Te[e-=0]};class ze{constructor(e){this[Re("0x0")]={},this[Re("0x1")]={},this[Re("0x2")]=e}[Re("0x3")](){return this[Re("0x2")]}[Re("0x4")](e){this[Re("0x2")]=e}[Re("0x5")](e){return this[Re("0x2")]+"_"+e}[Re("0x6")](e){const t=this[Re("0x5")](e);try{return window[Re("0x7")].getItem(t)}catch(e){return this[Re("0x0")][t]}}setItemSessionStorageSafe(e,t){const i=this.getFullStorageKey(e);try{window[Re("0x7")][Re("0x8")](i,t)}catch(e){this[Re("0x0")][i]=t}}[Re("0x9")](e){const t=this.getFullStorageKey(e);try{window[Re("0x7")].removeItem(t)}catch(e){this[Re("0x0")][t]=void 0}}[Re("0xa")](e){const t=this[Re("0x5")](e);try{return window.localStorage.getItem(t)}catch(e){return this[Re("0x1")][t]}}[Re("0xb")](e,t){const i=this[Re("0x5")](e);try{window[Re("0xc")][Re("0x8")](i,t)}catch(e){this[Re("0x1")][i]=t}}removeItemLocalStorageSafe(e){const t=this[Re("0x5")](e);try{window[Re("0xc")][Re("0xd")](t)}catch(e){this[Re("0x1")][t]=void 0}}}var Be,Pe,Fe=["enabled","[AccountProtection SDK]","logsLimit","logs","middlewares","info","pushLog","warn","error","log","%s %s %s","logPrefix","stringify","push","now","formatter","unshift","map","all","catch"];Be=Fe,Pe=100,function(e){for(;--e;)Be.push(Be.shift())}(++Pe);var Oe=function(e,t){return Fe[e-=0]};class Ne{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[Oe("0x0")]=e,this.logPrefix=Oe("0x1"),this[Oe("0x2")]=1e4,this[Oe("0x3")]=[],this[Oe("0x4")]=[]}[Oe("0x5")](e,t){this[Oe("0x6")](3,e,t)}[Oe("0x7")](e,t){this.pushLog(4,e,t)}[Oe("0x8")](e,t){this[Oe("0x6")](5,e,t)}flush(){const e=this[Oe("0x3")];return this[Oe("0x3")]=[],e}pushLog(e,t,r){this.enabled&&console[Oe("0x9")](Oe("0xa"),this[Oe("0xb")],t,JSON[Oe("0xc")](r)),this[Oe("0x3")][Oe("0xd")]({timestamp:Date[Oe("0xe")](),severity:e,text:JSON[Oe("0xc")](i(i({},r),{},{message:t}),this[Oe("0xf")])}),this[Oe("0x3")].length>this.logsLimit&&this.logs[Oe("0x10")]();const n=this.middlewares[Oe("0x11")]((e=>e()));Promise[Oe("0x12")](n)[Oe("0x13")]((()=>{}))}formatter(e,t){if(t instanceof Error){const{name:e,stack:i,message:r}=t;return{name:e,stack:i,message:r}}return t}}const Le=new Ne;var je,Ue,qe=["ric","requestsManager","loadConf","fetchConf","getData","error","storageManager","getItemLocalStorageSafe","parse","error loading config","shouldUpdateConf","getConfValue","now","refreshConf","length","setItemLocalStorageSafe","stringify","conf","timestamp"];je=qe,Ue=417,function(e){for(;--e;)je.push(je.shift())}(++Ue);var He=function(e,t){return qe[e-=0]};const Ke=He("0x0"),Ve=He("0x1");class $e{constructor(e,t){this.storageManager=e,this[He("0x2")]=t,this.conf=this[He("0x3")]()}async[He("0x4")](e){try{const t="device/conf?tenantId="+e,i=await this[He("0x2")][He("0x5")](t);return null!=i?i:{}}catch(t){return Le[He("0x6")]("error fetching config",{clientId:e,error:t}),{}}}[He("0x3")](){const e=this[He("0x7")][He("0x8")](Ve);if(null!=e)try{return JSON[He("0x9")](e)}catch(e){Le[He("0x6")](He("0xa"),{error:e})}return{}}[He("0xb")](){const e=this[He("0xc")](Ke,0);return Date[He("0xd")]()-e>36e5}async[He("0xe")](e){if(!this.shouldUpdateConf())return!1;let t=await this.fetchConf(e);return 0==Object.keys(t)[He("0xf")]?t=this[He("0x3")]():this[He("0x7")][He("0x10")](Ve,JSON[He("0x11")](t)),this[He("0x12")]=t,!0}getConfValue(e,t){const i=void 0!==this[He("0x12")]?this.conf[e]:void 0;return null!=i?i:t}}var Je,Ge,We=["EVENT_TYPE_IDENTIFICATION","identification","EVENT_TYPE_ACTION","EVENT_TYPE_DEVICE","device","EVENT_TYPE_INTERACTION"];Je=We,Ge=116,function(e){for(;--e;)Je.push(Je.shift())}(++Ge);var Ze,Ye,Qe=function(e,t){return We[e-=0]};(Ye=Ze||(Ze={}))[Qe("0x0")]="action",Ye[Qe("0x1")]=Qe("0x2"),Ye[Qe("0x3")]="interaction",Ye[Qe("0x4")]=Qe("0x5");var Xe,et,tt=["length","push","maintainLastXItems"];Xe=tt,et=332,function(e){for(;--e;)Xe.push(Xe.shift())}(++et);var it=function(e,t){return tt[e-=0]};class rt{static[it("0x0")](e,t,i){return e[it("0x1")]>=t&&e.splice(0,1),e[it("0x2")](i),e}}var nt,at,ot=["bufferSize","isTrusted","cancelable","composed","view","shiftKey","metaKey","location","inputType","data","buffer","collect","extractEventData","maintainLastXItems","getData","extractButtonsPressedData","ctrlKey","buttons","now","detail","offsetY","sourceCapabilities","firesTouchEvents","target"];nt=ot,at=273,function(e){for(;--e;)nt.push(nt.shift())}(++at);var st=function(e,t){return ot[e-=0]};class ct{constructor(e){this[st("0x0")]=[],this[st("0x1")]=e}[st("0x2")](e){const t=this[st("0x3")](e);rt[st("0x4")](this[st("0x0")],this.buffer,t)}[st("0x5")](){return this.data}extractEventData(e){return i({x:e.x,y:e.y,tspl:Date.now()},this[st("0x6")](e))}extractButtonsPressedData(e){return i(i(i(i({},e[st("0x7")]&&{ctrlKey:!0}),e.altKey&&{altKey:!0}),e.shiftKey&&{shiftKey:!0}),0!=e[st("0x8")]&&{buttons:e[st("0x8")]})}}class dt{constructor(e){this.data=[],this[st("0x1")]=e}collect(e){var t;const i={x:e.x,y:e.y,timestamp:Date[st("0x9")](),mouseButtonType:e[st("0xa")],offsetX:e.offsetX,offsetY:e[st("0xb")],isPressed:null==(null===(t=e[st("0xc")])||void 0===t?void 0:t[st("0xd")])?null:!e.sourceCapabilities[st("0xd")],target_id:e[st("0xe")].id};rt[st("0x4")](this.data,this.buffer,i)}[st("0x5")](){const e=[...this[st("0x0")]];return this[st("0x0")]=[],e}}class ut{constructor(e){this[st("0x0")]=[],this[st("0xf")]=e}[st("0x2")](e){var t;const i={isTrusted:e[st("0x10")],cancelable:e[st("0x11")],composed:e[st("0x12")],isView:!!e[st("0x13")],shiftKey:e[st("0x14")],metaKey:e[st("0x15")],firesTouchEvents:null===(t=e[st("0xc")])||void 0===t?void 0:t[st("0xd")],timestamp:Date[st("0x9")]()};rt[st("0x4")](this[st("0x0")],this[st("0xf")],i)}[st("0x5")](){const e=[...this[st("0x0")]];return this[st("0x0")]=[],e}}class lt{constructor(e){this[st("0x0")]=[],this[st("0xf")]=e}[st("0x2")](e){var t;const i={isTrusted:e[st("0x10")],cancelable:e[st("0x11")],composed:e[st("0x12")],isView:!!e[st("0x13")],location:e[st("0x16")],shiftKey:e.shiftKey,firesTouchEvents:null===(t=e[st("0xc")])||void 0===t?void 0:t.firesTouchEvents,timestamp:Date[st("0x9")]()};rt[st("0x4")](this[st("0x0")],this[st("0xf")],i)}getData(){const e=this[st("0x0")];return this[st("0x0")]=[],e}}class ht{constructor(e){this[st("0x0")]=[],this[st("0xf")]=e}[st("0x2")](e){const t={isTrusted:e[st("0x10")],cancelable:e[st("0x11")],composed:e[st("0x12")],inputType:e[st("0x17")],isView:!!e[st("0x13")],timestamp:Date.now()};rt[st("0x4")](this.data,this[st("0xf")],t)}getData(){const e=this[st("0x0")];return this[st("0x0")]=[],e}}class ft{constructor(e){this[st("0x0")]=[],this.bufferSize=e}[st("0x2")](e){const t={isTrusted:e[st("0x10")],cancelable:e[st("0x11")],composed:e[st("0x12")],timestamp:Date[st("0x9")]()};rt[st("0x4")](this[st("0x0")],this[st("0xf")],t)}getData(){const e=this[st("0x0")];return this[st("0x0")]=[],e}}var pt,gt,mt=["keyup","keydown","input","focusout","INPUT","SELECT","TEXTAREA","deviceEventDataCollectionIgnoreList","mouseEventsCollectionBuffer","detail","sourceCapabilities","offsetX","target","cancelable","dropEffect","inputTypeFilter","virtualKeyboard","includes","registerEventListeners","entries","interactionEventsCollectorsData","addSafeInteractionListener","error","Error while adding listener","filter","forEach","getGenericAttributes","getAttachedData","addEventListener","handleEvent","eventTypesToAttach","getData","location","href","change","click","paste","mousemove","mouseup","mousedown","submit"];pt=mt,gt=321,function(e){for(;--e;)pt.push(pt.shift())}(++gt);var bt=function(e,t){return mt[e-=0]};const vt=bt("0x0"),yt=bt("0x1"),_t=bt("0x2"),wt=bt("0x3"),xt=bt("0x4"),At=bt("0x5"),Et=bt("0x6"),St=bt("0x7"),kt=bt("0x8"),Mt=bt("0x9"),Ct=bt("0xa"),It=[bt("0xb"),bt("0xc"),bt("0xd")];class Dt{constructor(e,t,r){this[bt("0xe")]=e,this[bt("0xf")]=t,this.safeEventCallback=r,this.interactionEventsCollectorsData={[yt]:{eventTypesToAttach:[wt,xt,At],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[bt("0x10")],isPressed:null==(null===(t=e[bt("0x11")])||void 0===t?void 0:t.firesTouchEvents)?null:!e[bt("0x11")].firesTouchEvents,offsetX:e[bt("0x12")],offsetY:e.offsetY,target_id:e[bt("0x13")].id}}},[_t]:{attributesMapper:e=>({target_id:e[bt("0x13")].id,isTrusted:e.isTrusted,cancelable:e[bt("0x14")],composed:e.composed,dropEffect:e.clipboardData[bt("0x15")],effectAllowed:e.clipboardData.effectAllowed})},[Et]:{attributesMapper:e=>({target_id:e[bt("0x13")].id})},[wt]:{continousCollectors:[new ct(this[bt("0xf")])]},[xt]:{continousCollectors:[new dt(1)]},[At]:{continousCollectors:[new dt(1)]},[Ct]:{eventTypesToAttach:[Mt,St,kt,vt],filter:this[bt("0x16")],attributesMapper:e=>{const{target:t,isTrusted:r,cancelable:n,composed:a}=e;return i({target_id:t.id,dataset_keys:Object.keys(t.dataset||{}),isTrusted:r,cancelable:n,composed:a},navigator[bt("0x17")]&&{navigator_virtualKeyboard:navigator[bt("0x17")].overlaysContent})}},[Mt]:{filter:this.inputTypeFilter,continousCollectors:[new ht(50)]},[St]:{filter:this.inputTypeFilter,continousCollectors:[new lt(50)]},[kt]:{filter:this[bt("0x16")],continousCollectors:[new ut(50)]},[vt]:{continousCollectors:[new ft(50)]}}}[bt("0x16")](e){var t;const i=null===(t=e[bt("0x13")])||void 0===t?void 0:t.tagName;return It[bt("0x18")](i)}[bt("0x19")](){for(const[e,t]of Object[bt("0x1a")](this[bt("0x1b")]))if(!this[bt("0xe")][bt("0x18")](e))try{this[bt("0x1c")](e,t)}catch(t){Le[bt("0x1d")](bt("0x1e"),{error:t,eventType:e})}}[bt("0x1f")](e,t){return!e[bt("0x1f")]||e[bt("0x1f")](t)}async handleEvent(e,t,r){const{attributesMapper:n,continousCollectors:a}=e;if(!this[bt("0x1f")](e,t))return!1;if(a)a[bt("0x20")]((e=>{e.collect(t)}));else{const e=this[bt("0x21")](),a=this[bt("0x22")](r),o=i(i(i({},e),n(t)),a&&{attachedEventsData:a});await this.safeEventCallback(r,o)}return!0}[bt("0x1c")](e,t){window[bt("0x23")](e,(async i=>{try{await this[bt("0x24")](t,i,e)}catch(e){Le[bt("0x1d")]("error adding interaction listener",{error:e})}}))}[bt("0x22")](e){let t;const i=this[bt("0x1b")][e][bt("0x25")];return i&&(t={},i[bt("0x20")]((e=>{const{continousCollectors:i}=this[bt("0x1b")][e];i&&i.forEach((i=>t[e]=i[bt("0x26")]()))}))),t}getGenericAttributes(){return{location:window[bt("0x27")][bt("0x28")]}}}var Tt,Rt,zt=["executor reached timeout","name","getHighEntropyValues","architecture","model","platform","fullVersionList","bitness","mobile","wow64","uaFullVersion","resolve","catch","setTimeout","race"];Tt=zt,Rt=167,function(e){for(;--e;)Tt.push(Tt.shift())}(++Rt);var Bt=function(e,t){return zt[e-=0]};function Pt(){var e;return null===(e=navigator.userAgentData)||void 0===e?void 0:e[Bt("0x0")]([Bt("0x1"),Bt("0x2"),Bt("0x3"),"platformVersion",Bt("0x4"),Bt("0x5"),Bt("0x6"),Bt("0x7"),Bt("0x8")])}function Ft(e,t){let i;const r=[Promise[Bt("0x9")](e())[Bt("0xa")]((()=>{})),new Promise(((e,r)=>i=window[Bt("0xb")](r,t)))];return Promise[Bt("0xc")](r)[Bt("0xa")]((()=>Le.warn(Bt("0xd"),{fnName:e[Bt("0xe")]}))).finally((()=>clearTimeout(i)))}var Ot,Nt,Lt=["absolute","left","fontSize","10px","textContent","some","offsetWidth","offsetHeight","body","removeChild","language","deviceMemory","__webdriver_script_func","DateTimeFormat","timeZone","vendor","buildID","textBaseline","alphabetic","#f60","font","Cwm fjordbank gly ","fromCharCode","fillText","fillStyle","rgba(102, 204, 0, 0.2)","18pt Arial","toDataURL","multiply","#f2f","#2ff","#ff2","beginPath","arc","closePath","fill","#f9c","evenodd","rect","isPointInPath","canvas","getContext","charging","chargingTime","dischargingTime","level","getBrave","brave","isBrave","webgl-experimental","getExtension","getParameter","UNMASKED_RENDERER_WEBGL","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getCryptoBindingData","cryptoBinding","getPublicData","isMobile","userAgent","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","abs","storageManager","configManager","calculate","getConfValue","dataPointsExtractor","lastDeviceData","setItemLocalStorageSafe","getItemLocalStorageSafe","now","dataPoints","getBattery","getCanvasFingerprint","getCodesTests","getConnection","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getFIDOEnabled","getLanguages","getLanguage","getTimezoneOffset","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getMediaMatch","getOpenDatabase","getWindowOrientation","getCpuClass","getOsCpu","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprint","getAudioFingerprintExtended","getFonts","getPerformanceTiming","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getBuildID","getWebGlRenderer","getWindowOuter","webRTCDisabled","bind","getNavigatorPermissionsState","notifications","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","CDPRuntimeDomainTest","Error","Object","defineProperty","stack","console","getOwnPropertyNames","document","$chrome_asyncScriptInfo","test","values","getOwnPropertyDescriptors","value","cache_","getPrototypeOf","storeItem","sort","Array","Promise","Symbol","name","token","getAsyncToken","collectPromisesData","startPromisesLoop","entries","includes","worker throw error","warn","worker promise rejected","getCookieEnabled","cookieEnabled","resolve","credentials","isUserVerifyingPlatformAuthenticatorAvailable","getCryptoRandomValues","crypto","getRandomValues","from","getWindowBasedKeys","chrome","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","ucweb","UCShellJava","puffinDevice","_phantom","__phantomas","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","calledSelenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__webdriver__chr","__webdriver_evaluate","__webdriver_script_function","__webdriver_unwrapped","__webdriverFuncgeb","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","fmget_targets","geb","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","high","standard","reduce","no-preference","low","more","less","100","active","none","replace","matchMedia","matches","sqrt","log","exp","acos","acosh","asin","asinh","atanh","atan","sin","sinh","cos","cosh","tanh","expm1","hashCodeString","getSessionStorage","sessionStorage","getLocalStorage","localStorage","toString","indexOf","Sequentum","webdriver","__driver_evaluate","__selenium_evaluate","__driver_unwrapped","__selenium_unwrapped","__fxdriver_unwrapped","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","driver-evaluate","selenium-evaluate","webdriver-evaluate-response","__webdriverFunc","__webdriver_script_fn","__lastWatirPrompt","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","estimate","navigatorOnLine","onLine","userActivation","isActive","state","sendBeacon","function","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","isArray","map","url","referrer","timing","getIndexedDB","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","ontouchstart","length","type","plugins","description","screen","availHeight","availWidth","height","width","pixelDepth","orientation","angle","charCodeAt","outerWidth","outerHeight","getWebDriver","getPlatform","platform","oscpu","prototype","addBehavior","productSub","mediaDevices","kind","label","deviceId","groupId","webkitOfflineAudioContext","createOscillator","triangle","createDynamicsCompressor","threshold","knee","ratio","release","connect","destination","start","oncomplete","startRendering","subarray","OfflineAudioContext","frequency","attack","disconnect","frequencyBinCount","fftSize","getFloatTimeDomainData","reduction","getHash","mmMwWLliI0O&1","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","BankGothic Md BT","Batang","Century Gothic","Clarendon","EUROSTILE","Futura Bk BT","Futura Md BT","Gill Sans","HELV","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Pristina","SCRIPTINA","Segoe UI Light","Serifa","Small Fonts","Staccato222 BT","Univers CE 55 Medium","Vrinda","createElement","div","style","visibility","hidden","span","position"];Ot=Lt,Nt=447,function(e){for(;--e;)Ot.push(Ot.shift())}(++Nt);var jt=function(e,t){return Lt[e-=0]};const Ut=jt("0x0"),qt=jt("0x1"),Ht=e=>e?[...e].reduce(((e,t)=>e+Math[jt("0x2")](t)),0):0;class Kt{constructor(e,t,i){this[jt("0x3")]=e,this[jt("0x4")]=t,this.cryptoBinding=i}async[jt("0x5")](){const e=this[jt("0x4")][jt("0x6")](Ut,[]),t=this.configManager[jt("0x6")](qt,36e5),i=await new Vt(e,this.cryptoBinding)[jt("0x7")]();return this[jt("0x8")]=i,this[jt("0x3")][jt("0x9")](qt,Date.now()+t),i}async getDeviceData(){return Number(this[jt("0x3")][jt("0xa")](qt))<Date[jt("0xb")]()||!this[jt("0x8")]?await this.calculate():this[jt("0x8")]}}class Vt{constructor(e,t){this[jt("0x0")]=e,this.cryptoBinding=t,this[jt("0xc")]={battery:this[jt("0xd")],brave:this.getBrave,canvas:this[jt("0xe")],codecs:this[jt("0xf")],connection:this[jt("0x10")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this.getCryptoRandomValues,deviceMemory:this[jt("0x11")],documentBasedKeys:this[jt("0x12")],hardwareConcurrency:this[jt("0x13")],indexedDB:this.getIndexedDB,fidoEnabled:this[jt("0x14")],languages:this[jt("0x15")],language:this[jt("0x16")],timezoneOffset:this[jt("0x17")],localStorage:this.getLocalStorage,navigatorBasedKeys:this[jt("0x18")],navigatorProduct:this[jt("0x19")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[jt("0x1a")],navigatorHighEntropyData:this[jt("0x1b")],navigatorStorageEstimation:this[jt("0x1c")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[jt("0x1d")],math:this[jt("0x1e")],mediaMatch:this[jt("0x1f")],openDatabase:this[jt("0x20")],windowOrientation:this[jt("0x21")],platform:this.getPlatform,cpuClass:this[jt("0x22")],osClass:this[jt("0x23")],addBehavior:this[jt("0x24")],productSub:this[jt("0x25")],mediaDevices:this[jt("0x26")],audioFingerprint:this[jt("0x27")],audioFingerprintExtended:this[jt("0x28")],fonts:this[jt("0x29")],performanceTiming:this[jt("0x2a")],performanceMemory:this[jt("0x2b")],plugins:this.getPlugins,screen:this[jt("0x2c")],sequentum:this[jt("0x2d")],sessionStorage:this.getSessionStorage,referrer:this[jt("0x2e")],timezone:this[jt("0x2f")],touchSupport:this[jt("0x30")],vendor:this[jt("0x31")],buildID:this[jt("0x32")],webdriver:this.getWebDriver,webGlRenderer:this[jt("0x33")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[jt("0x34")],webRTCDisabled:this[jt("0x35")],cryptoBindingData:this.getCryptoBindingData[jt("0x36")](this),notificationState:this[jt("0x37")][jt("0x36")](this,jt("0x38")),geolocationState:this.getNavigatorPermissionsState[jt("0x36")](this,jt("0x39")),isGeoLocationExists:this[jt("0x3a")],isSendBeaconExists:this[jt("0x3b")],navigatorPrototype:this[jt("0x3c")],installedRelatedApps:this[jt("0x3d")],windowConstructorAliasTest:this.windowConstructorAliasTest,windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[jt("0x3e")]}}[jt("0x3e")](){let e=!1;const t=new(window[jt("0x3f")]);return window[jt("0x40")][jt("0x41")](t,jt("0x42"),{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[jt("0x43")].debug(t[jt("0x42")]),e}windowDocumentAuxVarsTest(){for(const e of window[jt("0x40")][jt("0x44")](window[jt("0x45")]))if(e==jt("0x46")||/^\$cdc_[a-zA-Z0-9]{22}_$/[jt("0x47")](e))return!0;for(const e of window[jt("0x40")][jt("0x48")](window[jt("0x40")][jt("0x49")](window.document))){if(!e[jt("0x4a")]||void 0===e.value[jt("0x4b")])continue;const t=window[jt("0x40")].getOwnPropertyNames(window[jt("0x40")][jt("0x4c")](e[jt("0x4a")])),i=[jt("0x4d"),"retrieveItem","isNodeReachable_"];if(t[jt("0x4e")](),i.sort(),t.every(((e,t)=>e==i[t])))return!0}return!1}windowConstructorAliasTest(){const e=window[jt("0x40")][jt("0x44")](window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[jt("0x47")](t))return!0;for(const e of[window[jt("0x4f")],window[jt("0x50")],window[jt("0x51")]])if(t!=(null==e?void 0:e[jt("0x52")])&&t!=jt("0x53")&&t!=jt("0x54")&&window[t]===e)return!0}return!1}async[jt("0x7")](){const e=this.startPromisesLoop();return await this[jt("0x55")](e)}[jt("0x56")](){const e={};for(const[t,i]of Object[jt("0x57")](this.dataPoints))if(!this[jt("0x0")][jt("0x58")](t))try{e[t]=Ft(i,100)}catch(i){Le.warn(jt("0x59"),{e:i,key:t}),e[t]=Promise.resolve()}return e}async[jt("0x55")](e){const t={};for(const[i,r]of Object[jt("0x57")](e))try{t[i]=await r}catch(e){Le[jt("0x5a")](jt("0x5b"),{e:e,key:i}),t[i]=void 0}return t}[jt("0x5c")](){const e=navigator[jt("0x5d")];return Promise[jt("0x5e")](e)}async getFIDOEnabled(){return!!navigator[jt("0x5f")]&&await window.PublicKeyCredential[jt("0x60")]()}[jt("0x61")](){const e=window[jt("0x62")][jt("0x63")](new Uint8Array(16));return Array[jt("0x64")](e)}[jt("0x35")](){const e=null==window.RTCPeerConnection;return Promise[jt("0x5e")](e)}[jt("0x65")](){const e=[jt("0x66"),"safari","__crWeb",jt("0x67"),jt("0x68"),jt("0x69"),jt("0x6a"),jt("0x6b"),jt("0x6c"),jt("0x6d"),jt("0x6e"),"samsungAr",jt("0x6f"),jt("0x70"),jt("0x71"),jt("0x72"),jt("0x73"),jt("0x74"),jt("0x75"),jt("0x76"),jt("0x77"),jt("0x78"),jt("0x79"),jt("0x7a"),jt("0x7b"),jt("0x7c"),jt("0x7d"),jt("0x7e"),jt("0x7f"),"__driver_evaluate","__driver_unwrapped",jt("0x80"),"__fxdriver_unwrapped",jt("0x81"),jt("0x82"),"__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped",jt("0x83"),jt("0x84"),"__webdriver_script_fn","__webdriver_script_func",jt("0x85"),jt("0x86"),jt("0x87"),"awesomium",jt("0x88"),jt("0x89"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise",jt("0x8a"),"chrome_asyncScriptInfo",jt("0x8b"),jt("0x8c"),jt("0x8d"),jt("0x8e"),jt("0x8f"),jt("0x90")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[jt("0x91")](i)}return Promise[jt("0x5e")](t)}[jt("0x1f")](){const e={"dynamic-range":[jt("0x92"),jt("0x93")],"prefers-reduced-motion":["no-preference",jt("0x94")],"prefers-contrast":[jt("0x95"),jt("0x92"),jt("0x96"),jt("0x97"),jt("0x98"),"forced"],"max-monochrome":["0","10",jt("0x99"),"1000"],"forced-colors":[jt("0x9a"),jt("0x9b")],"inverted-colors":["inverted",jt("0x9b")],"color-gamut":["rec2020","p3","srgb"]},t={};for(const[i,r]of Object.entries(e))for(const e of r)t[i[jt("0x9c")](/-/g,"_")+"_"+e[jt("0x9c")](/-/g,"_")]=window[jt("0x9d")]("("+i+": "+e+")")[jt("0x9e")];return Promise[jt("0x5e")](t)}[jt("0x1e")](){const e=[Math[jt("0xa2")](.12312423423423424),Math[jt("0xa3")](1e308),(t=1e154,Math.log(t+Math[jt("0x9f")](t*t-1))),Math[jt("0xa4")](.12312423423423424),Math[jt("0xa5")](1),Math[jt("0xa0")](1+Math[jt("0x9f")](2)),Math[jt("0xa6")](.5),Math.log(3)/2,Math[jt("0xa7")](.5),Math[jt("0xa8")](-1e300),Math[jt("0xa9")](1),Math[jt("0xa1")](1)-1/Math[jt("0xa1")](1)/2,Math[jt("0xaa")](10.000000000123),Math[jt("0xab")](1),(Math[jt("0xa1")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math[jt("0xac")](1),(Math[jt("0xa1")](2)-1)/(Math[jt("0xa1")](2)+1),Math[jt("0xa1")](1),Math[jt("0xad")](1),Math[jt("0xa1")](1)-1,Math.log1p(10),Math[jt("0xa0")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e.length;t++)i+=e[t].toString();return Promise.resolve(Vt[jt("0xae")](i))}[jt("0x10")](){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:r,saveData:n}=e;return{downlink:t,effectiveType:i,rtt:r,saveData:n}})(e);return Promise[jt("0x5e")](t)}[jt("0xaf")](){return Promise[jt("0x5e")](!!window[jt("0xb0")])}[jt("0xb1")](){return Promise[jt("0x5e")](!!window[jt("0xb2")])}hasSequentum(){return-1!==window.external[jt("0xb3")]()[jt("0xb4")](jt("0xb5"))}[jt("0x18")](){return[jt("0xb6"),jt("0xb7"),jt("0x84"),jt("0xb8"),jt("0x80"),jt("0xb9"),"__webdriver_unwrapped",jt("0xba"),jt("0xbb"),jt("0x7e"),jt("0x7b"),jt("0x7c"),jt("0xbc"),jt("0xbd"),jt("0xbe"),"webdriver-evaluate",jt("0xbf"),"webdriverCommand",jt("0xc0"),jt("0xc1"),jt("0xc2"),"__$webdriverAsyncExecutor",jt("0x81"),"__lastWatirConfirm",jt("0xc3"),jt("0x46"),jt("0xc4"),jt("0xc5")][jt("0xc6")]((e=>navigator[e]))}getNavigatorProduct(){const e=navigator[jt("0xc7")];return Promise.resolve(e)}getNavigatorUserAgent(){return navigator.userAgent}[jt("0x1a")](){return navigator.userAgentData}getNavigatorHighEntropyData(){return Pt()}[jt("0x1c")](){return navigator.storage[jt("0xc8")]()}[jt("0xc9")](){return navigator[jt("0xca")]}[jt("0x1d")](){return navigator[jt("0xcb")][jt("0xcc")]}async getNavigatorPermissionsState(e){try{const t=await navigator.permissions.query({name:e});return null==t?void 0:t[jt("0xcd")]}catch(e){}}[jt("0x3a")](){return!!navigator[jt("0x39")]}[jt("0x3b")](){return typeof navigator[jt("0xce")]===jt("0xcf")}getNavigatorPrototype(){return{hardwareConcurrency:Object[jt("0xd0")](Object[jt("0x4c")](navigator),jt("0xd1")).get[jt("0xb3")](),languages:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(navigator),jt("0xd2"))[jt("0xd3")].toString()}}async getInstalledRelatedApps(){if(typeof navigator[jt("0x3d")]===jt("0xcf"))try{const{related_applications:e}=await navigator[jt("0x3d")]();if(e&&Array[jt("0xd4")](e))return e[jt("0xd5")]((e=>({platform:e.platform,url:e[jt("0xd6")]})))}catch(e){}}[jt("0x2e")](){return document[jt("0xd7")]}getPerformanceTiming(){return performance[jt("0xd8")]}[jt("0x2b")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance.memory;return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[jt("0xd9")](){return Promise[jt("0x5e")](!!window[jt("0xda")])}[jt("0x20")](){const{openDatabase:e}=window;return Promise[jt("0x5e")](!!e)}[jt("0x30")](){const e=window[jt("0xdb")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[jt("0xdc")]||navigator[jt("0xdd")]||0,documentTouch:e,ontouchstart:jt("0xde")in window};return Promise[jt("0x5e")](t)}getPlugins(){function e(e){const t=[];for(let i=0;i<e[jt("0xdf")];++i)t[jt("0x91")]({type:e[i][jt("0xe0")],suffixes:e[i].suffixes});return t}const t=[];for(let i=0;i<navigator.plugins.length;++i){const r=navigator[jt("0xe1")][i];r&&t.push({name:r.name,description:r[jt("0xe2")],mimeTypes:e(r)})}return Promise[jt("0x5e")](t)}[jt("0x2c")](){const e=window[jt("0xe3")]||screen,{availLeft:t}=e,{availTop:i}=e,r={availHeight:e[jt("0xe4")],availLeft:t,availTop:i,availWidth:e[jt("0xe5")],colorDepth:e.colorDepth,height:e[jt("0xe6")],width:e[jt("0xe7")],pixelDepth:e[jt("0xe8")],orientationAngle:e[jt("0xe9")]&&e.orientation[jt("0xea")],orientationType:e.orientation&&e[jt("0xe9")].type,devicePixelRatio:window.devicePixelRatio};return Promise[jt("0x5e")](r)}static[jt("0xae")](e){if(null==e)return;let t=0,i=0;const r=e[jt("0xdf")];for(;i<r;)t=(t<<5)-t+e[jt("0xeb")](i++)|0;return t}[jt("0x34")](){const e={outerWidth:window[jt("0xec")],outerHeight:window[jt("0xed")]};return Promise[jt("0x5e")](e)}[jt("0xee")](){const e=navigator.webdriver;return Promise.resolve(e)}[jt("0x21")](){const e=window[jt("0xe9")];return Promise[jt("0x5e")](e)}[jt("0xef")](){const e=navigator[jt("0xf0")];return Promise[jt("0x5e")](e)}[jt("0x22")](){const e=navigator.cpuClass;return Promise[jt("0x5e")](e)}[jt("0x23")](){const e=navigator[jt("0xf1")];return Promise[jt("0x5e")](e)}[jt("0x24")](){const e=!!window.HTMLElement[jt("0xf2")][jt("0xf3")];return Promise[jt("0x5e")](e)}[jt("0x25")](){const e=navigator[jt("0xf4")];return Promise[jt("0x5e")](e)}async getMediaDevices(){const e=await navigator[jt("0xf5")].enumerateDevices(),t=[];for(const i of e)t[jt("0x91")]({kind:i[jt("0xf6")],label:i[jt("0xf7")],deviceId:i[jt("0xf8")],groupId:i[jt("0xf9")]});return t}async[jt("0x27")](){const e=window.OfflineAudioContext||window[jt("0xfa")];if(!e)return-1;const t=new e(1,5e3,44100),i=t[jt("0xfb")]();i.type=jt("0xfc"),i.frequency[jt("0x4a")]=1e4;const r=t[jt("0xfd")]();r[jt("0xfe")][jt("0x4a")]=-50,r[jt("0xff")][jt("0x4a")]=40,r[jt("0x100")].value=12,r.attack.value=0,r[jt("0x101")].value=.25,i[jt("0x102")](r),r[jt("0x102")](t[jt("0x103")]),i[jt("0x104")](0);const n=new Promise((async(e,i)=>{t[jt("0x105")]=t=>e(t.renderedBuffer);try{await t[jt("0x106")]()}catch(e){i(e)}})),a=(await n).getChannelData(0)[jt("0x107")](4500);return Vt.getHash(a)}async[jt("0x28")](){var e;const t=window[jt("0x108")]||window[jt("0xfa")];if(!t)return{};const i=new t(1,5e3,44100),r=i[jt("0xfb")]();r[jt("0xe0")]=jt("0xfc"),r[jt("0x109")][jt("0x4a")]=1e4;const n=i[jt("0xfd")]();n[jt("0xfe")][jt("0x4a")]=-50,n.knee[jt("0x4a")]=40,n[jt("0x10a")][jt("0x4a")]=0;const a=i.createAnalyser();r[jt("0x102")](n),n[jt("0x102")](a),n[jt("0x102")](i[jt("0x103")]),r[jt("0x104")](0);try{await i[jt("0x106")](),n.disconnect(),r[jt("0x10b")]();const t=new Float32Array(a[jt("0x10c")]);null===(e=a.getFloatFrequencyData)||void 0===e||e.call(a,t);const o=new Float32Array(a[jt("0x10d")]);return jt("0x10e")in a&&a[jt("0x10e")](o),{gain:n[jt("0x10f")].value||n[jt("0x10f")],freq:Ht(t),time:Ht(o)}}catch(e){return{}}}static[jt("0x110")](e){let t=0;for(let i=0;i<e.length;++i)t+=Math[jt("0x2")](e[i]);return t}[jt("0x29")](){const e=jt("0x111"),t=[jt("0x112"),jt("0x113"),jt("0x114")],i=[jt("0x115"),jt("0x116"),jt("0x117"),jt("0x118"),jt("0x119"),"AvantGarde Bk BT",jt("0x11a"),jt("0x11b"),"Bitstream Vera Sans Mono","Calibri","Century",jt("0x11c"),jt("0x11d"),jt("0x11e"),"Franklin Gothic",jt("0x11f"),jt("0x120"),"GOTHAM",jt("0x121"),jt("0x122"),"Haettenschweiler",jt("0x123"),jt("0x124"),jt("0x125"),jt("0x126"),jt("0x127"),jt("0x128"),jt("0x129"),"Menlo",jt("0x12a"),"MS Outlook",jt("0x12b"),jt("0x12c"),jt("0x12d"),jt("0x12e"),jt("0x12f"),jt("0x130"),jt("0x131"),"Minion Pro","Monotype Corsiva","PMingLiU",jt("0x132"),jt("0x133"),jt("0x134"),jt("0x135"),"SimHei",jt("0x136"),jt("0x137"),"TRAJAN PRO",jt("0x138"),jt("0x139"),"ZWAdobeF"],r=document[jt("0x13a")](jt("0x13b"));r[jt("0x13c")][jt("0x13d")]=jt("0x13e");const n={},a={},o=t=>{const i=document[jt("0x13a")](jt("0x13f")),{style:n}=i;return n[jt("0x140")]=jt("0x141"),n.top="0",n[jt("0x142")]="0",n.fontFamily=t,n[jt("0x143")]=jt("0x144"),i[jt("0x145")]=e,r.appendChild(i),i},s=(e,t)=>o("'"+e+"',"+t),c=t[jt("0xd5")](o),d=(()=>{const e={};for(const r of i)e[r]=t[jt("0xd5")]((e=>s(r,e)));return e})();document[jt("0x149")].appendChild(r);try{for(let e=0;e<t.length;e++)n[t[e]]=c[e][jt("0x147")],a[t[e]]=c[e].offsetHeight;const e=i[jt("0xc6")]((e=>{return i=d[e],t[jt("0x146")](((e,t)=>i[t][jt("0x147")]!==n[e]||i[t][jt("0x148")]!==a[e]));var i}));return Promise[jt("0x5e")](e)}finally{document.body[jt("0x14a")](r)}}[jt("0x17")](){const e=(new Date)[jt("0x17")]();return Promise[jt("0x5e")](e)}[jt("0x16")](){const e=navigator[jt("0x14b")];return Promise[jt("0x5e")](e)}[jt("0x15")](){const e=navigator[jt("0xd2")];return Promise[jt("0x5e")](e)}[jt("0x13")](){const e=navigator.hardwareConcurrency;return Promise[jt("0x5e")](e)}[jt("0x11")](){const e=navigator[jt("0x14c")];return Promise[jt("0x5e")](e)}[jt("0x12")](){return["__webdriver_evaluate","__selenium_evaluate",jt("0x85"),jt("0x14d"),jt("0xc2"),jt("0x80"),jt("0xb9"),jt("0x86"),"__driver_evaluate","__selenium_unwrapped","__fxdriver_unwrapped"][jt("0xc6")]((e=>document[e]))}[jt("0x2f")](){const e=Intl[jt("0x14e")]().resolvedOptions()[jt("0x14f")];return Promise[jt("0x5e")](e)}[jt("0x31")](){const e=navigator[jt("0x150")];return Promise[jt("0x5e")](e)}[jt("0x32")](){const e=navigator[jt("0x151")];return Promise[jt("0x5e")](e)}async getCanvasFingerprint(){const e=document[jt("0x13a")](jt("0x169"));e[jt("0xe7")]=1,e[jt("0xe6")]=1;const t=e[jt("0x16a")]("2d"),i={winding:function(e){return e[jt("0x167")](0,0,10,10),e[jt("0x167")](2,2,6,6),!e[jt("0x168")](5,5,"evenodd")}(t),geometry:function(e,t){e[jt("0xe7")]=122,e[jt("0xe6")]=110,t.globalCompositeOperation=jt("0x15d");const i=[[jt("0x15e"),40,40],[jt("0x15f"),80,40],[jt("0x160"),60,80]];for(const[e,r,n]of i)t[jt("0x159")]=e,t[jt("0x161")](),t[jt("0x162")](r,n,40,0,2*Math.PI,!0),t[jt("0x163")](),t[jt("0x164")]();return t[jt("0x159")]=jt("0x165"),t[jt("0x162")](60,60,60,0,2*Math.PI,!0),t[jt("0x162")](60,60,20,0,2*Math.PI,!0),t[jt("0x164")](jt("0x166")),Vt[jt("0xae")](e.toDataURL())}(e,t),text:function(e,t){e.width=240,e[jt("0xe6")]=60,t[jt("0x152")]=jt("0x153"),t.fillStyle=jt("0x154"),t.fillRect(100,1,62,20),t.fillStyle="#069",t[jt("0x155")]='11pt "Times New Roman"';const i=jt("0x156")+String[jt("0x157")](55357,56835);return t[jt("0x158")](i,2,15),t[jt("0x159")]=jt("0x15a"),t[jt("0x155")]=jt("0x15b"),t.fillText(i,4,45),Vt.hashCodeString(e[jt("0x15c")]())}(e,t)};return Promise[jt("0x5e")](i)}async[jt("0xd")](){const e=await navigator[jt("0xd")]();return{charging:e[jt("0x16b")],chargingTime:e[jt("0x16c")],dischargingTime:e[jt("0x16d")],level:e[jt("0x16e")]}}async[jt("0x16f")](){return!!navigator.brave&&await navigator[jt("0x170")][jt("0x171")]()}async getWebGlRenderer(){const e=document.createElement(jt("0x169")),t=e[jt("0x16a")]("webgl")||e[jt("0x16a")](jt("0x172")),i=t[jt("0x173")]("WEBGL_debug_renderer_info");return Promise[jt("0x5e")](t[jt("0x174")](i[jt("0x175")]))}async[jt("0xf")](){const e=document[jt("0x13a")](jt("0x176")),t={basic:""===e[jt("0x177")](jt("0x178")),advanced:""===e.canPlayType(jt("0x179"))};return Promise.resolve(t)}async[jt("0x17a")](){const{publicKey:e,keyIdentifier:t}=await this[jt("0x17b")][jt("0x17c")]();return{publicKey:e,keyIdentifier:t}}static[jt("0x17d")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i[jt("0x47")](navigator[jt("0x17e")])||null!=window[jt("0xe9")]||window[jt("0x9d")](jt("0x17f"))[jt("0x9e")]}}var $t,Jt,Gt=["compress","uncompressed","ALLOW","CHALLENGE","DENY","TRUST"];$t=Gt,Jt=474,function(e){for(;--e;)$t.push($t.shift())}(++Jt);var Wt,Zt,Yt,Qt,Xt=function(e,t){return Gt[e-=0]};(Zt=Wt||(Wt={}))[Xt("0x0")]="compressed",Zt[Xt("0x1")]="uncompressed",(Qt=Yt||(Yt={}))[Xt("0x2")]=Xt("0x2"),Qt[Xt("0x3")]=Xt("0x3"),Qt[Xt("0x4")]="DENY",Qt[Xt("0x5")]="TRUST";var ei,ti,ii=["encryptPayload","string","encode","crypto","getRandomValues","subtle","arrayBufferToBase64","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey","jwk","parse","crypto is not supported","encryptSymKeyBundle","configManager","generateSymKey","generateKey","AES-GCM","encrypt","decrypt"];ei=ii,ti=162,function(e){for(;--e;)ei.push(ei.shift())}(++ti);var ri=function(e,t){return ii[e-=0]};class ni{constructor(e){this[ri("0x0")]=e}[ri("0x1")](){return window.crypto.subtle[ri("0x2")]({name:ri("0x3"),length:256},!0,[ri("0x4"),ri("0x5")])}async[ri("0x6")](e,t){const i=typeof e===ri("0x7")?(new TextEncoder)[ri("0x8")](e):e,r=window[ri("0x9")][ri("0xa")](new Uint8Array(12)),n={name:ri("0x3"),iv:r},a=await window[ri("0x9")][ri("0xb")][ri("0x4")](n,t,i);return{payloadCipherText:this.arrayBufferToBase64(a),iv:r}}async encryptSymKeyBundle(e,t,i){const r=await window[ri("0x9")][ri("0xb")].exportKey("raw",e),n=this[ri("0xc")](r),a=this[ri("0xc")](t),o=(new TextEncoder)[ri("0x8")](JSON[ri("0xd")]({symKey:n,iv:a})),s=await window.crypto[ri("0xb")][ri("0x4")]({name:ri("0xe")},i,o);return this.arrayBufferToBase64(s)}arrayBufferToBase64(e){let t="";const i=new Uint8Array(e),r=i[ri("0xf")];for(let e=0;e<r;e++)t+=String[ri("0x10")](i[e]);return window[ri("0x11")](t)}[ri("0x12")](e){return window.crypto[ri("0xb")][ri("0x13")](ri("0x14"),JSON[ri("0x15")](e),{name:ri("0xe"),hash:"SHA-256"},!0,[ri("0x4")])}async[ri("0x4")](e,t){if(!window[ri("0x9")]||!window[ri("0x9")].subtle)throw new Error(ri("0x16"));const i=await this[ri("0x1")](),{payloadCipherText:r,iv:n}=await this[ri("0x6")](t,i),a=await this[ri("0x12")](e);return{encryptedData:r,encryptedKey:await this[ri("0x17")](i,n,a)}}}var ai,oi,si=[", errorSpace: ",", errorCode: ","CLIENT","client","server","COMMUNICATION","communication","error","errorCode","message","name","toString","SDKError: ","errorSpace"];ai=si,oi=436,function(e){for(;--e;)ai.push(ai.shift())}(++oi);var ci,di,ui=function(e,t){return si[e-=0]};(di=ci||(ci={}))[ui("0x0")]=ui("0x1"),di.SERVER=ui("0x2"),di[ui("0x3")]=ui("0x4");class li extends Error{constructor(e,t,i){var r,n;super(),this[ui("0x5")]=e,this.errorSpace=t,this[ui("0x6")]=i,this.message=(null===(r=this[ui("0x5")])||void 0===r?void 0:r[ui("0x7")])||this[ui("0x5")].toString(),this[ui("0x8")]=(null===(n=this[ui("0x5")])||void 0===n?void 0:n.name)||li[ui("0x8")]}[ui("0x9")](){return ui("0xa")+this[ui("0x7")]+(this[ui("0xb")]?ui("0xc")+this[ui("0xb")]:"")+(this[ui("0x6")]?ui("0xd")+this.errorCode:"")}toLog(){return i(i({name:this[ui("0x8")],message:this.message},this[ui("0xb")]&&{errorSpace:this[ui("0xb")]}),this.errorCode&&{errorCode:this[ui("0x6")]})}}var hi,fi,pi=["name","registerEventListeners","parse","maintainLastXItems","removeItemLocalStorageSafe","ddls","lastDeviceInDeviceEvent","rei","lse","deviceEventDataCollectionIgnoreList","bufferSize","bufferInterval","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","maxLocalStoredEvents","configManager","storageManager","deviceDataManager","identityManager","cryptoBinding","serverPath","enableSessionToken","flushTimeoutHandle","EVENT_TYPE_INTERACTION","crypto","interactionEventsManager","getConfValue","safeEventCallback","isMobile","maxEventStored","pollingInterval","pollingSessionToken","emitEvent","toString","platform","tabId","getTabId","timestamp","now","enrichUADataIfDoesNotExist","eventTypesToStore","includes","type","addEventToLocalStorage","eventsQueue","push","error","Error while emitting event","getClientId","errorCode","length","min","flush","catch","Error while emitting event (delayed flush)","toLog","Failed to refresh data","isTokenExpired","refreshSessionToken","Failed to polling data","attributes","navigatorHighEntropyData","fetchEventsFromLocalStorage","pop","sort","popAllEvents","clientId","deviceId","getDeviceId","getUserId","sdkPlatform","events","warn","Crypto-binding is not supported. ","sessionToken","buildEncryptedRequestBody","requestsManager","postData","device/events","setDeviceId","setSessionToken","userId","setUserId","refreshConf","Encryption error - missing public key","COMMUNICATION","stringify","encrypt","compress","uncompressed","CLIENT","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","sendDeviceDataEvent","shouldSendDeviceEvent","info","no need to send device event","getDeviceData","EVENT_TYPE_DEVICE","sendPageLoadEvent","page_load","extractWindowRespurces","location","referrer","performance","resources","isArray","map"];hi=pi,fi=457,function(e){for(;--e;)hi.push(hi.shift())}(++fi);var gi=function(e,t){return pi[e-=0]};const mi=gi("0x0"),bi=gi("0x1"),vi=gi("0x2"),yi=gi("0x3"),_i=gi("0x4"),wi=gi("0x5"),xi=gi("0x6"),Ai=[Ze[gi("0x7")],Ze[gi("0x8")]],Ei=gi("0x9"),Si=gi("0xa");class ki{constructor(e,t,r,n,a,o,s,c){this[gi("0xb")]=e,this[gi("0xc")]=t,this[gi("0xd")]=r,this.requestsManager=n,this[gi("0xe")]=a,this[gi("0xf")]=o,this[gi("0x10")]=s,this[gi("0x11")]=c,this.eventIndex=null,this[gi("0x12")]=null,this.safeEventCallback=async(e,t)=>{try{const r=i({},i({interaction_type:e},t)),n={type:Ze[gi("0x13")],attributes:r};return await this.emitEvent(n)}catch(e){}},this[gi("0x11")]=c,this.eventsQueue=[],this[gi("0x14")]=new ni(e),this[gi("0x15")]=new Dt(this[gi("0xb")][gi("0x16")](_i,[]),this.configManager[gi("0x16")]("mouseEventsCollectionBuffer",100),this[gi("0x17")]),this[gi("0x18")]=Vt[gi("0x18")](),this.eventTypesToStore=this[gi("0xb")][gi("0x16")](Ei,[Ze[gi("0x7")]]),this[gi("0x19")]=this[gi("0xb")][gi("0x16")](Si,4),this[gi("0x1a")]=36e4,this[gi("0x1b")]()}async[gi("0x1c")](e){e.index=this.increaseEventIndex(),e.location=location[gi("0x1d")](),e[gi("0x1e")]=navigator[gi("0x1e")],e.sdkVersion="1.51.0",e[gi("0x10")]=this.serverPath,e[gi("0x1f")]=this[gi("0xe")][gi("0x20")](),e[gi("0x21")]=Date[gi("0x22")](),await this[gi("0x23")](e);let t=0;this[gi("0x24")][gi("0x25")](e[gi("0x26")])?t=this[gi("0x27")](e):this[gi("0x28")][gi("0x29")](e);const i=this[gi("0xb")][gi("0x16")](wi,2);if(this[gi("0x28")].length+t>=i||Ai[gi("0x25")](e.type)){this.flushTimeoutHandle&&(clearTimeout(this[gi("0x12")]),this.flushTimeoutHandle=null);try{return await this.flush()}catch(t){throw Le[gi("0x2a")](gi("0x2b"),{clientId:this.identityManager[gi("0x2c")](),eventType:e.type,error:t[gi("0x2d")]?t.toLog():t}),t}}if(!this.flushTimeoutHandle&&this[gi("0x28")][gi("0x2e")]>0){const t=this[gi("0xb")][gi("0x16")](xi,2),i=Math[gi("0x2f")](t,30);this[gi("0x12")]=setTimeout((()=>{this[gi("0x12")]=null,this[gi("0x30")]()[gi("0x31")]((t=>{Le[gi("0x2a")](gi("0x32"),{clientId:this.identityManager.getClientId(),eventType:e.type,error:t.errorCode?t[gi("0x33")]():t})}))}),1e3*i)}return{}}async refreshSessionToken(){try{return this.eventsQueue[gi("0x2e")]>0?await this[gi("0x30")]():(await this.sendDeviceDataEvent(!0),await this.flush())}catch(e){Le[gi("0x2a")](gi("0x34"),{e:e})}}async[gi("0x1b")](){try{this[gi("0xe")][gi("0x35")]()&&await this[gi("0x36")]()}catch(e){Le[gi("0x2a")](gi("0x37"),{e:e})}finally{setTimeout((async()=>{await this[gi("0x1b")]()}),this[gi("0x1a")])}}async[gi("0x23")](e){var t;if(!(null===(t=e[gi("0x38")])||void 0===t?void 0:t[gi("0x39")]))try{e[gi("0x38")].navigatorHighEntropyData=await Pt()}catch(e){}}popAllEvents(){const e=[],t=this[gi("0x3a")]();for(;this[gi("0x28")][gi("0x2e")];)e.push(this[gi("0x28")][gi("0x3b")]());return(null==t?void 0:t[gi("0x2e")])&&e[gi("0x29")](...t),e[gi("0x3c")](((e,t)=>e[gi("0x21")]-t[gi("0x21")]))}async[gi("0x30")](){const e=this[gi("0x3d")]();if(0===e[gi("0x2e")])return{};const t={};t[gi("0x3e")]=this.identityManager[gi("0x2c")](),t[gi("0x3f")]=this[gi("0xe")][gi("0x40")](),t.userId=this[gi("0xe")][gi("0x41")](),t[gi("0x42")]=this.isMobile?"mobile_web":"desktop_web",t[gi("0x43")]=e;try{const{keyIdentifier:e}=await this[gi("0xf")].getPublicData();t.keyIdentifier=e}catch(e){Le[gi("0x44")](gi("0x45")+e)}this[gi("0x11")]&&(t[gi("0x46")]=!0);const i=await this[gi("0x47")](t),r=await this[gi("0x48")][gi("0x49")](gi("0x4a"),i);return r[gi("0x3f")]&&this[gi("0xe")][gi("0x4b")](r.deviceId),r[gi("0x46")]&&this[gi("0xe")][gi("0x4c")](r.sessionToken),r[gi("0x4d")]&&this[gi("0xe")][gi("0x4e")](r.userId),this.cleanLocalStorageEvents(),r}async[gi("0x47")](e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.configManager[gi("0x16")]("publicKey",null);if(null===i&&t)return await this[gi("0xb")][gi("0x4f")](this[gi("0xe")][gi("0x2c")]()),await this[gi("0x47")](e);if(null===i)throw new li(new Error(gi("0x50")),ci[gi("0x51")]);try{const t=JSON[gi("0x52")](e),r=this.compressData(t),n=r||t,{encryptedData:a,encryptedKey:o}=await this[gi("0x14")][gi("0x53")](i,n);return{data:a,key:o,dataType:r?Wt[gi("0x54")]:Wt[gi("0x55")]}}catch(e){throw new li(e,ci[gi("0x56")])}}compressData(e){try{return xe.gzip(e)}catch(e){Le[gi("0x2a")]("Failed to compress data, sending the data to the service uncompressed",{clientId:this[gi("0xe")][gi("0x2c")](),error:e})}}[gi("0x57")](){if(null===this[gi("0x58")]){const e=this[gi("0xc")][gi("0x59")](vi),t=Number[gi("0x5a")](e);this[gi("0x58")]=Number[gi("0x5b")](t)?-1:t}return this[gi("0x58")]++,this[gi("0xc")][gi("0x5c")](vi,this[gi("0x58")][gi("0x1d")]()),this[gi("0x58")]}shouldSendDeviceEvent(){const e=this[gi("0xc")].getItemLocalStorageSafe(mi),t=this.storageManager[gi("0x59")](bi);return!e||!t||Date[gi("0x22")]()-e>864e5||t!=this.identityManager[gi("0x40")]()}async[gi("0x5d")](e){if(!e&&!this[gi("0x5e")]())return Le[gi("0x5f")](gi("0x60")),!1;const t=await this[gi("0xd")][gi("0x61")](),i={type:Ze[gi("0x62")],attributes:t},r=await this[gi("0x1c")](i);return r&&(this[gi("0xc")][gi("0x5c")](mi,Date[gi("0x22")]()),this[gi("0xc")].setItemLocalStorageSafe(bi,this.identityManager[gi("0x40")]())),r}async[gi("0x63")](){const e=gi("0x64");if(this[gi("0xb")].getConfValue(_i,[]).includes(e))return!1;const t=this[gi("0x65")]();return await this[gi("0x1c")]({type:Ze[gi("0x13")],attributes:i(i({interaction_type:e,location:window[gi("0x66")].href,referrer:document[gi("0x67")]},window.history&&{window_historyLength:window.history[gi("0x2e")]}),t&&{windowResources:t})}),!0}extractWindowRespurces(){try{const e=window[gi("0x68")].getEntriesByType(gi("0x69"));return e&&Array[gi("0x6a")](e)?e[gi("0x6b")]((e=>({name:e[gi("0x6c")],initiatorType:e.initiatorType}))):void 0}catch(e){}}[gi("0x6d")](){this[gi("0x15")][gi("0x6d")](),this[gi("0xe")][gi("0x6d")]()}[gi("0x3a")](){const e=this[gi("0xc")][gi("0x59")](yi);return e?JSON[gi("0x6e")](e):[]}[gi("0x27")](e){const t=this[gi("0x3a")]();return rt[gi("0x6f")](t,this[gi("0x19")],e),this[gi("0xc")][gi("0x5c")](yi,JSON[gi("0x52")](t)),t[gi("0x2e")]}cleanLocalStorageEvents(){this[gi("0xc")][gi("0x70")](yi)}}var Mi,Ci,Ii=["Invalid JWT:","rui","rdi","rst","userIdStorageExpiry","storageManager","configManager","clientId","load","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","getItemSessionStorageSafe","setClientId","getItemLocalStorageSafe","getConfValue","now","setUserId","userId","setItemLocalStorageSafe","removeUserId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","floor","random","MAX_SAFE_INTEGER","toString","getTabId","setSessionToken","isTokenExpired","getSessionToken","parse","split","exp","error"];Mi=Ii,Ci=226,function(e){for(;--e;)Mi.push(Mi.shift())}(++Ci);var Di=function(e,t){return Ii[e-=0]};const Ti=Di("0x0"),Ri=Di("0x1"),zi="rdit",Bi="rti",Pi=Di("0x2"),Fi=Di("0x3");class Oi{constructor(e,t,i){this[Di("0x4")]=e,this[Di("0x5")]=t,this[Di("0x6")]=i,this.setClientId(this[Di("0x6")])}[Di("0x7")](){this[Di("0x8")](),this[Di("0x9")]()}[Di("0xa")](){window[Di("0xb")](Di("0xc"),(async()=>this[Di("0xd")]()))}[Di("0xe")](){return this.deviceId}[Di("0xf")](e){this[Di("0x10")]!==e&&(Le[Di("0x11")](Di("0x12"),{deviceId:e}),this.deviceId=e,this[Di("0x4")][Di("0x13")](Ri,e),this[Di("0x4")].setItemLocalStorageSafe(Ri,e))}[Di("0x8")](){const e=this[Di("0x4")][Di("0x14")](Ri)||this[Di("0x4")].getItemLocalStorageSafe(Ri);return null!=e&&this[Di("0xf")](e),e}getClientId(){return this[Di("0x6")]}[Di("0x15")](e){this[Di("0x4")].getClientId()!=e&&this[Di("0x4")].setClientId(e),this[Di("0x4")][Di("0x13")]("rci",e)}getUserId(){if(Number(this[Di("0x4")][Di("0x16")](zi))+this[Di("0x5")][Di("0x17")](Fi,864e5)<Date[Di("0x18")]())return this.removeUserId(),null;const e=this[Di("0x4")].getItemSessionStorageSafe(Ti);return null!=e?e:this[Di("0x4")][Di("0x16")](Ti)}[Di("0x19")](e){this[Di("0x1a")]=e,this[Di("0x4")].setItemSessionStorageSafe(Ti,e),this[Di("0x4")][Di("0x1b")](Ti,e),this[Di("0x4")].setItemLocalStorageSafe(zi,Date[Di("0x18")]())}[Di("0x1c")](){this.storageManager[Di("0x1d")](Ti),this[Di("0x4")][Di("0x1e")](Ti),this.storageManager[Di("0x1e")](zi)}loadTabId(){const e=this.storageManager[Di("0x14")](Bi);e?(this[Di("0x4")][Di("0x1d")](Bi),this.tabId=e):this[Di("0x1f")]=Math[Di("0x20")](Math[Di("0x21")]()*Number[Di("0x22")])[Di("0x23")]()}[Di("0x24")](){return this[Di("0x1f")]}[Di("0xd")](){this.storageManager[Di("0x13")](Bi,this[Di("0x1f")])}[Di("0x25")](e){this.storageManager.setItemLocalStorageSafe(Pi,e)}getSessionToken(){return this[Di("0x4")][Di("0x16")](Pi)||this.storageManager[Di("0x14")](Pi)}[Di("0x26")](){var e;const t=this[Di("0x27")]();if(!t)return!0;try{const i=JSON[Di("0x28")](atob(t[Di("0x29")](".")[1]));let r=(null!==(e=i[Di("0x2a")])&&void 0!==e?e:i.iat)*(i.exp&&i[Di("0x2a")]<1e12?1e3:1);return i[Di("0x2a")]||(r+=9e5),Date[Di("0x18")]()>=r}catch(e){return Le[Di("0x2b")](Di("0x2c"),{error:e}),!0}}}var Ni,Li,ji=["COMMUNICATION","serverPath","postData","postDataFromURL","include","application/json","stringify","getData","GET","callServer","fetch","fetch-api is not supported","CLIENT","json","SERVER","status","message"];Ni=ji,Li=154,function(e){for(;--e;)Ni.push(Ni.shift())}(++Li);var Ui=function(e,t){return ji[e-=0]};class qi{constructor(e){this[Ui("0x0")]=e}async[Ui("0x1")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[Ui("0x2")](this[Ui("0x0")]+e,t,i)}async[Ui("0x2")](e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:"POST",credentials:Ui("0x3"),headers:new Headers(i({"Content-Type":Ui("0x4")},r)),body:JSON[Ui("0x5")](t)};return await this.callServer(e,n)}async[Ui("0x6")](e){const t=this[Ui("0x0")]+e,i={method:Ui("0x7"),credentials:Ui("0x3")};return await this[Ui("0x8")](t,i)}async callServer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(Ui("0x9")in window))throw new li(new Error(Ui("0xa")),ci[Ui("0xb")]);try{const i=await fetch(e,t),r=await i[Ui("0xc")]();if(i.ok)return r;throw new li(new Error(r.message||i.statusText),ci[Ui("0xd")],i[Ui("0xe")])}catch(e){if(!(e instanceof li))throw new li(new Error(e[Ui("0xf")]),ci[Ui("0x10")]);throw e}}}var Hi,Ki,Vi=["Invalid SDK params was provided: ","REQUIRED_SDK_PARAMS","throwOrReturnResult","logIfInvalid","throwError","filter"];Hi=Vi,Ki=403,function(e){for(;--e;)Hi.push(Hi.shift())}(++Ki);var $i=function(e,t){return Vi[e-=0]};class Ji{constructor(){this[$i("0x0")]={clientId:"string"}}[$i("0x1")](e,t,i){if(!e&&((null==t?void 0:t[$i("0x2")])&&Le.info(i),null==t?void 0:t[$i("0x3")]))throw new Error(i);return e}validateSDKParams(e,t){const i=Object.keys(this[$i("0x0")])[$i("0x4")]((t=>typeof e[t]!=this[$i("0x0")][t]));return this[$i("0x1")](0==i.length,t,$i("0x5")+JSON.stringify(i))}}var Gi,Wi,Zi=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","push","reportLogs","getConfValue","logsMinimumDelay","length","now","flush","getClientId","floor"];Gi=Zi,Wi=326,function(e){for(;--e;)Gi.push(Gi.shift())}(++Wi);var Yi=function(e,t){return Zi[e-=0]};class Qi{constructor(e,t,i){this[Yi("0x0")]=e,this[Yi("0x1")]=t,this[Yi("0x2")]=i,this[Yi("0x3")]=0,this[Yi("0x4")]=async()=>{try{await this.reportLogs()}catch(e){}},Le.middlewares[Yi("0x5")](this.logMiddleware)}async[Yi("0x6")](){if(!this.configManager.getConfValue("enableLogsReporting",!1))return;const e=this[Yi("0x2")][Yi("0x7")]("logsMinimumBatch",6),t=this[Yi("0x2")][Yi("0x7")](Yi("0x8"),12e4);if(Le.logs[Yi("0x9")]<e||this[Yi("0x3")]+t>Date[Yi("0xa")]())return;this[Yi("0x3")]=Date[Yi("0xa")]();const i=Le[Yi("0xb")](),r=this.identityManager[Yi("0xc")](),n=Math[Yi("0xd")](Date[Yi("0xa")]()/1e3),a={sdkVersion:"1.51.0",platform:navigator[Yi("0xe")],clientId:r,timestamp:n,logEntries:i};await this.requestsManager[Yi("0xf")](Yi("0x10"),a)}}var Xi,er,tr=["migrateIdentifiers","true","endsWith","device/migrate-identifiers","requestsManager","postDataFromURL","deviceId","rimd","identityManager","storageManager"];Xi=tr,er=417,function(e){for(;--e;)Xi.push(Xi.shift())}(++er);var ir=function(e,t){return tr[e-=0]};const rr=ir("0x0");class nr{constructor(e,t,i){this[ir("0x1")]=e,this.requestsManager=t,this[ir("0x2")]=i}async[ir("0x3")](e){if(this[ir("0x2")].getItemLocalStorageSafe(rr)!=ir("0x4")){const t=this[ir("0x1")].getDeviceId(),i=this[ir("0x1")].getClientId(),r=(e[ir("0x5")]("/")?e:e+"/")+ir("0x6"),n=await this[ir("0x7")][ir("0x8")](r,{deviceId:t,clientId:i});n[ir("0x9")]&&n.deviceId==t&&this[ir("0x2")].setItemLocalStorageSafe(rr,"true")}}}var ar,or,sr=["setAuthenticatedUser","setUser","clearUser","RiskID","TSAccountProtection","dispatchEvent","RiskIDReady","TSAccountProtectionReady","undefined","sdkEnabled","enableIdentifiersMigration","verbose","email","national_id","other","initializationPromise","enableSessionToken","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","clientId","options","serverPath","toString","enabled","mainEntry","initialize","storageManager","cryptoBinding","createCryptoBinding","sign","requestsManager","identityManager","configManager","deviceDataManager","load","logsReporter","getConfValue","getSessionToken","Session token is not enabled","now","info","SDK disabled","isTokenExpired","eventsManager","init","userId","refreshConf","getClientId","isSDKDisabled","migrateIdentifiers","sendDeviceDataEvent","catch","updateUserId","registerEventListeners","isInitialized","triggerActionEvent","includes","warn","_error_'invalid action type - ","Invalid claimedUserIdType","invalid_claimed_user_id_type_","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","Unhandled SDK error. recieved eventResponse: ","object","stringify","slice","CLIENT","SERVER","errorSpace","errorCode","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","setUserId","emitEvent","EVENT_TYPE_IDENTIFICATION","deviceId","unidentifiedUser","getUserId","removeUserId"];ar=sr,or=483,function(e){for(;--e;)ar.push(ar.shift())}(++or);var cr=function(e,t){return sr[e-=0]};const dr=[null,void 0,cr("0x0"),"",0],ur=cr("0x1"),lr=cr("0x2"),hr=cr("0x3"),fr=[cr("0x4"),"phone_number","account_id","ssn",cr("0x5"),"passport_number","drivers_license_number",cr("0x6")];class pr{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this[cr("0x7")]=null,this.isSDKDisabled=!1,this[cr("0x8")]=!1,this[cr("0x9")]=!1,this[cr("0xa")]=null,this[cr("0xb")]=new Ji,pr[cr("0xc")])throw new Error(cr("0xd"));pr[cr("0xc")]=!0;const r="string"==typeof t;this[cr("0xe")]=r?t:e,this[cr("0xf")]=r?{serverPath:e}:t,(i=this[cr("0xf")])[cr("0x10")]||(i[cr("0x10")]="https://collect.riskid.security/"),this.options.serverPath=new URL(this[cr("0xf")][cr("0x10")])[cr("0x11")](),this[cr("0xa")]=this.options.firstPartyMigrationUrl||null,Le[cr("0x12")]=!!this[cr("0xf")][cr("0x3")],this[cr("0xb")].validateSDKParams(this,{throwError:!0,logIfInvalid:!0})||(this.isSDKDisabled=!0),this[cr("0x15")]=new ze(this[cr("0xe")]),this[cr("0x16")]=De.crypto[cr("0x17")](cr("0x18")),this[cr("0x19")]=new qi(this[cr("0xf")][cr("0x10")]),this.configManager=new $e(this.storageManager,this[cr("0x19")]),this[cr("0x1a")]=new Oi(this.storageManager,this[cr("0x1b")],this[cr("0xe")]),this[cr("0x1c")]=new Kt(this.storageManager,this[cr("0x1b")],this.cryptoBinding),this[cr("0x1a")][cr("0x1d")](),this.migrationsManager=new nr(this.identityManager,this[cr("0x19")],this.storageManager),this[cr("0x8")]=this[cr("0xf")][cr("0x8")]||!1,this.eventsManager=new ki(this[cr("0x1b")],this.storageManager,this[cr("0x1c")],this[cr("0x19")],this[cr("0x1a")],this[cr("0x16")],this[cr("0xf")][cr("0x10")],this[cr("0x8")]),this[cr("0x1e")]=new Qi(this[cr("0x19")],this.identityManager,this.configManager)}get actions(){return this.configManager[cr("0x1f")]("actions",[])}async getActions(){return await this.isInitialized(),this.actions}async[cr("0x20")](){if(!this[cr("0x8")])throw new Error(cr("0x21"));if(!await this.isInitialized()){const e=Date[cr("0x22")]();return Le[cr("0x23")](cr("0x24")),{actionToken:"disabled_sdk_"+e}}return this[cr("0x1a")][cr("0x25")]()&&await this[cr("0x26")].refreshSessionToken(),this[cr("0x1a")][cr("0x20")]()}async[cr("0x27")](e){const t="object"!=typeof e?e:null==e?void 0:e[cr("0x28")];return Le[cr("0x23")]("sdk init started"),this[cr("0x7")]=(async()=>(await this[cr("0x1b")][cr("0x29")](this[cr("0x1a")][cr("0x2a")]()),this[cr("0x2b")]=this[cr("0x2b")]||!this[cr("0x1b")][cr("0x1f")](ur,!1),!this[cr("0x2b")]&&(this[cr("0x9")]=this[cr("0x9")]||this[cr("0x1b")].getConfValue(lr,!1),this[cr("0x9")]&&this[cr("0xa")]&&await this.migrationsManager[cr("0x2c")](this[cr("0xa")]),Le[cr("0x12")]=Le[cr("0x12")]||!!this[cr("0x1b")][cr("0x1f")](hr,!1),await this[cr("0x26")][cr("0x2d")]()[cr("0x2e")]((()=>{})),await this[cr("0x26")].sendPageLoadEvent().catch((()=>{})),await this[cr("0x2f")](t).catch((()=>{})),this[cr("0x26")][cr("0x30")](),await this[cr("0x26")].flush()[cr("0x2e")]((()=>{})),Le.info("sdk init done"),!0)))(),await this[cr("0x7")]}async[cr("0x31")](){return null!==this[cr("0x7")]&&await this.initializationPromise}async[cr("0x32")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Date[cr("0x22")]();if(!await this[cr("0x31")]())return Le[cr("0x23")](cr("0x24")),{actionToken:"disabled_sdk_"+r};if(!this.actions[cr("0x33")](e))return Le[cr("0x34")]("Invalid action type",{actionType:e}),{actionToken:ci.CLIENT+cr("0x35")+e+"'_"+r};const n=null==t?void 0:t.claimedUserIdType;if(n&&!fr[cr("0x33")](n))return Le.warn(cr("0x36"),{claimedUserIdType:n}),{actionToken:cr("0x37")+n+"_"+r};let a;this[cr("0x1b")][cr("0x1f")]("enableDeviceAttributesInActions",!1)&&(a=await this.deviceDataManager.getDeviceData());const o=i({type:Ze[cr("0x38")],attributes:i(i(i(i(i(i(i(i(i(i(i(i({action_type:e},(null==t?void 0:t[cr("0x39")])&&{correlation_id:t[cr("0x39")]}),(null==t?void 0:t[cr("0x3a")])&&{claimed_user_id:t[cr("0x3a")]}),n&&{claimed_user_id_type:n}),(null==t?void 0:t[cr("0x3b")])&&{public_key:t.publicKey}),(null==t?void 0:t[cr("0x3c")])&&{extension_metadata:t[cr("0x3c")]}),(null==t?void 0:t[cr("0x3d")])&&{extension_device_attributes:t.extensionDeviceAttributes}),(null==t?void 0:t[cr("0x3e")])&&{suspicious_signals:t[cr("0x3e")]}),(null==t?void 0:t[cr("0x3f")])&&{suspicious_context:t.suspiciousContext}),(null==t?void 0:t.downloadFile)&&{download_file:t[cr("0x40")]}),(null==t?void 0:t.uploadFile)&&{upload_file:t[cr("0x41")]}),(null==t?void 0:t[cr("0x42")])&&{transactionData:t[cr("0x42")]}),a)},(null==t?void 0:t[cr("0x43")])&&{customAttributes:t[cr("0x43")]});try{const e=await this[cr("0x26")].emitEvent(o),{actionToken:t}=e;if(!t)throw new li(new Error(cr("0x44")+(typeof e==cr("0x45")?JSON[cr("0x46")](e)[cr("0x47")](15):e)),ci[cr("0x48")]);return e}catch(t){return{actionToken:t instanceof li?t.errorSpace===ci[cr("0x49")]?t[cr("0x4a")]+"_error_"+e+"_"+t[cr("0x4b")]+"_'"+t[cr("0x4c")]+"'_"+r:t[cr("0x4a")]+"_error_"+e+"_'"+t[cr("0x4c")]+"'_"+r:cr("0x4d")+e+"_"+r}}}async[cr("0x4e")](e){return await this[cr("0x31")]()?this.updateUserId(e):(Le[cr("0x23")](cr("0x24")),!1)}async[cr("0x2f")](e){if(dr.includes(e))return Le.info(cr("0x4f"),{userId:e}),!1;e=e[cr("0x11")](),Le.info("identifyUser",{userId:e});const t=this[cr("0x1a")].getUserId();return t===e||(this.identityManager[cr("0x50")](e),!!(await this.eventsManager[cr("0x51")]({type:Ze[cr("0x52")],attributes:{previous_user_id:t,user_id:e}}))[cr("0x53")])}async[cr("0x54")](){if(!await this[cr("0x31")]())return Le[cr("0x23")](cr("0x24")),!1;const e=this[cr("0x1a")][cr("0x55")]();return null!=e&&this[cr("0x1a")][cr("0x56")](),!!(await this[cr("0x26")][cr("0x51")]({type:Ze[cr("0x52")],attributes:{previous_user_id:e}})).deviceId}async[cr("0x57")](e){return await this.identifyUser(e)}async[cr("0x58")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[cr("0x57")](e,t)}async[cr("0x59")](){return await this[cr("0x54")]()}}pr[cr("0xc")]=!1,document[cr("0x5c")](new CustomEvent(cr("0x5e")));var gr,mr,br=["flush","events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","setUser","setAuthenticatedUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager"];gr=br,mr=400,function(e){for(;--e;)gr.push(gr.shift())}(++mr);var vr=function(e,t){return br[e-=0]};let yr=null;function _r(e){if(!e)throw new(De[vr("0x5")][vr("0x6")][vr("0x7")])("not_initialized","tsPlatform not initialized")}De[vr("0x0")].on(De[vr("0x0")][vr("0x1")],(()=>{const{clientId:e,drs:t}=De[vr("0x2")][vr("0x3")](),i=t||{},{enabled:r,userId:n}=i,o=a(i,Ae);!1!==r&&(yr=new pr(e,o),yr[vr("0x4")]({userId:n}))}));const wr=function(){return _r(yr),yr[vr("0xd")]()},xr={getDeviceId:()=>yr[vr("0xe")][vr("0xf")](),getClientId:()=>yr.identityManager[vr("0x10")](),flush:()=>yr[vr("0x11")][vr("0x12")]()};var Ar=Object.freeze({__proto__:null,__internal:xr,clearUser:function(){return _r(yr),yr[vr("0xa")](...arguments)},getActions:function(){return _r(yr),yr.getActions()},getSessionToken:wr,identifyUser:function(){return _r(yr),yr[vr("0xb")](...arguments)},setAuthenticatedUser:function(){return _r(yr),yr[vr("0x9")](...arguments)},setUser:function(){return _r(yr),yr[vr("0x8")](...arguments)},triggerActionEvent:function(){return _r(yr),yr.triggerActionEvent(...arguments)},unidentifiedUser:function(){return _r(yr),yr[vr("0xc")](...arguments)}});class Er 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 Sr={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 kr,Mr,Cr,Ir;!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"}(kr||(kr={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(Mr||(Mr={})),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"}(Cr||(Cr={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(Ir||(Ir={}));var Dr,Tr={exports:{}},Rr=Tr.exports;var zr=(Dr||(Dr=1,function(e,t){!function(i,r){var n="function",a="undefined",o="object",s="string",c="major",d="model",u="name",l="type",h="vendor",f="version",p="architecture",g="console",m="mobile",b="tablet",v="smarttv",y="wearable",_="embedded",w="Amazon",x="Apple",A="ASUS",E="BlackBerry",S="Browser",k="Chrome",M="Firefox",C="Google",I="Huawei",D="LG",T="Microsoft",R="Motorola",z="Opera",B="Samsung",P="Sharp",F="Sony",O="Xiaomi",N="Zebra",L="Facebook",j="Chromium OS",U="Mac OS",q=" Browser",H=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},K=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},$=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},J=function(e,t){for(var i,a,s,c,d,u,l=0;l<t.length&&!d;){var h=t[l],f=t[l+1];for(i=a=0;i<h.length&&!d&&h[i];)if(d=h[i++].exec(e))for(s=0;s<f.length;s++)u=d[++a],typeof(c=f[s])===o&&c.length>0?2===c.length?typeof c[1]==n?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?typeof c[1]!==n||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):r:this[c[0]]=u?c[1].call(this,u,c[2]):r:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):r):this[c]=u||r;l+=2}},G=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var n=0;n<t[i].length;n++)if(K(t[i][n],e))return"?"===i?r:i}else if(K(t[i],e))return"?"===i?r:i;return t.hasOwnProperty("*")?t["*"]:e},W={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"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[u,f],[/opios[\/ ]+([\w\.]+)/i],[f,[u,z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[u,z+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[u,z]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[u,"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],[u,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[u,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[u,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[u,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[u,"Smart Lenovo "+S]],[/(avast|avg)\/([\w\.]+)/i],[[u,/(.+)/,"$1 Secure "+S],f],[/\bfocus\/([\w\.]+)/i],[f,[u,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[u,z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[u,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[u,z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[f,[u,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[u,"360"+q]],[/\b(qq)\/([\w\.]+)/i],[[u,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1"+q],f],[/samsungbrowser\/([\w\.]+)/i],[f,[u,B+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[u,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[u,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[u],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[u,L],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[u,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[u,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[u,k+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[u,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[u,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[u,[f,G,{"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],[u,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[u,"Netscape"],f],[/(wolvic)\/([\w\.]+)/i],[u,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[u,M+" 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],[u,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[u,[f,/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],[d,[h,B],[l,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[h,B],[l,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[h,x],[l,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[h,x],[l,b]],[/(macintosh);/i],[d,[h,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[h,P],[l,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[h,I],[l,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[h,I],[l,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],[[d,/_/g," "],[h,O],[l,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[h,O],[l,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[h,"OPPO"],[l,m]],[/\b(opd2\d{3}a?) bui/i],[d,[h,"OPPO"],[l,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[h,"Vivo"],[l,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[h,"Realme"],[l,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],[d,[h,R],[l,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[h,R],[l,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[h,D],[l,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[h,D],[l,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[h,"Lenovo"],[l,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[h,"Nokia"],[l,m]],[/(pixel c)\b/i],[d,[h,C],[l,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[h,C],[l,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],[d,[h,F],[l,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[h,F],[l,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[h,"OnePlus"],[l,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[h,w],[l,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[h,w],[l,m]],[/(playbook);[-\w\),; ]+(rim)/i],[d,h,[l,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[h,E],[l,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[h,A],[l,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[h,A],[l,m]],[/(nexus 9)/i],[d,[h,"HTC"],[l,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[d,/_/g," "],[l,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],[d,[h,"TCL"],[l,b]],[/(itel) ((\w+))/i],[[h,V],d,[l,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[h,"Acer"],[l,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[h,"Meizu"],[l,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[h,"Ulefone"],[l,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[h,"Nothing"],[l,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,d,[l,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,d,[l,b]],[/(surface duo)/i],[d,[h,T],[l,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[h,"Fairphone"],[l,m]],[/(u304aa)/i],[d,[h,"AT&T"],[l,m]],[/\bsie-(\w*)/i],[d,[h,"Siemens"],[l,m]],[/\b(rct\w+) b/i],[d,[h,"RCA"],[l,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[h,"Dell"],[l,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[h,"Verizon"],[l,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[h,"Barnes & Noble"],[l,b]],[/\b(tm\d{3}\w+) b/i],[d,[h,"NuVision"],[l,b]],[/\b(k88) b/i],[d,[h,"ZTE"],[l,b]],[/\b(nx\d{3}j) b/i],[d,[h,"ZTE"],[l,m]],[/\b(gen\d{3}) b.+49h/i],[d,[h,"Swiss"],[l,m]],[/\b(zur\d{3}) b/i],[d,[h,"Swiss"],[l,b]],[/\b((zeki)?tb.*\b) b/i],[d,[h,"Zeki"],[l,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],d,[l,b]],[/\b(ns-?\w{0,9}) b/i],[d,[h,"Insignia"],[l,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[h,"NextBook"],[l,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],d,[l,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],d,[l,m]],[/\b(ph-1) /i],[d,[h,"Essential"],[l,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[h,"Envizen"],[l,b]],[/\b(trio[-\w\. ]+) b/i],[d,[h,"MachSpeed"],[l,b]],[/\btu_(1491) b/i],[d,[h,"Rotor"],[l,b]],[/(shield[\w ]+) b/i],[d,[h,"Nvidia"],[l,b]],[/(sprint) (\w+)/i],[h,d,[l,m]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[h,T],[l,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[h,N],[l,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[h,N],[l,m]],[/smart-tv.+(samsung)/i],[h,[l,v]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[h,B],[l,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,D],[l,v]],[/(apple) ?tv/i],[h,[d,x+" TV"],[l,v]],[/crkey/i],[[d,k+"cast"],[h,C],[l,v]],[/droid.+aft(\w+)( bui|\))/i],[d,[h,w],[l,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[h,P],[l,v]],[/(bravia[\w ]+)( bui|\))/i],[d,[h,F],[l,v]],[/(mitv-\w{5}) bui/i],[d,[h,O],[l,v]],[/Hbbtv.*(technisat) (.*);/i],[h,d,[l,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,$],[d,$],[l,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,d,[l,g]],[/droid.+; (shield) bui/i],[d,[h,"Nvidia"],[l,g]],[/(playstation [345portablevi]+)/i],[d,[h,F],[l,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[h,T],[l,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[h,B],[l,y]],[/((pebble))app/i],[h,d,[l,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[h,x],[l,y]],[/droid.+; (glass) \d/i],[d,[h,C],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[d,[h,N],[l,y]],[/(quest( \d| pro)?)/i],[d,[h,L],[l,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[l,_]],[/(aeobc)\b/i],[d,[h,w],[l,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[l,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[l,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[l,m]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"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],[u,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[u,[f,G,W]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,G,W],[u,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[u,U],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[u,f],[/\(bb(10);/i],[f,[u,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[u,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[u,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[u,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[u,j],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[u,f],[/(sunos) ?([\w\.\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[u,f]]},Y=function e(t,g){if(typeof t===o&&(g=t,t=r),!(this instanceof e))return new e(t,g).getResult();var v=typeof i!==a&&i.navigator?i.navigator:r,y=t||(v&&v.userAgent?v.userAgent:""),_=v&&v.userAgentData?v.userAgentData:r,w=g?function(e,t){var i={};for(var r in e)t[r]&&t[r].length%2==0?i[r]=t[r].concat(e[r]):i[r]=e[r];return i}(Z,g):Z,x=v&&v.userAgent==y;return this.getBrowser=function(){var e={};return e[u]=r,e[f]=r,J.call(e,y,w.browser),e[c]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[f]),x&&v&&v.brave&&typeof v.brave.isBrave==n&&(e[u]="Brave"),e},this.getCPU=function(){var e={};return e[p]=r,J.call(e,y,w.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[d]=r,e[l]=r,J.call(e,y,w.device),x&&!e[l]&&_&&_.mobile&&(e[l]=m),x&&"Macintosh"==e[d]&&v&&typeof v.standalone!==a&&v.maxTouchPoints&&v.maxTouchPoints>2&&(e[d]="iPad",e[l]=b),e},this.getEngine=function(){var e={};return e[u]=r,e[f]=r,J.call(e,y,w.engine),e},this.getOS=function(){var e={};return e[u]=r,e[f]=r,J.call(e,y,w.os),x&&!e[u]&&_&&_.platform&&"Unknown"!=_.platform&&(e[u]=_.platform.replace(/chrome os/i,j).replace(/macos/i,U)),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 y},this.setUA=function(e){return y=typeof e===s&&e.length>500?$(e,500):e,this},this.setUA(y),this};Y.VERSION="1.0.39",Y.BROWSER=H([u,f,c]),Y.CPU=H([p]),Y.DEVICE=H([d,h,l,g,m,v,b,y,_]),Y.ENGINE=Y.OS=H([u,f]),e.exports&&(t=e.exports=Y),t.UAParser=Y;var Q=typeof i!==a&&(i.jQuery||i.Zepto);if(Q&&!Q.ua){var X=new Y;Q.ua=X.getResult(),Q.ua.get=function(){return X.getUA()},Q.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var i in t)Q.ua[i]=t[i]}}}("object"==typeof window?window:Rr)}(Tr,Tr.exports)),Tr.exports);const Br="1.4.8",Pr=zr.UAParser(),Fr=Br;function Or(e,t){var i,r,n,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":Fr,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==Pr?void 0:Pr.os)||void 0===i?void 0:i.name,"ts-os-version":null===(r=null==Pr?void 0:Pr.os)||void 0===r?void 0:r.version,"ts-device-model":null===(n=null==Pr?void 0:Pr.device)||void 0===n?void 0:n.model,"ts-manufacturer":null===(a=null==Pr?void 0:Pr.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==Pr?void 0:Pr.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 Nr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Lr=[],jr=[],Ur="undefined"!=typeof Uint8Array?Uint8Array:Array,qr=!1;function Hr(){qr=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)Lr[t]=e[t],jr[e.charCodeAt(t)]=t;jr["-".charCodeAt(0)]=62,jr["_".charCodeAt(0)]=63}function Kr(e,t,i){for(var r,n,a=[],o=t;o<i;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(Lr[(n=r)>>18&63]+Lr[n>>12&63]+Lr[n>>6&63]+Lr[63&n]);return a.join("")}function Vr(e){var t;qr||Hr();for(var i=e.length,r=i%3,n="",a=[],o=16383,s=0,c=i-r;s<c;s+=o)a.push(Kr(e,s,s+o>c?c:s+o));return 1===r?(t=e[i-1],n+=Lr[t>>2],n+=Lr[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=Lr[t>>10],n+=Lr[t>>4&63],n+=Lr[t<<2&63],n+="="),a.push(n),a.join("")}function $r(e,t,i,r,n){var a,o,s=8*n-r-1,c=(1<<s)-1,d=c>>1,u=-7,l=i?n-1:0,h=i?-1:1,f=e[t+l];for(l+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+l],l+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+l],l+=h,u-=8);if(0===a)a=1-d;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=d}return(f?-1:1)*o*Math.pow(2,a-r)}function Jr(e,t,i,r,n,a){var o,s,c,d=8*a-n-1,u=(1<<d)-1,l=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,g=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=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=u?(s=0,o=u):o+l>=1?(s=(t*c-1)*Math.pow(2,n),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,n),o=0));n>=8;e[i+f]=255&s,f+=p,s/=256,n-=8);for(o=o<<n|s,d+=n;d>0;e[i+f]=255&o,f+=p,o/=256,d-=8);e[i+f-p]|=128*g}var Gr={}.toString,Wr=Array.isArray||function(e){return"[object Array]"==Gr.call(e)};Xr.TYPED_ARRAY_SUPPORT=void 0===Nr.TYPED_ARRAY_SUPPORT||Nr.TYPED_ARRAY_SUPPORT;var Zr=Yr();function Yr(){return Xr.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Qr(e,t){if(Yr()<t)throw new RangeError("Invalid typed array length");return Xr.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Xr.prototype:(null===e&&(e=new Xr(t)),e.length=t),e}function Xr(e,t,i){if(!(Xr.TYPED_ARRAY_SUPPORT||this instanceof Xr))return new Xr(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 rn(this,e)}return en(this,e,t,i)}function en(e,t,i,r){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,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);Xr.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Xr.prototype:e=nn(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Xr.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|sn(t,i);e=Qr(e,r);var n=e.write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(on(t)){var i=0|an(t.length);return 0===(e=Qr(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||(r=t.length)!=r?Qr(e,0):nn(e,t);if("Buffer"===t.type&&Wr(t.data))return nn(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function tn(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 rn(e,t){if(tn(t),e=Qr(e,t<0?0:0|an(t)),!Xr.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function nn(e,t){var i=t.length<0?0:0|an(t.length);e=Qr(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function an(e){if(e>=Yr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Yr().toString(16)+" bytes");return 0|e}function on(e){return!(null==e||!e._isBuffer)}function sn(e,t){if(on(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 r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Bn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Pn(e).length;default:if(r)return Bn(e).length;t=(""+t).toLowerCase(),r=!0}}function cn(e,t,i){var r=!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 An(this,t,i);case"utf8":case"utf-8":return yn(this,t,i);case"ascii":return wn(this,t,i);case"latin1":case"binary":return xn(this,t,i);case"base64":return vn(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return En(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function dn(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function un(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=Xr.from(t,r)),on(t))return 0===t.length?-1:ln(e,t,i,r,n);if("number"==typeof t)return t&=255,Xr.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):ln(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function ln(e,t,i,r,n){var a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,i/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=i;a<s;a++)if(d(e,a)===d(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(i+c>s&&(i=s-c),a=i;a>=0;a--){for(var l=!0,h=0;h<c;h++)if(d(e,a+h)!==d(t,h)){l=!1;break}if(l)return a}return-1}function hn(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function fn(e,t,i,r){return Fn(Bn(t,e.length-i),e,i,r)}function pn(e,t,i,r){return Fn(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function gn(e,t,i,r){return pn(e,t,i,r)}function mn(e,t,i,r){return Fn(Pn(t),e,i,r)}function bn(e,t,i,r){return Fn(function(e,t){for(var i,r,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(i=e.charCodeAt(o))>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function vn(e,t,i){return 0===t&&i===e.length?Vr(e):Vr(e.slice(t,i))}function yn(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var a,o,s,c,d=e[n],u=null,l=d>239?4:d>223?3:d>191?2:1;if(n+l<=i)switch(l){case 1:d<128&&(u=d);break;case 2:128==(192&(a=e[n+1]))&&(c=(31&d)<<6|63&a)>127&&(u=c);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(c=(15&d)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&d)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=l}return function(e){var t=e.length;if(t<=_n)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=_n));return i}(r)}Xr.poolSize=8192,Xr._augment=function(e){return e.__proto__=Xr.prototype,e},Xr.from=function(e,t,i){return en(null,e,t,i)},Xr.TYPED_ARRAY_SUPPORT&&(Xr.prototype.__proto__=Uint8Array.prototype,Xr.__proto__=Uint8Array),Xr.alloc=function(e,t,i){return function(e,t,i,r){return tn(t),t<=0?Qr(e,t):void 0!==i?"string"==typeof r?Qr(e,t).fill(i,r):Qr(e,t).fill(i):Qr(e,t)}(null,e,t,i)},Xr.allocUnsafe=function(e){return rn(null,e)},Xr.allocUnsafeSlow=function(e){return rn(null,e)},Xr.isBuffer=On,Xr.compare=function(e,t){if(!on(e)||!on(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},Xr.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}},Xr.concat=function(e,t){if(!Wr(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Xr.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=Xr.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var a=e[i];if(!on(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,n),n+=a.length}return r},Xr.byteLength=sn,Xr.prototype._isBuffer=!0,Xr.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)dn(this,t,t+1);return this},Xr.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)dn(this,t,t+3),dn(this,t+1,t+2);return this},Xr.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)dn(this,t,t+7),dn(this,t+1,t+6),dn(this,t+2,t+5),dn(this,t+3,t+4);return this},Xr.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?yn(this,0,e):cn.apply(this,arguments)},Xr.prototype.equals=function(e){if(!on(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Xr.compare(this,e)},Xr.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+">"},Xr.prototype.compare=function(e,t,i,r,n){if(!on(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===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,n),d=e.slice(t,i),u=0;u<s;++u)if(c[u]!==d[u]){a=c[u],o=d[u];break}return a<o?-1:o<a?1:0},Xr.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Xr.prototype.indexOf=function(e,t,i){return un(this,e,t,i,!0)},Xr.prototype.lastIndexOf=function(e,t,i){return un(this,e,t,i,!1)},Xr.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=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===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return hn(this,e,t,i);case"utf8":case"utf-8":return fn(this,e,t,i);case"ascii":return pn(this,e,t,i);case"latin1":case"binary":return gn(this,e,t,i);case"base64":return mn(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bn(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},Xr.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _n=4096;function wn(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function xn(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function An(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a)n+=zn(e[a]);return n}function En(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2)n+=String.fromCharCode(r[a]+256*r[a+1]);return n}function Sn(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 kn(e,t,i,r,n,a){if(!on(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function Mn(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function Cn(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function In(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Dn(e,t,i,r,n){return n||In(e,0,i,4),Jr(e,t,i,r,23,4),i+4}function Tn(e,t,i,r,n){return n||In(e,0,i,8),Jr(e,t,i,r,52,8),i+8}Xr.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),Xr.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Xr.prototype;else{var n=t-e;i=new Xr(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},Xr.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||Sn(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r},Xr.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||Sn(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},Xr.prototype.readUInt8=function(e,t){return t||Sn(e,1,this.length),this[e]},Xr.prototype.readUInt16LE=function(e,t){return t||Sn(e,2,this.length),this[e]|this[e+1]<<8},Xr.prototype.readUInt16BE=function(e,t){return t||Sn(e,2,this.length),this[e]<<8|this[e+1]},Xr.prototype.readUInt32LE=function(e,t){return t||Sn(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Xr.prototype.readUInt32BE=function(e,t){return t||Sn(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Xr.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||Sn(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},Xr.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||Sn(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},Xr.prototype.readInt8=function(e,t){return t||Sn(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Xr.prototype.readInt16LE=function(e,t){t||Sn(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Xr.prototype.readInt16BE=function(e,t){t||Sn(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Xr.prototype.readInt32LE=function(e,t){return t||Sn(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Xr.prototype.readInt32BE=function(e,t){return t||Sn(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Xr.prototype.readFloatLE=function(e,t){return t||Sn(e,4,this.length),$r(this,e,!0,23,4)},Xr.prototype.readFloatBE=function(e,t){return t||Sn(e,4,this.length),$r(this,e,!1,23,4)},Xr.prototype.readDoubleLE=function(e,t){return t||Sn(e,8,this.length),$r(this,e,!0,52,8)},Xr.prototype.readDoubleBE=function(e,t){return t||Sn(e,8,this.length),$r(this,e,!1,52,8)},Xr.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||kn(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},Xr.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||kn(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},Xr.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,1,255,0),Xr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Xr.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,2,65535,0),Xr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Mn(this,e,t,!0),t+2},Xr.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,2,65535,0),Xr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Mn(this,e,t,!1),t+2},Xr.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,4,4294967295,0),Xr.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Cn(this,e,t,!0),t+4},Xr.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,4,4294967295,0),Xr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Cn(this,e,t,!1),t+4},Xr.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);kn(this,e,t,i,n-1,-n)}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},Xr.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);kn(this,e,t,i,n-1,-n)}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},Xr.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,1,127,-128),Xr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Xr.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,2,32767,-32768),Xr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Mn(this,e,t,!0),t+2},Xr.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,2,32767,-32768),Xr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Mn(this,e,t,!1),t+2},Xr.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,4,2147483647,-2147483648),Xr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Cn(this,e,t,!0),t+4},Xr.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||kn(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Xr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Cn(this,e,t,!1),t+4},Xr.prototype.writeFloatLE=function(e,t,i){return Dn(this,e,t,!0,i)},Xr.prototype.writeFloatBE=function(e,t,i){return Dn(this,e,t,!1,i)},Xr.prototype.writeDoubleLE=function(e,t,i){return Tn(this,e,t,!0,i)},Xr.prototype.writeDoubleBE=function(e,t,i){return Tn(this,e,t,!1,i)},Xr.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===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(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!Xr.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Xr.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Xr.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}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=on(e)?e:Bn(new Xr(e,r).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var Rn=/[^+\/0-9A-Za-z-_]/g;function zn(e){return e<16?"0"+e.toString(16):e.toString(16)}function Bn(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=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 Pn(e){return function(e){var t,i,r,n,a,o;qr||Hr();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 Ur(3*s/4-a),r=a>0?s-4:s;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)n=jr[e.charCodeAt(t)]<<18|jr[e.charCodeAt(t+1)]<<12|jr[e.charCodeAt(t+2)]<<6|jr[e.charCodeAt(t+3)],o[c++]=n>>16&255,o[c++]=n>>8&255,o[c++]=255&n;return 2===a?(n=jr[e.charCodeAt(t)]<<2|jr[e.charCodeAt(t+1)]>>4,o[c++]=255&n):1===a&&(n=jr[e.charCodeAt(t)]<<10|jr[e.charCodeAt(t+1)]<<4|jr[e.charCodeAt(t+2)]>>2,o[c++]=n>>8&255,o[c++]=255&n),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Rn,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Fn(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function On(e){return null!=e&&(!!e._isBuffer||Nn(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Nn(e.slice(0,0))}(e))}function Nn(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ln=Object.freeze({__proto__:null,Buffer:Xr,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),Xr.alloc(+e)},isBuffer:On,kMaxLength:Zr});const jn=e=>null!=e,Un=e=>"string"==typeof e,qn=e=>Un(e)&&""!==e,Hn=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]),Kn=e=>e instanceof FormData,Vn=e=>{const t=[],i=(e,r)=>{jn(r)&&(Array.isArray(r)?r.forEach((t=>{i(e,t)})):"object"==typeof r?Object.entries(r).forEach((t=>{let[r,n]=t;i(`${e}[${r}]`,n)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,r))};return Object.entries(e).forEach((e=>{let[t,r]=e;i(t,r)})),t.length>0?`?${t.join("&")}`:""},$n=async(e,t)=>"function"==typeof t?t(e):t,Jn=async(e,t)=>{const r=await $n(t,e.TOKEN),n=await $n(t,e.USERNAME),a=await $n(t,e.PASSWORD),o=await $n(t,e.HEADERS),s=Object.entries(i(i({Accept:"application/json"},o),t.headers)).filter((e=>{let[t,i]=e;return jn(i)})).reduce(((e,t)=>{let[r,n]=t;return i(i({},e),{},{[r]:String(n)})}),{});if(qn(r)&&(s.Authorization=`Bearer ${r}`),qn(n)&&qn(a)){const e=(e=>{try{return btoa(e)}catch(t){return Xr.from(e).toString("base64")}})(`${n}:${a}`);s.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?s["Content-Type"]=t.mediaType:Hn(t.body)?s["Content-Type"]=t.body.type||"application/octet-stream":Un(t.body)?s["Content-Type"]="text/plain":Kn(t.body)||(s["Content-Type"]="application/json")),new Headers(s)},Gn=(e,t)=>new Promise((async(r,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,r=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,r)=>{var n;return(null===(n=null==t?void 0:t.path)||void 0===n?void 0:n.hasOwnProperty(r))?i(String(t.path[r])):e})),n=`${e.BASE}${r}`;return t.query?`${n}${Vn(t.query)}`:n})(e,t),a=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{Un(i)||Hn(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return jn(i)})).forEach((e=>{let[t,r]=e;Array.isArray(r)?r.forEach((e=>i(t,e))):i(t,r)})),t}})(t),o=(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):Un(e.body)||Hn(e.body)||Kn(e.body)?e.body:JSON.stringify(e.body)})(t),s=await Jn(e,t),c=await(async(e,t,i,r,n,a)=>{const o=new AbortController,s={headers:a,body:null!=r?r:n,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,t,n,o,a,s),d=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)}})(c),u=((e,t)=>{if(t){const i=e.headers.get(t);if(Un(i))return i}})(c,t.responseHeader),l={url:n,ok:c.ok,status:c.status,statusText:c.statusText,headers:c.headers,body:null!=u?u:d};((e,t)=>{var r,n;const a=i({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(a)throw new Er(e,t,a);if(!t.ok){const i=null!==(r=t.status)&&void 0!==r?r:"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 Er(e,t,`Generic Error: status: ${i}; status text: ${a}; body: ${o}`)}})(t,l),r(l)}catch(e){n(e)}})),Wn=new G("idv"),Zn=Symbol(),Yn=Symbol(),Qn="verify-id-sdk";function Xn(e){return sessionStorage.getItem(e)}const ea=new Map;function ta(e,t){const i=ea.get(e);Wn.events.emit(i,t)}function ia(e){ta(Zn,e)}function ra(e,t,i,r,n){ia({type:"verification-result",status:t,step:e,state:r,callbackUrl:n,sessionId:i})}function na(e,t){ia({type:"capture-error",errorCode:t,step:e})}function aa(e,t,i){ia({type:"api-request-error",errorCode:t,step:e,error:i})}function oa(e,t){return Gn(Sr,e).catch((i=>(e.url.endsWith("/events")||aa(t,"request-error",i.message),Promise.reject(i))))}async function sa(e){var t;Sr.HEADERS=Or(e);const i=await function(e){return oa({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}}ea.set(Zn,Zn),ea.set(Yn,Yn);var ca={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)}},da={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 ua=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,r){return e[i]=r,ta(Yn,{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:ca,mutations:da,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var la;function ha(e){const t=[],i=function(e){var t,i,r,n;const a=e.stats.get(la.BLUR_DETECTION),o=e.stats.get(la.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=ga(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),c=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:pa(la.BLUR_DETECTION),count_success:c,count_failure_glare:null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0,count_failure_blur:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,r]of e.stats.entries())i!==la.BLUR_DETECTION&&i!==la.GLARE_DETECTION&&r.durations.length>0&&t.push(fa(r,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=ga(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 fa(e,t){const i=ga(e.durations);return{name:pa(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function pa(e){switch(e){case la.BLUR_DETECTION:case la.GLARE_DETECTION:return"blur_glare_detector";case la.DOCUMENT_DETECTION:return"doc_detector";case la.DOCUMENT_POSITION:return"doc_frame_detector";case la.BARCODE_DETECTION:return"barcode_detector";case la.FACE_DETECTION:return"face_detector";case la.FACE_POSITION:return"face_frame_detector";default:return e}}function ga(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,r=e.reduce(((e,t)=>e+t),0)/i;let n=0;for(let t=0;t<i;t++){const i=e[t];n+=Math.pow(i-r,2)}const a=Math.sqrt(n/(i-1));return{duration_avg:Math.round(r),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"}(la||(la={}));const ma=new class{createUploadImageEvent(e,t,i,r){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(r)}}}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 r,n,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(n=null===(r=ua.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==a&&a};if(i){const e=ha(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 ba(e,t,i,r,n){i?(Sr.HEADERS=Or(r,t),await function(e,t,i){return oa({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,n,e)):console.error("cannot send event, sessionId or startToken is not set")}const va=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${Sr.BASE}/verify/api/v1/verification/${ua.state.sessionId}/risk-session-token`,t=ua.state.clientId,i=Or(t,ua.state.userToken);wr().then((t=>{Wn.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,r,n,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=ma.createDrsInitFailureEvent(o,"init");ba(null===(i=ua.state)||void 0===i?void 0:i.step,null===(r=ua.state)||void 0===r?void 0:r.userToken,null===(n=ua.state)||void 0===n?void 0:n.sessionId,null===(a=ua.state)||void 0===a?void 0:a.clientId,s).then((()=>{ia({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 ya(e,t,i){const r=ma.createErrorEvent(e,t,i);await _a(i,r)}async function _a(e,t){var i,r,n,a,o;const s=null===(i=ua.state)||void 0===i?void 0:i.userToken,c=(null===(r=ua.state)||void 0===r?void 0:r.sessionId)||(null===(n=ua.state)||void 0===n?void 0:n.startToken),d=null===(a=ua.state)||void 0===a?void 0:a.clientId,u=(null===(o=ua.state)||void 0===o?void 0:o.step)||e;await ba(u,s,c,d,t)}const wa=function(){var e,t;(null===(t=null===(e=ua.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var xa;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(xa||(xa={}));const Aa=["pdf417","qr_code"];class Ea{constructor(){this.model=new BarcodeDetector({formats:Aa})}async detect(e){const t=await this.model.detect(e);return wa("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 Sa;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(Sa||(Sa={}));const ka={[xa.DOCUMENT_DETECTOR]:{status:Sa.LOADING},[xa.BLUR_GLARE_CLASSIFIER]:{status:Sa.LOADING},[xa.FACE_LANDMARK]:{status:Sa.LOADING}};const Ma=[xa.DOCUMENT_DETECTOR,xa.BLUR_GLARE_CLASSIFIER],Ca=async()=>{let e=!1;for(;!e;){const t=Object.values(ka).filter((e=>e.status===Sa.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=Ma.every((e=>ka[e].status===Sa.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},Ia=e=>"function"==typeof e,Da=function(e){};Wn.events.on(Wn.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:t}=Wn.moduleMetadata.getInitConfig();if(!e||!t)return!1;const r=(null==t?void 0:t.serverPath)&&(n=null==t?void 0:t.serverPath,a="/verify",(null==n?void 0:n.endsWith(a))?n.slice(0,n.length-a.length):n);var n,a;Sr.BASE=r||window.location.origin,ua.dispatch("setClientId",e),ua.dispatch("setRootElement",(null==t?void 0:t.rootElement)||"root-element"),ua.dispatch("setServerPath",null==t?void 0:t.serverPath),ua.dispatch("setLanguage",null==t?void 0:t.language),ua.dispatch("setCallback",null==t?void 0:t.callback),ua.dispatch("setConsentVersion",null==t?void 0:t.consentVersion),ua.dispatch("setMarkdownSupportText",null==t?void 0:t.markdownSupportText),ua.dispatch("setVideoCaptureSettings",null==t?void 0:t.videoCaptureSettings),ua.dispatch("setCdnHost",null==t?void 0:t.cdnHost),ua.dispatch("setIsImageSigningEnabled",null==t?void 0:t.isImageSigningEnabled),(null==t?void 0:t.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;Ia(t.sessionGranted)&&(Ta=t.sessionGranted);Ia(t.sessionStarted)&&(Ra=t.sessionStarted);Ia(t.imageSubmitted)&&(za=t.imageSubmitted);Ia(t.processing)&&(Ba=t.processing);Ia(t.completed)&&(Pa=t.completed);Ia(t.recapture)&&(Fa=t.recapture);Ia(t.error)&&(Oa=t.error);Ia(i)&&(Na=i)})(t);return ua.dispatch("setStartToken",null==t?void 0:t.startToken),sa(ua.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return ua.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),wa("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const t=e.data.modelName;ka[t]={status:Sa.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:i(i({},e.data.stats),{},{modelName:t})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;ka[t].status=Sa.NOT_AVAILABLE,ya(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));ya("service worker not available","service_worker_not_available","init")}ua.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){ia({type:"init",step:e})}("init"),!0})),Wn.events.on(Zn,(function(e){switch(va.handelEventData(e),Na(e),e.type){case"session-granted":Ta({session:ua.state.sessionId});break;case"session-id-acquired":Ra({session:ua.state.sessionId});break;case"capture-image-result":za({session:ua.state.sessionId},e.imageType);break;case"start-verification-processing":Ba({session:ua.state.sessionId});break;case"verification-complete":Pa({session:ua.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Oa({session:ua.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":Fa({session:ua.state.sessionId},e.reason)}}));let Ta=Da,Ra=Da,za=Da,Ba=Da,Pa=Da,Fa=Da,Oa=Da,Na=e=>{};async function La(e,t,i){Sr.HEADERS=Or(i,t);var r;return(await(r=e,oa({method:"GET",url:`/verify/api/v1/verification/${r}/status`,path:{sid:r},errors:{404:"Session not found"}},"processing"))).body}function ja(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function Ua(e,t,i,r){Sr.HEADERS=Or(t);const n=await(a={start_token:e,accessed_from_desktop:!1,client_type:Ir.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:r},oa({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:n.body.session_id,userToken:n.body.user_token,requiredImages:n.body.required_images}}async function qa(e,t,i){let r,n,a;if(r)try{r=Xn(Qn);const e=JSON.parse(r);n=e.sessionId,a=e.userToken}catch(e){}try{let o;if(a){o=(await La(n,a,i)).missing_images}else{const s=Wn.crypto.createCryptoBinding("sign"),c=await s.getPublicData(),d=await Ua(e,i,t,c.publicKey);n=d.sessionId,a=d.userToken,o=d.requiredImages,r=JSON.stringify({sessionId:n,userToken:a}),function(e,t){sessionStorage.setItem(e,t)}(Qn,r)}return{requiredImages:o,sessionId:n.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}}function Ha(e){let{tagName:t,style:i,id:r="",className:n="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=r,s.className=n,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function Ka(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Va={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 $a=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),r=1;r<t;r++)i[r-1]=arguments[r];let n=this.translations[e];return n||(n=e),n.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Va),Ja={en:Va,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 Ga=async(e,t,i,r,n,a)=>{var o,s,c,d,u,l,h;Sr.HEADERS=Or(i,t);const f=zr.UAParser();let p;if(ua.state.isImageSigningEnabled){const e=Wn.crypto.createCryptoBinding("sign");p=await e.sign(r.data)}const g=await(m=e,b={image:{format:r.format,image_type:a,content:r.data,capture_margins:r.captureMargins,signature:p},device_info:{model:null===(o=null==f?void 0:f.device)||void 0===o?void 0:o.model,type:null===(s=null==f?void 0:f.device)||void 0===s?void 0:s.type,manufacturer:null===(c=null==f?void 0:f.device)||void 0===c?void 0:c.vendor,os:null===(d=null==f?void 0:f.os)||void 0===d?void 0:d.name,os_version:null===(u=null==f?void 0:f.os)||void 0===u?void 0:u.version,browser:null===(l=null==f?void 0:f.browser)||void 0===l?void 0:l.name,browser_version:null===(h=null==f?void 0:f.browser)||void 0===h?void 0:h.version,used_camera:null==n?void 0:n.selectedCamera,cameras:null==n?void 0:n.camerasInfo}},oa({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:b,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"}},b.image.image_type));var m,b;const v=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(g.headers,"x-ts-processing-time-ms");return"ok"!==g.body.feedback&&console.error("Error",g),{missing_images:g.body.missing_images,feedback:g.body.feedback,custom_feedback:g.body.custom_feedback,has_barcode:g.body.has_barcode,serverProcessingTime:v}},Wa=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,r=(2160-screen.height)/2;return{top:r+t.top,bottom:r+t.bottom,right:i+t.right,left:i+t.left}}},Za=e=>["document_front","document_back"].includes(e)?"environment":"user";function Ya(e){switch(e){case"document_front":return Mr.image_type.DOCUMENT_FRONT;case"document_back":return Mr.image_type.DOCUMENT_BACK;case"selfie":return Mr.image_type.SELFIE}}var Qa,Xa={exports:{}};var eo=(Qa||(Qa=1,Xa.exports=function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},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 r=i(1),n=i(7);i.d(t,"a",(function(){return n.a})),i.d(t,"d",(function(){return r.b}));var a=r.a.FACING_MODES,o=r.a.IMAGE_TYPES},function(e,t,i){var r=i(6);i.d(t,"a",(function(){return r.a}));var n=i(2);i.d(t,"b",(function(){return n.a}))},function(e,t,i){function r(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 n(e,t){var i={};try{r(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 r=e*parseFloat(i);return{imageWidth:r,imageHeight:t/(e/r)}}function c(e,t,i){return n(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 d(e,t){return e||t}function u(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function l(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:u()}}t.c=s,t.b=c,t.e=d,t.d=u,t.a=l;var h=i(3)},function(e,t,i){function r(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 c})),i.d(t,"b",(function(){return d})),i.d(t,"d",(function(){return u}));var n,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],c={PNG:"png",JPG:"jpg"},d=(r(n={},"jpg","image/jpeg"),r(n,"png","image/png"),n),u={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(0);i.d(t,"FACING_MODES",(function(){return r.b})),i.d(t,"IMAGE_TYPES",(function(){return r.c})),i.d(t,"_getDebugPlatformInfo",(function(){return r.d}));var n=i(9);i.d(t,"downloadPhoto",(function(){return n.a})),t.default=r.a},function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var n=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=function(){function e(){r(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,r=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,c=e.videoHeight,d=Object(n.c)(s,c,i),u=d.imageWidth,l=d.imageHeight,h=document.createElement("canvas");h.width=u,h.height=l;var f=h.getContext("2d");return o&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(e,0,0,u,l),Object(n.b)(h,r,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 r=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,n={getUserMedia:function(e){return new Promise((function(t,i){r.call(navigator,e,t,i)}))}};e=Object.assign(r,n)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(n.e)(t,i))return a.d;var r=e.getNavigatorMediaDevices().getSupportedConstraints();if(!r.width||!r.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 r=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(n.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=r,a);if(i<r.length){var o=r.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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return c}));var n=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=n.a.IMAGE_TYPES.PNG,c=function(){function e(t){r(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=n.a.getWindowURL(),this.mediaDevices=n.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(r,a){var o=n.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),r(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=n.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var r={};return this._getStreamDevice(e,r)}return new Promise((function(r,n){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),r(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){n(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 r=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&r.push(e)})),t(r)})).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 n.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 r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}));var r=1,n=null,a=!1},function(e,t,i){var r=i(10);i.d(t,"a",(function(){return r.a}))},function(e,t,i){function r(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),n=new Uint8Array(r),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return new Blob([r],{type:i})}function n(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=d.c.PNG;return"image/jpeg"===e&&(t=d.c.JPG),t}function o(e,t,i){return e+"-"+n(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var r=document.createElement("a");r.download=o(t,i,e.type),r.href=window.URL.createObjectURL(e);var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}function c(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(r(e),t,i)}t.a=c;var d=i(0)}])),Xa.exports),to=W(eo);class io{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return io.instance||(io.instance=new io),io.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 ro=[{os:{name:"Android"},label:"2 0"}];async function no(){const e=(await async function(){const e=io.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 ao.some((e=>t.includes(e)))})),t=zr.UAParser(),i=e.find((e=>ro.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const ao=["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"],oo={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},so={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},co=async e=>{var t,i;let r;return"environment"==e&&(r=await no()),null!==(i=null===(t=null==r?void 0:r.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},uo=(e,t)=>{var i,r;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:so:null!==(r=null==t?void 0:t.environmentVideoConstraints)&&void 0!==r?r:oo},lo=e=>{const t=Ha({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},ho={title:"other_error_code_title",message:"other_error_code_message"},fo={ok:ho,document_face_not_found:ho,restricted_criteria:ho,other:ho,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"}},po={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"}},go=(e,t)=>{const i=Ha({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){Ka(e,Ha({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"})),Ka(e,Ha({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"})),Ka(e,Ha({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"})),Ka(e,Ha({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 mo=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 bo(){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 vo={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)"}},yo=e=>{let{text:t,level:r=1,style:n={},id:a,testid:o}=e;const s=Ha({tagName:`h${r}`,style:i(i(i({},vo.all),vo[r]),n),id:a,testid:o});return s.textContent=t,s.id=a,s};var _o,wo={exports:{}};let xo=null;try{xo=(_o||(_o=1,function(e,t){!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 r(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 a={exec:()=>null};function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(s.caret,"$1"),i=i.replace(e,n),r},getRegex:()=>new RegExp(i,t)};return r}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\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")},c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d=/(?:[*+-]|\d{1,9}[.)])/,u=o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,d).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(),l=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,d).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b=o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v=o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),y={blockquote:o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:c,html:b,lheading:u,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:v,table:a,text:/^[^\n]+/},_=o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),w=i(i({},y),{},{table:_,paragraph:o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),x=i(i({},y),{},{html:o("^ *(?: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:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:o(l).replace("hr",c).replace("heading"," *#{1,6} *[^\n]").replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,E=/^( {2,}|\\)\n(?!\s*$)/,S="\\p{P}\\p{S}",k=o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,S).getRegex(),M=o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,S).getRegex(),C=o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,S).getRegex(),I=o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,S).getRegex(),D=o(/\\([punct])/,"gu").replace(/punct/g,S).getRegex(),T=o(/^<(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=o(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),z=o("^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(),B=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F=o(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",h).getRegex(),O=o(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:a,anyPunctuation:D,autolink:T,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:E,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,emStrongLDelim:M,emStrongRDelimAst:C,emStrongRDelimUnd:I,escape:A,link:P,nolink:O,punctuation:k,reflink:F,reflinkSearch:o("reflink|nolink(?!\\()","g").replace("reflink",F).replace("nolink",O).getRegex(),tag:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},L=i(i({},N),{},{link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()}),j=i(i({},N),{},{escape:o(A).replace("])","~|])").getRegex(),url:o(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),U=i(i({},j),{},{br:o(E).replace("{2,}","*").getRegex(),text:o(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:y,gfm:w,pedantic:x},H={normal:N,gfm:j,breaks:U,pedantic:L},K={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>K[e];function $(e,t){if(t){if(s.escapeTest.test(e))return e.replace(s.escapeReplace,V)}else if(s.escapeTestNoEncode.test(e))return e.replace(s.escapeReplaceNoEncode,V);return e}function J(e){try{e=encodeURI(e).replace(s.percentDecode,"%")}catch(e){return null}return e}function G(e,t){const i=e.replace(s.findPipe,((e,t,i)=>{let r=!1,n=t;for(;--n>=0&&"\\"===i[n];)r=!r;return r?"|":" |"})).split(s.splitPipe);let r=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(;r<i.length;r++)i[r]=i[r].trim().replace(s.slashPipe,"|");return i}function W(e,t,i){const r=e.length;if(0===r)return"";let n=0;for(;n<r;){const a=e.charAt(r-n-1);if(a!==t||i){if(a===t||!i)break;n++}else n++}return e.slice(0,r-n)}function Z(e,t,i,r,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class Y{constructor(t){n(this,"options",void 0),n(this,"rules",void 0),n(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:W(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const r=e.match(i.other.indentCodeCompensation);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.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=W(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:W(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=W(t[0],"\n").split("\n"),i="",r="";const n=[];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"),c=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,r=r?`${r}\n${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,n,!0),this.lexer.state.top=d,0===e.length)break;const u=n[n.length-1];if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){const t=u,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);n[n.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==(null==u?void 0:u.type));else{const t=u,a=t.raw+"\n"+e.join("\n"),o=this.list(a);n[n.length-1]=o,i=i.substring(0,i.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(n[n.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:n,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const r=i.length>1,n={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,r="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),d=e.split("\n",1)[0],u=!c.trim(),l=0;if(this.options.pedantic?(l=2,s=c.trimStart()):u?l=t[1].length+1:(l=t[2].search(this.rules.other.nonSpaceChar),l=l>4?1:l,s=c.slice(l),l+=t[1].length),u&&this.rules.other.blankLine.test(d)&&(r+=d+"\n",e=e.substring(d.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(l),i=this.rules.other.hrRegex(l),n=this.rules.other.fencesBeginRegex(l),a=this.rules.other.headingBeginRegex(l),o=this.rules.other.htmlBeginRegex(l);for(;e;){const h=e.split("\n",1)[0];let f;if(d=h,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),f=d):f=d.replace(this.rules.other.tabCharGlobal," "),n.test(d))break;if(a.test(d))break;if(o.test(d))break;if(t.test(d))break;if(i.test(d))break;if(f.search(this.rules.other.nonSpaceChar)>=l||!d.trim())s+="\n"+f.slice(l);else{if(u)break;if(c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(n.test(c))break;if(a.test(c))break;if(i.test(c))break;s+="\n"+d}u||d.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),c=f.slice(l)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:r,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),n.raw+=r}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let e=0;e<n.items.length;e++)if(this.lexer.state.top=!1,n.items[e].tokens=this.lexer.blockTokens(n.items[e].text,[]),!n.loose){const t=n.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));n.loose=i}if(n.loose)for(let e=0;e<n.items.length;e++)n.items[e].loose=!0;return n}}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"):"",r=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:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=G(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=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===r.length){for(const e of r)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 n)a.rows.push(G(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=W(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 r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;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],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],r=e[3])}else r=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)),Z(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},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 Z(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...r[0]].length-1;let n,a,o=i,s=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(a=[...n].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...r[0]][0].length,c=e.slice(0,i+r.index+t+a);if(Math.min(i,a)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const d=c.slice(2,-2);return{type:"strong",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}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),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(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,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let a;do{var i,r;a=t[0],t[0]=null!==(i=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,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 Q{constructor(t){n(this,"tokens",void 0),n(this,"options",void 0),n(this,"state",void 0),n(this,"tokenizer",void 0),n(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new Y,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:s,block:q.normal,inline:H.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=H.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=H.breaks:i.inline=H.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:H}}static lex(e,t){return new Q(t).lex(e)}static lexInline(e,t){return new Q(t).inlineTokens(e)}lex(e){e=e.replace(s.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,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,n))&&(e=e.substring(t.raw.length),n.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&n.length>0?n[n.length-1].raw+="\n":n.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=n[n.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?n.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),n.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=n[n.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),n.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),n.push(t);else{var o;if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))i=n[n.length-1],a&&"paragraph"===(null===(o=i)||void 0===o?void 0:o.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=n[n.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):n.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,n}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,r,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,n.index)+"++"+c.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,c,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(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))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 X{constructor(t){n(this,"options",void 0),n(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:r,escaped:n}=e;const a=null===(t=(r||"").match(s.notSpaceStart))||void 0===t?void 0:t[0],o=i.replace(s.endingNewline,"")+"\n";return a?'<pre><code class="language-'+$(a)+'">'+(n?o:$(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:$(o,!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 r="";for(let t=0;t<e.items.length;t++){const i=e.items[t];r+=this.listitem(i)}const n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+r+"</"+n+">\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+" "+$(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 r="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];i="";for(let e=0;e<n.length;e++)i+=this.tablecell(n[e]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</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>${$(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:r}=e;const n=this.parser.parseInline(r),a=J(t);if(null===a)return n;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+$(i)+'"'),o+=">"+n+"</a>",o}image(e){let{href:t,title:i,text:r}=e;const n=J(t);if(null===n)return $(r);let a=`<img src="${t=n}" alt="${r}"`;return i&&(a+=` title="${$(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$(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){n(this,"options",void 0),n(this,"renderer",void 0),n(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new X,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 r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=n,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=n;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 n=a,o=this.renderer.text(n);for(;r+1<e.length&&"text"===e[r+1].type;)n=e[++r],o+="\n"+this.renderer.text(n);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 r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=e||"";continue}}const a=n;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){n(this,"options",void 0),n(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?Q.lex:Q.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}n(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class re{constructor(){n(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),n(this,"options",this.setOptions),n(this,"parse",this.parseMarkdown(!0)),n(this,"parseInline",this.parseMarkdown(!1)),n(this,"Parser",te),n(this,"Renderer",X),n(this,"TextRenderer",ee),n(this,"Lexer",Q),n(this,"Tokenizer",Y),n(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;i=i.concat(this.walkTokens(e.items,t));break}default:{var r;const e=n;null!==(r=this.defaults.extensions)&&void 0!==r&&null!==(r=r.childTokens)&&void 0!==r&&r[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,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,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach((t=>{const r=i({},t);if(r.async=this.defaults.async||r.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,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=t.renderer.apply(this,r);return!1===a&&(a=i.apply(this,r)),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)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new X(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 r=i,n=t.renderer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new Y(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 r=i,n=t.tokenizer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.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 r=i,n=t.hooks[r],a=e[r];ie.passThroughHooks.has(i)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(n.call(e,t)).then((t=>a.call(e,t)));const i=n.call(e,t);return a.call(e,i)}:e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults=i(i({},this.defaults),r)})),this}setOptions(e){return this.defaults=i(i({},this.defaults),e),this}lexer(e,t){return Q.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,r)=>{const n=i({},r),a=i(i({},this.defaults),n),o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===n.async)return o(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 o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?Q.lex:Q.lexInline,c=a.hooks?a.hooks.provideParser():e?te.parse:te.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then((e=>s(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>c(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(t=a.hooks.preprocess(t));let e=s(t,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let i=c(e,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(e){return o(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>"+$(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const ne=new re;function ae(e,t){return ne.parse(e,t)}ae.options=ae.setOptions=function(e){return ne.setOptions(e),ae.defaults=ne.defaults,r(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(){return ne.use(...arguments),ae.defaults=ne.defaults,r(ae.defaults),ae},ae.walkTokens=function(e,t){return ne.walkTokens(e,t)},ae.parseInline=ne.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=X,ae.TextRenderer=ee,ae.Lexer=Q,ae.lexer=Q.lex,ae.Tokenizer=Y,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,ce=ae.use,de=ae.walkTokens,ue=ae.parseInline,le=ae,he=te.parse,fe=Q.lex;e.Hooks=ie,e.Lexer=Q,e.Marked=re,e.Parser=te,e.Renderer=X,e.TextRenderer=ee,e.Tokenizer=Y,e.getDefaults=t,e.lexer=fe,e.marked=ae,e.options=oe,e.parse=le,e.parseInline=ue,e.parser=he,e.setOptions=se,e.use=ce,e.walkTokens=de}(t)}(0,wo.exports)),wo.exports).marked}catch(e){console.log("marked is not supported",e)}const Ao=xo,Eo=e=>{let{text:t,id:i,testid:r,clientHeight:n}=e;const a=!!n&&n<700,o=Ha({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:r});return Ka(o,yo({text:t,level:a?6:5,style:{color:"white"}})),o};const So=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 ko;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(ko||(ko={}));const Mo="#ED3232",Co="#01B678",Io="#FFF";const Do=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 To(e){let{context:t,onDetect:i,frame:r,showError:n,isSelfie:a=!1}=e;const o=t.state.name;if(o===ko.REJECTED){n(function(e){switch(e){case la.DOCUMENT_DETECTION:return"searching_document_autocapture";case la.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case la.BARCODE_DETECTION:return kr.feedback.BARCODE_NOT_FOUND;case la.BLUR_DETECTION:return kr.feedback.BLUR;case la.GLARE_DETECTION:return kr.feedback.GLARE;case la.FACE_DETECTION:return kr.feedback.FACE_NOT_FOUND;case la.FACE_POSITION:return kr.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));Ro("border-color",t.invalidFramesCause===la.DOCUMENT_DETECTION?Io:Mo)}if(o===ko.VALID)if(a){Ro("border-color",Co);n(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else n("capturing_in_progress_message"),Ro("border-color",Io);o===ko.ACCEPTED&&(Ro("border-color",Io),n(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:r,suspendedPreview:!0,context:t}))}function Ro(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function zo(e){let t,i,r,{captureFrame:n,object:a,videoWidth:o,videoHeight:s,deviceWidth:c,deviceHeight:d,threshold:u,iouThreshold:l=.85}=e;if(o/s>=c/d){r=d/s;const e=(o*r-c)/2;t=a.x*r-e,i=a.y*r}else{r=c/o;const e=(s*r-d)/2;t=a.x*r,i=a.y*r-e}const h=t+a.width*r,f=i+a.height*r;!function(e,t,i,r){var n,a;if(null===(a=null===(n=ua.state.autoCaptureSettings)||void 0===n?void 0:n.settings)||void 0===a?void 0:a.debug){const n=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${r}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=`${r}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,n.appendChild(a)}}}(t,i,a.width*r,a.height*r);const p=function(e,t){const i=Math.max(e.left,t.left),r=Math.min(e.right,t.right),n=Math.max(e.top,t.top),a=r-i,o=Math.min(e.bottom,t.bottom)-n;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:n.top,left:n.left,bottom:n.bottom,right:n.right},{top:i,left:t,bottom:f,right:h}),g=p>l,m=a.width*r*(a.height*r)>u*(n.width*n.height);return g&&m}const Bo=()=>{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=Ha({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 Ka(t,e),Ka(t,yo({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const Po=()=>{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=Ha({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 Ka(t,e),Ka(t,yo({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},Fo=e=>{let{step:t,setImage:i,camera:r}=e;var n,a,o,s;const c=po[t];(null===(n=ua.state.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&"selfie"===t&&(c.instructions="second_title_face_autocapture");const d=((e,t)=>Ha({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),u=Ha({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),l=Ha({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(ua.state.rootElementId);if(!h)throw new Error("Root element not found");const f=go(Za(t),h);Ka(u,So(t)),Ka(u,f);const p=(()=>{const e=Ha({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=bo();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",Ka(e,t),Ka(e,yo({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();Ka(f,p),p.style.visibility="hidden";const g=Eo({text:$a.translate(c.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:r,color:n,withLoader:a}=e;if(a){const e=mo();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=Ha({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"});return Ka(a,e),a.addEventListener("click",t),a}{const e=Ha({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(n||"white"),borderRadius:"40px"},id:i+"-outer",testid:r+"-outer"});return Ka(e,Ha({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:Do(r.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=ua.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),b=(()=>{const e=Ha({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=Po();return Ka(e,Bo()),Ka(e,t),e})(),v=(e=>{let{title:t,text:i,clientHeight:r,customTextColor:n}=e;const a=r<700,o=Ha({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=yo({text:t,level:a?2:1,style:{color:n||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),c=yo({text:i,level:a?6:5,style:{color:n||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return Ka(o,s),Ka(o,c),o})({text:$a.translate(c.instructions),title:$a.translate(c.title),clientHeight:h.clientHeight}),y=(e=>{const t=e<700,i=Ha({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:ua.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),r=Ha({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),n=bo();n.style.width="16px",n.style.height="16px",n.style.margin="0 10px",ua.state.markdownSupportText?Ka(r,n):Ka(i,n);const a=ua.state.markdownSupportText&&null!=Ao?Ao.parse(ua.state.markdownSupportText,{async:!1}):"",o=yo({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=yo({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,Ka(r,o)),Ka(i,a?[r,s]:o),i})(h.clientHeight),_=(null===(s=ua.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?mo():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}();_.style.display="none",Ka(l,g),Ka(l,v),Ka(l,u),Ka(l,y),Ka(d,l);const w=Ha({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});Ka(w,_),Ka(w,m),Ka(w,b),Ka(d,w),Ka(d,r.videoElement);const x=Ha({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Za(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const A=(e=>{const t=Ha({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(x);return Ka(d,A),{component:d,setLoadingMode:e=>{var t;m.style.display="none",y.style.visibility="hidden",_.style.display="block",(null===(t=ua.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(_.style.height="63px",_.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var r,n;m.style.display="none",y.style.display="none",b.style.display="flex";const a=b.querySelector("#approve-image"),o=b.querySelector("#retake-image"),s=a.cloneNode(!0);null===(r=a.parentNode)||void 0===r||r.replaceChild(s,a),s.addEventListener("click",t);const c=o.cloneNode(!0);null===(n=o.parentNode)||void 0===n||n.replaceChild(c,o),c.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{b.style.display="none",y.style.display="flex"},setPreviewImage:(e,t)=>{x.src=e,p.style.visibility="hidden",r.videoElement.style.display="none",m.style.display="none",y.style.visibility="hidden",A.style.display="block",_.style.display=t?"none":"block"},setLoadingComplete:()=>{_.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(y.style.visibility="hidden");let i;i=e==kr.feedback.RESTRICTED_CRITERIA&&t?t:fo[e]?fo[e].message:$a.translate(e)!==e?e:fo.other.message,document.getElementById("image-error-message").innerHTML=$a.translate(i),y.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",r.videoElement.style.display="block",A.style.display="none",_.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",A.style.display="none",r.videoElement.style.display="block";const i=e==kr.feedback.RESTRICTED_CRITERIA,n=fo[e]||fo.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=Ao?Ao.parse(t,{async:!1}):$a.translate(n.message),y.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=$a.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=$a.translate(i))}}};class Oo{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 No(e,t,i))}}class No{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 Lo{constructor(){this.name=ko.ACCEPTED}async handleFrame(){return new Oo}}class jo{constructor(){this.name=ko.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:r,detectionStrategy:n}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new Lo)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new qo)),a}}class Uo{constructor(){this.name=ko.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new jo),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new qo),a):(t.invalidFramesCounter++,a)}}class qo{constructor(){this.name=ko.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new jo)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new Uo)),a}}class Ho{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 qo,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 Ko(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const o=Vo(t,n,a),s=await new Promise(((n,a)=>{navigator.serviceWorker.ready.then((s=>{var c;const d=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",d),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",d),ya(t.data.error.toString(),e,"error"),a(t.data.error))};navigator.serviceWorker.addEventListener("message",d),null===(c=s.active)||void 0===c||c.postMessage(i({type:e,imageData:o,height:t.height,width:t.width},r))}))}));return wa(`****** in web-SDK return result for ${e}`,s),s}function Vo(e,t,i){const r=document.createElement("canvas"),n=t||{height:e.height,width:e.width},a=r.getContext("2d");r.width=n.width,r.height=n.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,n.width,n.height):null==a||a.drawImage(e,0,0,n.width,n.height);const o=null==a?void 0:a.getImageData(0,0,n.width,n.height);return r.remove(),o}async function $o(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return Ko("DETECT_DOCUMENT",e,{},ka[xa.DOCUMENT_DETECTOR].imageDimensions)}async function Jo(e,t){return Ko("BLUR_GLARE_CLASSIFY",e,{},ka[xa.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const Go=function(){try{return new Ea}catch(e){return wa("Error initializing barcode model",e),ya("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Wo{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=Go}async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Oo;let a=Date.now();const o=null===(r=await $o(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(la.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=zo({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:ua.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:ua.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,n.addStepResponse(la.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Jo(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(la.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));if(n.addStepResponse(la.GLARE_DETECTION,!l,s),l)return n;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(n.addStepResponse(la.BARCODE_DETECTION,i,s),!i)return n}return n}}class Zo{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Yo{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(la).forEach((e=>{this.stats.set(e,new Zo)}))}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,r){const n=this.stats.get(e);if(!n)throw new Error(`Stat for step ${e} not found`);n.durations.push(t),n.countSuccess+=i,n.countFailed+=r}}let Qo=!1;const Xo=e=>{Qo=e};class es{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Oo;let a=Date.now();const o=null===(r=await $o(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(la.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=zo({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:ua.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:ua.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,n.addStepResponse(la.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Jo(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(la.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));return n.addStepResponse(la.GLARE_DETECTION,!l,s),n}}let ts=!1;const is=e=>{ts=e};class rs{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Oo;let a=Date.now();const o=null===(r=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:Ko("DETECT_FACE_LANDMARKS",e)}(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(la.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return n;a=Date.now();const c=zo({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:ua.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:ua.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,n.addStepResponse(la.FACE_POSITION,c,s),n}}let ns=!1;const as=e=>{ns=e};async function os(e,t){var i,r,n,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=ma.createCameraNotAllowedEvent(t.message,e);await ba(null===(i=ua.state)||void 0===i?void 0:i.step,null===(r=ua.state)||void 0===r?void 0:r.userToken,null===(n=ua.state)||void 0===n?void 0:n.sessionId,null===(a=ua.state)||void 0===a?void 0:a.clientId,s),ua.dispatch("setIsCapturingProcessStarted",!1)}na(e,o)}function ss(e){const t=(e=>{var t,i,r,n;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(r=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===r?void 0:r[1];if(!s)throw new Error("unable-to-parse-data-uri");const c=null===(n=s.split("/"))||void 0===n?void 0:n[1];if(!c)throw new Error("unable-to-parse-data-uri");return{data:o,format:c}})(e);return{image:{data:t.data,format:t.format,captureMargins:Wa()}}}let cs=!1;const ds=async()=>{const e=await La(ua.state.sessionId,ua.state.userToken,ua.state.clientId);us(e)},us=async e=>{var t;"expired"===(null==e?void 0:e.status)?aa("processing","session-expired",`Session expired for session id: ${ua.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(ds,3e3)},ls=e=>{let{step:t}=e;var i,r,n;const a=null===(r=null===(i=ua.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===r?void 0:r.enabled;let o=!1;const s=null===(n=ua.state)||void 0===n?void 0:n.videoCaptureSettings,c=(e=>{let t,i,r=!1;const n=lo(e),a=new to(n),o=async()=>{r&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),r=!1)};return{videoStream:i,startVideoFeed:async e=>{var n,s,c;r&&await o(),"environment"==e&&(t=await no());const d=null!==(s=null===(n=null==t?void 0:t.selectedCamera)||void 0===n?void 0:n.deviceId)&&void 0!==s?s:e,u=uo(e,null===(c=ua.state)||void 0===c?void 0:c.videoCaptureSettings);io.getInstance().stopStream(),i=await a.startCamera(d,u),r=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Za(t));!function(e){ia({type:"page-load",step:e})}(t),ds();const d=Fo({step:t,setImage:u,camera:c});async function u(e){let{suspendedPreview:i=!1,frame:r,context:n}=e;r||(r=Do(c.videoElement)),"document_front"===t&&is(!1),"document_back"===t&&Xo(!1),"selfie"===t&&as(!1);const a=Date.now(),u=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})))}}(c);if(!o)return;d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(e=>e.toDataURL("image/jpeg"))(r);d.setPreviewImage(f,"selfie"===t),await c.stopVideoFeed(),"selfie"!==t?await h(i,f,u,a,null==n?void 0:n.stats):(d.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),d.setApprovalRetakeButtons({approveAction:async()=>{d.hideApprovalRetakeButtons(),await h(i,f,u,a,null==n?void 0:n.stats)},retakeAction:()=>{d.hideApprovalRetakeButtons(),l()}}))}function l(){"selfie"===t&&d.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),c.startVideoFeed(Za(t)).then((()=>{o=!0,d.enableVideoElement(),a&&(d.setAutoCapturingError(null),f(t))})).catch((async e=>{throw await os(t,e),e}))}async function h(e,i,r,n,u){const h=[];!function(e){var i,r,n,a;const o=ma.createUserActionEvent("capture_image",t,e);ba(null===(i=ua.state)||void 0===i?void 0:i.step,null===(r=ua.state)||void 0===r?void 0:r.userToken,null===(n=ua.state)||void 0===n?void 0:n.sessionId,null===(a=ua.state)||void 0===a?void 0:a.clientId,o)}(u),function(e,t){ia({type:"capture-image",imageType:t,step:e})}(t,Ya(t));try{const c=Date.now(),u=ss(i);o=!1,h.push(Ga(ua.state.sessionId,ua.state.userToken,ua.state.clientId,null==u?void 0:u.image,r,Ya(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(f,"has_barcode")&&(cs=f.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:r,serverProcessingTime:n,userToken:a,sessionId:o,clientId:s}=e;const c=Date.now()-i,d=r?i-r:0,u=ma.createUploadImageEvent(t,String(c),String(n),String(d));await ba(t,a,o,s,u)}({step:t,requestStartTime:c,imageProcessingStartTime:n,serverProcessingTime:f.serverProcessingTime,userToken:ua.state.userToken,sessionId:ua.state.sessionId,clientId:ua.state.clientId}),ua.dispatch("setMissingImages",f.missing_images),d.setLoadingComplete(),function(e,t,i){ia({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Ya(t),f.feedback),"ok"!==f.feedback)return await async function(e){Ro("border-color",Mo),a?d.setAutoCapturingError(e.feedback,e.custom_feedback):d.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),Ro("border-color",Io)}(f),void l();Ro("border-color",Co),await new Promise((e=>setTimeout(e,750))),Ro("border-color",Io),ua.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(ua.state.missingImages))}catch(e){d.setLoadingComplete(),d.setCapturingShowErrorMode(kr.feedback.OTHER),c.startVideoFeed(Za(t)).then((()=>{o=!0})).catch((async e=>{throw await os(t,e),e})),na(t,"failed-to-submit-image")}}async function f(e){if("document_front"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;wa("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.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:r}=e;var n,a,o,s,c,d,u;const l=new Ho(new es,null!==(o=null===(a=null===(n=ua.state.autoCaptureSettings.settings)||void 0===n?void 0:n.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Yo;for(is(!0);l.state.name!==ko.ACCEPTED&&ts;){const e=Date.now(),n=Do(t.videoElement),a={width:null!==(c=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==c?c:0,height:null!==(u=null===(d=t.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==u?u:0},o=await l.handleFrame({frame:n,deviceInfo:a}),f=Date.now()-e+50;h.addStats(o,f),l.stats=h,await To({context:l,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}if("document_back"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;wa("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.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:r,hasBarcode:n}=e;var a,o,s,c,d,u,l;const h=new Ho(new Wo(n),null!==(s=null===(o=null===(a=ua.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Xo(!0);const f=new Yo;for(;h.state.name!==ko.ACCEPTED&&Qo;){const e=Date.now(),n=Do(t.videoElement),a={width:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==d?d:0,height:null!==(l=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==l?l:0},o=await h.handleFrame({frame:n,deviceInfo:a}),s=Date.now()-e+50;f.addStats(o,s),h.stats=f,await To({context:h,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError,hasBarcode:cs})}if("selfie"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;wa("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.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:r}=e;var n,a,o,s;const c=new Ho(new rs,30);as(!0);const d=new Yo;for(;c.state.name!==ko.ACCEPTED&&ns;){const e=Date.now(),u=Do(t.videoElement),l={width:null!==(a=null===(n=t.videoElement.getBoundingClientRect())||void 0===n?void 0:n.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 c.handleFrame({frame:u,deviceInfo:l}),f=Date.now()-e;d.addStats(h,f),c.stats=d,await To({context:c,onDetect:i,showError:r,frame:u,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}}return a&&f(t),(async e=>{var t,i,r,n;const a=ma.createPageViewEvent(e);await ba(null===(t=ua.state)||void 0===t?void 0:t.step,null===(i=ua.state)||void 0===i?void 0:i.userToken,null===(r=ua.state)||void 0===r?void 0:r.sessionId,null===(n=ua.state)||void 0===n?void 0:n.clientId,a)})(t),c.startVideoFeed(Za(t)).then((()=>{o=!0})).catch((async e=>{throw await os(t,e),e})),d.component},hs=()=>{ia({type:"start-verification-processing",step:ua.state.step}),ra("processing","processing",ua.state.sessionId);const e=fs("processing-verification");Ka(e,Eo({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await La(ua.state.sessionId,ua.state.userToken,ua.state.clientId);n(e)},i=()=>{setTimeout(t,3e3)},r=async e=>{ua.dispatch("setStep",e.status),ua.dispatch("setStatus",e.status)},n=async e=>{var t,n;if(ua.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){io.getInstance().stopStream();const i=ma.createProcessingCompleteEvent();await ba(ua.state.step,ua.state.userToken,null===(t=ua.state)||void 0===t?void 0:t.sessionId,null===(n=ua.state)||void 0===n?void 0:n.clientId,i),r(e),ra("complete",e.status,ua.state.sessionId),function(e,t,i){ia({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",ua.state.sessionId,e.callback_url),function(e){sessionStorage.removeItem(e)}(Qn)}else"recapture"===(null==e?void 0:e.status)?(r(e),ua.dispatch("setIsCapturingProcessStarted",!1),ra("recapture",e.status,ua.state.sessionId),function(e,t,i){ia({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?aa("processing","session-expired",`Session expired for session id: ${ua.state.sessionId}`):i();else"processing"!==e.state&&(r(e),i())};return t(),e},fs=e=>Ha({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function ps(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const r=function(e){switch(e){case"processing":return hs;case"document_front":case"document_back":case"selfie":return ls;default:throw new Error("Invalid step")}}(e);Ka(t,r({step:e}))}function gs(e){let{key:t,state:i}=e;const r=i.rootElementId,n=document.getElementById(r);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&ps(i.step,n),n&&"processing"===i.step&&(n.style.visibility="hidden")}function ms(){const e=ja(Xn(Qn));if(!ja)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 ua.dispatch("setSessionId",t),ua.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function bs(){var e,t;if(null===(e=ua.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await _s(),wa("all models loaded - auto-capture enabled")}catch(e){ua.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=ua.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),wa("Model loading did not complete on time:",e);ya(`timed out loading models: ${Ma.filter((e=>ka[e].status!==Sa.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(ka).filter((e=>e.status===Sa.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=ma.createSdkInitEvent(e,t);await _a("init",i)}(Date.now()-e,i)}}async function vs(e){var t;try{await io.getInstance().startNewStream({video:i(i({},uo("environment",null===(t=ua.state)||void 0===t?void 0:t.videoCaptureSettings)),{},{deviceId:await co("environment")})}),function(e,t){ia({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const r=document.getElementById(i);r.style.visibility="visible",ps(e.shift(),r)}(ua.state.missingImages,ua.state.sessionId,ua.state.rootElementId)}catch(e){await os("init",e)}}async function ys(e){let{status:t,sessionId:i,userToken:r,missingImages:n,rootElementId:a,language:o}=e;!function(e,t){ia({type:"session-granted",step:e,sessionId:t})}("init",i),ua.dispatch("setStatus",t),ua.dispatch("setSessionId",i),ua.dispatch("setUserToken",r),ua.dispatch("setMissingImages",n),ua.dispatch("setRootElement",a),ua.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";$a.overrideLanguage(Ja[i]||Ja.en);let r=document.getElementById(t);if(!r){r=Ha({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 `,Ka(document.head,e),Ka(document.body,r)}}(ua.state.sessionId,ua.state.rootElementId,ua.state.language),function(){try{Wn.events.off(Yn,gs)}catch(e){}Wn.events.on(Yn,gs)}(),await bs(),await vs(i)}const _s=async()=>{const e=ua.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Ca(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function ws(e){if(ua.state.isCapturingProcessStarted)return void na(ua.state.step,"trying-to-initialize-active-session");let t,i;if(e){const r=await async function(e){let t,i;try{const r=await qa(e,ua.state.consentVersion,ua.state.clientId);return t=r.sessionId,i=r.userToken,ua.dispatch("setSessionId",t),ua.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=r.sessionId,i=r.userToken}else{const e=ms();t=e.sessionId,i=e.userToken}if(!t)return void na(ua.state.step,"other");const{missing_images:r,status:n}=await La(t,i,ua.state.clientId);return ua.dispatch("setIsCapturingProcessStarted",!0),await ys({status:n,sessionId:t,userToken:i,missingImages:r,rootElementId:ua.state.rootElementId,language:ua.state.language}),!0}async function xs(){try{return await async function(){if("recapture"===ua.state.verificationStatus||"pending"===ua.state.verificationStatus){const{sessionId:e,userToken:t}=ms(),{missing_images:i,status:r}=await La(e,t,ua.state.clientId);return await ys({status:r,sessionId:e,userToken:t,missingImages:i,rootElementId:ua.state.rootElementId,language:ua.state.language}),!0}na(ua.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}var As=Object.freeze({__proto__:null,recapture:xs,restart:async function(){return xs()},start:async function(e){try{return await ws(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}},version:()=>Br});class Es{static arrayBufferToBase64(e){return btoa(String.fromCharCode(...new Uint8Array(e)))}static base64ToArrayBuffer(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}static stringToBase64(e){return btoa(e)}static jsonToBase64(e){const t=JSON.stringify(e);return btoa(t)}static base64ToJson(e){const t=atob(e);return JSON.parse(t)}}const Ss={log:console.log,error:console.error};var ks,Ms;!function(e){e.NotInitialized="not_initialized",e.AuthenticationFailed="authentication_failed",e.AuthenticationAbortedTimeout="authentication_aborted_timeout",e.AuthenticationCanceled="webauthn_authentication_canceled",e.RegistrationFailed="registration_failed",e.AlreadyRegistered="username_already_registered",e.RegistrationAbortedTimeout="registration_aborted_timeout",e.RegistrationCanceled="webauthn_registration_canceled",e.AutofillAuthenticationAborted="autofill_authentication_aborted",e.AuthenticationProcessAlreadyActive="authentication_process_already_active",e.InvalidApprovalData="invalid_approval_data",e.FailedToInitCrossDeviceSession="cross_device_init_failed",e.FailedToGetCrossDeviceStatus="cross_device_status_failed",e.Unknown="unknown"}(ks||(ks={}));class Cs extends Error{constructor(e,t){super(e),this.errorCode=ks.NotInitialized,this.data=t}}class Is extends Cs{constructor(e,t){super(null!=e?e:"WebAuthnSdk is not initialized",t),this.errorCode=ks.NotInitialized}}class Ds extends Cs{constructor(e,t){super(null!=e?e:"Authentication failed with an error",t),this.errorCode=ks.AuthenticationFailed}}class Ts extends Cs{constructor(e,t){super(null!=e?e:"Authentication was canceled by the user or got timeout",t),this.errorCode=ks.AuthenticationCanceled}}class Rs extends Cs{constructor(e,t){super(null!=e?e:"Registration failed with an error",t),this.errorCode=ks.RegistrationFailed}}class zs extends Cs{constructor(e,t){super(null!=e?e:"Registration was canceled by the user or got timeout",t),this.errorCode=ks.RegistrationCanceled}}class Bs extends Cs{constructor(e){super(null!=e?e:"Autofill flow was aborted"),this.errorCode=ks.AutofillAuthenticationAborted}}class Ps extends Cs{constructor(e){super(null!=e?e:"Operation was aborted by timeout"),this.errorCode=ks.AutofillAuthenticationAborted}}class Fs extends Cs{constructor(e){super(null!=e?e:"Passkey with this username is already registered with the relying party."),this.errorCode=ks.AlreadyRegistered}}class Os extends Cs{constructor(e,t){super(null!=e?e:"Authentication process is already active",t),this.errorCode=ks.AuthenticationProcessAlreadyActive}}class Ns extends Cs{constructor(e,t){super(null!=e?e:"Invalid approval data",t),this.errorCode=ks.InvalidApprovalData}}class Ls extends Cs{constructor(e,t){super(null!=e?e:"Failed to init cross device authentication",t),this.errorCode=ks.FailedToInitCrossDeviceSession}}class js extends Cs{constructor(e,t){super(null!=e?e:"Failed to get cross device status",t),this.errorCode=ks.FailedToGetCrossDeviceStatus}}function Us(e){return e.errorCode&&Object.values(ks).includes(e.errorCode)}!function(e){e[e.persistent=0]="persistent",e[e.session=1]="session"}(Ms||(Ms={}));class qs{static get(e){return qs.getStorageMedium(qs.allowedKeys[e]).getItem(qs.getStorageKey(e))||void 0}static set(e,t){return qs.getStorageMedium(qs.allowedKeys[e]).setItem(qs.getStorageKey(e),t)}static remove(e){qs.getStorageMedium(qs.allowedKeys[e]).removeItem(qs.getStorageKey(e))}static clear(e){for(const[t,i]of Object.entries(qs.allowedKeys)){const r=t;e&&this.configurationKeys.includes(r)||qs.getStorageMedium(i).removeItem(qs.getStorageKey(r))}}static getStorageKey(e){return`WebAuthnSdk:${e}`}static getStorageMedium(e){return e===Ms.session?sessionStorage:localStorage}}qs.allowedKeys={clientId:Ms.session},qs.configurationKeys=["clientId"];class Hs{static isNewApiDomain(e){return e&&(this.newApiDomains.includes(e)||e.startsWith("api.")&&e.endsWith(".transmitsecurity.io"))}static dnsPrefetch(e){const t=document.createElement("link");t.rel="dns-prefetch",t.href=e,document.head.appendChild(t)}static preconnect(e,t){const i=document.createElement("link");i.rel="preconnect",i.href=e,t&&(i.crossOrigin="anonymous"),document.head.appendChild(i)}static warmupConnection(e){this.dnsPrefetch(e),this.preconnect(e,!1),this.preconnect(e,!0)}static init(e,t){var i,r;try{this._serverPath=new URL(t.serverPath),this.isNewApiDomain(null===(i=this._serverPath)||void 0===i?void 0:i.hostname)&&this.warmupConnection(this._serverPath.origin),this._apiPaths=null!==(r=t.webauthnApiPaths)&&void 0!==r?r:this.getDefaultPaths(),this._clientId=e,qs.set("clientId",e)}catch(e){throw new Is("Invalid options.serverPath",{error:e})}}static getDefaultPaths(){var e;const t=this.isNewApiDomain(null===(e=this._serverPath)||void 0===e?void 0:e.hostname)?"/cis":"";return{startAuthentication:`${t}/v1/auth/webauthn/authenticate/start`,startRegistration:`${t}/v1/auth/webauthn/register/start`,initCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/init`,startCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/start`,startCrossDeviceRegistration:`${t}/v1/auth/webauthn/cross-device/register/start`,getCrossDeviceTicketStatus:`${t}/v1/auth/webauthn/cross-device/status`,attachDeviceToCrossDeviceSession:`${t}/v1/auth/webauthn/cross-device/attach-device`}}static getApiPaths(){return this._apiPaths}static async sendRequest(e,t,i){Ss.log(`[WebAuthn SDK] Calling ${t.method} ${e}...`);const r=new URL(this._serverPath);return r.pathname=e,i&&(r.search=i),fetch(r.toString(),t)}static async startRegistration(e){const t=await this.sendRequest(this._apiPaths.startRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i(i({client_id:this.getValidatedClientId(),username:e.username,display_name:e.displayName},e.timeout&&{timeout:e.timeout}),e.limitSingleCredentialToDevice&&{limit_single_credential_to_device:e.limitSingleCredentialToDevice}))});if(!(null==t?void 0:t.ok))throw new Ds("Failed to start registration",null==t?void 0:t.body);return await t.json()}static async startAuthentication(e){const t=await this.sendRequest(this._apiPaths.startAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i(i(i({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}),e.timeout&&{timeout:e.timeout}))});if(!(null==t?void 0:t.ok))throw new Ds("Failed to start authentication",null==t?void 0:t.body);return await t.json()}static async initCrossDeviceAuthentication(e){const t=await this.sendRequest(this._apiPaths.initCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i(i({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}))});if(!(null==t?void 0:t.ok))throw new Ls(void 0,null==t?void 0:t.body);return await t.json()}static async getCrossDeviceTicketStatus(e){const t=await this.sendRequest(this._apiPaths.getCrossDeviceTicketStatus,{method:"GET"},`cross_device_ticket_id=${e.ticketId}`);if(!(null==t?void 0:t.ok))throw new js(void 0,null==t?void 0:t.body);return await t.json()}static async startCrossDeviceAuthentication(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new Ds("Failed to start cross device authentication",null==t?void 0:t.body);return await t.json()}static async startCrossDeviceRegistration(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new Rs("Failed to start cross device registration",null==t?void 0:t.body);return await t.json()}static async attachDeviceToCrossDeviceSession(e){const t=await this.sendRequest(this._apiPaths.attachDeviceToCrossDeviceSession,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new Rs("Failed to attach device to cross device session",null==t?void 0:t.body);return await t.json()}static getValidatedClientId(){var e;const t=null!==(e=this._clientId)&&void 0!==e?e:qs.get("clientId");if(!t)throw new Is("Missing clientId");return t}}var Ks,Vs,$s,Js;Hs.newApiDomains=["api.idsec-dev.com","api.idsec-stg.com"],function(e){e.InputAutofill="input-autofill",e.Modal="modal"}(Ks||(Ks={})),function(e){e.Pending="pending",e.Scanned="scanned",e.Success="success",e.Error="error",e.Timeout="timeout",e.Aborted="aborted"}(Vs||(Vs={})),function(e){e.toAuthenticationError=e=>Us(e)?e:"NotAllowedError"===e.name?new Ts:"OperationError"===e.name?new Os(e.message):"SecurityError"===e.name?new Ds(e.message):e===ks.AuthenticationAbortedTimeout?new Ps:"AbortError"===e.name||e===ks.AutofillAuthenticationAborted?new Bs:new Ds("Something went wrong during authentication",{error:e}),e.toRegistrationError=e=>Us(e)?e:"NotAllowedError"===e.name?new zs:"SecurityError"===e.name?new Rs(e.message):"InvalidStateError"===e.name?new Fs:e===ks.RegistrationAbortedTimeout?new Ps:new Rs("Something went wrong during registration",{error:e})}($s||($s={})),function(e){e.processCredentialRequestOptions=e=>i(i({},e),{},{challenge:Es.base64ToArrayBuffer(e.challenge),allowCredentials:e.allowCredentials.map((e=>i(i({},e),{},{id:Es.base64ToArrayBuffer(e.id)})))}),e.processCredentialCreationOptions=(e,t)=>{var r;const n=JSON.parse(JSON.stringify(e));return n.challenge=Es.base64ToArrayBuffer(e.challenge),n.user.id=Es.base64ToArrayBuffer(e.user.id),(null==t?void 0:t.limitSingleCredentialToDevice)&&(n.excludeCredentials=null===(r=e.excludeCredentials)||void 0===r?void 0:r.map((e=>i(i({},e),{},{id:Es.base64ToArrayBuffer(e.id)})))),(null==t?void 0:t.registerAsDiscoverable)?(n.authenticatorSelection.residentKey="preferred",n.authenticatorSelection.requireResidentKey=!0):(n.authenticatorSelection.residentKey="discouraged",n.authenticatorSelection.requireResidentKey=!1),n.authenticatorSelection.authenticatorAttachment=(null==t?void 0:t.allowCrossPlatformAuthenticators)?void 0:"platform",n},e.encodeAuthenticationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:Es.arrayBufferToBase64(e.rawId),response:{authenticatorData:Es.arrayBufferToBase64(i.authenticatorData),clientDataJSON:Es.arrayBufferToBase64(i.clientDataJSON),signature:Es.arrayBufferToBase64(i.signature),userHandle:Es.arrayBufferToBase64(i.userHandle)},authenticatorAttachment:t,type:e.type}},e.encodeRegistrationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:Es.arrayBufferToBase64(e.rawId),response:{attestationObject:Es.arrayBufferToBase64(i.attestationObject),clientDataJSON:Es.arrayBufferToBase64(i.clientDataJSON)},authenticatorAttachment:t,type:e.type}}}(Js||(Js={}));class Gs{async modal(e){try{const t=await this.performAuthentication(i(i({},e),{},{mediationType:Ks.Modal}));return Es.jsonToBase64(t)}catch(e){throw $s.toAuthenticationError(e)}}activateAutofill(e,t){const{onSuccess:i,onError:r,onReady:n}=e;this.performAuthentication({username:t,mediationType:Ks.InputAutofill,onReady:n}).then((e=>{i(Es.jsonToBase64(e))})).catch((e=>{const t=$s.toAuthenticationError(e);if(!r)throw t;r(t)}))}abortAutofill(){this.abortController&&this.abortController.abort(ks.AutofillAuthenticationAborted)}abortAuthentication(){this.abortController&&this.abortController.abort(ks.AuthenticationAbortedTimeout)}async performAuthentication(e){var t,i;const r="crossDeviceTicketId"in e?await Hs.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Hs.startAuthentication({username:e.username,timeout:null===(t=e.options)||void 0===t?void 0:t.timeout}),n=r.credential_request_options,a=Js.processCredentialRequestOptions(n),o=this.getMediatedCredentialRequest(a,e.mediationType);e.mediationType===Ks.InputAutofill&&(null===(i=e.onReady)||void 0===i||i.call(e));const s=await navigator.credentials.get(o).catch((e=>{throw $s.toAuthenticationError(e)}));return{webauthnSessionId:r.webauthn_session_id,publicKeyCredential:Js.encodeAuthenticationResult(s),userAgent:navigator.userAgent}}getMediatedCredentialRequest(e,t){const i={publicKey:e};return this.abortController=new AbortController,i.signal=this.abortController&&this.abortController.signal,t===Ks.InputAutofill?i.mediation="conditional":e.timeout&&setTimeout((()=>{this.abortAuthentication()}),e.timeout),i}}class Ws{constructor(e,t){this.handler=e,this.intervalInMs=t}begin(){var e;this.intervalId=window.setInterval((e=this.handler,async function(){e.isRunning||(e.isRunning=!0,await e(...arguments),e.isRunning=!1)}),this.intervalInMs)}stop(){clearInterval(this.intervalId)}}const Zs=/^[A-Za-z0-9\-_.: ]*$/;function Ys(e){if(e&&(!function(e){return Object.keys(e).length<=10}(e)||!function(e){const t=e=>"string"==typeof e,i=e=>Zs.test(e);return Object.keys(e).every((r=>t(r)&&t(e[r])&&i(r)&&i(e[r])))}(e)))throw Ss.error("Failed validating approval data"),new Ns("Provided approval data should have 10 properties max. Also, it should contain only \n alphanumeric characters, numbers, and the special characters: '-', '_', '.'")}class Qs{constructor(e,t,r){this.authenticationHandler=e,this.registrationHandler=t,this.approvalHandler=r,this.init={registration:async e=>(this.ticketStatus=Vs.Pending,this.pollCrossDeviceSession(e.crossDeviceTicketId,e.handlers)),authentication:async e=>{const{username:t}=e,r=(await Hs.initCrossDeviceAuthentication(i({},t&&{username:t}))).cross_device_ticket_id;return this.ticketStatus=Vs.Pending,this.pollCrossDeviceSession(r,e.handlers)},approval:async e=>{const{username:t,approvalData:i}=e;Ys(i);const r=(await Hs.initCrossDeviceAuthentication({username:t,approvalData:i})).cross_device_ticket_id;return this.ticketStatus=Vs.Pending,this.pollCrossDeviceSession(r,e.handlers)}},this.authenticate={modal:async e=>this.authenticationHandler.modal({crossDeviceTicketId:e})},this.approve={modal:async e=>this.approvalHandler.modal({crossDeviceTicketId:e})}}async register(e,t){return this.registrationHandler.register({crossDeviceTicketId:e},t)}async attachDevice(e){const t=await Hs.attachDeviceToCrossDeviceSession({ticketId:e});return i({status:t.status,startedAt:t.started_at},t.approval_data&&{approvalData:t.approval_data})}async pollCrossDeviceSession(e,t){return this.poller=new Ws((async()=>{var i,r;const n=await Hs.getCrossDeviceTicketStatus({ticketId:e}),a=n.status;if(a!==this.ticketStatus)switch(this.ticketStatus=a,a){case Vs.Scanned:await t.onDeviceAttach();break;case Vs.Error:case Vs.Timeout:case Vs.Aborted:await t.onFailure(n),null===(i=this.poller)||void 0===i||i.stop();break;case Vs.Success:if("onCredentialRegister"in t)await t.onCredentialRegister();else{if(!n.session_id)throw new js("Cross device session is complete without returning session_id",n);await t.onCredentialAuthenticate(n.session_id)}null===(r=this.poller)||void 0===r||r.stop()}}),1e3),this.poller.begin(),setTimeout((()=>{var e;null===(e=this.poller)||void 0===e||e.stop(),t.onFailure({status:Vs.Timeout})}),3e5),{crossDeviceTicketId:e,stop:()=>{var e;null===(e=this.poller)||void 0===e||e.stop()}}}}class Xs{async register(e,t){this.abortController=new AbortController;const r=i({allowCrossPlatformAuthenticators:!("crossDeviceTicketId"in e),registerAsDiscoverable:!0},t);try{const i="crossDeviceTicketId"in e?await Hs.startCrossDeviceRegistration({ticketId:e.crossDeviceTicketId}):await Hs.startRegistration({username:e.username,displayName:(null==t?void 0:t.displayName)||e.username,timeout:null==t?void 0:t.timeout,limitSingleCredentialToDevice:null==t?void 0:t.limitSingleCredentialToDevice}),n=Js.processCredentialCreationOptions(i.credential_creation_options,r);setTimeout((()=>{this.abortRegistration()}),n.timeout);const a=await this.registerCredential(n),o={webauthnSessionId:i.webauthn_session_id,publicKeyCredential:a,userAgent:navigator.userAgent};return Es.jsonToBase64(o)}catch(e){throw $s.toRegistrationError(e)}}abortRegistration(){this.abortController&&this.abortController.abort(ks.RegistrationAbortedTimeout)}async registerCredential(e){const t=await navigator.credentials.create({publicKey:e,signal:this.abortController&&this.abortController.signal}).catch((e=>{throw $s.toRegistrationError(e)}));return Js.encodeRegistrationResult(t)}}class ec{async modal(e){try{const t=await this.performApproval(e);return Es.jsonToBase64(t)}catch(e){throw $s.toAuthenticationError(e)}}async performApproval(e){"approvalData"in e&&Ys(e.approvalData);const t="crossDeviceTicketId"in e?await Hs.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Hs.startAuthentication({username:e.username,approvalData:e.approvalData}),i=t.credential_request_options,r=Js.processCredentialRequestOptions(i),n=await navigator.credentials.get({publicKey:r}).catch((e=>{throw $s.toAuthenticationError(e)}));return{webauthnSessionId:t.webauthn_session_id,publicKeyCredential:Js.encodeAuthenticationResult(n),userAgent:navigator.userAgent}}}class tc{constructor(){this._initialized=!1,this._authenticationHandler=new Gs,this._registrationHandler=new Xs,this._approvalHandler=new ec,this._crossDeviceHandler=new Qs(this._authenticationHandler,this._registrationHandler,this._approvalHandler),this.authenticate={modal:async(e,t)=>(this.initCheck(),this._authenticationHandler.modal({username:e,options:t})),autofill:{activate:(e,t)=>(this.initCheck(),this._authenticationHandler.activateAutofill(e,t)),abort:()=>this._authenticationHandler.abortAutofill()}},this.approve={modal:async(e,t)=>(this.initCheck(),this._approvalHandler.modal({username:e,approvalData:t}))},this.register=async(e,t)=>(this.initCheck(),this._registrationHandler.register({username:e},t)),this.crossDevice={init:{registration:async e=>(this.initCheck(),this._crossDeviceHandler.init.registration(e)),authentication:async e=>(this.initCheck(),this._crossDeviceHandler.init.authentication(e)),approval:async e=>(this.initCheck(),this._crossDeviceHandler.init.approval(e))},authenticate:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.authenticate.modal(e))},approve:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.approve.modal(e))},register:async(e,t)=>(this.initCheck(),this._crossDeviceHandler.register(e,t)),attachDevice:async e=>(this.initCheck(),this._crossDeviceHandler.attachDevice(e))},this.isPlatformAuthenticatorSupported=async()=>{var e;try{return await(null===(e=tc.StaticPublicKeyCredential)||void 0===e?void 0:e.isUserVerifyingPlatformAuthenticatorAvailable())}catch(e){return!1}},this.isAutofillSupported=async()=>{var e,t;return!(!(null===(e=tc.StaticPublicKeyCredential)||void 0===e?void 0:e.isConditionalMediationAvailable)||!await(null===(t=tc.StaticPublicKeyCredential)||void 0===t?void 0:t.isConditionalMediationAvailable()))}}async init(e,t){try{if(!e)throw new Is("Invalid clientId",{clientId:e});if(t.webauthnApiPaths){const e=Hs.getDefaultPaths();if(function(e,t){const i=new Set(e),r=new Set(t);return[...e.filter((e=>!r.has(e))),...t.filter((e=>!i.has(e)))]}(Object.keys(t.webauthnApiPaths),Object.keys(e)).length)throw new Is("Invalid custom paths",{customApiPaths:t.webauthnApiPaths})}Hs.init(e,t),this._initialized=!0}catch(e){throw Us(e)?e:new Is("Failed to initialize SDK")}}getDefaultPaths(){return this.initCheck(),Hs.getDefaultPaths()}getApiPaths(){return this.initCheck(),Hs.getApiPaths()}initCheck(){if(!this._initialized)throw new Is}}tc.StaticPublicKeyCredential=window.PublicKeyCredential;const ic=new G("webauthn"),rc=new tc;ic.events.on(ic.events.MODULE_INITIALIZED,(()=>{var e;const t=ic.moduleMetadata.getInitConfig();if(!(null===(e=null==t?void 0:t.webauthn)||void 0===e?void 0:e.serverPath))return;const{clientId:r,webauthn:n}=t;rc.init(r,i({},n))}));const nc={modal:async(e,t)=>(rc.initCheck(),rc.authenticate.modal(e,t)),autofill:{activate:(e,t)=>{rc.initCheck(),rc.authenticate.autofill.activate(e,t)},abort:()=>{rc.initCheck(),rc.authenticate.autofill.abort()}}},ac={modal:async(e,t)=>(rc.initCheck(),rc.approve.modal(e,t))};const{crossDevice:oc}=rc,{isPlatformAuthenticatorSupported:sc}=rc,{isAutofillSupported:cc}=rc,{getDefaultPaths:dc}=rc;window.localWebAuthnSDK=rc;var uc=Object.freeze({__proto__:null,get WebauthnCrossDeviceStatus(){return Vs},approve:ac,authenticate:nc,crossDevice:oc,getDefaultPaths:dc,isAutofillSupported:cc,isPlatformAuthenticatorSupported:sc,register:async function(e,t){return rc.initCheck(),rc.register(e,t)}});const lc=new G("ido"),hc=()=>(new Date).getTime();var fc,pc,gc,mc,bc;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(fc||(fc={})),function(e){e.InvalidInitOptions="invalid_initialization_options",e.NotInitialized="not_initialized",e.NoActiveJourney="no_active_journey",e.NetworkError="network_error",e.ClientResponseNotValid="client_response_not_valid",e.ServerError="server_error",e.InvalidState="invalid_state",e.InvalidCredentials="invalid_credentials",e.ExpiredOTPPasscode="expired_otp_passcode",e.ExpiredValidationPasscode="expired_validation_passcode",e.MaxResendReached="expired_otp_passcode"}(pc||(pc={})),function(e){e.ClientInput="client_input",e.Cancel="cancel",e.Fail="failure",e.Custom="custom",e.Resend="resend"}(gc||(gc={})),function(e){e.JourneySuccess="journey_success",e.ClientInputRequired="client_input_required",e.ClientInputUpdateRequired="client_input_update_required",e.JourneyRejection="journey_rejection"}(mc||(mc={})),function(e){e.Rejection="action:rejection",e.Success="action:success",e.Information="action:information",e.DebugBreak="action:debug_break",e.WaitForAnotherDevice="action:wait_for_another_device",e.CryptoBindingRegistration="action:crypto_binding_registration",e.CryptoBindingValidation="action:crypto_binding_validation",e.RegisterDeviceAction="transmit_platform_device_registration",e.ValidateDeviceAction="transmit_platform_device_validation",e.WebAuthnRegistration="action:webauthn_registration",e.DrsTriggerAction="action:drs_trigger_action",e.IdentityVerification="action:id_verification",e.EmailOTPAuthentication="transmit_platform_email_otp_authentication",e.SmsOTPAuthentication="transmit_platform_sms_otp_authentication",e.EmailValidation="transmit_platform_email_validation",e.SmsValidation="transmit_platform_sms_validation",e.TotpRegistration="transmit_platform_totp_registration",e.TransactionSigningTOTP="transmit_platform_transaction_signing_totp",e.InvokeIDP="invoke_idp",e.WebAuthnTransactionSigning="transmit_platform_transaction_signing_webauthn",e.SelectOrganization="transmit_platform_select_organization",e.MobileApproveAuthentication="transmit_platform_mobile_approve_authentication"}(bc||(bc={}));const vc=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fc.Info;this.logLevel=e}setLogLevel(e){e<fc.Debug||e>fc.Error?this.error("Invalid log level"):this.logLevel=e}debug(e){this.logLevel<=fc.Debug&&console.debug(`[DEBUG] ${e}`)}info(e){this.logLevel<=fc.Info&&console.info(`[INFO] ${e}`)}warning(e){this.logLevel<=fc.Warning&&console.warn(`[WARNING] ${e}`)}error(e){this.logLevel<=fc.Error&&console.error(`[ERROR] ${e}`)}},yc={[bc.CryptoBindingRegistration]:"input",[bc.CryptoBindingValidation]:"input",[bc.RegisterDeviceAction]:"data",[bc.ValidateDeviceAction]:"data"},_c="api/v2/",wc={path:"auth/sso"},xc={path:"auth/anonymous_invoke"},Ac={path:"auth/assert"},Ec={path:"auth/poll"},Sc={path:"auth/create_debug_token"},kc={path:"auth/key_exchange"},Mc={headers:{mandatory:!0,dummy:[{type:"correlation_id",correlation_id:"337BFFE6BEE7D694B8FA41F42B00742CA537DC398F79369A3A60E04D0EB2E8E1"}]},data:{mandatory:!0,dummy:{collection_result:{metadata:{timestamp:hc()},content:{}},policy_request_id:"LoginWithMenu"},large_dummy:{metadata:{timestamp:1679422144431},content:{device_details:{logged_users:1,persistence_mode:"persistent",device_id:"8951bd7b67a959e7b12b5018816f9ce4",os_type:"Mac OS",os_version:"10.15.7",device_model:"Chrome 111.0.0.0"},location:{enabled:!1},capabilities:{fido2_user_verifying_platform_authenticator_available:!0,audio_acquisition_supported:!0,finger_print_supported:!1,image_acquisition_supported:!1,persistent_keys_supported:!0,face_id_key_bio_protection_supported:!1,fido_client_present:!1,fido2_client_present:!0,dyadic_present:!1,installed_plugins:[]},collector_state:{accounts:"disabled",devicedetails:"active",contacts:"disabled",owner:"disabled",software:"disabled",location:"disabled",locationcountry:"disabled",bluetooth:"disabled",externalsdkdetails:"active",hwauthenticators:"active",capabilities:"active",fidoauthenticators:"disabled",largedata:"active",localenrollments:"active",devicefingerprint:"active",apppermissions:"disabled"},local_enrollments:{}},fp2:{user_agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",webdriver:!0,language:"en-US",color_depth:30,device_memory:8,pixel_ratio:2,hardware_concurrency:12,screen_resolution:[1680,1050],available_screen_resolution:[1680,1025],timezone_offset:240,timezone:"America/New_York",session_storage:!0,local_storage:!0,indexed_db:!0,add_behavior:!1,open_database:!0,cpu_class:"not available",platform:"MacIntel",do_not_track:"not available",plugins:[["PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chrome PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chromium PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Microsoft Edge PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["WebKit built-in PDF","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]]],canvas:["canvas winding:yes","canvas fp:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAADICAYAAACwGnoBAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3XeYXVW9//H3Omdaeu+FGgiE9BDAgmIBQRRQ4eIP0JCQmdC8YgHrZRQLAooSSjIpRMpVCZciiIAiKhoIpEMoUtILKaS3KWf/nu8+e0/2nDkzc+bMmckMfNbz8Ejm7L3W2q8zwT8++/tdjlY+PLz+wAhgKHA0MBjoB/QEDq9j+6uAzcAGYDXwFvA6sMzh1of3eHjtgWHA8ZH/7Qa0q+Mfu3VfHf9sA14Flof/63B7q/fn5fY5cAefo5V/hdqeBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQggTYh4FrbLj2844BPAh8FTg4C81xucyewBygAeuRy4uhcrwF/6sx7Tw3lwMKT6LDtNDr7T2Sxf26GvRjwAvBP4G84Z0tmNLxivIwufJ9d5Mpodb/v7zNiPY4EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAE2rRAqwgUPbyTgC8AnwMsQG+TYz7wEPAYUGeaPQr4MPCh4BWBQTl7VFvSln4I52wrdQ4F6Dkz10QSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkMD7SOCQBegenlV/XwpMCtqzt0nWrcDdwKygR3yjH+IU4LPBqwPWqD43w8J029IcnLMt1hgK0HODrFkkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIIH3l0D9AXppaR6lpZX+I0f/vQkGHt5w4EqgJJNprNf4GnYzgA7EcWxhPz0pyuTWjK7ZxgG6UehfW0mCchK0J6/Be18G7gCmN3ilPYER5jd4JacDnw/CdDvpPXXsPQDxOBQ2vL/IrdOAO3HOtuwPC9C3056uHDyiveHNte0rttCRXmW7c/PCSH1/F+r6LJt72ja5di8BCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCCBNidQO1CcNPNo4lU/Ak7AeTvwXAc8twbnHUdl3jhmT9qVzVN6eFZf/W3g4kzvf43tXMW/6EIBf2Ud/+YcRvAgD3E653F4ptOkve6fbOBbvEARcZ7lc3ydefyW//AHPsWZ1N1XfRlwM3Bfg6sngEWA5dZ2lHsjOtPb+wHWzN7C9C8DO3fD3Bdg4Ttw3blwZO8GV09zwb3ALUyZftyR3pbfn83L/IY/ZDNPm7vnGYbyKa6BWGI40y5/JesHmDTzMPIqLwGOwnPjgd9QVlLmzze5bAKxxEA8Z9+Y/ZpcR1nJarK5J+sN6kYJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSKApAjUD9MllZ+K8J/DcNLZ3/W/mXlBOaWmMDX2/h+duIBHry8zJ7zZmQQ+vF3B9UHXemFv5DE9QwvF+oD2L15nAMfyOt/3wvEcOqtBLeI632MEznM1G9tKP+3iCM9MG6JuAHwdV55k/hIXoM4PDzhsRoEcXOAGYAHxmG9w2tykBejjrHeNLrrvyZFa1ugB9PV1ZS1fGszJz4gyutGr7uYyluPD8IqZ+7UAGt6S/ZHLZTJx3P2Ulz/qBufPuJq+yH55rT2XeLGYUn+Z3aljfbwUwl7KSb5DNPVlvUDdKQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAJNETgYoF9+Zzeq4quAFfTfMJrSUkt/D47JZc/iuYnMnGzhYEbDw7sK+CnQOaMbUi7qzN0NVoRnM294z38zD6tyf5qz2EE5XZmTNkC/Hfi+FYJntZidkN7ICvR06/TfBX1+B788F07LqgK9eta8kmv4CBt4thVVoO8jnzP4b67mWc5nYVbSDd3kymhaC/eSaU+SiC1hRvF3KJ4+FHgN532RRGwjzvs35QXdmHPpdoqn3w+Mo6zkWLK5p6EH0ecSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkECzCBwMFIunX+6fle25S5lRPKfWapfNOI5YYj0wFRjmH/+diC3Eeb8hlojjuespK3ma4um39NhUOOL5x88teKRy5cfWsofx9OYuXuUIOvFTTuQJVnMfb/lnmc/k1Fpnmr/Bdn7CYu7jTT7NQAbRgV9wEovYwu94iy9zNKczkASeP6+1Y99DJcfSlR8yhnbEeYxVzOYNJnIsv+YVzmAgP2AMv+Zl/swaulHA62ynH+15MhKg38h4/sMO/sVGPs3R/IfR/IUYYDXo9u7APvDPDv8Y0A74D/AOcDzwFrANOBGqW8yHAfoQ8IPh7UBfwDrap+a5Nu/rwA7ACqUtKG8PWFZrnfN/B+3PhQsLoO+L0KcSThqS/OfNjfDnRfCpkbBtF7z4Fpx0DCx8GzZuh48Ng9NtTTt9/hpgC0f564xlLOuYzT104ABv+d/Vx/xK8G104G7mMMDfc3JUEqOEi1nCIE7jDW7hQd6hJ5O5hE/xOt/lz2yiE9/jPJYxgE/yOpfzDwbzHj/lLJ7jaH++…brB0xZVAGAtqpyy+87fNf4HUyf1sNzSz83GXvYnYKXM6qTDBVhJ29tL7uzrJF+rcOC5Dy8Hq5efB1QGSkNdigBLnWXzB/zn10h7RWRj1hcaCpHOK7cB1fwKc4cvBQCWL6UDjnPuTG//1SRguT7Vqy8CqoAWMXRFBQBWRaE0X3bu9kH/avgtoVv6ndkDVJq9tRY7wErc8bOvknxFBt+/csByS787LgGqxK1PMj2AlaStg6TOvmLQv3JLv9f+FVAlbnnS6QGspO0VOXerbBaF/PoNfwNUiVttIj2AlbjNZ2+W9l2XgVXiNptJD2CZsZpEUUC/AgBLv4dkgAJmFABYZqwmURTQrwDA0u8hGaCAGQUAlhmrSRQF9CsAsPR7SAYoYEYBgGXGahJFAf0K/B9qEBa1B23aowAAAABJRU5ErkJggg==","extensions:ANGLE_instanced_arrays;EXT_blend_minmax;EXT_color_buffer_half_float;EXT_disjoint_timer_query;EXT_float_blend;EXT_frag_depth;EXT_shader_texture_lod;EXT_texture_compression_rgtc;EXT_texture_filter_anisotropic;EXT_sRGB;KHR_parallel_shader_compile;OES_element_index_uint;OES_fbo_render_mipmap;OES_standard_derivatives;OES_texture_float;OES_texture_float_linear;OES_texture_half_float;OES_texture_half_float_linear;OES_vertex_array_object;WEBGL_color_buffer_float;WEBGL_compressed_texture_s3tc;WEBGL_compressed_texture_s3tc_srgb;WEBGL_debug_renderer_info;WEBGL_debug_shaders;WEBGL_depth_texture;WEBGL_draw_buffers;WEBGL_lose_context;WEBGL_multi_draw","webgl aliased line width range:[1, 1]","webgl aliased point size range:[1, 8191]","webgl alpha bits:8","webgl antialiasing:yes","webgl blue bits:8","webgl depth bits:24","webgl green bits:8","webgl max anisotropy:16","webgl max combined texture image units:32","webgl max cube map texture size:16384","webgl max fragment uniform vectors:1024","webgl max render buffer size:16384","webgl max texture image units:16","webgl max texture size:16384","webgl max varying vectors:32","webgl max vertex attribs:16","webgl max vertex texture image units:16","webgl max vertex uniform vectors:1024","webgl max viewport dims:[16384, 16384]","webgl red bits:8","webgl renderer:WebKit WebGL","webgl shading language version:WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)","webgl stencil bits:0","webgl vendor:WebKit","webgl version:WebGL 1.0 (OpenGL ES 2.0 Chromium)","webgl unmasked vendor:Google Inc. (ATI Technologies Inc.)","webgl unmasked renderer:ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)","webgl vertex shader high float precision:23","webgl vertex shader high float precision rangeMin:127","webgl vertex shader high float precision rangeMax:127","webgl vertex shader medium float precision:23","webgl vertex shader medium float precision rangeMin:127","webgl vertex shader medium float precision rangeMax:127","webgl vertex shader low float precision:23","webgl vertex shader low float precision rangeMin:127","webgl vertex shader low float precision rangeMax:127","webgl fragment shader high float precision:23","webgl fragment shader high float precision rangeMin:127","webgl fragment shader high float precision rangeMax:127","webgl fragment shader medium float precision:23","webgl fragment shader medium float precision rangeMin:127","webgl fragment shader medium float precision rangeMax:127","webgl fragment shader low float precision:23","webgl fragment shader low float precision rangeMin:127","webgl fragment shader low float precision rangeMax:127","webgl vertex shader high int precision:0","webgl vertex shader high int precision rangeMin:31","webgl vertex shader high int precision rangeMax:30","webgl vertex shader medium int precision:0","webgl vertex shader medium int precision rangeMin:31","webgl vertex shader medium int precision rangeMax:30","webgl vertex shader low int precision:0","webgl vertex shader low int precision rangeMin:31","webgl vertex shader low int precision rangeMax:30","webgl fragment shader high int precision:0","webgl fragment shader high int precision rangeMin:31","webgl fragment shader high int precision rangeMax:30","webgl fragment shader medium int precision:0","webgl fragment shader medium int precision rangeMin:31","webgl fragment shader medium int precision rangeMax:30","webgl fragment shader low int precision:0","webgl fragment shader low int precision rangeMin:31","webgl fragment shader low int precision rangeMax:30"],webgl_vendor_and_renderer:"Google Inc. (ATI Technologies Inc.)~ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)",ad_block:!1,has_lied_languages:!1,has_lied_resolution:!1,has_lied_os:!1,has_lied_browser:!1,touch_support:[0,!1,!1],fonts:["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Comic Sans MS","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","LUCIDA GRANDE","Microsoft Sans Serif","Monaco","Palatino","Tahoma","Times","Times New Roman","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],fonts_flash:"swf object not loaded",audio:"124.04347657808103",enumerate_devices:["id=;gid=;audioinput;","id=;gid=;videoinput;","id=;gid=;audiooutput;"]}},policy_request_id:"LoginWithMenu",params:{}}},Cc=[{"control_flow.0":["assertion_id","type"]}];class Ic extends Error{constructor(e,t){vc.error(`[ERROR] ${e}`),super(e),this.description=e,this.errorCode=t}static convertFromAssertionError(e){switch(e){case 28:return pc.ClientResponseNotValid;case 29:case 31:case 35:return pc.InvalidCredentials;case 30:return pc.ExpiredOTPPasscode;case 32:return pc.ExpiredValidationPasscode;case 33:return pc.MaxResendReached;default:return pc.ServerError}}}var Dc,Tc,Rc;!function(e){e.JsonRejection="Json Rejection",e.TextRejection="Text Rejection",e.UpdateAction="Update Action",e.NextAction="Next Action",e.JourneyEnd="Journey End"}(Dc||(Dc={})),function(e){e.Pending="pending",e.Completed="completed",e.Rejected="rejected"}(Tc||(Tc={})),function(e){e.Form="form",e.LoginForm="login_form",e.Rejection="rejection",e.Information="information",e.DebugBreak="debug_break",e.WaitForTicket="wait_for_ticket",e.DrsTriggerAction="transmit_acp",e.IdentityVerification="kyc",e.WebAuthnRegistration="transmit_platform_web_authn_registration"}(Rc||(Rc={}));var zc,Bc,Pc,Fc={},Oc="6.6.1",Nc={},Lc={exports:{}},jc=Z(Ln),Uc=Lc.exports;function qc(){return zc||(zc=1,function(e,t){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function n(e,t,i){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var a;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:jc.Buffer}catch(e){}function o(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function s(e,t,i){var r=o(e,i);return i-1>=t&&(r|=o(e,i-1)<<4),r}function c(e,t,i,r){for(var n=0,a=Math.min(e.length,i),o=t;o<a;o++){var s=e.charCodeAt(o)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},n.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},n.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,s=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},n.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,a=0,o=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},n.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,o=a%r,s=Math.min(a,a-o)+i,d=0,u=i;u<s;u+=r)d=c(e,u,u+r,t),this.imuln(n),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==o){var l=1;for(d=c(e,u,e.length,t),u=0;u<o;u++)l*=t;this.imuln(l),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=67108863&o,c=o/67108864|0;i.words[0]=s;for(var d=1;d<r;d++){for(var u=c>>>26,l=67108863&c,h=Math.min(d,t.length-1),f=Math.max(0,d-e.length+1);f<=h;f++){var p=d-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+l)/67108864|0,l=67108863&o}i.words[d]=0|l,c=0|u}return 0!==c?i.words[d]=0|c:i.length--,i.strip()}n.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<n|a)).toString(16);a=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],f=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?g+r:d[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return i(void 0!==a),this.toArrayLike(a,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,d=new e(a),u=this.clone();if(c){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[s]=o;for(;s<a;s++)d[s]=0}else{for(s=0;s<a-n;s++)d[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[a-s-1]=o}return d},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a<r.length;a++)t=(0|i.words[a])+(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<i.length;a++)t=(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,o=0;o<r.length;o++)a=(t=(0|i.words[o])-(0|r.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<i.length;o++)a=(t=(0|i.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,i){var r,n,a,o=e.words,s=t.words,c=i.words,d=0,u=0|o[0],l=8191&u,h=u>>>13,f=0|o[1],p=8191&f,g=f>>>13,m=0|o[2],b=8191&m,v=m>>>13,y=0|o[3],_=8191&y,w=y>>>13,x=0|o[4],A=8191&x,E=x>>>13,S=0|o[5],k=8191&S,M=S>>>13,C=0|o[6],I=8191&C,D=C>>>13,T=0|o[7],R=8191&T,z=T>>>13,B=0|o[8],P=8191&B,F=B>>>13,O=0|o[9],N=8191&O,L=O>>>13,j=0|s[0],U=8191&j,q=j>>>13,H=0|s[1],K=8191&H,V=H>>>13,$=0|s[2],J=8191&$,G=$>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],ie=8191&te,re=te>>>13,ne=0|s[6],ae=8191&ne,oe=ne>>>13,se=0|s[7],ce=8191&se,de=se>>>13,ue=0|s[8],le=8191&ue,he=ue>>>13,fe=0|s[9],pe=8191&fe,ge=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(d+(r=Math.imul(l,U))|0)+((8191&(n=(n=Math.imul(l,q))+Math.imul(h,U)|0))<<13)|0;d=((a=Math.imul(h,q))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),n=(n=Math.imul(p,q))+Math.imul(g,U)|0,a=Math.imul(g,q);var be=(d+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(h,K)|0))<<13)|0;d=((a=a+Math.imul(h,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),n=(n=Math.imul(b,q))+Math.imul(v,U)|0,a=Math.imul(v,q),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,V)|0;var ve=(d+(r=r+Math.imul(l,J)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(h,J)|0))<<13)|0;d=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,U),n=(n=Math.imul(_,q))+Math.imul(w,U)|0,a=Math.imul(w,q),r=r+Math.imul(b,K)|0,n=(n=n+Math.imul(b,V)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,V)|0,r=r+Math.imul(p,J)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,G)|0;var ye=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Y)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(A,U),n=(n=Math.imul(A,q))+Math.imul(E,U)|0,a=Math.imul(E,q),r=r+Math.imul(_,K)|0,n=(n=n+Math.imul(_,V)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,V)|0,r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,Y)|0;var _e=(d+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(k,U),n=(n=Math.imul(k,q))+Math.imul(M,U)|0,a=Math.imul(M,q),r=r+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,V)|0,r=r+Math.imul(_,J)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Y)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0;var we=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(n=(n=n+Math.imul(l,re)|0)+Math.imul(h,ie)|0))<<13)|0;d=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,U),n=(n=Math.imul(I,q))+Math.imul(D,U)|0,a=Math.imul(D,q),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,V)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,V)|0,r=r+Math.imul(A,J)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(_,Z)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(g,ie)|0,a=a+Math.imul(g,re)|0;var xe=(d+(r=r+Math.imul(l,ae)|0)|0)+((8191&(n=(n=n+Math.imul(l,oe)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,oe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),n=(n=Math.imul(R,q))+Math.imul(z,U)|0,a=Math.imul(z,q),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(D,K)|0,a=a+Math.imul(D,V)|0,r=r+Math.imul(k,J)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(p,ae)|0,n=(n=n+Math.imul(p,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0;var Ae=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(h,ce)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(P,U),n=(n=Math.imul(P,q))+Math.imul(F,U)|0,a=Math.imul(F,q),r=r+Math.imul(R,K)|0,n=(n=n+Math.imul(R,V)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,V)|0,r=r+Math.imul(I,J)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,G)|0,r=r+Math.imul(k,Z)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(A,X)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,r=r+Math.imul(p,ce)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(g,ce)|0,a=a+Math.imul(g,de)|0;var Ee=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,U),n=(n=Math.imul(N,q))+Math.imul(L,U)|0,a=Math.imul(L,q),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(F,K)|0,a=a+Math.imul(F,V)|0,r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,G)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,Y)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(E,ie)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,oe)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,de)|0,r=r+Math.imul(p,le)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,he)|0;var Se=(d+(r=r+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ge)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,ge)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(N,K),n=(n=Math.imul(N,V))+Math.imul(L,K)|0,a=Math.imul(L,V),r=r+Math.imul(P,J)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(F,J)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,Y)|0)+Math.imul(z,Z)|0,a=a+Math.imul(z,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(D,X)|0,a=a+Math.imul(D,ee)|0,r=r+Math.imul(k,ie)|0,n=(n=n+Math.imul(k,re)|0)+Math.imul(M,ie)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(A,ae)|0,n=(n=n+Math.imul(A,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,de)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,de)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,he)|0;var ke=(d+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;d=((a=a+Math.imul(g,ge)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(N,J),n=(n=Math.imul(N,G))+Math.imul(L,J)|0,a=Math.imul(L,G),r=r+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(F,Z)|0,a=a+Math.imul(F,Y)|0,r=r+Math.imul(R,X)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(D,ie)|0,a=a+Math.imul(D,re)|0,r=r+Math.imul(k,ae)|0,n=(n=n+Math.imul(k,oe)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,r=r+Math.imul(A,ce)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,de)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,he)|0;var Me=(d+(r=r+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,ge)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,ge)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(N,Z),n=(n=Math.imul(N,Y))+Math.imul(L,Z)|0,a=Math.imul(L,Y),r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(z,ie)|0,a=a+Math.imul(z,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,r=r+Math.imul(k,ce)|0,n=(n=n+Math.imul(k,de)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,de)|0,r=r+Math.imul(A,le)|0,n=(n=n+Math.imul(A,he)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,he)|0;var Ce=(d+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;d=((a=a+Math.imul(w,ge)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(L,X)|0,a=Math.imul(L,ee),r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(R,ae)|0,n=(n=n+Math.imul(R,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(D,ce)|0,a=a+Math.imul(D,de)|0,r=r+Math.imul(k,le)|0,n=(n=n+Math.imul(k,he)|0)+Math.imul(M,le)|0,a=a+Math.imul(M,he)|0;var Ie=(d+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,ge)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,ge)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(N,ie),n=(n=Math.imul(N,re))+Math.imul(L,ie)|0,a=Math.imul(L,re),r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,oe)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,oe)|0,r=r+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,de)|0)+Math.imul(z,ce)|0,a=a+Math.imul(z,de)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(D,le)|0,a=a+Math.imul(D,he)|0;var De=(d+(r=r+Math.imul(k,pe)|0)|0)+((8191&(n=(n=n+Math.imul(k,ge)|0)+Math.imul(M,pe)|0))<<13)|0;d=((a=a+Math.imul(M,ge)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(N,ae),n=(n=Math.imul(N,oe))+Math.imul(L,ae)|0,a=Math.imul(L,oe),r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,de)|0,r=r+Math.imul(R,le)|0,n=(n=n+Math.imul(R,he)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,he)|0;var Te=(d+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,ge)|0)+Math.imul(D,pe)|0))<<13)|0;d=((a=a+Math.imul(D,ge)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,ce),n=(n=Math.imul(N,de))+Math.imul(L,ce)|0,a=Math.imul(L,de),r=r+Math.imul(P,le)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,he)|0;var Re=(d+(r=r+Math.imul(R,pe)|0)|0)+((8191&(n=(n=n+Math.imul(R,ge)|0)+Math.imul(z,pe)|0))<<13)|0;d=((a=a+Math.imul(z,ge)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(N,le),n=(n=Math.imul(N,he))+Math.imul(L,le)|0,a=Math.imul(L,he);var ze=(d+(r=r+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ge)|0)+Math.imul(F,pe)|0))<<13)|0;d=((a=a+Math.imul(F,ge)|0)+(n>>>13)|0)+(ze>>>26)|0,ze&=67108863;var Be=(d+(r=Math.imul(N,pe))|0)+((8191&(n=(n=Math.imul(N,ge))+Math.imul(L,pe)|0))<<13)|0;return d=((a=Math.imul(L,ge))+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=me,c[1]=be,c[2]=ve,c[3]=ye,c[4]=_e,c[5]=we,c[6]=xe,c[7]=Ae,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=De,c[15]=Te,c[16]=Re,c[17]=ze,c[18]=Be,0!==d&&(c[19]=d,i.length++),i};function p(e,t,i){return(new g).mulp(e,t,i)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),n.prototype.mulTo=function(e,t){var i,r=this.length+e.length;return i=10===this.length&&10===e.length?f(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a<i.length-1;a++){var o=n;n=0;for(var s=67108863&r,c=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=c;d++){var u=a-d,l=(0|e.words[u])*(0|t.words[d]),h=67108863&l;s=67108863&(h=h+s|0),n+=(o=(o=o+(l/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}i.words[a]=s,r=o,o=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):p(this,e,t),i},g.prototype.makeRBT=function(e){for(var t=new Array(e),i=n.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,i,e);return t},g.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++)r|=(1&e)<<t-n-1,e>>=1;return r},g.prototype.permute=function(e,t,i,r,n,a){for(var o=0;o<a;o++)r[o]=t[e[o]],n[o]=i[e[o]]},g.prototype.transform=function(e,t,i,r,n,a){this.permute(a,e,t,i,r,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),d=Math.sin(2*Math.PI/s),u=0;u<n;u+=s)for(var l=c,h=d,f=0;f<o;f++){var p=i[u+f],g=r[u+f],m=i[u+f+o],b=r[u+f+o],v=l*m-h*b;b=l*b+h*m,m=v,i[u+f]=p+m,r[u+f]=g+b,i[u+f+o]=p-m,r[u+f+o]=g-b,f!==s&&(v=c*l-d*h,h=c*h+d*l,l=v)}},g.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n}},g.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},g.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),a=this.stub(r),o=new Array(r),s=new Array(r),c=new Array(r),d=new Array(r),u=new Array(r),l=new Array(r),h=i.words;h.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,d,r),this.transform(o,a,s,c,r,n),this.transform(d,a,u,l,r,n);for(var f=0;f<r;f++){var p=s[f]*u[f]-c[f]*l[f];c[f]=s[f]*l[f]+c[f]*u[f],s[f]=p}return this.conjugate(s,c,r),this.transform(s,c,h,a,r,n),this.conjugate(h,a,r),this.normalize13b(h,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var a=i.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(i=i.mul(a));return i},n.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,c=(0|this.words[t])-s<<r;this.words[t]=c|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(n-=o,n=Math.max(0,n),c){for(var d=0;d<o;d++)c.words[d]=this.words[d];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,d=0;d<this.length;d++)this.words[d]=this.words[d+o];else this.words[0]=0,this.length=1;var u=0;for(d=this.length-1;d>=0&&(0!==u||d>=n);d--){var l=0|this.words[d];this.words[d]=u<<26-a|l>>>a,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,r){var n,a,o=e.length+r;this._expand(o);var s=0;for(n=0;n<e.length;n++){a=(0|this.words[n+r])+s;var c=(0|e.words[n])*t;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)s=(a=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&a;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(a=-(0|this.words[n])+s)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),a=e,o=0|a.words[a.length-1];0!=(i=26-this._countBits(o))&&(a=a.ushln(i),r.iushln(i),o=0|a.words[a.length-1]);var s,c=r.length-a.length;if("mod"!==t){(s=new n(null)).length=c+1,s.words=new Array(s.length);for(var d=0;d<s.length;d++)s.words[d]=0}var u=r.clone()._ishlnsubmul(a,1,c);0===u.negative&&(r=u,s&&(s.words[c]=1));for(var l=c-1;l>=0;l--){var h=67108864*(0|r.words[a.length+l])+(0|r.words[a.length+l-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(a,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(a,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},n.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},n.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new n(1),o=new n(0),s=new n(0),c=new n(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var u=r.clone(),l=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(l)),a.iushrn(1),o.iushrn(1);for(var p=0,g=1;0==(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(d)}},n.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new n(1),s=new n(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new x(e)},n.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(v,b),v.prototype.split=function(e,t){for(var i=4194303,r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(o&i)<<4|a>>>22,a=o}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,b),r(_,b),r(w,b),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},x.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},x.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new n(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);i(!a.isZero());var s=new n(1).toRed(this),c=s.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,a),h=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),p=o;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();i(m<p);var b=this.pow(l,new n(1).iushln(p-m-1));h=h.redMul(b),l=b.redSqr(),f=f.redMul(l),p=m}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var a=i[0],o=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;a!==i[0]&&(a=this.sqr(a)),0!==l||0!==o?(o<<=1,o|=l,(4==++s||0===r&&0===u)&&(a=this.mul(a,i[o]),s=0,o=0)):s=0}c=26}return a},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new A(e)},r(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=i.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Lc,Uc)),Lc.exports}function Hc(){if(Pc)return Bc;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return Pc=1,Bc=e,e.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)},Bc}var Kc,Vc,$c={};function Jc(){return Kc||(Kc=1,function(e){var t=e;function i(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)i[r]=0|e[r];return i}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)i.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var n=e.charCodeAt(r),a=n>>8,o=255&n;a?i.push(a,o):i.push(o)}return i},t.zero2=i,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}($c)),$c}function Gc(){return Vc||(Vc=1,function(e){var t=e,i=qc(),r=Hc(),n=Jc();t.assert=r,t.toArray=n.toArray,t.zero2=n.zero2,t.toHex=n.toHex,t.encode=n.encode,t.getNAF=function(e,t,i){var r,n=new Array(Math.max(e.bitLength(),i)+1);for(r=0;r<n.length;r+=1)n[r]=0;var a=1<<t+1,o=e.clone();for(r=0;r<n.length;r++){var s,c=o.andln(a-1);o.isOdd()?(s=c>(a>>1)-1?(a>>1)-c:c,o.isubn(s)):s=0,n[r]=s,o.iushrn(1)}return n},t.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,a=0;e.cmpn(-n)>0||t.cmpn(-a)>0;){var o,s,c=e.andln(3)+n&3,d=t.andln(3)+a&3;3===c&&(c=-1),3===d&&(d=-1),o=0==(1&c)?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==d?c:-c,i[0].push(o),s=0==(1&d)?0:3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?d:-d,i[1].push(s),2*n===o+1&&(n=1-n),2*a===s+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return i},t.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new i(e,"hex","le")}}(Nc)),Nc}var Wc,Zc={exports:{}},Yc=Z(Object.freeze({__proto__:null,default:{}}));function Qc(){if(Wc)return Zc.exports;var e;function t(e){this.rand=e}if(Wc=1,Zc.exports=function(i){return e||(e=new t(null)),e.generate(i)},Zc.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=Yc;if("function"!=typeof i.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return i.randomBytes(e)}}catch(e){}return Zc.exports}var Xc,ed,td={};function id(){if(ed)return Xc;ed=1;var e=qc(),t=Gc(),i=t.getNAF,r=t.getJSF,n=t.assert;function a(t,i){this.type=t,this.p=new e(i.p,16),this.red=i.prime?e.red(i.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=i.n&&new e(i.n,16),this.g=i.g&&this.pointFromJSON(i.g,i.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function o(e,t){this.curve=e,this.type=t,this.precomputed=null}return Xc=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(e,t){n(e.precomputed);var r=e._getDoubles(),a=i(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var s,c,d=[];for(s=0;s<a.length;s+=r.step){c=0;for(var u=s+r.step-1;u>=s;u--)c=(c<<1)+a[u];d.push(c)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=o;f>0;f--){for(s=0;s<d.length;s++)(c=d[s])===f?h=h.mixedAdd(r.points[s]):c===-f&&(h=h.mixedAdd(r.points[s].neg()));l=l.add(h)}return l.toP()},a.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var o=a.points,s=i(t,r,this._bitLength),c=this.jpoint(null,null,null),d=s.length-1;d>=0;d--){for(var u=0;d>=0&&0===s[d];d--)u++;if(d>=0&&u++,c=c.dblp(u),d<0)break;var l=s[d];n(0!==l),c="affine"===e.type?l>0?c.mixedAdd(o[l-1>>1]):c.mixedAdd(o[-l-1>>1].neg()):l>0?c.add(o[l-1>>1]):c.add(o[-l-1>>1].neg())}return"affine"===e.type?c.toP():c},a.prototype._wnafMulAdd=function(e,t,n,a,o){var s,c,d,u=this._wnafT1,l=this._wnafT2,h=this._wnafT3,f=0;for(s=0;s<a;s++){var p=(d=t[s])._getNAFPoints(e);u[s]=p.wnd,l[s]=p.points}for(s=a-1;s>=1;s-=2){var g=s-1,m=s;if(1===u[g]&&1===u[m]){var b=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(b[1]=t[g].add(t[m]),b[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(b[1]=t[g].toJ().mixedAdd(t[m]),b[2]=t[g].add(t[m].neg())):(b[1]=t[g].toJ().mixedAdd(t[m]),b[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=r(n[g],n[m]);for(f=Math.max(y[0].length,f),h[g]=new Array(f),h[m]=new Array(f),c=0;c<f;c++){var _=0|y[0][c],w=0|y[1][c];h[g][c]=v[3*(_+1)+(w+1)],h[m][c]=0,l[g]=b}}else h[g]=i(n[g],u[g],this._bitLength),h[m]=i(n[m],u[m],this._bitLength),f=Math.max(h[g].length,f),f=Math.max(h[m].length,f)}var x=this.jpoint(null,null,null),A=this._wnafT4;for(s=f;s>=0;s--){for(var E=0;s>=0;){var S=!0;for(c=0;c<a;c++)A[c]=0|h[c][s],0!==A[c]&&(S=!1);if(!S)break;E++,s--}if(s>=0&&E++,x=x.dblp(E),s<0)break;for(c=0;c<a;c++){var k=A[c];0!==k&&(k>0?d=l[c][k-1>>1]:k<0&&(d=l[c][-k-1>>1].neg()),x="affine"===d.type?x.mixedAdd(d):x.add(d))}}for(s=0;s<a;s++)l[s]=null;return o?x:x.toP()},a.BasePoint=o,o.prototype.eq=function(){throw new Error("Not implemented")},o.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(e,i){e=t.toArray(e,i);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?n(e[e.length-1]%2==0):7===e[0]&&n(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},o.prototype.encodeCompressed=function(e){return this.encode(e,!0)},o.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},o.prototype.encode=function(e,i){return t.encode(this._encode(i),e)},o.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},o.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},o.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)r=r.dbl();i.push(r)}return{step:e,points:i}},o.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(r);return{wnd:e,points:t}},o.prototype._getBeta=function(){return null},o.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t},Xc}var rd,nd,ad,od,sd,cd,dd,ud,ld={exports:{}};function hd(){return rd||(rd=1,"function"==typeof Object.create?ld.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ld.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}),ld.exports}function fd(){return ud||(ud=1,function(e){var t=e;t.base=id(),t.short=function(){if(ad)return nd;ad=1;var e=Gc(),t=qc(),i=hd(),r=id(),n=e.assert;function a(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function o(e,i,n,a){r.BasePoint.call(this,e,"affine"),null===i&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(i,16),this.y=new t(n,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function s(e,i,n,a){r.BasePoint.call(this,e,"jacobian"),null===i&&null===n&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(i,16),this.y=new t(n,16),this.z=new t(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return i(a,r),nd=a,a.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var i,r;if(e.beta)i=new t(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);i=(i=a[0].cmp(a[1])<0?a[0]:a[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(i))?r=o[0]:(r=o[1],n(0===this.g.mul(r).x.cmp(this.g.x.redMul(i))))}return{beta:i,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new t(e.a,16),b:new t(e.b,16)}})):this._getEndoBasis(r)}}},a.prototype._getEndoRoots=function(e){var i=e===this.p?this.red:t.mont(e),r=new t(2).toRed(i).redInvm(),n=r.redNeg(),a=new t(3).toRed(i).redNeg().redSqrt().redMul(r);return[n.redAdd(a).fromRed(),n.redSub(a).fromRed()]},a.prototype._getEndoBasis=function(e){for(var i,r,n,a,o,s,c,d,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,f=this.n.clone(),p=new t(1),g=new t(0),m=new t(0),b=new t(1),v=0;0!==h.cmpn(0);){var y=f.div(h);d=f.sub(y.mul(h)),u=m.sub(y.mul(p));var _=b.sub(y.mul(g));if(!n&&d.cmp(l)<0)i=c.neg(),r=p,n=d.neg(),a=u;else if(n&&2==++v)break;c=d,f=h,h=d,m=p,p=u,b=g,g=_}o=d.neg(),s=u;var w=n.sqr().add(a.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=i,s=r),n.negative&&(n=n.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:a},{a:o,b:s}]},a.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),o=n.mul(i.a),s=a.mul(r.a),c=n.mul(i.b),d=a.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(d).neg()}},a.prototype.pointFromX=function(e,i){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(i&&!a||!i&&a)&&(n=n.redNeg()),this.point(e,n)},a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},a.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*a]=s,r[2*a+1]=c,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var d=this._wnafMulAdd(1,r,n,2*a,i),u=0;u<2*a;u++)r[u]=null,n[u]=null;return d},i(o,r.BasePoint),a.prototype.point=function(e,t,i){return new o(this,e,t,i)},a.prototype.pointFromJSON=function(e,t){return o.fromJSON(this,e,t)},o.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,r=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},o.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},o.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],i);if(!t[2])return r;function n(t){return e.point(t[0],t[1],i)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(n))}},r},o.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},o.prototype.isInfinity=function(){return this.inf},o.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},o.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},o.prototype.getX=function(){return this.x.fromRed()},o.prototype.getY=function(){return this.y.fromRed()},o.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},o.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},o.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},o.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},o.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},o.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(s,r.BasePoint),a.prototype.jpoint=function(e,t,i){return new s(this,e,t,i)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),s=r.redSub(n),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=s.redSqr(),u=d.redMul(s),l=r.redMul(d),h=c.redSqr().redIAdd(u).redISub(l).redISub(l),f=c.redMul(l.redISub(h)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,f,p)},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=i.redSub(r),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),d=c.redMul(o),u=i.redMul(c),l=s.redSqr().redIAdd(d).redISub(u).redISub(u),h=s.redMul(u.redISub(l)).redISub(n.redMul(d)),f=this.z.redMul(o);return this.curve.jpoint(l,h,f)},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t<e;t++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),d=o.redAdd(o);for(t=0;t<e;t++){var u=a.redSqr(),l=d.redSqr(),h=l.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),p=a.redMul(l),g=f.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),b=f.redMul(m);b=b.redIAdd(b).redISub(h);var v=d.redMul(s);t+1<e&&(c=c.redMul(h)),a=g,s=v,d=b}return this.curve.jpoint(a,d.redMul(n),s)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},s.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(o).redISub(o),d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),e=c,t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),f=this.x.redAdd(l).redSqr().redISub(u).redISub(h);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),g=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=g.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(m),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},s.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);e=c;var d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),g=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(g),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=f.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,i)},s.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),a=t.redSqr(),o=i.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),c=t.redAdd(t),d=(c=c.redIAdd(c)).redMul(o),u=s.redSqr().redISub(d.redAdd(d)),l=d.redISub(u),h=o.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=s.redMul(l).redISub(h),p=i.redAdd(i).redMul(r);return this.curve.jpoint(u,f,p)},s.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),r=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=n.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),u=t.redMul(d);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(s).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(d.redMul(c.redISub(d)).redISub(o.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(o).redSqr().redISub(i).redISub(s);return this.curve.jpoint(l,h,f)},s.prototype.mul=function(e,i){return e=new t(e,i),this.curve._wnafMul(this,e)},s.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),n=i.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(r)).cmpn(0)},s.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},s.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},nd}(),t.mont=function(){if(sd)return od;sd=1;var e=qc(),t=hd(),i=id(),r=Gc();function n(t){i.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(t,r,n){i.BasePoint.call(this,t,"projective"),null===r&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(n,i),od=n,n.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(a,i.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},n.prototype.point=function(e,t){return new a(this,e,t)},n.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),o=n.redMul(r),s=t.z.redMul(a.redAdd(o).redSqr()),c=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},a.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},od}(),t.edwards=function(){if(dd)return cd;dd=1;var e=Gc(),t=qc(),i=hd(),r=id(),n=e.assert;function a(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function o(e,i,n,a,o){r.BasePoint.call(this,e,"projective"),null===i&&null===n&&null===a?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(i,16),this.y=new t(n,16),this.z=a?new t(a,16):this.curve.one,this.t=o&&new t(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return i(a,r),cd=a,a.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},a.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},a.prototype.jpoint=function(e,t,i,r){return this.point(e,t,i,r)},a.prototype.pointFromX=function(e,i){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(a.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(i&&!c||!i&&c)&&(s=s.redNeg()),this.point(e,s)},a.prototype.pointFromY=function(e,i){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(a.redInvm());if(0===o.cmp(this.zero)){if(i)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==i&&(s=s.redNeg()),this.point(s,e)},a.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),r=t.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===r.cmp(n)},i(o,r.BasePoint),a.prototype.pointFromJSON=function(e){return o.fromJSON(this,e)},a.prototype.point=function(e,t,i,r){return new o(this,e,t,i,r)},o.fromJSON=function(e,t){return new o(e,t[0],t[1],t[2])},o.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},o.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),o=a.redSub(i),s=r.redSub(t),c=n.redMul(o),d=a.redMul(s),u=n.redMul(s),l=o.redMul(a);return this.curve.point(c,d,l,u)},o.prototype._projDbl=function(){var e,t,i,r,n,a,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var d=(r=this.curve._mulA(s)).redAdd(c);this.zOne?(e=o.redSub(s).redSub(c).redMul(d.redSub(this.curve.two)),t=d.redMul(r.redSub(c)),i=d.redSqr().redSub(d).redSub(d)):(n=this.z.redSqr(),a=d.redSub(n).redISub(n),e=o.redSub(s).redISub(c).redMul(a),t=d.redMul(r.redSub(c)),i=d.redMul(a))}else r=s.redAdd(c),n=this.curve._mulC(this.z).redSqr(),a=r.redSub(n).redSub(n),e=this.curve._mulC(o.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(s.redISub(c)),i=r.redMul(a);return this.curve.point(e,t,i)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},o.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),o=n.redSub(r),s=n.redAdd(r),c=i.redAdd(t),d=a.redMul(o),u=s.redMul(c),l=a.redMul(c),h=o.redMul(s);return this.curve.point(d,u,h,l)},o.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=n.redSub(s),d=n.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=r.redMul(c).redMul(u);return this.curve.twisted?(t=r.redMul(d).redMul(o.redSub(this.curve._mulA(a))),i=c.redMul(d)):(t=r.redMul(d).redMul(o.redSub(a)),i=this.curve._mulC(c).redMul(d)),this.curve.point(l,t,i)},o.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},o.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},o.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},o.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},o.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},o.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()},o.prototype.getY=function(){return this.normalize(),this.y.fromRed()},o.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},o.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},o.prototype.toP=o.prototype.normalize,o.prototype.mixedAdd=o.prototype.add,cd}()}(td)),td}var pd,gd={},md={},bd={};function vd(){if(pd)return bd;pd=1;var e=Hc(),t=hd();function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return bd.inherits=t,bd.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(var n=0,a=0;a<e.length;a++){var o=e.charCodeAt(a);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):i(e,a)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++a)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(a=0;a<e.length;a++)r[a]=0|e[a];return r},bd.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=n(e[i].toString(16));return t},bd.htonl=r,bd.toHex32=function(e,t){for(var i="",n=0;n<e.length;n++){var o=e[n];"little"===t&&(o=r(o)),i+=a(o.toString(16))}return i},bd.zero2=n,bd.zero8=a,bd.join32=function(t,i,r,n){var a=r-i;e(a%4==0);for(var o=new Array(a/4),s=0,c=i;s<o.length;s++,c+=4){var d;d="big"===n?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],o[s]=d>>>0}return o},bd.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r<e.length;r++,n+=4){var a=e[r];"big"===t?(i[n]=a>>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},bd.rotr32=function(e,t){return e>>>t|e<<32-t},bd.rotl32=function(e,t){return e<<t|e>>>32-t},bd.sum32=function(e,t){return e+t>>>0},bd.sum32_3=function(e,t,i){return e+t+i>>>0},bd.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},bd.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},bd.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,o=(a<r?1:0)+i+n;e[t]=o>>>0,e[t+1]=a},bd.sum64_hi=function(e,t,i,r){return(t+r>>>0<t?1:0)+e+i>>>0},bd.sum64_lo=function(e,t,i,r){return t+r>>>0},bd.sum64_4_hi=function(e,t,i,r,n,a,o,s){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+a>>>0)<a?1:0,e+i+n+o+(c+=(d=d+s>>>0)<s?1:0)>>>0},bd.sum64_4_lo=function(e,t,i,r,n,a,o,s){return t+r+a+s>>>0},bd.sum64_5_hi=function(e,t,i,r,n,a,o,s,c,d){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,u+=(l=l+s>>>0)<s?1:0,e+i+n+o+c+(u+=(l=l+d>>>0)<d?1:0)>>>0},bd.sum64_5_lo=function(e,t,i,r,n,a,o,s,c,d){return t+r+a+s+d>>>0},bd.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},bd.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},bd.shr64_hi=function(e,t,i){return e>>>i},bd.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},bd}var yd,_d={};function wd(){if(yd)return _d;yd=1;var e=vd(),t=Hc();function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return _d.BlockHash=i,i.prototype.update=function(t,i){if(t=e.toArray(t,i),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;a<this.padLength;a++)r[n++]=0;return r},_d}var xd,Ad,Ed,Sd,kd,Md,Cd,Id,Dd,Td,Rd,zd,Bd={},Pd={};function Fd(){if(xd)return Pd;xd=1;var e=vd().rotr32;function t(e,t,i){return e&t^~e&i}function i(e,t,i){return e&t^e&i^t&i}function r(e,t,i){return e^t^i}return Pd.ft_1=function(e,n,a,o){return 0===e?t(n,a,o):1===e||3===e?r(n,a,o):2===e?i(n,a,o):void 0},Pd.ch32=t,Pd.maj32=i,Pd.p32=r,Pd.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},Pd.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},Pd.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},Pd.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},Pd}function Od(){if(kd)return Sd;kd=1;var e=vd(),t=wd(),i=Fd(),r=Hc(),n=e.sum32,a=e.sum32_4,o=e.sum32_5,s=i.ch32,c=i.maj32,d=i.s0_256,u=i.s1_256,l=i.g0_256,h=i.g1_256,f=t.BlockHash,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=p,this.W=new Array(64)}return e.inherits(g,f),Sd=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var i=this.W,f=0;f<16;f++)i[f]=e[t+f];for(;f<i.length;f++)i[f]=a(h(i[f-2]),i[f-7],l(i[f-15]),i[f-16]);var p=this.h[0],g=this.h[1],m=this.h[2],b=this.h[3],v=this.h[4],y=this.h[5],_=this.h[6],w=this.h[7];for(r(this.k.length===i.length),f=0;f<i.length;f++){var x=o(w,u(v),s(v,y,_),this.k[f],i[f]),A=n(d(p),c(p,g,m));w=_,_=y,y=v,v=n(b,x),b=m,m=g,g=p,p=n(x,A)}this.h[0]=n(this.h[0],p),this.h[1]=n(this.h[1],g),this.h[2]=n(this.h[2],m),this.h[3]=n(this.h[3],b),this.h[4]=n(this.h[4],v),this.h[5]=n(this.h[5],y),this.h[6]=n(this.h[6],_),this.h[7]=n(this.h[7],w)},g.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Sd}function Nd(){if(Dd)return Id;Dd=1;var e=vd(),t=wd(),i=Hc(),r=e.rotr64_hi,n=e.rotr64_lo,a=e.shr64_hi,o=e.shr64_lo,s=e.sum64,c=e.sum64_hi,d=e.sum64_lo,u=e.sum64_4_hi,l=e.sum64_4_lo,h=e.sum64_5_hi,f=e.sum64_5_lo,p=t.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;p.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function b(e,t,i,r,n){var a=e&i^~e&n;return a<0&&(a+=4294967296),a}function v(e,t,i,r,n,a){var o=t&r^~t&a;return o<0&&(o+=4294967296),o}function y(e,t,i,r,n){var a=e&i^e&n^i&n;return a<0&&(a+=4294967296),a}function _(e,t,i,r,n,a){var o=t&r^t&a^r&a;return o<0&&(o+=4294967296),o}function w(e,t){var i=r(e,t,28)^r(t,e,2)^r(t,e,7);return i<0&&(i+=4294967296),i}function x(e,t){var i=n(e,t,28)^n(t,e,2)^n(t,e,7);return i<0&&(i+=4294967296),i}function A(e,t){var i=r(e,t,14)^r(e,t,18)^r(t,e,9);return i<0&&(i+=4294967296),i}function E(e,t){var i=n(e,t,14)^n(e,t,18)^n(t,e,9);return i<0&&(i+=4294967296),i}function S(e,t){var i=r(e,t,1)^r(e,t,8)^a(e,t,7);return i<0&&(i+=4294967296),i}function k(e,t){var i=n(e,t,1)^n(e,t,8)^o(e,t,7);return i<0&&(i+=4294967296),i}function M(e,t){var i=r(e,t,19)^r(t,e,29)^a(e,t,6);return i<0&&(i+=4294967296),i}function C(e,t){var i=n(e,t,19)^n(t,e,29)^o(e,t,6);return i<0&&(i+=4294967296),i}return e.inherits(m,p),Id=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(e,t){for(var i=this.W,r=0;r<32;r++)i[r]=e[t+r];for(;r<i.length;r+=2){var n=M(i[r-4],i[r-3]),a=C(i[r-4],i[r-3]),o=i[r-14],s=i[r-13],c=S(i[r-30],i[r-29]),d=k(i[r-30],i[r-29]),h=i[r-32],f=i[r-31];i[r]=u(n,a,o,s,c,d,h,f),i[r+1]=l(n,a,o,s,c,d,h,f)}},m.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],a=this.h[1],o=this.h[2],u=this.h[3],l=this.h[4],p=this.h[5],g=this.h[6],m=this.h[7],S=this.h[8],k=this.h[9],M=this.h[10],C=this.h[11],I=this.h[12],D=this.h[13],T=this.h[14],R=this.h[15];i(this.k.length===r.length);for(var z=0;z<r.length;z+=2){var B=T,P=R,F=A(S,k),O=E(S,k),N=b(S,k,M,C,I),L=v(S,k,M,C,I,D),j=this.k[z],U=this.k[z+1],q=r[z],H=r[z+1],K=h(B,P,F,O,N,L,j,U,q,H),V=f(B,P,F,O,N,L,j,U,q,H);B=w(n,a),P=x(n,a),F=y(n,a,o,u,l),O=_(n,a,o,u,l,p);var $=c(B,P,F,O),J=d(B,P,F,O);T=I,R=D,I=M,D=C,M=S,C=k,S=c(g,m,K,V),k=d(m,m,K,V),g=l,m=p,l=o,p=u,o=n,u=a,n=c(K,V,$,J),a=d(K,V,$,J)}s(this.h,0,n,a),s(this.h,2,o,u),s(this.h,4,l,p),s(this.h,6,g,m),s(this.h,8,S,k),s(this.h,10,M,C),s(this.h,12,I,D),s(this.h,14,T,R)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Id}function Ld(){return zd||(zd=1,Bd.sha1=function(){if(Ed)return Ad;Ed=1;var e=vd(),t=wd(),i=Fd(),r=e.rotl32,n=e.sum32,a=e.sum32_5,o=i.ft_1,s=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(d,s),Ad=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var i=this.W,s=0;s<16;s++)i[s]=e[t+s];for(;s<i.length;s++)i[s]=r(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var d=this.h[0],u=this.h[1],l=this.h[2],h=this.h[3],f=this.h[4];for(s=0;s<i.length;s++){var p=~~(s/20),g=a(r(d,5),o(p,u,l,h),f,i[s],c[p]);f=h,h=l,l=r(u,30),u=d,d=g}this.h[0]=n(this.h[0],d),this.h[1]=n(this.h[1],u),this.h[2]=n(this.h[2],l),this.h[3]=n(this.h[3],h),this.h[4]=n(this.h[4],f)},d.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Ad}(),Bd.sha224=function(){if(Cd)return Md;Cd=1;var e=vd(),t=Od();function i(){if(!(this instanceof i))return new i;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(i,t),Md=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},Md}(),Bd.sha256=Od(),Bd.sha384=function(){if(Rd)return Td;Rd=1;var e=vd(),t=Nd();function i(){if(!(this instanceof i))return new i;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(i,t),Td=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},Td}(),Bd.sha512=Nd()),Bd}var jd,Ud,qd,Hd,Kd,Vd,$d,Jd,Gd,Wd,Zd,Yd,Qd,Xd,eu,tu,iu,ru,nu,au,ou,su,cu={};function du(){return Hd||(Hd=1,function(e){var t=e;t.utils=vd(),t.common=wd(),t.sha=Ld(),t.ripemd=function(){if(jd)return cu;jd=1;var e=vd(),t=wd(),i=e.rotl32,r=e.sum32,n=e.sum32_3,a=e.sum32_4,o=t.BlockHash;function s(){if(!(this instanceof s))return new s;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,i,r){return e<=15?t^i^r:e<=31?t&i|~t&r:e<=47?(t|~i)^r:e<=63?t&r|i&~r:t^(i|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(s,o),cu.ripemd160=s,s.blockSize=512,s.outSize=160,s.hmacStrength=192,s.padLength=64,s.prototype._update=function(e,t){for(var o=this.h[0],s=this.h[1],g=this.h[2],m=this.h[3],b=this.h[4],v=o,y=s,_=g,w=m,x=b,A=0;A<80;A++){var E=r(i(a(o,c(A,s,g,m),e[l[A]+t],d(A)),f[A]),b);o=b,b=m,m=i(g,10),g=s,s=E,E=r(i(a(v,c(79-A,y,_,w),e[h[A]+t],u(A)),p[A]),x),v=x,x=w,w=i(_,10),_=y,y=E}E=n(this.h[1],g,w),this.h[1]=n(this.h[2],m,x),this.h[2]=n(this.h[3],b,v),this.h[3]=n(this.h[4],o,y),this.h[4]=n(this.h[0],s,_),this.h[0]=E},s.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return cu}(),t.hmac=function(){if(qd)return Ud;qd=1;var e=vd(),t=Hc();function i(t,r,n){if(!(this instanceof i))return new i(t,r,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,n))}return Ud=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var i=e.length;i<this.blockSize;i++)e.push(0);for(i=0;i<e.length;i++)e[i]^=54;for(this.inner=(new this.Hash).update(e),i=0;i<e.length;i++)e[i]^=106;this.outer=(new this.Hash).update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Ud}(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(md)),md}function uu(){return $d||($d=1,function(e){var t,i=e,r=du(),n=fd(),a=Gc().assert;function o(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Vd?Kd:(Vd=1,Kd={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(gd)),gd}function lu(){if(eu)return Xd;eu=1;var e=qc(),t=function(){if(Gd)return Jd;Gd=1;var e=du(),t=Jc(),i=Hc();function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var n=t.toArray(e.entropy,e.entropyEnc||"hex"),a=t.toArray(e.nonce,e.nonceEnc||"hex"),o=t.toArray(e.pers,e.persEnc||"hex");i(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,a,o)}return Jd=r,r.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,n,a){"string"!=typeof r&&(a=n,n=r,r=null),e=t.toArray(e,r),n=t.toArray(n,a),i(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},r.prototype.generate=function(e,i,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof i&&(n=r,r=i,i=null),r&&(r=t.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(r),this._reseed++,t.encode(o,i)},Jd}(),i=Gc(),r=uu(),n=Qc(),a=i.assert,o=function(){if(Zd)return Wd;Zd=1;var e=qc(),t=Gc().assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return Wd=i,i.fromPublic=function(e,t,r){return t instanceof i?t:new i(e,{pub:t,pubEnc:r})},i.fromPrivate=function(e,t,r){return t instanceof i?t:new i(e,{priv:t,privEnc:r})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(t,i){this.priv=new e(t,i||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,i){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,i)},i.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},i.prototype.verify=function(e,t,i){return this.ec.verify(e,t,this,void 0,i)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},Wd}(),s=function(){if(Qd)return Yd;Qd=1;var e=qc(),t=Gc(),i=t.assert;function r(t,n){if(t instanceof r)return t;this._importDER(t,n)||(i(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function n(){this.place=0}function a(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var n=0,a=0,o=t.place;a<r;a++,o++)n<<=8,n|=e[o],n>>>=0;return!(n<=127)&&(t.place=o,n)}function o(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function s(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}return Yd=r,r.prototype._importDER=function(i,r){i=t.toArray(i,r);var o=new n;if(48!==i[o.place++])return!1;var s=a(i,o);if(!1===s)return!1;if(s+o.place!==i.length)return!1;if(2!==i[o.place++])return!1;var c=a(i,o);if(!1===c)return!1;if(0!=(128&i[o.place]))return!1;var d=i.slice(o.place,c+o.place);if(o.place+=c,2!==i[o.place++])return!1;var u=a(i,o);if(!1===u)return!1;if(i.length!==u+o.place)return!1;if(0!=(128&i[o.place]))return!1;var l=i.slice(o.place,u+o.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new e(d),this.s=new e(l),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var i=this.r.toArray(),r=this.s.toArray();for(128&i[0]&&(i=[0].concat(i)),128&r[0]&&(r=[0].concat(r)),i=o(i),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];s(n,i.length),(n=n.concat(i)).push(2),s(n,r.length);var a=n.concat(r),c=[48];return s(c,a.length),c=c.concat(a),t.encode(c,e)},Yd}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return Xd=c,c.prototype.keyPair=function(e){return new o(this,e)},c.prototype.keyFromPrivate=function(e,t){return o.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return o.fromPublic(this,e,t)},c.prototype.genKeyPair=function(i){i||(i={});for(var r=new t({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||n(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),o=this.n.sub(new e(2));;){var s=new e(r.generate(a));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(t,i,r){var n;if(e.isBN(t)||"number"==typeof t)n=(t=new e(t,16)).byteLength();else if("object"==typeof t)n=t.length,t=new e(t,16);else{var a=t.toString();n=a.length+1>>>1,t=new e(a,16)}"number"!=typeof r&&(r=8*n);var o=r-this.n.bitLength();return o>0&&(t=t.ushrn(o)),!i&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(i,r,n,o){if("object"==typeof n&&(o=n,n=null),o||(o={}),"string"!=typeof i&&"number"!=typeof i&&!e.isBN(i)){a("object"==typeof i&&i&&"number"==typeof i.length,"Expected message to be an array-like, a hex string, or a BN instance"),a(i.length>>>0===i.length);for(var c=0;c<i.length;c++)a((255&i[c])===i[c])}r=this.keyFromPrivate(r,n),i=this._truncateToN(i,!1,o.msgBitLength),a(!i.isNeg(),"Can not sign a negative message");var d=this.n.byteLength(),u=r.getPrivate().toArray("be",d),l=i.toArray("be",d);a(new e(l).eq(i),"Can not sign message");for(var h=new t({hash:this.hash,entropy:u,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new e(1)),p=0;;p++){var g=o.k?o.k(p):new e(h.generate(this.n.byteLength()));if(!((g=this._truncateToN(g,!0)).cmpn(1)<=0||g.cmp(f)>=0)){var m=this.g.mul(g);if(!m.isInfinity()){var b=m.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=g.invm(this.n).mul(v.mul(r.getPrivate()).iadd(i));if(0!==(y=y.umod(this.n)).cmpn(0)){var _=(m.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),_^=1),new s({r:v,s:y,recoveryParam:_})}}}}}},c.prototype.verify=function(e,t,i,r,n){n||(n={}),e=this._truncateToN(e,!1,n.msgBitLength),i=this.keyFromPublic(i,r);var a=(t=new s(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var c,d=o.invm(this.n),u=d.mul(e).umod(this.n),l=d.mul(a).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(u,i.getPublic(),l)).isInfinity()&&c.eqXToP(a):!(c=this.g.mulAdd(u,i.getPublic(),l)).isInfinity()&&0===c.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(t,i,r,n){a((3&r)===r,"The recovery param is more than two bits"),i=new s(i,n);var o=this.n,c=new e(t),d=i.r,u=i.s,l=1&r,h=r>>1;if(d.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");d=h?this.curve.pointFromX(d.add(this.curve.n),l):this.curve.pointFromX(d,l);var f=i.r.invm(o),p=o.sub(c).mul(f).umod(o),g=u.mul(f).umod(o);return this.g.mulAdd(p,d,g)},c.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(i))return n}throw new Error("Unable to find valid recovery factor")},Xd}function hu(){if(ou)return au;ou=1;var e=du(),t=uu(),i=Gc(),r=i.assert,n=i.parseBytes,a=function(){if(iu)return tu;iu=1;var e=Gc(),t=e.assert,i=e.parseBytes,r=e.cachedProperty;function n(e,t){this.eddsa=e,this._secret=i(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=i(t.pub)}return n.fromPublic=function(e,t){return t instanceof n?t:new n(e,{pub:t})},n.fromSecret=function(e,t){return t instanceof n?t:new n(e,{secret:t})},n.prototype.secret=function(){return this._secret},r(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(n,"privBytes",(function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),r(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},n.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},n.prototype.getSecret=function(i){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),i)},n.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},tu=n}(),o=function(){if(nu)return ru;nu=1;var e=qc(),t=Gc(),i=t.assert,r=t.cachedProperty,n=t.parseBytes;function a(t,r){this.eddsa=t,"object"!=typeof r&&(r=n(r)),Array.isArray(r)&&(i(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),i(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(a,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(a,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(a,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(a,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},ru=a}();function s(i){if(r("ed25519"===i,"only tested with ed25519 so far"),!(this instanceof s))return new s(i);i=t[i].curve,this.curve=i,this.g=i.g,this.g.precompute(i.n.bitLength()+1),this.pointClass=i.point().constructor,this.encodingLength=Math.ceil(i.n.bitLength()/8),this.hash=e.sha512}return au=s,s.prototype.sign=function(e,t){e=n(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),a=this.g.mul(r),o=this.encodePoint(a),s=this.hashInt(o,i.pubBytes(),e).mul(i.priv()),c=r.add(s).umod(this.curve.n);return this.makeSignature({R:a,S:c,Rencoded:o})},s.prototype.verify=function(e,t,i){if(e=n(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(i),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(o)},s.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return i.intFromLE(e.digest()).umod(this.curve.n)},s.prototype.keyFromPublic=function(e){return a.fromPublic(this,e)},s.prototype.keyFromSecret=function(e){return a.fromSecret(this,e)},s.prototype.makeSignature=function(e){return e instanceof o?e:new o(this,e)},s.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},s.prototype.decodePoint=function(e){var t=(e=i.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),a=i.intFromLE(r);return this.curve.pointFromY(a,n)},s.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},s.prototype.decodeInt=function(e){return i.intFromLE(e)},s.prototype.isPoint=function(e){return e instanceof this.pointClass},au}var fu,pu=(su||(su=1,function(e){var t=e;t.version=Oc,t.utils=Gc(),t.rand=Qc(),t.curve=fd(),t.curves=uu(),t.ec=lu(),t.eddsa=hu()}(Fc)),Fc),gu={exports:{}};var mu,bu,vu,yu=(fu||(fu=1,mu=gu,function(e){function t(e){return parseInt(e)===e}function i(e){if(!t(e.length))return!1;for(var i=0;i<e.length;i++)if(!t(e[i])||e[i]<0||e[i]>255)return!1;return!0}function r(e,r){if(e.buffer&&"Uint8Array"===e.name)return r&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!i(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(t(e.length)&&i(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function n(e){return new Uint8Array(e)}function a(e,t,i,r,n){null==r&&null==n||(e=e.slice?e.slice(r,n):Array.prototype.slice.call(e,r,n)),t.set(e,i)}var o,s={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var n=e.charCodeAt(i++);37===n?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(n)}return r(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var r=e[i];r<128?(t.push(String.fromCharCode(r)),i++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},c=(o="0123456789abcdef",{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(e){for(var t=[],i=0;i<e.length;i++){var r=e[i];t.push(o[(240&r)>>4]+o[15&r])}return t.join("")}}),d={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],_=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],x=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],A=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var k=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:r(t,!0)}),this._prepare()};k.prototype._prepare=function(){var e=d[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,r=4*(e+1),n=this.key.length/4,a=S(this.key);for(t=0;t<n;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,s=0,c=n;c<r;){if(o=a[n-1],a[0]^=l[o>>16&255]<<24^l[o>>8&255]<<16^l[255&o]<<8^l[o>>24&255]^u[s]<<24,s+=1,8!=n)for(t=1;t<n;t++)a[t]^=a[t-1];else{for(t=1;t<n/2;t++)a[t]^=a[t-1];for(o=a[n/2-1],a[n/2]^=l[255&o]^l[o>>8&255]<<8^l[o>>16&255]<<16^l[o>>24&255]<<24,t=n/2+1;t<n;t++)a[t]^=a[t-1]}for(t=0;t<n&&c<r;)h=c>>2,f=c%4,this._Ke[h][f]=a[t],this._Kd[e-h][f]=a[t++],c++}for(var h=1;h<e;h++)for(var f=0;f<4;f++)o=this._Kd[h][f],this._Kd[h][f]=w[o>>24&255]^x[o>>16&255]^A[o>>8&255]^E[255&o]},k.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],r=S(e),a=0;a<4;a++)r[a]^=this._Ke[0][a];for(var o=1;o<t;o++){for(a=0;a<4;a++)i[a]=f[r[a]>>24&255]^p[r[(a+1)%4]>>16&255]^g[r[(a+2)%4]>>8&255]^m[255&r[(a+3)%4]]^this._Ke[o][a];r=i.slice()}var s,c=n(16);for(a=0;a<4;a++)s=this._Ke[t][a],c[4*a]=255&(l[r[a]>>24&255]^s>>24),c[4*a+1]=255&(l[r[(a+1)%4]>>16&255]^s>>16),c[4*a+2]=255&(l[r[(a+2)%4]>>8&255]^s>>8),c[4*a+3]=255&(l[255&r[(a+3)%4]]^s);return c},k.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],r=S(e),a=0;a<4;a++)r[a]^=this._Kd[0][a];for(var o=1;o<t;o++){for(a=0;a<4;a++)i[a]=b[r[a]>>24&255]^v[r[(a+3)%4]>>16&255]^y[r[(a+2)%4]>>8&255]^_[255&r[(a+1)%4]]^this._Kd[o][a];r=i.slice()}var s,c=n(16);for(a=0;a<4;a++)s=this._Kd[t][a],c[4*a]=255&(h[r[a]>>24&255]^s>>24),c[4*a+1]=255&(h[r[(a+3)%4]>>16&255]^s>>16),c[4*a+2]=255&(h[r[(a+2)%4]>>8&255]^s>>8),c[4*a+3]=255&(h[255&r[(a+1)%4]]^s);return c};var M=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new k(t)};M.prototype.encrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=n(e.length),i=n(16),o=0;o<e.length;o+=16)a(e,i,0,o,o+16),a(i=this._aes.encrypt(i),t,o);return t},M.prototype.decrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=n(e.length),i=n(16),o=0;o<e.length;o+=16)a(e,i,0,o,o+16),a(i=this._aes.decrypt(i),t,o);return t};var C=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=n(16);this._lastCipherblock=r(i,!0),this._aes=new k(t)};C.prototype.encrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=n(e.length),i=n(16),o=0;o<e.length;o+=16){a(e,i,0,o,o+16);for(var s=0;s<16;s++)i[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(i),a(this._lastCipherblock,t,o)}return t},C.prototype.decrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=n(e.length),i=n(16),o=0;o<e.length;o+=16){a(e,i,0,o,o+16),i=this._aes.decrypt(i);for(var s=0;s<16;s++)t[o+s]=i[s]^this._lastCipherblock[s];a(e,this._lastCipherblock,0,o,o+16)}return t};var I=function e(t,i,a){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 size)")}else i=n(16);a||(a=1),this.segmentSize=a,this._shiftRegister=r(i,!0),this._aes=new k(t)};I.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=r(e,!0),n=0;n<i.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)i[n+o]^=t[o];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(i,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return i},I.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=r(e,!0),n=0;n<i.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)i[n+o]^=t[o];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return i};var D=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=n(16);this._lastPrecipher=r(i,!0),this._lastPrecipherIndex=16,this._aes=new k(t)};D.prototype.encrypt=function(e){for(var t=r(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},D.prototype.decrypt=D.prototype.encrypt;var T=function e(t){if(!(this instanceof e))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=n(16),this.setValue(t)):this.setBytes(t)};T.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},T.prototype.setBytes=function(e){if(16!=(e=r(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},T.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var R=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",i instanceof T||(i=new T(i)),this._counter=i,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new k(t)};R.prototype.encrypt=function(e){for(var t=r(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},R.prototype.decrypt=R.prototype.encrypt;var z={AES:k,Counter:T,ModeOfOperation:{ecb:M,cbc:C,cfb:I,ofb:D,ctr:R},utils:{hex:c,utf8:s},padding:{pkcs7:{pad:function(e){var t=16-(e=r(e,!0)).length%16,i=n(e.length+t);a(e,i);for(var o=e.length;o<i.length;o++)i[o]=t;return i},strip:function(e){if((e=r(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,o=0;o<t;o++)if(e[i+o]!==t)throw new Error("PKCS#7 invalid padding byte");var s=n(i);return a(e,s,0,0,i),s}}},_arrayTest:{coerceArray:r,createArray:n,copyArray:a}};mu.exports=z}()),gu.exports);class _u{getExchangeRequestHeader(){if(!this.kp){const e={entropy:this.generateRandomHexString(192),entropyEnc:"hex"};this.kp=this.ec.genKeyPair(e)}return{type:"key_exchange",scheme:3,y:this.jsArrayToBase64(this.kp.getPublic().encode("array",!1))}}async processExchangeResponseHeader(e){if(e.scheme!=this.scheme)throw"Unsupported crypto scheme "+e.scheme;this.sessionId=e.crypto_session_id;const t=this.kp.derive(this.ec.keyFromPublic(atob(e.y)).getPublic()).toArray("be",32),i=new Uint8Array(t),r=await crypto.subtle.digest("SHA-256",i);this.aesKey=Array.from(new Uint8Array(r))}isReady(){return!(!this.aesKey||!this.sessionId)}decryptResponse(e){let t=null;if(e.headers.forEach((function(e){"encryption"==e.type&&(t=e)})),t){const i=this.base64ToJsArray(t.iv),r=new yu.ModeOfOperation.cbc(this.aesKey,i),n=this.base64ToJsArray(e.data),a=r.decrypt(n);let o=yu.utils.utf8.fromBytes(a);o=this.pkcs7Unpad(o),e.data=JSON.parse(o)}return e}encryptRequest(e){const t=this.generateRandomHexString(32),i=yu.utils.hex.toBytes(t),r={type:"encryption",iv:this.hexToBase64(t),crypto_session_id:this.sessionId},n=e.headers.map((e=>this.encryptStringToBase64(JSON.stringify(e),i))),a=JSON.stringify(e.data),o=this.encryptStringToBase64(a,i);e.headers=[r],e.enc_headers=n,e.data=o}encryptStringToBase64(e,t){const i=new yu.ModeOfOperation.cbc(this.aesKey,t),r=yu.utils.utf8.toBytes(e),n=this.pkcs7Pad(r),a=[...i.encrypt(n)];return this.jsArrayToBase64(a)}toJson(){return{scheme:3,session_id:this.sessionId,key:this.jsArrayToBase64(this.aesKey)}}static fromJson(e){return new _u(e)}jsArrayToBase64(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return btoa(t)}base64ToJsArray(e){const t=atob(e),i=[];for(let e=0;e<t.length;e++)i.push(t.charCodeAt(e));return i}pkcs7Pad(e){const t=16-e.length%16,i=new Uint8Array(e.length+t);i.set(e,0);for(let r=0;r<t;r++)i[e.length+r]=t;return i}pkcs7Unpad(e){try{const t=e.charCodeAt(e.length-1);if(t<1||t>16)throw new Su(`Invalid padding length: ${t}`);if(e.length<t)throw new Su("Input string shorter than padding length");for(let i=1;i<=t;i++){if(e.charCodeAt(e.length-i)!==t)throw new Su("Invalid padding values")}return e.slice(0,-t)}catch(e){if(e instanceof Su)throw e;throw new Su(`Failed to unpad data: ${e instanceof Error?e.message:String(e)}`)}}constructor(e){if(this.scheme=3,this.ecCurveName="p256",this.ec=new pu.ec(this.ecCurveName),e&&(this.sessionId=e.session_id,this.aesKey=this.base64ToJsArray(e.key),!this.isReady()))throw new Error("Internal: Can't deserialize crypto session")}generateRandomHexString(e){const t=new Uint8Array(e);crypto.getRandomValues(t);let i="";const r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];for(let e=0;e<t.length;e++){i+=r[15&t[e]]}return i}hexToBase64(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";let i=0,r=0,n="";for(let a=0;a<e.length;a++)if(i=(i<<4)+parseInt(e[a],16),r+=4,r>=6){n+=t[i>>r-6],r-=6,i&=255>>8-r}if(r){n+=t[i<<6-r]}for(;n.length%4;)n+="=";return n}}class wu{constructor(e,t){this.encrypted=e,this.cryptoSession=t}isReady(){var e;return(null===(e=this.cryptoSession)||void 0===e?void 0:e.isReady())||!1}async exchangeKeyAndEncryptRequest(e,t,i,r,n,a){if(!t.isReady()){const i=["aid","clientId"],n=new URLSearchParams(Array.from(r.searchParams.entries()).filter((e=>{let[t,r]=e;return i.includes(t)})));await t.performKeyExchange(e,n)}return t.promisePossiblyEncryptedTransportRequest(new Eu(i,r,n.data,n.headers,a))}async performKeyExchange(e,t){const r={r:"Hello Encrypted World"},n=new URL(e+kc.path+"?"+t.toString()),a=new Eu("POST",n,r,[],{"Content-Type":"application/json"}),o=this.promisePossiblyEncryptedTransportRequest(a);let s;const c=await fetch(o.url.toString(),{body:JSON.stringify(null==o?void 0:o.body),method:"POST",headers:o.headers,credentials:"include"});if(!c.ok)throw new Error("Request failed");let d;s=i(i({data:await c.json()},c),{},{headers:c.headers});try{d=s.data}catch(e){throw new Error(`Unsupported resposne format: ${e}`)}await this.postprocessResponse(d),d=this.possiblyDecryptResponse(d);const u=d.data;if(JSON.stringify(u)!==JSON.stringify(r))throw new Error("Key exchange failed");return Promise.resolve()}async postprocessResponse(e){var t;if(e.headers){const i=e.headers.find((e=>"key_exchange"==e.type));if(i)return null===(t=this.cryptoSession)||void 0===t?void 0:t.processExchangeResponseHeader(i)}}promisePossiblyEncryptedTransportRequest(e){const t={headers:e.envelopeHeaders,data:e.body};return this.encryptEnvelopedMessageIfNeeded(t),new xu(e.url.toString(),e.method,t,void 0,e.httpHeaders)}possiblyDecryptResponse(e){return this.cryptoSession&&(e=this.cryptoSession.decryptResponse(e)),e}encryptEnvelopedMessageIfNeeded(e){var t;const i=this.generateKeyExchangeHeaderIfNeeded();(null===(t=this.cryptoSession)||void 0===t?void 0:t.isReady())&&this.cryptoSession.encryptRequest(e),i&&e.headers.push(i)}generateKeyExchangeHeaderIfNeeded(){return this.encrypted&&!this.cryptoSession?(this.cryptoSession=new _u,this.cryptoSession.getExchangeRequestHeader()):null}}class xu{constructor(e,t,i,r,n){this.url=e,this.httpMethod=t,this.body=i,this.params=r,this.headers=n}}class Au{addEnvelopeHeader(e){this._envelopeHeaders.push(e)}get method(){return this._requestMethod}get url(){return this._url}get body(){return this._requestBody}get envelopeHeaders(){return this._envelopeHeaders}get httpHeaders(){return this._httpHeaders}constructor(e,t,i,r,n){if(!t||!i)throw new Error("Internal - Invalid arguments for constructing session message");this._requestMethod=e,this._url=t,this._requestBody=i,this._envelopeHeaders=r||[],this._httpHeaders=n}}class Eu extends Au{static from(e,t,i,r){return new Eu(e,t,i.data,i.headers,r)}}class Su extends Error{constructor(e){super(e),this.name="PaddingError",Object.setPrototypeOf(this,Su.prototype)}}class ku{constructor(e){this.urlBaseString=e+"/"+_c}convertHttpResponseToRawServiceResponse(e){const{status:t,statusText:i,body:r}=e;return this.rawFrom(t,i,r)}rawFrom(e,t,i){const{error_code:r,error_message:n,headers:a,data:o}=i;return{status:e,statusText:t,error_code:r,error_message:n,headers:a,data:this.buildAggregatedData(o)}}buildAggregatedData(e){switch(null==e?void 0:e.state){case Tc.Pending:Cc.forEach((t=>{const[[r,n]]=Object.entries(t),a=((e,t,i)=>{if(!e||"object"!=typeof e)return i;const r=Array.isArray(t)?t:t.split(".");let n=e;for(let e=0;e<r.length;e++)if(n=n[r[e]],void 0===n)return i;return n})(e,r);if(a){const t={};n.forEach((e=>{e in a&&(t[e]=a[e])})),e=i(i({},e),t)}}));break;case Tc.Rejected:e.type=Rc.Rejection}return e}async sendRequest(e,t,r,n){if(!(this.urlBaseString.toString().length>_c.length&&e))throw new Error("bad input");const a=new URL(this.urlBaseString);a.pathname+=e,vc.debug(`Got Full URL: ${a.toString()}`),Object.keys(t).map((e=>a.searchParams.append(e,t[e]))),vc.debug(`Request body: ${r}`);let o=new xu(a.toString(),"POST",r,a.searchParams,{"Content-type":"application/json;charset=UTF-8"});try{n.encrypted&&(o=await n.exchangeKeyAndEncryptRequest(this.urlBaseString,n,o.httpMethod,new URL(o.url),o.body,o.headers));const e=await fetch(o.url.toString(),{body:JSON.stringify(o.body),method:"POST",headers:o.headers,credentials:"include"});let t;const r=await e.json();if(n.encrypted){const e=r;n.postprocessResponse(e),t=n.possiblyDecryptResponse(e)}else t=r;return this.convertHttpResponseToRawServiceResponse(i(i({},e),{},{body:t}))}catch(e){throw new Ic("Error occurred while retrieving response from server",pc.NetworkError)}}}!function(e){e.Active="Active",e.Success="Journey Ended with Success",e.Rejected="Journey Ended with Rejection",e.Aborted="Journey aborted by client"}(bu||(bu={})),function(e){e.ClientSdk="Client SDK Journey",e.SSO="SSO Journey"}(vu||(vu={}));class Mu extends wu{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;super(r,n),this.journeyType=e,this.sdkData=t,this.additionalParams=i,this.encrypted=r,this.cryptoSession=n,this.state=bu.Active}getQueryParams(){let e={};return this.deviceId&&(e.did=this.deviceId),this.sessionId&&(e.sid=this.sessionId),e}getInternalHeaders(){const e=[];return this.userId&&e.push({type:"uid",uid:this.userId}),e}toJson(){var e;return{journeyType:this.journeyType,challenge:this.challenge,assertionId:this.assertionId,userId:this.userId,sessionId:this.sessionId,deviceId:this.deviceId,actionType:this.actionType,additionalParams:this.additionalParams,sdkData:this.sdkData,encrypted:this.encrypted,cryptoSession:null===(e=this.cryptoSession)||void 0===e?void 0:e.toJson()}}getInvocationData(){const e=Mc.data.dummy;return this.additionalParams&&Object.keys(this.additionalParams).length>0&&(e.params=this.additionalParams),this.sdkData&&Object.keys(this.sdkData).length>0&&(e.sdk_data=this.sdkData),e}complete(){if(this.isCompletedState())throw Error(`Cannot complete an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=bu.Success,this.cryptoSession=void 0}reject(){if(this.isCompletedState())throw Error(`Cannot reject an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=bu.Rejected,this.cryptoSession=void 0}abort(){if(this.isCompletedState())throw Error(`Cannot abort an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=bu.Aborted,this.cryptoSession=void 0}active(){if(this.isCompletedState())throw Error(`Cannot run a completed journey. Current state: ${this.state.toString()}`);this.state=bu.Active}isCompletedState(){return this.state===bu.Success||this.state===bu.Rejected||this.state===bu.Aborted}}class Cu extends Mu{constructor(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;if(super(vu.ClientSdk,t,i,r,n),this.journeyId=e,!this.journeyId)throw Error("Journey ID must be provided")}getInvocationData(){const e=super.getInvocationData();return e.policy_request_id=this.journeyId,e}getInvocationPath(){return xc.path}toJson(){return i(i({},super.toJson()),{},{journeyId:this.journeyId})}}class Iu extends Mu{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;super(vu.SSO,t,{},i,r),this.interactionId=e}getInvocationPath(){return wc.path}getQueryParams(){return i(i({},super.getQueryParams()),{},{ssoInteractionId:this.interactionId})}toJson(){return i(i({},super.toJson()),{},{interactionId:this.interactionId})}}const Du=["assertion_id","type","escapes","form_id","vendor_name"],Tu=[...Du,"challenge","assertion_error_code","assertion_error_message","assertions_complete","state","control_flow","rejection_data"],Ru={[gc.Cancel]:gc.Cancel,[gc.Fail]:gc.Fail},zu=["data"],Bu=["json_data"];class Pu{constructor(e){var t,i,r;this.rawResponse=e;const[{escapes:n,form_id:a}]=null!==(i=null===(t=e.data)||void 0===t?void 0:t.control_flow)&&void 0!==i?i:[{}];this.escapes=n,this.data=null!==(r=e.data)&&void 0!==r?r:{},this.formId=a}generateServiceResponse(e,t){var r,n;const a=this.getType(),o=this.getJourneyStepId(e);return i(i({type:a,journeyStepId:o,errorData:this.getErrorData(),data:this.getData(o),clientResponseOptions:this.getClientResponseActions()},t),{},{redirectUrl:null===(n=null===(r=this.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.url})}getActionType(){return this.data.type}getChallenge(){return this.data.challenge}getAssertionId(){return this.data.assertion_id}getJourneyState(){var e,t,i;let r;if((null===(e=this.rawResponse)||void 0===e?void 0:e.status)>=400)r=Dc.TextRejection;else switch(this.data.state){case Tc.Completed:r=Dc.JourneyEnd;break;case Tc.Rejected:r=Dc.JsonRejection;break;case Tc.Pending:r=(null===(i=null===(t=this.rawResponse)||void 0===t?void 0:t.data)||void 0===i?void 0:i.control_flow)?Dc.NextAction:Dc.UpdateAction;break;default:r=Dc.JsonRejection}return r}getType(){let e=mc.JourneyRejection;return this.data.assertions_complete?e=mc.JourneySuccess:this.data.state===Tc.Pending?e=mc.ClientInputRequired:16==this.data.assertion_error_code?e=mc.ClientInputUpdateRequired:4001===this.rawResponse.error_code&&(e=mc.JourneyRejection),e}getData(e){var t,r;const[n]=null!==(t=this.data.control_flow)&&void 0!==t?t:[{}],o=null!==(r=this.data)&&void 0!==r?r:{},{data:s}=o,c=a(o,zu),d=null!=s?s:{},{json_data:u}=d,l=a(d,Bu);return this.removeFields(n,Du),this.data=i(i(i(i(i({},c),n),u&&{json_data:u}),Object.keys(l).length&&{data:l}),this.rejectionReason&&{rejectionReason:this.rejectionReason}),this.removeFields(this.data,Tu),this.manipulateDataForJourneyStep(e),this.data}manipulateDataForJourneyStep(e){e===bc.InvokeIDP&&(this.data.authorization_url=this.generateAuthorizationUrlFromResponseData(this.data),delete this.data.authorization_parameters,delete this.data.authorization_endpoint)}generateAuthorizationUrlFromResponseData(e){const{authorization_endpoint:t,authorization_parameters:i}=e,r=Object.keys(i).map((e=>{const t=i[e]instanceof Object?JSON.stringify(i[e]):i[e];return`${e}=${encodeURIComponent(t)}`})).join("&"),n=new URL(t);return n.search=r,n}getErrorData(){if(this.data.assertion_error_code&&0!=this.data.assertion_error_code){const e=Ic.convertFromAssertionError(this.data.assertion_error_code);return new Ic(this.data.assertion_error_message,e)}}removeFields(e,t){for(const i of t)i in e&&delete e[i]}getJourneyStepId(e){const t=this.getType();if(t===mc.JourneyRejection)return this.rejectionReason=this.rawResponse.error_message,bc.Rejection;if(t===mc.JourneySuccess)return bc.Success;switch(e){case Rc.Form:case Rc.LoginForm:return this.formIdToStepId()||this.formId||e;case Rc.Information:return bc.Information;case Rc.DebugBreak:return bc.DebugBreak;case Rc.WaitForTicket:return bc.WaitForAnotherDevice;case Rc.Rejection:return bc.Rejection;case Rc.DrsTriggerAction:return bc.DrsTriggerAction;case Rc.IdentityVerification:return bc.IdentityVerification;case Rc.WebAuthnRegistration:return bc.WebAuthnRegistration;default:return e||""}}formIdToStepId(){return this.formId}getClientResponseActions(){var e;const t={[gc.ClientInput]:{type:gc.ClientInput,id:"client_input",label:"Client Input"}};return null===(e=this.escapes)||void 0===e||e.forEach((e=>{let{id:r,display_name:n,schema:a}=e;var o;const s=null!==(o=Ru[r])&&void 0!==o?o:gc.Custom;t[r]=i({type:s,id:r,label:n||r},a&&{schema:a})})),t}}class Fu extends Error{constructor(){super("Missing response data")}}class Ou extends Error{constructor(e,t){super("Action of type "+e+" cannot have response from type "+t)}}const Nu=new z("ido","sdkDataDB",1);async function Lu(e){try{return await Nu.get("sdkDataStore",e)}catch(e){console.error("Error retrieving SDK data:",e)}}const ju=new class{constructor(){this.correlationId="",this.getIdentifier=(e,t)=>{var i;const r=null===(i=e.headers.find((e=>t in e)))||void 0===i?void 0:i[t];return vc.debug(`Getting identifier ${t} from response, value: ${r}`),r}}async init(e,t){if(!e||!t)throw new Ic("Invalid initialization configuration",pc.InvalidInitOptions);const{serverPath:i,logLevel:r,pollingTimeout:n,resource:a,locale:o}=t;if(!i)throw new Ic("Invalid initialization options",pc.InvalidInitOptions);vc.setLogLevel(null!=r?r:fc.Info),this.pollingTimeout=null!=n?n:3,this.clientId=e,a&&(this.resource=a),o&&(this.locale=o),this.serverPath=i,this.api=new ku(this.serverPath),vc.info("IdoSdk initialized successfully")}async startJourney(e,t){var i,r;const{additionalParams:n,correlationId:a}=null!=t?t:{};this.correlationId=null!=a?a:crypto.randomUUID();const o=await Lu("sdk_data"),s=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,c=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,d=new Cu(e,o,n,s,c);return this.invokeJourney(d)}async startSsoJourney(e,t){var i,r;this.correlationId=e;const n=await Lu("sdk_data"),a=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,o=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,s=new Iu(e,n,a,o);return this.invokeJourney(s)}async submitClientResponse(e,t){var i,r,n,a,o,s,c;if(!this.journey)throw new Ic("Error occurred while trying to submit client response since no journey is active",pc.NoActiveJourney);const d={assertion_id:null===(i=this.journey)||void 0===i?void 0:i.assertionId,action:null===(r=this.journey)||void 0===r?void 0:r.actionType,assert:"action",input:t};if((null==t?void 0:t.fch)||(d.fch=null===(n=this.journey)||void 0===n?void 0:n.challenge),e===gc.ClientInput)switch(null===(a=this.lastServiceResponse)||void 0===a?void 0:a.journeyStepId){case bc.CryptoBindingRegistration:case bc.RegisterDeviceAction:case bc.CryptoBindingValidation:case bc.ValidateDeviceAction:await this.handleCryptoBindingStep(d);break;case bc.WaitForAnotherDevice:return await this.handleWaitForAnotherDeviceAction(d);case bc.DrsTriggerAction:case bc.IdentityVerification:case bc.WebAuthnRegistration:case bc.SmsOTPAuthentication:case bc.EmailOTPAuthentication:case bc.EmailValidation:case bc.SmsValidation:case bc.WebAuthnTransactionSigning:case bc.SelectOrganization:this.handleDataAction(d,t);break;case bc.TotpRegistration:this.handleDataAction(d,{});break;case bc.InvokeIDP:case bc.MobileApproveAuthentication:this.handleDataAction(d,t)}else if(e===gc.Resend)switch(null===(o=this.lastServiceResponse)||void 0===o?void 0:o.journeyStepId){case bc.SmsOTPAuthentication:case bc.EmailOTPAuthentication:case bc.EmailValidation:case bc.SmsValidation:case bc.MobileApproveAuthentication:this.handleResendAssertion(d);break;default:throw new Ou(null===(s=this.lastServiceResponse)||void 0===s?void 0:s.journeyStepId,e)}else gc.Cancel,this.handleClientResponseOption(e,t,d);try{let e={headers:await this.getInternalHeaders(),data:d};["action","resend","data"].includes(d.assert)&&(e=await this.createAssertRequestPayloadWithDeviceValidationHeader(e,d.fch,d.assertion_id));const t=await(null===(c=this.api)||void 0===c?void 0:c.sendRequest(Ac.path,this.getQueryParams(),e,this.journey));if(!t)throw new Fu;return await this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}async createInvokeJourneyRequestWithDeviceValidationHeader(e){var t;const i=lc.crypto.createCryptoBinding("sign"),{keyIdentifier:r}=null!==(t=await i.getPublicData())&&void 0!==t?t:{},n={type:"device_validation",device_validation:{device_key_id:r,timestamp:hc()}};e.headers.push(n);const a=await this.createCryptoBindingFieldWithSignature(JSON.stringify(e));return n.device_validation.signature=a.signature,e}async createAssertRequestPayloadWithDeviceValidationHeader(e,t,i){var r;const n=lc.crypto.createCryptoBinding("sign"),{keyIdentifier:a}=null!==(r=await n.getPublicData())&&void 0!==r?r:{},o={type:"device_validation",device_validation:{device_key_id:a}};e.headers.push(o);const s=t+i+JSON.stringify(e),c=await this.createCryptoBindingFieldWithSignature(s);return o.device_validation.signature=c.signature,e}handleClientResponseOption(e,t,i){delete i.input,i.assert="escape",i.data={escape_id:e,escape_params:t}}handleResendAssertion(e){delete e.input,delete e.data,e.assert="resend"}async handleCryptoBindingStep(e){const t=lc.crypto.createCryptoBinding("sign"),i=await this.handleCryptoBindingFieldValue(t);this.handleCryptoBindingActionPayload(e,i)}handleCryptoBindingActionPayload(e,t){const r=yc[this.lastServiceResponse.journeyStepId];e[r]=i(i({},e[r]),{},{"ts:idosdk:device":t})}handleDataAction(e,t){delete e.input,e.assert="data",e.data=t}async handleCryptoBindingFieldValue(e){var t,i,r,n,a,o,s,c,d;switch(null===(t=this.lastServiceResponse)||void 0===t?void 0:t.journeyStepId){case bc.CryptoBindingRegistration:case bc.RegisterDeviceAction:const{keyIdentifier:t,publicKey:u}=null!==(i=await e.getPublicData())&&void 0!==i?i:{};return{platform_device_id:t,platform_device_key:u};case bc.CryptoBindingValidation:case bc.ValidateDeviceAction:const{keyIdentifier:l}=null!==(r=await e.getPublicData())&&void 0!==r?r:{};return{platform_device_id:l,signature:await e.sign(null!==(s=null===(o=null===(a=null===(n=this.lastServiceResponse)||void 0===n?void 0:n.data)||void 0===a?void 0:a.app_data)||void 0===o?void 0:o.challenge)&&void 0!==s?s:null===(d=null===(c=this.lastServiceResponse)||void 0===c?void 0:c.data)||void 0===d?void 0:d.device_challenge)}}}async handleWaitForAnotherDeviceAction(e){var t,i,r,n;const a=await this.getInternalHeaders(),o=await(null===(t=this.api)||void 0===t?void 0:t.sendRequest(Ec.path,this.getQueryParams(),{headers:a,data:{polling_timeout:this.pollingTimeout,ticket_id:null===(i=this.lastServiceResponse)||void 0===i?void 0:i.data.raw_ticket_id,type:"ticket"}},this.journey));if(!0===(null===(r=null==o?void 0:o.data)||void 0===r?void 0:r.change_detected)){const t=await(null===(n=this.api)||void 0===n?void 0:n.sendRequest(Ac.path,this.getQueryParams(),{headers:a,data:e},this.journey));if(!t)throw new Fu;return this.handleServiceResponse(t)}return this.lastServiceResponse}async handleServiceResponse(e){var t,r,n,a,o,s;const c=new Pu(e),d=c.getJourneyState();this.handleJourneyState(d),(null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.sdk_data)&&(await async function(e,t){try{const r=i(i({},await Lu(e)),t);await Nu.put("sdkDataStore",e,r)}catch(e){console.error("Error saving SDK data:",e)}}("sdk_data",e.data.data.sdk_data),delete e.data.data.sdk_data),this.journey.assertionId=null!==(n=c.getAssertionId())&&void 0!==n?n:this.journey.assertionId,this.journey.actionType=null!==(a=c.getActionType())&&void 0!==a?a:this.journey.actionType,this.journey.challenge=null!==(o=c.getChallenge())&&void 0!==o?o:this.journey.challenge;const{clientResponseOptions:u,data:l}=null!==(s=this.lastServiceResponse)&&void 0!==s?s:{},h=d===Dc.UpdateAction?{clientResponseOptions:u,data:l}:{};let f=c.generateServiceResponse(this.journey.actionType,h);switch(this.lastServiceResponse=f,f.journeyStepId){case bc.ValidateDeviceAction:case bc.RegisterDeviceAction:if(d!==Dc.NextAction)throw new Error(`Journey rejected on ${f.journeyStepId} device action, with ${f.errorData}`);f=await this.submitClientResponse(gc.ClientInput,f.data);break;default:this.handleJourneySuccess(f)}return f}handleJourneySuccess(e){var t,i;null===(i=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===i||i.url,e.type===mc.JourneySuccess&&(e.token=e.data.token,delete e.data.token)}serializeState(){if(!this.lastServiceResponse||!this.journey)throw new Ic("Error occurred while trying to serialize state since no journey is active",pc.NoActiveJourney);return btoa(encodeURIComponent(JSON.stringify({journey:this.journey.toJson(),serviceResponse:this.lastServiceResponse})))}restoreFromSerializedState(e){var t;const{journey:i,serviceResponse:r}=JSON.parse(decodeURIComponent(null!==(t=atob(e))&&void 0!==t?t:{}));if(!i||!r)throw new Ic("Invalid serialized state",pc.InvalidState);if(this.lastServiceResponse=r,this.journey=function(e){let t,i;switch(e.cryptoSession&&(i=_u.fromJson(e.cryptoSession)),e.journeyType){case vu.ClientSdk:t=new Cu(e.journeyId,e.sdkData,e.additionalParams,e.encrypted,i);break;case vu.SSO:t=new Iu(e.interactionId,e.sdkData,e.encrypted,i);break;default:throw Error(`error when trying to deserialize Journey Json - unknown journey type ${e.journeyType}`)}return t.challenge=e.challenge,t.assertionId=e.assertionId,t.userId=e.userId,t.sessionId=e.sessionId,t.deviceId=e.deviceId,t.actionType=e.actionType,t}(i),this.journey.encrypted&&!this.journey.isReady())throw new Ic("Failed to restore encryption context after redirection",pc.InvalidState);return this.correlationId=i.correlationId,r}async getInternalHeaders(){const e=[];this.journey&&e.push(...this.journey.getInternalHeaders()),this.correlationId&&e.push({type:"correlation_id",correlation_id:this.correlationId});const t=await this.getDeviceHeader();return t&&e.push(t),e}async getDeviceHeader(){var e,t;try{const i=lc.crypto.createCryptoBinding("sign"),{keyIdentifier:r,publicKey:n}=null!==(e=await i.getPublicData())&&void 0!==e?e:{};return r&&n?{type:"device",device:{device_key_id:r,device_public_key:n,device_type:"web",device_os:navigator.platform.toLowerCase(),device_os_version:(null===(t=navigator.userAgent.match(/(?:Version|Edge|Chrome|Firefox|Safari)\/(\d+\.\d+)/))||void 0===t?void 0:t[1])||"unknown",device_manufacturer:navigator.vendor||"unknown",device_model:navigator.platform||"unknown"}}:null}catch(e){return vc.error("Failed to create device header"),null}}getQueryParams(){var e,t;const r=i({aid:"default_application",clientId:this.clientId,locale:window.navigator.language||"en-US"},this.journey?this.journey.getQueryParams():{});return(null===(e=this.journey)||void 0===e?void 0:e.deviceId)&&(r.did=this.journey.deviceId),(null===(t=this.journey)||void 0===t?void 0:t.sessionId)&&(r.sid=this.journey.sessionId),this.resource&&(r.resource=this.resource),this.locale&&(r.locale=this.locale),r}async invokeJourney(e){var t,i,r;this.journey=e;const n=await this.getInternalHeaders();let a={data:e.getInvocationData(),headers:n};try{const e=await(null===(i=null===(t=null===window||void 0===window?void 0:window.tsPlatform)||void 0===t?void 0:t.drs)||void 0===i?void 0:i.getSessionToken());e&&a.headers.push(this.buildDrsSessionTokenSdkHeader(e))}catch(e){vc.warning(`Could not obtain DRS session token: ${e}`)}a=await this.createInvokeJourneyRequestWithDeviceValidationHeader(a);try{const t=await(null===(r=this.api)||void 0===r?void 0:r.sendRequest(e.getInvocationPath(),this.getQueryParams(),a,this.journey));if(!t)throw new Fu;return e.userId=this.getIdentifier(t,"uid"),e.sessionId=this.getIdentifier(t,"session_id"),e.deviceId=this.getIdentifier(t,"device_id"),e.active(),this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}buildDrsSessionTokenSdkHeader(e){return{type:"drs_session_token",drs_session_token:{token:e}}}async createCryptoBindingFieldWithSignature(e){var t;const i=lc.crypto.createCryptoBinding("sign"),{keyIdentifier:r}=null!==(t=await i.getPublicData())&&void 0!==t?t:{};return{platform_device_id:r,signature:await i.sign(e)}}handleJourneyState(e){switch(e){case Dc.TextRejection:case Dc.JsonRejection:this.rejectJourney();break;case Dc.JourneyEnd:this.completeJourney();break;case Dc.NextAction:case Dc.UpdateAction:break;default:throw Error(`Unhandled service response state: ${e}`)}}completeJourney(){var e;null===(e=this.journey)||void 0===e||e.complete()}rejectJourney(){var e;null===(e=this.journey)||void 0===e||e.reject()}async generateDebugPin(){var e;if(!this.journey)throw new Ic("Error occurred while trying to generate debug pin since no journey is active",pc.NoActiveJourney);const t=await this.getInternalHeaders(),i=await(null===(e=this.api)||void 0===e?void 0:e.sendRequest(Sc.path,this.getQueryParams(),{headers:t,data:{}},this.journey));if(!i)throw new Fu;return i.data.debug_pin}};lc.events.on(lc.events.MODULE_INITIALIZED,(async()=>{var e;const t=lc.moduleMetadata.getInitConfig();if(!(null===(e=null==t?void 0:t.ido)||void 0===e?void 0:e.serverPath))return;const{clientId:i,ido:r}=t;await ju.init(i,r)})),function(){var e,t;const i="undefined"!=typeof window&&"undefined"!=typeof document;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&(null===(t=null===(e=globalThis.process)||void 0===e?void 0:e.versions)||void 0===t?void 0:t.node)&&!i)throw new Error("\n🚫 @TransmitSecurity/web-sdk is a BROWSER-ONLY package.\n\n❌ Node.js environments are not supported.\n✅ Use this package in web browsers only.\n\nFor more information, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk#browser-only\n");i||console.warn("⚠️ @TransmitSecurity/web-sdk: Browser environment not detected. Some features may not work correctly.")}();const Uu={drs:Ar,idv:As};var qu=new class{constructor(){this.factories=Uu,Object.assign(this,Ar),Object.assign(this,As)}};return e.PACKAGE_VERSION="1.15.0",e.default=qu,e.drs=Ar,e.ido=ju,e.idv=As,e.initialize=m,e.webauthn=uc,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|