@web3jskit/walletkit 0.5.2 → 0.6.1
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/README.md +1 -4
- package/README.zh.md +1 -4
- package/dist/assets/fonts/manrope-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/manrope-latin.woff2 +0 -0
- package/dist/assets/fonts/manrope-vietnamese.woff2 +0 -0
- package/dist/base.css +65 -0
- package/dist/{btcConnector-CDgcyxQ3.mjs → btcConnector-B7ttVDQk.mjs} +16 -15
- package/dist/{btcConnector-D9c29Oxw.mjs → btcConnector-Cj8EN5ES.mjs} +4 -3
- package/dist/btcConnector-Dm9kVuSb.js +1 -0
- package/dist/btcConnector-DofJ97Y5.js +1 -0
- package/dist/components/ConnectModal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +3 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/WalletItem/index.d.ts +3 -0
- package/dist/components/WalletItem/index.d.ts.map +1 -1
- package/dist/components/WalletKitProvider/ChainProvider.d.ts +1 -2
- package/dist/components/WalletKitProvider/ChainProvider.d.ts.map +1 -1
- package/dist/components/WalletKitProvider/connectorInitialization.d.ts +12 -0
- package/dist/components/WalletKitProvider/connectorInitialization.d.ts.map +1 -0
- package/dist/components/WalletKitProvider/index.d.ts +1 -1
- package/dist/components/WalletKitProvider/index.d.ts.map +1 -1
- package/dist/config/iconDatabase.d.ts +0 -1
- package/dist/config/iconDatabase.d.ts.map +1 -1
- package/dist/config/walletConfig.d.ts +0 -1
- package/dist/config/walletConfig.d.ts.map +1 -1
- package/dist/core/connectors/Bitget_Wallet/tronConnector.d.ts +13 -0
- package/dist/core/connectors/Bitget_Wallet/tronConnector.d.ts.map +1 -0
- package/dist/core/connectors/_sol/discoverWallets.d.ts +4 -0
- package/dist/core/connectors/_sol/discoverWallets.d.ts.map +1 -0
- package/dist/core/connectors/_sol/discoveredSolConnector.d.ts +12 -0
- package/dist/core/connectors/_sol/discoveredSolConnector.d.ts.map +1 -0
- package/dist/core/connectors/_sol/wrapStandardSolWallet.d.ts +15 -0
- package/dist/core/connectors/_sol/wrapStandardSolWallet.d.ts.map +1 -0
- package/dist/core/connectors/_tron/discoverWallets.d.ts +6 -0
- package/dist/core/connectors/_tron/discoverWallets.d.ts.map +1 -0
- package/dist/core/connectors/_tron/discoveredTronConnector.d.ts +13 -0
- package/dist/core/connectors/_tron/discoveredTronConnector.d.ts.map +1 -0
- package/dist/core/connectors/_tron/tronConnector.d.ts +1 -1
- package/dist/core/connectors/_tron/tronConnector.d.ts.map +1 -1
- package/dist/core/connectors/_tron/wrapTip6963TronProvider.d.ts +2 -0
- package/dist/core/connectors/_tron/wrapTip6963TronProvider.d.ts.map +1 -0
- package/dist/core/connectors/connectorLoader.d.ts +3 -0
- package/dist/core/connectors/connectorLoader.d.ts.map +1 -0
- package/dist/core/connectors/createConnectors.d.ts +5 -1
- package/dist/core/connectors/createConnectors.d.ts.map +1 -1
- package/dist/core/connectors/publicConnectorApi.d.ts +7 -0
- package/dist/core/connectors/publicConnectorApi.d.ts.map +1 -0
- package/dist/core/utils/sortConnectModalWallets.d.ts +14 -0
- package/dist/core/utils/sortConnectModalWallets.d.ts.map +1 -0
- package/dist/core/utils/util.d.ts +7 -0
- package/dist/core/utils/util.d.ts.map +1 -1
- package/dist/core/utils/walletName.d.ts +5 -0
- package/dist/core/utils/walletName.d.ts.map +1 -0
- package/dist/createConnectors-B-vlchFu.mjs +726 -0
- package/dist/createConnectors-BpxUcDLh.js +71 -0
- package/dist/createConnectors-CFrXz3Tc.js +4 -0
- package/dist/createConnectors-CxmtbsYq.mjs +1401 -0
- package/dist/{deepLinkConnector-Cy9w-E2m.mjs → deepLinkConnector-8odSmMjV.mjs} +6 -5
- package/dist/{deepLinkConnector-Cp3wn9oq.mjs → deepLinkConnector-B6CyAaUr.mjs} +1 -1
- package/dist/{deepLinkConnector-BV1AtJUd.mjs → deepLinkConnector-B8pApc03.mjs} +1 -1
- package/dist/deepLinkConnector-BMZDoIAp.js +1 -0
- package/dist/deepLinkConnector-BPGRAVl-.js +1 -0
- package/dist/deepLinkConnector-C2aCjSbe.js +1 -0
- package/dist/{deepLinkConnector-D2bdmDbP.mjs → deepLinkConnector-Cdjr25xm.mjs} +1 -1
- package/dist/deepLinkConnector-Cyu_Edwl.js +1 -0
- package/dist/{deepLinkConnector-Cl2lfNcv.mjs → deepLinkConnector-D87huDAb.mjs} +1 -1
- package/dist/{deepLinkConnector-De3WEuvS.mjs → deepLinkConnector-DLIigRSC.mjs} +1 -1
- package/dist/deepLinkConnector-pwT-5sN9.js +1 -0
- package/dist/deepLinkConnector-tiMGIje-.js +1 -0
- package/dist/{deepLinkConnector-ClxWpKnx.mjs → deepLinkConnector-u50UYivS.mjs} +1 -1
- package/dist/deepLinkConnector-yVckiqOS.js +1 -0
- package/dist/hooks/useWalletKit.d.ts +0 -2
- package/dist/hooks/useWalletKit.d.ts.map +1 -1
- package/dist/index-BDdQWaKC.mjs +168 -0
- package/dist/index-BjW6H6Wf.js +44 -0
- package/dist/index-C7kS8da-.mjs +6179 -0
- package/dist/index-Czazgjox.js +1 -0
- package/dist/index-D5CDP-Ja.mjs +79 -0
- package/dist/index-DBdIuPfj.js +3 -0
- package/dist/index-DcNXEbdu.mjs +94 -0
- package/dist/index-Dqp1KqTh.js +1 -0
- package/dist/index-SWj1NcId.js +1 -0
- package/dist/index-yDk8A0La.mjs +152 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +19 -20
- package/dist/index.js +1 -1
- package/dist/index.umd.js +12818 -55582
- package/dist/index2.css +1 -0
- package/dist/index3.css +1 -0
- package/dist/silentConnect-BADzd6pW.js +1 -0
- package/dist/silentConnect-C3uKdKfg.mjs +11 -0
- package/dist/stores/helperStore.d.ts +0 -2
- package/dist/stores/helperStore.d.ts.map +1 -1
- package/dist/style.css +90 -87
- package/dist/tronConnector-CEvkSzzX.js +1 -0
- package/dist/tronConnector-CMOd_Cqc.js +1 -0
- package/dist/tronConnector-C_mkvgQ7.mjs +14 -0
- package/dist/tronConnector-Dwgaegsx.mjs +21 -0
- package/dist/walletName-BwayBopz.mjs +8 -0
- package/dist/walletName-mwS8Jhxj.js +1 -0
- package/package.json +11 -4
- package/dist/btcConnector-Ca_Ne7hH.js +0 -1
- package/dist/btcConnector-PnjTRzcQ.js +0 -1
- package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts +0 -13
- package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts.map +0 -1
- package/dist/core/connectors/GelWallet/evmConnector.d.ts +0 -27
- package/dist/core/connectors/GelWallet/evmConnector.d.ts.map +0 -1
- package/dist/core/connectors/GelWallet/solConnector.d.ts +0 -15
- package/dist/core/connectors/GelWallet/solConnector.d.ts.map +0 -1
- package/dist/core/connectors/GelWallet/tronConnector.d.ts +0 -8
- package/dist/core/connectors/GelWallet/tronConnector.d.ts.map +0 -1
- package/dist/core/connectors/OKX_Wallet/solConnector.d.ts +0 -12
- package/dist/core/connectors/OKX_Wallet/solConnector.d.ts.map +0 -1
- package/dist/core/connectors/Phantom/solConnector.d.ts +0 -12
- package/dist/core/connectors/Phantom/solConnector.d.ts.map +0 -1
- package/dist/core/connectors/TronLink/tronConnector.d.ts +0 -13
- package/dist/core/connectors/TronLink/tronConnector.d.ts.map +0 -1
- package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts +0 -26
- package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts.map +0 -1
- package/dist/dapp.es-BPGP9PnL.mjs +0 -15917
- package/dist/dapp.es-sLnregcu.js +0 -103
- package/dist/deepLinkConnector-2xq1YA07.js +0 -1
- package/dist/deepLinkConnector-B_fjG32i.js +0 -1
- package/dist/deepLinkConnector-BjV3gwrJ.js +0 -1
- package/dist/deepLinkConnector-BrFUCtcT.js +0 -1
- package/dist/deepLinkConnector-COLT9UtB.js +0 -1
- package/dist/deepLinkConnector-DvpJaC8p.js +0 -1
- package/dist/deepLinkConnector-Dypz-oTG.js +0 -1
- package/dist/evmConnector-CDZHCMDp.mjs +0 -163
- package/dist/evmConnector-CsLHlVqx.js +0 -1
- package/dist/gelWalletConnector-D-BogX91.mjs +0 -76
- package/dist/gelWalletConnector-DmGJoazT.js +0 -1
- package/dist/index-9qmfDVzH-C-zsxX98.mjs +0 -25638
- package/dist/index-9qmfDVzH-C6VVZD9P.js +0 -28
- package/dist/index-B3LF1VeP-58KzZv6u.js +0 -1
- package/dist/index-B3LF1VeP-IR-fSZI0.mjs +0 -120
- package/dist/index-BZdLbTeL.js +0 -138
- package/dist/index-CCHY2zSF-OxZZmzOg.mjs +0 -45
- package/dist/index-CCHY2zSF-ocS_tvXl.js +0 -1
- package/dist/index-CqeMS3Gf-C4g86ca5.js +0 -1
- package/dist/index-CqeMS3Gf-DXS8RsUh.mjs +0 -67
- package/dist/index-DGMGsMkJ-BTPPfxmS.js +0 -1
- package/dist/index-DGMGsMkJ-CHecRdpD.mjs +0 -27
- package/dist/index-Dm84KVCU.mjs +0 -9267
- package/dist/index-yUF_S07V-Cm9-qVkc.js +0 -1
- package/dist/index-yUF_S07V-DHeRsyE0.mjs +0 -48
- package/dist/solConnector-2sU1qHsq.mjs +0 -11
- package/dist/solConnector-BEPYycHF.js +0 -1
- package/dist/solConnector-CVS5qwwy.js +0 -1
- package/dist/solConnector-CWIPltdg.mjs +0 -11
- package/dist/solConnector-CXejjI9x.mjs +0 -41
- package/dist/solConnector-CnQAb35I.mjs +0 -11
- package/dist/solConnector-DU5bMwKt.js +0 -1
- package/dist/solConnector-xJ3YPYMj.js +0 -1
- package/dist/tronConnector-CUnp7Df4.js +0 -1
- package/dist/tronConnector-CaEipTWV.mjs +0 -21
- package/dist/tronConnector-CpIX5IxL.mjs +0 -13
- package/dist/tronConnector-DMLqqMae.mjs +0 -35
- package/dist/tronConnector-DesDymhW.js +0 -1
- package/dist/tronConnector-tU0iwxHV.js +0 -1
package/dist/dapp.es-sLnregcu.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";var ve=Object.defineProperty,be=(t,e,r)=>e in t?ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,st=(t,e,r)=>be(t,typeof e!="symbol"?e+"":e,r);exports.ChainType=void 0;(function(t){t.EVM="Ethereum",t.PUT="PUT",t.SOL="Solana",t.Tron="Tron",t.TON="TON",t.TON_TEST="TONTESTNET",t.APTOS="Aptos",t.BTC="Bitcoin",t.ENDLESS="Endless"})(exports.ChainType||(exports.ChainType={}));var PutNetType;(function(t){t.MAIN="mainnet",t.TEST="testnet"})(PutNetType||(PutNetType={}));var SolNetType;(function(t){t.MAIN="mainnet",t.TEST="testnet",t.DEV="devnet"})(SolNetType||(SolNetType={}));var DID_EVENT_NAME;(function(t){t.LOADED="loaded",t.OPEN="open",t.CLOSE="close",t.ACCOUNTS_CHANGED="accountsChanged",t.CHAIN_CHANGED="chainChanged",t.DISCONNECT="disconnect",t.TRON_SET_NODE="setNode",t.TRON_SET_ACCOUNT="setAccount",t.TELEGRAM_POST_EVENT="telegramPostEvent",t.LOGOUT="logout"})(DID_EVENT_NAME||(DID_EVENT_NAME={}));var INNER_EVENT_NAME;(function(t){t.TELEGRAM_RECEIVE_EVENT="inner_tg_receive_event",t.WALLET_CONFIG="inner_wallet_config",t.WALLET_LOGOUT="inner_wallet_logout"})(INNER_EVENT_NAME||(INNER_EVENT_NAME={}));let getRandomValues$1;const rnds8$1=new Uint8Array(16);function rng$1(){if(!getRandomValues$1&&(getRandomValues$1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues$1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues$1(rnds8$1)}const byteToHex$1=[];for(let t=0;t<256;++t)byteToHex$1.push((t+256).toString(16).slice(1));function unsafeStringify(t,e=0){return byteToHex$1[t[e+0]]+byteToHex$1[t[e+1]]+byteToHex$1[t[e+2]]+byteToHex$1[t[e+3]]+"-"+byteToHex$1[t[e+4]]+byteToHex$1[t[e+5]]+"-"+byteToHex$1[t[e+6]]+byteToHex$1[t[e+7]]+"-"+byteToHex$1[t[e+8]]+byteToHex$1[t[e+9]]+"-"+byteToHex$1[t[e+10]]+byteToHex$1[t[e+11]]+byteToHex$1[t[e+12]]+byteToHex$1[t[e+13]]+byteToHex$1[t[e+14]]+byteToHex$1[t[e+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4$1(t,e,r){if(native.randomUUID&&!t)return native.randomUUID();t=t||{};const n=t.random||(t.rng||rng$1)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,unsafeStringify(n)}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function getAugmentedNamespace(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var buffer={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$1=0,len=code.length;i$1<len;++i$1)lookup[i$1]=code[i$1],revLookup[code.charCodeAt(i$1)]=i$1;revLookup[45]=62;revLookup[95]=63;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function byteLength(t){var e=getLens(t),r=e[0],n=e[1];return(r+n)*3/4-n}function _byteLength(t,e,r){return(e+r)*3/4-r}function toByteArray(t){var e,r=getLens(t),n=r[0],s=r[1],a=new Arr(_byteLength(t,n,s)),o=0,l=s>0?n-4:n,h;for(h=0;h<l;h+=4)e=revLookup[t.charCodeAt(h)]<<18|revLookup[t.charCodeAt(h+1)]<<12|revLookup[t.charCodeAt(h+2)]<<6|revLookup[t.charCodeAt(h+3)],a[o++]=e>>16&255,a[o++]=e>>8&255,a[o++]=e&255;return s===2&&(e=revLookup[t.charCodeAt(h)]<<2|revLookup[t.charCodeAt(h+1)]>>4,a[o++]=e&255),s===1&&(e=revLookup[t.charCodeAt(h)]<<10|revLookup[t.charCodeAt(h+1)]<<4|revLookup[t.charCodeAt(h+2)]>>2,a[o++]=e>>8&255,a[o++]=e&255),a}function tripletToBase64(t){return lookup[t>>18&63]+lookup[t>>12&63]+lookup[t>>6&63]+lookup[t&63]}function encodeChunk(t,e,r){for(var n,s=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),s.push(tripletToBase64(n));return s.join("")}function fromByteArray(t){for(var e,r=t.length,n=r%3,s=[],a=16383,o=0,l=r-n;o<l;o+=a)s.push(encodeChunk(t,o,o+a>l?l:o+a));return n===1?(e=t[r-1],s.push(lookup[e>>2]+lookup[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],s.push(lookup[e>>10]+lookup[e>>4&63]+lookup[e<<2&63]+"=")),s.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ieee754.read=function(t,e,r,n,s){var a,o,l=s*8-n-1,h=(1<<l)-1,c=h>>1,g=-7,A=r?s-1:0,b=r?-1:1,D=t[e+A];for(A+=b,a=D&(1<<-g)-1,D>>=-g,g+=l;g>0;a=a*256+t[e+A],A+=b,g-=8);for(o=a&(1<<-g)-1,a>>=-g,g+=n;g>0;o=o*256+t[e+A],A+=b,g-=8);if(a===0)a=1-c;else{if(a===h)return o?NaN:(D?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(D?-1:1)*o*Math.pow(2,a-n)};ieee754.write=function(t,e,r,n,s,a){var o,l,h,c=a*8-s-1,g=(1<<c)-1,A=g>>1,b=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,D=n?0:a-1,T=n?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,o=g):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),o+A>=1?e+=b/h:e+=b*Math.pow(2,1-A),e*h>=2&&(o++,h/=2),o+A>=g?(l=0,o=g):o+A>=1?(l=(e*h-1)*Math.pow(2,s),o=o+A):(l=e*Math.pow(2,A-1)*Math.pow(2,s),o=0));s>=8;t[r+D]=l&255,D+=T,l/=256,s-=8);for(o=o<<s|l,c+=s;c>0;t[r+D]=o&255,D+=T,o/=256,c-=8);t[r+D-T]|=S*128};/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(t){const e=base64Js,r=ieee754,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s,l.TYPED_ARRAY_SUPPORT=a(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const y=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(y,P),y.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function o(y){if(y>s)throw new RangeError('The value "'+y+'" is invalid for option "size"');const P=new Uint8Array(y);return Object.setPrototypeOf(P,l.prototype),P}function l(y,P,k){if(typeof y=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return A(y)}return h(y,P,k)}l.poolSize=8192;function h(y,P,k){if(typeof y=="string")return b(y,P);if(ArrayBuffer.isView(y))return T(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(ot(y,ArrayBuffer)||y&&ot(y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ot(y,SharedArrayBuffer)||y&&ot(y.buffer,SharedArrayBuffer)))return S(y,P,k);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=y.valueOf&&y.valueOf();if(N!=null&&N!==y)return l.from(N,P,k);const z=L(y);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return l.from(y[Symbol.toPrimitive]("string"),P,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}l.from=function(y,P,k){return h(y,P,k)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function c(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function g(y,P,k){return c(y),y<=0?o(y):P!==void 0?typeof k=="string"?o(y).fill(P,k):o(y).fill(P):o(y)}l.alloc=function(y,P,k){return g(y,P,k)};function A(y){return c(y),o(y<0?0:E(y)|0)}l.allocUnsafe=function(y){return A(y)},l.allocUnsafeSlow=function(y){return A(y)};function b(y,P){if((typeof P!="string"||P==="")&&(P="utf8"),!l.isEncoding(P))throw new TypeError("Unknown encoding: "+P);const k=w(y,P)|0;let N=o(k);const z=N.write(y,P);return z!==k&&(N=N.slice(0,z)),N}function D(y){const P=y.length<0?0:E(y.length)|0,k=o(P);for(let N=0;N<P;N+=1)k[N]=y[N]&255;return k}function T(y){if(ot(y,Uint8Array)){const P=new Uint8Array(y);return S(P.buffer,P.byteOffset,P.byteLength)}return D(y)}function S(y,P,k){if(P<0||y.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<P+(k||0))throw new RangeError('"length" is outside of buffer bounds');let N;return P===void 0&&k===void 0?N=new Uint8Array(y):k===void 0?N=new Uint8Array(y,P):N=new Uint8Array(y,P,k),Object.setPrototypeOf(N,l.prototype),N}function L(y){if(l.isBuffer(y)){const P=E(y.length)|0,k=o(P);return k.length===0||y.copy(k,0,0,P),k}if(y.length!==void 0)return typeof y.length!="number"||yt(y.length)?o(0):D(y);if(y.type==="Buffer"&&Array.isArray(y.data))return D(y.data)}function E(y){if(y>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return y|0}function v(y){return+y!=y&&(y=0),l.alloc(+y)}l.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==l.prototype},l.compare=function(y,P){if(ot(y,Uint8Array)&&(y=l.from(y,y.offset,y.byteLength)),ot(P,Uint8Array)&&(P=l.from(P,P.offset,P.byteLength)),!l.isBuffer(y)||!l.isBuffer(P))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===P)return 0;let k=y.length,N=P.length;for(let z=0,G=Math.min(k,N);z<G;++z)if(y[z]!==P[z]){k=y[z],N=P[z];break}return k<N?-1:N<k?1:0},l.isEncoding=function(y){switch(String(y).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}},l.concat=function(y,P){if(!Array.isArray(y))throw new TypeError('"list" argument must be an Array of Buffers');if(y.length===0)return l.alloc(0);let k;if(P===void 0)for(P=0,k=0;k<y.length;++k)P+=y[k].length;const N=l.allocUnsafe(P);let z=0;for(k=0;k<y.length;++k){let G=y[k];if(ot(G,Uint8Array))z+G.length>N.length?(l.isBuffer(G)||(G=l.from(G)),G.copy(N,z)):Uint8Array.prototype.set.call(N,G,z);else if(l.isBuffer(G))G.copy(N,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=G.length}return N};function w(y,P){if(l.isBuffer(y))return y.length;if(ArrayBuffer.isView(y)||ot(y,ArrayBuffer))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);const k=y.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&k===0)return 0;let z=!1;for(;;)switch(P){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return dt(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return mt(y).length;default:if(z)return N?-1:dt(y).length;P=(""+P).toLowerCase(),z=!0}}l.byteLength=w;function I(y,P,k){let N=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,P>>>=0,k<=P))return"";for(y||(y="utf8");;)switch(y){case"hex":return _(this,P,k);case"utf8":case"utf-8":return x(this,P,k);case"ascii":return C(this,P,k);case"latin1":case"binary":return d(this,P,k);case"base64":return p(this,P,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,P,k);default:if(N)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),N=!0}}l.prototype._isBuffer=!0;function F(y,P,k){const N=y[P];y[P]=y[k],y[k]=N}l.prototype.swap16=function(){const y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let P=0;P<y;P+=2)F(this,P,P+1);return this},l.prototype.swap32=function(){const y=this.length;if(y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let P=0;P<y;P+=4)F(this,P,P+3),F(this,P+1,P+2);return this},l.prototype.swap64=function(){const y=this.length;if(y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let P=0;P<y;P+=8)F(this,P,P+7),F(this,P+1,P+6),F(this,P+2,P+5),F(this,P+3,P+4);return this},l.prototype.toString=function(){const y=this.length;return y===0?"":arguments.length===0?x(this,0,y):I.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(y){if(!l.isBuffer(y))throw new TypeError("Argument must be a Buffer");return this===y?!0:l.compare(this,y)===0},l.prototype.inspect=function(){let y="";const P=t.INSPECT_MAX_BYTES;return y=this.toString("hex",0,P).replace(/(.{2})/g,"$1 ").trim(),this.length>P&&(y+=" ... "),"<Buffer "+y+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(y,P,k,N,z){if(ot(y,Uint8Array)&&(y=l.from(y,y.offset,y.byteLength)),!l.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(P===void 0&&(P=0),k===void 0&&(k=y?y.length:0),N===void 0&&(N=0),z===void 0&&(z=this.length),P<0||k>y.length||N<0||z>this.length)throw new RangeError("out of range index");if(N>=z&&P>=k)return 0;if(N>=z)return-1;if(P>=k)return 1;if(P>>>=0,k>>>=0,N>>>=0,z>>>=0,this===y)return 0;let G=z-N,Z=k-P;const at=Math.min(G,Z),ft=this.slice(N,z),wt=y.slice(P,k);for(let nt=0;nt<at;++nt)if(ft[nt]!==wt[nt]){G=ft[nt],Z=wt[nt];break}return G<Z?-1:Z<G?1:0};function O(y,P,k,N,z){if(y.length===0)return-1;if(typeof k=="string"?(N=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,yt(k)&&(k=z?0:y.length-1),k<0&&(k=y.length+k),k>=y.length){if(z)return-1;k=y.length-1}else if(k<0)if(z)k=0;else return-1;if(typeof P=="string"&&(P=l.from(P,N)),l.isBuffer(P))return P.length===0?-1:V(y,P,k,N,z);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?z?Uint8Array.prototype.indexOf.call(y,P,k):Uint8Array.prototype.lastIndexOf.call(y,P,k):V(y,[P],k,N,z);throw new TypeError("val must be string, number or Buffer")}function V(y,P,k,N,z){let G=1,Z=y.length,at=P.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(y.length<2||P.length<2)return-1;G=2,Z/=2,at/=2,k/=2}function ft(nt,lt){return G===1?nt[lt]:nt.readUInt16BE(lt*G)}let wt;if(z){let nt=-1;for(wt=k;wt<Z;wt++)if(ft(y,wt)===ft(P,nt===-1?0:wt-nt)){if(nt===-1&&(nt=wt),wt-nt+1===at)return nt*G}else nt!==-1&&(wt-=wt-nt),nt=-1}else for(k+at>Z&&(k=Z-at),wt=k;wt>=0;wt--){let nt=!0;for(let lt=0;lt<at;lt++)if(ft(y,wt+lt)!==ft(P,lt)){nt=!1;break}if(nt)return wt}return-1}l.prototype.includes=function(y,P,k){return this.indexOf(y,P,k)!==-1},l.prototype.indexOf=function(y,P,k){return O(this,y,P,k,!0)},l.prototype.lastIndexOf=function(y,P,k){return O(this,y,P,k,!1)};function $(y,P,k,N){k=Number(k)||0;const z=y.length-k;N?(N=Number(N),N>z&&(N=z)):N=z;const G=P.length;N>G/2&&(N=G/2);let Z;for(Z=0;Z<N;++Z){const at=parseInt(P.substr(Z*2,2),16);if(yt(at))return Z;y[k+Z]=at}return Z}function j(y,P,k,N){return Et(dt(P,y.length-k),y,k,N)}function W(y,P,k,N){return Et(zt(P),y,k,N)}function q(y,P,k,N){return Et(mt(P),y,k,N)}function U(y,P,k,N){return Et(gt(P,y.length-k),y,k,N)}l.prototype.write=function(y,P,k,N){if(P===void 0)N="utf8",k=this.length,P=0;else if(k===void 0&&typeof P=="string")N=P,k=this.length,P=0;else if(isFinite(P))P=P>>>0,isFinite(k)?(k=k>>>0,N===void 0&&(N="utf8")):(N=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-P;if((k===void 0||k>z)&&(k=z),y.length>0&&(k<0||P<0)||P>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let G=!1;for(;;)switch(N){case"hex":return $(this,y,P,k);case"utf8":case"utf-8":return j(this,y,P,k);case"ascii":case"latin1":case"binary":return W(this,y,P,k);case"base64":return q(this,y,P,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,y,P,k);default:if(G)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),G=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function p(y,P,k){return P===0&&k===y.length?e.fromByteArray(y):e.fromByteArray(y.slice(P,k))}function x(y,P,k){k=Math.min(y.length,k);const N=[];let z=P;for(;z<k;){const G=y[z];let Z=null,at=G>239?4:G>223?3:G>191?2:1;if(z+at<=k){let ft,wt,nt,lt;switch(at){case 1:G<128&&(Z=G);break;case 2:ft=y[z+1],(ft&192)===128&&(lt=(G&31)<<6|ft&63,lt>127&&(Z=lt));break;case 3:ft=y[z+1],wt=y[z+2],(ft&192)===128&&(wt&192)===128&&(lt=(G&15)<<12|(ft&63)<<6|wt&63,lt>2047&&(lt<55296||lt>57343)&&(Z=lt));break;case 4:ft=y[z+1],wt=y[z+2],nt=y[z+3],(ft&192)===128&&(wt&192)===128&&(nt&192)===128&&(lt=(G&15)<<18|(ft&63)<<12|(wt&63)<<6|nt&63,lt>65535&<<1114112&&(Z=lt))}}Z===null?(Z=65533,at=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=at}return m(N)}const M=4096;function m(y){const P=y.length;if(P<=M)return String.fromCharCode.apply(String,y);let k="",N=0;for(;N<P;)k+=String.fromCharCode.apply(String,y.slice(N,N+=M));return k}function C(y,P,k){let N="";k=Math.min(y.length,k);for(let z=P;z<k;++z)N+=String.fromCharCode(y[z]&127);return N}function d(y,P,k){let N="";k=Math.min(y.length,k);for(let z=P;z<k;++z)N+=String.fromCharCode(y[z]);return N}function _(y,P,k){const N=y.length;(!P||P<0)&&(P=0),(!k||k<0||k>N)&&(k=N);let z="";for(let G=P;G<k;++G)z+=Nt[y[G]];return z}function B(y,P,k){const N=y.slice(P,k);let z="";for(let G=0;G<N.length-1;G+=2)z+=String.fromCharCode(N[G]+N[G+1]*256);return z}l.prototype.slice=function(y,P){const k=this.length;y=~~y,P=P===void 0?k:~~P,y<0?(y+=k,y<0&&(y=0)):y>k&&(y=k),P<0?(P+=k,P<0&&(P=0)):P>k&&(P=k),P<y&&(P=y);const N=this.subarray(y,P);return Object.setPrototypeOf(N,l.prototype),N};function u(y,P,k){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+P>k)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(y,P,k){y=y>>>0,P=P>>>0,k||u(y,P,this.length);let N=this[y],z=1,G=0;for(;++G<P&&(z*=256);)N+=this[y+G]*z;return N},l.prototype.readUintBE=l.prototype.readUIntBE=function(y,P,k){y=y>>>0,P=P>>>0,k||u(y,P,this.length);let N=this[y+--P],z=1;for(;P>0&&(z*=256);)N+=this[y+--P]*z;return N},l.prototype.readUint8=l.prototype.readUInt8=function(y,P){return y=y>>>0,P||u(y,1,this.length),this[y]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(y,P){return y=y>>>0,P||u(y,2,this.length),this[y]|this[y+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(y,P){return y=y>>>0,P||u(y,2,this.length),this[y]<<8|this[y+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(y,P){return y=y>>>0,P||u(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(y,P){return y=y>>>0,P||u(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},l.prototype.readBigUInt64LE=ht(function(y){y=y>>>0,tt(y,"offset");const P=this[y],k=this[y+7];(P===void 0||k===void 0)&&X(y,this.length-8);const N=P+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24,z=this[++y]+this[++y]*2**8+this[++y]*2**16+k*2**24;return BigInt(N)+(BigInt(z)<<BigInt(32))}),l.prototype.readBigUInt64BE=ht(function(y){y=y>>>0,tt(y,"offset");const P=this[y],k=this[y+7];(P===void 0||k===void 0)&&X(y,this.length-8);const N=P*2**24+this[++y]*2**16+this[++y]*2**8+this[++y],z=this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+k;return(BigInt(N)<<BigInt(32))+BigInt(z)}),l.prototype.readIntLE=function(y,P,k){y=y>>>0,P=P>>>0,k||u(y,P,this.length);let N=this[y],z=1,G=0;for(;++G<P&&(z*=256);)N+=this[y+G]*z;return z*=128,N>=z&&(N-=Math.pow(2,8*P)),N},l.prototype.readIntBE=function(y,P,k){y=y>>>0,P=P>>>0,k||u(y,P,this.length);let N=P,z=1,G=this[y+--N];for(;N>0&&(z*=256);)G+=this[y+--N]*z;return z*=128,G>=z&&(G-=Math.pow(2,8*P)),G},l.prototype.readInt8=function(y,P){return y=y>>>0,P||u(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},l.prototype.readInt16LE=function(y,P){y=y>>>0,P||u(y,2,this.length);const k=this[y]|this[y+1]<<8;return k&32768?k|4294901760:k},l.prototype.readInt16BE=function(y,P){y=y>>>0,P||u(y,2,this.length);const k=this[y+1]|this[y]<<8;return k&32768?k|4294901760:k},l.prototype.readInt32LE=function(y,P){return y=y>>>0,P||u(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},l.prototype.readInt32BE=function(y,P){return y=y>>>0,P||u(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},l.prototype.readBigInt64LE=ht(function(y){y=y>>>0,tt(y,"offset");const P=this[y],k=this[y+7];(P===void 0||k===void 0)&&X(y,this.length-8);const N=this[y+4]+this[y+5]*2**8+this[y+6]*2**16+(k<<24);return(BigInt(N)<<BigInt(32))+BigInt(P+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24)}),l.prototype.readBigInt64BE=ht(function(y){y=y>>>0,tt(y,"offset");const P=this[y],k=this[y+7];(P===void 0||k===void 0)&&X(y,this.length-8);const N=(P<<24)+this[++y]*2**16+this[++y]*2**8+this[++y];return(BigInt(N)<<BigInt(32))+BigInt(this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+k)}),l.prototype.readFloatLE=function(y,P){return y=y>>>0,P||u(y,4,this.length),r.read(this,y,!0,23,4)},l.prototype.readFloatBE=function(y,P){return y=y>>>0,P||u(y,4,this.length),r.read(this,y,!1,23,4)},l.prototype.readDoubleLE=function(y,P){return y=y>>>0,P||u(y,8,this.length),r.read(this,y,!0,52,8)},l.prototype.readDoubleBE=function(y,P){return y=y>>>0,P||u(y,8,this.length),r.read(this,y,!1,52,8)};function R(y,P,k,N,z,G){if(!l.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>z||P<G)throw new RangeError('"value" argument is out of bounds');if(k+N>y.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(y,P,k,N){if(y=+y,P=P>>>0,k=k>>>0,!N){const Z=Math.pow(2,8*k)-1;R(this,y,P,k,Z,0)}let z=1,G=0;for(this[P]=y&255;++G<k&&(z*=256);)this[P+G]=y/z&255;return P+k},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(y,P,k,N){if(y=+y,P=P>>>0,k=k>>>0,!N){const Z=Math.pow(2,8*k)-1;R(this,y,P,k,Z,0)}let z=k-1,G=1;for(this[P+z]=y&255;--z>=0&&(G*=256);)this[P+z]=y/G&255;return P+k},l.prototype.writeUint8=l.prototype.writeUInt8=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,1,255,0),this[P]=y&255,P+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,2,65535,0),this[P]=y&255,this[P+1]=y>>>8,P+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,2,65535,0),this[P]=y>>>8,this[P+1]=y&255,P+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,4,4294967295,0),this[P+3]=y>>>24,this[P+2]=y>>>16,this[P+1]=y>>>8,this[P]=y&255,P+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,4,4294967295,0),this[P]=y>>>24,this[P+1]=y>>>16,this[P+2]=y>>>8,this[P+3]=y&255,P+4};function H(y,P,k,N,z){bt(P,N,z,y,k,7);let G=Number(P&BigInt(4294967295));y[k++]=G,G=G>>8,y[k++]=G,G=G>>8,y[k++]=G,G=G>>8,y[k++]=G;let Z=Number(P>>BigInt(32)&BigInt(4294967295));return y[k++]=Z,Z=Z>>8,y[k++]=Z,Z=Z>>8,y[k++]=Z,Z=Z>>8,y[k++]=Z,k}function K(y,P,k,N,z){bt(P,N,z,y,k,7);let G=Number(P&BigInt(4294967295));y[k+7]=G,G=G>>8,y[k+6]=G,G=G>>8,y[k+5]=G,G=G>>8,y[k+4]=G;let Z=Number(P>>BigInt(32)&BigInt(4294967295));return y[k+3]=Z,Z=Z>>8,y[k+2]=Z,Z=Z>>8,y[k+1]=Z,Z=Z>>8,y[k]=Z,k+8}l.prototype.writeBigUInt64LE=ht(function(y,P=0){return H(this,y,P,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=ht(function(y,P=0){return K(this,y,P,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(y,P,k,N){if(y=+y,P=P>>>0,!N){const at=Math.pow(2,8*k-1);R(this,y,P,k,at-1,-at)}let z=0,G=1,Z=0;for(this[P]=y&255;++z<k&&(G*=256);)y<0&&Z===0&&this[P+z-1]!==0&&(Z=1),this[P+z]=(y/G>>0)-Z&255;return P+k},l.prototype.writeIntBE=function(y,P,k,N){if(y=+y,P=P>>>0,!N){const at=Math.pow(2,8*k-1);R(this,y,P,k,at-1,-at)}let z=k-1,G=1,Z=0;for(this[P+z]=y&255;--z>=0&&(G*=256);)y<0&&Z===0&&this[P+z+1]!==0&&(Z=1),this[P+z]=(y/G>>0)-Z&255;return P+k},l.prototype.writeInt8=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,1,127,-128),y<0&&(y=255+y+1),this[P]=y&255,P+1},l.prototype.writeInt16LE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,2,32767,-32768),this[P]=y&255,this[P+1]=y>>>8,P+2},l.prototype.writeInt16BE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,2,32767,-32768),this[P]=y>>>8,this[P+1]=y&255,P+2},l.prototype.writeInt32LE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,4,2147483647,-2147483648),this[P]=y&255,this[P+1]=y>>>8,this[P+2]=y>>>16,this[P+3]=y>>>24,P+4},l.prototype.writeInt32BE=function(y,P,k){return y=+y,P=P>>>0,k||R(this,y,P,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[P]=y>>>24,this[P+1]=y>>>16,this[P+2]=y>>>8,this[P+3]=y&255,P+4},l.prototype.writeBigInt64LE=ht(function(y,P=0){return H(this,y,P,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=ht(function(y,P=0){return K(this,y,P,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function J(y,P,k,N,z,G){if(k+N>y.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function Q(y,P,k,N,z){return P=+P,k=k>>>0,z||J(y,P,k,4),r.write(y,P,k,N,23,4),k+4}l.prototype.writeFloatLE=function(y,P,k){return Q(this,y,P,!0,k)},l.prototype.writeFloatBE=function(y,P,k){return Q(this,y,P,!1,k)};function Y(y,P,k,N,z){return P=+P,k=k>>>0,z||J(y,P,k,8),r.write(y,P,k,N,52,8),k+8}l.prototype.writeDoubleLE=function(y,P,k){return Y(this,y,P,!0,k)},l.prototype.writeDoubleBE=function(y,P,k){return Y(this,y,P,!1,k)},l.prototype.copy=function(y,P,k,N){if(!l.isBuffer(y))throw new TypeError("argument should be a Buffer");if(k||(k=0),!N&&N!==0&&(N=this.length),P>=y.length&&(P=y.length),P||(P=0),N>0&&N<k&&(N=k),N===k||y.length===0||this.length===0)return 0;if(P<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),y.length-P<N-k&&(N=y.length-P+k);const z=N-k;return this===y&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(P,k,N):Uint8Array.prototype.set.call(y,this.subarray(k,N),P),z},l.prototype.fill=function(y,P,k,N){if(typeof y=="string"){if(typeof P=="string"?(N=P,P=0,k=this.length):typeof k=="string"&&(N=k,k=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!l.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(y.length===1){const G=y.charCodeAt(0);(N==="utf8"&&G<128||N==="latin1")&&(y=G)}}else typeof y=="number"?y=y&255:typeof y=="boolean"&&(y=Number(y));if(P<0||this.length<P||this.length<k)throw new RangeError("Out of range index");if(k<=P)return this;P=P>>>0,k=k===void 0?this.length:k>>>0,y||(y=0);let z;if(typeof y=="number")for(z=P;z<k;++z)this[z]=y;else{const G=l.isBuffer(y)?y:l.from(y,N),Z=G.length;if(Z===0)throw new TypeError('The value "'+y+'" is invalid for argument "value"');for(z=0;z<k-P;++z)this[z+P]=G[z%Z]}return this};const et={};function pt(y,P,k){et[y]=class extends k{constructor(){super(),Object.defineProperty(this,"message",{value:P.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}pt("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),pt("ERR_INVALID_ARG_TYPE",function(y,P){return`The "${y}" argument must be of type number. Received type ${typeof P}`},TypeError),pt("ERR_OUT_OF_RANGE",function(y,P,k){let N=`The value of "${y}" is out of range.`,z=k;return Number.isInteger(k)&&Math.abs(k)>2**32?z=it(String(k)):typeof k=="bigint"&&(z=String(k),(k>BigInt(2)**BigInt(32)||k<-(BigInt(2)**BigInt(32)))&&(z=it(z)),z+="n"),N+=` It must be ${P}. Received ${z}`,N},RangeError);function it(y){let P="",k=y.length;const N=y[0]==="-"?1:0;for(;k>=N+4;k-=3)P=`_${y.slice(k-3,k)}${P}`;return`${y.slice(0,k)}${P}`}function rt(y,P,k){tt(P,"offset"),(y[P]===void 0||y[P+k]===void 0)&&X(P,y.length-(k+1))}function bt(y,P,k,N,z,G){if(y>k||y<P){const Z=typeof P=="bigint"?"n":"";let at;throw P===0||P===BigInt(0)?at=`>= 0${Z} and < 2${Z} ** ${(G+1)*8}${Z}`:at=`>= -(2${Z} ** ${(G+1)*8-1}${Z}) and < 2 ** ${(G+1)*8-1}${Z}`,new et.ERR_OUT_OF_RANGE("value",at,y)}rt(N,z,G)}function tt(y,P){if(typeof y!="number")throw new et.ERR_INVALID_ARG_TYPE(P,"number",y)}function X(y,P,k){throw Math.floor(y)!==y?(tt(y,k),new et.ERR_OUT_OF_RANGE("offset","an integer",y)):P<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${P}`,y)}const $t=/[^+/0-9A-Za-z-_]/g;function vt(y){if(y=y.split("=")[0],y=y.trim().replace($t,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function dt(y,P){P=P||1/0;let k;const N=y.length;let z=null;const G=[];for(let Z=0;Z<N;++Z){if(k=y.charCodeAt(Z),k>55295&&k<57344){if(!z){if(k>56319){(P-=3)>-1&&G.push(239,191,189);continue}else if(Z+1===N){(P-=3)>-1&&G.push(239,191,189);continue}z=k;continue}if(k<56320){(P-=3)>-1&&G.push(239,191,189),z=k;continue}k=(z-55296<<10|k-56320)+65536}else z&&(P-=3)>-1&&G.push(239,191,189);if(z=null,k<128){if((P-=1)<0)break;G.push(k)}else if(k<2048){if((P-=2)<0)break;G.push(k>>6|192,k&63|128)}else if(k<65536){if((P-=3)<0)break;G.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((P-=4)<0)break;G.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return G}function zt(y){const P=[];for(let k=0;k<y.length;++k)P.push(y.charCodeAt(k)&255);return P}function gt(y,P){let k,N,z;const G=[];for(let Z=0;Z<y.length&&!((P-=2)<0);++Z)k=y.charCodeAt(Z),N=k>>8,z=k%256,G.push(z),G.push(N);return G}function mt(y){return e.toByteArray(vt(y))}function Et(y,P,k,N){let z;for(z=0;z<N&&!(z+k>=P.length||z>=y.length);++z)P[z+k]=y[z];return z}function ot(y,P){return y instanceof P||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===P.name}function yt(y){return y!==y}const Nt=(function(){const y="0123456789abcdef",P=new Array(256);for(let k=0;k<16;++k){const N=k*16;for(let z=0;z<16;++z)P[N+z]=y[k]+y[z]}return P})();function ht(y){return typeof BigInt>"u"?ct:y}function ct(){throw new Error("BigInt not supported")}})(buffer);function number$1(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function isBytes$1(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function bytes(t,...e){if(!isBytes$1(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function hash(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$1(t.outputLen),number$1(t.blockLen)}function exists(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function output(t,e){bytes(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const crypto$1=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),rotr=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function utf8ToBytes$1(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function toBytes(t){return typeof t=="string"&&(t=utf8ToBytes$1(t)),bytes(t),t}function concatBytes$1(...t){let e=0;for(let n=0;n<t.length;n++){const s=t[n];bytes(s),e+=s.length}const r=new Uint8Array(e);for(let n=0,s=0;n<t.length;n++){const a=t[n];r.set(a,s),s+=a.length}return r}class Hash{clone(){return this._cloneInto()}}function wrapConstructor(t){const e=n=>t().update(toBytes(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function randomBytes(t=32){if(crypto$1&&typeof crypto$1.getRandomValues=="function")return crypto$1.getRandomValues(new Uint8Array(t));if(crypto$1&&typeof crypto$1.randomBytes=="function")return crypto$1.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}function setBigUint64(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const s=BigInt(32),a=BigInt(4294967295),o=Number(r>>s&a),l=Number(r&a),h=n?4:0,c=n?0:4;t.setUint32(e+h,o,n),t.setUint32(e+c,l,n)}const Chi=(t,e,r)=>t&e^~t&r,Maj=(t,e,r)=>t&e^t&r^e&r;class HashMD extends Hash{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=createView(this.buffer)}update(e){exists(this);const{view:r,buffer:n,blockLen:s}=this;e=toBytes(e);const a=e.length;for(let o=0;o<a;){const l=Math.min(s-this.pos,a-o);if(l===s){const h=createView(e);for(;s<=a-o;o+=s)this.process(h,o);continue}n.set(e.subarray(o,o+l),this.pos),this.pos+=l,o+=l,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){exists(this),output(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(n,0),o=0);for(let A=o;A<s;A++)r[A]=0;setBigUint64(n,s-8,BigInt(this.length*8),a),this.process(n,0);const l=createView(e),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=h/4,g=this.get();if(c>g.length)throw new Error("_sha2: outputLen bigger than state");for(let A=0;A<c;A++)l.setUint32(4*A,g[A],a)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:a,destroyed:o,pos:l}=this;return e.length=s,e.pos=l,e.finished=a,e.destroyed=o,s%r&&e.buffer.set(n),e}}const U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(t,e=!1){return e?{h:Number(t&U32_MASK64),l:Number(t>>_32n&U32_MASK64)}:{h:Number(t>>_32n&U32_MASK64)|0,l:Number(t&U32_MASK64)|0}}function split(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:a,l:o}=fromBig(t[s],e);[r[s],n[s]]=[a,o]}return[r,n]}const toBig=(t,e)=>BigInt(t>>>0)<<_32n|BigInt(e>>>0),shrSH=(t,e,r)=>t>>>r,shrSL=(t,e,r)=>t<<32-r|e>>>r,rotrSH=(t,e,r)=>t>>>r|e<<32-r,rotrSL=(t,e,r)=>t<<32-r|e>>>r,rotrBH=(t,e,r)=>t<<64-r|e>>>r-32,rotrBL=(t,e,r)=>t>>>r-32|e<<64-r,rotr32H=(t,e)=>e,rotr32L=(t,e)=>t,rotlSH=(t,e,r)=>t<<r|e>>>32-r,rotlSL=(t,e,r)=>e<<r|t>>>32-r,rotlBH=(t,e,r)=>e<<r-32|t>>>64-r,rotlBL=(t,e,r)=>t<<r-32|e>>>64-r;function add(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const add3L=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,add4L=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,add5L=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),add5H=(t,e,r,n,s,a)=>e+r+n+s+a+(t/2**32|0)|0,u64$1={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L},[SHA512_Kh,SHA512_Kl]=u64$1.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),SHA512_W_H=new Uint32Array(80),SHA512_W_L=new Uint32Array(80);class SHA512 extends HashMD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:a,Cl:o,Dh:l,Dl:h,Eh:c,El:g,Fh:A,Fl:b,Gh:D,Gl:T,Hh:S,Hl:L}=this;return[e,r,n,s,a,o,l,h,c,g,A,b,D,T,S,L]}set(e,r,n,s,a,o,l,h,c,g,A,b,D,T,S,L){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=l|0,this.Dl=h|0,this.Eh=c|0,this.El=g|0,this.Fh=A|0,this.Fl=b|0,this.Gh=D|0,this.Gl=T|0,this.Hh=S|0,this.Hl=L|0}process(e,r){for(let w=0;w<16;w++,r+=4)SHA512_W_H[w]=e.getUint32(r),SHA512_W_L[w]=e.getUint32(r+=4);for(let w=16;w<80;w++){const I=SHA512_W_H[w-15]|0,F=SHA512_W_L[w-15]|0,O=u64$1.rotrSH(I,F,1)^u64$1.rotrSH(I,F,8)^u64$1.shrSH(I,F,7),V=u64$1.rotrSL(I,F,1)^u64$1.rotrSL(I,F,8)^u64$1.shrSL(I,F,7),$=SHA512_W_H[w-2]|0,j=SHA512_W_L[w-2]|0,W=u64$1.rotrSH($,j,19)^u64$1.rotrBH($,j,61)^u64$1.shrSH($,j,6),q=u64$1.rotrSL($,j,19)^u64$1.rotrBL($,j,61)^u64$1.shrSL($,j,6),U=u64$1.add4L(V,q,SHA512_W_L[w-7],SHA512_W_L[w-16]),p=u64$1.add4H(U,O,W,SHA512_W_H[w-7],SHA512_W_H[w-16]);SHA512_W_H[w]=p|0,SHA512_W_L[w]=U|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:l,Cl:h,Dh:c,Dl:g,Eh:A,El:b,Fh:D,Fl:T,Gh:S,Gl:L,Hh:E,Hl:v}=this;for(let w=0;w<80;w++){const I=u64$1.rotrSH(A,b,14)^u64$1.rotrSH(A,b,18)^u64$1.rotrBH(A,b,41),F=u64$1.rotrSL(A,b,14)^u64$1.rotrSL(A,b,18)^u64$1.rotrBL(A,b,41),O=A&D^~A&S,V=b&T^~b&L,$=u64$1.add5L(v,F,V,SHA512_Kl[w],SHA512_W_L[w]),j=u64$1.add5H($,E,I,O,SHA512_Kh[w],SHA512_W_H[w]),W=$|0,q=u64$1.rotrSH(n,s,28)^u64$1.rotrBH(n,s,34)^u64$1.rotrBH(n,s,39),U=u64$1.rotrSL(n,s,28)^u64$1.rotrBL(n,s,34)^u64$1.rotrBL(n,s,39),p=n&a^n&l^a&l,x=s&o^s&h^o&h;E=S|0,v=L|0,S=D|0,L=T|0,D=A|0,T=b|0,{h:A,l:b}=u64$1.add(c|0,g|0,j|0,W|0),c=l|0,g=h|0,l=a|0,h=o|0,a=n|0,o=s|0;const M=u64$1.add3L(W,U,x);n=u64$1.add3H(M,j,q,p),s=M|0}({h:n,l:s}=u64$1.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=u64$1.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:l,l:h}=u64$1.add(this.Ch|0,this.Cl|0,l|0,h|0),{h:c,l:g}=u64$1.add(this.Dh|0,this.Dl|0,c|0,g|0),{h:A,l:b}=u64$1.add(this.Eh|0,this.El|0,A|0,b|0),{h:D,l:T}=u64$1.add(this.Fh|0,this.Fl|0,D|0,T|0),{h:S,l:L}=u64$1.add(this.Gh|0,this.Gl|0,S|0,L|0),{h:E,l:v}=u64$1.add(this.Hh|0,this.Hl|0,E|0,v|0),this.set(n,s,a,o,l,h,c,g,A,b,D,T,S,L,E,v)}roundClean(){SHA512_W_H.fill(0),SHA512_W_L.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const sha512=wrapConstructor(()=>new SHA512);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$4=BigInt(0),_1n$6=BigInt(1),_2n$4=BigInt(2);function isBytes(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function abytes(t){if(!isBytes(t))throw new Error("Uint8Array expected")}function abool(t,e){if(typeof e!="boolean")throw new Error(`${t} must be valid boolean, got "${e}".`)}const hexes=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function bytesToHex(t){abytes(t);let e="";for(let r=0;r<t.length;r++)e+=hexes[t[r]];return e}function numberToHexUnpadded(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function hexToNumber(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}const asciis={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function asciiToBase16(t){if(t>=asciis._0&&t<=asciis._9)return t-asciis._0;if(t>=asciis._A&&t<=asciis._F)return t-(asciis._A-10);if(t>=asciis._a&&t<=asciis._f)return t-(asciis._a-10)}function hexToBytes(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let s=0,a=0;s<r;s++,a+=2){const o=asciiToBase16(t.charCodeAt(a)),l=asciiToBase16(t.charCodeAt(a+1));if(o===void 0||l===void 0){const h=t[a]+t[a+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+a)}n[s]=o*16+l}return n}function bytesToNumberBE(t){return hexToNumber(bytesToHex(t))}function bytesToNumberLE(t){return abytes(t),hexToNumber(bytesToHex(Uint8Array.from(t).reverse()))}function numberToBytesBE(t,e){return hexToBytes(t.toString(16).padStart(e*2,"0"))}function numberToBytesLE(t,e){return numberToBytesBE(t,e).reverse()}function numberToVarBytesBE(t){return hexToBytes(numberToHexUnpadded(t))}function ensureBytes(t,e,r){let n;if(typeof e=="string")try{n=hexToBytes(e)}catch(a){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${a}`)}else if(isBytes(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const s=n.length;if(typeof r=="number"&&s!==r)throw new Error(`${t} expected ${r} bytes, got ${s}`);return n}function concatBytes(...t){let e=0;for(let n=0;n<t.length;n++){const s=t[n];abytes(s),e+=s.length}const r=new Uint8Array(e);for(let n=0,s=0;n<t.length;n++){const a=t[n];r.set(a,s),s+=a.length}return r}function equalBytes(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function utf8ToBytes(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}const isPosBig=t=>typeof t=="bigint"&&_0n$4<=t;function inRange$1(t,e,r){return isPosBig(t)&&isPosBig(e)&&isPosBig(r)&&e<=t&&t<r}function aInRange(t,e,r,n){if(!inRange$1(e,r,n))throw new Error(`expected valid ${t}: ${r} <= n < ${n}, got ${typeof e} ${e}`)}function bitLen(t){let e;for(e=0;t>_0n$4;t>>=_1n$6,e+=1);return e}function bitGet(t,e){return t>>BigInt(e)&_1n$6}function bitSet(t,e,r){return t|(r?_1n$6:_0n$4)<<BigInt(e)}const bitMask=t=>(_2n$4<<BigInt(t-1))-_1n$6,u8n=t=>new Uint8Array(t),u8fr=t=>Uint8Array.from(t);function createHmacDrbg(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=u8n(t),s=u8n(t),a=0;const o=()=>{n.fill(1),s.fill(0),a=0},l=(...g)=>r(s,n,...g),h=(g=u8n())=>{s=l(u8fr([0]),g),n=l(),g.length!==0&&(s=l(u8fr([1]),g),n=l())},c=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const A=[];for(;g<e;){n=l();const b=n.slice();A.push(b),g+=n.length}return concatBytes(...A)};return(g,A)=>{o(),h(g);let b;for(;!(b=A(c()));)h();return o(),b}}const validatorFns={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||isBytes(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function validateObject(t,e,r={}){const n=(s,a,o)=>{const l=validatorFns[a];if(typeof l!="function")throw new Error(`Invalid validator "${a}", expected function`);const h=t[s];if(!(o&&h===void 0)&&!l(h,t))throw new Error(`Invalid param ${String(s)}=${h} (${typeof h}), expected ${a}`)};for(const[s,a]of Object.entries(e))n(s,a,!1);for(const[s,a]of Object.entries(r))n(s,a,!0);return t}const notImplemented=()=>{throw new Error("not implemented")};function memoized(t){const e=new WeakMap;return(r,...n)=>{const s=e.get(r);if(s!==void 0)return s;const a=t(r,...n);return e.set(r,a),a}}const ut=Object.freeze(Object.defineProperty({__proto__:null,aInRange,abool,abytes,bitGet,bitLen,bitMask,bitSet,bytesToHex,bytesToNumberBE,bytesToNumberLE,concatBytes,createHmacDrbg,ensureBytes,equalBytes,hexToBytes,hexToNumber,inRange:inRange$1,isBytes,memoized,notImplemented,numberToBytesBE,numberToBytesLE,numberToHexUnpadded,numberToVarBytesBE,utf8ToBytes,validateObject},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$3=BigInt(0),_1n$5=BigInt(1),_2n$3=BigInt(2),_3n$1=BigInt(3),_4n=BigInt(4),_5n$1=BigInt(5),_8n$2=BigInt(8);BigInt(9);BigInt(16);function mod(t,e){const r=t%e;return r>=_0n$3?r:e+r}function pow(t,e,r){if(r<=_0n$3||e<_0n$3)throw new Error("Expected power/modulo > 0");if(r===_1n$5)return _0n$3;let n=_1n$5;for(;e>_0n$3;)e&_1n$5&&(n=n*t%r),t=t*t%r,e>>=_1n$5;return n}function pow2(t,e,r){let n=t;for(;e-- >_0n$3;)n*=n,n%=r;return n}function invert(t,e){if(t===_0n$3||e<=_0n$3)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=mod(t,e),n=e,s=_0n$3,a=_1n$5;for(;r!==_0n$3;){const o=n/r,l=n%r,h=s-a*o;n=r,r=l,s=a,a=h}if(n!==_1n$5)throw new Error("invert: does not exist");return mod(s,e)}function tonelliShanks(t){const e=(t-_1n$5)/_2n$3;let r,n,s;for(r=t-_1n$5,n=0;r%_2n$3===_0n$3;r/=_2n$3,n++);for(s=_2n$3;s<t&&pow(s,e,t)!==t-_1n$5;s++);if(n===1){const o=(t+_1n$5)/_4n;return function(l,h){const c=l.pow(h,o);if(!l.eql(l.sqr(c),h))throw new Error("Cannot find square root");return c}}const a=(r+_1n$5)/_2n$3;return function(o,l){if(o.pow(l,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let h=n,c=o.pow(o.mul(o.ONE,s),r),g=o.pow(l,a),A=o.pow(l,r);for(;!o.eql(A,o.ONE);){if(o.eql(A,o.ZERO))return o.ZERO;let b=1;for(let T=o.sqr(A);b<h&&!o.eql(T,o.ONE);b++)T=o.sqr(T);const D=o.pow(c,_1n$5<<BigInt(h-b-1));c=o.sqr(D),g=o.mul(g,D),A=o.mul(A,c),h=b}return g}}function FpSqrt(t){if(t%_4n===_3n$1){const e=(t+_1n$5)/_4n;return function(r,n){const s=r.pow(n,e);if(!r.eql(r.sqr(s),n))throw new Error("Cannot find square root");return s}}if(t%_8n$2===_5n$1){const e=(t-_5n$1)/_8n$2;return function(r,n){const s=r.mul(n,_2n$3),a=r.pow(s,e),o=r.mul(n,a),l=r.mul(r.mul(o,_2n$3),a),h=r.mul(o,r.sub(l,r.ONE));if(!r.eql(r.sqr(h),n))throw new Error("Cannot find square root");return h}}return tonelliShanks(t)}const isNegativeLE=(t,e)=>(mod(t,e)&_1n$5)===_1n$5,FIELD_FIELDS=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=FIELD_FIELDS.reduce((n,s)=>(n[s]="function",n),e);return validateObject(t,r)}function FpPow(t,e,r){if(r<_0n$3)throw new Error("Expected power > 0");if(r===_0n$3)return t.ONE;if(r===_1n$5)return e;let n=t.ONE,s=e;for(;r>_0n$3;)r&_1n$5&&(n=t.mul(n,s)),s=t.sqr(s),r>>=_1n$5;return n}function FpInvertBatch(t,e){const r=new Array(e.length),n=e.reduce((a,o,l)=>t.is0(o)?a:(r[l]=a,t.mul(a,o)),t.ONE),s=t.inv(n);return e.reduceRight((a,o,l)=>t.is0(o)?a:(r[l]=t.mul(a,r[l]),t.mul(a,o)),s),r}function nLength(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Field(t,e,r=!1,n={}){if(t<=_0n$3)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:a}=nLength(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=FpSqrt(t),l=Object.freeze({ORDER:t,BITS:s,BYTES:a,MASK:bitMask(s),ZERO:_0n$3,ONE:_1n$5,create:h=>mod(h,t),isValid:h=>{if(typeof h!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof h}`);return _0n$3<=h&&h<t},is0:h=>h===_0n$3,isOdd:h=>(h&_1n$5)===_1n$5,neg:h=>mod(-h,t),eql:(h,c)=>h===c,sqr:h=>mod(h*h,t),add:(h,c)=>mod(h+c,t),sub:(h,c)=>mod(h-c,t),mul:(h,c)=>mod(h*c,t),pow:(h,c)=>FpPow(l,h,c),div:(h,c)=>mod(h*invert(c,t),t),sqrN:h=>h*h,addN:(h,c)=>h+c,subN:(h,c)=>h-c,mulN:(h,c)=>h*c,inv:h=>invert(h,t),sqrt:n.sqrt||(h=>o(l,h)),invertBatch:h=>FpInvertBatch(l,h),cmov:(h,c,g)=>g?c:h,toBytes:h=>r?numberToBytesLE(h,a):numberToBytesBE(h,a),fromBytes:h=>{if(h.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${h.length}`);return r?bytesToNumberLE(h):bytesToNumberBE(h)}});return Object.freeze(l)}function getFieldBytesLength(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function getMinHashLength(t){const e=getFieldBytesLength(t);return e+Math.ceil(e/2)}function mapHashToField(t,e,r=!1){const n=t.length,s=getFieldBytesLength(e),a=getMinHashLength(e);if(n<16||n<a||n>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);const o=r?bytesToNumberBE(t):bytesToNumberLE(t),l=mod(o,e-_1n$5)+_1n$5;return r?numberToBytesLE(l,s):numberToBytesBE(l,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$2=BigInt(0),_1n$4=BigInt(1),pointPrecomputes=new WeakMap,pointWindowSizes=new WeakMap;function wNAF(t,e){const r=(a,o)=>{const l=o.negate();return a?l:o},n=a=>{if(!Number.isSafeInteger(a)||a<=0||a>e)throw new Error(`Wrong window size=${a}, should be [1..${e}]`)},s=a=>{n(a);const o=Math.ceil(e/a)+1,l=2**(a-1);return{windows:o,windowSize:l}};return{constTimeNegate:r,unsafeLadder(a,o){let l=t.ZERO,h=a;for(;o>_0n$2;)o&_1n$4&&(l=l.add(h)),h=h.double(),o>>=_1n$4;return l},precomputeWindow(a,o){const{windows:l,windowSize:h}=s(o),c=[];let g=a,A=g;for(let b=0;b<l;b++){A=g,c.push(A);for(let D=1;D<h;D++)A=A.add(g),c.push(A);g=A.double()}return c},wNAF(a,o,l){const{windows:h,windowSize:c}=s(a);let g=t.ZERO,A=t.BASE;const b=BigInt(2**a-1),D=2**a,T=BigInt(a);for(let S=0;S<h;S++){const L=S*c;let E=Number(l&b);l>>=T,E>c&&(E-=D,l+=_1n$4);const v=L,w=L+Math.abs(E)-1,I=S%2!==0,F=E<0;E===0?A=A.add(r(I,o[v])):g=g.add(r(F,o[w]))}return{p:g,f:A}},wNAFCached(a,o,l){const h=pointWindowSizes.get(a)||1;let c=pointPrecomputes.get(a);return c||(c=this.precomputeWindow(a,h),h!==1&&pointPrecomputes.set(a,l(c))),this.wNAF(h,c,o)},setWindowSize(a,o){n(o),pointWindowSizes.set(a,o),pointPrecomputes.delete(a)}}}function pippenger(t,e,r,n){if(!Array.isArray(r)||!Array.isArray(n)||n.length!==r.length)throw new Error("arrays of points and scalars must have equal length");n.forEach((g,A)=>{if(!e.isValid(g))throw new Error(`wrong scalar at index ${A}`)}),r.forEach((g,A)=>{if(!(g instanceof t))throw new Error(`wrong point at index ${A}`)});const s=bitLen(BigInt(r.length)),a=s>12?s-3:s>4?s-2:s?2:1,o=(1<<a)-1,l=new Array(o+1).fill(t.ZERO),h=Math.floor((e.BITS-1)/a)*a;let c=t.ZERO;for(let g=h;g>=0;g-=a){l.fill(t.ZERO);for(let b=0;b<n.length;b++){const D=n[b],T=Number(D>>BigInt(g)&BigInt(o));l[T]=l[T].add(r[b])}let A=t.ZERO;for(let b=l.length-1,D=t.ZERO;b>0;b--)D=D.add(l[b]),A=A.add(D);if(c=c.add(A),g!==0)for(let b=0;b<a;b++)c=c.double()}return c}function validateBasic(t){return validateField(t.Fp),validateObject(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nLength(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$1=BigInt(0),_1n$3=BigInt(1),_2n$2=BigInt(2),_8n$1=BigInt(8),VERIFY_DEFAULT={zip215:!0};function validateOpts$1(t){const e=validateBasic(t);return validateObject(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function twistedEdwards(t){const e=validateOpts$1(t),{Fp:r,n,prehash:s,hash:a,randomBytes:o,nByteLength:l,h}=e,c=_2n$2<<BigInt(l*8)-_1n$3,g=r.create,A=Field(e.n,e.nBitLength),b=e.uvRatio||((M,m)=>{try{return{isValid:!0,value:r.sqrt(M*r.inv(m))}}catch{return{isValid:!1,value:_0n$1}}}),D=e.adjustScalarBytes||(M=>M),T=e.domain||((M,m,C)=>{if(abool("phflag",C),m.length||C)throw new Error("Contexts/pre-hash are not supported");return M});function S(M,m){aInRange("coordinate "+M,m,_0n$1,c)}function L(M){if(!(M instanceof w))throw new Error("ExtendedPoint expected")}const E=memoized((M,m)=>{const{ex:C,ey:d,ez:_}=M,B=M.is0();m==null&&(m=B?_8n$1:r.inv(_));const u=g(C*m),R=g(d*m),H=g(_*m);if(B)return{x:_0n$1,y:_1n$3};if(H!==_1n$3)throw new Error("invZ was invalid");return{x:u,y:R}}),v=memoized(M=>{const{a:m,d:C}=e;if(M.is0())throw new Error("bad point: ZERO");const{ex:d,ey:_,ez:B,et:u}=M,R=g(d*d),H=g(_*_),K=g(B*B),J=g(K*K),Q=g(R*m),Y=g(K*g(Q+H)),et=g(J+g(C*g(R*H)));if(Y!==et)throw new Error("bad point: equation left != right (1)");const pt=g(d*_),it=g(B*u);if(pt!==it)throw new Error("bad point: equation left != right (2)");return!0});class w{constructor(m,C,d,_){this.ex=m,this.ey=C,this.ez=d,this.et=_,S("x",m),S("y",C),S("z",d),S("t",_),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(m){if(m instanceof w)throw new Error("extended point not allowed");const{x:C,y:d}=m||{};return S("x",C),S("y",d),new w(C,d,_1n$3,g(C*d))}static normalizeZ(m){const C=r.invertBatch(m.map(d=>d.ez));return m.map((d,_)=>d.toAffine(C[_])).map(w.fromAffine)}static msm(m,C){return pippenger(w,A,m,C)}_setWindowSize(m){O.setWindowSize(this,m)}assertValidity(){v(this)}equals(m){L(m);const{ex:C,ey:d,ez:_}=this,{ex:B,ey:u,ez:R}=m,H=g(C*R),K=g(B*_),J=g(d*R),Q=g(u*_);return H===K&&J===Q}is0(){return this.equals(w.ZERO)}negate(){return new w(g(-this.ex),this.ey,this.ez,g(-this.et))}double(){const{a:m}=e,{ex:C,ey:d,ez:_}=this,B=g(C*C),u=g(d*d),R=g(_2n$2*g(_*_)),H=g(m*B),K=C+d,J=g(g(K*K)-B-u),Q=H+u,Y=Q-R,et=H-u,pt=g(J*Y),it=g(Q*et),rt=g(J*et),bt=g(Y*Q);return new w(pt,it,bt,rt)}add(m){L(m);const{a:C,d}=e,{ex:_,ey:B,ez:u,et:R}=this,{ex:H,ey:K,ez:J,et:Q}=m;if(C===BigInt(-1)){const gt=g((B-_)*(K+H)),mt=g((B+_)*(K-H)),Et=g(mt-gt);if(Et===_0n$1)return this.double();const ot=g(u*_2n$2*Q),yt=g(R*_2n$2*J),Nt=yt+ot,ht=mt+gt,ct=yt-ot,y=g(Nt*Et),P=g(ht*ct),k=g(Nt*ct),N=g(Et*ht);return new w(y,P,N,k)}const Y=g(_*H),et=g(B*K),pt=g(R*d*Q),it=g(u*J),rt=g((_+B)*(H+K)-Y-et),bt=it-pt,tt=it+pt,X=g(et-C*Y),$t=g(rt*bt),vt=g(tt*X),dt=g(rt*X),zt=g(bt*tt);return new w($t,vt,zt,dt)}subtract(m){return this.add(m.negate())}wNAF(m){return O.wNAFCached(this,m,w.normalizeZ)}multiply(m){const C=m;aInRange("scalar",C,_1n$3,n);const{p:d,f:_}=this.wNAF(C);return w.normalizeZ([d,_])[0]}multiplyUnsafe(m){const C=m;return aInRange("scalar",C,_0n$1,n),C===_0n$1?F:this.equals(F)||C===_1n$3?this:this.equals(I)?this.wNAF(C).p:O.unsafeLadder(this,C)}isSmallOrder(){return this.multiplyUnsafe(h).is0()}isTorsionFree(){return O.unsafeLadder(this,n).is0()}toAffine(m){return E(this,m)}clearCofactor(){const{h:m}=e;return m===_1n$3?this:this.multiplyUnsafe(m)}static fromHex(m,C=!1){const{d,a:_}=e,B=r.BYTES;m=ensureBytes("pointHex",m,B),abool("zip215",C);const u=m.slice(),R=m[B-1];u[B-1]=R&-129;const H=bytesToNumberLE(u),K=C?c:r.ORDER;aInRange("pointHex.y",H,_0n$1,K);const J=g(H*H),Q=g(J-_1n$3),Y=g(d*J-_);let{isValid:et,value:pt}=b(Q,Y);if(!et)throw new Error("Point.fromHex: invalid y coordinate");const it=(pt&_1n$3)===_1n$3,rt=(R&128)!==0;if(!C&&pt===_0n$1&&rt)throw new Error("Point.fromHex: x=0 and x_0=1");return rt!==it&&(pt=g(-pt)),w.fromAffine({x:pt,y:H})}static fromPrivateKey(m){return j(m).point}toRawBytes(){const{x:m,y:C}=this.toAffine(),d=numberToBytesLE(C,r.BYTES);return d[d.length-1]|=m&_1n$3?128:0,d}toHex(){return bytesToHex(this.toRawBytes())}}w.BASE=new w(e.Gx,e.Gy,_1n$3,g(e.Gx*e.Gy)),w.ZERO=new w(_0n$1,_1n$3,_1n$3,_0n$1);const{BASE:I,ZERO:F}=w,O=wNAF(w,l*8);function V(M){return mod(M,n)}function $(M){return V(bytesToNumberLE(M))}function j(M){const m=l;M=ensureBytes("private key",M,m);const C=ensureBytes("hashed private key",a(M),2*m),d=D(C.slice(0,m)),_=C.slice(m,2*m),B=$(d),u=I.multiply(B),R=u.toRawBytes();return{head:d,prefix:_,scalar:B,point:u,pointBytes:R}}function W(M){return j(M).pointBytes}function q(M=new Uint8Array,...m){const C=concatBytes(...m);return $(a(T(C,ensureBytes("context",M),!!s)))}function U(M,m,C={}){M=ensureBytes("message",M),s&&(M=s(M));const{prefix:d,scalar:_,pointBytes:B}=j(m),u=q(C.context,d,M),R=I.multiply(u).toRawBytes(),H=q(C.context,R,B,M),K=V(u+H*_);aInRange("signature.s",K,_0n$1,n);const J=concatBytes(R,numberToBytesLE(K,r.BYTES));return ensureBytes("result",J,l*2)}const p=VERIFY_DEFAULT;function x(M,m,C,d=p){const{context:_,zip215:B}=d,u=r.BYTES;M=ensureBytes("signature",M,2*u),m=ensureBytes("message",m),B!==void 0&&abool("zip215",B),s&&(m=s(m));const R=bytesToNumberLE(M.slice(u,2*u));let H,K,J;try{H=w.fromHex(C,B),K=w.fromHex(M.slice(0,u),B),J=I.multiplyUnsafe(R)}catch{return!1}if(!B&&H.isSmallOrder())return!1;const Q=q(_,K.toRawBytes(),H.toRawBytes(),m);return K.add(H.multiplyUnsafe(Q)).subtract(J).clearCofactor().equals(w.ZERO)}return I._setWindowSize(8),{CURVE:e,getPublicKey:W,sign:U,verify:x,ExtendedPoint:w,utils:{getExtendedPublicKey:j,randomPrivateKey:()=>o(r.BYTES),precompute(M=8,m=w.BASE){return m._setWindowSize(M),m.multiply(BigInt(3)),m}}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ED25519_P=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),ED25519_SQRT_M1=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const _1n$2=BigInt(1),_2n$1=BigInt(2);BigInt(3);const _5n=BigInt(5),_8n=BigInt(8);function ed25519_pow_2_252_3(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),s=BigInt(80),a=ED25519_P,o=t*t%a*t%a,l=pow2(o,_2n$1,a)*o%a,h=pow2(l,_1n$2,a)*t%a,c=pow2(h,_5n,a)*h%a,g=pow2(c,e,a)*c%a,A=pow2(g,r,a)*g%a,b=pow2(A,n,a)*A%a,D=pow2(b,s,a)*b%a,T=pow2(D,s,a)*b%a,S=pow2(T,e,a)*c%a;return{pow_p_5_8:pow2(S,_2n$1,a)*t%a,b2:o}}function adjustScalarBytes(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function uvRatio(t,e){const r=ED25519_P,n=mod(e*e*e,r),s=mod(n*n*e,r),a=ed25519_pow_2_252_3(t*s).pow_p_5_8;let o=mod(t*n*a,r);const l=mod(e*o*o,r),h=o,c=mod(o*ED25519_SQRT_M1,r),g=l===t,A=l===mod(-t,r),b=l===mod(-t*ED25519_SQRT_M1,r);return g&&(o=h),(A||b)&&(o=c),isNegativeLE(o,r)&&(o=mod(-o,r)),{isValid:g||A,value:o}}const Fp$1=Field(ED25519_P,void 0,!0),ed25519Defaults={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Fp$1,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:_8n,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:sha512,randomBytes,adjustScalarBytes,uvRatio},ed25519=twistedEdwards(ed25519Defaults);var bn={exports:{}};(function(t){(function(e,r){function n(p,x){if(!p)throw new Error(x||"Assertion failed")}function s(p,x){p.super_=x;var M=function(){};M.prototype=x.prototype,p.prototype=new M,p.prototype.constructor=p}function a(p,x,M){if(a.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((x==="le"||x==="be")&&(M=x,x=10),this._init(p||0,x||10,M||"be"))}typeof e=="object"?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=buffer.Buffer}catch{}a.isBN=function(p){return p instanceof a?!0:p!==null&&typeof p=="object"&&p.constructor.wordSize===a.wordSize&&Array.isArray(p.words)},a.max=function(p,x){return p.cmp(x)>0?p:x},a.min=function(p,x){return p.cmp(x)<0?p:x},a.prototype._init=function(p,x,M){if(typeof p=="number")return this._initNumber(p,x,M);if(typeof p=="object")return this._initArray(p,x,M);x==="hex"&&(x=16),n(x===(x|0)&&x>=2&&x<=36),p=p.toString().replace(/\s+/g,"");var m=0;p[0]==="-"&&(m++,this.negative=1),m<p.length&&(x===16?this._parseHex(p,m,M):(this._parseBase(p,x,m),M==="le"&&this._initArray(this.toArray(),x,M)))},a.prototype._initNumber=function(p,x,M){p<0&&(this.negative=1,p=-p),p<67108864?(this.words=[p&67108863],this.length=1):p<4503599627370496?(this.words=[p&67108863,p/67108864&67108863],this.length=2):(n(p<9007199254740992),this.words=[p&67108863,p/67108864&67108863,1],this.length=3),M==="le"&&this._initArray(this.toArray(),x,M)},a.prototype._initArray=function(p,x,M){if(n(typeof p.length=="number"),p.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(p.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var C,d,_=0;if(M==="be")for(m=p.length-1,C=0;m>=0;m-=3)d=p[m]|p[m-1]<<8|p[m-2]<<16,this.words[C]|=d<<_&67108863,this.words[C+1]=d>>>26-_&67108863,_+=24,_>=26&&(_-=26,C++);else if(M==="le")for(m=0,C=0;m<p.length;m+=3)d=p[m]|p[m+1]<<8|p[m+2]<<16,this.words[C]|=d<<_&67108863,this.words[C+1]=d>>>26-_&67108863,_+=24,_>=26&&(_-=26,C++);return this._strip()};function l(p,x){var M=p.charCodeAt(x);if(M>=48&&M<=57)return M-48;if(M>=65&&M<=70)return M-55;if(M>=97&&M<=102)return M-87;n(!1,"Invalid character in "+p)}function h(p,x,M){var m=l(p,M);return M-1>=x&&(m|=l(p,M-1)<<4),m}a.prototype._parseHex=function(p,x,M){this.length=Math.ceil((p.length-x)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var C=0,d=0,_;if(M==="be")for(m=p.length-1;m>=x;m-=2)_=h(p,x,m)<<C,this.words[d]|=_&67108863,C>=18?(C-=18,d+=1,this.words[d]|=_>>>26):C+=8;else{var B=p.length-x;for(m=B%2===0?x+1:x;m<p.length;m+=2)_=h(p,x,m)<<C,this.words[d]|=_&67108863,C>=18?(C-=18,d+=1,this.words[d]|=_>>>26):C+=8}this._strip()};function c(p,x,M,m){for(var C=0,d=0,_=Math.min(p.length,M),B=x;B<_;B++){var u=p.charCodeAt(B)-48;C*=m,u>=49?d=u-49+10:u>=17?d=u-17+10:d=u,n(u>=0&&d<m,"Invalid character"),C+=d}return C}a.prototype._parseBase=function(p,x,M){this.words=[0],this.length=1;for(var m=0,C=1;C<=67108863;C*=x)m++;m--,C=C/x|0;for(var d=p.length-M,_=d%m,B=Math.min(d,d-_)+M,u=0,R=M;R<B;R+=m)u=c(p,R,R+m,x),this.imuln(C),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(_!==0){var H=1;for(u=c(p,R,p.length,x),R=0;R<_;R++)H*=x;this.imuln(H),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(p){p.words=new Array(this.length);for(var x=0;x<this.length;x++)p.words[x]=this.words[x];p.length=this.length,p.negative=this.negative,p.red=this.red};function g(p,x){p.words=x.words,p.length=x.length,p.negative=x.negative,p.red=x.red}if(a.prototype._move=function(p){g(p,this)},a.prototype.clone=function(){var p=new a(null);return this.copy(p),p},a.prototype._expand=function(p){for(;this.length<p;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{a.prototype.inspect=A}else a.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var b=["","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"],D=[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],T=[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];a.prototype.toString=function(p,x){p=p||10,x=x|0||1;var M;if(p===16||p==="hex"){M="";for(var m=0,C=0,d=0;d<this.length;d++){var _=this.words[d],B=((_<<m|C)&16777215).toString(16);C=_>>>24-m&16777215,m+=2,m>=26&&(m-=26,d--),C!==0||d!==this.length-1?M=b[6-B.length]+B+M:M=B+M}for(C!==0&&(M=C.toString(16)+M);M.length%x!==0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}if(p===(p|0)&&p>=2&&p<=36){var u=D[p],R=T[p];M="";var H=this.clone();for(H.negative=0;!H.isZero();){var K=H.modrn(R).toString(p);H=H.idivn(R),H.isZero()?M=K+M:M=b[u-K.length]+K+M}for(this.isZero()&&(M="0"+M);M.length%x!==0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var p=this.words[0];return this.length===2?p+=this.words[1]*67108864:this.length===3&&this.words[2]===1?p+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-p:p},a.prototype.toJSON=function(){return this.toString(16,2)},o&&(a.prototype.toBuffer=function(p,x){return this.toArrayLike(o,p,x)}),a.prototype.toArray=function(p,x){return this.toArrayLike(Array,p,x)};var S=function(p,x){return p.allocUnsafe?p.allocUnsafe(x):new p(x)};a.prototype.toArrayLike=function(p,x,M){this._strip();var m=this.byteLength(),C=M||Math.max(1,m);n(m<=C,"byte array longer than desired length"),n(C>0,"Requested array length <= 0");var d=S(p,C),_=x==="le"?"LE":"BE";return this["_toArrayLike"+_](d,m),d},a.prototype._toArrayLikeLE=function(p,x){for(var M=0,m=0,C=0,d=0;C<this.length;C++){var _=this.words[C]<<d|m;p[M++]=_&255,M<p.length&&(p[M++]=_>>8&255),M<p.length&&(p[M++]=_>>16&255),d===6?(M<p.length&&(p[M++]=_>>24&255),m=0,d=0):(m=_>>>24,d+=2)}if(M<p.length)for(p[M++]=m;M<p.length;)p[M++]=0},a.prototype._toArrayLikeBE=function(p,x){for(var M=p.length-1,m=0,C=0,d=0;C<this.length;C++){var _=this.words[C]<<d|m;p[M--]=_&255,M>=0&&(p[M--]=_>>8&255),M>=0&&(p[M--]=_>>16&255),d===6?(M>=0&&(p[M--]=_>>24&255),m=0,d=0):(m=_>>>24,d+=2)}if(M>=0)for(p[M--]=m;M>=0;)p[M--]=0},Math.clz32?a.prototype._countBits=function(p){return 32-Math.clz32(p)}:a.prototype._countBits=function(p){var x=p,M=0;return x>=4096&&(M+=13,x>>>=13),x>=64&&(M+=7,x>>>=7),x>=8&&(M+=4,x>>>=4),x>=2&&(M+=2,x>>>=2),M+x},a.prototype._zeroBits=function(p){if(p===0)return 26;var x=p,M=0;return x&8191||(M+=13,x>>>=13),x&127||(M+=7,x>>>=7),x&15||(M+=4,x>>>=4),x&3||(M+=2,x>>>=2),x&1||M++,M},a.prototype.bitLength=function(){var p=this.words[this.length-1],x=this._countBits(p);return(this.length-1)*26+x};function L(p){for(var x=new Array(p.bitLength()),M=0;M<x.length;M++){var m=M/26|0,C=M%26;x[M]=p.words[m]>>>C&1}return x}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var p=0,x=0;x<this.length;x++){var M=this._zeroBits(this.words[x]);if(p+=M,M!==26)break}return p},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(p){return this.negative!==0?this.abs().inotn(p).iaddn(1):this.clone()},a.prototype.fromTwos=function(p){return this.testn(p-1)?this.notn(p).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(p){for(;this.length<p.length;)this.words[this.length++]=0;for(var x=0;x<p.length;x++)this.words[x]=this.words[x]|p.words[x];return this._strip()},a.prototype.ior=function(p){return n((this.negative|p.negative)===0),this.iuor(p)},a.prototype.or=function(p){return this.length>p.length?this.clone().ior(p):p.clone().ior(this)},a.prototype.uor=function(p){return this.length>p.length?this.clone().iuor(p):p.clone().iuor(this)},a.prototype.iuand=function(p){var x;this.length>p.length?x=p:x=this;for(var M=0;M<x.length;M++)this.words[M]=this.words[M]&p.words[M];return this.length=x.length,this._strip()},a.prototype.iand=function(p){return n((this.negative|p.negative)===0),this.iuand(p)},a.prototype.and=function(p){return this.length>p.length?this.clone().iand(p):p.clone().iand(this)},a.prototype.uand=function(p){return this.length>p.length?this.clone().iuand(p):p.clone().iuand(this)},a.prototype.iuxor=function(p){var x,M;this.length>p.length?(x=this,M=p):(x=p,M=this);for(var m=0;m<M.length;m++)this.words[m]=x.words[m]^M.words[m];if(this!==x)for(;m<x.length;m++)this.words[m]=x.words[m];return this.length=x.length,this._strip()},a.prototype.ixor=function(p){return n((this.negative|p.negative)===0),this.iuxor(p)},a.prototype.xor=function(p){return this.length>p.length?this.clone().ixor(p):p.clone().ixor(this)},a.prototype.uxor=function(p){return this.length>p.length?this.clone().iuxor(p):p.clone().iuxor(this)},a.prototype.inotn=function(p){n(typeof p=="number"&&p>=0);var x=Math.ceil(p/26)|0,M=p%26;this._expand(x),M>0&&x--;for(var m=0;m<x;m++)this.words[m]=~this.words[m]&67108863;return M>0&&(this.words[m]=~this.words[m]&67108863>>26-M),this._strip()},a.prototype.notn=function(p){return this.clone().inotn(p)},a.prototype.setn=function(p,x){n(typeof p=="number"&&p>=0);var M=p/26|0,m=p%26;return this._expand(M+1),x?this.words[M]=this.words[M]|1<<m:this.words[M]=this.words[M]&~(1<<m),this._strip()},a.prototype.iadd=function(p){var x;if(this.negative!==0&&p.negative===0)return this.negative=0,x=this.isub(p),this.negative^=1,this._normSign();if(this.negative===0&&p.negative!==0)return p.negative=0,x=this.isub(p),p.negative=1,x._normSign();var M,m;this.length>p.length?(M=this,m=p):(M=p,m=this);for(var C=0,d=0;d<m.length;d++)x=(M.words[d]|0)+(m.words[d]|0)+C,this.words[d]=x&67108863,C=x>>>26;for(;C!==0&&d<M.length;d++)x=(M.words[d]|0)+C,this.words[d]=x&67108863,C=x>>>26;if(this.length=M.length,C!==0)this.words[this.length]=C,this.length++;else if(M!==this)for(;d<M.length;d++)this.words[d]=M.words[d];return this},a.prototype.add=function(p){var x;return p.negative!==0&&this.negative===0?(p.negative=0,x=this.sub(p),p.negative^=1,x):p.negative===0&&this.negative!==0?(this.negative=0,x=p.sub(this),this.negative=1,x):this.length>p.length?this.clone().iadd(p):p.clone().iadd(this)},a.prototype.isub=function(p){if(p.negative!==0){p.negative=0;var x=this.iadd(p);return p.negative=1,x._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(p),this.negative=1,this._normSign();var M=this.cmp(p);if(M===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,C;M>0?(m=this,C=p):(m=p,C=this);for(var d=0,_=0;_<C.length;_++)x=(m.words[_]|0)-(C.words[_]|0)+d,d=x>>26,this.words[_]=x&67108863;for(;d!==0&&_<m.length;_++)x=(m.words[_]|0)+d,d=x>>26,this.words[_]=x&67108863;if(d===0&&_<m.length&&m!==this)for(;_<m.length;_++)this.words[_]=m.words[_];return this.length=Math.max(this.length,_),m!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(p){return this.clone().isub(p)};function E(p,x,M){M.negative=x.negative^p.negative;var m=p.length+x.length|0;M.length=m,m=m-1|0;var C=p.words[0]|0,d=x.words[0]|0,_=C*d,B=_&67108863,u=_/67108864|0;M.words[0]=B;for(var R=1;R<m;R++){for(var H=u>>>26,K=u&67108863,J=Math.min(R,x.length-1),Q=Math.max(0,R-p.length+1);Q<=J;Q++){var Y=R-Q|0;C=p.words[Y]|0,d=x.words[Q]|0,_=C*d+K,H+=_/67108864|0,K=_&67108863}M.words[R]=K|0,u=H|0}return u!==0?M.words[R]=u|0:M.length--,M._strip()}var v=function(p,x,M){var m=p.words,C=x.words,d=M.words,_=0,B,u,R,H=m[0]|0,K=H&8191,J=H>>>13,Q=m[1]|0,Y=Q&8191,et=Q>>>13,pt=m[2]|0,it=pt&8191,rt=pt>>>13,bt=m[3]|0,tt=bt&8191,X=bt>>>13,$t=m[4]|0,vt=$t&8191,dt=$t>>>13,zt=m[5]|0,gt=zt&8191,mt=zt>>>13,Et=m[6]|0,ot=Et&8191,yt=Et>>>13,Nt=m[7]|0,ht=Nt&8191,ct=Nt>>>13,y=m[8]|0,P=y&8191,k=y>>>13,N=m[9]|0,z=N&8191,G=N>>>13,Z=C[0]|0,at=Z&8191,ft=Z>>>13,wt=C[1]|0,nt=wt&8191,lt=wt>>>13,ce=C[2]|0,xt=ce&8191,Ct=ce>>>13,pe=C[3]|0,At=pe&8191,It=pe>>>13,de=C[4]|0,Mt=de&8191,Pt=de>>>13,me=C[5]|0,Tt=me&8191,_t=me>>>13,ye=C[6]|0,Dt=ye&8191,Bt=ye>>>13,ge=C[7]|0,Lt=ge&8191,kt=ge>>>13,we=C[8]|0,Ft=we&8191,Rt=we>>>13,Ee=C[9]|0,Ot=Ee&8191,Vt=Ee>>>13;M.negative=p.negative^x.negative,M.length=19,B=Math.imul(K,at),u=Math.imul(K,ft),u=u+Math.imul(J,at)|0,R=Math.imul(J,ft);var Kt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,B=Math.imul(Y,at),u=Math.imul(Y,ft),u=u+Math.imul(et,at)|0,R=Math.imul(et,ft),B=B+Math.imul(K,nt)|0,u=u+Math.imul(K,lt)|0,u=u+Math.imul(J,nt)|0,R=R+Math.imul(J,lt)|0;var Wt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,B=Math.imul(it,at),u=Math.imul(it,ft),u=u+Math.imul(rt,at)|0,R=Math.imul(rt,ft),B=B+Math.imul(Y,nt)|0,u=u+Math.imul(Y,lt)|0,u=u+Math.imul(et,nt)|0,R=R+Math.imul(et,lt)|0,B=B+Math.imul(K,xt)|0,u=u+Math.imul(K,Ct)|0,u=u+Math.imul(J,xt)|0,R=R+Math.imul(J,Ct)|0;var Jt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,B=Math.imul(tt,at),u=Math.imul(tt,ft),u=u+Math.imul(X,at)|0,R=Math.imul(X,ft),B=B+Math.imul(it,nt)|0,u=u+Math.imul(it,lt)|0,u=u+Math.imul(rt,nt)|0,R=R+Math.imul(rt,lt)|0,B=B+Math.imul(Y,xt)|0,u=u+Math.imul(Y,Ct)|0,u=u+Math.imul(et,xt)|0,R=R+Math.imul(et,Ct)|0,B=B+Math.imul(K,At)|0,u=u+Math.imul(K,It)|0,u=u+Math.imul(J,At)|0,R=R+Math.imul(J,It)|0;var Xt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,B=Math.imul(vt,at),u=Math.imul(vt,ft),u=u+Math.imul(dt,at)|0,R=Math.imul(dt,ft),B=B+Math.imul(tt,nt)|0,u=u+Math.imul(tt,lt)|0,u=u+Math.imul(X,nt)|0,R=R+Math.imul(X,lt)|0,B=B+Math.imul(it,xt)|0,u=u+Math.imul(it,Ct)|0,u=u+Math.imul(rt,xt)|0,R=R+Math.imul(rt,Ct)|0,B=B+Math.imul(Y,At)|0,u=u+Math.imul(Y,It)|0,u=u+Math.imul(et,At)|0,R=R+Math.imul(et,It)|0,B=B+Math.imul(K,Mt)|0,u=u+Math.imul(K,Pt)|0,u=u+Math.imul(J,Mt)|0,R=R+Math.imul(J,Pt)|0;var Zt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,B=Math.imul(gt,at),u=Math.imul(gt,ft),u=u+Math.imul(mt,at)|0,R=Math.imul(mt,ft),B=B+Math.imul(vt,nt)|0,u=u+Math.imul(vt,lt)|0,u=u+Math.imul(dt,nt)|0,R=R+Math.imul(dt,lt)|0,B=B+Math.imul(tt,xt)|0,u=u+Math.imul(tt,Ct)|0,u=u+Math.imul(X,xt)|0,R=R+Math.imul(X,Ct)|0,B=B+Math.imul(it,At)|0,u=u+Math.imul(it,It)|0,u=u+Math.imul(rt,At)|0,R=R+Math.imul(rt,It)|0,B=B+Math.imul(Y,Mt)|0,u=u+Math.imul(Y,Pt)|0,u=u+Math.imul(et,Mt)|0,R=R+Math.imul(et,Pt)|0,B=B+Math.imul(K,Tt)|0,u=u+Math.imul(K,_t)|0,u=u+Math.imul(J,Tt)|0,R=R+Math.imul(J,_t)|0;var Yt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,B=Math.imul(ot,at),u=Math.imul(ot,ft),u=u+Math.imul(yt,at)|0,R=Math.imul(yt,ft),B=B+Math.imul(gt,nt)|0,u=u+Math.imul(gt,lt)|0,u=u+Math.imul(mt,nt)|0,R=R+Math.imul(mt,lt)|0,B=B+Math.imul(vt,xt)|0,u=u+Math.imul(vt,Ct)|0,u=u+Math.imul(dt,xt)|0,R=R+Math.imul(dt,Ct)|0,B=B+Math.imul(tt,At)|0,u=u+Math.imul(tt,It)|0,u=u+Math.imul(X,At)|0,R=R+Math.imul(X,It)|0,B=B+Math.imul(it,Mt)|0,u=u+Math.imul(it,Pt)|0,u=u+Math.imul(rt,Mt)|0,R=R+Math.imul(rt,Pt)|0,B=B+Math.imul(Y,Tt)|0,u=u+Math.imul(Y,_t)|0,u=u+Math.imul(et,Tt)|0,R=R+Math.imul(et,_t)|0,B=B+Math.imul(K,Dt)|0,u=u+Math.imul(K,Bt)|0,u=u+Math.imul(J,Dt)|0,R=R+Math.imul(J,Bt)|0;var Qt=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,B=Math.imul(ht,at),u=Math.imul(ht,ft),u=u+Math.imul(ct,at)|0,R=Math.imul(ct,ft),B=B+Math.imul(ot,nt)|0,u=u+Math.imul(ot,lt)|0,u=u+Math.imul(yt,nt)|0,R=R+Math.imul(yt,lt)|0,B=B+Math.imul(gt,xt)|0,u=u+Math.imul(gt,Ct)|0,u=u+Math.imul(mt,xt)|0,R=R+Math.imul(mt,Ct)|0,B=B+Math.imul(vt,At)|0,u=u+Math.imul(vt,It)|0,u=u+Math.imul(dt,At)|0,R=R+Math.imul(dt,It)|0,B=B+Math.imul(tt,Mt)|0,u=u+Math.imul(tt,Pt)|0,u=u+Math.imul(X,Mt)|0,R=R+Math.imul(X,Pt)|0,B=B+Math.imul(it,Tt)|0,u=u+Math.imul(it,_t)|0,u=u+Math.imul(rt,Tt)|0,R=R+Math.imul(rt,_t)|0,B=B+Math.imul(Y,Dt)|0,u=u+Math.imul(Y,Bt)|0,u=u+Math.imul(et,Dt)|0,R=R+Math.imul(et,Bt)|0,B=B+Math.imul(K,Lt)|0,u=u+Math.imul(K,kt)|0,u=u+Math.imul(J,Lt)|0,R=R+Math.imul(J,kt)|0;var te=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(te>>>26)|0,te&=67108863,B=Math.imul(P,at),u=Math.imul(P,ft),u=u+Math.imul(k,at)|0,R=Math.imul(k,ft),B=B+Math.imul(ht,nt)|0,u=u+Math.imul(ht,lt)|0,u=u+Math.imul(ct,nt)|0,R=R+Math.imul(ct,lt)|0,B=B+Math.imul(ot,xt)|0,u=u+Math.imul(ot,Ct)|0,u=u+Math.imul(yt,xt)|0,R=R+Math.imul(yt,Ct)|0,B=B+Math.imul(gt,At)|0,u=u+Math.imul(gt,It)|0,u=u+Math.imul(mt,At)|0,R=R+Math.imul(mt,It)|0,B=B+Math.imul(vt,Mt)|0,u=u+Math.imul(vt,Pt)|0,u=u+Math.imul(dt,Mt)|0,R=R+Math.imul(dt,Pt)|0,B=B+Math.imul(tt,Tt)|0,u=u+Math.imul(tt,_t)|0,u=u+Math.imul(X,Tt)|0,R=R+Math.imul(X,_t)|0,B=B+Math.imul(it,Dt)|0,u=u+Math.imul(it,Bt)|0,u=u+Math.imul(rt,Dt)|0,R=R+Math.imul(rt,Bt)|0,B=B+Math.imul(Y,Lt)|0,u=u+Math.imul(Y,kt)|0,u=u+Math.imul(et,Lt)|0,R=R+Math.imul(et,kt)|0,B=B+Math.imul(K,Ft)|0,u=u+Math.imul(K,Rt)|0,u=u+Math.imul(J,Ft)|0,R=R+Math.imul(J,Rt)|0;var ee=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(ee>>>26)|0,ee&=67108863,B=Math.imul(z,at),u=Math.imul(z,ft),u=u+Math.imul(G,at)|0,R=Math.imul(G,ft),B=B+Math.imul(P,nt)|0,u=u+Math.imul(P,lt)|0,u=u+Math.imul(k,nt)|0,R=R+Math.imul(k,lt)|0,B=B+Math.imul(ht,xt)|0,u=u+Math.imul(ht,Ct)|0,u=u+Math.imul(ct,xt)|0,R=R+Math.imul(ct,Ct)|0,B=B+Math.imul(ot,At)|0,u=u+Math.imul(ot,It)|0,u=u+Math.imul(yt,At)|0,R=R+Math.imul(yt,It)|0,B=B+Math.imul(gt,Mt)|0,u=u+Math.imul(gt,Pt)|0,u=u+Math.imul(mt,Mt)|0,R=R+Math.imul(mt,Pt)|0,B=B+Math.imul(vt,Tt)|0,u=u+Math.imul(vt,_t)|0,u=u+Math.imul(dt,Tt)|0,R=R+Math.imul(dt,_t)|0,B=B+Math.imul(tt,Dt)|0,u=u+Math.imul(tt,Bt)|0,u=u+Math.imul(X,Dt)|0,R=R+Math.imul(X,Bt)|0,B=B+Math.imul(it,Lt)|0,u=u+Math.imul(it,kt)|0,u=u+Math.imul(rt,Lt)|0,R=R+Math.imul(rt,kt)|0,B=B+Math.imul(Y,Ft)|0,u=u+Math.imul(Y,Rt)|0,u=u+Math.imul(et,Ft)|0,R=R+Math.imul(et,Rt)|0,B=B+Math.imul(K,Ot)|0,u=u+Math.imul(K,Vt)|0,u=u+Math.imul(J,Ot)|0,R=R+Math.imul(J,Vt)|0;var re=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(re>>>26)|0,re&=67108863,B=Math.imul(z,nt),u=Math.imul(z,lt),u=u+Math.imul(G,nt)|0,R=Math.imul(G,lt),B=B+Math.imul(P,xt)|0,u=u+Math.imul(P,Ct)|0,u=u+Math.imul(k,xt)|0,R=R+Math.imul(k,Ct)|0,B=B+Math.imul(ht,At)|0,u=u+Math.imul(ht,It)|0,u=u+Math.imul(ct,At)|0,R=R+Math.imul(ct,It)|0,B=B+Math.imul(ot,Mt)|0,u=u+Math.imul(ot,Pt)|0,u=u+Math.imul(yt,Mt)|0,R=R+Math.imul(yt,Pt)|0,B=B+Math.imul(gt,Tt)|0,u=u+Math.imul(gt,_t)|0,u=u+Math.imul(mt,Tt)|0,R=R+Math.imul(mt,_t)|0,B=B+Math.imul(vt,Dt)|0,u=u+Math.imul(vt,Bt)|0,u=u+Math.imul(dt,Dt)|0,R=R+Math.imul(dt,Bt)|0,B=B+Math.imul(tt,Lt)|0,u=u+Math.imul(tt,kt)|0,u=u+Math.imul(X,Lt)|0,R=R+Math.imul(X,kt)|0,B=B+Math.imul(it,Ft)|0,u=u+Math.imul(it,Rt)|0,u=u+Math.imul(rt,Ft)|0,R=R+Math.imul(rt,Rt)|0,B=B+Math.imul(Y,Ot)|0,u=u+Math.imul(Y,Vt)|0,u=u+Math.imul(et,Ot)|0,R=R+Math.imul(et,Vt)|0;var ie=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(ie>>>26)|0,ie&=67108863,B=Math.imul(z,xt),u=Math.imul(z,Ct),u=u+Math.imul(G,xt)|0,R=Math.imul(G,Ct),B=B+Math.imul(P,At)|0,u=u+Math.imul(P,It)|0,u=u+Math.imul(k,At)|0,R=R+Math.imul(k,It)|0,B=B+Math.imul(ht,Mt)|0,u=u+Math.imul(ht,Pt)|0,u=u+Math.imul(ct,Mt)|0,R=R+Math.imul(ct,Pt)|0,B=B+Math.imul(ot,Tt)|0,u=u+Math.imul(ot,_t)|0,u=u+Math.imul(yt,Tt)|0,R=R+Math.imul(yt,_t)|0,B=B+Math.imul(gt,Dt)|0,u=u+Math.imul(gt,Bt)|0,u=u+Math.imul(mt,Dt)|0,R=R+Math.imul(mt,Bt)|0,B=B+Math.imul(vt,Lt)|0,u=u+Math.imul(vt,kt)|0,u=u+Math.imul(dt,Lt)|0,R=R+Math.imul(dt,kt)|0,B=B+Math.imul(tt,Ft)|0,u=u+Math.imul(tt,Rt)|0,u=u+Math.imul(X,Ft)|0,R=R+Math.imul(X,Rt)|0,B=B+Math.imul(it,Ot)|0,u=u+Math.imul(it,Vt)|0,u=u+Math.imul(rt,Ot)|0,R=R+Math.imul(rt,Vt)|0;var ne=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(ne>>>26)|0,ne&=67108863,B=Math.imul(z,At),u=Math.imul(z,It),u=u+Math.imul(G,At)|0,R=Math.imul(G,It),B=B+Math.imul(P,Mt)|0,u=u+Math.imul(P,Pt)|0,u=u+Math.imul(k,Mt)|0,R=R+Math.imul(k,Pt)|0,B=B+Math.imul(ht,Tt)|0,u=u+Math.imul(ht,_t)|0,u=u+Math.imul(ct,Tt)|0,R=R+Math.imul(ct,_t)|0,B=B+Math.imul(ot,Dt)|0,u=u+Math.imul(ot,Bt)|0,u=u+Math.imul(yt,Dt)|0,R=R+Math.imul(yt,Bt)|0,B=B+Math.imul(gt,Lt)|0,u=u+Math.imul(gt,kt)|0,u=u+Math.imul(mt,Lt)|0,R=R+Math.imul(mt,kt)|0,B=B+Math.imul(vt,Ft)|0,u=u+Math.imul(vt,Rt)|0,u=u+Math.imul(dt,Ft)|0,R=R+Math.imul(dt,Rt)|0,B=B+Math.imul(tt,Ot)|0,u=u+Math.imul(tt,Vt)|0,u=u+Math.imul(X,Ot)|0,R=R+Math.imul(X,Vt)|0;var se=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(se>>>26)|0,se&=67108863,B=Math.imul(z,Mt),u=Math.imul(z,Pt),u=u+Math.imul(G,Mt)|0,R=Math.imul(G,Pt),B=B+Math.imul(P,Tt)|0,u=u+Math.imul(P,_t)|0,u=u+Math.imul(k,Tt)|0,R=R+Math.imul(k,_t)|0,B=B+Math.imul(ht,Dt)|0,u=u+Math.imul(ht,Bt)|0,u=u+Math.imul(ct,Dt)|0,R=R+Math.imul(ct,Bt)|0,B=B+Math.imul(ot,Lt)|0,u=u+Math.imul(ot,kt)|0,u=u+Math.imul(yt,Lt)|0,R=R+Math.imul(yt,kt)|0,B=B+Math.imul(gt,Ft)|0,u=u+Math.imul(gt,Rt)|0,u=u+Math.imul(mt,Ft)|0,R=R+Math.imul(mt,Rt)|0,B=B+Math.imul(vt,Ot)|0,u=u+Math.imul(vt,Vt)|0,u=u+Math.imul(dt,Ot)|0,R=R+Math.imul(dt,Vt)|0;var ae=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(ae>>>26)|0,ae&=67108863,B=Math.imul(z,Tt),u=Math.imul(z,_t),u=u+Math.imul(G,Tt)|0,R=Math.imul(G,_t),B=B+Math.imul(P,Dt)|0,u=u+Math.imul(P,Bt)|0,u=u+Math.imul(k,Dt)|0,R=R+Math.imul(k,Bt)|0,B=B+Math.imul(ht,Lt)|0,u=u+Math.imul(ht,kt)|0,u=u+Math.imul(ct,Lt)|0,R=R+Math.imul(ct,kt)|0,B=B+Math.imul(ot,Ft)|0,u=u+Math.imul(ot,Rt)|0,u=u+Math.imul(yt,Ft)|0,R=R+Math.imul(yt,Rt)|0,B=B+Math.imul(gt,Ot)|0,u=u+Math.imul(gt,Vt)|0,u=u+Math.imul(mt,Ot)|0,R=R+Math.imul(mt,Vt)|0;var oe=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(oe>>>26)|0,oe&=67108863,B=Math.imul(z,Dt),u=Math.imul(z,Bt),u=u+Math.imul(G,Dt)|0,R=Math.imul(G,Bt),B=B+Math.imul(P,Lt)|0,u=u+Math.imul(P,kt)|0,u=u+Math.imul(k,Lt)|0,R=R+Math.imul(k,kt)|0,B=B+Math.imul(ht,Ft)|0,u=u+Math.imul(ht,Rt)|0,u=u+Math.imul(ct,Ft)|0,R=R+Math.imul(ct,Rt)|0,B=B+Math.imul(ot,Ot)|0,u=u+Math.imul(ot,Vt)|0,u=u+Math.imul(yt,Ot)|0,R=R+Math.imul(yt,Vt)|0;var he=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(he>>>26)|0,he&=67108863,B=Math.imul(z,Lt),u=Math.imul(z,kt),u=u+Math.imul(G,Lt)|0,R=Math.imul(G,kt),B=B+Math.imul(P,Ft)|0,u=u+Math.imul(P,Rt)|0,u=u+Math.imul(k,Ft)|0,R=R+Math.imul(k,Rt)|0,B=B+Math.imul(ht,Ot)|0,u=u+Math.imul(ht,Vt)|0,u=u+Math.imul(ct,Ot)|0,R=R+Math.imul(ct,Vt)|0;var le=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(le>>>26)|0,le&=67108863,B=Math.imul(z,Ft),u=Math.imul(z,Rt),u=u+Math.imul(G,Ft)|0,R=Math.imul(G,Rt),B=B+Math.imul(P,Ot)|0,u=u+Math.imul(P,Vt)|0,u=u+Math.imul(k,Ot)|0,R=R+Math.imul(k,Vt)|0;var ue=(_+B|0)+((u&8191)<<13)|0;_=(R+(u>>>13)|0)+(ue>>>26)|0,ue&=67108863,B=Math.imul(z,Ot),u=Math.imul(z,Vt),u=u+Math.imul(G,Ot)|0,R=Math.imul(G,Vt);var fe=(_+B|0)+((u&8191)<<13)|0;return _=(R+(u>>>13)|0)+(fe>>>26)|0,fe&=67108863,d[0]=Kt,d[1]=Wt,d[2]=Jt,d[3]=Xt,d[4]=Zt,d[5]=Yt,d[6]=Qt,d[7]=te,d[8]=ee,d[9]=re,d[10]=ie,d[11]=ne,d[12]=se,d[13]=ae,d[14]=oe,d[15]=he,d[16]=le,d[17]=ue,d[18]=fe,_!==0&&(d[19]=_,M.length++),M};Math.imul||(v=E);function w(p,x,M){M.negative=x.negative^p.negative,M.length=p.length+x.length;for(var m=0,C=0,d=0;d<M.length-1;d++){var _=C;C=0;for(var B=m&67108863,u=Math.min(d,x.length-1),R=Math.max(0,d-p.length+1);R<=u;R++){var H=d-R,K=p.words[H]|0,J=x.words[R]|0,Q=K*J,Y=Q&67108863;_=_+(Q/67108864|0)|0,Y=Y+B|0,B=Y&67108863,_=_+(Y>>>26)|0,C+=_>>>26,_&=67108863}M.words[d]=B,m=_,_=C}return m!==0?M.words[d]=m:M.length--,M._strip()}function I(p,x,M){return w(p,x,M)}a.prototype.mulTo=function(p,x){var M,m=this.length+p.length;return this.length===10&&p.length===10?M=v(this,p,x):m<63?M=E(this,p,x):m<1024?M=w(this,p,x):M=I(this,p,x),M},a.prototype.mul=function(p){var x=new a(null);return x.words=new Array(this.length+p.length),this.mulTo(p,x)},a.prototype.mulf=function(p){var x=new a(null);return x.words=new Array(this.length+p.length),I(this,p,x)},a.prototype.imul=function(p){return this.clone().mulTo(p,this)},a.prototype.imuln=function(p){var x=p<0;x&&(p=-p),n(typeof p=="number"),n(p<67108864);for(var M=0,m=0;m<this.length;m++){var C=(this.words[m]|0)*p,d=(C&67108863)+(M&67108863);M>>=26,M+=C/67108864|0,M+=d>>>26,this.words[m]=d&67108863}return M!==0&&(this.words[m]=M,this.length++),x?this.ineg():this},a.prototype.muln=function(p){return this.clone().imuln(p)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(p){var x=L(p);if(x.length===0)return new a(1);for(var M=this,m=0;m<x.length&&x[m]===0;m++,M=M.sqr());if(++m<x.length)for(var C=M.sqr();m<x.length;m++,C=C.sqr())x[m]!==0&&(M=M.mul(C));return M},a.prototype.iushln=function(p){n(typeof p=="number"&&p>=0);var x=p%26,M=(p-x)/26,m=67108863>>>26-x<<26-x,C;if(x!==0){var d=0;for(C=0;C<this.length;C++){var _=this.words[C]&m,B=(this.words[C]|0)-_<<x;this.words[C]=B|d,d=_>>>26-x}d&&(this.words[C]=d,this.length++)}if(M!==0){for(C=this.length-1;C>=0;C--)this.words[C+M]=this.words[C];for(C=0;C<M;C++)this.words[C]=0;this.length+=M}return this._strip()},a.prototype.ishln=function(p){return n(this.negative===0),this.iushln(p)},a.prototype.iushrn=function(p,x,M){n(typeof p=="number"&&p>=0);var m;x?m=(x-x%26)/26:m=0;var C=p%26,d=Math.min((p-C)/26,this.length),_=67108863^67108863>>>C<<C,B=M;if(m-=d,m=Math.max(0,m),B){for(var u=0;u<d;u++)B.words[u]=this.words[u];B.length=d}if(d!==0)if(this.length>d)for(this.length-=d,u=0;u<this.length;u++)this.words[u]=this.words[u+d];else this.words[0]=0,this.length=1;var R=0;for(u=this.length-1;u>=0&&(R!==0||u>=m);u--){var H=this.words[u]|0;this.words[u]=R<<26-C|H>>>C,R=H&_}return B&&R!==0&&(B.words[B.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(p,x,M){return n(this.negative===0),this.iushrn(p,x,M)},a.prototype.shln=function(p){return this.clone().ishln(p)},a.prototype.ushln=function(p){return this.clone().iushln(p)},a.prototype.shrn=function(p){return this.clone().ishrn(p)},a.prototype.ushrn=function(p){return this.clone().iushrn(p)},a.prototype.testn=function(p){n(typeof p=="number"&&p>=0);var x=p%26,M=(p-x)/26,m=1<<x;if(this.length<=M)return!1;var C=this.words[M];return!!(C&m)},a.prototype.imaskn=function(p){n(typeof p=="number"&&p>=0);var x=p%26,M=(p-x)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=M)return this;if(x!==0&&M++,this.length=Math.min(M,this.length),x!==0){var m=67108863^67108863>>>x<<x;this.words[this.length-1]&=m}return this._strip()},a.prototype.maskn=function(p){return this.clone().imaskn(p)},a.prototype.iaddn=function(p){return n(typeof p=="number"),n(p<67108864),p<0?this.isubn(-p):this.negative!==0?this.length===1&&(this.words[0]|0)<=p?(this.words[0]=p-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(p),this.negative=1,this):this._iaddn(p)},a.prototype._iaddn=function(p){this.words[0]+=p;for(var x=0;x<this.length&&this.words[x]>=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},a.prototype.isubn=function(p){if(n(typeof p=="number"),n(p<67108864),p<0)return this.iaddn(-p);if(this.negative!==0)return this.negative=0,this.iaddn(p),this.negative=1,this;if(this.words[0]-=p,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x<this.length&&this.words[x]<0;x++)this.words[x]+=67108864,this.words[x+1]-=1;return this._strip()},a.prototype.addn=function(p){return this.clone().iaddn(p)},a.prototype.subn=function(p){return this.clone().isubn(p)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(p,x,M){var m=p.length+M,C;this._expand(m);var d,_=0;for(C=0;C<p.length;C++){d=(this.words[C+M]|0)+_;var B=(p.words[C]|0)*x;d-=B&67108863,_=(d>>26)-(B/67108864|0),this.words[C+M]=d&67108863}for(;C<this.length-M;C++)d=(this.words[C+M]|0)+_,_=d>>26,this.words[C+M]=d&67108863;if(_===0)return this._strip();for(n(_===-1),_=0,C=0;C<this.length;C++)d=-(this.words[C]|0)+_,_=d>>26,this.words[C]=d&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(p,x){var M=this.length-p.length,m=this.clone(),C=p,d=C.words[C.length-1]|0,_=this._countBits(d);M=26-_,M!==0&&(C=C.ushln(M),m.iushln(M),d=C.words[C.length-1]|0);var B=m.length-C.length,u;if(x!=="mod"){u=new a(null),u.length=B+1,u.words=new Array(u.length);for(var R=0;R<u.length;R++)u.words[R]=0}var H=m.clone()._ishlnsubmul(C,1,B);H.negative===0&&(m=H,u&&(u.words[B]=1));for(var K=B-1;K>=0;K--){var J=(m.words[C.length+K]|0)*67108864+(m.words[C.length+K-1]|0);for(J=Math.min(J/d|0,67108863),m._ishlnsubmul(C,J,K);m.negative!==0;)J--,m.negative=0,m._ishlnsubmul(C,1,K),m.isZero()||(m.negative^=1);u&&(u.words[K]=J)}return u&&u._strip(),m._strip(),x!=="div"&&M!==0&&m.iushrn(M),{div:u||null,mod:m}},a.prototype.divmod=function(p,x,M){if(n(!p.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var m,C,d;return this.negative!==0&&p.negative===0?(d=this.neg().divmod(p,x),x!=="mod"&&(m=d.div.neg()),x!=="div"&&(C=d.mod.neg(),M&&C.negative!==0&&C.iadd(p)),{div:m,mod:C}):this.negative===0&&p.negative!==0?(d=this.divmod(p.neg(),x),x!=="mod"&&(m=d.div.neg()),{div:m,mod:d.mod}):this.negative&p.negative?(d=this.neg().divmod(p.neg(),x),x!=="div"&&(C=d.mod.neg(),M&&C.negative!==0&&C.isub(p)),{div:d.div,mod:C}):p.length>this.length||this.cmp(p)<0?{div:new a(0),mod:this}:p.length===1?x==="div"?{div:this.divn(p.words[0]),mod:null}:x==="mod"?{div:null,mod:new a(this.modrn(p.words[0]))}:{div:this.divn(p.words[0]),mod:new a(this.modrn(p.words[0]))}:this._wordDiv(p,x)},a.prototype.div=function(p){return this.divmod(p,"div",!1).div},a.prototype.mod=function(p){return this.divmod(p,"mod",!1).mod},a.prototype.umod=function(p){return this.divmod(p,"mod",!0).mod},a.prototype.divRound=function(p){var x=this.divmod(p);if(x.mod.isZero())return x.div;var M=x.div.negative!==0?x.mod.isub(p):x.mod,m=p.ushrn(1),C=p.andln(1),d=M.cmp(m);return d<0||C===1&&d===0?x.div:x.div.negative!==0?x.div.isubn(1):x.div.iaddn(1)},a.prototype.modrn=function(p){var x=p<0;x&&(p=-p),n(p<=67108863);for(var M=(1<<26)%p,m=0,C=this.length-1;C>=0;C--)m=(M*m+(this.words[C]|0))%p;return x?-m:m},a.prototype.modn=function(p){return this.modrn(p)},a.prototype.idivn=function(p){var x=p<0;x&&(p=-p),n(p<=67108863);for(var M=0,m=this.length-1;m>=0;m--){var C=(this.words[m]|0)+M*67108864;this.words[m]=C/p|0,M=C%p}return this._strip(),x?this.ineg():this},a.prototype.divn=function(p){return this.clone().idivn(p)},a.prototype.egcd=function(p){n(p.negative===0),n(!p.isZero());var x=this,M=p.clone();x.negative!==0?x=x.umod(p):x=x.clone();for(var m=new a(1),C=new a(0),d=new a(0),_=new a(1),B=0;x.isEven()&&M.isEven();)x.iushrn(1),M.iushrn(1),++B;for(var u=M.clone(),R=x.clone();!x.isZero();){for(var H=0,K=1;!(x.words[0]&K)&&H<26;++H,K<<=1);if(H>0)for(x.iushrn(H);H-- >0;)(m.isOdd()||C.isOdd())&&(m.iadd(u),C.isub(R)),m.iushrn(1),C.iushrn(1);for(var J=0,Q=1;!(M.words[0]&Q)&&J<26;++J,Q<<=1);if(J>0)for(M.iushrn(J);J-- >0;)(d.isOdd()||_.isOdd())&&(d.iadd(u),_.isub(R)),d.iushrn(1),_.iushrn(1);x.cmp(M)>=0?(x.isub(M),m.isub(d),C.isub(_)):(M.isub(x),d.isub(m),_.isub(C))}return{a:d,b:_,gcd:M.iushln(B)}},a.prototype._invmp=function(p){n(p.negative===0),n(!p.isZero());var x=this,M=p.clone();x.negative!==0?x=x.umod(p):x=x.clone();for(var m=new a(1),C=new a(0),d=M.clone();x.cmpn(1)>0&&M.cmpn(1)>0;){for(var _=0,B=1;!(x.words[0]&B)&&_<26;++_,B<<=1);if(_>0)for(x.iushrn(_);_-- >0;)m.isOdd()&&m.iadd(d),m.iushrn(1);for(var u=0,R=1;!(M.words[0]&R)&&u<26;++u,R<<=1);if(u>0)for(M.iushrn(u);u-- >0;)C.isOdd()&&C.iadd(d),C.iushrn(1);x.cmp(M)>=0?(x.isub(M),m.isub(C)):(M.isub(x),C.isub(m))}var H;return x.cmpn(1)===0?H=m:H=C,H.cmpn(0)<0&&H.iadd(p),H},a.prototype.gcd=function(p){if(this.isZero())return p.abs();if(p.isZero())return this.abs();var x=this.clone(),M=p.clone();x.negative=0,M.negative=0;for(var m=0;x.isEven()&&M.isEven();m++)x.iushrn(1),M.iushrn(1);do{for(;x.isEven();)x.iushrn(1);for(;M.isEven();)M.iushrn(1);var C=x.cmp(M);if(C<0){var d=x;x=M,M=d}else if(C===0||M.cmpn(1)===0)break;x.isub(M)}while(!0);return M.iushln(m)},a.prototype.invm=function(p){return this.egcd(p).a.umod(p)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(p){return this.words[0]&p},a.prototype.bincn=function(p){n(typeof p=="number");var x=p%26,M=(p-x)/26,m=1<<x;if(this.length<=M)return this._expand(M+1),this.words[M]|=m,this;for(var C=m,d=M;C!==0&&d<this.length;d++){var _=this.words[d]|0;_+=C,C=_>>>26,_&=67108863,this.words[d]=_}return C!==0&&(this.words[d]=C,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(p){var x=p<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;this._strip();var M;if(this.length>1)M=1;else{x&&(p=-p),n(p<=67108863,"Number is too big");var m=this.words[0]|0;M=m===p?0:m<p?-1:1}return this.negative!==0?-M|0:M},a.prototype.cmp=function(p){if(this.negative!==0&&p.negative===0)return-1;if(this.negative===0&&p.negative!==0)return 1;var x=this.ucmp(p);return this.negative!==0?-x|0:x},a.prototype.ucmp=function(p){if(this.length>p.length)return 1;if(this.length<p.length)return-1;for(var x=0,M=this.length-1;M>=0;M--){var m=this.words[M]|0,C=p.words[M]|0;if(m!==C){m<C?x=-1:m>C&&(x=1);break}}return x},a.prototype.gtn=function(p){return this.cmpn(p)===1},a.prototype.gt=function(p){return this.cmp(p)===1},a.prototype.gten=function(p){return this.cmpn(p)>=0},a.prototype.gte=function(p){return this.cmp(p)>=0},a.prototype.ltn=function(p){return this.cmpn(p)===-1},a.prototype.lt=function(p){return this.cmp(p)===-1},a.prototype.lten=function(p){return this.cmpn(p)<=0},a.prototype.lte=function(p){return this.cmp(p)<=0},a.prototype.eqn=function(p){return this.cmpn(p)===0},a.prototype.eq=function(p){return this.cmp(p)===0},a.red=function(p){return new q(p)},a.prototype.toRed=function(p){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),p.convertTo(this)._forceRed(p)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(p){return this.red=p,this},a.prototype.forceRed=function(p){return n(!this.red,"Already a number in reduction context"),this._forceRed(p)},a.prototype.redAdd=function(p){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,p)},a.prototype.redIAdd=function(p){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,p)},a.prototype.redSub=function(p){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,p)},a.prototype.redISub=function(p){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,p)},a.prototype.redShl=function(p){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,p)},a.prototype.redMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.mul(this,p)},a.prototype.redIMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.imul(this,p)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(p){return n(this.red&&!p.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,p)};var F={k256:null,p224:null,p192:null,p25519:null};function O(p,x){this.name=p,this.p=new a(x,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var p=new a(null);return p.words=new Array(Math.ceil(this.n/13)),p},O.prototype.ireduce=function(p){var x=p,M;do this.split(x,this.tmp),x=this.imulK(x),x=x.iadd(this.tmp),M=x.bitLength();while(M>this.n);var m=M<this.n?-1:x.ucmp(this.p);return m===0?(x.words[0]=0,x.length=1):m>0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},O.prototype.split=function(p,x){p.iushrn(this.n,0,x)},O.prototype.imulK=function(p){return p.imul(this.k)};function V(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(V,O),V.prototype.split=function(p,x){for(var M=4194303,m=Math.min(p.length,9),C=0;C<m;C++)x.words[C]=p.words[C];if(x.length=m,p.length<=9){p.words[0]=0,p.length=1;return}var d=p.words[9];for(x.words[x.length++]=d&M,C=10;C<p.length;C++){var _=p.words[C]|0;p.words[C-10]=(_&M)<<4|d>>>22,d=_}d>>>=22,p.words[C-10]=d,d===0&&p.length>10?p.length-=10:p.length-=9},V.prototype.imulK=function(p){p.words[p.length]=0,p.words[p.length+1]=0,p.length+=2;for(var x=0,M=0;M<p.length;M++){var m=p.words[M]|0;x+=m*977,p.words[M]=x&67108863,x=m*64+(x/67108864|0)}return p.words[p.length-1]===0&&(p.length--,p.words[p.length-1]===0&&p.length--),p};function $(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s($,O);function j(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(j,O);function W(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(W,O),W.prototype.imulK=function(p){for(var x=0,M=0;M<p.length;M++){var m=(p.words[M]|0)*19+x,C=m&67108863;m>>>=26,p.words[M]=C,x=m}return x!==0&&(p.words[p.length++]=x),p},a._prime=function(p){if(F[p])return F[p];var x;if(p==="k256")x=new V;else if(p==="p224")x=new $;else if(p==="p192")x=new j;else if(p==="p25519")x=new W;else throw new Error("Unknown prime "+p);return F[p]=x,x};function q(p){if(typeof p=="string"){var x=a._prime(p);this.m=x.p,this.prime=x}else n(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}q.prototype._verify1=function(p){n(p.negative===0,"red works only with positives"),n(p.red,"red works only with red numbers")},q.prototype._verify2=function(p,x){n((p.negative|x.negative)===0,"red works only with positives"),n(p.red&&p.red===x.red,"red works only with red numbers")},q.prototype.imod=function(p){return this.prime?this.prime.ireduce(p)._forceRed(this):(g(p,p.umod(this.m)._forceRed(this)),p)},q.prototype.neg=function(p){return p.isZero()?p.clone():this.m.sub(p)._forceRed(this)},q.prototype.add=function(p,x){this._verify2(p,x);var M=p.add(x);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},q.prototype.iadd=function(p,x){this._verify2(p,x);var M=p.iadd(x);return M.cmp(this.m)>=0&&M.isub(this.m),M},q.prototype.sub=function(p,x){this._verify2(p,x);var M=p.sub(x);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},q.prototype.isub=function(p,x){this._verify2(p,x);var M=p.isub(x);return M.cmpn(0)<0&&M.iadd(this.m),M},q.prototype.shl=function(p,x){return this._verify1(p),this.imod(p.ushln(x))},q.prototype.imul=function(p,x){return this._verify2(p,x),this.imod(p.imul(x))},q.prototype.mul=function(p,x){return this._verify2(p,x),this.imod(p.mul(x))},q.prototype.isqr=function(p){return this.imul(p,p.clone())},q.prototype.sqr=function(p){return this.mul(p,p)},q.prototype.sqrt=function(p){if(p.isZero())return p.clone();var x=this.m.andln(3);if(n(x%2===1),x===3){var M=this.m.add(new a(1)).iushrn(2);return this.pow(p,M)}for(var m=this.m.subn(1),C=0;!m.isZero()&&m.andln(1)===0;)C++,m.iushrn(1);n(!m.isZero());var d=new a(1).toRed(this),_=d.redNeg(),B=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);this.pow(u,B).cmp(_)!==0;)u.redIAdd(_);for(var R=this.pow(u,m),H=this.pow(p,m.addn(1).iushrn(1)),K=this.pow(p,m),J=C;K.cmp(d)!==0;){for(var Q=K,Y=0;Q.cmp(d)!==0;Y++)Q=Q.redSqr();n(Y<J);var et=this.pow(R,new a(1).iushln(J-Y-1));H=H.redMul(et),R=et.redSqr(),K=K.redMul(R),J=Y}return H},q.prototype.invm=function(p){var x=p._invmp(this.m);return x.negative!==0?(x.negative=0,this.imod(x).redNeg()):this.imod(x)},q.prototype.pow=function(p,x){if(x.isZero())return new a(1).toRed(this);if(x.cmpn(1)===0)return p.clone();var M=4,m=new Array(1<<M);m[0]=new a(1).toRed(this),m[1]=p;for(var C=2;C<m.length;C++)m[C]=this.mul(m[C-1],p);var d=m[0],_=0,B=0,u=x.bitLength()%26;for(u===0&&(u=26),C=x.length-1;C>=0;C--){for(var R=x.words[C],H=u-1;H>=0;H--){var K=R>>H&1;if(d!==m[0]&&(d=this.sqr(d)),K===0&&_===0){B=0;continue}_<<=1,_|=K,B++,!(B!==M&&(C!==0||H!==0))&&(d=this.mul(d,m[_]),B=0,_=0)}u=26}return d},q.prototype.convertTo=function(p){var x=p.umod(this.m);return x===p?x.clone():x},q.prototype.convertFrom=function(p){var x=p.clone();return x.red=null,x},a.mont=function(p){return new U(p)};function U(p){q.call(this,p),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}s(U,q),U.prototype.convertTo=function(p){return this.imod(p.ushln(this.shift))},U.prototype.convertFrom=function(p){var x=this.imod(p.mul(this.rinv));return x.red=null,x},U.prototype.imul=function(p,x){if(p.isZero()||x.isZero())return p.words[0]=0,p.length=1,p;var M=p.imul(x),m=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=M.isub(m).iushrn(this.shift),d=C;return C.cmp(this.m)>=0?d=C.isub(this.m):C.cmpn(0)<0&&(d=C.iadd(this.m)),d._forceRed(this)},U.prototype.mul=function(p,x){if(p.isZero()||x.isZero())return new a(0)._forceRed(this);var M=p.mul(x),m=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=M.isub(m).iushrn(this.shift),d=C;return C.cmp(this.m)>=0?d=C.isub(this.m):C.cmpn(0)<0&&(d=C.iadd(this.m)),d._forceRed(this)},U.prototype.invm=function(p){var x=this.imod(p._invmp(this.m).mul(this.r2));return x._forceRed(this)}})(t,commonjsGlobal)})(bn);var bnExports=bn.exports;const BN=getDefaultExportFromCjs(bnExports);var safeBuffer={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=buffer,n=r.Buffer;function s(o,l){for(var h in o)l[h]=o[h]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=a);function a(o,l,h){return n(o,l,h)}a.prototype=Object.create(n.prototype),s(n,a),a.from=function(o,l,h){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,l,h)},a.alloc=function(o,l,h){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=n(o);return l!==void 0?typeof h=="string"?c.fill(l,h):c.fill(l):c.fill(0),c},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(safeBuffer,safeBuffer.exports);var safeBufferExports=safeBuffer.exports,_Buffer=safeBufferExports.Buffer;function base(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var s=t.charAt(n),a=s.charCodeAt(0);if(e[a]!==255)throw new TypeError(s+" is ambiguous");e[a]=n}var o=t.length,l=t.charAt(0),h=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function g(D){if((Array.isArray(D)||D instanceof Uint8Array)&&(D=_Buffer.from(D)),!_Buffer.isBuffer(D))throw new TypeError("Expected Buffer");if(D.length===0)return"";for(var T=0,S=0,L=0,E=D.length;L!==E&&D[L]===0;)L++,T++;for(var v=(E-L)*c+1>>>0,w=new Uint8Array(v);L!==E;){for(var I=D[L],F=0,O=v-1;(I!==0||F<S)&&O!==-1;O--,F++)I+=256*w[O]>>>0,w[O]=I%o>>>0,I=I/o>>>0;if(I!==0)throw new Error("Non-zero carry");S=F,L++}for(var V=v-S;V!==v&&w[V]===0;)V++;for(var $=l.repeat(T);V<v;++V)$+=t.charAt(w[V]);return $}function A(D){if(typeof D!="string")throw new TypeError("Expected String");if(D.length===0)return _Buffer.alloc(0);for(var T=0,S=0,L=0;D[T]===l;)S++,T++;for(var E=(D.length-T)*h+1>>>0,v=new Uint8Array(E);T<D.length;){var w=e[D.charCodeAt(T)];if(w===255)return;for(var I=0,F=E-1;(w!==0||I<L)&&F!==-1;F--,I++)w+=o*v[F]>>>0,v[F]=w%256>>>0,w=w/256>>>0;if(w!==0)throw new Error("Non-zero carry");L=I,T++}for(var O=E-L;O!==E&&v[O]===0;)O++;var V=_Buffer.allocUnsafe(S+(E-O));V.fill(0,0,S);for(var $=S;O!==E;)V[$++]=v[O++];return V}function b(D){var T=A(D);if(T)return T;throw new Error("Non-base"+o+" character")}return{encode:g,decodeUnsafe:A,decode:b}}var src=base,basex=src,ALPHABET="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",bs58=basex(ALPHABET);const bs58$1=getDefaultExportFromCjs(bs58),SHA256_K=new Uint32Array([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]),SHA256_IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SHA256_W=new Uint32Array(64);class SHA256 extends HashMD{constructor(){super(64,32,8,!1),this.A=SHA256_IV[0]|0,this.B=SHA256_IV[1]|0,this.C=SHA256_IV[2]|0,this.D=SHA256_IV[3]|0,this.E=SHA256_IV[4]|0,this.F=SHA256_IV[5]|0,this.G=SHA256_IV[6]|0,this.H=SHA256_IV[7]|0}get(){const{A:e,B:r,C:n,D:s,E:a,F:o,G:l,H:h}=this;return[e,r,n,s,a,o,l,h]}set(e,r,n,s,a,o,l,h){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=l|0,this.H=h|0}process(e,r){for(let A=0;A<16;A++,r+=4)SHA256_W[A]=e.getUint32(r,!1);for(let A=16;A<64;A++){const b=SHA256_W[A-15],D=SHA256_W[A-2],T=rotr(b,7)^rotr(b,18)^b>>>3,S=rotr(D,17)^rotr(D,19)^D>>>10;SHA256_W[A]=S+SHA256_W[A-7]+T+SHA256_W[A-16]|0}let{A:n,B:s,C:a,D:o,E:l,F:h,G:c,H:g}=this;for(let A=0;A<64;A++){const b=rotr(l,6)^rotr(l,11)^rotr(l,25),D=g+b+Chi(l,h,c)+SHA256_K[A]+SHA256_W[A]|0,T=(rotr(n,2)^rotr(n,13)^rotr(n,22))+Maj(n,s,a)|0;g=c,c=h,h=l,l=o+D|0,o=a,a=s,s=n,n=D+T|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,l=l+this.E|0,h=h+this.F|0,c=c+this.G|0,g=g+this.H|0,this.set(n,s,a,o,l,h,c,g)}roundClean(){SHA256_W.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const sha256=wrapConstructor(()=>new SHA256);var dist={},browser$1={exports:{}},process=browser$1.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(t){if(cachedSetTimeout===setTimeout)return setTimeout(t,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(t,0);try{return cachedSetTimeout(t,0)}catch{try{return cachedSetTimeout.call(null,t,0)}catch{return cachedSetTimeout.call(this,t,0)}}}function runClearTimeout(t){if(cachedClearTimeout===clearTimeout)return clearTimeout(t);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(t);try{return cachedClearTimeout(t)}catch{try{return cachedClearTimeout.call(null,t)}catch{return cachedClearTimeout.call(this,t)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var t=runTimeout(cleanUpNextTick);draining=!0;for(var e=queue.length;e;){for(currentQueue=queue,queue=[];++queueIndex<e;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,e=queue.length}currentQueue=null,draining=!1,runClearTimeout(t)}}process.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];queue.push(new Item(t,e)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(t,e){this.fun=t,this.array=e}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(t){return[]};process.binding=function(t){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(t){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$1.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=buffer,r=browserExports,n=o=>o&&o.__esModule?o:{default:o},s=n(r),a=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>s.default}),t.global=a})(dist);var lib={};function inRange(t,e,r){return e<=t&&t<=r}function ToDictionary(t){if(t===void 0)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function stringToCodePoints(t){for(var e=String(t),r=e.length,n=0,s=[];n<r;){var a=e.charCodeAt(n);if(a<55296||a>57343)s.push(a);else if(56320<=a&&a<=57343)s.push(65533);else if(55296<=a&&a<=56319)if(n===r-1)s.push(65533);else{var o=t.charCodeAt(n+1);if(56320<=o&&o<=57343){var l=a&1023,h=o&1023;s.push(65536+(l<<10)+h),n+=1}else s.push(65533)}n+=1}return s}function codePointsToString(t){for(var e="",r=0;r<t.length;++r){var n=t[r];n<=65535?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode((n>>10)+55296,(n&1023)+56320))}return e}var end_of_stream=-1;function Stream(t){this.tokens=[].slice.call(t)}Stream.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():end_of_stream},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var finished=-1;function decoderError(t,e){if(t)throw TypeError("Decoder error");return e||65533}var DEFAULT_ENCODING="utf-8";function TextDecoder$1(t,e){if(!(this instanceof TextDecoder$1))return new TextDecoder$1(t,e);if(t=t!==void 0?String(t).toLowerCase():DEFAULT_ENCODING,t!==DEFAULT_ENCODING)throw new Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}TextDecoder$1.prototype={decode:function(t,e){var r;typeof t=="object"&&t instanceof ArrayBuffer?r=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):r=new Uint8Array(0),e=ToDictionary(e),this._streaming||(this._decoder=new UTF8Decoder({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var n=new Stream(r),s=[],a;!n.endOfStream()&&(a=this._decoder.handler(n,n.read()),a!==finished);)a!==null&&(Array.isArray(a)?s.push.apply(s,a):s.push(a));if(!this._streaming){do{if(a=this._decoder.handler(n,n.read()),a===finished)break;a!==null&&(Array.isArray(a)?s.push.apply(s,a):s.push(a))}while(!n.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),codePointsToString(s)}};function TextEncoder$1(t,e){if(!(this instanceof TextEncoder$1))return new TextEncoder$1(t,e);if(t=t!==void 0?String(t).toLowerCase():DEFAULT_ENCODING,t!==DEFAULT_ENCODING)throw new Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}TextEncoder$1.prototype={encode:function(t,e){t=t?String(t):"",e=ToDictionary(e),this._streaming||(this._encoder=new UTF8Encoder(this._options)),this._streaming=!!e.stream;for(var r=[],n=new Stream(stringToCodePoints(t)),s;!n.endOfStream()&&(s=this._encoder.handler(n,n.read()),s!==finished);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(n,n.read()),s!==finished;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)}};function UTF8Decoder(t){var e=t.fatal,r=0,n=0,s=0,a=128,o=191;this.handler=function(l,h){if(h===end_of_stream&&s!==0)return s=0,decoderError(e);if(h===end_of_stream)return finished;if(s===0){if(inRange(h,0,127))return h;if(inRange(h,194,223))s=1,r=h-192;else if(inRange(h,224,239))h===224&&(a=160),h===237&&(o=159),s=2,r=h-224;else if(inRange(h,240,244))h===240&&(a=144),h===244&&(o=143),s=3,r=h-240;else return decoderError(e);return r=r<<6*s,null}if(!inRange(h,a,o))return r=s=n=0,a=128,o=191,l.prepend(h),decoderError(e);if(a=128,o=191,n+=1,r+=h-128<<6*(s-n),n!==s)return null;var c=r;return r=s=n=0,c}}function UTF8Encoder(t){t.fatal,this.handler=function(e,r){if(r===end_of_stream)return finished;if(inRange(r,0,127))return r;var n,s;inRange(r,128,2047)?(n=1,s=192):inRange(r,2048,65535)?(n=2,s=224):inRange(r,65536,1114111)&&(n=3,s=240);for(var a=[(r>>6*n)+s];n>0;){var o=r>>6*(n-1);a.push(128|o&63),n-=1}return a}}const encoding$1=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:TextDecoder$1,TextEncoder:TextEncoder$1},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(encoding$1);var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__decorate=commonjsGlobal&&commonjsGlobal.__decorate||function(t,e,r,n){var s=arguments.length,a=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(e,r,a):o(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a},__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&__createBinding(e,t,r);return __setModuleDefault(e,t),e},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lib,"__esModule",{value:!0});var deserializeUnchecked_1=lib.deserializeUnchecked=deserialize_1=lib.deserialize=serialize_1=lib.serialize=lib.BinaryReader=lib.BinaryWriter=lib.BorshError=lib.baseDecode=lib.baseEncode=void 0;const bn_js_1=__importDefault(bnExports),bs58_1=__importDefault(bs58),encoding=__importStar(require$$2),ResolvedTextDecoder=typeof TextDecoder!="function"?encoding.TextDecoder:TextDecoder,textDecoder=new ResolvedTextDecoder("utf-8",{fatal:!0});function baseEncode(t){return typeof t=="string"&&(t=dist.Buffer.from(t,"utf8")),bs58_1.default.encode(dist.Buffer.from(t))}lib.baseEncode=baseEncode;function baseDecode(t){return dist.Buffer.from(bs58_1.default.decode(t))}lib.baseDecode=baseDecode;const INITIAL_LENGTH=1024;class BorshError extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}lib.BorshError=BorshError;class BinaryWriter{constructor(){this.buf=dist.Buffer.alloc(INITIAL_LENGTH),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=dist.Buffer.concat([this.buf,dist.Buffer.alloc(INITIAL_LENGTH)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(dist.Buffer.from(new bn_js_1.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(dist.Buffer.from(new bn_js_1.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(dist.Buffer.from(new bn_js_1.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(dist.Buffer.from(new bn_js_1.default(e).toArray("le",64)))}writeBuffer(e){this.buf=dist.Buffer.concat([dist.Buffer.from(this.buf.subarray(0,this.length)),e,dist.Buffer.alloc(INITIAL_LENGTH)]),this.length+=e.length}writeString(e){this.maybeResize();const r=dist.Buffer.from(e,"utf8");this.writeU32(r.length),this.writeBuffer(r)}writeFixedArray(e){this.writeBuffer(dist.Buffer.from(e))}writeArray(e,r){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),r(n)}toArray(){return this.buf.subarray(0,this.length)}}lib.BinaryWriter=BinaryWriter;function handlingRangeError(t,e,r){const n=r.value;r.value=function(...s){try{return n.apply(this,s)}catch(a){if(a instanceof RangeError){const o=a.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(o)>=0)throw new BorshError("Reached the end of buffer when deserializing")}throw a}}}class BinaryReader{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new bn_js_1.default(e,"le")}readU128(){const e=this.readBuffer(16);return new bn_js_1.default(e,"le")}readU256(){const e=this.readBuffer(32);return new bn_js_1.default(e,"le")}readU512(){const e=this.readBuffer(64);return new bn_js_1.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new BorshError(`Expected buffer length ${e} isn't within bounds`);const r=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,r}readString(){const e=this.readU32(),r=this.readBuffer(e);try{return textDecoder.decode(r)}catch(n){throw new BorshError(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const r=this.readU32(),n=Array();for(let s=0;s<r;++s)n.push(e());return n}}__decorate([handlingRangeError],BinaryReader.prototype,"readU8",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU16",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU32",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU64",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU128",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU256",null);__decorate([handlingRangeError],BinaryReader.prototype,"readU512",null);__decorate([handlingRangeError],BinaryReader.prototype,"readString",null);__decorate([handlingRangeError],BinaryReader.prototype,"readFixedArray",null);__decorate([handlingRangeError],BinaryReader.prototype,"readArray",null);lib.BinaryReader=BinaryReader;function capitalizeFirstLetter(t){return t.charAt(0).toUpperCase()+t.slice(1)}function serializeField(t,e,r,n,s){try{if(typeof n=="string")s[`write${capitalizeFirstLetter(n)}`](r);else if(n instanceof Array)if(typeof n[0]=="number"){if(r.length!==n[0])throw new BorshError(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);s.writeFixedArray(r)}else if(n.length===2&&typeof n[1]=="number"){if(r.length!==n[1])throw new BorshError(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let a=0;a<n[1];a++)serializeField(t,null,r[a],n[0],s)}else s.writeArray(r,a=>{serializeField(t,e,a,n[0],s)});else if(n.kind!==void 0)switch(n.kind){case"option":{r==null?s.writeU8(0):(s.writeU8(1),serializeField(t,e,r,n.type,s));break}case"map":{s.writeU32(r.size),r.forEach((a,o)=>{serializeField(t,e,o,n.key,s),serializeField(t,e,a,n.value,s)});break}default:throw new BorshError(`FieldType ${n} unrecognized`)}else serializeStruct(t,r,s)}catch(a){throw a instanceof BorshError&&a.addToFieldPath(e),a}}function serializeStruct(t,e,r){if(typeof e.borshSerialize=="function"){e.borshSerialize(r);return}const n=t.get(e.constructor);if(!n)throw new BorshError(`Class ${e.constructor.name} is missing in schema`);if(n.kind==="struct")n.fields.map(([s,a])=>{serializeField(t,s,e[s],a,r)});else if(n.kind==="enum"){const s=e[n.field];for(let a=0;a<n.values.length;++a){const[o,l]=n.values[a];if(o===s){r.writeU8(a),serializeField(t,o,e[o],l,r);break}}}else throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function serialize(t,e,r=BinaryWriter){const n=new r;return serializeStruct(t,e,n),n.toArray()}var serialize_1=lib.serialize=serialize;function deserializeField(t,e,r,n){try{if(typeof r=="string")return n[`read${capitalizeFirstLetter(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return n.readFixedArray(r[0]);if(typeof r[1]=="number"){const s=[];for(let a=0;a<r[1];a++)s.push(deserializeField(t,null,r[0],n));return s}else return n.readArray(()=>deserializeField(t,e,r[0],n))}if(r.kind==="option")return n.readU8()?deserializeField(t,e,r.type,n):void 0;if(r.kind==="map"){let s=new Map;const a=n.readU32();for(let o=0;o<a;o++){const l=deserializeField(t,e,r.key,n),h=deserializeField(t,e,r.value,n);s.set(l,h)}return s}return deserializeStruct(t,r,n)}catch(s){throw s instanceof BorshError&&s.addToFieldPath(e),s}}function deserializeStruct(t,e,r){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(r);const n=t.get(e);if(!n)throw new BorshError(`Class ${e.name} is missing in schema`);if(n.kind==="struct"){const s={};for(const[a,o]of t.get(e).fields)s[a]=deserializeField(t,a,o,r);return new e(s)}if(n.kind==="enum"){const s=r.readU8();if(s>=n.values.length)throw new BorshError(`Enum index: ${s} is out of range`);const[a,o]=n.values[s],l=deserializeField(t,a,o,r);return new e({[a]:l})}throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function deserialize(t,e,r,n=BinaryReader){const s=new n(r),a=deserializeStruct(t,e,s);if(s.offset<r.length)throw new BorshError(`Unexpected ${r.length-s.offset} bytes after deserialized data`);return a}var deserialize_1=lib.deserialize=deserialize;function deserializeUnchecked(t,e,r,n=BinaryReader){const s=new n(r);return deserializeStruct(t,e,s)}deserializeUnchecked_1=lib.deserializeUnchecked=deserializeUnchecked;var Layout$1={};Object.defineProperty(Layout$1,"__esModule",{value:!0});Layout$1.s16=Layout$1.s8=Layout$1.nu64be=Layout$1.u48be=Layout$1.u40be=Layout$1.u32be=Layout$1.u24be=Layout$1.u16be=nu64=Layout$1.nu64=Layout$1.u48=Layout$1.u40=u32=Layout$1.u32=Layout$1.u24=u16=Layout$1.u16=u8=Layout$1.u8=offset=Layout$1.offset=Layout$1.greedy=Layout$1.Constant=Layout$1.UTF8=Layout$1.CString=Layout$1.Blob=Layout$1.Boolean=Layout$1.BitField=Layout$1.BitStructure=Layout$1.VariantLayout=Layout$1.Union=Layout$1.UnionLayoutDiscriminator=Layout$1.UnionDiscriminator=Layout$1.Structure=Layout$1.Sequence=Layout$1.DoubleBE=Layout$1.Double=Layout$1.FloatBE=Layout$1.Float=Layout$1.NearInt64BE=Layout$1.NearInt64=Layout$1.NearUInt64BE=Layout$1.NearUInt64=Layout$1.IntBE=Layout$1.Int=Layout$1.UIntBE=Layout$1.UInt=Layout$1.OffsetLayout=Layout$1.GreedyCount=Layout$1.ExternalLayout=Layout$1.bindConstructorLayout=Layout$1.nameWithProperty=Layout$1.Layout=Layout$1.uint8ArrayToBuffer=Layout$1.checkUint8Array=void 0;Layout$1.constant=Layout$1.utf8=Layout$1.cstr=blob=Layout$1.blob=Layout$1.unionLayoutDiscriminator=Layout$1.union=seq=Layout$1.seq=Layout$1.bits=struct=Layout$1.struct=Layout$1.f64be=Layout$1.f64=Layout$1.f32be=Layout$1.f32=Layout$1.ns64be=Layout$1.s48be=Layout$1.s40be=Layout$1.s32be=Layout$1.s24be=Layout$1.s16be=ns64=Layout$1.ns64=Layout$1.s48=Layout$1.s40=Layout$1.s32=Layout$1.s24=void 0;const buffer_1=buffer;function checkUint8Array(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}Layout$1.checkUint8Array=checkUint8Array;function uint8ArrayToBuffer(t){return checkUint8Array(t),buffer_1.Buffer.from(t.buffer,t.byteOffset,t.length)}Layout$1.uint8ArrayToBuffer=uint8ArrayToBuffer;class Layout{constructor(e,r){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=r}makeDestinationObject(){return{}}getSpan(e,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=e,r}fromArray(e){}}Layout$1.Layout=Layout;function nameWithProperty(t,e){return e.property?t+"["+e.property+"]":t}Layout$1.nameWithProperty=nameWithProperty;function bindConstructorLayout(t,e){if(typeof t!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(t,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof Layout))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value(r,n){return e.encode(this,r,n)},writable:!0}),Object.defineProperty(t,"decode",{value(r,n){return e.decode(r,n)},writable:!0})}Layout$1.bindConstructorLayout=bindConstructorLayout;class ExternalLayout extends Layout{isCount(){throw new Error("ExternalLayout is abstract")}}Layout$1.ExternalLayout=ExternalLayout;class GreedyCount extends ExternalLayout{constructor(e=1,r){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=e}isCount(){return!0}decode(e,r=0){checkUint8Array(e);const n=e.length-r;return Math.floor(n/this.elementSpan)}encode(e,r,n){return 0}}Layout$1.GreedyCount=GreedyCount;class OffsetLayout extends ExternalLayout{constructor(e,r=0,n){if(!(e instanceof Layout))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=r}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(e,r=0){return this.layout.decode(e,r+this.offset)}encode(e,r,n=0){return this.layout.encode(e,r,n+this.offset)}}Layout$1.OffsetLayout=OffsetLayout;class UInt extends Layout{constructor(e,r){if(super(e,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,r=0){return uint8ArrayToBuffer(e).readUIntLE(r,this.span)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeUIntLE(e,n,this.span),this.span}}Layout$1.UInt=UInt;class UIntBE extends Layout{constructor(e,r){if(super(e,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,r=0){return uint8ArrayToBuffer(e).readUIntBE(r,this.span)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeUIntBE(e,n,this.span),this.span}}Layout$1.UIntBE=UIntBE;class Int extends Layout{constructor(e,r){if(super(e,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,r=0){return uint8ArrayToBuffer(e).readIntLE(r,this.span)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeIntLE(e,n,this.span),this.span}}Layout$1.Int=Int;class IntBE extends Layout{constructor(e,r){if(super(e,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,r=0){return uint8ArrayToBuffer(e).readIntBE(r,this.span)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeIntBE(e,n,this.span),this.span}}Layout$1.IntBE=IntBE;const V2E32=Math.pow(2,32);function divmodInt64(t){const e=Math.floor(t/V2E32),r=t-e*V2E32;return{hi32:e,lo32:r}}function roundedInt64(t,e){return t*V2E32+e}class NearUInt64 extends Layout{constructor(e){super(8,e)}decode(e,r=0){const n=uint8ArrayToBuffer(e),s=n.readUInt32LE(r),a=n.readUInt32LE(r+4);return roundedInt64(a,s)}encode(e,r,n=0){const s=divmodInt64(e),a=uint8ArrayToBuffer(r);return a.writeUInt32LE(s.lo32,n),a.writeUInt32LE(s.hi32,n+4),8}}Layout$1.NearUInt64=NearUInt64;class NearUInt64BE extends Layout{constructor(e){super(8,e)}decode(e,r=0){const n=uint8ArrayToBuffer(e),s=n.readUInt32BE(r),a=n.readUInt32BE(r+4);return roundedInt64(s,a)}encode(e,r,n=0){const s=divmodInt64(e),a=uint8ArrayToBuffer(r);return a.writeUInt32BE(s.hi32,n),a.writeUInt32BE(s.lo32,n+4),8}}Layout$1.NearUInt64BE=NearUInt64BE;class NearInt64 extends Layout{constructor(e){super(8,e)}decode(e,r=0){const n=uint8ArrayToBuffer(e),s=n.readUInt32LE(r),a=n.readInt32LE(r+4);return roundedInt64(a,s)}encode(e,r,n=0){const s=divmodInt64(e),a=uint8ArrayToBuffer(r);return a.writeUInt32LE(s.lo32,n),a.writeInt32LE(s.hi32,n+4),8}}Layout$1.NearInt64=NearInt64;class NearInt64BE extends Layout{constructor(e){super(8,e)}decode(e,r=0){const n=uint8ArrayToBuffer(e),s=n.readInt32BE(r),a=n.readUInt32BE(r+4);return roundedInt64(s,a)}encode(e,r,n=0){const s=divmodInt64(e),a=uint8ArrayToBuffer(r);return a.writeInt32BE(s.hi32,n),a.writeUInt32BE(s.lo32,n+4),8}}Layout$1.NearInt64BE=NearInt64BE;class Float extends Layout{constructor(e){super(4,e)}decode(e,r=0){return uint8ArrayToBuffer(e).readFloatLE(r)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeFloatLE(e,n),4}}Layout$1.Float=Float;class FloatBE extends Layout{constructor(e){super(4,e)}decode(e,r=0){return uint8ArrayToBuffer(e).readFloatBE(r)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeFloatBE(e,n),4}}Layout$1.FloatBE=FloatBE;class Double extends Layout{constructor(e){super(8,e)}decode(e,r=0){return uint8ArrayToBuffer(e).readDoubleLE(r)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeDoubleLE(e,n),8}}Layout$1.Double=Double;class DoubleBE extends Layout{constructor(e){super(8,e)}decode(e,r=0){return uint8ArrayToBuffer(e).readDoubleBE(r)}encode(e,r,n=0){return uint8ArrayToBuffer(r).writeDoubleBE(e,n),8}}Layout$1.DoubleBE=DoubleBE;class Sequence extends Layout{constructor(e,r,n){if(!(e instanceof Layout))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof ExternalLayout&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let s=-1;!(r instanceof ExternalLayout)&&0<e.span&&(s=r*e.span),super(s,n),this.elementLayout=e,this.count=r}getSpan(e,r=0){if(0<=this.span)return this.span;let n=0,s=this.count;if(s instanceof ExternalLayout&&(s=s.decode(e,r)),0<this.elementLayout.span)n=s*this.elementLayout.span;else{let a=0;for(;a<s;)n+=this.elementLayout.getSpan(e,r+n),++a}return n}decode(e,r=0){const n=[];let s=0,a=this.count;for(a instanceof ExternalLayout&&(a=a.decode(e,r));s<a;)n.push(this.elementLayout.decode(e,r)),r+=this.elementLayout.getSpan(e,r),s+=1;return n}encode(e,r,n=0){const s=this.elementLayout,a=e.reduce((o,l)=>o+s.encode(l,r,n+o),0);return this.count instanceof ExternalLayout&&this.count.encode(e.length,r,n),a}}Layout$1.Sequence=Sequence;class Structure extends Layout{constructor(e,r,n){if(!(Array.isArray(e)&&e.reduce((a,o)=>a&&o instanceof Layout,!0)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&n===void 0&&(n=r,r=void 0);for(const a of e)if(0>a.span&&a.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let s=-1;try{s=e.reduce((a,o)=>a+o.getSpan(),0)}catch{}super(s,r),this.fields=e,this.decodePrefixes=!!n}getSpan(e,r=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((s,a)=>{const o=a.getSpan(e,r);return r+=o,s+o},0)}catch{throw new RangeError("indeterminate span")}return n}decode(e,r=0){checkUint8Array(e);const n=this.makeDestinationObject();for(const s of this.fields)if(s.property!==void 0&&(n[s.property]=s.decode(e,r)),r+=s.getSpan(e,r),this.decodePrefixes&&e.length===r)break;return n}encode(e,r,n=0){const s=n;let a=0,o=0;for(const l of this.fields){let h=l.span;if(o=0<h?h:0,l.property!==void 0){const c=e[l.property];c!==void 0&&(o=l.encode(c,r,n),0>h&&(h=l.getSpan(r,n)))}a=n,n+=h}return a+o-s}fromArray(e){const r=this.makeDestinationObject();for(const n of this.fields)n.property!==void 0&&0<e.length&&(r[n.property]=e.shift());return r}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const r of this.fields)if(r.property===e)return r}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let r=0;for(const n of this.fields){if(n.property===e)return r;0>n.span?r=-1:0<=r&&(r+=n.span)}}}Layout$1.Structure=Structure;class UnionDiscriminator{constructor(e){this.property=e}decode(e,r){throw new Error("UnionDiscriminator is abstract")}encode(e,r,n){throw new Error("UnionDiscriminator is abstract")}}Layout$1.UnionDiscriminator=UnionDiscriminator;class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(e,r){if(!(e instanceof ExternalLayout&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||e.property||"variant"),this.layout=e}decode(e,r){return this.layout.decode(e,r)}encode(e,r,n){return this.layout.encode(e,r,n)}}Layout$1.UnionLayoutDiscriminator=UnionLayoutDiscriminator;class Union extends Layout{constructor(e,r,n){let s;if(e instanceof UInt||e instanceof UIntBE)s=new UnionLayoutDiscriminator(new OffsetLayout(e));else if(e instanceof ExternalLayout&&e.isCount())s=new UnionLayoutDiscriminator(e);else if(e instanceof UnionDiscriminator)s=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Layout))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"))}let a=-1;r&&(a=r.span,0<=a&&(e instanceof UInt||e instanceof UIntBE)&&(a+=s.layout.span)),super(a,n),this.discriminator=s,this.usesPrefixDiscriminator=e instanceof UInt||e instanceof UIntBE,this.defaultLayout=r,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(l){return o(l)},this.configGetSourceVariant=function(l){o=l.bind(this)}}getSpan(e,r=0){if(0<=this.span)return this.span;const n=this.getVariant(e,r);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,r)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const r=this.registry[e[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(e,r.property)))return r}else for(const r in this.registry){const n=this.registry[r];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,r=0){let n;const s=this.discriminator,a=s.decode(e,r),o=this.registry[a];if(o===void 0){const l=this.defaultLayout;let h=0;this.usesPrefixDiscriminator&&(h=s.layout.span),n=this.makeDestinationObject(),n[s.property]=a,n[l.property]=l.decode(e,r+h)}else n=o.decode(e,r);return n}encode(e,r,n=0){const s=this.getSourceVariant(e);if(s===void 0){const a=this.discriminator,o=this.defaultLayout;let l=0;return this.usesPrefixDiscriminator&&(l=a.layout.span),a.encode(e[a.property],r,n),l+o.encode(e[o.property],r,n+l)}return s.encode(e,r,n)}addVariant(e,r,n){const s=new VariantLayout(this,e,r,n);return this.registry[e]=s,s}getVariant(e,r=0){let n;return e instanceof Uint8Array?n=this.discriminator.decode(e,r):n=e,this.registry[n]}}Layout$1.Union=Union;class VariantLayout extends Layout{constructor(e,r,n,s){if(!(e instanceof Union))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof n=="string"&&s===void 0&&(s=n,n=null),n){if(!(n instanceof Layout))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof s!="string")throw new TypeError("variant must have a String property")}let a=e.span;0>e.span&&(a=n?n.span:0,0<=a&&e.usesPrefixDiscriminator&&(a+=e.discriminator.layout.span)),super(a,s),this.union=e,this.variant=r,this.layout=n||null}getSpan(e,r=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let s=0;return this.layout&&(s=this.layout.getSpan(e,r+n)),n+s}decode(e,r=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,r))throw new Error("variant mismatch");let s=0;return this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,r+s):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,r,n=0){let s=0;if(this.union.usesPrefixDiscriminator&&(s=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,n);let a=s;if(this.layout&&(this.layout.encode(e[this.property],r,n+s),a+=this.layout.getSpan(r,n+s),0<=this.union.span&&a>this.union.span))throw new Error("encoded variant overruns containing union");return a}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}Layout$1.VariantLayout=VariantLayout;function fixBitwiseResult(t){return 0>t&&(t+=4294967296),t}class BitStructure extends Layout{constructor(e,r,n){if(!(e instanceof UInt||e instanceof UIntBE))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&n===void 0&&(n=r,r=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!r,this.fields=[];let s=0;this._packedSetValue=function(a){return s=fixBitwiseResult(a),this},this._packedGetValue=function(){return s}}decode(e,r=0){const n=this.makeDestinationObject(),s=this.word.decode(e,r);this._packedSetValue(s);for(const a of this.fields)a.property!==void 0&&(n[a.property]=a.decode(e));return n}encode(e,r,n=0){const s=this.word.decode(r,n);this._packedSetValue(s);for(const a of this.fields)if(a.property!==void 0){const o=e[a.property];o!==void 0&&a.encode(o)}return this.word.encode(this._packedGetValue(),r,n)}addField(e,r){const n=new BitField(this,e,r);return this.fields.push(n),n}addBoolean(e){const r=new Boolean$1(this,e);return this.fields.push(r),r}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(const r of this.fields)if(r.property===e)return r}}Layout$1.BitStructure=BitStructure;class BitField{constructor(e,r,n){if(!(e instanceof BitStructure))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");const s=8*e.span,a=e.fields.reduce((o,l)=>o+l.bits,0);if(r+a>s)throw new Error("bits too long for span remainder ("+(s-a)+" of "+s+" remain)");this.container=e,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=a,this.container.msb&&(this.start=s-a-r),this.wordMask=fixBitwiseResult(this.valueMask<<this.start),this.property=n}decode(e,r){const n=this.container._packedGetValue();return fixBitwiseResult(n&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==fixBitwiseResult(e&this.valueMask))throw new TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const r=this.container._packedGetValue(),n=fixBitwiseResult(e<<this.start);this.container._packedSetValue(fixBitwiseResult(r&~this.wordMask)|n)}}Layout$1.BitField=BitField;let Boolean$1=class extends BitField{constructor(t,e){super(t,1,e)}decode(t,e){return!!super.decode(t,e)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t)}};Layout$1.Boolean=Boolean$1;let Blob$1=class extends Layout{constructor(t,e){if(!(t instanceof ExternalLayout&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof ExternalLayout||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e=0){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),uint8ArrayToBuffer(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof ExternalLayout&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw new RangeError("encoding overruns Uint8Array");const s=uint8ArrayToBuffer(t);return uint8ArrayToBuffer(e).write(s.toString("hex"),r,n,"hex"),this.length instanceof ExternalLayout&&this.length.encode(n,e,r),n}};Layout$1.Blob=Blob$1;class CString extends Layout{constructor(e){super(-1,e)}getSpan(e,r=0){checkUint8Array(e);let n=r;for(;n<e.length&&e[n]!==0;)n+=1;return 1+n-r}decode(e,r=0){const n=this.getSpan(e,r);return uint8ArrayToBuffer(e).slice(r,r+n-1).toString("utf-8")}encode(e,r,n=0){typeof e!="string"&&(e=String(e));const s=buffer_1.Buffer.from(e,"utf8"),a=s.length;if(n+a>r.length)throw new RangeError("encoding overruns Buffer");const o=uint8ArrayToBuffer(r);return s.copy(o,n),o[n+a]=0,a+1}}Layout$1.CString=CString;class UTF8 extends Layout{constructor(e,r){if(typeof e=="string"&&r===void 0&&(r=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=e}getSpan(e,r=0){return checkUint8Array(e),e.length-r}decode(e,r=0){const n=this.getSpan(e,r);if(0<=this.maxSpan&&this.maxSpan<n)throw new RangeError("text length exceeds maxSpan");return uint8ArrayToBuffer(e).slice(r,r+n).toString("utf-8")}encode(e,r,n=0){typeof e!="string"&&(e=String(e));const s=buffer_1.Buffer.from(e,"utf8"),a=s.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(n+a>r.length)throw new RangeError("encoding overruns Buffer");return s.copy(uint8ArrayToBuffer(r),n),a}}Layout$1.UTF8=UTF8;class Constant extends Layout{constructor(e,r){super(0,r),this.value=e}decode(e,r){return this.value}encode(e,r,n){return 0}}Layout$1.Constant=Constant;Layout$1.greedy=(t,e)=>new GreedyCount(t,e);var offset=Layout$1.offset=(t,e,r)=>new OffsetLayout(t,e,r),u8=Layout$1.u8=t=>new UInt(1,t),u16=Layout$1.u16=t=>new UInt(2,t);Layout$1.u24=t=>new UInt(3,t);var u32=Layout$1.u32=t=>new UInt(4,t);Layout$1.u40=t=>new UInt(5,t);Layout$1.u48=t=>new UInt(6,t);var nu64=Layout$1.nu64=t=>new NearUInt64(t);Layout$1.u16be=t=>new UIntBE(2,t);Layout$1.u24be=t=>new UIntBE(3,t);Layout$1.u32be=t=>new UIntBE(4,t);Layout$1.u40be=t=>new UIntBE(5,t);Layout$1.u48be=t=>new UIntBE(6,t);Layout$1.nu64be=t=>new NearUInt64BE(t);Layout$1.s8=t=>new Int(1,t);Layout$1.s16=t=>new Int(2,t);Layout$1.s24=t=>new Int(3,t);Layout$1.s32=t=>new Int(4,t);Layout$1.s40=t=>new Int(5,t);Layout$1.s48=t=>new Int(6,t);var ns64=Layout$1.ns64=t=>new NearInt64(t);Layout$1.s16be=t=>new IntBE(2,t);Layout$1.s24be=t=>new IntBE(3,t);Layout$1.s32be=t=>new IntBE(4,t);Layout$1.s40be=t=>new IntBE(5,t);Layout$1.s48be=t=>new IntBE(6,t);Layout$1.ns64be=t=>new NearInt64BE(t);Layout$1.f32=t=>new Float(t);Layout$1.f32be=t=>new FloatBE(t);Layout$1.f64=t=>new Double(t);Layout$1.f64be=t=>new DoubleBE(t);var struct=Layout$1.struct=(t,e,r)=>new Structure(t,e,r);Layout$1.bits=(t,e,r)=>new BitStructure(t,e,r);var seq=Layout$1.seq=(t,e,r)=>new Sequence(t,e,r);Layout$1.union=(t,e,r)=>new Union(t,e,r);Layout$1.unionLayoutDiscriminator=(t,e)=>new UnionLayoutDiscriminator(t,e);var blob=Layout$1.blob=(t,e)=>new Blob$1(t,e);Layout$1.cstr=t=>new CString(t);Layout$1.utf8=(t,e)=>new UTF8(t,e);Layout$1.constant=(t,e)=>new Constant(t,e);var browser={};Object.defineProperty(browser,"__esModule",{value:!0});function toBigIntLE(t){{const e=dist.Buffer.from(t);e.reverse();const r=e.toString("hex");return r.length===0?BigInt(0):BigInt(`0x${r}`)}}var toBigIntLE_1=browser.toBigIntLE=toBigIntLE;function toBigIntBE(t){{const e=t.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}}browser.toBigIntBE=toBigIntBE;function toBufferLE(t,e){{const r=t.toString(16),n=dist.Buffer.from(r.padStart(e*2,"0").slice(0,e*2),"hex");return n.reverse(),n}}var toBufferLE_1=browser.toBufferLE=toBufferLE;function toBufferBE(t,e){{const r=t.toString(16);return dist.Buffer.from(r.padStart(e*2,"0").slice(0,e*2),"hex")}}browser.toBufferBE=toBufferBE;class StructError extends TypeError{constructor(e,r){let n;const{message:s,explanation:a,...o}=e,{path:l}=e,h=l.length===0?s:`At path: ${l.join(".")} -- ${s}`;super(a??h),a!=null&&(this.cause=h),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function isIterable(t){return isObject(t)&&typeof t[Symbol.iterator]=="function"}function isObject(t){return typeof t=="object"&&t!=null}function isNonArrayObject(t){return isObject(t)&&!Array.isArray(t)}function print(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function shiftIterator(t){const{done:e,value:r}=t.next();return e?void 0:r}function toFailure(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:s,branch:a}=e,{type:o}=r,{refinement:l,message:h=`Expected a value of type \`${o}\`${l?` with refinement \`${l}\``:""}, but received: \`${print(n)}\``}=t;return{value:n,type:o,refinement:l,key:s[s.length-1],path:s,branch:a,...t,message:h}}function*toFailures(t,e,r,n){isIterable(t)||(t=[t]);for(const s of t){const a=toFailure(s,e,r,n);a&&(yield a)}}function*run(t,e,r={}){const{path:n=[],branch:s=[t],coerce:a=!1,mask:o=!1}=r,l={path:n,branch:s,mask:o};a&&(t=e.coercer(t,l));let h="valid";for(const c of e.validator(t,l))c.explanation=r.message,h="not_valid",yield[c,void 0];for(let[c,g,A]of e.entries(t,l)){const b=run(g,A,{path:c===void 0?n:[...n,c],branch:c===void 0?s:[...s,g],coerce:a,mask:o,message:r.message});for(const D of b)D[0]?(h=D[0].refinement!=null?"not_refined":"not_valid",yield[D[0],void 0]):a&&(g=D[1],c===void 0?t=g:t instanceof Map?t.set(c,g):t instanceof Set?t.add(g):isObject(t)&&(g!==void 0||c in t)&&(t[c]=g))}if(h!=="not_valid")for(const c of e.refiner(t,l))c.explanation=r.message,h="not_refined",yield[c,void 0];h==="valid"&&(yield[void 0,t])}let Struct$1=class{constructor(t){const{type:e,schema:r,validator:n,refiner:s,coercer:a=l=>l,entries:o=function*(){}}=t;this.type=e,this.schema=r,this.entries=o,this.coercer=a,n?this.validator=(l,h)=>{const c=n(l,h);return toFailures(c,h,this,l)}:this.validator=()=>[],s?this.refiner=(l,h)=>{const c=s(l,h);return toFailures(c,h,this,l)}:this.refiner=()=>[]}assert(t,e){return assert(t,this,e)}create(t,e){return create(t,this,e)}is(t){return is(t,this)}mask(t,e){return mask(t,this,e)}validate(t,e={}){return validate$1(t,this,e)}};function assert(t,e,r){const n=validate$1(t,e,{message:r});if(n[0])throw n[0]}function create(t,e,r){const n=validate$1(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function mask(t,e,r){const n=validate$1(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function is(t,e){return!validate$1(t,e)[0]}function validate$1(t,e,r={}){const n=run(t,e,r),s=shiftIterator(n);return s[0]?[new StructError(s[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,s[1]]}function define(t,e){return new Struct$1({type:t,schema:null,validator:e})}function any(){return define("any",()=>!0)}function array(t){return new Struct$1({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${print(e)}`}})}function boolean(){return define("boolean",t=>typeof t=="boolean")}function instance(t){return define("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${print(e)}`)}function literal(t){const e=print(t),r=typeof t;return new Struct$1({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${print(n)}`}})}function never(){return define("never",()=>!1)}function nullable(t){return new Struct$1({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function number(){return define("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${print(t)}`)}function optional(t){return new Struct$1({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function record(t,e){return new Struct$1({type:"record",schema:null,*entries(r){if(isObject(r))for(const n in r){const s=r[n];yield[n,n,t],yield[n,s,e]}},validator(r){return isNonArrayObject(r)||`Expected an object, but received: ${print(r)}`},coercer(r){return isNonArrayObject(r)?{...r}:r}})}function string(){return define("string",t=>typeof t=="string"||`Expected a string, but received: ${print(t)}`)}function tuple(t){const e=never();return new Struct$1({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],t[s]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${print(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function type(t){const e=Object.keys(t);return new Struct$1({type:"type",schema:t,*entries(r){if(isObject(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return isNonArrayObject(r)||`Expected an object, but received: ${print(r)}`},coercer(r){return isNonArrayObject(r)?{...r}:r}})}function union(t){const e=t.map(r=>r.type).join(" | ");return new Struct$1({type:"union",schema:null,coercer(r,n){for(const s of t){const[a,o]=s.validate(r,{coerce:!0,mask:n.mask});if(!a)return o}return r},validator(r,n){const s=[];for(const a of t){const[...o]=run(r,a,n),[l]=o;if(l[0])for(const[h]of o)h&&s.push(h);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${print(r)}`,...s]}})}function unknown(){return define("unknown",()=>!0)}function coerce(t,e,r){return new Struct$1({...t,coercer:(n,s)=>is(n,e)?t.coercer(r(n,s),s):t.coercer(n,s)})}var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(t){return typeof t=="string"&®EX.test(t)}var byteToHex=[];for(var i=0;i<256;++i)byteToHex.push((i+256).toString(16).substr(1));function stringify(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(byteToHex[t[e+0]]+byteToHex[t[e+1]]+byteToHex[t[e+2]]+byteToHex[t[e+3]]+"-"+byteToHex[t[e+4]]+byteToHex[t[e+5]]+"-"+byteToHex[t[e+6]]+byteToHex[t[e+7]]+"-"+byteToHex[t[e+8]]+byteToHex[t[e+9]]+"-"+byteToHex[t[e+10]]+byteToHex[t[e+11]]+byteToHex[t[e+12]]+byteToHex[t[e+13]]+byteToHex[t[e+14]]+byteToHex[t[e+15]]).toLowerCase();if(!validate(r))throw TypeError("Stringified UUID is invalid");return r}var _nodeId,_clockseq,_lastMSecs=0,_lastNSecs=0;function v1(t,e,r){var n=e&&r||0,s=e||new Array(16);t=t||{};var a=t.node||_nodeId,o=t.clockseq!==void 0?t.clockseq:_clockseq;if(a==null||o==null){var l=t.random||(t.rng||rng)();a==null&&(a=_nodeId=[l[0]|1,l[1],l[2],l[3],l[4],l[5]]),o==null&&(o=_clockseq=(l[6]<<8|l[7])&16383)}var h=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:_lastNSecs+1,g=h-_lastMSecs+(c-_lastNSecs)/1e4;if(g<0&&t.clockseq===void 0&&(o=o+1&16383),(g<0||h>_lastMSecs)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=h,_lastNSecs=c,_clockseq=o,h+=122192928e5;var A=((h&268435455)*1e4+c)%4294967296;s[n++]=A>>>24&255,s[n++]=A>>>16&255,s[n++]=A>>>8&255,s[n++]=A&255;var b=h/4294967296*1e4&268435455;s[n++]=b>>>8&255,s[n++]=b&255,s[n++]=b>>>24&15|16,s[n++]=b>>>16&255,s[n++]=o>>>8|128,s[n++]=o&255;for(var D=0;D<6;++D)s[n+D]=a[D];return e||stringify(s)}function parse(t){if(!validate(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function stringToBytes(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",URL$1="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v35(t,e,r){function n(s,a,o,l){if(typeof s=="string"&&(s=stringToBytes(s)),typeof a=="string"&&(a=parse(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var h=new Uint8Array(16+s.length);if(h.set(a),h.set(s,a.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,o){l=l||0;for(var c=0;c<16;++c)o[l+c]=h[c];return o}return stringify(h)}try{n.name=t}catch{}return n.DNS=DNS,n.URL=URL$1,n}function md5(t){if(typeof t=="string"){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)}return md5ToHexEncodedArray(wordsToMd5(bytesToWords(t),t.length*8))}function md5ToHexEncodedArray(t){for(var e=[],r=t.length*32,n="0123456789abcdef",s=0;s<r;s+=8){var a=t[s>>5]>>>s%32&255,o=parseInt(n.charAt(a>>>4&15)+n.charAt(a&15),16);e.push(o)}return e}function getOutputLength(t){return(t+64>>>9<<4)+14+1}function wordsToMd5(t,e){t[e>>5]|=128<<e%32,t[getOutputLength(e)-1]=e;for(var r=1732584193,n=-271733879,s=-1732584194,a=271733878,o=0;o<t.length;o+=16){var l=r,h=n,c=s,g=a;r=md5ff(r,n,s,a,t[o],7,-680876936),a=md5ff(a,r,n,s,t[o+1],12,-389564586),s=md5ff(s,a,r,n,t[o+2],17,606105819),n=md5ff(n,s,a,r,t[o+3],22,-1044525330),r=md5ff(r,n,s,a,t[o+4],7,-176418897),a=md5ff(a,r,n,s,t[o+5],12,1200080426),s=md5ff(s,a,r,n,t[o+6],17,-1473231341),n=md5ff(n,s,a,r,t[o+7],22,-45705983),r=md5ff(r,n,s,a,t[o+8],7,1770035416),a=md5ff(a,r,n,s,t[o+9],12,-1958414417),s=md5ff(s,a,r,n,t[o+10],17,-42063),n=md5ff(n,s,a,r,t[o+11],22,-1990404162),r=md5ff(r,n,s,a,t[o+12],7,1804603682),a=md5ff(a,r,n,s,t[o+13],12,-40341101),s=md5ff(s,a,r,n,t[o+14],17,-1502002290),n=md5ff(n,s,a,r,t[o+15],22,1236535329),r=md5gg(r,n,s,a,t[o+1],5,-165796510),a=md5gg(a,r,n,s,t[o+6],9,-1069501632),s=md5gg(s,a,r,n,t[o+11],14,643717713),n=md5gg(n,s,a,r,t[o],20,-373897302),r=md5gg(r,n,s,a,t[o+5],5,-701558691),a=md5gg(a,r,n,s,t[o+10],9,38016083),s=md5gg(s,a,r,n,t[o+15],14,-660478335),n=md5gg(n,s,a,r,t[o+4],20,-405537848),r=md5gg(r,n,s,a,t[o+9],5,568446438),a=md5gg(a,r,n,s,t[o+14],9,-1019803690),s=md5gg(s,a,r,n,t[o+3],14,-187363961),n=md5gg(n,s,a,r,t[o+8],20,1163531501),r=md5gg(r,n,s,a,t[o+13],5,-1444681467),a=md5gg(a,r,n,s,t[o+2],9,-51403784),s=md5gg(s,a,r,n,t[o+7],14,1735328473),n=md5gg(n,s,a,r,t[o+12],20,-1926607734),r=md5hh(r,n,s,a,t[o+5],4,-378558),a=md5hh(a,r,n,s,t[o+8],11,-2022574463),s=md5hh(s,a,r,n,t[o+11],16,1839030562),n=md5hh(n,s,a,r,t[o+14],23,-35309556),r=md5hh(r,n,s,a,t[o+1],4,-1530992060),a=md5hh(a,r,n,s,t[o+4],11,1272893353),s=md5hh(s,a,r,n,t[o+7],16,-155497632),n=md5hh(n,s,a,r,t[o+10],23,-1094730640),r=md5hh(r,n,s,a,t[o+13],4,681279174),a=md5hh(a,r,n,s,t[o],11,-358537222),s=md5hh(s,a,r,n,t[o+3],16,-722521979),n=md5hh(n,s,a,r,t[o+6],23,76029189),r=md5hh(r,n,s,a,t[o+9],4,-640364487),a=md5hh(a,r,n,s,t[o+12],11,-421815835),s=md5hh(s,a,r,n,t[o+15],16,530742520),n=md5hh(n,s,a,r,t[o+2],23,-995338651),r=md5ii(r,n,s,a,t[o],6,-198630844),a=md5ii(a,r,n,s,t[o+7],10,1126891415),s=md5ii(s,a,r,n,t[o+14],15,-1416354905),n=md5ii(n,s,a,r,t[o+5],21,-57434055),r=md5ii(r,n,s,a,t[o+12],6,1700485571),a=md5ii(a,r,n,s,t[o+3],10,-1894986606),s=md5ii(s,a,r,n,t[o+10],15,-1051523),n=md5ii(n,s,a,r,t[o+1],21,-2054922799),r=md5ii(r,n,s,a,t[o+8],6,1873313359),a=md5ii(a,r,n,s,t[o+15],10,-30611744),s=md5ii(s,a,r,n,t[o+6],15,-1560198380),n=md5ii(n,s,a,r,t[o+13],21,1309151649),r=md5ii(r,n,s,a,t[o+4],6,-145523070),a=md5ii(a,r,n,s,t[o+11],10,-1120210379),s=md5ii(s,a,r,n,t[o+2],15,718787259),n=md5ii(n,s,a,r,t[o+9],21,-343485551),r=safeAdd(r,l),n=safeAdd(n,h),s=safeAdd(s,c),a=safeAdd(a,g)}return[r,n,s,a]}function bytesToWords(t){if(t.length===0)return[];for(var e=t.length*8,r=new Uint32Array(getOutputLength(e)),n=0;n<e;n+=8)r[n>>5]|=(t[n/8]&255)<<n%32;return r}function safeAdd(t,e){var r=(t&65535)+(e&65535),n=(t>>16)+(e>>16)+(r>>16);return n<<16|r&65535}function bitRotateLeft(t,e){return t<<e|t>>>32-e}function md5cmn(t,e,r,n,s,a){return safeAdd(bitRotateLeft(safeAdd(safeAdd(e,t),safeAdd(n,a)),s),r)}function md5ff(t,e,r,n,s,a,o){return md5cmn(e&r|~e&n,t,e,s,a,o)}function md5gg(t,e,r,n,s,a,o){return md5cmn(e&n|r&~n,t,e,s,a,o)}function md5hh(t,e,r,n,s,a,o){return md5cmn(e^r^n,t,e,s,a,o)}function md5ii(t,e,r,n,s,a,o){return md5cmn(r^(e|~n),t,e,s,a,o)}var v3=v35("v3",48,md5);function v4(t,e,r){t=t||{};var n=t.random||(t.rng||rng)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=n[s];return e}return stringify(n)}function f(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function ROTL(t,e){return t<<e|t>>>32-e}function sha1(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var s=0;s<n.length;++s)t.push(n.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var a=t.length/4+2,o=Math.ceil(a/16),l=new Array(o),h=0;h<o;++h){for(var c=new Uint32Array(16),g=0;g<16;++g)c[g]=t[h*64+g*4]<<24|t[h*64+g*4+1]<<16|t[h*64+g*4+2]<<8|t[h*64+g*4+3];l[h]=c}l[o-1][14]=(t.length-1)*8/Math.pow(2,32),l[o-1][14]=Math.floor(l[o-1][14]),l[o-1][15]=(t.length-1)*8&4294967295;for(var A=0;A<o;++A){for(var b=new Uint32Array(80),D=0;D<16;++D)b[D]=l[A][D];for(var T=16;T<80;++T)b[T]=ROTL(b[T-3]^b[T-8]^b[T-14]^b[T-16],1);for(var S=r[0],L=r[1],E=r[2],v=r[3],w=r[4],I=0;I<80;++I){var F=Math.floor(I/20),O=ROTL(S,5)+f(F,L,E,v)+w+e[F]+b[I]>>>0;w=v,v=E,E=ROTL(L,30)>>>0,L=S,S=O}r[0]=r[0]+S>>>0,r[1]=r[1]+L>>>0,r[2]=r[2]+E>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+w>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var v5=v35("v5",80,sha1);const nil="00000000-0000-0000-0000-000000000000";function version(t){if(!validate(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}const esmBrowser=Object.freeze(Object.defineProperty({__proto__:null,NIL:nil,parse,stringify,v1,v3,v4,v5,validate,version},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(esmBrowser);require$$0.v4;require$$0.v4;var eventemitter3={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(h,c,g){this.fn=h,this.context=c,this.once=g||!1}function a(h,c,g,A,b){if(typeof g!="function")throw new TypeError("The listener must be a function");var D=new s(g,A||h,b),T=r?r+c:c;return h._events[T]?h._events[T].fn?h._events[T]=[h._events[T],D]:h._events[T].push(D):(h._events[T]=D,h._eventsCount++),h}function o(h,c){--h._eventsCount===0?h._events=new n:delete h._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],c,g;if(this._eventsCount===0)return h;for(g in c=this._events)e.call(c,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},l.prototype.listeners=function(h){var c=r?r+h:h,g=this._events[c];if(!g)return[];if(g.fn)return[g.fn];for(var A=0,b=g.length,D=new Array(b);A<b;A++)D[A]=g[A].fn;return D},l.prototype.listenerCount=function(h){var c=r?r+h:h,g=this._events[c];return g?g.fn?1:g.length:0},l.prototype.emit=function(h,c,g,A,b,D){var T=r?r+h:h;if(!this._events[T])return!1;var S=this._events[T],L=arguments.length,E,v;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),L){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,c),!0;case 3:return S.fn.call(S.context,c,g),!0;case 4:return S.fn.call(S.context,c,g,A),!0;case 5:return S.fn.call(S.context,c,g,A,b),!0;case 6:return S.fn.call(S.context,c,g,A,b,D),!0}for(v=1,E=new Array(L-1);v<L;v++)E[v-1]=arguments[v];S.fn.apply(S.context,E)}else{var w=S.length,I;for(v=0;v<w;v++)switch(S[v].once&&this.removeListener(h,S[v].fn,void 0,!0),L){case 1:S[v].fn.call(S[v].context);break;case 2:S[v].fn.call(S[v].context,c);break;case 3:S[v].fn.call(S[v].context,c,g);break;case 4:S[v].fn.call(S[v].context,c,g,A);break;default:if(!E)for(I=1,E=new Array(L-1);I<L;I++)E[I-1]=arguments[I];S[v].fn.apply(S[v].context,E)}}return!0},l.prototype.on=function(h,c,g){return a(this,h,c,g,!1)},l.prototype.once=function(h,c,g){return a(this,h,c,g,!0)},l.prototype.removeListener=function(h,c,g,A){var b=r?r+h:h;if(!this._events[b])return this;if(!c)return o(this,b),this;var D=this._events[b];if(D.fn)D.fn===c&&(!A||D.once)&&(!g||D.context===g)&&o(this,b);else{for(var T=0,S=[],L=D.length;T<L;T++)(D[T].fn!==c||A&&!D[T].once||g&&D[T].context!==g)&&S.push(D[T]);S.length?this._events[b]=S.length===1?S[0]:S:o(this,b)}return this},l.prototype.removeAllListeners=function(h){var c;return h?(c=r?r+h:h,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(eventemitter3);class HMAC extends Hash{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,hash(e);const n=toBytes(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,a=new Uint8Array(s);a.set(n.length>s?e.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=e.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),a.fill(0)}update(e){return exists(this),this.iHash.update(e),this}digestInto(e){exists(this),bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:a,blockLen:o,outputLen:l}=this;return e=e,e.finished=s,e.destroyed=a,e.blockLen=o,e.outputLen=l,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const hmac=(t,e,r)=>new HMAC(t,e).update(r).digest();hmac.create=(t,e)=>new HMAC(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validateSigVerOpts(t){t.lowS!==void 0&&abool("lowS",t.lowS),t.prehash!==void 0&&abool("prehash",t.prehash)}function validatePointOpts(t){const e=validateBasic(t);validateObject(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:b2n,hexToBytes:h2b}=ut,DER={Err:class extends Error{constructor(t=""){super(t)}},_tlv:{encode:(t,e)=>{const{Err:r}=DER;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,s=numberToHexUnpadded(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?numberToHexUnpadded(s.length/2|128):"";return`${numberToHexUnpadded(t)}${a}${s}${e}`},decode(t,e){const{Err:r}=DER;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const s=e[n++],a=!!(s&128);let o=0;if(!a)o=s;else{const h=s&127;if(!h)throw new r("tlv.decode(long): indefinite length not supported");if(h>4)throw new r("tlv.decode(long): byte length is too big");const c=e.subarray(n,n+h);if(c.length!==h)throw new r("tlv.decode: length bytes not complete");if(c[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const g of c)o=o<<8|g;if(n+=h,o<128)throw new r("tlv.decode(long): not minimal encoding")}const l=e.subarray(n,n+o);if(l.length!==o)throw new r("tlv.decode: wrong value length");return{v:l,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=DER;if(t<_0n)throw new e("integer: negative integers are not allowed");let r=numberToHexUnpadded(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected assertion");return r},decode(t){const{Err:e}=DER;if(t[0]&128)throw new e("Invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return b2n(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=DER,s=typeof t=="string"?h2b(t):t;abytes(s);const{v:a,l:o}=n.decode(48,s);if(o.length)throw new e("Invalid signature: left bytes after parsing");const{v:l,l:h}=n.decode(2,a),{v:c,l:g}=n.decode(2,h);if(g.length)throw new e("Invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(c)}},hexFromSig(t){const{_tlv:e,_int:r}=DER,n=`${e.encode(2,r.encode(t.r))}${e.encode(2,r.encode(t.s))}`;return e.encode(48,n)}},_0n=BigInt(0),_1n$1=BigInt(1);BigInt(2);const _3n=BigInt(3);BigInt(4);function weierstrassPoints(t){const e=validatePointOpts(t),{Fp:r}=e,n=Field(e.n,e.nBitLength),s=e.toBytes||((S,L,E)=>{const v=L.toAffine();return concatBytes(Uint8Array.from([4]),r.toBytes(v.x),r.toBytes(v.y))}),a=e.fromBytes||(S=>{const L=S.subarray(1),E=r.fromBytes(L.subarray(0,r.BYTES)),v=r.fromBytes(L.subarray(r.BYTES,2*r.BYTES));return{x:E,y:v}});function o(S){const{a:L,b:E}=e,v=r.sqr(S),w=r.mul(v,S);return r.add(r.add(w,r.mul(S,L)),E)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function l(S){return inRange$1(S,_1n$1,e.n)}function h(S){const{allowedPrivateKeyLengths:L,nByteLength:E,wrapPrivateKey:v,n:w}=e;if(L&&typeof S!="bigint"){if(isBytes(S)&&(S=bytesToHex(S)),typeof S!="string"||!L.includes(S.length))throw new Error("Invalid key");S=S.padStart(E*2,"0")}let I;try{I=typeof S=="bigint"?S:bytesToNumberBE(ensureBytes("private key",S,E))}catch{throw new Error(`private key must be ${E} bytes, hex or bigint, not ${typeof S}`)}return v&&(I=mod(I,w)),aInRange("private key",I,_1n$1,w),I}function c(S){if(!(S instanceof b))throw new Error("ProjectivePoint expected")}const g=memoized((S,L)=>{const{px:E,py:v,pz:w}=S;if(r.eql(w,r.ONE))return{x:E,y:v};const I=S.is0();L==null&&(L=I?r.ONE:r.inv(w));const F=r.mul(E,L),O=r.mul(v,L),V=r.mul(w,L);if(I)return{x:r.ZERO,y:r.ZERO};if(!r.eql(V,r.ONE))throw new Error("invZ was invalid");return{x:F,y:O}}),A=memoized(S=>{if(S.is0()){if(e.allowInfinityPoint&&!r.is0(S.py))return;throw new Error("bad point: ZERO")}const{x:L,y:E}=S.toAffine();if(!r.isValid(L)||!r.isValid(E))throw new Error("bad point: x or y not FE");const v=r.sqr(E),w=o(L);if(!r.eql(v,w))throw new Error("bad point: equation left != right");if(!S.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class b{constructor(L,E,v){if(this.px=L,this.py=E,this.pz=v,L==null||!r.isValid(L))throw new Error("x required");if(E==null||!r.isValid(E))throw new Error("y required");if(v==null||!r.isValid(v))throw new Error("z required");Object.freeze(this)}static fromAffine(L){const{x:E,y:v}=L||{};if(!L||!r.isValid(E)||!r.isValid(v))throw new Error("invalid affine point");if(L instanceof b)throw new Error("projective point not allowed");const w=I=>r.eql(I,r.ZERO);return w(E)&&w(v)?b.ZERO:new b(E,v,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){const E=r.invertBatch(L.map(v=>v.pz));return L.map((v,w)=>v.toAffine(E[w])).map(b.fromAffine)}static fromHex(L){const E=b.fromAffine(a(ensureBytes("pointHex",L)));return E.assertValidity(),E}static fromPrivateKey(L){return b.BASE.multiply(h(L))}static msm(L,E){return pippenger(b,n,L,E)}_setWindowSize(L){T.setWindowSize(this,L)}assertValidity(){A(this)}hasEvenY(){const{y:L}=this.toAffine();if(r.isOdd)return!r.isOdd(L);throw new Error("Field doesn't support isOdd")}equals(L){c(L);const{px:E,py:v,pz:w}=this,{px:I,py:F,pz:O}=L,V=r.eql(r.mul(E,O),r.mul(I,w)),$=r.eql(r.mul(v,O),r.mul(F,w));return V&&$}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:L,b:E}=e,v=r.mul(E,_3n),{px:w,py:I,pz:F}=this;let O=r.ZERO,V=r.ZERO,$=r.ZERO,j=r.mul(w,w),W=r.mul(I,I),q=r.mul(F,F),U=r.mul(w,I);return U=r.add(U,U),$=r.mul(w,F),$=r.add($,$),O=r.mul(L,$),V=r.mul(v,q),V=r.add(O,V),O=r.sub(W,V),V=r.add(W,V),V=r.mul(O,V),O=r.mul(U,O),$=r.mul(v,$),q=r.mul(L,q),U=r.sub(j,q),U=r.mul(L,U),U=r.add(U,$),$=r.add(j,j),j=r.add($,j),j=r.add(j,q),j=r.mul(j,U),V=r.add(V,j),q=r.mul(I,F),q=r.add(q,q),j=r.mul(q,U),O=r.sub(O,j),$=r.mul(q,W),$=r.add($,$),$=r.add($,$),new b(O,V,$)}add(L){c(L);const{px:E,py:v,pz:w}=this,{px:I,py:F,pz:O}=L;let V=r.ZERO,$=r.ZERO,j=r.ZERO;const W=e.a,q=r.mul(e.b,_3n);let U=r.mul(E,I),p=r.mul(v,F),x=r.mul(w,O),M=r.add(E,v),m=r.add(I,F);M=r.mul(M,m),m=r.add(U,p),M=r.sub(M,m),m=r.add(E,w);let C=r.add(I,O);return m=r.mul(m,C),C=r.add(U,x),m=r.sub(m,C),C=r.add(v,w),V=r.add(F,O),C=r.mul(C,V),V=r.add(p,x),C=r.sub(C,V),j=r.mul(W,m),V=r.mul(q,x),j=r.add(V,j),V=r.sub(p,j),j=r.add(p,j),$=r.mul(V,j),p=r.add(U,U),p=r.add(p,U),x=r.mul(W,x),m=r.mul(q,m),p=r.add(p,x),x=r.sub(U,x),x=r.mul(W,x),m=r.add(m,x),U=r.mul(p,m),$=r.add($,U),U=r.mul(C,m),V=r.mul(M,V),V=r.sub(V,U),U=r.mul(M,p),j=r.mul(C,j),j=r.add(j,U),new b(V,$,j)}subtract(L){return this.add(L.negate())}is0(){return this.equals(b.ZERO)}wNAF(L){return T.wNAFCached(this,L,b.normalizeZ)}multiplyUnsafe(L){aInRange("scalar",L,_0n,e.n);const E=b.ZERO;if(L===_0n)return E;if(L===_1n$1)return this;const{endo:v}=e;if(!v)return T.unsafeLadder(this,L);let{k1neg:w,k1:I,k2neg:F,k2:O}=v.splitScalar(L),V=E,$=E,j=this;for(;I>_0n||O>_0n;)I&_1n$1&&(V=V.add(j)),O&_1n$1&&($=$.add(j)),j=j.double(),I>>=_1n$1,O>>=_1n$1;return w&&(V=V.negate()),F&&($=$.negate()),$=new b(r.mul($.px,v.beta),$.py,$.pz),V.add($)}multiply(L){const{endo:E,n:v}=e;aInRange("scalar",L,_1n$1,v);let w,I;if(E){const{k1neg:F,k1:O,k2neg:V,k2:$}=E.splitScalar(L);let{p:j,f:W}=this.wNAF(O),{p:q,f:U}=this.wNAF($);j=T.constTimeNegate(F,j),q=T.constTimeNegate(V,q),q=new b(r.mul(q.px,E.beta),q.py,q.pz),w=j.add(q),I=W.add(U)}else{const{p:F,f:O}=this.wNAF(L);w=F,I=O}return b.normalizeZ([w,I])[0]}multiplyAndAddUnsafe(L,E,v){const w=b.BASE,I=(O,V)=>V===_0n||V===_1n$1||!O.equals(w)?O.multiplyUnsafe(V):O.multiply(V),F=I(this,E).add(I(L,v));return F.is0()?void 0:F}toAffine(L){return g(this,L)}isTorsionFree(){const{h:L,isTorsionFree:E}=e;if(L===_1n$1)return!0;if(E)return E(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:L,clearCofactor:E}=e;return L===_1n$1?this:E?E(b,this):this.multiplyUnsafe(e.h)}toRawBytes(L=!0){return abool("isCompressed",L),this.assertValidity(),s(b,this,L)}toHex(L=!0){return abool("isCompressed",L),bytesToHex(this.toRawBytes(L))}}b.BASE=new b(e.Gx,e.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const D=e.nBitLength,T=wNAF(b,e.endo?Math.ceil(D/2):D);return{CURVE:e,ProjectivePoint:b,normPrivateKeyToScalar:h,weierstrassEquation:o,isWithinCurveOrder:l}}function validateOpts(t){const e=validateBasic(t);return validateObject(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function weierstrass(t){const e=validateOpts(t),{Fp:r,n}=e,s=r.BYTES+1,a=2*r.BYTES+1;function o(x){return mod(x,n)}function l(x){return invert(x,n)}const{ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:g,isWithinCurveOrder:A}=weierstrassPoints({...e,toBytes(x,M,m){const C=M.toAffine(),d=r.toBytes(C.x),_=concatBytes;return abool("isCompressed",m),m?_(Uint8Array.from([M.hasEvenY()?2:3]),d):_(Uint8Array.from([4]),d,r.toBytes(C.y))},fromBytes(x){const M=x.length,m=x[0],C=x.subarray(1);if(M===s&&(m===2||m===3)){const d=bytesToNumberBE(C);if(!inRange$1(d,_1n$1,r.ORDER))throw new Error("Point is not on curve");const _=g(d);let B;try{B=r.sqrt(_)}catch(R){const H=R instanceof Error?": "+R.message:"";throw new Error("Point is not on curve"+H)}const u=(B&_1n$1)===_1n$1;return(m&1)===1!==u&&(B=r.neg(B)),{x:d,y:B}}else if(M===a&&m===4){const d=r.fromBytes(C.subarray(0,r.BYTES)),_=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:d,y:_}}else throw new Error(`Point of length ${M} was invalid. Expected ${s} compressed bytes or ${a} uncompressed bytes`)}}),b=x=>bytesToHex(numberToBytesBE(x,e.nByteLength));function D(x){const M=n>>_1n$1;return x>M}function T(x){return D(x)?o(-x):x}const S=(x,M,m)=>bytesToNumberBE(x.slice(M,m));class L{constructor(M,m,C){this.r=M,this.s=m,this.recovery=C,this.assertValidity()}static fromCompact(M){const m=e.nByteLength;return M=ensureBytes("compactSignature",M,m*2),new L(S(M,0,m),S(M,m,2*m))}static fromDER(M){const{r:m,s:C}=DER.toSig(ensureBytes("DER",M));return new L(m,C)}assertValidity(){aInRange("r",this.r,_1n$1,n),aInRange("s",this.s,_1n$1,n)}addRecoveryBit(M){return new L(this.r,this.s,M)}recoverPublicKey(M){const{r:m,s:C,recovery:d}=this,_=O(ensureBytes("msgHash",M));if(d==null||![0,1,2,3].includes(d))throw new Error("recovery id invalid");const B=d===2||d===3?m+e.n:m;if(B>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=d&1?"03":"02",R=h.fromHex(u+b(B)),H=l(B),K=o(-_*H),J=o(C*H),Q=h.BASE.multiplyAndAddUnsafe(R,K,J);if(!Q)throw new Error("point at infinify");return Q.assertValidity(),Q}hasHighS(){return D(this.s)}normalizeS(){return this.hasHighS()?new L(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){return DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const E={isValidPrivateKey(x){try{return c(x),!0}catch{return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const x=getMinHashLength(e.n);return mapHashToField(e.randomBytes(x),e.n)},precompute(x=8,M=h.BASE){return M._setWindowSize(x),M.multiply(BigInt(3)),M}};function v(x,M=!0){return h.fromPrivateKey(x).toRawBytes(M)}function w(x){const M=isBytes(x),m=typeof x=="string",C=(M||m)&&x.length;return M?C===s||C===a:m?C===2*s||C===2*a:x instanceof h}function I(x,M,m=!0){if(w(x))throw new Error("first arg must be private key");if(!w(M))throw new Error("second arg must be public key");return h.fromHex(M).multiply(c(x)).toRawBytes(m)}const F=e.bits2int||function(x){const M=bytesToNumberBE(x),m=x.length*8-e.nBitLength;return m>0?M>>BigInt(m):M},O=e.bits2int_modN||function(x){return o(F(x))},V=bitMask(e.nBitLength);function $(x){return aInRange(`num < 2^${e.nBitLength}`,x,_0n,V),numberToBytesBE(x,e.nByteLength)}function j(x,M,m=W){if(["recovered","canonical"].some(et=>et in m))throw new Error("sign() legacy options not supported");const{hash:C,randomBytes:d}=e;let{lowS:_,prehash:B,extraEntropy:u}=m;_==null&&(_=!0),x=ensureBytes("msgHash",x),validateSigVerOpts(m),B&&(x=ensureBytes("prehashed msgHash",C(x)));const R=O(x),H=c(M),K=[$(H),$(R)];if(u!=null&&u!==!1){const et=u===!0?d(r.BYTES):u;K.push(ensureBytes("extraEntropy",et))}const J=concatBytes(...K),Q=R;function Y(et){const pt=F(et);if(!A(pt))return;const it=l(pt),rt=h.BASE.multiply(pt).toAffine(),bt=o(rt.x);if(bt===_0n)return;const tt=o(it*o(Q+bt*H));if(tt===_0n)return;let X=(rt.x===bt?0:2)|Number(rt.y&_1n$1),$t=tt;return _&&D(tt)&&($t=T(tt),X^=1),new L(bt,$t,X)}return{seed:J,k2sig:Y}}const W={lowS:e.lowS,prehash:!1},q={lowS:e.lowS,prehash:!1};function U(x,M,m=W){const{seed:C,k2sig:d}=j(x,M,m),_=e;return createHmacDrbg(_.hash.outputLen,_.nByteLength,_.hmac)(C,d)}h.BASE._setWindowSize(8);function p(x,M,m,C=q){var d;const _=x;if(M=ensureBytes("msgHash",M),m=ensureBytes("publicKey",m),"strict"in C)throw new Error("options.strict was renamed to lowS");validateSigVerOpts(C);const{lowS:B,prehash:u}=C;let R,H;try{if(typeof _=="string"||isBytes(_))try{R=L.fromDER(_)}catch(rt){if(!(rt instanceof DER.Err))throw rt;R=L.fromCompact(_)}else if(typeof _=="object"&&typeof _.r=="bigint"&&typeof _.s=="bigint"){const{r:rt,s:bt}=_;R=new L(rt,bt)}else throw new Error("PARSE");H=h.fromHex(m)}catch(rt){if(rt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(B&&R.hasHighS())return!1;u&&(M=e.hash(M));const{r:K,s:J}=R,Q=O(M),Y=l(J),et=o(Q*Y),pt=o(K*Y),it=(d=h.BASE.multiplyAndAddUnsafe(H,et,pt))==null?void 0:d.toAffine();return it?o(it.x)===K:!1}return{CURVE:e,getPublicKey:v,getSharedSecret:I,sign:U,verify:p,ProjectivePoint:h,Signature:L,utils:E}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function getHash(t){return{hash:t,hmac:(e,...r)=>hmac(t,e,concatBytes$1(...r)),randomBytes}}function createCurve(t,e){const r=n=>weierstrass({...t,...getHash(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_1n=BigInt(1),_2n=BigInt(2),divNearest=(t,e)=>(t+e/_2n)/e;function sqrtMod(t){const e=secp256k1P,r=BigInt(3),n=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),l=BigInt(44),h=BigInt(88),c=t*t*t%e,g=c*c*t%e,A=pow2(g,r,e)*g%e,b=pow2(A,r,e)*g%e,D=pow2(b,_2n,e)*c%e,T=pow2(D,s,e)*D%e,S=pow2(T,a,e)*T%e,L=pow2(S,l,e)*S%e,E=pow2(L,h,e)*L%e,v=pow2(E,l,e)*S%e,w=pow2(v,r,e)*g%e,I=pow2(w,o,e)*T%e,F=pow2(I,n,e)*c%e,O=pow2(F,_2n,e);if(!Fp.eql(Fp.sqr(O),t))throw new Error("Cannot find square root");return O}const Fp=Field(secp256k1P,void 0,void 0,{sqrt:sqrtMod}),secp256k1=createCurve({a:BigInt(0),b:BigInt(7),Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=secp256k1N,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),l=divNearest(a*t,e),h=divNearest(-n*t,e);let c=mod(t-l*r-h*s,e),g=mod(-l*n-h*a,e);const A=c>o,b=g>o;if(A&&(c=e-c),b&&(g=e-g),c>o||g>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:A,k1:c,k2neg:b,k2:g}}}},sha256);BigInt(0);secp256k1.ProjectivePoint;function isOnCurve(t){try{return ed25519.ExtendedPoint.fromHex(t),!0}catch{return!1}}const toBuffer=t=>buffer.Buffer.isBuffer(t)?t:t instanceof Uint8Array?buffer.Buffer.from(t.buffer,t.byteOffset,t.byteLength):buffer.Buffer.from(t);class Struct{constructor(e){Object.assign(this,e)}encode(){return buffer.Buffer.from(serialize_1(SOLANA_SCHEMA,this))}static decode(e){return deserialize_1(SOLANA_SCHEMA,this,e)}static decodeUnchecked(e){return deserializeUnchecked_1(SOLANA_SCHEMA,this,e)}}const SOLANA_SCHEMA=new Map;var _PublicKey;const MAX_SEED_LENGTH=32,PUBLIC_KEY_LENGTH=32;function isPublicKeyData(t){return t._bn!==void 0}let uniquePublicKeyCounter=1;class PublicKey extends Struct{constructor(e){if(super({}),this._bn=void 0,isPublicKeyData(e))this._bn=e._bn;else{if(typeof e=="string"){const r=bs58$1.decode(e);if(r.length!=PUBLIC_KEY_LENGTH)throw new Error("Invalid public key input");this._bn=new BN(r)}else this._bn=new BN(e);if(this._bn.byteLength()>PUBLIC_KEY_LENGTH)throw new Error("Invalid public key input")}}static unique(){const e=new PublicKey(uniquePublicKeyCounter);return uniquePublicKeyCounter+=1,new PublicKey(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return bs58$1.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this._bn.toArrayLike(buffer.Buffer);if(e.length===PUBLIC_KEY_LENGTH)return e;const r=buffer.Buffer.alloc(32);return e.copy(r,32-e.length),r}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,r,n){const s=buffer.Buffer.concat([e.toBuffer(),buffer.Buffer.from(r),n.toBuffer()]),a=sha256(s);return new PublicKey(a)}static createProgramAddressSync(e,r){let n=buffer.Buffer.alloc(0);e.forEach(function(a){if(a.length>MAX_SEED_LENGTH)throw new TypeError("Max seed length exceeded");n=buffer.Buffer.concat([n,toBuffer(a)])}),n=buffer.Buffer.concat([n,r.toBuffer(),buffer.Buffer.from("ProgramDerivedAddress")]);const s=sha256(n);if(isOnCurve(s))throw new Error("Invalid seeds, address must fall off the curve");return new PublicKey(s)}static async createProgramAddress(e,r){return this.createProgramAddressSync(e,r)}static findProgramAddressSync(e,r){let n=255,s;for(;n!=0;){try{const a=e.concat(buffer.Buffer.from([n]));s=this.createProgramAddressSync(a,r)}catch(a){if(a instanceof TypeError)throw a;n--;continue}return[s,n]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,r){return this.findProgramAddressSync(e,r)}static isOnCurve(e){const r=new PublicKey(e);return isOnCurve(r.toBytes())}}_PublicKey=PublicKey;PublicKey.default=new _PublicKey("11111111111111111111111111111111");SOLANA_SCHEMA.set(PublicKey,{kind:"struct",fields:[["_bn","u256"]]});new PublicKey("BPFLoader1111111111111111111111111111111111");const SIGNATURE_LENGTH_IN_BYTES=64,publicKey=(t="publicKey")=>blob(32,t),rustString=(t="string")=>{const e=struct([u32("length"),u32("lengthPadding"),blob(offset(u32(),-8),"chars")],t),r=e.decode.bind(e),n=e.encode.bind(e),s=e;return s.decode=(a,o)=>r(a,o).chars.toString(),s.encode=(a,o,l)=>{const h={chars:buffer.Buffer.from(a,"utf8")};return n(h,o,l)},s.alloc=a=>u32().span+u32().span+buffer.Buffer.from(a,"utf8").length,s},authorized=(t="authorized")=>struct([publicKey("staker"),publicKey("withdrawer")],t),lockup=(t="lockup")=>struct([ns64("unixTimestamp"),ns64("epoch"),publicKey("custodian")],t),voteInit=(t="voteInit")=>struct([publicKey("nodePubkey"),publicKey("authorizedVoter"),publicKey("authorizedWithdrawer"),u8("commission")],t),voteAuthorizeWithSeedArgs=(t="voteAuthorizeWithSeedArgs")=>struct([u32("voteAuthorizationType"),publicKey("currentAuthorityDerivedKeyOwnerPubkey"),rustString("currentAuthorityDerivedKeySeed"),publicKey("newAuthorized")],t);buffer.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);new PublicKey("SysvarC1ock11111111111111111111111111111111");new PublicKey("SysvarEpochSchedu1e111111111111111111111111");new PublicKey("Sysvar1nstructions1111111111111111111111111");new PublicKey("SysvarRecentB1ockHashes11111111111111111111");new PublicKey("SysvarRent111111111111111111111111111111111");new PublicKey("SysvarRewards111111111111111111111111111111");new PublicKey("SysvarS1otHashes111111111111111111111111111");new PublicKey("SysvarS1otHistory11111111111111111111111111");new PublicKey("SysvarStakeHistory1111111111111111111111111");const FeeCalculatorLayout=nu64("lamportsPerSignature"),NonceAccountLayout=struct([u32("version"),u32("state"),publicKey("authorizedPubkey"),publicKey("nonce"),struct([FeeCalculatorLayout],"feeCalculator")]);NonceAccountLayout.span;const encodeDecode=t=>{const e=t.decode.bind(t),r=t.encode.bind(t);return{decode:e,encode:r}},bigInt=t=>e=>{const r=blob(t,e),{encode:n,decode:s}=encodeDecode(r),a=r;return a.decode=(o,l)=>{const h=s(o,l);return toBigIntLE_1(buffer.Buffer.from(h))},a.encode=(o,l,h)=>{const c=toBufferLE_1(o,t);return n(c,l,h)},a},u64=bigInt(8);Object.freeze({Create:{index:0,layout:struct([u32("instruction"),ns64("lamports"),ns64("space"),publicKey("programId")])},Assign:{index:1,layout:struct([u32("instruction"),publicKey("programId")])},Transfer:{index:2,layout:struct([u32("instruction"),u64("lamports")])},CreateWithSeed:{index:3,layout:struct([u32("instruction"),publicKey("base"),rustString("seed"),ns64("lamports"),ns64("space"),publicKey("programId")])},AdvanceNonceAccount:{index:4,layout:struct([u32("instruction")])},WithdrawNonceAccount:{index:5,layout:struct([u32("instruction"),ns64("lamports")])},InitializeNonceAccount:{index:6,layout:struct([u32("instruction"),publicKey("authorized")])},AuthorizeNonceAccount:{index:7,layout:struct([u32("instruction"),publicKey("authorized")])},Allocate:{index:8,layout:struct([u32("instruction"),ns64("space")])},AllocateWithSeed:{index:9,layout:struct([u32("instruction"),publicKey("base"),rustString("seed"),ns64("space"),publicKey("programId")])},AssignWithSeed:{index:10,layout:struct([u32("instruction"),publicKey("base"),rustString("seed"),publicKey("programId")])},TransferWithSeed:{index:11,layout:struct([u32("instruction"),u64("lamports"),rustString("seed"),publicKey("programId")])},UpgradeNonceAccount:{index:12,layout:struct([u32("instruction")])}});new PublicKey("11111111111111111111111111111111");new PublicKey("BPFLoader2111111111111111111111111111111111");struct([u32("typeIndex"),u64("deactivationSlot"),nu64("lastExtendedSlot"),u8("lastExtendedStartIndex"),u8(),seq(publicKey(),offset(u8(),-1),"authority")]);const PublicKeyFromString=coerce(instance(PublicKey),string(),t=>new PublicKey(t)),RawAccountDataResult=tuple([string(),literal("base64")]),BufferFromRawAccountData=coerce(instance(buffer.Buffer),RawAccountDataResult,t=>buffer.Buffer.from(t[0],"base64"));function createRpcResult(t){return union([type({jsonrpc:literal("2.0"),id:string(),result:t}),type({jsonrpc:literal("2.0"),id:string(),error:type({code:unknown(),message:string(),data:optional(any())})})])}const UnknownRpcResult=createRpcResult(unknown());function jsonRpcResult(t){return coerce(createRpcResult(t),UnknownRpcResult,e=>"error"in e?e:{...e,result:create(e.result,t)})}function jsonRpcResultAndContext(t){return jsonRpcResult(type({context:type({slot:number()}),value:t}))}function notificationResultAndContext(t){return type({context:type({slot:number()}),value:t})}const GetInflationGovernorResult=type({foundation:number(),foundationTerm:number(),initial:number(),taper:number(),terminal:number()});jsonRpcResult(array(nullable(type({epoch:number(),effectiveSlot:number(),amount:number(),postBalance:number(),commission:optional(nullable(number()))}))));const GetRecentPrioritizationFeesResult=array(type({slot:number(),prioritizationFee:number()})),GetInflationRateResult=type({total:number(),validator:number(),foundation:number(),epoch:number()}),GetEpochInfoResult=type({epoch:number(),slotIndex:number(),slotsInEpoch:number(),absoluteSlot:number(),blockHeight:optional(number()),transactionCount:optional(number())}),GetEpochScheduleResult=type({slotsPerEpoch:number(),leaderScheduleSlotOffset:number(),warmup:boolean(),firstNormalEpoch:number(),firstNormalSlot:number()}),GetLeaderScheduleResult=record(string(),array(number())),TransactionErrorResult=nullable(union([type({}),string()])),SignatureStatusResult=type({err:TransactionErrorResult}),SignatureReceivedResult=literal("receivedSignature");type({"solana-core":string(),"feature-set":optional(number())});const ParsedInstructionStruct=type({program:string(),programId:PublicKeyFromString,parsed:unknown()}),PartiallyDecodedInstructionStruct=type({programId:PublicKeyFromString,accounts:array(PublicKeyFromString),data:string()});jsonRpcResultAndContext(type({err:nullable(union([type({}),string()])),logs:nullable(array(string())),accounts:optional(nullable(array(nullable(type({executable:boolean(),owner:string(),lamports:number(),data:array(string()),rentEpoch:optional(number())}))))),unitsConsumed:optional(number()),returnData:optional(nullable(type({programId:string(),data:tuple([string(),literal("base64")])}))),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(union([ParsedInstructionStruct,PartiallyDecodedInstructionStruct]))}))))}));jsonRpcResultAndContext(type({byIdentity:record(string(),array(number())),range:type({firstSlot:number(),lastSlot:number()})}));jsonRpcResult(GetInflationGovernorResult);jsonRpcResult(GetInflationRateResult);jsonRpcResult(GetRecentPrioritizationFeesResult);jsonRpcResult(GetEpochInfoResult);jsonRpcResult(GetEpochScheduleResult);jsonRpcResult(GetLeaderScheduleResult);jsonRpcResult(number());jsonRpcResultAndContext(type({total:number(),circulating:number(),nonCirculating:number(),nonCirculatingAccounts:array(PublicKeyFromString)}));const TokenAmountResult=type({amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())});jsonRpcResultAndContext(array(type({address:PublicKeyFromString,amount:string(),uiAmount:nullable(number()),decimals:number(),uiAmountString:optional(string())})));jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()})})));const ParsedAccountDataResult=type({program:string(),parsed:unknown(),space:number()});jsonRpcResultAndContext(array(type({pubkey:PublicKeyFromString,account:type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedAccountDataResult,rentEpoch:number()})})));jsonRpcResultAndContext(array(type({lamports:number(),address:PublicKeyFromString})));const AccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:BufferFromRawAccountData,rentEpoch:number()});type({pubkey:PublicKeyFromString,account:AccountInfoResult});const ParsedOrRawAccountData=coerce(union([instance(buffer.Buffer),ParsedAccountDataResult]),union([RawAccountDataResult,ParsedAccountDataResult]),t=>Array.isArray(t)?create(t,BufferFromRawAccountData):t),ParsedAccountInfoResult=type({executable:boolean(),owner:PublicKeyFromString,lamports:number(),data:ParsedOrRawAccountData,rentEpoch:number()});type({pubkey:PublicKeyFromString,account:ParsedAccountInfoResult});type({state:union([literal("active"),literal("inactive"),literal("activating"),literal("deactivating")]),active:number(),inactive:number()});jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));jsonRpcResult(array(type({signature:string(),slot:number(),err:TransactionErrorResult,memo:nullable(string()),blockTime:optional(nullable(number()))})));type({subscription:number(),result:notificationResultAndContext(AccountInfoResult)});const ProgramAccountInfoResult=type({pubkey:PublicKeyFromString,account:AccountInfoResult});type({subscription:number(),result:notificationResultAndContext(ProgramAccountInfoResult)});const SlotInfoResult=type({parent:number(),slot:number(),root:number()});type({subscription:number(),result:SlotInfoResult});const SlotUpdateResult=union([type({type:union([literal("firstShredReceived"),literal("completed"),literal("optimisticConfirmation"),literal("root")]),slot:number(),timestamp:number()}),type({type:literal("createdBank"),parent:number(),slot:number(),timestamp:number()}),type({type:literal("frozen"),slot:number(),timestamp:number(),stats:type({numTransactionEntries:number(),numSuccessfulTransactions:number(),numFailedTransactions:number(),maxTransactionsPerEntry:number()})}),type({type:literal("dead"),slot:number(),timestamp:number(),err:string()})]);type({subscription:number(),result:SlotUpdateResult});type({subscription:number(),result:notificationResultAndContext(union([SignatureStatusResult,SignatureReceivedResult]))});type({subscription:number(),result:number()});type({pubkey:string(),gossip:nullable(string()),tpu:nullable(string()),rpc:nullable(string()),version:nullable(string())});const VoteAccountInfoResult=type({votePubkey:string(),nodePubkey:string(),activatedStake:number(),epochVoteAccount:boolean(),epochCredits:array(tuple([number(),number(),number()])),commission:number(),lastVote:number(),rootSlot:nullable(number())});jsonRpcResult(type({current:array(VoteAccountInfoResult),delinquent:array(VoteAccountInfoResult)}));const ConfirmationStatus=union([literal("processed"),literal("confirmed"),literal("finalized")]),SignatureStatusResponse=type({slot:number(),confirmations:nullable(number()),err:TransactionErrorResult,confirmationStatus:optional(ConfirmationStatus)});jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));jsonRpcResult(number());const AddressTableLookupStruct=type({accountKey:PublicKeyFromString,writableIndexes:array(number()),readonlyIndexes:array(number())}),ConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(string()),header:type({numRequiredSignatures:number(),numReadonlySignedAccounts:number(),numReadonlyUnsignedAccounts:number()}),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()})),recentBlockhash:string(),addressTableLookups:optional(array(AddressTableLookupStruct))})}),AnnotatedAccountKey=type({pubkey:PublicKeyFromString,signer:boolean(),writable:boolean(),source:optional(union([literal("transaction"),literal("lookupTable")]))}),ConfirmedTransactionAccountsModeResult=type({accountKeys:array(AnnotatedAccountKey),signatures:array(string())}),ParsedInstructionResult=type({parsed:unknown(),program:string(),programId:PublicKeyFromString}),RawInstructionResult=type({accounts:array(PublicKeyFromString),data:string(),programId:PublicKeyFromString}),InstructionResult=union([RawInstructionResult,ParsedInstructionResult]),UnknownInstructionResult=union([type({parsed:unknown(),program:string(),programId:string()}),type({accounts:array(string()),data:string(),programId:string()})]),ParsedOrRawInstruction=coerce(InstructionResult,UnknownInstructionResult,t=>"accounts"in t?create(t,RawInstructionResult):create(t,ParsedInstructionResult)),ParsedConfirmedTransactionResult=type({signatures:array(string()),message:type({accountKeys:array(AnnotatedAccountKey),instructions:array(ParsedOrRawInstruction),recentBlockhash:string(),addressTableLookups:optional(nullable(array(AddressTableLookupStruct)))})}),TokenBalanceResult=type({accountIndex:number(),mint:string(),owner:optional(string()),uiTokenAmount:TokenAmountResult}),LoadedAddressesResult=type({writable:array(PublicKeyFromString),readonly:array(PublicKeyFromString)}),ConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(type({accounts:array(number()),data:string(),programIdIndex:number()}))})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())}),ParsedConfirmedTransactionMetaResult=type({err:TransactionErrorResult,fee:number(),innerInstructions:optional(nullable(array(type({index:number(),instructions:array(ParsedOrRawInstruction)})))),preBalances:array(number()),postBalances:array(number()),logMessages:optional(nullable(array(string()))),preTokenBalances:optional(nullable(array(TokenBalanceResult))),postTokenBalances:optional(nullable(array(TokenBalanceResult))),loadedAddresses:optional(LoadedAddressesResult),computeUnitsConsumed:optional(number())}),TransactionVersionStruct=union([literal(0),literal("legacy")]),RewardsResult=type({pubkey:string(),lamports:number(),postBalance:nullable(number()),rewardType:nullable(string()),commission:optional(nullable(number()))});jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionAccountsModeResult,meta:nullable(ParsedConfirmedTransactionMetaResult),version:optional(TransactionVersionStruct)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),rewards:optional(array(RewardsResult)),blockTime:nullable(number()),blockHeight:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),transactions:array(type({transaction:ConfirmedTransactionResult,meta:nullable(ConfirmedTransactionMetaResult)})),rewards:optional(array(RewardsResult)),blockTime:nullable(number())})));jsonRpcResult(nullable(type({blockhash:string(),previousBlockhash:string(),parentSlot:number(),signatures:array(string()),blockTime:nullable(number())})));jsonRpcResult(nullable(type({slot:number(),meta:nullable(ConfirmedTransactionMetaResult),blockTime:optional(nullable(number())),transaction:ConfirmedTransactionResult,version:optional(TransactionVersionStruct)})));jsonRpcResult(nullable(type({slot:number(),transaction:ParsedConfirmedTransactionResult,meta:nullable(ParsedConfirmedTransactionMetaResult),blockTime:optional(nullable(number())),version:optional(TransactionVersionStruct)})));jsonRpcResultAndContext(type({blockhash:string(),feeCalculator:type({lamportsPerSignature:number()})}));jsonRpcResultAndContext(type({blockhash:string(),lastValidBlockHeight:number()}));jsonRpcResultAndContext(boolean());const PerfSampleResult=type({slot:number(),numTransactions:number(),numSlots:number(),samplePeriodSecs:number()});jsonRpcResult(array(PerfSampleResult));jsonRpcResultAndContext(nullable(type({feeCalculator:type({lamportsPerSignature:number()})})));jsonRpcResult(string());jsonRpcResult(string());const LogsResult=type({err:TransactionErrorResult,logs:array(string()),signature:string()});type({result:notificationResultAndContext(LogsResult),subscription:number()});Object.freeze({CreateLookupTable:{index:0,layout:struct([u32("instruction"),u64("recentSlot"),u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:struct([u32("instruction")])},ExtendLookupTable:{index:2,layout:struct([u32("instruction"),u64(),seq(publicKey(),offset(u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:struct([u32("instruction")])},CloseLookupTable:{index:4,layout:struct([u32("instruction")])}});new PublicKey("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:struct([u8("instruction"),u32("units"),u32("additionalFee")])},RequestHeapFrame:{index:1,layout:struct([u8("instruction"),u32("bytes")])},SetComputeUnitLimit:{index:2,layout:struct([u8("instruction"),u32("units")])},SetComputeUnitPrice:{index:3,layout:struct([u8("instruction"),u64("microLamports")])}});new PublicKey("ComputeBudget111111111111111111111111111111");struct([u8("numSignatures"),u8("padding"),u16("signatureOffset"),u16("signatureInstructionIndex"),u16("publicKeyOffset"),u16("publicKeyInstructionIndex"),u16("messageDataOffset"),u16("messageDataSize"),u16("messageInstructionIndex")]);new PublicKey("Ed25519SigVerify111111111111111111111111111");secp256k1.utils.isValidPrivateKey;secp256k1.getPublicKey;struct([u8("numSignatures"),u16("signatureOffset"),u8("signatureInstructionIndex"),u16("ethAddressOffset"),u8("ethAddressInstructionIndex"),u16("messageDataOffset"),u16("messageDataSize"),u8("messageInstructionIndex"),blob(20,"ethAddress"),blob(64,"signature"),u8("recoveryId")]);new PublicKey("KeccakSecp256k11111111111111111111111111111");var _Lockup;new PublicKey("StakeConfig11111111111111111111111111111111");class Lockup{constructor(e,r,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=r,this.custodian=n}}_Lockup=Lockup;Lockup.default=new _Lockup(0,0,PublicKey.default);Object.freeze({Initialize:{index:0,layout:struct([u32("instruction"),authorized(),lockup()])},Authorize:{index:1,layout:struct([u32("instruction"),publicKey("newAuthorized"),u32("stakeAuthorizationType")])},Delegate:{index:2,layout:struct([u32("instruction")])},Split:{index:3,layout:struct([u32("instruction"),ns64("lamports")])},Withdraw:{index:4,layout:struct([u32("instruction"),ns64("lamports")])},Deactivate:{index:5,layout:struct([u32("instruction")])},Merge:{index:7,layout:struct([u32("instruction")])},AuthorizeWithSeed:{index:8,layout:struct([u32("instruction"),publicKey("newAuthorized"),u32("stakeAuthorizationType"),rustString("authoritySeed"),publicKey("authorityOwner")])}});new PublicKey("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:struct([u32("instruction"),voteInit()])},Authorize:{index:1,layout:struct([u32("instruction"),publicKey("newAuthorized"),u32("voteAuthorizationType")])},Withdraw:{index:3,layout:struct([u32("instruction"),ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:struct([u32("instruction")])},AuthorizeWithSeed:{index:10,layout:struct([u32("instruction"),voteAuthorizeWithSeedArgs()])}});new PublicKey("Vote111111111111111111111111111111111111111");new PublicKey("Va1idator1nfo111111111111111111111111111111");type({name:string(),website:optional(string()),details:optional(string()),iconUrl:optional(string()),keybaseUsername:optional(string())});new PublicKey("Vote111111111111111111111111111111111111111");struct([publicKey("nodePubkey"),publicKey("authorizedWithdrawer"),u8("commission"),nu64(),seq(struct([nu64("slot"),u32("confirmationCount")]),offset(u32(),-8),"votes"),u8("rootSlotValid"),nu64("rootSlot"),nu64(),seq(struct([nu64("epoch"),publicKey("authorizedVoter")]),offset(u32(),-8),"authorizedVoters"),struct([seq(struct([publicKey("authorizedPubkey"),nu64("epochOfLastAuthorizedSwitch"),nu64("targetEpoch")]),32,"buf"),nu64("idx"),u8("isEmpty")],"priorVoters"),nu64(),seq(struct([nu64("epoch"),nu64("credits"),nu64("prevCredits")]),offset(u32(),-8),"epochCredits"),struct([nu64("slot"),nu64("timestamp")],"lastTimestamp")]);const Gt=class Ut{constructor(e){if(st(this,"modal"),st(this,"eventListenerMap",{}),st(this,"bindEvents",()=>{window.addEventListener("message",this.receive,!1),this.on(DID_EVENT_NAME.TELEGRAM_POST_EVENT,this.telegramPostEvent)}),st(this,"telegramPostEvent",r=>{var n;if(!Array.isArray(r))return;const[s,a]=r;typeof((n=window==null?void 0:window.TelegramWebviewProxy)==null?void 0:n.postEvent)=="function"&&window.TelegramWebviewProxy.postEvent(s,a)}),st(this,"receive",r=>{var n,s;const a=r.data;if(a.target===Ut.DID_MESSAGE_TARGET){if(a.type==="dapp_event"&&a.messageId){const o=(n=Ut.promiseMap[a.messageId])==null?void 0:n.resolve,l=(s=Ut.promiseMap[a.messageId])==null?void 0:s.reject;a.status==="success"&&typeof o=="function"&&o(a.data),a.status==="fail"&&typeof l=="function"&&l(a.data)}if(a.type==="did_event"){const o=a.eventName,l={[DID_EVENT_NAME.LOADED]:()=>{this.modal.loaded()},[DID_EVENT_NAME.OPEN]:()=>{this.modal.openModal()},[DID_EVENT_NAME.CLOSE]:()=>{this.modal.closeModal()},[DID_EVENT_NAME.ACCOUNTS_CHANGED]:()=>{var h,c,g;const A=this.eventListenerMap.accountsChanged;if(!Array.isArray(A))return;const{account:b,connectedWebs:D}=a.data;if(!b){A.forEach(S=>S([]));return}const T=D==null?void 0:D.find(S=>S.origin===window.location.origin);if(T){const S=(h=T==null?void 0:T.net)==null?void 0:h.chainType,L=(g=(c=b==null?void 0:b.seriesWallets)==null?void 0:c[S])==null?void 0:g.walletAddress;if(!L)return;A.forEach(E=>E([L]))}},[DID_EVENT_NAME.DISCONNECT]:()=>{const h=this.eventListenerMap.accountsChanged;if(!Array.isArray(h))return;const{origin:c}=a.data;c===window.location.origin&&h.forEach(g=>g([]))},[DID_EVENT_NAME.CHAIN_CHANGED]:()=>{const h=this.eventListenerMap.chainChanged;if(!Array.isArray(h))return;const{origin:c,net:g}=a.data;c===window.location.origin&&h.forEach(A=>A(g))},[DID_EVENT_NAME.TRON_SET_ACCOUNT]:()=>{const h=this.eventListenerMap.tronSetAccount;Array.isArray(h)&&h.forEach(c=>c(a.data))},[DID_EVENT_NAME.TRON_SET_NODE]:()=>{const h=this.eventListenerMap.tronSetNode;Array.isArray(h)&&h.forEach(c=>c(a.data))},[DID_EVENT_NAME.TELEGRAM_POST_EVENT]:()=>{const h=this.eventListenerMap[DID_EVENT_NAME.TELEGRAM_POST_EVENT];Array.isArray(h)&&h.forEach(c=>c(a.data))},[DID_EVENT_NAME.LOGOUT]:()=>{const h=this.eventListenerMap[DID_EVENT_NAME.LOGOUT];Array.isArray(h)&&h.forEach(c=>c(a.data))}}[o];typeof l=="function"&&l()}}}),st(this,"_generateResponse",async r=>{await this.modal.waitReady();const n=await this.modal.getSDKWindow();return new Promise((s,a)=>{let o=l=>{s(l)};r.data.chainType===exports.ChainType.SOL&&["sol_connect","connect"].includes(r.data.methodName)&&(o=l=>{l.publicKey=new PublicKey(l.publicKey),s(l)}),Ut.promiseMap[r.messageId]={resolve:o,reject:a},n.postMessage(r,"*")})}),st(this,"sendDidMsg",async r=>{await this.modal.waitReady();const n=await this.modal.getSDKWindow(),s=v4$1(),a={target:Ut.DAPP_MESSAGE_TARGET,type:"did_event",messageId:s,data:r};return n.postMessage(a,"*")}),st(this,"send",async r=>{const n=v4$1(),s={target:Ut.DAPP_MESSAGE_TARGET,type:"dapp_event",messageId:n,data:r};return this._generateResponse(s)}),st(this,"on",(r,n)=>{Array.isArray(this.eventListenerMap[r])||(this.eventListenerMap[r]=[]),this.eventListenerMap[r].push(n)}),st(this,"removeEvent",(r,n)=>{const s=this.eventListenerMap[r]||[];this.eventListenerMap[r]=s.filter(a=>a!==n)}),Ut._instance)return Ut._instance;this.modal=e,Ut._instance=this,this.bindEvents()}};st(Gt,"_instance"),st(Gt,"DAPP_MESSAGE_TARGET","jsweb3-dapp"),st(Gt,"DID_MESSAGE_TARGET","jsweb3-did"),st(Gt,"promiseMap",{});let PostMessage=Gt;const getMetadata=()=>{const t=document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]');let e=(t==null?void 0:t.getAttribute("href"))||"";return e&&!e.startsWith("http")&&(e=new URL(e,window.location.origin).href),{name:window.document.title,url:window.location.href,origin:window.location.origin,icon:e}},parseJson=(t,e)=>{try{return JSON.parse(t)}catch{return e}},checkIsMobile=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var lottie$1={exports:{}};(function(module,exports$1){typeof navigator<"u"&&(function(t,e){module.exports=e()})(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,n=t.length,s;for(r=0;r<n;r+=1){s=t[r].prototype;for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e.prototype[a]=s[a])}}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=(function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].pause()},resume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].resume()},setRate:function(e){var r,n=this.audios.length;for(r=0;r<n;r+=1)this.audios[r].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}})(),createTypedArray=(function(){function t(r,n){var s=0,a=[],o;switch(r){case"int16":case"uint8c":o=1;break;default:o=1.1;break}for(s=0;s<n;s+=1)a.push(o);return a}function e(r,n){return r==="float32"?new Float32Array(n):r==="int16"?new Int16Array(n):r==="uint8c"?new Uint8ClampedArray(n):t(r,n)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?e:t})();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(e){return typeof e}:_typeof$6=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],e,r=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]})(),BMMath.random=Math.random,BMMath.abs=function(t){var e=_typeof$6(t);if(e==="object"&&t.length){var r=createSizedArray(t.length),n,s=t.length;for(n=0;n<s;n+=1)r[n]=Math.abs(t[n]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,n){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=n<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,n){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=n<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}var createElementID=(function(){var t=0;return function(){return t+=1,idPrefix$1+"__lottie_element_"+t}})();function HSVtoRGB(t,e,r){var n,s,a,o,l,h,c,g;switch(o=Math.floor(t*6),l=t*6-o,h=r*(1-e),c=r*(1-l*e),g=r*(1-(1-l)*e),o%6){case 0:n=r,s=g,a=h;break;case 1:n=c,s=r,a=h;break;case 2:n=h,s=r,a=g;break;case 3:n=h,s=c,a=r;break;case 4:n=g,s=h,a=r;break;case 5:n=r,s=h,a=c;break}return[n,s,a]}function RGBtoHSV(t,e,r){var n=Math.max(t,e,r),s=Math.min(t,e,r),a=n-s,o,l=n===0?0:a/n,h=n/255;switch(n){case s:o=0;break;case t:o=e-r+a*(e<r?6:0),o/=6*a;break;case e:o=r-t+a*2,o/=6*a;break;case r:o=t-e+a*4,o/=6*a;break}return[o,l,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=(function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(n,s,a){return n<0&&(n=0),s<0&&(s=0),a<0&&(a=0),"#"+t[n]+t[s]+t[a]}})(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(e){return typeof e}:_typeof$5=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(t)}var dataManager=(function(){var t=1,e=[],r,n,s={onmessage:function(){},postMessage:function(b){r({data:b})}},a={postMessage:function(b){s.onmessage({data:b})}};function o(b){if(window.Worker&&window.Blob&&getWebWorker()){var D=new Blob(["var _workerSelf = self; self.onmessage = ",b.toString()],{type:"text/javascript"}),T=URL.createObjectURL(D);return new Worker(T)}return r=b,s}function l(){n||(n=o(function(b){function D(){function S(x,M){var m,C,d=x.length,_,B,u,R;for(C=0;C<d;C+=1)if(m=x[C],"ks"in m&&!m.completed){if(m.completed=!0,m.hasMask){var H=m.masksProperties;for(B=H.length,_=0;_<B;_+=1)if(H[_].pt.k.i)I(H[_].pt.k);else for(R=H[_].pt.k.length,u=0;u<R;u+=1)H[_].pt.k[u].s&&I(H[_].pt.k[u].s[0]),H[_].pt.k[u].e&&I(H[_].pt.k[u].e[0])}m.ty===0?(m.layers=v(m.refId,M),S(m.layers,M)):m.ty===4?w(m.shapes):m.ty===5&&U(m)}}function L(x,M){if(x){var m=0,C=x.length;for(m=0;m<C;m+=1)x[m].t===1&&(x[m].data.layers=v(x[m].data.refId,M),S(x[m].data.layers,M))}}function E(x,M){for(var m=0,C=M.length;m<C;){if(M[m].id===x)return M[m];m+=1}return null}function v(x,M){var m=E(x,M);return m?m.layers.__used?JSON.parse(JSON.stringify(m.layers)):(m.layers.__used=!0,m.layers):null}function w(x){var M,m=x.length,C,d;for(M=m-1;M>=0;M-=1)if(x[M].ty==="sh")if(x[M].ks.k.i)I(x[M].ks.k);else for(d=x[M].ks.k.length,C=0;C<d;C+=1)x[M].ks.k[C].s&&I(x[M].ks.k[C].s[0]),x[M].ks.k[C].e&&I(x[M].ks.k[C].e[0]);else x[M].ty==="gr"&&w(x[M].it)}function I(x){var M,m=x.i.length;for(M=0;M<m;M+=1)x.i[M][0]+=x.v[M][0],x.i[M][1]+=x.v[M][1],x.o[M][0]+=x.v[M][0],x.o[M][1]+=x.v[M][1]}function F(x,M){var m=M?M.split("."):[100,100,100];return x[0]>m[0]?!0:m[0]>x[0]?!1:x[1]>m[1]?!0:m[1]>x[1]?!1:x[2]>m[2]?!0:m[2]>x[2]?!1:null}var O=(function(){var x=[4,4,14];function M(C){var d=C.t.d;C.t.d={k:[{s:d,t:0}]}}function m(C){var d,_=C.length;for(d=0;d<_;d+=1)C[d].ty===5&&M(C[d])}return function(C){if(F(x,C.v)&&(m(C.layers),C.assets)){var d,_=C.assets.length;for(d=0;d<_;d+=1)C.assets[d].layers&&m(C.assets[d].layers)}}})(),V=(function(){var x=[4,7,99];return function(M){if(M.chars&&!F(x,M.v)){var m,C=M.chars.length;for(m=0;m<C;m+=1){var d=M.chars[m];d.data&&d.data.shapes&&(w(d.data.shapes),d.data.ip=0,d.data.op=99999,d.data.st=0,d.data.sr=1,d.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},M.chars[m].t||(d.data.shapes.push({ty:"no"}),d.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}})(),$=(function(){var x=[5,7,15];function M(C){var d=C.t.p;typeof d.a=="number"&&(d.a={a:0,k:d.a}),typeof d.p=="number"&&(d.p={a:0,k:d.p}),typeof d.r=="number"&&(d.r={a:0,k:d.r})}function m(C){var d,_=C.length;for(d=0;d<_;d+=1)C[d].ty===5&&M(C[d])}return function(C){if(F(x,C.v)&&(m(C.layers),C.assets)){var d,_=C.assets.length;for(d=0;d<_;d+=1)C.assets[d].layers&&m(C.assets[d].layers)}}})(),j=(function(){var x=[4,1,9];function M(C){var d,_=C.length,B,u;for(d=0;d<_;d+=1)if(C[d].ty==="gr")M(C[d].it);else if(C[d].ty==="fl"||C[d].ty==="st")if(C[d].c.k&&C[d].c.k[0].i)for(u=C[d].c.k.length,B=0;B<u;B+=1)C[d].c.k[B].s&&(C[d].c.k[B].s[0]/=255,C[d].c.k[B].s[1]/=255,C[d].c.k[B].s[2]/=255,C[d].c.k[B].s[3]/=255),C[d].c.k[B].e&&(C[d].c.k[B].e[0]/=255,C[d].c.k[B].e[1]/=255,C[d].c.k[B].e[2]/=255,C[d].c.k[B].e[3]/=255);else C[d].c.k[0]/=255,C[d].c.k[1]/=255,C[d].c.k[2]/=255,C[d].c.k[3]/=255}function m(C){var d,_=C.length;for(d=0;d<_;d+=1)C[d].ty===4&&M(C[d].shapes)}return function(C){if(F(x,C.v)&&(m(C.layers),C.assets)){var d,_=C.assets.length;for(d=0;d<_;d+=1)C.assets[d].layers&&m(C.assets[d].layers)}}})(),W=(function(){var x=[4,4,18];function M(C){var d,_=C.length,B,u;for(d=_-1;d>=0;d-=1)if(C[d].ty==="sh")if(C[d].ks.k.i)C[d].ks.k.c=C[d].closed;else for(u=C[d].ks.k.length,B=0;B<u;B+=1)C[d].ks.k[B].s&&(C[d].ks.k[B].s[0].c=C[d].closed),C[d].ks.k[B].e&&(C[d].ks.k[B].e[0].c=C[d].closed);else C[d].ty==="gr"&&M(C[d].it)}function m(C){var d,_,B=C.length,u,R,H,K;for(_=0;_<B;_+=1){if(d=C[_],d.hasMask){var J=d.masksProperties;for(R=J.length,u=0;u<R;u+=1)if(J[u].pt.k.i)J[u].pt.k.c=J[u].cl;else for(K=J[u].pt.k.length,H=0;H<K;H+=1)J[u].pt.k[H].s&&(J[u].pt.k[H].s[0].c=J[u].cl),J[u].pt.k[H].e&&(J[u].pt.k[H].e[0].c=J[u].cl)}d.ty===4&&M(d.shapes)}}return function(C){if(F(x,C.v)&&(m(C.layers),C.assets)){var d,_=C.assets.length;for(d=0;d<_;d+=1)C.assets[d].layers&&m(C.assets[d].layers)}}})();function q(x){x.__complete||(j(x),O(x),V(x),$(x),W(x),S(x.layers,x.assets),L(x.chars,x.assets),x.__complete=!0)}function U(x){x.t.a.length===0&&"m"in x.t.p}var p={};return p.completeData=q,p.checkColors=j,p.checkChars=V,p.checkPathProperties=$,p.checkShapes=W,p.completeLayers=S,p}if(a.dataManager||(a.dataManager=D()),a.assetLoader||(a.assetLoader=(function(){function S(E){var v=E.getResponseHeader("content-type");return v&&E.responseType==="json"&&v.indexOf("json")!==-1||E.response&&_typeof$5(E.response)==="object"?E.response:E.response&&typeof E.response=="string"?JSON.parse(E.response):E.responseText?JSON.parse(E.responseText):null}function L(E,v,w,I){var F,O=new XMLHttpRequest;try{O.responseType="json"}catch{}O.onreadystatechange=function(){if(O.readyState===4)if(O.status===200)F=S(O),w(F);else try{F=S(O),w(F)}catch(V){I&&I(V)}};try{O.open(["G","E","T"].join(""),E,!0)}catch{O.open(["G","E","T"].join(""),v+"/"+E,!0)}O.send()}return{load:L}})()),b.data.type==="loadAnimation")a.assetLoader.load(b.data.path,b.data.fullPath,function(S){a.dataManager.completeData(S),a.postMessage({id:b.data.id,payload:S,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})});else if(b.data.type==="complete"){var T=b.data.animation;a.dataManager.completeData(T),a.postMessage({id:b.data.id,payload:T,status:"success"})}else b.data.type==="loadData"&&a.assetLoader.load(b.data.path,b.data.fullPath,function(S){a.postMessage({id:b.data.id,payload:S,status:"success"})},function(){a.postMessage({id:b.data.id,status:"error"})})}),n.onmessage=function(b){var D=b.data,T=D.id,S=e[T];e[T]=null,D.status==="success"?S.onComplete(D.payload):S.onError&&S.onError()})}function h(b,D){t+=1;var T="processId_"+t;return e[T]={onComplete:b,onError:D},T}function c(b,D,T){l();var S=h(D,T);n.postMessage({type:"loadAnimation",path:b,fullPath:window.location.origin+window.location.pathname,id:S})}function g(b,D,T){l();var S=h(D,T);n.postMessage({type:"loadData",path:b,fullPath:window.location.origin+window.location.pathname,id:S})}function A(b,D,T){l();var S=h(D,T);n.postMessage({type:"complete",animation:b,id:S})}return{loadAnimation:c,loadData:g,completeAnimation:A}})(),ImagePreloader=(function(){var t=(function(){var E=createTag("canvas");E.width=1,E.height=1;var v=E.getContext("2d");return v.fillStyle="rgba(0,0,0,0)",v.fillRect(0,0,1,1),E})();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(E,v,w){var I="";if(E.e)I=E.p;else if(v){var F=E.p;F.indexOf("images/")!==-1&&(F=F.split("/")[1]),I=v+F}else I=w,I+=E.u?E.u:"",I+=E.p;return I}function s(E){var v=0,w=setInterval((function(){var I=E.getBBox();(I.width||v>500)&&(this._imageLoaded(),clearInterval(w)),v+=1}).bind(this),50)}function a(E){var v=n(E,this.assetsPath,this.path),w=createNS("image");isSafari?this.testImageLoaded(w):w.addEventListener("load",this._imageLoaded,!1),w.addEventListener("error",(function(){I.img=t,this._imageLoaded()}).bind(this),!1),w.setAttributeNS("http://www.w3.org/1999/xlink","href",v),this._elementHelper.append?this._elementHelper.append(w):this._elementHelper.appendChild(w);var I={img:w,assetData:E};return I}function o(E){var v=n(E,this.assetsPath,this.path),w=createTag("img");w.crossOrigin="anonymous",w.addEventListener("load",this._imageLoaded,!1),w.addEventListener("error",(function(){I.img=t,this._imageLoaded()}).bind(this),!1),w.src=v;var I={img:w,assetData:E};return I}function l(E){var v={assetData:E},w=n(E,this.assetsPath,this.path);return dataManager.loadData(w,(function(I){v.img=I,this._footageLoaded()}).bind(this),(function(){v.img={},this._footageLoaded()}).bind(this)),v}function h(E,v){this.imagesLoadedCb=v;var w,I=E.length;for(w=0;w<I;w+=1)E[w].layers||(!E[w].t||E[w].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(E[w]))):E[w].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(E[w]))))}function c(E){this.path=E||""}function g(E){this.assetsPath=E||""}function A(E){for(var v=0,w=this.images.length;v<w;){if(this.images[v].assetData===E)return this.images[v].img;v+=1}return null}function b(){this.imagesLoadedCb=null,this.images.length=0}function D(){return this.totalImages===this.loadedAssets}function T(){return this.totalFootages===this.loadedFootagesCount}function S(E,v){E==="svg"?(this._elementHelper=v,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function L(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return L.prototype={loadAssets:h,setAssetsPath:g,setPath:c,loadedImages:D,loadedFootages:T,destroy:b,getAsset:A,createImgData:o,createImageData:a,imageLoaded:e,footageLoaded:r,setCacheType:S},L})();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],n=0;n<r.length;n+=1)r[n](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),(function(){this.removeEventListener(t,e)}).bind(this)},removeEventListener:function(t,e){if(!e)this._cbs[t]=null;else if(this._cbs[t]){for(var r=0,n=this._cbs[t].length;r<n;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,n-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=(function(){function t(e){for(var r=e.split(`\r
|
|
7
|
-
`),n={},s,a=0,o=0;o<r.length;o+=1)s=r[o].split(":"),s.length===2&&(n[s[0]]=s[1].trim(),a+=1);if(a===0)throw new Error;return n}return function(e){for(var r=[],n=0;n<e.length;n+=1){var s=e[n],a={time:s.tm,duration:s.dr};try{a.payload=JSON.parse(e[n].cm)}catch{try{a.payload=t(e[n].cm)}catch{a.payload={name:e[n].cm}}}r.push(a)}return r}})(),ProjectInterface=(function(){function t(e){this.compositions.push(e)}return function(){function e(r){for(var n=0,s=this.compositions.length;n<s;){if(this.compositions[n].data&&this.compositions[n].data.nm===r)return this.compositions[n].prepareFrame&&this.compositions[n].data.xt&&this.compositions[n].prepareFrame(this.currentFrame),this.compositions[n].compInterface;n+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}})(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var t in renderers)if(renderers[t])return t;return""}function _typeof$4(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(e){return typeof e}:_typeof$4=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(t,"autoloadSegments")?t.autoloadSegments:!0,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&_typeof$4(e)!=="object"&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},n=t.attributes;r.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",r.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var s=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";s==="false"?r.loop=!1:s==="true"?r.loop=!0:s!==""&&(r.loop=parseInt(s,10));var a=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:n.getNamedItem("bm-autoplay")?n.getNamedItem("bm-autoplay").value:!0;r.autoplay=a!=="false",r.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"";var o=n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"";o==="false"&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,r,n=e.length,s=t.layers,a,o=s.length;for(a=0;a<o;a+=1)for(r=0;r<n;){if(e[r].id===s[a].id){e[r]=s[a];break}r+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(n=t.assets.length,r=0;r<n;r+=1)this.animationData.assets.push(t.assets[r]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var r=typeof t=="number"?t:void 0,n=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(r,n)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if(e=this.markers[r],e.payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!(r&&this.name!==r)){var n=Number(t);if(isNaN(n)){var s=this.getMarkerData(t);s&&this.goToAndStop(s.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!(r&&this.name!==r)){var n=Number(t);if(isNaN(n)){var s=this.getMarkerData(t);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(n,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!(this.isPaused===!0||this.isLoaded===!1)){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,n=t.length;for(r=0;r<n;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(t){this.loop=t},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,r){try{var n=this.renderer.getElementByPath(t);n.updateDocumentData(e,r)}catch{}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=(function(){var t={},e=[],r=0,n=0,s=0,a=!0,o=!1;function l(m){for(var C=0,d=m.target;C<n;)e[C].animation===d&&(e.splice(C,1),C-=1,n-=1,d.isPaused||A()),C+=1}function h(m,C){if(!m)return null;for(var d=0;d<n;){if(e[d].elem===m&&e[d].elem!==null)return e[d].animation;d+=1}var _=new AnimationItem;return b(_,m),_.setData(m,C),_}function c(){var m,C=e.length,d=[];for(m=0;m<C;m+=1)d.push(e[m].animation);return d}function g(){s+=1,W()}function A(){s-=1}function b(m,C){m.addEventListener("destroy",l),m.addEventListener("_active",g),m.addEventListener("_idle",A),e.push({elem:C,animation:m}),n+=1}function D(m){var C=new AnimationItem;return b(C,null),C.setParams(m),C}function T(m,C){var d;for(d=0;d<n;d+=1)e[d].animation.setSpeed(m,C)}function S(m,C){var d;for(d=0;d<n;d+=1)e[d].animation.setDirection(m,C)}function L(m){var C;for(C=0;C<n;C+=1)e[C].animation.play(m)}function E(m){var C=m-r,d;for(d=0;d<n;d+=1)e[d].animation.advanceTime(C);r=m,s&&!o?window.requestAnimationFrame(E):a=!0}function v(m){r=m,window.requestAnimationFrame(E)}function w(m){var C;for(C=0;C<n;C+=1)e[C].animation.pause(m)}function I(m,C,d){var _;for(_=0;_<n;_+=1)e[_].animation.goToAndStop(m,C,d)}function F(m){var C;for(C=0;C<n;C+=1)e[C].animation.stop(m)}function O(m){var C;for(C=0;C<n;C+=1)e[C].animation.togglePause(m)}function V(m){var C;for(C=n-1;C>=0;C-=1)e[C].animation.destroy(m)}function $(m,C,d){var _=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),B,u=_.length;for(B=0;B<u;B+=1)d&&_[B].setAttribute("data-bm-type",d),h(_[B],m);if(C&&u===0){d||(d="svg");var R=document.getElementsByTagName("body")[0];R.innerText="";var H=createTag("div");H.style.width="100%",H.style.height="100%",H.setAttribute("data-bm-type",d),R.appendChild(H),h(H,m)}}function j(){var m;for(m=0;m<n;m+=1)e[m].animation.resize()}function W(){!o&&s&&a&&(window.requestAnimationFrame(v),a=!1)}function q(){o=!0}function U(){o=!1,W()}function p(m,C){var d;for(d=0;d<n;d+=1)e[d].animation.setVolume(m,C)}function x(m){var C;for(C=0;C<n;C+=1)e[C].animation.mute(m)}function M(m){var C;for(C=0;C<n;C+=1)e[C].animation.unmute(m)}return t.registerAnimation=h,t.loadAnimation=D,t.setSpeed=T,t.setDirection=S,t.play=L,t.pause=w,t.stop=F,t.togglePause=O,t.searchAnimations=$,t.resize=j,t.goToAndStop=I,t.destroy=V,t.freeze=q,t.unfreeze=U,t.setVolume=p,t.mute=x,t.unmute=M,t.getRegisteredAnimations=c,t})(),BezierFactory=(function(){var t={};t.getBezierEasing=r;var e={};function r(v,w,I,F,O){var V=O||("bez_"+v+"_"+w+"_"+I+"_"+F).replace(/\./g,"p");if(e[V])return e[V];var $=new E([v,w,I,F]);return e[V]=$,$}var n=4,s=.001,a=1e-7,o=10,l=11,h=1/(l-1),c=typeof Float32Array=="function";function g(v,w){return 1-3*w+3*v}function A(v,w){return 3*w-6*v}function b(v){return 3*v}function D(v,w,I){return((g(w,I)*v+A(w,I))*v+b(w))*v}function T(v,w,I){return 3*g(w,I)*v*v+2*A(w,I)*v+b(w)}function S(v,w,I,F,O){var V,$,j=0;do $=w+(I-w)/2,V=D($,F,O)-v,V>0?I=$:w=$;while(Math.abs(V)>a&&++j<o);return $}function L(v,w,I,F){for(var O=0;O<n;++O){var V=T(w,I,F);if(V===0)return w;var $=D(w,I,F)-v;w-=$/V}return w}function E(v){this._p=v,this._mSampleValues=c?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return E.prototype={get:function(v){var w=this._p[0],I=this._p[1],F=this._p[2],O=this._p[3];return this._precomputed||this._precompute(),w===I&&F===O?v:v===0?0:v===1?1:D(this._getTForX(v),I,O)},_precompute:function(){var v=this._p[0],w=this._p[1],I=this._p[2],F=this._p[3];this._precomputed=!0,(v!==w||I!==F)&&this._calcSampleValues()},_calcSampleValues:function(){for(var v=this._p[0],w=this._p[2],I=0;I<l;++I)this._mSampleValues[I]=D(I*h,v,w)},_getTForX:function(v){for(var w=this._p[0],I=this._p[2],F=this._mSampleValues,O=0,V=1,$=l-1;V!==$&&F[V]<=v;++V)O+=h;--V;var j=(v-F[V])/(F[V+1]-F[V]),W=O+j*h,q=T(W,w,I);return q>=s?L(v,W,w,I):q===0?W:S(v,O,O+h,w,I)}},t})(),pooling=(function(){function t(e){return e.concat(createSizedArray(e.length))}return{double:t}})(),poolFactory=(function(){return function(t,e,r){var n=0,s=t,a=createSizedArray(s),o={newElement:l,release:h};function l(){var c;return n?(n-=1,c=a[n]):c=e(),c}function h(c){n===s&&(a=pooling.double(a),s*=2),r&&r(c),a[n]=c,n+=1}return o}})(),bezierLengthPool=(function(){function t(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,t)})(),segmentsLengthPool=(function(){function t(){return{lengths:[],totalLength:0}}function e(r){var n,s=r.lengths.length;for(n=0;n<s;n+=1)bezierLengthPool.release(r.lengths[n]);r.lengths.length=0}return poolFactory(8,t,e)})();function bezFunction(){var t=Math;function e(b,D,T,S,L,E){var v=b*S+D*L+T*E-L*S-E*b-T*D;return v>-.001&&v<.001}function r(b,D,T,S,L,E,v,w,I){if(T===0&&E===0&&I===0)return e(b,D,S,L,v,w);var F=t.sqrt(t.pow(S-b,2)+t.pow(L-D,2)+t.pow(E-T,2)),O=t.sqrt(t.pow(v-b,2)+t.pow(w-D,2)+t.pow(I-T,2)),V=t.sqrt(t.pow(v-S,2)+t.pow(w-L,2)+t.pow(I-E,2)),$;return F>O?F>V?$=F-O-V:$=V-O-F:V>O?$=V-O-F:$=O-F-V,$>-1e-4&&$<1e-4}var n=(function(){return function(b,D,T,S){var L=getDefaultCurveSegments(),E,v,w,I,F,O=0,V,$=[],j=[],W=bezierLengthPool.newElement();for(w=T.length,E=0;E<L;E+=1){for(F=E/(L-1),V=0,v=0;v<w;v+=1)I=bmPow(1-F,3)*b[v]+3*bmPow(1-F,2)*F*T[v]+3*(1-F)*bmPow(F,2)*S[v]+bmPow(F,3)*D[v],$[v]=I,j[v]!==null&&(V+=bmPow($[v]-j[v],2)),j[v]=$[v];V&&(V=bmSqrt(V),O+=V),W.percents[E]=F,W.lengths[E]=O}return W.addedLength=O,W}})();function s(b){var D=segmentsLengthPool.newElement(),T=b.c,S=b.v,L=b.o,E=b.i,v,w=b._length,I=D.lengths,F=0;for(v=0;v<w-1;v+=1)I[v]=n(S[v],S[v+1],L[v],E[v+1]),F+=I[v].addedLength;return T&&w&&(I[v]=n(S[v],S[0],L[v],E[0]),F+=I[v].addedLength),D.totalLength=F,D}function a(b){this.segmentLength=0,this.points=new Array(b)}function o(b,D){this.partialLength=b,this.point=D}var l=(function(){var b={};return function(D,T,S,L){var E=(D[0]+"_"+D[1]+"_"+T[0]+"_"+T[1]+"_"+S[0]+"_"+S[1]+"_"+L[0]+"_"+L[1]).replace(/\./g,"p");if(!b[E]){var v=getDefaultCurveSegments(),w,I,F,O,V,$=0,j,W,q=null;D.length===2&&(D[0]!==T[0]||D[1]!==T[1])&&e(D[0],D[1],T[0],T[1],D[0]+S[0],D[1]+S[1])&&e(D[0],D[1],T[0],T[1],T[0]+L[0],T[1]+L[1])&&(v=2);var U=new a(v);for(F=S.length,w=0;w<v;w+=1){for(W=createSizedArray(F),V=w/(v-1),j=0,I=0;I<F;I+=1)O=bmPow(1-V,3)*D[I]+3*bmPow(1-V,2)*V*(D[I]+S[I])+3*(1-V)*bmPow(V,2)*(T[I]+L[I])+bmPow(V,3)*T[I],W[I]=O,q!==null&&(j+=bmPow(W[I]-q[I],2));j=bmSqrt(j),$+=j,U.points[w]=new o(j,W),q=W}U.segmentLength=$,b[E]=U}return b[E]}})();function h(b,D){var T=D.percents,S=D.lengths,L=T.length,E=bmFloor((L-1)*b),v=b*D.addedLength,w=0;if(E===L-1||E===0||v===S[E])return T[E];for(var I=S[E]>v?-1:1,F=!0;F;)if(S[E]<=v&&S[E+1]>v?(w=(v-S[E])/(S[E+1]-S[E]),F=!1):E+=I,E<0||E>=L-1){if(E===L-1)return T[E];F=!1}return T[E]+(T[E+1]-T[E])*w}function c(b,D,T,S,L,E){var v=h(L,E),w=1-v,I=t.round((w*w*w*b[0]+(v*w*w+w*v*w+w*w*v)*T[0]+(v*v*w+w*v*v+v*w*v)*S[0]+v*v*v*D[0])*1e3)/1e3,F=t.round((w*w*w*b[1]+(v*w*w+w*v*w+w*w*v)*T[1]+(v*v*w+w*v*v+v*w*v)*S[1]+v*v*v*D[1])*1e3)/1e3;return[I,F]}var g=createTypedArray("float32",8);function A(b,D,T,S,L,E,v){L<0?L=0:L>1&&(L=1);var w=h(L,v);E=E>1?1:E;var I=h(E,v),F,O=b.length,V=1-w,$=1-I,j=V*V*V,W=w*V*V*3,q=w*w*V*3,U=w*w*w,p=V*V*$,x=w*V*$+V*w*$+V*V*I,M=w*w*$+V*w*I+w*V*I,m=w*w*I,C=V*$*$,d=w*$*$+V*I*$+V*$*I,_=w*I*$+V*I*I+w*$*I,B=w*I*I,u=$*$*$,R=I*$*$+$*I*$+$*$*I,H=I*I*$+$*I*I+I*$*I,K=I*I*I;for(F=0;F<O;F+=1)g[F*4]=t.round((j*b[F]+W*T[F]+q*S[F]+U*D[F])*1e3)/1e3,g[F*4+1]=t.round((p*b[F]+x*T[F]+M*S[F]+m*D[F])*1e3)/1e3,g[F*4+2]=t.round((C*b[F]+d*T[F]+_*S[F]+B*D[F])*1e3)/1e3,g[F*4+3]=t.round((u*b[F]+R*T[F]+H*S[F]+K*D[F])*1e3)/1e3;return g}return{getSegmentsLength:s,getNewSegment:A,getPointInSegment:c,buildBezierData:l,pointOnLine2D:e,pointOnLine3D:r}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var r=this.offsetTime,n;this.propType==="multidimensional"&&(n=createTypedArray("float32",this.pv.length));for(var s=e.lastIndex,a=s,o=this.keyframes.length-1,l=!0,h,c,g;l;){if(h=this.keyframes[a],c=this.keyframes[a+1],a===o-1&&t>=c.t-r){h.h&&(h=c),s=0;break}if(c.t-r>t){s=a;break}a<o-1?a+=1:(s=0,l=!1)}g=this.keyframesMetadata[a]||{};var A,b,D,T,S,L,E=c.t-r,v=h.t-r,w;if(h.to){g.bezierData||(g.bezierData=bez.buildBezierData(h.s,c.s||h.e,h.to,h.ti));var I=g.bezierData;if(t>=E||t<v){var F=t>=E?I.points.length-1:0;for(b=I.points[F].point.length,A=0;A<b;A+=1)n[A]=I.points[F].point[A]}else{g.__fnct?L=g.__fnct:(L=BezierFactory.getBezierEasing(h.o.x,h.o.y,h.i.x,h.i.y,h.n).get,g.__fnct=L),D=L((t-v)/(E-v));var O=I.segmentLength*D,V,$=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastAddedLength:0;for(S=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastPoint:0,l=!0,T=I.points.length;l;){if($+=I.points[S].partialLength,O===0||D===0||S===I.points.length-1){for(b=I.points[S].point.length,A=0;A<b;A+=1)n[A]=I.points[S].point[A];break}else if(O>=$&&O<$+I.points[S+1].partialLength){for(V=(O-$)/I.points[S+1].partialLength,b=I.points[S].point.length,A=0;A<b;A+=1)n[A]=I.points[S].point[A]+(I.points[S+1].point[A]-I.points[S].point[A])*V;break}S<T-1?S+=1:l=!1}e._lastPoint=S,e._lastAddedLength=$-I.points[S].partialLength,e._lastKeyframeIndex=a}}else{var j,W,q,U,p;if(o=h.s.length,w=c.s||h.e,this.sh&&h.h!==1)if(t>=E)n[0]=w[0],n[1]=w[1],n[2]=w[2];else if(t<=v)n[0]=h.s[0],n[1]=h.s[1],n[2]=h.s[2];else{var x=createQuaternion(h.s),M=createQuaternion(w),m=(t-v)/(E-v);quaternionToEuler(n,slerp(x,M,m))}else for(a=0;a<o;a+=1)h.h!==1&&(t>=E?D=1:t<v?D=0:(h.o.x.constructor===Array?(g.__fnct||(g.__fnct=[]),g.__fnct[a]?L=g.__fnct[a]:(j=h.o.x[a]===void 0?h.o.x[0]:h.o.x[a],W=h.o.y[a]===void 0?h.o.y[0]:h.o.y[a],q=h.i.x[a]===void 0?h.i.x[0]:h.i.x[a],U=h.i.y[a]===void 0?h.i.y[0]:h.i.y[a],L=BezierFactory.getBezierEasing(j,W,q,U).get,g.__fnct[a]=L)):g.__fnct?L=g.__fnct:(j=h.o.x,W=h.o.y,q=h.i.x,U=h.i.y,L=BezierFactory.getBezierEasing(j,W,q,U).get,h.keyframeMetadata=L),D=L((t-v)/(E-v)))),w=c.s||h.e,p=h.h===1?h.s[a]:h.s[a]+(w[a]-h.s[a])*D,this.propType==="multidimensional"?n[a]=p:n=p}return e.lastIndex=s,n}function slerp(t,e,r){var n=[],s=t[0],a=t[1],o=t[2],l=t[3],h=e[0],c=e[1],g=e[2],A=e[3],b,D,T,S,L;return D=s*h+a*c+o*g+l*A,D<0&&(D=-D,h=-h,c=-c,g=-g,A=-A),1-D>1e-6?(b=Math.acos(D),T=Math.sin(b),S=Math.sin((1-r)*b)/T,L=Math.sin(r*b)/T):(S=1-r,L=r),n[0]=S*s+L*h,n[1]=S*a+L*c,n[2]=S*o+L*g,n[3]=S*l+L*A,n}function quaternionToEuler(t,e){var r=e[0],n=e[1],s=e[2],a=e[3],o=Math.atan2(2*n*a-2*r*s,1-2*n*n-2*s*s),l=Math.asin(2*r*n+2*s*a),h=Math.atan2(2*r*a-2*n*s,1-2*r*r-2*s*s);t[0]=o/degToRads,t[1]=l/degToRads,t[2]=h/degToRads}function createQuaternion(t){var e=t[0]*degToRads,r=t[1]*degToRads,n=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),o=Math.cos(n/2),l=Math.sin(e/2),h=Math.sin(r/2),c=Math.sin(n/2),g=s*a*o-l*h*c,A=l*h*o+s*a*c,b=l*a*o+s*h*c,D=s*h*o-l*a*c;return[A,b,D,g]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(t,this._caching);this.pv=n}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if(this.propType==="unidimensional")e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,n=this.v.length;r<n;)e=t[r]*this.mult,mathAbs(this.v[r]-e)>1e-5&&(this.v[r]=e,this._mdf=!0),r+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function ValueProperty(t,e,r,n){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(t,e,r,n){this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var s,a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),s=0;s<a;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(t,e,r,n){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=n,this.comp=t.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(t,e,r,n){this.propType="multidimensional";var s,a=e.k.length,o,l,h,c;for(s=0;s<a-1;s+=1)e.k[s].to&&e.k[s].s&&e.k[s+1]&&e.k[s+1].s&&(o=e.k[s].s,l=e.k[s+1].s,h=e.k[s].to,c=e.k[s].ti,(o.length===2&&!(o[0]===l[0]&&o[1]===l[1])&&bez.pointOnLine2D(o[0],o[1],l[0],l[1],o[0]+h[0],o[1]+h[1])&&bez.pointOnLine2D(o[0],o[1],l[0],l[1],l[0]+c[0],l[1]+c[1])||o.length===3&&!(o[0]===l[0]&&o[1]===l[1]&&o[2]===l[2])&&bez.pointOnLine3D(o[0],o[1],o[2],l[0],l[1],l[2],o[0]+h[0],o[1]+h[1],o[2]+h[2])&&bez.pointOnLine3D(o[0],o[1],o[2],l[0],l[1],l[2],l[0]+c[0],l[1]+c[1],l[2]+c[2]))&&(e.k[s].to=null,e.k[s].ti=null),o[0]===l[0]&&o[1]===l[1]&&h[0]===0&&h[1]===0&&c[0]===0&&c[1]===0&&(o.length===2||o[2]===l[2]&&h[2]===0&&c[2]===0)&&(e.k[s].to=null,e.k[s].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=n,this.comp=t.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var g=e.k[0].s.length;for(this.v=createTypedArray("float32",g),this.pv=createTypedArray("float32",g),s=0;s<g;s+=1)this.v[s]=initFrame,this.pv[s]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",g)},this.addEffect=addEffect}var PropertyFactory=(function(){function t(r,n,s,a,o){n.sid&&(n=r.globalData.slotManager.getProp(n));var l;if(!n.k.length)l=new ValueProperty(r,n,a,o);else if(typeof n.k[0]=="number")l=new MultiDimensionalProperty(r,n,a,o);else switch(s){case 0:l=new KeyframedValueProperty(r,n,a,o);break;case 1:l=new KeyframedMultidimensionalProperty(r,n,a,o);break}return l.effectsSequence.length&&o.addDynamicProperty(l),l}var e={getProp:t};return e})();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=(function(){function t(){return createTypedArray("float32",2)}return poolFactory(8,t)})();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,n,s){var a;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[n]||a[n]&&!s)&&(a[n]=pointPool.newElement()),a[n][0]=t,a[n][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,n,s,a,o,l){this.setXYAt(t,e,"v",o,l),this.setXYAt(r,n,"o",o,l),this.setXYAt(s,a,"i",o,l)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,n=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],n[0][0],n[0][1],r[0][0],r[0][1],0,!1),s=1);var a=this._length-1,o=this._length,l;for(l=s;l<o;l+=1)t.setTripleAt(e[a][0],e[a][1],n[a][0],n[a][1],r[a][0],r[a][1],l,!1),a-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=(function(){function t(){return new ShapePath}function e(s){var a=s._length,o;for(o=0;o<a;o+=1)pointPool.release(s.v[o]),pointPool.release(s.i[o]),pointPool.release(s.o[o]),s.v[o]=null,s.i[o]=null,s.o[o]=null;s._length=0,s.c=!1}function r(s){var a=n.newElement(),o,l=s._length===void 0?s.v.length:s._length;for(a.setLength(l),a.c=s.c,o=0;o<l;o+=1)a.setTripleAt(s.v[o][0],s.v[o][1],s.o[o][0],s.o[o][1],s.i[o][0],s.i[o][1],o);return a}var n=poolFactory(4,t,e);return n.clone=r,n})();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(function(){var t={newShapeCollection:s,release:a},e=0,r=4,n=createSizedArray(r);function s(){var o;return e?(e-=1,o=n[e]):o=new ShapeCollection,o}function a(o){var l,h=o._length;for(l=0;l<h;l+=1)shapePool.release(o.shapes[l]);o._length=0,e===r&&(n=pooling.double(n),r*=2),n[e]=o,e+=1}return t})(),ShapePropertyFactory=(function(){var t=-999999;function e(E,v,w){var I=w.lastIndex,F,O,V,$,j,W,q,U,p,x=this.keyframes;if(E<x[0].t-this.offsetTime)F=x[0].s[0],V=!0,I=0;else if(E>=x[x.length-1].t-this.offsetTime)F=x[x.length-1].s?x[x.length-1].s[0]:x[x.length-2].e[0],V=!0;else{for(var M=I,m=x.length-1,C=!0,d,_,B;C&&(d=x[M],_=x[M+1],!(_.t-this.offsetTime>E));)M<m-1?M+=1:C=!1;if(B=this.keyframesMetadata[M]||{},V=d.h===1,I=M,!V){if(E>=_.t-this.offsetTime)U=1;else if(E<d.t-this.offsetTime)U=0;else{var u;B.__fnct?u=B.__fnct:(u=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,B.__fnct=u),U=u((E-(d.t-this.offsetTime))/(_.t-this.offsetTime-(d.t-this.offsetTime)))}O=_.s?_.s[0]:d.e[0]}F=d.s[0]}for(W=v._length,q=F.i[0].length,w.lastIndex=I,$=0;$<W;$+=1)for(j=0;j<q;j+=1)p=V?F.i[$][j]:F.i[$][j]+(O.i[$][j]-F.i[$][j])*U,v.i[$][j]=p,p=V?F.o[$][j]:F.o[$][j]+(O.o[$][j]-F.o[$][j])*U,v.o[$][j]=p,p=V?F.v[$][j]:F.v[$][j]+(O.v[$][j]-F.v[$][j])*U,v.v[$][j]=p}function r(){var E=this.comp.renderedFrame-this.offsetTime,v=this.keyframes[0].t-this.offsetTime,w=this.keyframes[this.keyframes.length-1].t-this.offsetTime,I=this._caching.lastFrame;return I!==t&&(I<v&&E<v||I>w&&E>w)||(this._caching.lastIndex=I<E?this._caching.lastIndex:0,this.interpolateShape(E,this.pv,this._caching)),this._caching.lastFrame=E,this.pv}function n(){this.paths=this.localShapeCollection}function s(E,v){if(E._length!==v._length||E.c!==v.c)return!1;var w,I=E._length;for(w=0;w<I;w+=1)if(E.v[w][0]!==v.v[w][0]||E.v[w][1]!==v.v[w][1]||E.o[w][0]!==v.o[w][0]||E.o[w][1]!==v.o[w][1]||E.i[w][0]!==v.i[w][0]||E.i[w][1]!==v.i[w][1])return!1;return!0}function a(E){s(this.v,E)||(this.v=shapePool.clone(E),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var E;this.kf?E=this.pv:this.data.ks?E=this.data.ks.k:E=this.data.pt.k;var v,w=this.effectsSequence.length;for(v=0;v<w;v+=1)E=this.effectsSequence[v](E);this.setVValue(E),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function l(E,v,w){this.propType="shape",this.comp=E.comp,this.container=E,this.elem=E,this.data=v,this.k=!1,this.kf=!1,this._mdf=!1;var I=w===3?v.pt.k:v.ks.k;this.v=shapePool.clone(I),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function h(E){this.effectsSequence.push(E),this.container.addDynamicProperty(this)}l.prototype.interpolateShape=e,l.prototype.getValue=o,l.prototype.setVValue=a,l.prototype.addEffect=h;function c(E,v,w){this.propType="shape",this.comp=E.comp,this.elem=E,this.container=E,this.offsetTime=E.data.st,this.keyframes=w===3?v.pt.k:v.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var I=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,I),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=n,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}c.prototype.getValue=o,c.prototype.interpolateShape=e,c.prototype.setVValue=a,c.prototype.addEffect=h;var g=(function(){var E=roundCorner;function v(w,I){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=I.d,this.elem=w,this.comp=w.comp,this.frameId=-1,this.initDynamicPropertyContainer(w),this.p=PropertyFactory.getProp(w,I.p,1,0,this),this.s=PropertyFactory.getProp(w,I.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return v.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var w=this.p.v[0],I=this.p.v[1],F=this.s.v[0]/2,O=this.s.v[1]/2,V=this.d!==3,$=this.v;$.v[0][0]=w,$.v[0][1]=I-O,$.v[1][0]=V?w+F:w-F,$.v[1][1]=I,$.v[2][0]=w,$.v[2][1]=I+O,$.v[3][0]=V?w-F:w+F,$.v[3][1]=I,$.i[0][0]=V?w-F*E:w+F*E,$.i[0][1]=I-O,$.i[1][0]=V?w+F:w-F,$.i[1][1]=I-O*E,$.i[2][0]=V?w+F*E:w-F*E,$.i[2][1]=I+O,$.i[3][0]=V?w-F:w+F,$.i[3][1]=I+O*E,$.o[0][0]=V?w+F*E:w-F*E,$.o[0][1]=I-O,$.o[1][0]=V?w+F:w-F,$.o[1][1]=I+O*E,$.o[2][0]=V?w-F*E:w+F*E,$.o[2][1]=I+O,$.o[3][0]=V?w-F:w+F,$.o[3][1]=I-O*E}},extendPrototype([DynamicPropertyContainer],v),v})(),A=(function(){function E(v,w){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=v,this.comp=v.comp,this.data=w,this.frameId=-1,this.d=w.d,this.initDynamicPropertyContainer(v),w.sy===1?(this.ir=PropertyFactory.getProp(v,w.ir,0,0,this),this.is=PropertyFactory.getProp(v,w.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(v,w.pt,0,0,this),this.p=PropertyFactory.getProp(v,w.p,1,0,this),this.r=PropertyFactory.getProp(v,w.r,0,degToRads,this),this.or=PropertyFactory.getProp(v,w.or,0,0,this),this.os=PropertyFactory.getProp(v,w.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return E.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var v=Math.floor(this.pt.v)*2,w=Math.PI*2/v,I=!0,F=this.or.v,O=this.ir.v,V=this.os.v,$=this.is.v,j=2*Math.PI*F/(v*2),W=2*Math.PI*O/(v*2),q,U,p,x,M=-Math.PI/2;M+=this.r.v;var m=this.data.d===3?-1:1;for(this.v._length=0,q=0;q<v;q+=1){U=I?F:O,p=I?V:$,x=I?j:W;var C=U*Math.cos(M),d=U*Math.sin(M),_=C===0&&d===0?0:d/Math.sqrt(C*C+d*d),B=C===0&&d===0?0:-C/Math.sqrt(C*C+d*d);C+=+this.p.v[0],d+=+this.p.v[1],this.v.setTripleAt(C,d,C-_*x*p*m,d-B*x*p*m,C+_*x*p*m,d+B*x*p*m,q,!0),I=!I,M+=w*m}},convertPolygonToPath:function(){var v=Math.floor(this.pt.v),w=Math.PI*2/v,I=this.or.v,F=this.os.v,O=2*Math.PI*I/(v*4),V,$=-Math.PI*.5,j=this.data.d===3?-1:1;for($+=this.r.v,this.v._length=0,V=0;V<v;V+=1){var W=I*Math.cos($),q=I*Math.sin($),U=W===0&&q===0?0:q/Math.sqrt(W*W+q*q),p=W===0&&q===0?0:-W/Math.sqrt(W*W+q*q);W+=+this.p.v[0],q+=+this.p.v[1],this.v.setTripleAt(W,q,W-U*O*F*j,q-p*O*F*j,W+U*O*F*j,q+p*O*F*j,V,!0),$+=w*j}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],E),E})(),b=(function(){function E(v,w){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=v,this.comp=v.comp,this.frameId=-1,this.d=w.d,this.initDynamicPropertyContainer(v),this.p=PropertyFactory.getProp(v,w.p,1,0,this),this.s=PropertyFactory.getProp(v,w.s,1,0,this),this.r=PropertyFactory.getProp(v,w.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return E.prototype={convertRectToPath:function(){var v=this.p.v[0],w=this.p.v[1],I=this.s.v[0]/2,F=this.s.v[1]/2,O=bmMin(I,F,this.r.v),V=O*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(v+I,w-F+O,v+I,w-F+O,v+I,w-F+V,0,!0),this.v.setTripleAt(v+I,w+F-O,v+I,w+F-V,v+I,w+F-O,1,!0),O!==0?(this.v.setTripleAt(v+I-O,w+F,v+I-O,w+F,v+I-V,w+F,2,!0),this.v.setTripleAt(v-I+O,w+F,v-I+V,w+F,v-I+O,w+F,3,!0),this.v.setTripleAt(v-I,w+F-O,v-I,w+F-O,v-I,w+F-V,4,!0),this.v.setTripleAt(v-I,w-F+O,v-I,w-F+V,v-I,w-F+O,5,!0),this.v.setTripleAt(v-I+O,w-F,v-I+O,w-F,v-I+V,w-F,6,!0),this.v.setTripleAt(v+I-O,w-F,v+I-V,w-F,v+I-O,w-F,7,!0)):(this.v.setTripleAt(v-I,w+F,v-I+V,w+F,v-I,w+F,2),this.v.setTripleAt(v-I,w-F,v-I,w-F+V,v-I,w-F,3))):(this.v.setTripleAt(v+I,w-F+O,v+I,w-F+V,v+I,w-F+O,0,!0),O!==0?(this.v.setTripleAt(v+I-O,w-F,v+I-O,w-F,v+I-V,w-F,1,!0),this.v.setTripleAt(v-I+O,w-F,v-I+V,w-F,v-I+O,w-F,2,!0),this.v.setTripleAt(v-I,w-F+O,v-I,w-F+O,v-I,w-F+V,3,!0),this.v.setTripleAt(v-I,w+F-O,v-I,w+F-V,v-I,w+F-O,4,!0),this.v.setTripleAt(v-I+O,w+F,v-I+O,w+F,v-I+V,w+F,5,!0),this.v.setTripleAt(v+I-O,w+F,v+I-V,w+F,v+I-O,w+F,6,!0),this.v.setTripleAt(v+I,w+F-O,v+I,w+F-O,v+I,w+F-V,7,!0)):(this.v.setTripleAt(v-I,w-F,v-I+V,w-F,v-I,w-F,1,!0),this.v.setTripleAt(v-I,w+F,v-I,w+F-V,v-I,w+F,2,!0),this.v.setTripleAt(v+I,w+F,v+I-V,w+F,v+I,w+F,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],E),E})();function D(E,v,w){var I;if(w===3||w===4){var F=w===3?v.pt:v.ks,O=F.k;O.length?I=new c(E,v,w):I=new l(E,v,w)}else w===5?I=new b(E,v):w===6?I=new g(E,v):w===7&&(I=new A(E,v));return I.k&&E.addDynamicProperty(I),I}function T(){return l}function S(){return c}var L={};return L.getShapeProp=D,L.getConstructorFunction=T,L.getKeyframedConstructorFunction=S,L})();/*!
|
|
8
|
-
Transformation Matrix v2.0
|
|
9
|
-
(c) Epistemex 2014-2015
|
|
10
|
-
www.epistemex.com
|
|
11
|
-
By Ken Fyrstenberg
|
|
12
|
-
Contributions by leeoniya.
|
|
13
|
-
License: MIT, header required.
|
|
14
|
-
*/var Matrix=(function(){var t=Math.cos,e=Math.sin,r=Math.tan,n=Math.round;function s(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(d){if(d===0)return this;var _=t(d),B=e(d);return this._t(_,-B,0,0,B,_,0,0,0,0,1,0,0,0,0,1)}function o(d){if(d===0)return this;var _=t(d),B=e(d);return this._t(1,0,0,0,0,_,-B,0,0,B,_,0,0,0,0,1)}function l(d){if(d===0)return this;var _=t(d),B=e(d);return this._t(_,0,B,0,0,1,0,0,-B,0,_,0,0,0,0,1)}function h(d){if(d===0)return this;var _=t(d),B=e(d);return this._t(_,-B,0,0,B,_,0,0,0,0,1,0,0,0,0,1)}function c(d,_){return this._t(1,_,d,1,0,0)}function g(d,_){return this.shear(r(d),r(_))}function A(d,_){var B=t(_),u=e(_);return this._t(B,u,0,0,-u,B,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(d),1,0,0,0,0,1,0,0,0,0,1)._t(B,-u,0,0,u,B,0,0,0,0,1,0,0,0,0,1)}function b(d,_,B){return!B&&B!==0&&(B=1),d===1&&_===1&&B===1?this:this._t(d,0,0,0,0,_,0,0,0,0,B,0,0,0,0,1)}function D(d,_,B,u,R,H,K,J,Q,Y,et,pt,it,rt,bt,tt){return this.props[0]=d,this.props[1]=_,this.props[2]=B,this.props[3]=u,this.props[4]=R,this.props[5]=H,this.props[6]=K,this.props[7]=J,this.props[8]=Q,this.props[9]=Y,this.props[10]=et,this.props[11]=pt,this.props[12]=it,this.props[13]=rt,this.props[14]=bt,this.props[15]=tt,this}function T(d,_,B){return B=B||0,d!==0||_!==0||B!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,d,_,B,1):this}function S(d,_,B,u,R,H,K,J,Q,Y,et,pt,it,rt,bt,tt){var X=this.props;if(d===1&&_===0&&B===0&&u===0&&R===0&&H===1&&K===0&&J===0&&Q===0&&Y===0&&et===1&&pt===0)return X[12]=X[12]*d+X[15]*it,X[13]=X[13]*H+X[15]*rt,X[14]=X[14]*et+X[15]*bt,X[15]*=tt,this._identityCalculated=!1,this;var $t=X[0],vt=X[1],dt=X[2],zt=X[3],gt=X[4],mt=X[5],Et=X[6],ot=X[7],yt=X[8],Nt=X[9],ht=X[10],ct=X[11],y=X[12],P=X[13],k=X[14],N=X[15];return X[0]=$t*d+vt*R+dt*Q+zt*it,X[1]=$t*_+vt*H+dt*Y+zt*rt,X[2]=$t*B+vt*K+dt*et+zt*bt,X[3]=$t*u+vt*J+dt*pt+zt*tt,X[4]=gt*d+mt*R+Et*Q+ot*it,X[5]=gt*_+mt*H+Et*Y+ot*rt,X[6]=gt*B+mt*K+Et*et+ot*bt,X[7]=gt*u+mt*J+Et*pt+ot*tt,X[8]=yt*d+Nt*R+ht*Q+ct*it,X[9]=yt*_+Nt*H+ht*Y+ct*rt,X[10]=yt*B+Nt*K+ht*et+ct*bt,X[11]=yt*u+Nt*J+ht*pt+ct*tt,X[12]=y*d+P*R+k*Q+N*it,X[13]=y*_+P*H+k*Y+N*rt,X[14]=y*B+P*K+k*et+N*bt,X[15]=y*u+P*J+k*pt+N*tt,this._identityCalculated=!1,this}function L(d){var _=d.props;return this.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15])}function E(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function v(d){for(var _=0;_<16;){if(d.props[_]!==this.props[_])return!1;_+=1}return!0}function w(d){var _;for(_=0;_<16;_+=1)d.props[_]=this.props[_];return d}function I(d){var _;for(_=0;_<16;_+=1)this.props[_]=d[_]}function F(d,_,B){return{x:d*this.props[0]+_*this.props[4]+B*this.props[8]+this.props[12],y:d*this.props[1]+_*this.props[5]+B*this.props[9]+this.props[13],z:d*this.props[2]+_*this.props[6]+B*this.props[10]+this.props[14]}}function O(d,_,B){return d*this.props[0]+_*this.props[4]+B*this.props[8]+this.props[12]}function V(d,_,B){return d*this.props[1]+_*this.props[5]+B*this.props[9]+this.props[13]}function $(d,_,B){return d*this.props[2]+_*this.props[6]+B*this.props[10]+this.props[14]}function j(){var d=this.props[0]*this.props[5]-this.props[1]*this.props[4],_=this.props[5]/d,B=-this.props[1]/d,u=-this.props[4]/d,R=this.props[0]/d,H=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/d,K=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/d,J=new Matrix;return J.props[0]=_,J.props[1]=B,J.props[4]=u,J.props[5]=R,J.props[12]=H,J.props[13]=K,J}function W(d){var _=this.getInverseMatrix();return _.applyToPointArray(d[0],d[1],d[2]||0)}function q(d){var _,B=d.length,u=[];for(_=0;_<B;_+=1)u[_]=W(d[_]);return u}function U(d,_,B){var u=createTypedArray("float32",6);if(this.isIdentity())u[0]=d[0],u[1]=d[1],u[2]=_[0],u[3]=_[1],u[4]=B[0],u[5]=B[1];else{var R=this.props[0],H=this.props[1],K=this.props[4],J=this.props[5],Q=this.props[12],Y=this.props[13];u[0]=d[0]*R+d[1]*K+Q,u[1]=d[0]*H+d[1]*J+Y,u[2]=_[0]*R+_[1]*K+Q,u[3]=_[0]*H+_[1]*J+Y,u[4]=B[0]*R+B[1]*K+Q,u[5]=B[0]*H+B[1]*J+Y}return u}function p(d,_,B){var u;return this.isIdentity()?u=[d,_,B]:u=[d*this.props[0]+_*this.props[4]+B*this.props[8]+this.props[12],d*this.props[1]+_*this.props[5]+B*this.props[9]+this.props[13],d*this.props[2]+_*this.props[6]+B*this.props[10]+this.props[14]],u}function x(d,_){if(this.isIdentity())return d+","+_;var B=this.props;return Math.round((d*B[0]+_*B[4]+B[12])*100)/100+","+Math.round((d*B[1]+_*B[5]+B[13])*100)/100}function M(){for(var d=0,_=this.props,B="matrix3d(",u=1e4;d<16;)B+=n(_[d]*u)/u,B+=d===15?")":",",d+=1;return B}function m(d){var _=1e4;return d<1e-6&&d>0||d>-1e-6&&d<0?n(d*_)/_:d}function C(){var d=this.props,_=m(d[0]),B=m(d[1]),u=m(d[4]),R=m(d[5]),H=m(d[12]),K=m(d[13]);return"matrix("+_+","+B+","+u+","+R+","+H+","+K+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=o,this.rotateY=l,this.rotateZ=h,this.skew=g,this.skewFromAxis=A,this.shear=c,this.scale=b,this.setTransform=D,this.translate=T,this.transform=S,this.multiply=L,this.applyToPoint=F,this.applyToX=O,this.applyToY=V,this.applyToZ=$,this.applyToPointArray=p,this.applyToTriplePoints=U,this.applyToPointStringified=x,this.toCSS=M,this.to2dCSS=C,this.clone=w,this.cloneFromProps=I,this.equals=v,this.inversePoints=q,this.inversePoint=W,this.getInverseMatrix=j,this._t=this.transform,this.isIdentity=E,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}})();function _typeof$3(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(e){return typeof e}:_typeof$3=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$3(t)}var lottie={};function setLocation(t){setLocationHref(t)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var n=e[r].split("=");if(decodeURIComponent(n[0])==t)return decodeURIComponent(n[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports$1)!=="object"&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=(function(){var t={},e={};t.registerModifier=r,t.getModifier=n;function r(s,a){e[s]||(e[s]=a)}function n(s,a,o){return new e[s](a,o)}return t})();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,n,s){var a=[];e<=1?a.push({s:t,e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var o=[],l,h=a.length,c;for(l=0;l<h;l+=1)if(c=a[l],!(c.e*s<n||c.s*s>n+r)){var g,A;c.s*s<=n?g=0:g=(c.s*s-n)/r,c.e*s>=n+r?A=1:A=(c.e*s-n)/r,o.push([g,A])}return o.length||o.push([0,0]),o},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r;if(this._mdf||t){var n=this.o.v%360/360;if(n<0&&(n+=1),this.s.v>1?e=1+n:this.s.v<0?e=0+n:e=this.s.v+n,this.e.v>1?r=1+n:this.e.v<0?r=0+n:r=this.e.v+n,e>r){var s=e;e=r,r=s}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,o,l=this.shapes.length,h,c,g,A,b,D=0;if(r===e)for(o=0;o<l;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(r===1&&e===0||r===0&&e===1){if(this._mdf)for(o=0;o<l;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0}else{var T=[],S,L;for(o=0;o<l;o+=1)if(S=this.shapes[o],!S.shape._mdf&&!this._mdf&&!t&&this.m!==2)S.shape.paths=S.localShapeCollection;else{if(a=S.shape.paths,c=a._length,b=0,!S.shape._mdf&&S.pathsData.length)b=S.totalShapeLength;else{for(g=this.releasePathsData(S.pathsData),h=0;h<c;h+=1)A=bez.getSegmentsLength(a.shapes[h]),g.push(A),b+=A.totalLength;S.totalShapeLength=b,S.pathsData=g}D+=b,S.shape._mdf=!0}var E=e,v=r,w=0,I;for(o=l-1;o>=0;o-=1)if(S=this.shapes[o],S.shape._mdf){for(L=S.localShapeCollection,L.releaseShapes(),this.m===2&&l>1?(I=this.calculateShapeEdges(e,r,S.totalShapeLength,w,D),w+=S.totalShapeLength):I=[[E,v]],c=I.length,h=0;h<c;h+=1){E=I[h][0],v=I[h][1],T.length=0,v<=1?T.push({s:S.totalShapeLength*E,e:S.totalShapeLength*v}):E>=1?T.push({s:S.totalShapeLength*(E-1),e:S.totalShapeLength*(v-1)}):(T.push({s:S.totalShapeLength*E,e:S.totalShapeLength}),T.push({s:0,e:S.totalShapeLength*(v-1)}));var F=this.addShapes(S,T[0]);if(T[0].s!==T[0].e){if(T.length>1){var O=S.shape.paths.shapes[S.shape.paths._length-1];if(O.c){var V=F.pop();this.addPaths(F,L),F=this.addShapes(S,T[1],V)}else this.addPaths(F,L),F=this.addShapes(S,T[1])}this.addPaths(F,L)}}S.shape.paths=L}}},TrimModifier.prototype.addPaths=function(t,e){var r,n=t.length;for(r=0;r<n;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,n,s,a,o){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(r[0],r[1],"i",a+1),o&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(n[0],n[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,n){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),n&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var n=t.pathsData,s=t.shape.paths.shapes,a,o=t.shape.paths._length,l,h,c=0,g,A,b,D,T=[],S,L=!0;for(r?(A=r._length,S=r._length):(r=shapePool.newElement(),A=0,S=0),T.push(r),a=0;a<o;a+=1){for(b=n[a].lengths,r.c=s[a].c,h=s[a].c?b.length:b.length+1,l=1;l<h;l+=1)if(g=b[l-1],c+g.addedLength<e.s)c+=g.addedLength,r.c=!1;else if(c>e.e){r.c=!1;break}else e.s<=c&&e.e>=c+g.addedLength?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[l],s[a].v[l],r,A,L),L=!1):(D=bez.getNewSegment(s[a].v[l-1],s[a].v[l],s[a].o[l-1],s[a].i[l],(e.s-c)/g.addedLength,(e.e-c)/g.addedLength,b[l-1]),this.addSegmentFromArray(D,r,A,L),L=!1,r.c=!1),c+=g.addedLength,A+=1;if(s[a].c&&b.length){if(g=b[l-1],c<=e.e){var E=b[l-1].addedLength;e.s<=c&&e.e>=c+E?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[0],s[a].v[0],r,A,L),L=!1):(D=bez.getNewSegment(s[a].v[l-1],s[a].v[0],s[a].o[l-1],s[a].i[0],(e.s-c)/E,(e.e-c)/E,b[l-1]),this.addSegmentFromArray(D,r,A,L),L=!1,r.c=!1)}else r.c=!1;c+=g.addedLength,A+=1}if(r._length&&(r.setXYAt(r.v[S][0],r.v[S][1],"i",S),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),c>e.e)break;a<o-1&&(r=shapePool.newElement(),L=!0,T.push(r),A=0)}return T};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,n=[0,0],s=t._length,a=0;for(a=0;a<s;a+=1)n[0]+=t.v[a][0],n[1]+=t.v[a][1];n[0]/=s,n[1]/=s;var o=shapePool.newElement();o.c=t.c;var l,h,c,g,A,b;for(a=0;a<s;a+=1)l=t.v[a][0]+(n[0]-t.v[a][0])*r,h=t.v[a][1]+(n[1]-t.v[a][1])*r,c=t.o[a][0]+(n[0]-t.o[a][0])*-r,g=t.o[a][1]+(n[1]-t.o[a][1])*-r,A=t.i[a][0]+(n[0]-t.i[a][0])*-r,b=t.i[a][1]+(n[1]-t.i[a][1])*-r,o.setTripleAt(l,h,c,g,A,b,a);return o},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,n=this.shapes.length,s,a,o=this.amount.v;if(o!==0){var l,h;for(r=0;r<n;r+=1){if(l=this.shapes[r],h=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!t))for(h.releaseShapes(),l.shape._mdf=!0,e=l.shape.paths.shapes,a=l.shape.paths._length,s=0;s<a;s+=1)h.addShape(this.processPath(e[s],o));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=(function(){var t=[0,0];function e(h){var c=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||c,this.a&&h.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&h.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&h.skewFromAxis(-this.sk.v,this.sa.v),this.r?h.rotate(-this.r.v):h.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?h.translate(this.px.v,this.py.v,-this.pz.v):h.translate(this.px.v,this.py.v,0):h.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function r(h){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||h){var c;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var g,A;if(c=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(g=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/c,0),A=this.p.getValueAtTime(this.p.keyframes[0].t/c,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(g=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/c,0),A=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/c,0)):(g=this.p.pv,A=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/c,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){g=[],A=[];var b=this.px,D=this.py;b._caching.lastFrame+b.offsetTime<=b.keyframes[0].t?(g[0]=b.getValueAtTime((b.keyframes[0].t+.01)/c,0),g[1]=D.getValueAtTime((D.keyframes[0].t+.01)/c,0),A[0]=b.getValueAtTime(b.keyframes[0].t/c,0),A[1]=D.getValueAtTime(D.keyframes[0].t/c,0)):b._caching.lastFrame+b.offsetTime>=b.keyframes[b.keyframes.length-1].t?(g[0]=b.getValueAtTime(b.keyframes[b.keyframes.length-1].t/c,0),g[1]=D.getValueAtTime(D.keyframes[D.keyframes.length-1].t/c,0),A[0]=b.getValueAtTime((b.keyframes[b.keyframes.length-1].t-.01)/c,0),A[1]=D.getValueAtTime((D.keyframes[D.keyframes.length-1].t-.01)/c,0)):(g=[b.pv,D.pv],A[0]=b.getValueAtTime((b._caching.lastFrame+b.offsetTime-.01)/c,b.offsetTime),A[1]=D.getValueAtTime((D._caching.lastFrame+D.offsetTime-.01)/c,D.offsetTime))}else A=t,g=A;this.v.rotate(-Math.atan2(g[1]-A[1],g[0]-A[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function n(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function s(){}function a(h){this._addDynamicProperty(h),this.elem.addDynamicProperty(h),this._isDirty=!0}function o(h,c,g){if(this.elem=h,this.frameId=-1,this.propType="transform",this.data=c,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(g||h),c.p&&c.p.s?(this.px=PropertyFactory.getProp(h,c.p.x,0,0,this),this.py=PropertyFactory.getProp(h,c.p.y,0,0,this),c.p.z&&(this.pz=PropertyFactory.getProp(h,c.p.z,0,0,this))):this.p=PropertyFactory.getProp(h,c.p||{k:[0,0,0]},1,0,this),c.rx){if(this.rx=PropertyFactory.getProp(h,c.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(h,c.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(h,c.rz,0,degToRads,this),c.or.k[0].ti){var A,b=c.or.k.length;for(A=0;A<b;A+=1)c.or.k[A].to=null,c.or.k[A].ti=null}this.or=PropertyFactory.getProp(h,c.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(h,c.r||{k:0},0,degToRads,this);c.sk&&(this.sk=PropertyFactory.getProp(h,c.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(h,c.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(h,c.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(h,c.s||{k:[100,100,100]},1,.01,this),c.o?this.o=PropertyFactory.getProp(h,c.o,0,.01,h):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}o.prototype={applyToMatrix:e,getValue:r,precalculateMatrix:n,autoOrient:s},extendPrototype([DynamicPropertyContainer],o),o.prototype.addDynamicProperty=a,o.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function l(h,c,g){return new o(h,c,g)}return{getTransformProperty:l}})();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,n,s,a){var o=a?-1:1,l=n.s.v[0]+(1-n.s.v[0])*(1-s),h=n.s.v[1]+(1-n.s.v[1])*(1-s);t.translate(n.p.v[0]*o*s,n.p.v[1]*o*s,n.p.v[2]),e.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),e.rotate(-n.r.v*o*s),e.translate(n.a.v[0],n.a.v[1],n.a.v[2]),r.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),r.scale(a?1/l:l,a?1/h:h),r.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,n){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,t[e].ty==="gr"&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,n=t.length;for(r=0;r<n;r+=1)t[r]._render=e,t[r].ty==="gr"&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,n,s,a,o=!1;if(this._mdf||t){var l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}a=0;var c;for(n=0;n<=this._groups.length-1;n+=1){if(c=a<l,this._groups[n]._render=c,this.changeGroupRender(this._groups[n].it,c),!c){var g=this.elemsData[n].it,A=g[g.length-1];A.transform.op.v!==0?(A.transform.op._mdf=!0,A.transform.op.v=0):A.transform.op._mdf=!1}a+=1}this._currentCopies=l;var b=this.o.v,D=b%1,T=b>0?Math.floor(b):Math.ceil(b),S=this.pMatrix.props,L=this.rMatrix.props,E=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v=0;if(b>0){for(;v<T;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),v+=1;D&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,D,!1),v+=D)}else if(b<0){for(;v>T;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),v-=1;D&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-D,!0),v-=D)}n=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var w,I;a;){if(e=this.elemsData[n].it,r=e[e.length-1].transform.mProps.v.props,I=r.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),v!==0){for((n!==0&&s===1||n!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],L[8],L[9],L[10],L[11],L[12],L[13],L[14],L[15]),this.matrix.transform(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],E[9],E[10],E[11],E[12],E[13],E[14],E[15]),this.matrix.transform(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[8],S[9],S[10],S[11],S[12],S[13],S[14],S[15]),w=0;w<I;w+=1)r[w]=this.matrix.props[w];this.matrix.reset()}else for(this.matrix.reset(),w=0;w<I;w+=1)r[w]=this.matrix.props[w];v+=1,a-=1,n+=s}}else for(a=this._currentCopies,n=0,s=1;a;)e=this.elemsData[n].it,r=e[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,n+=s;return o},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r=shapePool.newElement();r.c=t.c;var n,s=t._length,a,o,l,h,c,g,A=0,b,D,T,S,L,E;for(n=0;n<s;n+=1)a=t.v[n],l=t.o[n],o=t.i[n],a[0]===l[0]&&a[1]===l[1]&&a[0]===o[0]&&a[1]===o[1]?(n===0||n===s-1)&&!t.c?(r.setTripleAt(a[0],a[1],l[0],l[1],o[0],o[1],A),A+=1):(n===0?h=t.v[s-1]:h=t.v[n-1],c=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),g=c?Math.min(c/2,e)/c:0,L=a[0]+(h[0]-a[0])*g,b=L,E=a[1]-(a[1]-h[1])*g,D=E,T=b-(b-a[0])*roundCorner,S=D-(D-a[1])*roundCorner,r.setTripleAt(b,D,T,S,L,E,A),A+=1,n===s-1?h=t.v[0]:h=t.v[n+1],c=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),g=c?Math.min(c/2,e)/c:0,T=a[0]+(h[0]-a[0])*g,b=T,S=a[1]+(h[1]-a[1])*g,D=S,L=b-(b-a[0])*roundCorner,E=D-(D-a[1])*roundCorner,r.setTripleAt(b,D,T,S,L,E,A),A+=1):(r.setTripleAt(t.v[n][0],t.v[n][1],t.o[n][0],t.o[n][1],t.i[n][0],t.i[n][1],A),A+=1);return r},RoundCornersModifier.prototype.processShapes=function(t){var e,r,n=this.shapes.length,s,a,o=this.rd.v;if(o!==0){var l,h;for(r=0;r<n;r+=1){if(l=this.shapes[r],h=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!t))for(h.releaseShapes(),l.shape._mdf=!0,e=l.shape.paths.shapes,a=l.shape.paths._length,s=0;s<a;s+=1)h.addShape(this.processPath(e[s],o));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(t,e){return Math.abs(t-e)*1e5<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,r){return t*(1-r)+e*r}function lerpPoint(t,e,r){return[lerp(t[0],e[0],r),lerp(t[1],e[1],r)]}function quadRoots(t,e,r){if(t===0)return[];var n=e*e-4*t*r;if(n<0)return[];var s=-e/(2*t);if(n===0)return[s];var a=Math.sqrt(n)/(2*t);return[s-a,s+a]}function polynomialCoefficients(t,e,r,n){return[-t+3*e-3*r+n,3*t-6*e+3*r,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,r,n,s){s&&pointEqual(t,e)&&(e=lerpPoint(t,n,1/3)),s&&pointEqual(r,n)&&(r=lerpPoint(t,n,2/3));var a=polynomialCoefficients(t[0],e[0],r[0],n[0]),o=polynomialCoefficients(t[1],e[1],r[1],n[1]);this.a=[a[0],o[0]],this.b=[a[1],o[1]],this.c=[a[2],o[2]],this.d=[a[3],o[3]],this.points=[t,e,r,n]}PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,r=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(r<0)return[];var n=Math.sqrt(r);return floatZero(n)?n>0&&n<1?[e]:[]:[e-n,e+n].filter(function(s){return s>0&&s<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),n=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,r,t),a=lerpPoint(r,n,t),o=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,o,!0),new PolynomialBezier(o,a,n,this.points[3],!0)]};function extrema(t,e){var r=t.points[0][e],n=t.points[t.points.length-1][e];if(r>n){var s=n;n=r,r=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),o=0;o<a.length;o+=1)if(a[o]>0&&a[o]<1){var l=t.point(a[o])[e];l<r?r=l:l>n&&(n=l)}return{min:r,max:n}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}};function intersectData(t,e,r){var n=t.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return Math.abs(t.cx-e.cx)*2<t.width+e.width&&Math.abs(t.cy-e.cy)*2<t.height+e.height}function intersectsImpl(t,e,r,n,s,a){if(boxIntersect(t,e)){if(r>=a||t.width<=n&&t.height<=n&&e.width<=n&&e.height<=n){s.push([t.t,e.t]);return}var o=splitData(t),l=splitData(e);intersectsImpl(o[0],l[0],r+1,n,s,a),intersectsImpl(o[0],l[1],r+1,n,s,a),intersectsImpl(o[1],l[0],r+1,n,s,a),intersectsImpl(o[1],l[1],r+1,n,s,a)}}PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,n,r),n},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)};function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,n){var s=[t[0],t[1],1],a=[e[0],e[1],1],o=[r[0],r[1],1],l=[n[0],n[1],1],h=crossProduct(crossProduct(s,a),crossProduct(o,l));return floatZero(h[2])?null:[h[0]/h[2],h[1]/h[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(t,e,r,n,s,a,o){var l=r-Math.PI/2,h=r+Math.PI/2,c=e[0]+Math.cos(r)*n*s,g=e[1]-Math.sin(r)*n*s;t.setTripleAt(c,g,c+Math.cos(l)*a,g-Math.sin(l)*a,c+Math.cos(h)*o,g-Math.sin(h)*o,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],n=-Math.PI*.5,s=[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]];return s}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,n=(e+1)%t.length(),s=t.v[r],a=t.v[n],o=getPerpendicularVector(s,a);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(t,e,r,n,s,a,o){var l=getProjectingAngle(e,r),h=e.v[r%e._length],c=e.v[r===0?e._length-1:r-1],g=e.v[(r+1)%e._length],A=a===2?Math.sqrt(Math.pow(h[0]-c[0],2)+Math.pow(h[1]-c[1],2)):0,b=a===2?Math.sqrt(Math.pow(h[0]-g[0],2)+Math.pow(h[1]-g[1],2)):0;setPoint(t,e.v[r%e._length],l,o,n,b/((s+1)*2),A/((s+1)*2))}function zigZagSegment(t,e,r,n,s,a){for(var o=0;o<n;o+=1){var l=(o+1)/(n+1),h=s===2?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,c=e.normalAngle(l),g=e.point(l);setPoint(t,g,c,a,r,h/((n+1)*2),h/((n+1)*2)),a=-a}return a}ZigZagModifier.prototype.processPath=function(t,e,r,n){var s=t._length,a=shapePool.newElement();if(a.c=t.c,t.c||(s-=1),s===0)return a;var o=-1,l=PolynomialBezier.shapeSegment(t,0);zigZagCorner(a,t,0,e,r,n,o);for(var h=0;h<s;h+=1)o=zigZagSegment(a,l,e,r,n,-o),h===s-1&&!t.c?l=null:l=PolynomialBezier.shapeSegment(t,(h+1)%s),zigZagCorner(a,t,h+1,e,r,n,o);return a},ZigZagModifier.prototype.processShapes=function(t){var e,r,n=this.shapes.length,s,a,o=this.amplitude.v,l=Math.max(0,Math.round(this.frequency.v)),h=this.pointsType.v;if(o!==0){var c,g;for(r=0;r<n;r+=1){if(c=this.shapes[r],g=c.localShapeCollection,!(!c.shape._mdf&&!this._mdf&&!t))for(g.releaseShapes(),c.shape._mdf=!0,e=c.shape.paths.shapes,a=c.shape.paths._length,s=0;s<a;s+=1)g.addShape(this.processPath(e[s],o,l,h));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(t,e,r){var n=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,n,r),polarOffset(e,n,r)]}function offsetSegment(t,e){var r,n,s,a,o,l,h;h=linearOffset(t.points[0],t.points[1],e),r=h[0],n=h[1],h=linearOffset(t.points[1],t.points[2],e),s=h[0],a=h[1],h=linearOffset(t.points[2],t.points[3],e),o=h[0],l=h[1];var c=lineIntersection(r,n,s,a);c===null&&(c=n);var g=lineIntersection(o,l,s,a);return g===null&&(g=o),new PolynomialBezier(r,c,g,l)}function joinLines(t,e,r,n,s){var a=e.points[3],o=r.points[0];if(n===3||pointEqual(a,o))return a;if(n===2){var l=-e.tangentAngle(1),h=-r.tangentAngle(0)+Math.PI,c=lineIntersection(a,polarOffset(a,l+Math.PI/2,100),o,polarOffset(o,l+Math.PI/2,100)),g=c?pointDistance(c,a):pointDistance(a,o)/2,A=polarOffset(a,l,2*g*roundCorner);return t.setXYAt(A[0],A[1],"o",t.length()-1),A=polarOffset(o,h,2*g*roundCorner),t.setTripleAt(o[0],o[1],o[0],o[1],A[0],A[1],t.length()),o}var b=pointEqual(a,e.points[2])?e.points[0]:e.points[2],D=pointEqual(o,r.points[1])?r.points[3]:r.points[1],T=lineIntersection(b,a,o,D);return T&&pointDistance(T,a)<s?(t.setTripleAt(T[0],T[1],T[0],T[1],T[0],T[1],t.length()),T):a}function getIntersection(t,e){var r=t.intersections(e);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(t,e){var r=t.slice(),n=e.slice(),s=getIntersection(t[t.length-1],e[0]);return s&&(r[t.length-1]=t[t.length-1].split(s[0])[0],n[0]=e[0].split(s[1])[1]),t.length>1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]),s)?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[r,n]}function pruneIntersections(t){for(var e,r=1;r<t.length;r+=1)e=pruneSegmentIntersection(t[r-1],t[r]),t[r-1]=e[0],t[r]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r=t.inflectionPoints(),n,s,a,o;if(r.length===0)return[offsetSegment(t,e)];if(r.length===1||floatEqual(r[1],1))return a=t.split(r[0]),n=a[0],s=a[1],[offsetSegment(n,e),offsetSegment(s,e)];a=t.split(r[0]),n=a[0];var l=(r[1]-r[0])/(1-r[0]);return a=a[1].split(l),o=a[0],s=a[1],[offsetSegment(n,e),offsetSegment(o,e),offsetSegment(s,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,n){var s=shapePool.newElement();s.c=t.c;var a=t.length();t.c||(a-=1);var o,l,h,c=[];for(o=0;o<a;o+=1)h=PolynomialBezier.shapeSegment(t,o),c.push(offsetSegmentSplit(h,e));if(!t.c)for(o=a-1;o>=0;o-=1)h=PolynomialBezier.shapeSegmentInverted(t,o),c.push(offsetSegmentSplit(h,e));c=pruneIntersections(c);var g=null,A=null;for(o=0;o<c.length;o+=1){var b=c[o];for(A&&(g=joinLines(s,A,b[0],r,n)),A=b[b.length-1],l=0;l<b.length;l+=1)h=b[l],g&&pointEqual(h.points[0],g)?s.setXYAt(h.points[1][0],h.points[1][1],"o",s.length()-1):s.setTripleAt(h.points[0][0],h.points[0][1],h.points[1][0],h.points[1][1],h.points[0][0],h.points[0][1],s.length()),s.setTripleAt(h.points[3][0],h.points[3][1],h.points[3][0],h.points[3][1],h.points[2][0],h.points[2][1],s.length()),g=h.points[3]}return c.length&&joinLines(s,A,c[0][0],r,n),s},OffsetPathModifier.prototype.processShapes=function(t){var e,r,n=this.shapes.length,s,a,o=this.amount.v,l=this.miterLimit.v,h=this.lineJoin;if(o!==0){var c,g;for(r=0;r<n;r+=1){if(c=this.shapes[r],g=c.localShapeCollection,!(!c.shape._mdf&&!this._mdf&&!t))for(g.releaseShapes(),c.shape._mdf=!0,e=c.shape.paths.shapes,a=c.shape.paths._length,s=0;s<a;s+=1)g.addShape(this.processPath(e[s],o,h,l));c.shape.paths=c.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",n="normal",s=e.length,a,o=0;o<s;o+=1)switch(a=e[o].toLowerCase(),a){case"italic":n="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200";break}return{style:n,weight:t.fWeight||r}}var FontManager=(function(){var t=5e3,e={w:0,size:0,shapes:[],data:{shapes:[]}},r=[];r=r.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=127988,s=917631,a=917601,o=917626,l=65039,h=8205,c=127462,g=127487,A=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function b(m){var C=m.split(","),d,_=C.length,B=[];for(d=0;d<_;d+=1)C[d]!=="sans-serif"&&C[d]!=="monospace"&&B.push(C[d]);return B.join(",")}function D(m,C){var d=createTag("span");d.setAttribute("aria-hidden",!0),d.style.fontFamily=C;var _=createTag("span");_.innerText="giItT1WQy@!-/#",d.style.position="absolute",d.style.left="-10000px",d.style.top="-10000px",d.style.fontSize="300px",d.style.fontVariant="normal",d.style.fontStyle="normal",d.style.fontWeight="normal",d.style.letterSpacing="0",d.appendChild(_),document.body.appendChild(d);var B=_.offsetWidth;return _.style.fontFamily=b(m)+", "+C,{node:_,w:B,parent:d}}function T(){var m,C=this.fonts.length,d,_,B=C;for(m=0;m<C;m+=1)this.fonts[m].loaded?B-=1:this.fonts[m].fOrigin==="n"||this.fonts[m].origin===0?this.fonts[m].loaded=!0:(d=this.fonts[m].monoCase.node,_=this.fonts[m].monoCase.w,d.offsetWidth!==_?(B-=1,this.fonts[m].loaded=!0):(d=this.fonts[m].sansCase.node,_=this.fonts[m].sansCase.w,d.offsetWidth!==_&&(B-=1,this.fonts[m].loaded=!0)),this.fonts[m].loaded&&(this.fonts[m].sansCase.parent.parentNode.removeChild(this.fonts[m].sansCase.parent),this.fonts[m].monoCase.parent.parentNode.removeChild(this.fonts[m].monoCase.parent)));B!==0&&Date.now()-this.initTime<t?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function S(m,C){var d=document.body&&C?"svg":"canvas",_,B=getFontProperties(m);if(d==="svg"){var u=createNS("text");u.style.fontSize="100px",u.setAttribute("font-family",m.fFamily),u.setAttribute("font-style",B.style),u.setAttribute("font-weight",B.weight),u.textContent="1",m.fClass?(u.style.fontFamily="inherit",u.setAttribute("class",m.fClass)):u.style.fontFamily=m.fFamily,C.appendChild(u),_=u}else{var R=new OffscreenCanvas(500,500).getContext("2d");R.font=B.style+" "+B.weight+" 100px "+m.fFamily,_=R}function H(K){return d==="svg"?(_.textContent=K,_.getComputedTextLength()):_.measureText(K).width}return{measureText:H}}function L(m,C){if(!m){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=m.list;return}if(!document.body){this.isLoaded=!0,m.list.forEach(function(et){et.helper=S(et),et.cache={}}),this.fonts=m.list;return}var d=m.list,_,B=d.length,u=B;for(_=0;_<B;_+=1){var R=!0,H,K;if(d[_].loaded=!1,d[_].monoCase=D(d[_].fFamily,"monospace"),d[_].sansCase=D(d[_].fFamily,"sans-serif"),!d[_].fPath)d[_].loaded=!0,u-=1;else if(d[_].fOrigin==="p"||d[_].origin===3){if(H=document.querySelectorAll('style[f-forigin="p"][f-family="'+d[_].fFamily+'"], style[f-origin="3"][f-family="'+d[_].fFamily+'"]'),H.length>0&&(R=!1),R){var J=createTag("style");J.setAttribute("f-forigin",d[_].fOrigin),J.setAttribute("f-origin",d[_].origin),J.setAttribute("f-family",d[_].fFamily),J.type="text/css",J.innerText="@font-face {font-family: "+d[_].fFamily+"; font-style: normal; src: url('"+d[_].fPath+"');}",C.appendChild(J)}}else if(d[_].fOrigin==="g"||d[_].origin===1){for(H=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),K=0;K<H.length;K+=1)H[K].href.indexOf(d[_].fPath)!==-1&&(R=!1);if(R){var Q=createTag("link");Q.setAttribute("f-forigin",d[_].fOrigin),Q.setAttribute("f-origin",d[_].origin),Q.type="text/css",Q.rel="stylesheet",Q.href=d[_].fPath,document.body.appendChild(Q)}}else if(d[_].fOrigin==="t"||d[_].origin===2){for(H=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),K=0;K<H.length;K+=1)d[_].fPath===H[K].src&&(R=!1);if(R){var Y=createTag("link");Y.setAttribute("f-forigin",d[_].fOrigin),Y.setAttribute("f-origin",d[_].origin),Y.setAttribute("rel","stylesheet"),Y.setAttribute("href",d[_].fPath),C.appendChild(Y)}}d[_].helper=S(d[_],C),d[_].cache={},this.fonts.push(d[_])}u===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function E(m){if(m){this.chars||(this.chars=[]);var C,d=m.length,_,B=this.chars.length,u;for(C=0;C<d;C+=1){for(_=0,u=!1;_<B;)this.chars[_].style===m[C].style&&this.chars[_].fFamily===m[C].fFamily&&this.chars[_].ch===m[C].ch&&(u=!0),_+=1;u||(this.chars.push(m[C]),B+=1)}}}function v(m,C,d){for(var _=0,B=this.chars.length;_<B;){if(this.chars[_].ch===m&&this.chars[_].style===C&&this.chars[_].fFamily===d)return this.chars[_];_+=1}return(typeof m=="string"&&m.charCodeAt(0)!==13||!m)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",m,C,d)),e}function w(m,C,d){var _=this.getFontByName(C),B=m;if(!_.cache[B]){var u=_.helper;if(m===" "){var R=u.measureText("|"+m+"|"),H=u.measureText("||");_.cache[B]=(R-H)/100}else _.cache[B]=u.measureText(m)/100}return _.cache[B]*d}function I(m){for(var C=0,d=this.fonts.length;C<d;){if(this.fonts[C].fName===m)return this.fonts[C];C+=1}return this.fonts[0]}function F(m){var C=0,d=m.charCodeAt(0);if(d>=55296&&d<=56319){var _=m.charCodeAt(1);_>=56320&&_<=57343&&(C=(d-55296)*1024+_-56320+65536)}return C}function O(m,C){var d=m.toString(16)+C.toString(16);return A.indexOf(d)!==-1}function V(m){return m===h}function $(m){return m===l}function j(m){var C=F(m);return C>=c&&C<=g}function W(m){return j(m.substr(0,2))&&j(m.substr(2,2))}function q(m){return r.indexOf(m)!==-1}function U(m,C){var d=F(m.substr(C,2));if(d!==n)return!1;var _=0;for(C+=2;_<5;){if(d=F(m.substr(C,2)),d<a||d>o)return!1;_+=1,C+=2}return F(m.substr(C,2))===s}function p(){this.isLoaded=!0}var x=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};x.isModifier=O,x.isZeroWidthJoiner=V,x.isFlagEmoji=W,x.isRegionalCode=j,x.isCombinedCharacter=q,x.isRegionalFlag=U,x.isVariationSelector=$,x.BLACK_FLAG_CODE_POINT=n;var M={addChars:E,addFonts:L,getCharData:v,getFontByName:I,measureText:w,checkLoadedFonts:T,setIsLoaded:p};return x.prototype=M,x})();function SlotManager(t){this.animationData=t}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t};function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){this.renderableComponents.indexOf(t)===-1&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){this.renderableComponents.indexOf(t)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(function(){var t={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(e){return t[e]||""}})();function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r=t.ef||[];this.effectElements=[];var n,s=r.length,a;for(n=0;n<s;n+=1)a=new GroupEffect(r[n],e),this.effectElements.push(a)}function GroupEffect(t,e){this.init(t,e)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var r,n=this.data.ef.length,s,a=this.data.ef;for(r=0;r<n;r+=1){switch(s=null,a[r].ty){case 0:s=new SliderEffect(a[r],e,this);break;case 1:s=new AngleEffect(a[r],e,this);break;case 2:s=new ColorEffect(a[r],e,this);break;case 3:s=new PointEffect(a[r],e,this);break;case 4:case 7:s=new CheckboxEffect(a[r],e,this);break;case 10:s=new LayerIndexEffect(a[r],e,this);break;case 11:s=new MaskIndexEffect(a[r],e,this);break;case 5:s=new EffectsManager(a[r],e);break;default:s=new NoValueEffect(a[r]);break}s&&this.effectElements.push(s)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if(this.data.masksProperties[t].mode!=="n"&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var e=t("layer"),r=t("effects"),n=t("shape"),s=t("text"),a=t("comp");this.layerInterface=e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var o=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(o),this.data.ty===0||this.data.xt?this.compInterface=a(this):this.data.ty===4?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=s(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm),e=this.baseElement||this.layerElement;e.style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,n=this.dynamicProperties.length;for(r=0;r<n;r+=1)(e||this._isParent&&this.dynamicProperties[r].propType==="transform")&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&this.dynamicProperties.push(t)}};function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(t){var e,r=this.layers.length,n;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(n=this.layers[e],n.ip-n.st<=t-this.layers[e].st&&n.op-n.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,r=t.length,n,s=this.layers.length;for(e=0;e<r;e+=1)for(n=0;n<s;){if(this.layers[n].id===t[e].id){this.layers[n]=t[e];break}n+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var n=this.elements,s=this.layers,a=0,o=s.length;a<o;)s[a].ind==e&&(!n[a]||n[a]===!0?(this.buildItem(a),this.addPendingElement(t)):(r.push(n[a]),n[a].setAsParent(),s[a].parent!==void 0?this.buildElementParenting(t,s[a].parent,r):t.setHierarchy(r))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var n=this.createComp(t[e]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(t){var e,r=this.elements.length;for(e=0;e<r;e+=1)if(this.elements[e].data.ind===t)return this.elements[e];return null},BaseRenderer.prototype.getElementByPath=function(t){var e=t.shift(),r;if(typeof e=="number")r=this.elements[e];else{var n,s=this.elements.length;for(n=0;n<s;n+=1)if(this.elements[n].data.nm===e){r=this.elements[n];break}}return t.length===0?r:r.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<n;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<n;r+=1)e.multiply(this.hierarchy[r].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var t=0,e=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<e;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),t+=1;if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(r),t=1;t<e;t+=1){var n=this.localTransforms[t].matrix;r.multiply(n)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var s=this.finalTransform.localOpacity;for(t=0;t<e;t+=1)s*=this.localTransforms[t].opacity*.01;this.finalTransform.localOpacity=s}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var t=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(t.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var e=0,r=t.length;for(e=0;e<r;e+=1)this.localTransforms.push(t[e])}}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r=!0,n=this.comp;r;)n.finalTransform?(n.data.hasMask&&e.splice(0,0,n.finalTransform),n=n.comp):r=!1;var s,a=e.length,o;for(s=0;s<a;s+=1)o=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-o[0],t[1]-o[1],0];return t},mHelper:new Matrix};function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n=this.globalData.defs,s,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var o,l=this.masksProperties,h=0,c=[],g,A,b=createElementID(),D,T,S,L,E="clipPath",v="clip-path";for(s=0;s<a;s+=1)if((l[s].mode!=="a"&&l[s].mode!=="n"||l[s].inv||l[s].o.k!==100||l[s].o.x)&&(E="mask",v="mask"),(l[s].mode==="s"||l[s].mode==="i")&&h===0?(D=createNS("rect"),D.setAttribute("fill","#ffffff"),D.setAttribute("width",this.element.comp.data.w||0),D.setAttribute("height",this.element.comp.data.h||0),c.push(D)):D=null,o=createNS("path"),l[s].mode==="n")this.viewData[s]={op:PropertyFactory.getProp(this.element,l[s].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[s],3),elem:o,lastPath:""},n.appendChild(o);else{h+=1,o.setAttribute("fill",l[s].mode==="s"?"#000000":"#ffffff"),o.setAttribute("clip-rule","nonzero");var w;if(l[s].x.k!==0?(E="mask",v="mask",L=PropertyFactory.getProp(this.element,l[s].x,0,null,this.element),w=createElementID(),T=createNS("filter"),T.setAttribute("id",w),S=createNS("feMorphology"),S.setAttribute("operator","erode"),S.setAttribute("in","SourceGraphic"),S.setAttribute("radius","0"),T.appendChild(S),n.appendChild(T),o.setAttribute("stroke",l[s].mode==="s"?"#000000":"#ffffff")):(S=null,L=null),this.storedData[s]={elem:o,x:L,expan:S,lastPath:"",lastOperator:"",filterId:w,lastRadius:0},l[s].mode==="i"){A=c.length;var I=createNS("g");for(g=0;g<A;g+=1)I.appendChild(c[g]);var F=createNS("mask");F.setAttribute("mask-type","alpha"),F.setAttribute("id",b+"_"+h),F.appendChild(o),n.appendChild(F),I.setAttribute("mask","url("+getLocationHref()+"#"+b+"_"+h+")"),c.length=0,c.push(I)}else c.push(o);l[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:o,lastPath:"",op:PropertyFactory.getProp(this.element,l[s].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[s],3),invRect:D},this.viewData[s].prop.k||this.drawPath(l[s],this.viewData[s].prop.v,this.viewData[s])}for(this.maskElement=createNS(E),a=c.length,s=0;s<a;s+=1)this.maskElement.appendChild(c[s]);h>0&&(this.maskElement.setAttribute("id",b),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+b+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,r,n=this.masksProperties.length;for(r=0;r<n;r+=1)if((this.viewData[r].prop._mdf||t)&&this.drawPath(this.masksProperties[r],this.viewData[r].prop.v,this.viewData[r]),(this.viewData[r].op._mdf||t)&&this.viewData[r].elem.setAttribute("fill-opacity",this.viewData[r].op.v),this.masksProperties[r].mode!=="n"&&(this.viewData[r].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[r].invRect.setAttribute("transform",e.getInverseMatrix().to2dCSS()),this.storedData[r].x&&(this.storedData[r].x._mdf||t))){var s=this.storedData[r].expan;this.storedData[r].x.v<0?(this.storedData[r].lastOperator!=="erode"&&(this.storedData[r].lastOperator="erode",this.storedData[r].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[r].filterId+")")),s.setAttribute("radius",-this.storedData[r].x.v)):(this.storedData[r].lastOperator!=="dilate"&&(this.storedData[r].lastOperator="dilate",this.storedData[r].elem.setAttribute("filter",null)),this.storedData[r].elem.setAttribute("stroke-width",this.storedData[r].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" ",t},MaskElement.prototype.drawPath=function(t,e,r){var n=" M"+e.v[0][0]+","+e.v[0][1],s,a;for(a=e._length,s=1;s<a;s+=1)n+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[s][0]+","+e.i[s][1]+" "+e.v[s][0]+","+e.v[s][1];if(e.c&&a>1&&(n+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==n){var o="";r.elem&&(e.c&&(o=t.inv?this.solidPath+n:n),r.elem.setAttribute("d",o)),r.lastPath=n}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=(function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=r;function e(n,s){var a=createNS("filter");return a.setAttribute("id",n),s!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var n=createNS("feColorMatrix");return n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),n}return t})(),featureSupport=(function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t})(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,r="SourceGraphic",n=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),o=0;this.filters=[];var l;for(e=0;e<n;e+=1){l=null;var h=t.data.ef[e].ty;if(registeredEffects$1[h]){var c=registeredEffects$1[h].effect;l=new c(a,t.effectsManager.effectElements[e],t,idPrefix+o,r),r=idPrefix+o,registeredEffects$1[h].countsAsEffect&&(o+=1)}l&&this.filters.push(l)}o&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGEffects.prototype.getEffects=function(t){var e,r=this.filters.length,n=[];for(e=0;e<r;e+=1)this.filters[e].type===t&&n.push(this.filters[e]);return n};function registerEffect$1(t,e,r){registeredEffects$1[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var e=createNS("g");e.setAttribute("id",this.layerId),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var r=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var s=createElementID();if(r.setAttribute("id",s),r.appendChild(n),this.globalData.defs.appendChild(r),this.checkMasks()){var a=createNS("g");a.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),a.appendChild(this.layerElement),this.transformedElement=a,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(t){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[t]){var e=this.layerId+"_"+t,r,n,s,a;if(t===1||t===3){var o=createNS("mask");o.setAttribute("id",e),o.setAttribute("mask-type",t===3?"luminance":"alpha"),s=createNS("use"),s.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),o.appendChild(s),this.globalData.defs.appendChild(o),!featureSupport.maskType&&t===1&&(o.setAttribute("mask-type","luminance"),r=createElementID(),n=filtersFactory.createFilter(r),this.globalData.defs.appendChild(n),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS("g"),a.appendChild(s),o.appendChild(a),a.setAttribute("filter","url("+getLocationHref()+"#"+r+")"))}else if(t===2){var l=createNS("mask");l.setAttribute("id",e),l.setAttribute("mask-type","alpha");var h=createNS("g");l.appendChild(h),r=createElementID(),n=filtersFactory.createFilter(r);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),n.appendChild(c);var g=createNS("feFuncA");g.setAttribute("type","table"),g.setAttribute("tableValues","1.0 0.0"),c.appendChild(g),this.globalData.defs.appendChild(n);var A=createNS("rect");A.setAttribute("width",this.comp.data.w),A.setAttribute("height",this.comp.data.h),A.setAttribute("x","0"),A.setAttribute("y","0"),A.setAttribute("fill","#ffffff"),A.setAttribute("opacity","0"),h.setAttribute("filter","url("+getLocationHref()+"#"+r+")"),h.appendChild(A),s=createNS("use"),s.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),h.appendChild(s),featureSupport.maskType||(l.setAttribute("mask-type","luminance"),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS("g"),h.appendChild(A),a.appendChild(this.layerElement),h.appendChild(a)),this.globalData.defs.appendChild(l)}this.matteMasks[t]=e}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var t={initElement:function(e,r,n){this.initFrame(),this.initBaseData(e,r,n),this.initTransform(e,r,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var e=this.baseElement||this.layerElement;e.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var e=this.baseElement||this.layerElement;e.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(t)],RenderableDOMElement)})();function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.assetData&&this.assetData.sid&&(this.assetData=e.slotManager.getProp(this.assetData)),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=0,r=this.shapeModifiers.length;e<r;)if(this.shapeModifiers[e].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();e=this.shapeModifiers.length;var r;for(t=e-1;t>=0&&(r=this.shapeModifiers[t].processShapes(this._isFirstFrame),!r);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,n=e.length;r<n;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,n=r.length;n;)if(n-=1,r[n].elem===t){r[n].pos=e;return}r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var n=0,s=t.length;n<s;){if(t[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=t.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(t,e,r,n){this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var s,a=e.length||0,o;for(s=0;s<a;s+=1)o=PropertyFactory.getProp(t,e[s].v,0,0,this),this.k=o.k||this.k,this.dataProps[s]={n:e[s].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(t){if(!(this.elem.globalData.frameId===this.frameId&&!t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),e=0;e<r;e+=1)this.dataProps[e].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",e.p*4);var n=e.k.k[0].s?e.k.k[0].s.length-e.p*4:e.k.k.length-e.p*4;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,n=this.o.length/2,s;r<n;){if(s=Math.abs(t[r*4]-t[e*4+r*2]),s>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r=this.data.p*4,n,s;for(e=0;e<r;e+=1)n=e%4===0?100:255,s=Math.round(this.prop.v[e]*n),this.c[e]!==s&&(this.c[e]=s,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=this.data.p*4;e<r;e+=1)n=e%2===0?100:1,s=e%2===0?Math.round(this.prop.v[e]*100):this.prop.v[e],this.o[e-this.data.p*4]!==s&&(this.o[e-this.data.p*4]=s,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),n=createNS(e.t===1?"linearGradient":"radialGradient");n.setAttribute("id",r),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var s=[],a,o,l;for(l=e.g.p*4,o=0;o<l;o+=4)a=createNS("stop"),n.appendChild(a),s.push(a);t.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=n,this.cst=s},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,n,s,a=createNS("mask"),o=createNS("path");a.appendChild(o);var l=createElementID(),h=createElementID();a.setAttribute("id",h);var c=createNS(t.t===1?"linearGradient":"radialGradient");c.setAttribute("id",l),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var g=this.stops;for(n=t.g.p*4;n<s;n+=2)r=createNS("stop"),r.setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(r),g.push(r);o.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+l+")"),t.ty==="gs"&&(o.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),t.lj===1&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=c,this.ms=a,this.ost=g,this.maskId=h,e.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(t,e,r,n){if(e===0)return"";var s=t.o,a=t.i,o=t.v,l,h=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(l=1;l<e;l+=1)h+=" C"+n.applyToPointStringified(s[l-1][0],s[l-1][1])+" "+n.applyToPointStringified(a[l][0],a[l][1])+" "+n.applyToPointStringified(o[l][0],o[l][1]);return r&&e&&(h+=" C"+n.applyToPointStringified(s[l-1][0],s[l-1][1])+" "+n.applyToPointStringified(a[0][0],a[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1]),h+="z"),h},SVGElementsRenderer=(function(){var t=new Matrix,e=new Matrix,r={createRenderFunction:n};function n(A){switch(A.ty){case"fl":return l;case"gf":return c;case"gs":return h;case"st":return g;case"sh":case"el":case"rc":case"sr":return o;case"tr":return s;case"no":return a;default:return null}}function s(A,b,D){(D||b.transform.op._mdf)&&b.transform.container.setAttribute("opacity",b.transform.op.v),(D||b.transform.mProps._mdf)&&b.transform.container.setAttribute("transform",b.transform.mProps.v.to2dCSS())}function a(){}function o(A,b,D){var T,S,L,E,v,w,I=b.styles.length,F=b.lvl,O,V,$,j;for(w=0;w<I;w+=1){if(E=b.sh._mdf||D,b.styles[w].lvl<F){for(V=e.reset(),$=F-b.styles[w].lvl,j=b.transformers.length-1;!E&&$>0;)E=b.transformers[j].mProps._mdf||E,$-=1,j-=1;if(E)for($=F-b.styles[w].lvl,j=b.transformers.length-1;$>0;)V.multiply(b.transformers[j].mProps.v),$-=1,j-=1}else V=t;if(O=b.sh.paths,S=O._length,E){for(L="",T=0;T<S;T+=1)v=O.shapes[T],v&&v._length&&(L+=buildShapeString(v,v._length,v.c,V));b.caches[w]=L}else L=b.caches[w];b.styles[w].d+=A.hd===!0?"":L,b.styles[w]._mdf=E||b.styles[w]._mdf}}function l(A,b,D){var T=b.style;(b.c._mdf||D)&&T.pElem.setAttribute("fill","rgb("+bmFloor(b.c.v[0])+","+bmFloor(b.c.v[1])+","+bmFloor(b.c.v[2])+")"),(b.o._mdf||D)&&T.pElem.setAttribute("fill-opacity",b.o.v)}function h(A,b,D){c(A,b,D),g(A,b,D)}function c(A,b,D){var T=b.gf,S=b.g._hasOpacity,L=b.s.v,E=b.e.v;if(b.o._mdf||D){var v=A.ty==="gf"?"fill-opacity":"stroke-opacity";b.style.pElem.setAttribute(v,b.o.v)}if(b.s._mdf||D){var w=A.t===1?"x1":"cx",I=w==="x1"?"y1":"cy";T.setAttribute(w,L[0]),T.setAttribute(I,L[1]),S&&!b.g._collapsable&&(b.of.setAttribute(w,L[0]),b.of.setAttribute(I,L[1]))}var F,O,V,$;if(b.g._cmdf||D){F=b.cst;var j=b.g.c;for(V=F.length,O=0;O<V;O+=1)$=F[O],$.setAttribute("offset",j[O*4]+"%"),$.setAttribute("stop-color","rgb("+j[O*4+1]+","+j[O*4+2]+","+j[O*4+3]+")")}if(S&&(b.g._omdf||D)){var W=b.g.o;for(b.g._collapsable?F=b.cst:F=b.ost,V=F.length,O=0;O<V;O+=1)$=F[O],b.g._collapsable||$.setAttribute("offset",W[O*2]+"%"),$.setAttribute("stop-opacity",W[O*2+1])}if(A.t===1)(b.e._mdf||D)&&(T.setAttribute("x2",E[0]),T.setAttribute("y2",E[1]),S&&!b.g._collapsable&&(b.of.setAttribute("x2",E[0]),b.of.setAttribute("y2",E[1])));else{var q;if((b.s._mdf||b.e._mdf||D)&&(q=Math.sqrt(Math.pow(L[0]-E[0],2)+Math.pow(L[1]-E[1],2)),T.setAttribute("r",q),S&&!b.g._collapsable&&b.of.setAttribute("r",q)),b.e._mdf||b.h._mdf||b.a._mdf||D){q||(q=Math.sqrt(Math.pow(L[0]-E[0],2)+Math.pow(L[1]-E[1],2)));var U=Math.atan2(E[1]-L[1],E[0]-L[0]),p=b.h.v;p>=1?p=.99:p<=-1&&(p=-.99);var x=q*p,M=Math.cos(U+b.a.v)*x+L[0],m=Math.sin(U+b.a.v)*x+L[1];T.setAttribute("fx",M),T.setAttribute("fy",m),S&&!b.g._collapsable&&(b.of.setAttribute("fx",M),b.of.setAttribute("fy",m))}}}function g(A,b,D){var T=b.style,S=b.d;S&&(S._mdf||D)&&S.dashStr&&(T.pElem.setAttribute("stroke-dasharray",S.dashStr),T.pElem.setAttribute("stroke-dashoffset",S.dashoffset[0])),b.c&&(b.c._mdf||D)&&T.pElem.setAttribute("stroke","rgb("+bmFloor(b.c.v[0])+","+bmFloor(b.c.v[1])+","+bmFloor(b.c.v[2])+")"),(b.o._mdf||D)&&T.pElem.setAttribute("stroke-opacity",b.o.v),(b.w._mdf||D)&&(T.pElem.setAttribute("stroke-width",b.w.v),T.msElem&&T.msElem.setAttribute("stroke-width",b.w.v))}return r})();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e=this.shapes.length,r,n,s=this.stylesList.length,a,o=[],l=!1;for(n=0;n<s;n+=1){for(a=this.stylesList[n],l=!1,o.length=0,t=0;t<e;t+=1)r=this.shapes[t],r.styles.indexOf(a)!==-1&&(o.push(r),l=r._isAnimated||l);o.length>1&&l&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,n=new SVGStyleData(t,e),s=n.pElem;if(t.ty==="st")r=new SVGStrokeStyleData(this,t,n);else if(t.ty==="fl")r=new SVGFillStyleData(this,t,n);else if(t.ty==="gf"||t.ty==="gs"){var a=t.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;r=new a(this,t,n),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),s.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else t.ty==="no"&&(r=new SVGNoStyleData(this,t,n));return(t.ty==="st"||t.ty==="gs")&&(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),t.lj===1&&s.setAttribute("stroke-miterlimit",t.ml)),t.r===2&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(n),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),n=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var n=4;t.ty==="rc"?n=5:t.ty==="el"?n=6:t.ty==="sr"&&(n=7);var s=ShapePropertyFactory.getShapeProp(this,t,n,this),a=new SVGShapeData(e,r,s);return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,n=this.animatedContents.length;r<n;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e=t.styles,r,n=this.stylesList.length;for(r=0;r<n;r+=1)this.stylesList[r].closed||e.push(this.stylesList[r])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,n,s,a,o){var l=[].concat(a),h,c=t.length-1,g,A,b=[],D=[],T,S,L;for(h=c;h>=0;h-=1){if(L=this.searchProcessedElement(t[h]),L?e[h]=r[L-1]:t[h]._render=o,t[h].ty==="fl"||t[h].ty==="st"||t[h].ty==="gf"||t[h].ty==="gs"||t[h].ty==="no")L?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],s),t[h]._render&&e[h].style.pElem.parentNode!==n&&n.appendChild(e[h].style.pElem),b.push(e[h].style);else if(t[h].ty==="gr"){if(!L)e[h]=this.createGroupElement(t[h]);else for(A=e[h].it.length,g=0;g<A;g+=1)e[h].prevViewData[g]=e[h].it[g];this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,s+1,l,o),t[h]._render&&e[h].gr.parentNode!==n&&n.appendChild(e[h].gr)}else t[h].ty==="tr"?(L||(e[h]=this.createTransformElement(t[h],n)),T=e[h].transform,l.push(T)):t[h].ty==="sh"||t[h].ty==="rc"||t[h].ty==="el"||t[h].ty==="sr"?(L||(e[h]=this.createShapeElement(t[h],l,s)),this.setElementStyles(e[h])):t[h].ty==="tm"||t[h].ty==="rd"||t[h].ty==="ms"||t[h].ty==="pb"||t[h].ty==="zz"||t[h].ty==="op"?(L?(S=e[h],S.closed=!1):(S=ShapeModifiers.getModifier(t[h].ty),S.init(this,t[h]),e[h]=S,this.shapeModifiers.push(S)),D.push(S)):t[h].ty==="rp"&&(L?(S=e[h],S.closed=!0):(S=ShapeModifiers.getModifier(t[h].ty),e[h]=S,S.init(this,t,h,e),this.shapeModifiers.push(S),o=!1),D.push(S));this.addProcessedElement(t[h],h+1)}for(c=b.length,h=0;h<c;h+=1)b[h].closed=!0;for(c=D.length,h=0;h<c;h+=1)D[h].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e=this.animatedContents.length,r;for(t=0;t<e;t+=1)r=this.animatedContents[t],(this._isFirstFrame||r.element._isAnimated)&&r.data!==!0&&r.fn(r.data,r.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(t,e,r,n,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=n,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!n,m:!0,p:!0}}LetterProps.prototype.update=function(t,e,r,n,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,o=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,o=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,o=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,o=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,o=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,o=!0),o};function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!t)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var n,s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(n=0;n<s;n+=1)r!==this.keysIndex?a=this.effectsSequence[n](a,a.t):a=this.effectsSequence[n](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,n=t.length;r<=n-1&&!(r===n-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e=[],r=0,n=t.length,s,a,o=!1,l=!1,h="";r<n;)o=l,l=!1,s=t.charCodeAt(r),h=t.charAt(r),FontManager.isCombinedCharacter(s)?o=!0:s>=55296&&s<=56319?FontManager.isRegionalFlag(t,r)?h=t.substr(r,14):(a=t.charCodeAt(r+1),a>=56320&&a<=57343&&(FontManager.isModifier(s,a)?(h=t.substr(r,2),o=!0):FontManager.isFlagEmoji(t.substr(r,4))?h=t.substr(r,4):h=t.substr(r,2))):s>56319?(a=t.charCodeAt(r+1),FontManager.isVariationSelector(s)&&(o=!0)):FontManager.isZeroWidthJoiner(s)&&(o=!0,l=!0),o?(e[e.length-1]+=h,o=!1):e.push(h),r+=h.length;return e},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,n=[],s,a,o,l=0,h,c=r.m.g,g=0,A=0,b=0,D=[],T=0,S=0,L,E,v=e.getFontByName(t.f),w,I=0,F=getFontProperties(v);t.fWeight=F.weight,t.fStyle=F.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),a=t.finalText.length,t.finalLineHeight=t.lh;var O=t.tr/1e3*t.finalSize,V;if(t.sz)for(var $=!0,j=t.sz[0],W=t.sz[1],q,U;$;){U=this.buildFinalText(t.t),q=0,T=0,a=U.length,O=t.tr/1e3*t.finalSize;var p=-1;for(s=0;s<a;s+=1)V=U[s].charCodeAt(0),o=!1,U[s]===" "?p=s:(V===13||V===3)&&(T=0,o=!0,q+=t.finalLineHeight||t.finalSize*1.2),e.chars?(w=e.getCharData(U[s],v.fStyle,v.fFamily),I=o?0:w.w*t.finalSize/100):I=e.measureText(U[s],t.f,t.finalSize),T+I>j&&U[s]!==" "?(p===-1?a+=1:s=p,q+=t.finalLineHeight||t.finalSize*1.2,U.splice(s,p===s?1:0,"\r"),p=-1,T=0):(T+=I,T+=O);q+=v.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&W<q?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=U,a=t.finalText.length,$=!1)}T=-O,I=0;var x=0,M;for(s=0;s<a;s+=1)if(o=!1,M=t.finalText[s],V=M.charCodeAt(0),V===13||V===3?(x=0,D.push(T),S=T>S?T:S,T=-2*O,h="",o=!0,b+=1):h=M,e.chars?(w=e.getCharData(M,v.fStyle,e.getFontByName(t.f).fFamily),I=o?0:w.w*t.finalSize/100):I=e.measureText(h,t.f,t.finalSize),M===" "?x+=I+O:(T+=I+O+x,x=0),n.push({l:I,an:I,add:g,n:o,anIndexes:[],val:h,line:b,animatorJustifyOffset:0}),c==2){if(g+=I,h===""||h===" "||s===a-1){for((h===""||h===" ")&&(g-=I);A<=s;)n[A].an=g,n[A].ind=l,n[A].extra=I,A+=1;l+=1,g=0}}else if(c==3){if(g+=I,h===""||s===a-1){for(h===""&&(g-=I);A<=s;)n[A].an=g,n[A].ind=l,n[A].extra=I,A+=1;g=0,l+=1}}else n[l].ind=l,n[l].extra=0,l+=1;if(t.l=n,S=T>S?T:S,D.push(T),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=S,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=D;var m=r.a,C,d;E=m.length;var _,B,u=[];for(L=0;L<E;L+=1){for(C=m[L],C.a.sc&&(t.strokeColorAnim=!0),C.a.sw&&(t.strokeWidthAnim=!0),(C.a.fc||C.a.fh||C.a.fs||C.a.fb)&&(t.fillColorAnim=!0),B=0,_=C.s.b,s=0;s<a;s+=1)d=n[s],d.anIndexes[L]=B,(_==1&&d.val!==""||_==2&&d.val!==""&&d.val!==" "||_==3&&(d.n||d.val==" "||s==a-1)||_==4&&(d.n||s==a-1))&&(C.s.rn===1&&u.push(B),B+=1);r.a[L].s.totalChars=B;var R=-1,H;if(C.s.rn===1)for(s=0;s<a;s+=1)d=n[s],R!=d.anIndexes[L]&&(R=d.anIndexes[L],H=u.splice(Math.floor(Math.random()*u.length),1)[0]),d.anIndexes[L]=H}t.yOffset=t.finalLineHeight||t.finalSize*1.2,t.ls=t.ls||0,t.ascent=v.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=e===void 0?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=(function(){var t=Math.max,e=Math.min,r=Math.floor;function n(a,o){this._currentTextLength=-1,this.k=!1,this.data=o,this.elem=a,this.comp=a.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(a),this.s=PropertyFactory.getProp(a,o.s||{k:0},0,0,this),"e"in o?this.e=PropertyFactory.getProp(a,o.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(a,o.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(a,o.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(a,o.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(a,o.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(a,o.a,0,.01,this),this.dynamicProperties.length||this.getValue()}n.prototype={getMult:function(a){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var o=0,l=0,h=1,c=1;this.ne.v>0?o=this.ne.v/100:l=-this.ne.v/100,this.xe.v>0?h=1-this.xe.v/100:c=1+this.xe.v/100;var g=BezierFactory.getBezierEasing(o,l,h,c).get,A=0,b=this.finalS,D=this.finalE,T=this.data.sh;if(T===2)D===b?A=a>=D?1:0:A=t(0,e(.5/(D-b)+(a-b)/(D-b),1)),A=g(A);else if(T===3)D===b?A=a>=D?0:1:A=1-t(0,e(.5/(D-b)+(a-b)/(D-b),1)),A=g(A);else if(T===4)D===b?A=0:(A=t(0,e(.5/(D-b)+(a-b)/(D-b),1)),A<.5?A*=2:A=1-2*(A-.5)),A=g(A);else if(T===5){if(D===b)A=0;else{var S=D-b;a=e(t(0,a+.5-b),D-b);var L=-S/2+a,E=S/2;A=Math.sqrt(1-L*L/(E*E))}A=g(A)}else T===6?(D===b?A=0:(a=e(t(0,a+.5-b),D-b),A=(1+Math.cos(Math.PI+Math.PI*2*a/(D-b)))/2),A=g(A)):(a>=r(b)&&(a-b<0?A=t(0,e(e(D,1)-(b-a),1)):A=t(0,e(D-a,1))),A=g(A));if(this.sm.v!==100){var v=this.sm.v*.01;v===0&&(v=1e-8);var w=.5-v*.5;A<w?A=0:(A=(A-w)/v,A>1&&(A=1))}return A*this.a.v},getValue:function(a){this.iterateDynamicProperties(),this._mdf=a||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,a&&this.data.r===2&&(this.e.v=this._currentTextLength);var o=this.data.r===2?1:100/this.data.totalChars,l=this.o.v/o,h=this.s.v/o+l,c=this.e.v/o+l;if(h>c){var g=h;h=c,c=g}this.finalS=h,this.finalE=c}},extendPrototype([DynamicPropertyContainer],n);function s(a,o,l){return new n(a,o)}return{getTextSelectorProp:s}})();function TextAnimatorDataProperty(t,e,r){var n={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):n,rx:a.rx?s(t,a.rx,0,degToRads,r):n,ry:a.ry?s(t,a.ry,0,degToRads,r):n,sk:a.sk?s(t,a.sk,0,degToRads,r):n,sa:a.sa?s(t,a.sa,0,degToRads,r):n,s:a.s?s(t,a.s,1,.01,r):n,a:a.a?s(t,a.a,1,0,r):n,o:a.o?s(t,a.o,0,.01,r):n,p:a.p?s(t,a.p,1,0,r):n,sw:a.sw?s(t,a.sw,0,0,r):n,sc:a.sc?s(t,a.sc,1,0,r):n,fc:a.fc?s(t,a.fc,1,0,r):n,fh:a.fh?s(t,a.fh,0,0,r):n,fs:a.fs?s(t,a.fs,0,.01,r):n,fb:a.fb?s(t,a.fb,0,.01,r):n,t:a.t?s(t,a.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e=this._textData.a.length,r,n=PropertyFactory.getProp;for(t=0;t<e;t+=1)r=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,r,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,!(!this._mdf&&!this._isFirstFrame&&!e&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var r=this._moreOptions.alignment.v,n=this._animatorsData,s=this._textData,a=this.mHelper,o=this._renderType,l=this.renderedLetters.length,h,c,g,A,b=t.l,D,T,S,L,E,v,w,I,F,O,V,$,j,W,q;if(this._hasMaskedPath){if(q=this._pathData.m,!this._pathData.n||this._pathData._mdf){var U=q.v;this._pathData.r.v&&(U=U.reverse()),D={tLength:0,segments:[]},A=U._length-1;var p;for($=0,g=0;g<A;g+=1)p=bez.buildBezierData(U.v[g],U.v[g+1],[U.o[g][0]-U.v[g][0],U.o[g][1]-U.v[g][1]],[U.i[g+1][0]-U.v[g+1][0],U.i[g+1][1]-U.v[g+1][1]]),D.tLength+=p.segmentLength,D.segments.push(p),$+=p.segmentLength;g=A,q.v.c&&(p=bez.buildBezierData(U.v[g],U.v[0],[U.o[g][0]-U.v[g][0],U.o[g][1]-U.v[g][1]],[U.i[0][0]-U.v[0][0],U.i[0][1]-U.v[0][1]]),D.tLength+=p.segmentLength,D.segments.push(p),$+=p.segmentLength),this._pathData.pi=D}if(D=this._pathData.pi,T=this._pathData.f.v,w=0,v=1,L=0,E=!0,O=D.segments,T<0&&q.v.c)for(D.tLength<Math.abs(T)&&(T=-Math.abs(T)%D.tLength),w=O.length-1,F=O[w].points,v=F.length-1;T<0;)T+=F[v].partialLength,v-=1,v<0&&(w-=1,F=O[w].points,v=F.length-1);F=O[w].points,I=F[v-1],S=F[v],V=S.partialLength}A=b.length,h=0,c=0;var x=t.finalSize*1.2*.714,M=!0,m,C,d,_,B;_=n.length;var u,R=-1,H,K,J,Q=T,Y=w,et=v,pt=-1,it,rt,bt,tt,X,$t,vt,dt,zt="",gt=this.defaultPropsArray,mt;if(t.j===2||t.j===1){var Et=0,ot=0,yt=t.j===2?-.5:-1,Nt=0,ht=!0;for(g=0;g<A;g+=1)if(b[g].n){for(Et&&(Et+=ot);Nt<g;)b[Nt].animatorJustifyOffset=Et,Nt+=1;Et=0,ht=!0}else{for(d=0;d<_;d+=1)m=n[d].a,m.t.propType&&(ht&&t.j===2&&(ot+=m.t.v*yt),C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),u.length?Et+=m.t.v*u[0]*yt:Et+=m.t.v*u*yt);ht=!1}for(Et&&(Et+=ot);Nt<g;)b[Nt].animatorJustifyOffset=Et,Nt+=1}for(g=0;g<A;g+=1){if(a.reset(),it=1,b[g].n)h=0,c+=t.yOffset,c+=M?1:0,T=Q,M=!1,this._hasMaskedPath&&(w=Y,v=et,F=O[w].points,I=F[v-1],S=F[v],V=S.partialLength,L=0),zt="",dt="",$t="",mt="",gt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(pt!==b[g].line){switch(t.j){case 1:T+=$-t.lineWidths[b[g].line];break;case 2:T+=($-t.lineWidths[b[g].line])/2;break}pt=b[g].line}R!==b[g].ind&&(b[R]&&(T+=b[R].extra),T+=b[g].an/2,R=b[g].ind),T+=r[0]*b[g].an*.005;var ct=0;for(d=0;d<_;d+=1)m=n[d].a,m.p.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),u.length?ct+=m.p.v[0]*u[0]:ct+=m.p.v[0]*u),m.a.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),u.length?ct+=m.a.v[0]*u[0]:ct+=m.a.v[0]*u);for(E=!0,this._pathData.a.v&&(T=b[0].an*.5+($-this._pathData.f.v-b[0].an*.5-b[b.length-1].an*.5)*R/(A-1),T+=this._pathData.f.v);E;)L+V>=T+ct||!F?(j=(T+ct-L)/S.partialLength,K=I.point[0]+(S.point[0]-I.point[0])*j,J=I.point[1]+(S.point[1]-I.point[1])*j,a.translate(-r[0]*b[g].an*.005,-(r[1]*x)*.01),E=!1):F&&(L+=S.partialLength,v+=1,v>=F.length&&(v=0,w+=1,O[w]?F=O[w].points:q.v.c?(v=0,w=0,F=O[w].points):(L-=S.partialLength,F=null)),F&&(I=S,S=F[v],V=S.partialLength));H=b[g].an/2-b[g].add,a.translate(-H,0,0)}else H=b[g].an/2-b[g].add,a.translate(-H,0,0),a.translate(-r[0]*b[g].an*.005,-r[1]*x*.01,0);for(d=0;d<_;d+=1)m=n[d].a,m.t.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),(h!==0||t.j!==0)&&(this._hasMaskedPath?u.length?T+=m.t.v*u[0]:T+=m.t.v*u:u.length?h+=m.t.v*u[0]:h+=m.t.v*u));for(t.strokeWidthAnim&&(bt=t.sw||0),t.strokeColorAnim&&(t.sc?rt=[t.sc[0],t.sc[1],t.sc[2]]:rt=[0,0,0]),t.fillColorAnim&&t.fc&&(tt=[t.fc[0],t.fc[1],t.fc[2]]),d=0;d<_;d+=1)m=n[d].a,m.a.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),u.length?a.translate(-m.a.v[0]*u[0],-m.a.v[1]*u[1],m.a.v[2]*u[2]):a.translate(-m.a.v[0]*u,-m.a.v[1]*u,m.a.v[2]*u));for(d=0;d<_;d+=1)m=n[d].a,m.s.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),u.length?a.scale(1+(m.s.v[0]-1)*u[0],1+(m.s.v[1]-1)*u[1],1):a.scale(1+(m.s.v[0]-1)*u,1+(m.s.v[1]-1)*u,1));for(d=0;d<_;d+=1){if(m=n[d].a,C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),m.sk.propType&&(u.length?a.skewFromAxis(-m.sk.v*u[0],m.sa.v*u[1]):a.skewFromAxis(-m.sk.v*u,m.sa.v*u)),m.r.propType&&(u.length?a.rotateZ(-m.r.v*u[2]):a.rotateZ(-m.r.v*u)),m.ry.propType&&(u.length?a.rotateY(m.ry.v*u[1]):a.rotateY(m.ry.v*u)),m.rx.propType&&(u.length?a.rotateX(m.rx.v*u[0]):a.rotateX(m.rx.v*u)),m.o.propType&&(u.length?it+=(m.o.v*u[0]-it)*u[0]:it+=(m.o.v*u-it)*u),t.strokeWidthAnim&&m.sw.propType&&(u.length?bt+=m.sw.v*u[0]:bt+=m.sw.v*u),t.strokeColorAnim&&m.sc.propType)for(X=0;X<3;X+=1)u.length?rt[X]+=(m.sc.v[X]-rt[X])*u[0]:rt[X]+=(m.sc.v[X]-rt[X])*u;if(t.fillColorAnim&&t.fc){if(m.fc.propType)for(X=0;X<3;X+=1)u.length?tt[X]+=(m.fc.v[X]-tt[X])*u[0]:tt[X]+=(m.fc.v[X]-tt[X])*u;m.fh.propType&&(u.length?tt=addHueToRGB(tt,m.fh.v*u[0]):tt=addHueToRGB(tt,m.fh.v*u)),m.fs.propType&&(u.length?tt=addSaturationToRGB(tt,m.fs.v*u[0]):tt=addSaturationToRGB(tt,m.fs.v*u)),m.fb.propType&&(u.length?tt=addBrightnessToRGB(tt,m.fb.v*u[0]):tt=addBrightnessToRGB(tt,m.fb.v*u))}}for(d=0;d<_;d+=1)m=n[d].a,m.p.propType&&(C=n[d].s,u=C.getMult(b[g].anIndexes[d],s.a[d].s.totalChars),this._hasMaskedPath?u.length?a.translate(0,m.p.v[1]*u[0],-m.p.v[2]*u[1]):a.translate(0,m.p.v[1]*u,-m.p.v[2]*u):u.length?a.translate(m.p.v[0]*u[0],m.p.v[1]*u[1],-m.p.v[2]*u[2]):a.translate(m.p.v[0]*u,m.p.v[1]*u,-m.p.v[2]*u));if(t.strokeWidthAnim&&($t=bt<0?0:bt),t.strokeColorAnim&&(vt="rgb("+Math.round(rt[0]*255)+","+Math.round(rt[1]*255)+","+Math.round(rt[2]*255)+")"),t.fillColorAnim&&t.fc&&(dt="rgb("+Math.round(tt[0]*255)+","+Math.round(tt[1]*255)+","+Math.round(tt[2]*255)+")"),this._hasMaskedPath){if(a.translate(0,-t.ls),a.translate(0,r[1]*x*.01+c,0),this._pathData.p.v){W=(S.point[1]-I.point[1])/(S.point[0]-I.point[0]);var y=Math.atan(W)*180/Math.PI;S.point[0]<I.point[0]&&(y+=180),a.rotate(-y*Math.PI/180)}a.translate(K,J,0),T-=r[0]*b[g].an*.005,b[g+1]&&R!==b[g+1].ind&&(T+=b[g].an/2,T+=t.tr*.001*t.finalSize)}else{switch(a.translate(h,c,0),t.ps&&a.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:a.translate(b[g].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[b[g].line]),0,0);break;case 2:a.translate(b[g].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[b[g].line])/2,0,0);break}a.translate(0,-t.ls),a.translate(H,0,0),a.translate(r[0]*b[g].an*.005,r[1]*x*.01,0),h+=b[g].l+t.tr*.001*t.finalSize}o==="html"?zt=a.toCSS():o==="svg"?zt=a.to2dCSS():gt=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],mt=it}l<=g?(B=new LetterProps(mt,$t,vt,dt,zt,gt),this.renderedLetters.push(B),l+=1,this.lettersChangedFlag=!0):(B=this.renderedLetters[g],this.lettersChangedFlag=B.update(mt,$t,vt,dt,zt,gt)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},ITextElement.prototype.createPathShape=function(t,e){var r,n=e.length,s,a="";for(r=0;r<n;r+=1)e[r].ty==="sh"&&(s=e[r].ks.k,a+=buildShapeString(s,s.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,n,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0);break}e.translate(n,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(t[0]*255)+","+Math.round(t[1]*255)+","+Math.round(t[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,n=[],s="";e<r;)t[e]==="\r"||t[e]===""?(n.push(s),s=""):s+=t[e],e+=1;return n.push(s),n},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var r=t.shapes[0];if(r.it){var n=r.it[r.it.length-1];n.s&&(n.s.k[0]=e,n.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var t,e,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var n=this.globalData.fontManager.getFontByName(r.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var s=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",r.t);var o=r.l||[],l=!!this.globalData.fontManager.chars;e=o.length;var h,c=this.mHelper,g="",A=this.data.singleShape,b=0,D=0,T=!0,S=r.tr*.001*r.finalSize;if(A&&!l&&!r.sz){var L=this.textContainer,E="start";switch(r.j){case 1:E="end";break;case 2:E="middle";break;default:E="start";break}L.setAttribute("text-anchor",E),L.setAttribute("letter-spacing",S);var v=this.buildTextContents(r.finalText);for(e=v.length,D=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)h=this.textSpans[t].span||createNS("tspan"),h.textContent=v[t],h.setAttribute("x",0),h.setAttribute("y",D),h.style.display="inherit",L.appendChild(h),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=h,D+=r.finalLineHeight;this.layerElement.appendChild(L)}else{var w=this.textSpans.length,I;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!l||!A||t===0){if(h=w>t?this.textSpans[t].span:createNS(l?"g":"text"),w<=t){if(h.setAttribute("stroke-linecap","butt"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=h,l){var F=createNS("g");h.appendChild(F),this.textSpans[t].childSpan=F}this.textSpans[t].span=h,this.layerElement.appendChild(h)}h.style.display="inherit"}if(c.reset(),A&&(o[t].n&&(b=-S,D+=r.yOffset,D+=T?1:0,T=!1),this.applyTextPropertiesToMatrix(r,c,o[t].line,b,D),b+=o[t].l||0,b+=S),l){I=this.globalData.fontManager.getCharData(r.finalText[t],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var O;if(I.t===1)O=new SVGCompElement(I.data,this.globalData,this);else{var V=emptyShapeData;I.data&&I.data.shapes&&(V=this.buildShapeData(I.data,r.finalSize)),O=new SVGShapeElement(V,this.globalData,this)}if(this.textSpans[t].glyph){var $=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild($.layerElement),$.destroy()}this.textSpans[t].glyph=O,O._debug=!0,O.prepareFrame(0),O.renderFrame(),this.textSpans[t].childSpan.appendChild(O.layerElement),I.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else A&&h.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),h.textContent=o[t].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}A&&h&&h.setAttribute("d",g)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e=this.textSpans.length,r;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<e;t+=1)r=this.textSpans[t].glyph,r&&(r.prepareFrame(this.comp.renderedFrame-this.data.st),r._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,r=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;e=n.length;var s,a,o;for(t=0;t<e;t+=1)n[t].n||(s=r[t],a=this.textSpans[t].span,o=this.textSpans[t].glyph,o&&o.renderFrame(),s._mdf.m&&a.setAttribute("transform",s.m),s._mdf.o&&a.setAttribute("opacity",s.o),s._mdf.sw&&a.setAttribute("stroke-width",s.sw),s._mdf.sc&&a.setAttribute("stroke",s.sc),s._mdf.fc&&a.setAttribute("fill",s.fc))}};function ISolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)};function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",t.w),n.setAttribute("height",t.h),n.setAttribute("x",0),n.setAttribute("y",0);var s=createElementID();r.setAttribute("id",s),r.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,r=this.layers.length;for(e=0;e<r;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){e[t]=!0;var r=this.createItem(this.layers[t]);if(e[t]=r,getExpressionsPlugin()&&(this.layers[t].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt){var n="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(n===-1)return;if(!this.elements[n]||this.elements[n]===!0)this.buildItem(n),this.addPendingElement(r);else{var s=e[n],a=s.getMatte(this.layers[t].tt);r.setMatte(a)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){var n="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,s=this.elements[n],a=s.getMatte(this.layers[e].tt);t.setMatte(a);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(!(this.renderedFrame===t||this.destroyed)){t===null?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var n=0,s;n<e;)this.elements[n]&&this.elements[n]!==!0&&this.elements[n].getBaseElement()&&(s=this.elements[n].getBaseElement()),n+=1;s?this.layerElement.insertBefore(r,s):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!e.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)};function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var n=createNS("title"),s=createElementID();n.setAttribute("id",s),n.textContent=e.title,this.svgElement.appendChild(n),r+=s}if(e&&e.description){var a=createNS("desc"),o=createElementID();a.setAttribute("id",o),a.textContent=e.description,this.svgElement.appendChild(a),r+=" "+o}r&&this.svgElement.setAttribute("aria-labelledby",r);var l=createNS("defs");this.svgElement.appendChild(l);var h=createNS("g");this.svgElement.appendChild(h),this.layerElement=h,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&e.hideOnTransparent===!1),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:l,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,n="_";for(e=0;e<r;e+=1)n+=t[e].transform.key+"_";var s=this.sequences[n];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var r=0,n=t.transforms.length,s=e;r<n&&!e;){if(t.transforms[r].transform.mProps._mdf){s=!0;break}r+=1}if(s)for(t.finalTransform.reset(),r=n-1;r>=0;r-=1)t.finalTransform.multiply(t.transforms[r].transform.mProps.v);t._mdf=s},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var t="__lottie_element_luma_buffer",e=null,r=null,n=null;function s(){var l=createNS("svg"),h=createNS("filter"),c=createNS("feColorMatrix");return h.setAttribute("id",t),c.setAttribute("type","matrix"),c.setAttribute("color-interpolation-filters","sRGB"),c.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),h.appendChild(c),l.appendChild(h),l.setAttribute("id",t+"_svg"),featureSupport.svgLumaHidden&&(l.style.display="none"),l}function a(){e||(n=s(),document.body.appendChild(n),e=createTag("canvas"),r=e.getContext("2d"),r.filter="url(#"+t+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1))}function o(l){return e||a(),e.width=l.width,e.height=l.height,r.filter="url(#"+t+")",e}return{load:a,get:o}};function createCanvas(t,e){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(t,e);var r=createTag("canvas");return r.width=t,r.height=e,r}var assetLoader=(function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}})(),registeredEffects={};function CVEffects(t){var e,r=t.data.ef?t.data.ef.length:0;this.filters=[];var n;for(e=0;e<r;e+=1){n=null;var s=t.data.ef[e].ty;if(registeredEffects[s]){var a=registeredEffects[s].effect;n=new a(t.effectsManager.effectElements[e],t)}n&&this.filters.push(n)}this.filters.length&&t.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},CVEffects.prototype.getEffects=function(t){var e,r=this.filters.length,n=[];for(e=0;e<r;e+=1)this.filters[e].type===t&&n.push(this.filters[e]);return n};function registerEffect(t,e){registeredEffects[t]={effect:e}}function CVMaskElement(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var r,n=this.masksProperties.length,s=!1;for(r=0;r<n;r+=1)this.masksProperties[r].mode!=="n"&&(s=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=s,s&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t=this.element.finalTransform.mat,e=this.element.canvasContext,r,n=this.masksProperties.length,s,a,o;for(e.beginPath(),r=0;r<n;r+=1)if(this.masksProperties[r].mode!=="n"){this.masksProperties[r].inv&&(e.moveTo(0,0),e.lineTo(this.element.globalData.compSize.w,0),e.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),e.lineTo(0,this.element.globalData.compSize.h),e.lineTo(0,0)),o=this.viewData[r].v,s=t.applyToPointArray(o.v[0][0],o.v[0][1],0),e.moveTo(s[0],s[1]);var l,h=o._length;for(l=1;l<h;l+=1)a=t.applyToTriplePoints(o.o[l-1],o.i[l],o.v[l]),e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=t.applyToTriplePoints(o.o[l-1],o.i[0],o.v[0]),e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),e.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var r=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(r),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0],e=t.getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var r=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(r.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas),s=n.getContext("2d");s.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(t,e,r,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,o=r.length,l;for(a=0;a<o;a+=1)r[a].closed||(l={transforms:n.addTransformSequence(r[a].transforms),trNodes:[]},this.styledShapes.push(l),r[a].elements.push(l))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:t.hd===!0},n={};if(t.ty==="fl"||t.ty==="st"?(n.c=PropertyFactory.getProp(this,t.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):(t.ty==="gf"||t.ty==="gs")&&(n.s=PropertyFactory.getProp(this,t.s,1,null,this),n.e=PropertyFactory.getProp(this,t.e,1,null,this),n.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,t.g,this)),n.o=PropertyFactory.getProp(this,t.o,0,.01,this),t.ty==="st"||t.ty==="gs"){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],t.lj==1&&(r.ml=t.ml),n.w=PropertyFactory.getProp(this,t.w,0,null,this),n.w.k||(r.wi=n.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);n.d=s,n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0])}}else r.r=t.r===2?"evenodd":"nonzero";return this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){var t={it:[],prevViewData:[]};return t},CVShapeElement.prototype.createTransformElement=function(t){var e={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}};return e},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,n,s){var a,o=t.length-1,l,h,c=[],g=[],A,b,D,T=[].concat(s);for(a=o;a>=0;a-=1){if(A=this.searchProcessedElement(t[a]),A?e[a]=r[A-1]:t[a]._shouldRender=n,t[a].ty==="fl"||t[a].ty==="st"||t[a].ty==="gf"||t[a].ty==="gs")A?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],T),c.push(e[a].style);else if(t[a].ty==="gr"){if(!A)e[a]=this.createGroupElement(t[a]);else for(h=e[a].it.length,l=0;l<h;l+=1)e[a].prevViewData[l]=e[a].it[l];this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,n,T)}else t[a].ty==="tr"?(A||(D=this.createTransformElement(t[a]),e[a]=D),T.push(e[a]),this.addTransformToStyleList(e[a])):t[a].ty==="sh"||t[a].ty==="rc"||t[a].ty==="el"||t[a].ty==="sr"?A||(e[a]=this.createShapeElement(t[a])):t[a].ty==="tm"||t[a].ty==="rd"||t[a].ty==="pb"||t[a].ty==="zz"||t[a].ty==="op"?(A?(b=e[a],b.closed=!1):(b=ShapeModifiers.getModifier(t[a].ty),b.init(this,t[a]),e[a]=b,this.shapeModifiers.push(b)),g.push(b)):t[a].ty==="rp"&&(A?(b=e[a],b.closed=!0):(b=ShapeModifiers.getModifier(t[a].ty),e[a]=b,b.init(this,t,a,e),this.shapeModifiers.push(b),n=!1),g.push(b));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(c),o=g.length,a=0;a<o;a+=1)g[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e=this.stylesList.length,r,n,s,a,o,l,h=this.globalData.renderer,c=this.globalData.canvasContext,g,A;for(t=0;t<e;t+=1)if(A=this.stylesList[t],g=A.type,!((g==="st"||g==="gs")&&A.wi===0||!A.data._shouldRender||A.coOp===0||this.globalData.currentGlobalAlpha===0)){for(h.save(),o=A.elements,g==="st"||g==="gs"?(h.ctxStrokeStyle(g==="st"?A.co:A.grd),h.ctxLineWidth(A.wi),h.ctxLineCap(A.lc),h.ctxLineJoin(A.lj),h.ctxMiterLimit(A.ml||0)):h.ctxFillStyle(g==="fl"?A.co:A.grd),h.ctxOpacity(A.coOp),g!=="st"&&g!=="gs"&&c.beginPath(),h.ctxTransform(A.preTransforms.finalTransform.props),n=o.length,r=0;r<n;r+=1){for((g==="st"||g==="gs")&&(c.beginPath(),A.da&&(c.setLineDash(A.da),c.lineDashOffset=A.do)),l=o[r].trNodes,a=l.length,s=0;s<a;s+=1)l[s].t==="m"?c.moveTo(l[s].p[0],l[s].p[1]):l[s].t==="c"?c.bezierCurveTo(l[s].pts[0],l[s].pts[1],l[s].pts[2],l[s].pts[3],l[s].pts[4],l[s].pts[5]):c.closePath();(g==="st"||g==="gs")&&(h.ctxStroke(),A.da&&c.setLineDash(this.dashResetter))}g!=="st"&&g!=="gs"&&this.globalData.renderer.ctxFill(A.r),h.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,n){var s,a=e.length-1,o;for(o=t,s=a;s>=0;s-=1)e[s].ty==="tr"?(o=r[s].transform,this.renderShapeTransform(t,o)):e[s].ty==="sh"||e[s].ty==="el"||e[s].ty==="rc"||e[s].ty==="sr"?this.renderPath(e[s],r[s]):e[s].ty==="fl"?this.renderFill(e[s],r[s],o):e[s].ty==="st"?this.renderStroke(e[s],r[s],o):e[s].ty==="gf"||e[s].ty==="gs"?this.renderGradientFill(e[s],r[s],o):e[s].ty==="gr"?this.renderShape(o,e[s].it,r[s].it):e[s].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r=t.trNodes,n=e.paths,s,a,o,l=n._length;r.length=0;var h=t.transforms.finalTransform;for(o=0;o<l;o+=1){var c=n.shapes[o];if(c&&c.v){for(a=c._length,s=1;s<a;s+=1)s===1&&r.push({t:"m",p:h.applyToPointArray(c.v[0][0],c.v[0][1],0)}),r.push({t:"c",pts:h.applyToTriplePoints(c.o[s-1],c.i[s],c.v[s])});a===1&&r.push({t:"m",p:h.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&a&&(r.push({t:"c",pts:h.applyToTriplePoints(c.o[s-1],c.i[0],c.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},CVShapeElement.prototype.renderPath=function(t,e){if(t.hd!==!0&&t._shouldRender){var r,n=e.styledShapes.length;for(r=0;r<n;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var n=e.style;(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var n=e.style,s;if(!n.grd||e.g._mdf||e.s._mdf||e.e._mdf||t.t!==1&&(e.h._mdf||e.a._mdf)){var a=this.globalData.canvasContext,o=e.s.v,l=e.e.v;if(t.t===1)s=a.createLinearGradient(o[0],o[1],l[0],l[1]);else{var h=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),c=Math.atan2(l[1]-o[1],l[0]-o[0]),g=e.h.v;g>=1?g=.99:g<=-1&&(g=-.99);var A=h*g,b=Math.cos(c+e.a.v)*A+o[0],D=Math.sin(c+e.a.v)*A+o[1];s=a.createRadialGradient(b,D,0,o[0],o[1],h)}var T,S=t.g.p,L=e.g.c,E=1;for(T=0;T<S;T+=1)e.g._hasOpacity&&e.g._collapsable&&(E=e.g.o[T*2+1]),s.addColorStop(L[T*4]/100,"rgba("+L[T*4+1]+","+L[T*4+2]+","+L[T*4+3]+","+E+")");n.grd=s}n.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var n=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(n.da=s.dashArray,n.do=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(n.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var n=this.globalData.fontManager.getFontByName(t.f),s,a,o=t.l,l=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.finalText.length;var h,c,g,A,b,D,T,S,L,E,v=this.data.singleShape,w=t.tr*.001*t.finalSize,I=0,F=0,O=!0,V=0;for(s=0;s<a;s+=1){h=this.globalData.fontManager.getCharData(t.finalText[s],n.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),c=h&&h.data||{},l.reset(),v&&o[s].n&&(I=-w,F+=t.yOffset,F+=O?1:0,O=!1),b=c.shapes?c.shapes[0].it:[],T=b.length,l.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,l,o[s].line,I,F),L=createSizedArray(T-1);var $=0;for(D=0;D<T;D+=1)if(b[D].ty==="sh"){for(A=b[D].ks.k.i.length,S=b[D].ks.k,E=[],g=1;g<A;g+=1)g===1&&E.push(l.applyToX(S.v[0][0],S.v[0][1],0),l.applyToY(S.v[0][0],S.v[0][1],0)),E.push(l.applyToX(S.o[g-1][0],S.o[g-1][1],0),l.applyToY(S.o[g-1][0],S.o[g-1][1],0),l.applyToX(S.i[g][0],S.i[g][1],0),l.applyToY(S.i[g][0],S.i[g][1],0),l.applyToX(S.v[g][0],S.v[g][1],0),l.applyToY(S.v[g][0],S.v[g][1],0));E.push(l.applyToX(S.o[g-1][0],S.o[g-1][1],0),l.applyToY(S.o[g-1][0],S.o[g-1][1],0),l.applyToX(S.i[0][0],S.i[0][1],0),l.applyToY(S.i[0][0],S.i[0][1],0),l.applyToX(S.v[0][0],S.v[0][1],0),l.applyToY(S.v[0][0],S.v[0][1],0)),L[$]=E,$+=1}v&&(I+=o[s].l,I+=w),this.textSpans[V]?this.textSpans[V].elem=L:this.textSpans[V]={elem:L},V+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var t=this.canvasContext;t.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,r,n,s,a,o,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;r=h.length;var c,g=null,A=null,b=null,D,T,S=this.globalData.renderer;for(e=0;e<r;e+=1)if(!h[e].n){if(c=l[e],c&&(S.save(),S.ctxTransform(c.p),S.ctxOpacity(c.o)),this.fill){for(c&&c.fc?g!==c.fc&&(S.ctxFillStyle(c.fc),g=c.fc):g!==this.values.fill&&(g=this.values.fill,S.ctxFillStyle(this.values.fill)),D=this.textSpans[e].elem,s=D.length,this.globalData.canvasContext.beginPath(),n=0;n<s;n+=1)for(T=D[n],o=T.length,this.globalData.canvasContext.moveTo(T[0],T[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(T[a],T[a+1],T[a+2],T[a+3],T[a+4],T[a+5]);this.globalData.canvasContext.closePath(),S.ctxFill()}if(this.stroke){for(c&&c.sw?b!==c.sw&&(b=c.sw,S.ctxLineWidth(c.sw)):b!==this.values.sWidth&&(b=this.values.sWidth,S.ctxLineWidth(this.values.sWidth)),c&&c.sc?A!==c.sc&&(A=c.sc,S.ctxStrokeStyle(c.sc)):A!==this.values.stroke&&(A=this.values.stroke,S.ctxStrokeStyle(this.values.stroke)),D=this.textSpans[e].elem,s=D.length,this.globalData.canvasContext.beginPath(),n=0;n<s;n+=1)for(T=D[n],o=T.length,this.globalData.canvasContext.moveTo(T[0],T[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(T[a],T[a+1],T[a+2],T[a+3],T[a+4],T[a+5]);this.globalData.canvasContext.closePath(),S.ctxStroke()}c&&this.globalData.renderer.restore()}};function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e=t.getContext("2d"),r=this.img.width,n=this.img.height,s=r/n,a=this.assetData.w/this.assetData.h,o,l,h=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;s>a&&h==="xMidYMid slice"||s<a&&h!=="xMidYMid slice"?(l=n,o=l*a):(o=r,l=o/a),e.drawImage(this.img,(r-o)/2,(n-l)/2,o,l,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){t[0]===1&&t[1]===0&&t[4]===0&&t[5]===1&&t[12]===0&&t[13]===0||this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){this.canvasContext.globalAlpha*=t<0?0:t},CanvasRendererBase.prototype.ctxFillStyle=function(t){this.canvasContext.fillStyle=t},CanvasRendererBase.prototype.ctxStrokeStyle=function(t){this.canvasContext.strokeStyle=t},CanvasRendererBase.prototype.ctxLineWidth=function(t){this.canvasContext.lineWidth=t},CanvasRendererBase.prototype.ctxLineCap=function(t){this.canvasContext.lineCap=t},CanvasRendererBase.prototype.ctxLineJoin=function(t){this.canvasContext.lineJoin=t},CanvasRendererBase.prototype.ctxMiterLimit=function(t){this.canvasContext.miterLimit=t},CanvasRendererBase.prototype.ctxFill=function(t){this.canvasContext.fill(t)},CanvasRendererBase.prototype.ctxFillRect=function(t,e,r,n){this.canvasContext.fillRect(t,e,r,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}t&&(this.globalData.blendMode="source-over"),this.contextData.restore(t)},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){this.reset();var r,n;t?(r=t,n=e,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr);var s,a;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var o=this.renderConfig.preserveAspectRatio.split(" "),l=o[1]||"meet",h=o[0]||"xMidYMid",c=h.substr(0,4),g=h.substr(4);s=r/n,a=this.transformCanvas.w/this.transformCanvas.h,a>s&&l==="meet"||a<s&&l==="slice"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),c==="xMid"&&(a<s&&l==="meet"||a>s&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:c==="xMax"&&(a<s&&l==="meet"||a>s&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,g==="YMid"&&(a>s&&l==="meet"||a<s&&l==="slice")?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:g==="YMax"&&(a>s&&l==="meet"||a<s&&l==="slice")?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if(!(this.renderedFrame===t&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||t===-1)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var r,n=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var t,e=15;for(t=0;t<e;t+=1){var r=new CanvasContext;this.stack[t]=r}this._length=e,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var t=this._length*2,e=0;for(e=this._length;e<t;e+=1)this.stack[e]=new CanvasContext;this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(t){this.cArrPos-=1;var e=this.stack[this.cArrPos],r=e.transform,n,s=this.cTr.props;for(n=0;n<16;n+=1)s[n]=r[n];if(t){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),(t||e.opacity!==-1&&this.currentOpacity!==e.opacity)&&(this.nativeContext.globalAlpha=e.opacity,this.currentOpacity=e.opacity),this.currentFillStyle=e.fillStyle,this.currentStrokeStyle=e.strokeStyle,this.currentLineWidth=e.lineWidth,this.currentLineCap=e.lineCap,this.currentLineJoin=e.lineJoin,this.currentMiterLimit=e.miterLimit},CVContextData.prototype.save=function(t){t&&this.nativeContext.save();var e=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var r=this.stack[this.cArrPos],n;for(n=0;n<16;n+=1)r.transform[n]=e[n];this.cArrPos+=1;var s=this.stack[this.cArrPos];s.opacity=r.opacity,s.fillStyle=r.fillStyle,s.strokeStyle=r.strokeStyle,s.lineWidth=r.lineWidth,s.lineCap=r.lineCap,s.lineJoin=r.lineJoin,s.miterLimit=r.miterLimit},CVContextData.prototype.setOpacity=function(t){this.stack[this.cArrPos].opacity=t},CVContextData.prototype.setContext=function(t){this.nativeContext=t},CVContextData.prototype.fillStyle=function(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)},CVContextData.prototype.strokeStyle=function(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)},CVContextData.prototype.lineWidth=function(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)},CVContextData.prototype.lineCap=function(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)},CVContextData.prototype.lineJoin=function(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)},CVContextData.prototype.miterLimit=function(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)},CVContextData.prototype.transform=function(t){this.transformMat.cloneFromProps(t);var e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);var r=e.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(t){var e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)},CVContextData.prototype.fill=function(t){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(t)},CVContextData.prototype.fillRect=function(t,e,r,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(t,e,r,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip();var e,r=this.layers.length;for(e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)};function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,n=t.length;for(r=0;r<n;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r=t.sh.v,n=t.transformers,s,a=r._length,o,l,h,c;if(!(a<=1)){for(s=0;s<a-1;s+=1)o=this.getTransformedPoint(n,r.v[s]),l=this.getTransformedPoint(n,r.o[s]),h=this.getTransformedPoint(n,r.i[s+1]),c=this.getTransformedPoint(n,r.v[s+1]),this.checkBounds(o,l,h,c,e);r.c&&(o=this.getTransformedPoint(n,r.v[s]),l=this.getTransformedPoint(n,r.o[s]),h=this.getTransformedPoint(n,r.i[0]),c=this.getTransformedPoint(n,r.v[0]),this.checkBounds(o,l,h,c,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,n,s){this.getBoundsOfCurve(t,e,r,n);var a=this.shapeBoundingBox;s.x=bmMin(a.left,s.x),s.xMax=bmMax(a.right,s.xMax),s.y=bmMin(a.top,s.y),s.yMax=bmMax(a.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,n){for(var s=[[t[0],n[0]],[t[1],n[1]]],a,o,l,h,c,g,A,b=0;b<2;++b)o=6*t[b]-12*e[b]+6*r[b],a=-3*t[b]+9*e[b]-9*r[b]+3*n[b],l=3*e[b]-3*t[b],o|=0,a|=0,l|=0,a===0&&o===0||(a===0?(h=-l/o,h>0&&h<1&&s[b].push(this.calculateF(h,t,e,r,n,b))):(c=o*o-4*l*a,c>=0&&(g=(-o+bmSqrt(c))/(2*a),g>0&&g<1&&s[b].push(this.calculateF(g,t,e,r,n,b)),A=(-o-bmSqrt(c))/(2*a),A>0&&A<1&&s[b].push(this.calculateF(A,t,e,r,n,b)))));this.shapeBoundingBox.left=bmMin.apply(null,s[0]),this.shapeBoundingBox.top=bmMin.apply(null,s[1]),this.shapeBoundingBox.right=bmMax.apply(null,s[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,s[1])},HShapeElement.prototype.calculateF=function(t,e,r,n,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*n[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,n=t.length;for(r=0;r<n;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it?this.calculateBoundingBox(t[r].it,e):t[r]&&t[r].style&&t[r].w&&this.expandStrokeBoundingBox(t[r].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var r=0;if(t.keyframes){for(var n=0;n<t.keyframes.length;n+=1){var s=t.keyframes[n].s;s>r&&(r=s)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=s,n.webkitTransform=s}}};function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var n=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",n.fClass)this.innerElem.className=n.fClass;else{e.fontFamily=n.fFamily;var s=t.fWeight,a=t.fStyle;e.fontStyle=a,e.fontWeight=s}var o,l,h=t.l;l=h.length;var c,g,A,b=this.mHelper,D,T="",S=0;for(o=0;o<l;o+=1){if(this.globalData.fontManager.chars?(this.textPaths[S]?c=this.textPaths[S]:(c=createNS("path"),c.setAttribute("stroke-linecap",lineCapEnum[1]),c.setAttribute("stroke-linejoin",lineJoinEnum[2]),c.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[S]?(g=this.textSpans[S],A=g.children[0]):(g=createTag("div"),g.style.lineHeight=0,A=createNS("svg"),A.appendChild(c),styleDiv(g)))):this.isMasked?c=this.textPaths[S]?this.textPaths[S]:createNS("text"):this.textSpans[S]?(g=this.textSpans[S],c=this.textPaths[S]):(g=createTag("span"),styleDiv(g),c=createTag("span"),styleDiv(c),g.appendChild(c)),this.globalData.fontManager.chars){var L=this.globalData.fontManager.getCharData(t.finalText[o],n.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),E;if(L?E=L.data:E=null,b.reset(),E&&E.shapes&&E.shapes.length&&(D=E.shapes[0].it,b.scale(t.finalSize/100,t.finalSize/100),T=this.createPathShape(b,D),c.setAttribute("d",T)),this.isMasked)this.innerElem.appendChild(c);else{if(this.innerElem.appendChild(g),E&&E.shapes){document.body.appendChild(A);var v=A.getBBox();A.setAttribute("width",v.width+2),A.setAttribute("height",v.height+2),A.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var w=A.style,I="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";w.transform=I,w.webkitTransform=I,h[o].yOffset=v.y-1}else A.setAttribute("width",1),A.setAttribute("height",1);g.appendChild(A)}}else if(c.textContent=h[o].val,c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(c);else{this.innerElem.appendChild(g);var F=c.style,O="translate3d(0,"+-t.finalSize/1.2+"px,0)";F.transform=O,F.webkitTransform=O}this.isMasked?this.textSpans[S]=c:this.textSpans[S]=g,this.textSpans[S].style.display="block",this.textPaths[S]=c,S+=1}for(;S<this.textSpans.length;)this.textSpans[S].style.display="none",S+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var r,n,s=0,a=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;n=o.length;var l,h,c;for(r=0;r<n;r+=1)o[r].n?s+=1:(h=this.textSpans[r],c=this.textPaths[r],l=a[s],s+=1,l._mdf.m&&(this.isMasked?h.setAttribute("transform",l.m):(h.style.webkitTransform=l.m,h.style.transform=l.m)),h.style.opacity=l.o,l.sw&&l._mdf.sw&&c.setAttribute("stroke-width",l.sw),l.sc&&l._mdf.sc&&c.setAttribute("stroke",l.sc),l.fc&&l._mdf.fc&&(c.setAttribute("fill",l.fc),c.style.color=l.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var g=this.innerElem.getBBox();this.currentBBox.w!==g.width&&(this.currentBBox.w=g.width,this.svgElement.setAttribute("width",g.width)),this.currentBBox.h!==g.height&&(this.currentBBox.h=g.height,this.svgElement.setAttribute("height",g.height));var A=1;if(this.currentBBox.w!==g.width+A*2||this.currentBBox.h!==g.height+A*2||this.currentBBox.x!==g.x-A||this.currentBBox.y!==g.y-A){this.currentBBox.w=g.width+A*2,this.currentBBox.h=g.height+A*2,this.currentBBox.x=g.x-A,this.currentBBox.y=g.y-A,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var b="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=b,t.webkitTransform=b}}}};function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,t.pe,0,0,this),t.ks.p.s?(this.px=n(this,t.ks.p.x,1,0,this),this.py=n(this,t.ks.p.y,1,0,this),this.pz=n(this,t.ks.p.z,1,0,this)):this.p=n(this,t.ks.p,1,0,this),t.ks.a&&(this.a=n(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=n(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,t.ks.rx,0,degToRads,this),this.ry=n(this,t.ks.ry,0,degToRads,this),this.rz=n(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e=this.comp.threeDElements.length,r,n,s;for(t=0;t<e;t+=1)if(r=this.comp.threeDElements[t],r.type==="3d"){n=r.perspectiveElem.style,s=r.container.style;var a=this.pe.v+"px",o="0px 0px 0px",l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.perspective=a,n.webkitPerspective=a,s.transformOrigin=o,s.mozTransformOrigin=o,s.webkitTransformOrigin=o,n.transform=l,n.webkitTransform=l}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t=this._isFirstFrame,e,r;if(this.hierarchy)for(r=this.hierarchy.length,e=0;e<r;e+=1)t=this.hierarchy[e].finalTransform.mProp._mdf||t;if(t||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(r=this.hierarchy.length-1,e=r;e>=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;this.p?s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:s=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),o=[s[0]/a,s[1]/a,s[2]/a],l=Math.sqrt(o[2]*o[2]+o[0]*o[0]),h=Math.atan2(o[1],l),c=Math.atan2(o[0],-o[2]);this.mat.rotateY(c).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var g=!this._prevMat.equals(this.mat);if((g||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var A,b,D;for(e=0;e<r;e+=1)if(A=this.comp.threeDElements[e],A.type==="3d"){if(g){var T=this.mat.toCSS();D=A.container.style,D.transform=T,D.webkitTransform=T}this.pe._mdf&&(b=A.perspectiveElem.style,b.perspective=this.pe.v+"px",b.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var n=this.layers[e];if(!n.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var s=0,a,o,l;s<e;)this.elements[s]&&this.elements[s]!==!0&&this.elements[s].getBaseElement&&(o=this.elements[s],l=this.layers[s].ddd?this.getThreeDContainerByPos(s):o.getBaseElement(),a=l||a),s+=1;a?(!n.ddd||!this.supports3d)&&this.layerElement.insertBefore(r,a):(!n.ddd||!this.supports3d)&&this.layerElement.appendChild(r)}else this.addTo3dContainer(r,e)}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r=createTag("div"),n,s;styleDiv(r);var a=createTag("div");if(styleDiv(a),e==="3d"){n=r.style,n.width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px";var o="50% 50%";n.webkitTransformOrigin=o,n.mozTransformOrigin=o,n.transformOrigin=o,s=a.style;var l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=l,s.webkitTransform=l}r.appendChild(a);var h={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e=this.layers.length,r,n="";for(t=0;t<e;t+=1)this.layers[t].ddd&&this.layers[t].ty!==3?(n!=="3d"&&(n="3d",r=this.createThreeDContainer(t,"3d")),r.endPos=Math.max(r.endPos,t)):(n!=="2d"&&(n="2d",r=this.createThreeDContainer(t,"2d")),r.endPos=Math.max(r.endPos,t));for(e=this.threeDElements.length,t=e-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,n=this.threeDElements.length;r<n;){if(e<=this.threeDElements[r].endPos){for(var s=this.threeDElements[r].startPos,a;s<e;)this.elements[s]&&this.elements[s].getBaseElement&&(a=this.elements[s].getBaseElement()),s+=1;a?this.threeDElements[r].container.insertBefore(t,a):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,n=e.style;n.width=t.w+"px",n.height=t.h+"px",this.resizerElem=e,styleDiv(e),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),n.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var a=createNS("defs");s.appendChild(a),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,r=t/e,n=this.globalData.compSize.w/this.globalData.compSize.h,s,a,o,l;n>r?(s=t/this.globalData.compSize.w,a=t/this.globalData.compSize.w,o=0,l=(e-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(s=e/this.globalData.compSize.h,a=e/this.globalData.compSize.h,o=(t-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,l=0);var h=this.resizerElem.style;h.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+o+","+l+",0,1)",h.transform=h.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t=this.globalData.compSize.w,e=this.globalData.compSize.h,r,n=this.threeDElements.length;for(r=0;r<n;r+=1){var s=this.threeDElements[r].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(e,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,n=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],n,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}};function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r=0,n;r<e;)this.elements[r]&&this.elements[r].getBaseElement&&(n=this.elements[r].getBaseElement()),r+=1;n?this.layerElement.insertBefore(t,n):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=(function(){return function(t){function e(r){for(var n=0,s=t.layers.length;n<s;){if(t.layers[n].nm===r||t.layers[n].ind===r)return t.elements[n].layerInterface;n+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e}})();function _typeof$2(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(e){return typeof e}:_typeof$2=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$2(t)}function seedRandom(t,e){var r=this,n=256,s=6,a=52,o="random",l=e.pow(n,s),h=e.pow(2,a),c=h*2,g=n-1;function A(v,w,I){var F=[];w=w===!0?{entropy:!0}:w||{};var O=S(T(w.entropy?[v,E(t)]:v===null?L():v,3),F),V=new b(F),$=function(){for(var j=V.g(s),W=l,q=0;j<h;)j=(j+q)*n,W*=n,q=V.g(1);for(;j>=c;)j/=2,W/=2,q>>>=1;return(j+q)/W};return $.int32=function(){return V.g(4)|0},$.quick=function(){return V.g(4)/4294967296},$.double=$,S(E(V.S),t),(w.pass||I||function(j,W,q,U){return U&&(U.S&&D(U,V),j.state=function(){return D(V,{})}),q?(e[o]=j,W):j})($,O,"global"in w?w.global:this==e,w.state)}e["seed"+o]=A;function b(v){var w,I=v.length,F=this,O=0,V=F.i=F.j=0,$=F.S=[];for(I||(v=[I++]);O<n;)$[O]=O++;for(O=0;O<n;O++)$[O]=$[V=g&V+v[O%I]+(w=$[O])],$[V]=w;F.g=function(j){for(var W,q=0,U=F.i,p=F.j,x=F.S;j--;)W=x[U=g&U+1],q=q*n+x[g&(x[U]=x[p=g&p+W])+(x[p]=W)];return F.i=U,F.j=p,q}}function D(v,w){return w.i=v.i,w.j=v.j,w.S=v.S.slice(),w}function T(v,w){var I=[],F=_typeof$2(v),O;if(w&&F=="object")for(O in v)try{I.push(T(v[O],w-1))}catch{}return I.length?I:F=="string"?v:v+"\0"}function S(v,w){for(var I=v+"",F,O=0;O<I.length;)w[g&O]=g&(F^=w[g&O]*19)+I.charCodeAt(O++);return E(w)}function L(){try{var v=new Uint8Array(n);return(r.crypto||r.msCrypto).getRandomValues(v),E(v)}catch{var w=r.navigator,I=w&&w.plugins;return[+new Date,r,I,r.screen,E(t)]}}function E(v){return String.fromCharCode.apply(0,v)}S(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(e){return typeof e}:_typeof$1=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(t)}var ExpressionManager=(function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return t==="number"||e instanceof Number||t==="boolean"||t==="string"}function $bm_neg(t){var e=_typeof$1(t);if(e==="number"||t instanceof Number||e==="boolean")return-t;if($bm_isInstanceOfArray(t)){var r,n=t.length,s=[];for(r=0;r<n;r+=1)s[r]=-t[r];return s}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof$1(t),n=_typeof$1(e);if(isNumerable(r,t)&&isNumerable(n,e)||r==="string"||n==="string")return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return t=t.slice(0),t[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,o=e.length,l=[];s<a||s<o;)(typeof t[s]=="number"||t[s]instanceof Number)&&(typeof e[s]=="number"||e[s]instanceof Number)?l[s]=t[s]+e[s]:l[s]=e[s]===void 0?t[s]:t[s]||e[s],s+=1;return l}return 0}var add=sum;function sub(t,e){var r=_typeof$1(t),n=_typeof$1(e);if(isNumerable(r,t)&&isNumerable(n,e))return r==="string"&&(t=parseInt(t,10)),n==="string"&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return t=t.slice(0),t[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,a=t.length,o=e.length,l=[];s<a||s<o;)(typeof t[s]=="number"||t[s]instanceof Number)&&(typeof e[s]=="number"||e[s]instanceof Number)?l[s]=t[s]-e[s]:l[s]=e[s]===void 0?t[s]:t[s]||e[s],s+=1;return l}return 0}function mul(t,e){var r=_typeof$1(t),n=_typeof$1(e),s;if(isNumerable(r,t)&&isNumerable(n,e))return t*e;var a,o;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(o=t.length,s=createTypedArray("float32",o),a=0;a<o;a+=1)s[a]=t[a]*e;return s}if(isNumerable(r,t)&&$bm_isInstanceOfArray(e)){for(o=e.length,s=createTypedArray("float32",o),a=0;a<o;a+=1)s[a]=t*e[a];return s}return 0}function div(t,e){var r=_typeof$1(t),n=_typeof$1(e),s;if(isNumerable(r,t)&&isNumerable(n,e))return t/e;var a,o;if($bm_isInstanceOfArray(t)&&isNumerable(n,e)){for(o=t.length,s=createTypedArray("float32",o),a=0;a<o;a+=1)s[a]=t[a]/e;return s}if(isNumerable(r,t)&&$bm_isInstanceOfArray(e)){for(o=e.length,s=createTypedArray("float32",o),a=0;a<o;a+=1)s[a]=t/e[a];return s}return 0}function mod(t,e){return typeof t=="string"&&(t=parseInt(t,10)),typeof e=="string"&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var n=r;r=e,e=n}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,n=Math.min(t.length,e.length),s=0;for(r=0;r<n;r+=1)s+=Math.pow(e[r]-t[r],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e=t[0],r=t[1],n=t[2],s=Math.max(e,r,n),a=Math.min(e,r,n),o,l,h=(s+a)/2;if(s===a)o=0,l=0;else{var c=s-a;switch(l=h>.5?c/(2-s-a):c/(s+a),s){case e:o=(r-n)/c+(r<n?6:0);break;case r:o=(n-e)/c+2;break;case n:o=(e-r)/c+4;break}o/=6}return[o,l,h,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e=t[0],r=t[1],n=t[2],s,a,o;if(r===0)s=n,o=n,a=n;else{var l=n<.5?n*(1+r):n+r-n*r,h=2*n-l;s=hue2rgb(h,l,e+1/3),a=hue2rgb(h,l,e),o=hue2rgb(h,l,e-1/3)}return[s,a,o,t[3]]}function linear(t,e,r,n,s){if((n===void 0||s===void 0)&&(n=e,s=r,e=0,r=1),r<e){var a=r;r=e,e=a}if(t<=e)return n;if(t>=r)return s;var o=r===e?0:(t-e)/(r-e);if(!n.length)return n+(s-n)*o;var l,h=n.length,c=createTypedArray("float32",h);for(l=0;l<h;l+=1)c[l]=n[l]+(s[l]-n[l])*o;return c}function random(t,e){if(e===void 0&&(t===void 0?(t=0,e=1):(e=t,t=void 0)),e.length){var r,n=e.length;t||(t=createTypedArray("float32",n));var s=createTypedArray("float32",n),a=BMMath.random();for(r=0;r<n;r+=1)s[r]=t[r]+a*(e[r]-t[r]);return s}t===void 0&&(t=0);var o=BMMath.random();return t+o*(e-t)}function createPath(t,e,r,n){var s,a=t.length,o=shapePool.newElement();o.setPathData(!!n,a);var l=[0,0],h,c;for(s=0;s<a;s+=1)h=e&&e[s]?e[s]:l,c=r&&r[s]?r[s]:l,o.setTripleAt(t[s][0],t[s][1],c[0]+t[s][0],c[1]+t[s][1],h[0]+t[s][0],h[1]+t[s][1],s,!0);return o}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function t(e,r){var n,s,a=this.pv.length?this.pv.length:1,o=createTypedArray("float32",a);e=5;var l=Math.floor(time*e);for(n=0,s=0;n<l;){for(s=0;s<a;s+=1)o[s]+=-r+r*2*BMMath.random();n+=1}var h=time*e,c=h-Math.floor(h),g=createTypedArray("float32",a);if(a>1){for(s=0;s<a;s+=1)g[s]=this.pv[s]+o[s]+(-r+r*2*BMMath.random())*c;return g}return this.pv+o[0]+(-r+r*2*BMMath.random())*c}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],n=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,s=-Math.atan2(r[1],r[2])/degToRads;return[s,n,0]}function easeOut(t,e,r,n,s){return applyEase(easeOutBez,t,e,r,n,s)}function easeIn(t,e,r,n,s){return applyEase(easeInBez,t,e,r,n,s)}function ease(t,e,r,n,s){return applyEase(easeInOutBez,t,e,r,n,s)}function applyEase(t,e,r,n,s,a){s===void 0?(s=r,a=n):e=(e-r)/(n-r),e>1?e=1:e<0&&(e=0);var o=t(e);if($bm_isInstanceOfArray(s)){var l,h=s.length,c=createTypedArray("float32",h);for(l=0;l<h;l+=1)c[l]=(a[l]-s[l])*o+s[l];return c}return(a-s)*o+s}function nearestKey(t){var e,r=data.k.length,n,s;if(!data.k.length||typeof data.k[0]=="number")n=0,s=0;else if(n=-1,t*=elem.comp.globalData.frameRate,t<data.k[0].t)n=1,s=data.k[0].t;else{for(e=0;e<r-1;e+=1)if(t===data.k[e].t){n=e+1,s=data.k[e].t;break}else if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(n=e+2,s=data.k[e+1].t):(n=e+1,s=data.k[e].t);break}n===-1&&(n=e+1,s=data.k[e].t)}var a={};return a.index=n,a.time=s/elem.comp.globalData.frameRate,a}function key(t){var e,r,n;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(n=s.length,r=0;r<n;r+=1)e[r]=s[r],e.value[r]=s[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return!t&&t!==0&&(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return typeof value=="string"?e===void 0?value.substring(t):value.substring(t,e):""}function substr(t,e){return typeof value=="string"?e===void 0?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=t===0?0:Math.floor(time*t)/t,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob})(),Expressions=(function(){var t={};t.initExpressions=e,t.resetFrame=ExpressionManager.resetFrame;function e(r){var n=0,s=[];function a(){n+=1}function o(){n-=1,n===0&&h()}function l(c){s.indexOf(c)===-1&&s.push(c)}function h(){var c,g=s.length;for(c=0;c<g;c+=1)s[c].release();s.length=0}r.renderer.compInterface=CompExpressionInterface(r.renderer),r.renderer.globalData.projectInterface.registerComposition(r.renderer),r.renderer.globalData.pushExpression=a,r.renderer.globalData.popExpression=o,r.renderer.globalData.registerExpressionProperty=l}return t})(),MaskManagerInterface=(function(){function t(r,n){this._mask=r,this._data=n}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var e=function(r){var n=createSizedArray(r.viewData.length),s,a=r.viewData.length;for(s=0;s<a;s+=1)n[s]=new t(r.viewData[s],r.masksProperties[s]);var o=function(l){for(s=0;s<a;){if(r.masksProperties[s].nm===l)return n[s];s+=1}return null};return o};return e})(),ExpressionPropertyInterface=(function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(o,l,h){Object.defineProperty(o,"velocity",{get:function(){return l.getVelocityAtTime(l.comp.currentFrame)}}),o.numKeys=l.keyframes?l.keyframes.length:0,o.key=function(c){if(!o.numKeys)return 0;var g="";"s"in l.keyframes[c-1]?g=l.keyframes[c-1].s:"e"in l.keyframes[c-2]?g=l.keyframes[c-2].e:g=l.keyframes[c-2].s;var A=h==="unidimensional"?new Number(g):Object.assign({},g);return A.time=l.keyframes[c-1].t/l.elem.comp.globalData.frameRate,A.value=h==="unidimensional"?g[0]:g,A},o.valueAtTime=l.getValueAtTime,o.speedAtTime=l.getSpeedAtTime,o.velocityAtTime=l.getVelocityAtTime,o.propertyGroup=l.propertyGroup}function n(o){(!o||!("pv"in o))&&(o=t);var l=1/o.mult,h=o.pv*l,c=new Number(h);return c.value=h,r(c,o,"unidimensional"),function(){return o.k&&o.getValue(),h=o.v*l,c.value!==h&&(c=new Number(h),c.value=h,r(c,o,"unidimensional")),c}}function s(o){(!o||!("pv"in o))&&(o=e);var l=1/o.mult,h=o.data&&o.data.l||o.pv.length,c=createTypedArray("float32",h),g=createTypedArray("float32",h);return c.value=g,r(c,o,"multidimensional"),function(){o.k&&o.getValue();for(var A=0;A<h;A+=1)g[A]=o.v[A]*l,c[A]=g[A];return c}}function a(){return t}return function(o){return o?o.propType==="unidimensional"?n(o):s(o):a}})(),TransformExpressionInterface=(function(){return function(t){function e(o){switch(o){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)});var r,n,s,a;return t.p?a=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),n=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[r(),n(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e}})(),LayerExpressionInterface=(function(){function t(c){var g=new Matrix;if(c!==void 0){var A=this._elem.finalTransform.mProp.getValueAtTime(c);A.clone(g)}else{var b=this._elem.finalTransform.mProp;b.applyToMatrix(g)}return g}function e(c,g){var A=this.getMatrix(g);return A.props[12]=0,A.props[13]=0,A.props[14]=0,this.applyPoint(A,c)}function r(c,g){var A=this.getMatrix(g);return this.applyPoint(A,c)}function n(c,g){var A=this.getMatrix(g);return A.props[12]=0,A.props[13]=0,A.props[14]=0,this.invertPoint(A,c)}function s(c,g){var A=this.getMatrix(g);return this.invertPoint(A,c)}function a(c,g){if(this._elem.hierarchy&&this._elem.hierarchy.length){var A,b=this._elem.hierarchy.length;for(A=0;A<b;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(c)}return c.applyToPointArray(g[0],g[1],g[2]||0)}function o(c,g){if(this._elem.hierarchy&&this._elem.hierarchy.length){var A,b=this._elem.hierarchy.length;for(A=0;A<b;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(c)}return c.inversePoint(g)}function l(c){var g=new Matrix;if(g.reset(),this._elem.finalTransform.mProp.applyToMatrix(g),this._elem.hierarchy&&this._elem.hierarchy.length){var A,b=this._elem.hierarchy.length;for(A=0;A<b;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(g);return g.inversePoint(c)}return g.inversePoint(c)}function h(){return[1,1,1,1]}return function(c){var g;function A(S){D.mask=new MaskManagerInterface(S,c)}function b(S){D.effect=S}function D(S){switch(S){case"ADBE Root Vectors Group":case"Contents":case 2:return D.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return g;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return D.effect;case"ADBE Text Properties":return D.textInterface;default:return null}}D.getMatrix=t,D.invertPoint=o,D.applyPoint=a,D.toWorld=r,D.toWorldVec=e,D.fromWorld=s,D.fromWorldVec=n,D.toComp=r,D.fromComp=l,D.sampleImage=h,D.sourceRectAtTime=c.sourceRectAtTime.bind(c),D._elem=c,g=TransformExpressionInterface(c.finalTransform.mProp);var T=getDescriptor(g,"anchorPoint");return Object.defineProperties(D,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(g,"rotation"),scale:getDescriptor(g,"scale"),position:getDescriptor(g,"position"),opacity:getDescriptor(g,"opacity"),anchorPoint:T,anchor_point:T,transform:{get:function(){return g}},active:{get:function(){return c.isInRange}}}),D.startTime=c.data.st,D.index=c.data.ind,D.source=c.data.refId,D.height=c.data.ty===0?c.data.h:100,D.width=c.data.ty===0?c.data.w:100,D.inPoint=c.data.ip/c.comp.globalData.frameRate,D.outPoint=c.data.op/c.comp.globalData.frameRate,D._name=c.data.nm,D.registerMaskInterface=A,D.registerEffectsInterface=b,D}})(),propertyGroupFactory=(function(){return function(t,e){return function(r){return r=r===void 0?1:r,r<=0?t:e(r-1)}}})(),PropertyInterface=(function(){return function(t,e){var r={_name:t};function n(s){return s=s===void 0?1:s,s<=0?r:e(s-1)}return n}})(),EffectsExpressionInterface=(function(){var t={createEffectsInterface:e};function e(s,a){if(s.effectsManager){var o=[],l=s.data.ef,h,c=s.effectsManager.effectElements.length;for(h=0;h<c;h+=1)o.push(r(l[h],s.effectsManager.effectElements[h],a,s));var g=s.data.ef||[],A=function(b){for(h=0,c=g.length;h<c;){if(b===g[h].nm||b===g[h].mn||b===g[h].ix)return o[h];h+=1}return null};return Object.defineProperty(A,"numProperties",{get:function(){return g.length}}),A}return null}function r(s,a,o,l){function h(D){for(var T=s.ef,S=0,L=T.length;S<L;){if(D===T[S].nm||D===T[S].mn||D===T[S].ix)return T[S].ty===5?g[S]:g[S]();S+=1}throw new Error}var c=propertyGroupFactory(h,o),g=[],A,b=s.ef.length;for(A=0;A<b;A+=1)s.ef[A].ty===5?g.push(r(s.ef[A],a.effectElements[A],a.effectElements[A].propertyGroup,l)):g.push(n(a.effectElements[A],s.ef[A].ty,l,c));return s.mn==="ADBE Color Control"&&Object.defineProperty(h,"color",{get:function(){return g[0]()}}),Object.defineProperties(h,{numProperties:{get:function(){return s.np}},_name:{value:s.nm},propertyGroup:{value:c}}),h.enabled=s.en!==0,h.active=h.enabled,h}function n(s,a,o,l){var h=ExpressionPropertyInterface(s.p);function c(){return a===10?o.comp.compInterface(s.p.v):h()}return s.p.setGroupProperty&&s.p.setGroupProperty(PropertyInterface("",l)),c}return t})(),ShapePathInterface=(function(){return function(t,e,r){var n=e.sh;function s(o){return o==="Shape"||o==="shape"||o==="Path"||o==="path"||o==="ADBE Vector Shape"||o===2?s.path:null}var a=propertyGroupFactory(s,r);return n.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(s,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),s}})(),ShapeExpressionInterface=(function(){function t(T,S,L){var E=[],v,w=T?T.length:0;for(v=0;v<w;v+=1)T[v].ty==="gr"?E.push(r(T[v],S[v],L)):T[v].ty==="fl"?E.push(n(T[v],S[v],L)):T[v].ty==="st"?E.push(o(T[v],S[v],L)):T[v].ty==="tm"?E.push(l(T[v],S[v],L)):T[v].ty==="tr"||(T[v].ty==="el"?E.push(c(T[v],S[v],L)):T[v].ty==="sr"?E.push(g(T[v],S[v],L)):T[v].ty==="sh"?E.push(ShapePathInterface(T[v],S[v],L)):T[v].ty==="rc"?E.push(A(T[v],S[v],L)):T[v].ty==="rd"?E.push(b(T[v],S[v],L)):T[v].ty==="rp"?E.push(D(T[v],S[v],L)):T[v].ty==="gf"?E.push(s(T[v],S[v],L)):E.push(a(T[v],S[v])));return E}function e(T,S,L){var E,v=function(I){for(var F=0,O=E.length;F<O;){if(E[F]._name===I||E[F].mn===I||E[F].propertyIndex===I||E[F].ix===I||E[F].ind===I)return E[F];F+=1}return typeof I=="number"?E[I-1]:null};v.propertyGroup=propertyGroupFactory(v,L),E=t(T.it,S.it,v.propertyGroup),v.numProperties=E.length;var w=h(T.it[T.it.length-1],S.it[S.it.length-1],v.propertyGroup);return v.transform=w,v.propertyIndex=T.cix,v._name=T.nm,v}function r(T,S,L){var E=function(I){switch(I){case"ADBE Vectors Group":case"Contents":case 2:return E.content;default:return E.transform}};E.propertyGroup=propertyGroupFactory(E,L);var v=e(T,S,E.propertyGroup),w=h(T.it[T.it.length-1],S.it[S.it.length-1],E.propertyGroup);return E.content=v,E.transform=w,Object.defineProperty(E,"_name",{get:function(){return T.nm}}),E.numProperties=T.np,E.propertyIndex=T.ix,E.nm=T.nm,E.mn=T.mn,E}function n(T,S,L){function E(v){return v==="Color"||v==="color"?E.color:v==="Opacity"||v==="opacity"?E.opacity:null}return Object.defineProperties(E,{color:{get:ExpressionPropertyInterface(S.c)},opacity:{get:ExpressionPropertyInterface(S.o)},_name:{value:T.nm},mn:{value:T.mn}}),S.c.setGroupProperty(PropertyInterface("Color",L)),S.o.setGroupProperty(PropertyInterface("Opacity",L)),E}function s(T,S,L){function E(v){return v==="Start Point"||v==="start point"?E.startPoint:v==="End Point"||v==="end point"?E.endPoint:v==="Opacity"||v==="opacity"?E.opacity:null}return Object.defineProperties(E,{startPoint:{get:ExpressionPropertyInterface(S.s)},endPoint:{get:ExpressionPropertyInterface(S.e)},opacity:{get:ExpressionPropertyInterface(S.o)},type:{get:function(){return"a"}},_name:{value:T.nm},mn:{value:T.mn}}),S.s.setGroupProperty(PropertyInterface("Start Point",L)),S.e.setGroupProperty(PropertyInterface("End Point",L)),S.o.setGroupProperty(PropertyInterface("Opacity",L)),E}function a(){function T(){return null}return T}function o(T,S,L){var E=propertyGroupFactory(V,L),v=propertyGroupFactory(O,E);function w($){Object.defineProperty(O,T.d[$].nm,{get:ExpressionPropertyInterface(S.d.dataProps[$].p)})}var I,F=T.d?T.d.length:0,O={};for(I=0;I<F;I+=1)w(I),S.d.dataProps[I].p.setGroupProperty(v);function V($){return $==="Color"||$==="color"?V.color:$==="Opacity"||$==="opacity"?V.opacity:$==="Stroke Width"||$==="stroke width"?V.strokeWidth:null}return Object.defineProperties(V,{color:{get:ExpressionPropertyInterface(S.c)},opacity:{get:ExpressionPropertyInterface(S.o)},strokeWidth:{get:ExpressionPropertyInterface(S.w)},dash:{get:function(){return O}},_name:{value:T.nm},mn:{value:T.mn}}),S.c.setGroupProperty(PropertyInterface("Color",E)),S.o.setGroupProperty(PropertyInterface("Opacity",E)),S.w.setGroupProperty(PropertyInterface("Stroke Width",E)),V}function l(T,S,L){function E(w){return w===T.e.ix||w==="End"||w==="end"?E.end:w===T.s.ix?E.start:w===T.o.ix?E.offset:null}var v=propertyGroupFactory(E,L);return E.propertyIndex=T.ix,S.s.setGroupProperty(PropertyInterface("Start",v)),S.e.setGroupProperty(PropertyInterface("End",v)),S.o.setGroupProperty(PropertyInterface("Offset",v)),E.propertyIndex=T.ix,E.propertyGroup=L,Object.defineProperties(E,{start:{get:ExpressionPropertyInterface(S.s)},end:{get:ExpressionPropertyInterface(S.e)},offset:{get:ExpressionPropertyInterface(S.o)},_name:{value:T.nm}}),E.mn=T.mn,E}function h(T,S,L){function E(w){return T.a.ix===w||w==="Anchor Point"?E.anchorPoint:T.o.ix===w||w==="Opacity"?E.opacity:T.p.ix===w||w==="Position"?E.position:T.r.ix===w||w==="Rotation"||w==="ADBE Vector Rotation"?E.rotation:T.s.ix===w||w==="Scale"?E.scale:T.sk&&T.sk.ix===w||w==="Skew"?E.skew:T.sa&&T.sa.ix===w||w==="Skew Axis"?E.skewAxis:null}var v=propertyGroupFactory(E,L);return S.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",v)),S.transform.mProps.p.setGroupProperty(PropertyInterface("Position",v)),S.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",v)),S.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",v)),S.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",v)),S.transform.mProps.sk&&(S.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",v)),S.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",v))),S.transform.op.setGroupProperty(PropertyInterface("Opacity",v)),Object.defineProperties(E,{opacity:{get:ExpressionPropertyInterface(S.transform.mProps.o)},position:{get:ExpressionPropertyInterface(S.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(S.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(S.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(S.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(S.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(S.transform.mProps.sa)},_name:{value:T.nm}}),E.ty="tr",E.mn=T.mn,E.propertyGroup=L,E}function c(T,S,L){function E(I){return T.p.ix===I?E.position:T.s.ix===I?E.size:null}var v=propertyGroupFactory(E,L);E.propertyIndex=T.ix;var w=S.sh.ty==="tm"?S.sh.prop:S.sh;return w.s.setGroupProperty(PropertyInterface("Size",v)),w.p.setGroupProperty(PropertyInterface("Position",v)),Object.defineProperties(E,{size:{get:ExpressionPropertyInterface(w.s)},position:{get:ExpressionPropertyInterface(w.p)},_name:{value:T.nm}}),E.mn=T.mn,E}function g(T,S,L){function E(I){return T.p.ix===I?E.position:T.r.ix===I?E.rotation:T.pt.ix===I?E.points:T.or.ix===I||I==="ADBE Vector Star Outer Radius"?E.outerRadius:T.os.ix===I?E.outerRoundness:T.ir&&(T.ir.ix===I||I==="ADBE Vector Star Inner Radius")?E.innerRadius:T.is&&T.is.ix===I?E.innerRoundness:null}var v=propertyGroupFactory(E,L),w=S.sh.ty==="tm"?S.sh.prop:S.sh;return E.propertyIndex=T.ix,w.or.setGroupProperty(PropertyInterface("Outer Radius",v)),w.os.setGroupProperty(PropertyInterface("Outer Roundness",v)),w.pt.setGroupProperty(PropertyInterface("Points",v)),w.p.setGroupProperty(PropertyInterface("Position",v)),w.r.setGroupProperty(PropertyInterface("Rotation",v)),T.ir&&(w.ir.setGroupProperty(PropertyInterface("Inner Radius",v)),w.is.setGroupProperty(PropertyInterface("Inner Roundness",v))),Object.defineProperties(E,{position:{get:ExpressionPropertyInterface(w.p)},rotation:{get:ExpressionPropertyInterface(w.r)},points:{get:ExpressionPropertyInterface(w.pt)},outerRadius:{get:ExpressionPropertyInterface(w.or)},outerRoundness:{get:ExpressionPropertyInterface(w.os)},innerRadius:{get:ExpressionPropertyInterface(w.ir)},innerRoundness:{get:ExpressionPropertyInterface(w.is)},_name:{value:T.nm}}),E.mn=T.mn,E}function A(T,S,L){function E(I){return T.p.ix===I?E.position:T.r.ix===I?E.roundness:T.s.ix===I||I==="Size"||I==="ADBE Vector Rect Size"?E.size:null}var v=propertyGroupFactory(E,L),w=S.sh.ty==="tm"?S.sh.prop:S.sh;return E.propertyIndex=T.ix,w.p.setGroupProperty(PropertyInterface("Position",v)),w.s.setGroupProperty(PropertyInterface("Size",v)),w.r.setGroupProperty(PropertyInterface("Rotation",v)),Object.defineProperties(E,{position:{get:ExpressionPropertyInterface(w.p)},roundness:{get:ExpressionPropertyInterface(w.r)},size:{get:ExpressionPropertyInterface(w.s)},_name:{value:T.nm}}),E.mn=T.mn,E}function b(T,S,L){function E(I){return T.r.ix===I||I==="Round Corners 1"?E.radius:null}var v=propertyGroupFactory(E,L),w=S;return E.propertyIndex=T.ix,w.rd.setGroupProperty(PropertyInterface("Radius",v)),Object.defineProperties(E,{radius:{get:ExpressionPropertyInterface(w.rd)},_name:{value:T.nm}}),E.mn=T.mn,E}function D(T,S,L){function E(I){return T.c.ix===I||I==="Copies"?E.copies:T.o.ix===I||I==="Offset"?E.offset:null}var v=propertyGroupFactory(E,L),w=S;return E.propertyIndex=T.ix,w.c.setGroupProperty(PropertyInterface("Copies",v)),w.o.setGroupProperty(PropertyInterface("Offset",v)),Object.defineProperties(E,{copies:{get:ExpressionPropertyInterface(w.c)},offset:{get:ExpressionPropertyInterface(w.o)},_name:{value:T.nm}}),E.mn=T.mn,E}return function(T,S,L){var E;function v(I){if(typeof I=="number")return I=I===void 0?1:I,I===0?L:E[I-1];for(var F=0,O=E.length;F<O;){if(E[F]._name===I)return E[F];F+=1}return null}function w(){return L}return v.propertyGroup=propertyGroupFactory(v,w),E=t(T,S,v.propertyGroup),v.numProperties=E.length,v._name="Contents",v}})(),TextExpressionInterface=(function(){return function(t){var e;function r(n){switch(n){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){t.textProperty.getValue();var n=t.textProperty.currentData.t;return(!e||n!==e.value)&&(e=new String(n),e.value=n||new String(n),Object.defineProperty(e,"style",{get:function(){return{fillColor:t.textProperty.currentData.fc}}})),e}}),r}})();function _typeof(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(e){return typeof e}:_typeof=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}var FootageInterface=(function(){var t=function(r){var n="",s=r.getFootageData();function a(){return n="",s=r.getFootageData(),o}function o(l){if(s[l])return n=l,s=s[l],_typeof(s)==="object"?o:s;var h=l.indexOf(n);if(h!==-1){var c=parseInt(l.substr(h+n.length),10);return s=s[c],_typeof(s)==="object"?o:s}return""}return a},e=function(r){function n(s){return s==="Outline"?n.outlineInterface():null}return n._name="Outline",n.outlineInterface=t(r),n};return function(r){function n(s){return s==="Data"?n.dataInterface:null}return n._name="Data",n.dataInterface=e(r),n}})(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}var expressionHelpers=(function(){function t(o,l,h){l.x&&(h.k=!0,h.x=!0,h.initiateExpression=ExpressionManager.initiateExpression,h.effectsSequence.push(h.initiateExpression(o,l,h).bind(h)))}function e(o){return o*=this.elem.globalData.frameRate,o-=this.offsetTime,o!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<o?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(o,this._cachingAtTime),this._cachingAtTime.lastFrame=o),this._cachingAtTime.value}function r(o){var l=-.01,h=this.getValueAtTime(o),c=this.getValueAtTime(o+l),g=0;if(h.length){var A;for(A=0;A<h.length;A+=1)g+=Math.pow(c[A]-h[A],2);g=Math.sqrt(g)*100}else g=0;return g}function n(o){if(this.vel!==void 0)return this.vel;var l=-.001,h=this.getValueAtTime(o),c=this.getValueAtTime(o+l),g;if(h.length){g=createTypedArray("float32",h.length);var A;for(A=0;A<h.length;A+=1)g[A]=(c[A]-h[A])/l}else g=(c-h)/l;return g}function s(){return this.pv}function a(o){this.propertyGroup=o}return{searchExpressions:t,getSpeedAtTime:r,getVelocityAtTime:n,getValueAtTime:e,getStaticValueAtTime:s,setGroupProperty:a}})();function addPropertyDecorator(){function t(b,D,T){if(!this.k||!this.keyframes)return this.pv;b=b?b.toLowerCase():"";var S=this.comp.renderedFrame,L=this.keyframes,E=L[L.length-1].t;if(S<=E)return this.pv;var v,w;T?(D?v=Math.abs(E-this.elem.comp.globalData.frameRate*D):v=Math.max(0,E-this.elem.data.ip),w=E-v):((!D||D>L.length-1)&&(D=L.length-1),w=L[L.length-1-D].t,v=E-w);var I,F,O;if(b==="pingpong"){var V=Math.floor((S-w)/v);if(V%2!==0)return this.getValueAtTime((v-(S-w)%v+w)/this.comp.globalData.frameRate,0)}else if(b==="offset"){var $=this.getValueAtTime(w/this.comp.globalData.frameRate,0),j=this.getValueAtTime(E/this.comp.globalData.frameRate,0),W=this.getValueAtTime(((S-w)%v+w)/this.comp.globalData.frameRate,0),q=Math.floor((S-w)/v);if(this.pv.length){for(O=new Array($.length),F=O.length,I=0;I<F;I+=1)O[I]=(j[I]-$[I])*q+W[I];return O}return(j-$)*q+W}else if(b==="continue"){var U=this.getValueAtTime(E/this.comp.globalData.frameRate,0),p=this.getValueAtTime((E-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(O=new Array(U.length),F=O.length,I=0;I<F;I+=1)O[I]=U[I]+(U[I]-p[I])*((S-E)/this.comp.globalData.frameRate)/5e-4;return O}return U+(U-p)*((S-E)/.001)}return this.getValueAtTime(((S-w)%v+w)/this.comp.globalData.frameRate,0)}function e(b,D,T){if(!this.k)return this.pv;b=b?b.toLowerCase():"";var S=this.comp.renderedFrame,L=this.keyframes,E=L[0].t;if(S>=E)return this.pv;var v,w;T?(D?v=Math.abs(this.elem.comp.globalData.frameRate*D):v=Math.max(0,this.elem.data.op-E),w=E+v):((!D||D>L.length-1)&&(D=L.length-1),w=L[D].t,v=w-E);var I,F,O;if(b==="pingpong"){var V=Math.floor((E-S)/v);if(V%2===0)return this.getValueAtTime(((E-S)%v+E)/this.comp.globalData.frameRate,0)}else if(b==="offset"){var $=this.getValueAtTime(E/this.comp.globalData.frameRate,0),j=this.getValueAtTime(w/this.comp.globalData.frameRate,0),W=this.getValueAtTime((v-(E-S)%v+E)/this.comp.globalData.frameRate,0),q=Math.floor((E-S)/v)+1;if(this.pv.length){for(O=new Array($.length),F=O.length,I=0;I<F;I+=1)O[I]=W[I]-(j[I]-$[I])*q;return O}return W-(j-$)*q}else if(b==="continue"){var U=this.getValueAtTime(E/this.comp.globalData.frameRate,0),p=this.getValueAtTime((E+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(O=new Array(U.length),F=O.length,I=0;I<F;I+=1)O[I]=U[I]+(U[I]-p[I])*(E-S)/.001;return O}return U+(U-p)*(E-S)/.001}return this.getValueAtTime((v-((E-S)%v+E))/this.comp.globalData.frameRate,0)}function r(b,D){if(!this.k)return this.pv;if(b=(b||.4)*.5,D=Math.floor(D||5),D<=1)return this.pv;var T=this.comp.renderedFrame/this.comp.globalData.frameRate,S=T-b,L=T+b,E=D>1?(L-S)/(D-1):1,v=0,w=0,I;this.pv.length?I=createTypedArray("float32",this.pv.length):I=0;for(var F;v<D;){if(F=this.getValueAtTime(S+v*E),this.pv.length)for(w=0;w<this.pv.length;w+=1)I[w]+=F[w];else I+=F;v+=1}if(this.pv.length)for(w=0;w<this.pv.length;w+=1)I[w]/=D;else I/=D;return I}function n(b){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var D=this._transformCachingAtTime.v;if(D.cloneFromProps(this.pre.props),this.appliedTransformations<1){var T=this.a.getValueAtTime(b);D.translate(-T[0]*this.a.mult,-T[1]*this.a.mult,T[2]*this.a.mult)}if(this.appliedTransformations<2){var S=this.s.getValueAtTime(b);D.scale(S[0]*this.s.mult,S[1]*this.s.mult,S[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var L=this.sk.getValueAtTime(b),E=this.sa.getValueAtTime(b);D.skewFromAxis(-L*this.sk.mult,E*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var v=this.r.getValueAtTime(b);D.rotate(-v*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var w=this.rz.getValueAtTime(b),I=this.ry.getValueAtTime(b),F=this.rx.getValueAtTime(b),O=this.or.getValueAtTime(b);D.rotateZ(-w*this.rz.mult).rotateY(I*this.ry.mult).rotateX(F*this.rx.mult).rotateZ(-O[2]*this.or.mult).rotateY(O[1]*this.or.mult).rotateX(O[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var V=this.px.getValueAtTime(b),$=this.py.getValueAtTime(b);if(this.data.p.z){var j=this.pz.getValueAtTime(b);D.translate(V*this.px.mult,$*this.py.mult,-j*this.pz.mult)}else D.translate(V*this.px.mult,$*this.py.mult,0)}else{var W=this.p.getValueAtTime(b);D.translate(W[0]*this.p.mult,W[1]*this.p.mult,-W[2]*this.p.mult)}return D}function s(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(b,D,T){var S=a(b,D,T);return S.dynamicProperties.length?S.getValueAtTime=n.bind(S):S.getValueAtTime=s.bind(S),S.setGroupProperty=expressionHelpers.setGroupProperty,S};var o=PropertyFactory.getProp;PropertyFactory.getProp=function(b,D,T,S,L){var E=o(b,D,T,S,L);E.kf?E.getValueAtTime=expressionHelpers.getValueAtTime.bind(E):E.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(E),E.setGroupProperty=expressionHelpers.setGroupProperty,E.loopOut=t,E.loopIn=e,E.smooth=r,E.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(E),E.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(E),E.numKeys=D.a===1?D.k.length:0,E.propertyIndex=D.ix;var v=0;return T!==0&&(v=createTypedArray("float32",D.a===1?D.k[0].s.length:D.k.length)),E._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:v},expressionHelpers.searchExpressions(b,D,E),E.k&&L.addDynamicProperty(E),E};function l(b){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),b*=this.elem.globalData.frameRate,b-=this.offsetTime,b!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<b?this._caching.lastIndex:0,this._cachingAtTime.lastTime=b,this.interpolateShape(b,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var h=ShapePropertyFactory.getConstructorFunction(),c=ShapePropertyFactory.getKeyframedConstructorFunction();function g(){}g.prototype={vertices:function(b,D){this.k&&this.getValue();var T=this.v;D!==void 0&&(T=this.getValueAtTime(D,0));var S,L=T._length,E=T[b],v=T.v,w=createSizedArray(L);for(S=0;S<L;S+=1)b==="i"||b==="o"?w[S]=[E[S][0]-v[S][0],E[S][1]-v[S][1]]:w[S]=[E[S][0],E[S][1]];return w},points:function(b){return this.vertices("v",b)},inTangents:function(b){return this.vertices("i",b)},outTangents:function(b){return this.vertices("o",b)},isClosed:function(){return this.v.c},pointOnPath:function(b,D){var T=this.v;D!==void 0&&(T=this.getValueAtTime(D,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(T));for(var S=this._segmentsLength,L=S.lengths,E=S.totalLength*b,v=0,w=L.length,I=0,F;v<w;){if(I+L[v].addedLength>E){var O=v,V=T.c&&v===w-1?0:v+1,$=(E-I)/L[v].addedLength;F=bez.getPointInSegment(T.v[O],T.v[V],T.o[O],T.i[V],$,L[v]);break}else I+=L[v].addedLength;v+=1}return F||(F=T.c?[T.v[0][0],T.v[0][1]]:[T.v[T._length-1][0],T.v[T._length-1][1]]),F},vectorOnPath:function(b,D,T){b==1?b=this.v.c:b==0&&(b=.999);var S=this.pointOnPath(b,D),L=this.pointOnPath(b+.001,D),E=L[0]-S[0],v=L[1]-S[1],w=Math.sqrt(Math.pow(E,2)+Math.pow(v,2));if(w===0)return[0,0];var I=T==="tangent"?[E/w,v/w]:[-v/w,E/w];return I},tangentOnPath:function(b,D){return this.vectorOnPath(b,D,"tangent")},normalOnPath:function(b,D){return this.vectorOnPath(b,D,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([g],h),extendPrototype([g],c),c.prototype.getValueAtTime=l,c.prototype.initiateExpression=ExpressionManager.initiateExpression;var A=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(b,D,T,S,L){var E=A(b,D,T,S,L);return E.propertyIndex=D.ix,E.lock=!1,T===3?expressionHelpers.searchExpressions(b,D.pt,E):T===4&&expressionHelpers.searchExpressions(b,D.ks,E),E.k&&b.addDynamicProperty(E),E}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function t(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,r){var n=this.calculateExpression(r);if(e.t!==n){var s={};return this.copyData(s,e),s.t=n.toString(),s.__complete=!1,s}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=t}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function t(e,r){var n=createNS("feMerge");n.setAttribute("result",e);var s,a;for(a=0;a<r.length;a+=1)s=createNS("feMergeNode"),s.setAttribute("in",r[a]),n.appendChild(s),n.appendChild(s);return n}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(t,e,r,n,s){this.filterManager=e;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",n+"_tint_1"),t.appendChild(a),a=createNS("feColorMatrix"),a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",n+"_tint_2"),t.appendChild(a),this.matrixFilter=a;var o=this.createMergeNode(n,[s,n+"_tint_1",n+"_tint_2"]);t.appendChild(o)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 1 0")}};function SVGFillFilter(t,e,r,n){this.filterManager=e;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",n),t.appendChild(s),this.matrixFilter=s}SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}};function SVGStrokeEffect(t,e,r){this.initialized=!1,this.filterManager=e,this.elem=r,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var t=this.elem.layerElement.children||this.elem.layerElement.childNodes,e,r,n,s;for(this.filterManager.effectElements[1].p.v===1?(s=this.elem.maskManager.masksProperties.length,n=0):(n=this.filterManager.effectElements[0].p.v-1,s=n+1),r=createNS("g"),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset",1),n;n<s;n+=1)e=createNS("path"),r.appendChild(e),this.paths.push({p:e,m:n});if(this.filterManager.effectElements[10].p.v===3){var a=createNS("mask"),o=createElementID();a.setAttribute("id",o),a.setAttribute("mask-type","alpha"),a.appendChild(r),this.elem.globalData.defs.appendChild(a);var l=createNS("g");for(l.setAttribute("mask","url("+getLocationHref()+"#"+o+")");t[0];)l.appendChild(t[0]);this.elem.layerElement.appendChild(l),this.masker=a,r.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(t=this.elem.layerElement.children||this.elem.layerElement.childNodes;t.length;)this.elem.layerElement.removeChild(t[0]);this.elem.layerElement.appendChild(r),this.elem.layerElement.removeAttribute("mask"),r.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=r},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,r=this.paths.length,n,s;for(e=0;e<r;e+=1)if(this.paths[e].m!==-1&&(n=this.elem.maskManager.viewData[this.paths[e].m],s=this.paths[e].p,(t||this.filterManager._mdf||n.prop._mdf)&&s.setAttribute("d",n.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var o=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,l=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,h=s.getTotalLength();a="0 0 0 "+h*o+" ";var c=h*(l-o),g=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,A=Math.floor(c/g),b;for(b=0;b<A;b+=1)a+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+h*10+" 0 0"}else a="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;s.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(t||this.filterManager.effectElements[3].p._mdf)){var D=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(D[0]*255)+","+bmFloor(D[1]*255)+","+bmFloor(D[2]*255)+")")}};function SVGTritoneFilter(t,e,r,n){this.filterManager=e;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(s);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",n),this.matrixFilter=a;var o=createNS("feFuncR");o.setAttribute("type","table"),a.appendChild(o),this.feFuncR=o;var l=createNS("feFuncG");l.setAttribute("type","table"),a.appendChild(l),this.feFuncG=l;var h=createNS("feFuncB");h.setAttribute("type","table"),a.appendChild(h),this.feFuncB=h,t.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,s=n[0]+" "+r[0]+" "+e[0],a=n[1]+" "+r[1]+" "+e[1],o=n[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",o)}};function SVGProLevelsFilter(t,e,r,n){this.filterManager=e;var s=this.filterManager.effectElements,a=createNS("feComponentTransfer");(s[10].p.k||s[10].p.v!==0||s[11].p.k||s[11].p.v!==1||s[12].p.k||s[12].p.v!==1||s[13].p.k||s[13].p.v!==0||s[14].p.k||s[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(s[17].p.k||s[17].p.v!==0||s[18].p.k||s[18].p.v!==1||s[19].p.k||s[19].p.v!==1||s[20].p.k||s[20].p.v!==0||s[21].p.k||s[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(s[24].p.k||s[24].p.v!==0||s[25].p.k||s[25].p.v!==1||s[26].p.k||s[26].p.v!==1||s[27].p.k||s[27].p.v!==0||s[28].p.k||s[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(s[31].p.k||s[31].p.v!==0||s[32].p.k||s[32].p.v!==1||s[33].p.k||s[33].p.v!==1||s[34].p.k||s[34].p.v!==0||s[35].p.k||s[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(a)),(s[3].p.k||s[3].p.v!==0||s[4].p.k||s[4].p.v!==1||s[5].p.k||s[5].p.v!==1||s[6].p.k||s[6].p.v!==0||s[7].p.k||s[7].p.v!==1)&&(a=createNS("feComponentTransfer"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",n),t.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,n,s){for(var a=0,o=256,l,h=Math.min(t,e),c=Math.max(t,e),g=Array.call(null,{length:o}),A,b=0,D=s-n,T=e-t;a<=256;)l=a/256,l<=h?A=T<0?s:n:l>=c?A=T<0?n:s:A=n+D*Math.pow((l-t)/T,1/r),g[b]=A,b+=1,a+=256/(o-1);return g.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(t,e,r,n,s){var a=e.container.globalData.renderConfig.filterSize,o=e.data.fs||a;t.setAttribute("x",o.x||a.x),t.setAttribute("y",o.y||a.y),t.setAttribute("width",o.width||a.width),t.setAttribute("height",o.height||a.height),this.filterManager=e;var l=createNS("feGaussianBlur");l.setAttribute("in","SourceAlpha"),l.setAttribute("result",n+"_drop_shadow_1"),l.setAttribute("stdDeviation","0"),this.feGaussianBlur=l,t.appendChild(l);var h=createNS("feOffset");h.setAttribute("dx","25"),h.setAttribute("dy","0"),h.setAttribute("in",n+"_drop_shadow_1"),h.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=h,t.appendChild(h);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=c,t.appendChild(c);var g=createNS("feComposite");g.setAttribute("in",n+"_drop_shadow_3"),g.setAttribute("in2",n+"_drop_shadow_2"),g.setAttribute("operator","in"),g.setAttribute("result",n+"_drop_shadow_4"),t.appendChild(g);var A=this.createMergeNode(n,[n+"_drop_shadow_4",s]);t.appendChild(A)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(n),a=r*Math.sin(n);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var n=r.children,s=0,a=n.length;s<a&&n[s]!==t.layerElement;)s+=1;var o;s<=a-2&&(o=n[s+1]);var l=createNS("use");l.setAttribute("href","#"+e),o?r.insertBefore(l,o):r.appendChild(l)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),n=createNS("mask");n.setAttribute("id",e.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(n);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e.layerElement),s.appendChild(a);var o=createNS("use");o.setAttribute("href","#"+r),n.appendChild(o),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,n=e.length;r<n;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(t,e,r,n){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var s=createNS("feGaussianBlur");s.setAttribute("result",n),t.appendChild(s),this.feGaussianBlur=s}SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3,r=this.filterManager.effectElements[0].p.v*e,n=this.filterManager.effectElements[1].p.v,s=n==3?0:r,a=n==2?0:r;this.feGaussianBlur.setAttribute("stdDeviation",s+" "+a);var o=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",o)}};function TransformEffect(){}TransformEffect.prototype.init=function(t){this.effectsManager=t,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(t){if(this._opMdf=!1,this._mdf=!1,t||this.effectsManager._mdf){var e=this.effectsManager.effectElements,r=e[0].p.v,n=e[1].p.v,s=e[2].p.v===1,a=e[3].p.v,o=s?a:e[4].p.v,l=e[5].p.v,h=e[6].p.v,c=e[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(o*.01,a*.01,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-l*degToRads,(h+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(t,e){this.init(e)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(t){this.init(t)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})})(lottie$1,lottie$1.exports);var lottieExports=lottie$1.exports;const lottie=getDefaultExportFromCjs(lottieExports),loadingAnimation="data:application/json;base64,eyJ2IjoiNS41LjYiLCJmciI6MzAsImlwIjowLCJvcCI6NDAsInciOjQwMCwiaCI6NDAwLCJubSI6IsODwqPDgsKCw4LCs8ODwqPDgsKDw4LCs8ODwqPDgsKDw4LCnSAxIiwiZGRkIjowLCJhc3NldHMiOltdLCJsYXllcnMiOlt7ImRkZCI6MCwiaW5kIjoxLCJ0eSI6NCwibm0iOiLDg8Kjw4LCgsOCwrfDg8Kjw4LCgsOCwqfDg8Kjw4LCgsOCwqTDg8Kjw4LCg8OCwpfDg8Kjw4LCg8OCwqzDg8Kjw4LCgsOCwqTDg8Kjw4LCg8OCwqTDg8Kjw4LCg8OCwrwgMiIsInNyIjoxLCJrcyI6eyJvIjp7ImEiOjAsImsiOjEwMCwiaXgiOjExfSwiciI6eyJhIjowLCJrIjowLCJpeCI6MTB9LCJwIjp7ImEiOjAsImsiOlsyMDAsMjAwLDBdLCJpeCI6Mn0sImEiOnsiYSI6MCwiayI6WzAsMCwwXSwiaXgiOjF9LCJzIjp7ImEiOjAsImsiOlsxMDAsMTAwLDEwMF0sIml4Ijo2fX0sImFvIjowLCJzaGFwZXMiOlt7InR5IjoiZ3IiLCJpdCI6W3siZCI6MSwidHkiOiJlbCIsInMiOnsiYSI6MCwiayI6WzQwMC4wOTgsNDAwLjA5OF0sIml4IjoyfSwicCI6eyJhIjowLCJrIjpbMCwwXSwiaXgiOjN9LCJubSI6IsODwqbDgsKlw4LClcODwqXDgsKGw4LChsODwqXDgsK9w4LCosODwqPDgsKDw4LCkcODwqPDgsKCw4LCuSAxIiwibW4iOiJBREJFIFZlY3RvciBTaGFwZSAtIEVsbGlwc2UiLCJoZCI6ZmFsc2V9LHsidHkiOiJzdCIsImMiOnsiYSI6MCwiayI6WzAuMjM1MzU4OTY4Mzc3LDAuOTQyOTM4MDg5MzcxLDAuNjk4NzMyMjU2ODg5LDFdLCJpeCI6M30sIm8iOnsiYSI6MCwiayI6MTAwLCJpeCI6NH0sInciOnsiYSI6MCwiayI6MjAsIml4Ijo1fSwibGMiOjIsImxqIjoxLCJtbCI6NCwiYm0iOjAsIm5tIjoiw4PCp8OCwrfDgsKaIDEiLCJtbiI6IkFEQkUgVmVjdG9yIEdyYXBoaWMgLSBTdHJva2UiLCJoZCI6ZmFsc2V9LHsidHkiOiJmbCIsImMiOnsiYSI6MCwiayI6WzAuODgyMzUzMDAxMDE1LDAuODc0NTA5OTgzNDM3LDAuMjE1Njg1OTkwMjc3LDFdLCJpeCI6NH0sIm8iOnsiYSI6MCwiayI6MCwiaXgiOjV9LCJyIjoxLCJibSI6MCwibm0iOiLDg8Klw4LCocOCwpfDg8Kjw4LCgsOCwoogMSIsIm1uIjoiQURCRSBWZWN0b3IgR3JhcGhpYyAtIEZpbGwiLCJoZCI6ZmFsc2V9LHsidHkiOiJ0ciIsInAiOnsiYSI6MCwiayI6WzAuMDQ5LC0wLjk1MV0sIml4IjoyfSwiYSI6eyJhIjowLCJrIjpbMCwwXSwiaXgiOjF9LCJzIjp7ImEiOjAsImsiOls1OC42NDcsNTguNjQ3XSwiaXgiOjN9LCJyIjp7ImEiOjAsImsiOjAsIml4Ijo2fSwibyI6eyJhIjowLCJrIjoxMDAsIml4Ijo3fSwic2siOnsiYSI6MCwiayI6MCwiaXgiOjR9LCJzYSI6eyJhIjowLCJrIjowLCJpeCI6NX0sIm5tIjoiw4PCo8OCwoPDgsKIw4PCo8OCwoPDgsKpw4PCo8OCwoPDgsKzw4PCo8OCwoLDgsK5w4PCo8OCwoPDgsKVw4PCo8OCwoLDgsKpw4PCo8OCwoPDgsK8w4PCo8OCwoPDgsKgIn1dLCJubSI6IsODwqbDgsKlw4LClcODwqXDgsKGw4LChsODwqXDgsK9w4LCoiAxIiwibnAiOjMsImNpeCI6MiwiYm0iOjAsIml4IjoxLCJtbiI6IkFEQkUgVmVjdG9yIEdyb3VwIiwiaGQiOmZhbHNlfSx7InR5IjoidG0iLCJzIjp7ImEiOjEsImsiOlt7ImkiOnsieCI6WzAuNjY3XSwieSI6WzFdfSwibyI6eyJ4IjpbMC4zMzNdLCJ5IjpbMF19LCJ0IjoxMCwicyI6WzBdfSx7InQiOjQwLCJzIjpbMTAwXX1dLCJpeCI6MX0sImUiOnsiYSI6MSwiayI6W3siaSI6eyJ4IjpbMC42NjddLCJ5IjpbMV19LCJvIjp7IngiOlswLjMzM10sInkiOlswXX0sInQiOjAsInMiOlswXX0seyJ0IjozMCwicyI6WzEwMF19XSwiaXgiOjJ9LCJvIjp7ImEiOjEsImsiOlt7ImkiOnsieCI6WzAuODMzXSwieSI6WzAuODMzXX0sIm8iOnsieCI6WzAuMTY3XSwieSI6WzAuMTY3XX0sInQiOjAsInMiOlswXX0seyJ0Ijo0MCwicyI6WzM1NV19XSwiaXgiOjN9LCJtIjoxLCJpeCI6Miwibm0iOiLDg8Kjw4LCg8OCwpHDg8Kjw4LCgsOCwrnDg8Kjw4LCgcOCwq7Dg8Kjw4LCg8OCwojDg8Kjw4LCg8OCwqrDg8Kjw4LCg8OCwp/Dg8Kjw4LCg8OCwrPDg8Kjw4LCgsOCwrAgMSIsIm1uIjoiQURCRSBWZWN0b3IgRmlsdGVyIC0gVHJpbSIsImhkIjpmYWxzZX1dLCJpcCI6MCwib3AiOjkwMCwic3QiOjAsImJtIjowfSx7ImRkZCI6MCwiaW5kIjoyLCJ0eSI6NCwibm0iOiLDg8Kjw4LCgsOCwrfDg8Kjw4LCgsOCwqfDg8Kjw4LCgsOCwqTDg8Kjw4LCg8OCwpfDg8Kjw4LCg8OCwqzDg8Kjw4LCgsOCwqTDg8Kjw4LCg8OCwqTDg8Kjw4LCg8OCwrwgMSIsInNyIjoxLCJrcyI6eyJvIjp7ImEiOjAsImsiOjEwMCwiaXgiOjExfSwiciI6eyJhIjowLCJrIjowLCJpeCI6MTB9LCJwIjp7ImEiOjAsImsiOlsyMDAsMjAwLDBdLCJpeCI6Mn0sImEiOnsiYSI6MCwiayI6WzAsMCwwXSwiaXgiOjF9LCJzIjp7ImEiOjAsImsiOls3Mi43MzYsNzIuNzM2LDEwMF0sIml4Ijo2fX0sImFvIjowLCJzaGFwZXMiOlt7InR5IjoiZ3IiLCJpdCI6W3siZCI6MSwidHkiOiJlbCIsInMiOnsiYSI6MCwiayI6WzQwMC4wOTgsNDAwLjA5OF0sIml4IjoyfSwicCI6eyJhIjowLCJrIjpbMCwwXSwiaXgiOjN9LCJubSI6IsODwqbDgsKlw4LClcODwqXDgsKGw4LChsODwqXDgsK9w4LCosODwqPDgsKDw4LCkcODwqPDgsKCw4LCuSAxIiwibW4iOiJBREJFIFZlY3RvciBTaGFwZSAtIEVsbGlwc2UiLCJoZCI6ZmFsc2V9LHsidHkiOiJzdCIsImMiOnsiYSI6MCwiayI6WzAuMjM1MzU4OTY4Mzc3LDAuOTQyOTM4MDg5MzcxLDAuNjk4NzMyMjU2ODg5LDFdLCJpeCI6M30sIm8iOnsiYSI6MCwiayI6MTAwLCJpeCI6NH0sInciOnsiYSI6MCwiayI6MzAsIml4Ijo1fSwibGMiOjIsImxqIjoxLCJtbCI6NCwiYm0iOjAsIm5tIjoiw4PCp8OCwrfDgsKaIDEiLCJtbiI6IkFEQkUgVmVjdG9yIEdyYXBoaWMgLSBTdHJva2UiLCJoZCI6ZmFsc2V9LHsidHkiOiJmbCIsImMiOnsiYSI6MCwiayI6WzAuODgyMzUzMDAxMDE1LDAuODc0NTA5OTgzNDM3LDAuMjE1Njg1OTkwMjc3LDFdLCJpeCI6NH0sIm8iOnsiYSI6MCwiayI6MCwiaXgiOjV9LCJyIjoxLCJibSI6MCwibm0iOiLDg8Klw4LCocOCwpfDg8Kjw4LCgsOCwoogMSIsIm1uIjoiQURCRSBWZWN0b3IgR3JhcGhpYyAtIEZpbGwiLCJoZCI6ZmFsc2V9LHsidHkiOiJ0ciIsInAiOnsiYSI6MCwiayI6WzAuMDQ5LC0wLjk1MV0sIml4IjoyfSwiYSI6eyJhIjowLCJrIjpbMCwwXSwiaXgiOjF9LCJzIjp7ImEiOjAsImsiOls1OC42NDcsNTguNjQ3XSwiaXgiOjN9LCJyIjp7ImEiOjAsImsiOjAsIml4Ijo2fSwibyI6eyJhIjowLCJrIjoxMDAsIml4Ijo3fSwic2siOnsiYSI6MCwiayI6MCwiaXgiOjR9LCJzYSI6eyJhIjowLCJrIjowLCJpeCI6NX0sIm5tIjoiw4PCo8OCwoPDgsKIw4PCo8OCwoPDgsKpw4PCo8OCwoPDgsKzw4PCo8OCwoLDgsK5w4PCo8OCwoPDgsKVw4PCo8OCwoLDgsKpw4PCo8OCwoPDgsK8w4PCo8OCwoPDgsKgIn1dLCJubSI6IsODwqbDgsKlw4LClcODwqXDgsKGw4LChsODwqXDgsK9w4LCoiAxIiwibnAiOjMsImNpeCI6MiwiYm0iOjAsIml4IjoxLCJtbiI6IkFEQkUgVmVjdG9yIEdyb3VwIiwiaGQiOmZhbHNlfSx7InR5IjoidG0iLCJzIjp7ImEiOjEsImsiOlt7ImkiOnsieCI6WzAuNjY3XSwieSI6WzFdfSwibyI6eyJ4IjpbMC4zMzNdLCJ5IjpbMF19LCJ0IjoxMywicyI6WzBdfSx7InQiOjMxLCJzIjpbMTAwXX1dLCJpeCI6MX0sImUiOnsiYSI6MSwiayI6W3siaSI6eyJ4IjpbMC42NjddLCJ5IjpbMV19LCJvIjp7IngiOlswLjMzM10sInkiOlswXX0sInQiOjMsInMiOlswXX0seyJ0IjoyMSwicyI6WzEwMF19XSwiaXgiOjJ9LCJvIjp7ImEiOjEsImsiOlt7ImkiOnsieCI6WzAuODMzXSwieSI6WzAuODMzXX0sIm8iOnsieCI6WzAuMTY3XSwieSI6WzAuMTY3XX0sInQiOjAsInMiOlswXX0seyJ0IjozMSwicyI6WzM1NV19XSwiaXgiOjN9LCJtIjoxLCJpeCI6Miwibm0iOiLDg8Kjw4LCg8OCwpHDg8Kjw4LCgsOCwrnDg8Kjw4LCgcOCwq7Dg8Kjw4LCg8OCwojDg8Kjw4LCg8OCwqrDg8Kjw4LCg8OCwp/Dg8Kjw4LCg8OCwrPDg8Kjw4LCgsOCwrAgMSIsIm1uIjoiQURCRSBWZWN0b3IgRmlsdGVyIC0gVHJpbSIsImhkIjpmYWxzZX1dLCJpcCI6MCwib3AiOjkwMCwic3QiOjAsImJtIjowfV0sIm1hcmtlcnMiOltdfQ==";var freeGlobal=typeof dist.global=="object"&&dist.global&&dist.global.Object===Object&&dist.global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$2=Object.prototype,hasOwnProperty$1=objectProto$2.hasOwnProperty,nativeObjectToString$1=objectProto$2.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var e=hasOwnProperty$1.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var n=!0}catch{}var s=nativeObjectToString$1.call(t);return n&&(e?t[symToStringTag$1]=r:delete t[symToStringTag$1]),s}var objectProto$1=Object.prototype,nativeObjectToString=objectProto$1.toString;function objectToString(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}function isObjectLike(t){return t!=null&&typeof t=="object"}function overArg(t,e){return function(r){return t(e(r))}}var getPrototype=overArg(Object.getPrototypeOf,Object),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(t){if(!isObjectLike(t)||baseGetTag(t)!=objectTag)return!1;var e=getPrototype(t);if(e===null)return!0;var r=hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&funcToString.call(r)==objectCtorString}const CONTAINER_ID="jsweb3_dapp_default_container",IframeID=`${CONTAINER_ID}_iframe`,LoadingID=`${CONTAINER_ID}_loading`,formatUrlHash=t=>{if(!isPlainObject(t))return"";let e=Object.keys(t).reduce((r,n)=>typeof t[n]!="string"?r:`${r}&${n}=${encodeURIComponent(t[n])}`,"");return e=e.replace(/^&/,"#"),e},Ht=class qt{constructor(e){if(st(this,"isLoadingDefault",!1),st(this,"readyState",!1),st(this,"userConf",{url:""}),st(this,"init",()=>{const r=this.getContainer(this.userConf.wallet);this.getLoadingContainer(this.userConf.loading),this.createDefaultCSS(),this.loadIframe(r)}),st(this,"getContainer",r=>{var n,s;if(r!=null&&r.container)return r.container;let a=((n=this.userConf.wallet)==null?void 0:n.height)||"calc(100% - 20px)",o=((s=this.userConf.wallet)==null?void 0:s.maxheight)||"812px";a=typeof a=="number"?`${a}px`:a,o=typeof o=="number"?`${o}px`:o;const l=document.body,h=document.createElement("div");return h.id=CONTAINER_ID,h.style.height=a,h.style.maxHeight=o,h.className=`${CONTAINER_ID}_hide`,l.appendChild(h),h}),st(this,"createDefaultCSS",()=>{const r=document.getElementsByTagName("head")[0],n=document.createElement("style");n.innerHTML=`
|
|
15
|
-
#${CONTAINER_ID} {
|
|
16
|
-
position: fixed;
|
|
17
|
-
top: 40px;
|
|
18
|
-
right: 65px;
|
|
19
|
-
width: 375px;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.10);
|
|
22
|
-
z-index: 999999999;
|
|
23
|
-
cursor: grab;
|
|
24
|
-
border-radius: 17px;
|
|
25
|
-
background-color: #ddd;
|
|
26
|
-
}
|
|
27
|
-
.${CONTAINER_ID}_hide {
|
|
28
|
-
opacity: 0;
|
|
29
|
-
pointer-events: none;
|
|
30
|
-
z-index: -999;
|
|
31
|
-
}
|
|
32
|
-
#${CONTAINER_ID} > #${IframeID} {
|
|
33
|
-
position: absolute;
|
|
34
|
-
left: 3px;
|
|
35
|
-
top: 3px;
|
|
36
|
-
width: calc(100% - 6px);
|
|
37
|
-
height: calc(100% - 6px);
|
|
38
|
-
background-color: #fff;
|
|
39
|
-
border-radius: 15px;
|
|
40
|
-
}
|
|
41
|
-
#${LoadingID} {
|
|
42
|
-
position: fixed;
|
|
43
|
-
left: 50%;
|
|
44
|
-
top: 50%;
|
|
45
|
-
transform: translate(-50%, -50%);
|
|
46
|
-
}
|
|
47
|
-
@media (max-width: 640px) {
|
|
48
|
-
.${CONTAINER_ID}_hide {
|
|
49
|
-
transform: translateY(200%);
|
|
50
|
-
}
|
|
51
|
-
#${CONTAINER_ID} {
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 97%;
|
|
54
|
-
max-height: 100%;
|
|
55
|
-
left: 0!important;
|
|
56
|
-
bottom: 0!important;
|
|
57
|
-
top: auto!important;
|
|
58
|
-
background: transparent;
|
|
59
|
-
padding: 0;
|
|
60
|
-
border-radius: 10px 10px 0 0;
|
|
61
|
-
transition: all 0.3s;
|
|
62
|
-
}
|
|
63
|
-
#${CONTAINER_ID} > #${IframeID} {
|
|
64
|
-
border-radius: 0;
|
|
65
|
-
width: 100%;
|
|
66
|
-
height: 100%;
|
|
67
|
-
left: 0;
|
|
68
|
-
top: 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`,r.appendChild(n)}),st(this,"getLoadingContainer",r=>{const n=document.createElement("div");n.style.cssText=`
|
|
72
|
-
width: 100px;
|
|
73
|
-
height: 100px;
|
|
74
|
-
background-color: rgba(0,0,0,0.5);
|
|
75
|
-
z-index: 99;
|
|
76
|
-
border-radius: 10px;
|
|
77
|
-
`,lottie.loadAnimation({container:n,renderer:"svg",loop:!0,autoplay:!0,path:loadingAnimation});const s=(r==null?void 0:r.element)||n;if(r!=null&&r.container){const a=r.container;if(a)return a.appendChild(r.element),a}return s.id=LoadingID,document.body.appendChild(s),this.isLoadingDefault=!0,s}),st(this,"bindDragEvents",r=>{const n=o=>{const l=o.clientX-r.offsetLeft,h=o.clientY-r.offsetTop,c=A=>{A=A||window.event;let b=A.clientX-l,D=A.clientY-h;b<0?b=0:b>window.innerWidth-r.offsetWidth&&(b=window.innerWidth-r.offsetWidth),D<0?D=0:D>window.innerHeight-r.offsetHeight&&(D=window.innerHeight-r.offsetHeight),r.style.left=b+"px",r.style.top=D+"px"},g=()=>{document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",g,!1)};document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",g,!1)},s=o=>{o.stopPropagation()},a=document.getElementById(IframeID);r.addEventListener("mousedown",n,!1),a==null||a.addEventListener("mousedown",s,!1)}),st(this,"getWalletUrl",()=>{const r=window.sessionStorage.getItem("__telegram__initParams"),n=parseJson(r||"",null),s=n?formatUrlHash(n):window.location.hash;return`${this.userConf.url}${s}`}),st(this,"loadIframe",r=>{const n=`
|
|
78
|
-
<iframe
|
|
79
|
-
id="${IframeID}"
|
|
80
|
-
allow-top-navigation="true"
|
|
81
|
-
allow="publickey-credentials-create *;publickey-credentials-get *;camera *"
|
|
82
|
-
src="${this.getWalletUrl()}"
|
|
83
|
-
frameborder="0"
|
|
84
|
-
></iframe>
|
|
85
|
-
`;r.innerHTML=n,this.bindDragEvents(r)}),st(this,"waitReady",async()=>this.readyState===!0?!0:(this.readyState===!1&&(this.readyState="padding",this.init()),new Promise(r=>{window.setTimeout(async()=>{r(this.waitReady())},300)}))),st(this,"loaded",()=>{var r,n,s;if(this.readyState===!0)return;this.readyState=!0;const a=document.body;if(typeof this.userConf.onLoad=="function"&&this.userConf.onLoad(),this.isLoadingDefault){const o=document.getElementById(LoadingID);o&&a.removeChild(o)}(s=(n=(r=this.userConf)==null?void 0:r.loading)==null?void 0:n.finished)==null||s.call(n)}),st(this,"closeModal",()=>{var r,n,s;const a=document.getElementById(CONTAINER_ID);a&&(a.className=`${CONTAINER_ID}_hide`),(s=(n=(r=this.userConf)==null?void 0:r.wallet)==null?void 0:n.close)==null||s.call(n)}),st(this,"openModal",async()=>{var r,n,s;await this.waitReady();const a=document.getElementById(CONTAINER_ID);a&&(a.className=""),(s=(n=(r=this.userConf)==null?void 0:r.wallet)==null?void 0:n.open)==null||s.call(n)}),st(this,"getSDKWindow",async()=>qt.sdkWindow?qt.sdkWindow:new Promise((r,n)=>{const s=document.getElementById(IframeID);if(!s)return n("No iframe element found.");const a=s==null?void 0:s.contentWindow;a?(qt.sdkWindow=a,r(a)):s.onload=()=>{qt.sdkWindow=s.contentWindow,r(s.contentWindow)}})),qt._instance)return qt._instance;this.userConf=e,qt._instance=this}};st(Ht,"_instance"),st(Ht,"sdkWindow");let Modal=Ht;const logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALDSURBVHgB1Zg/aBNRHMe/1kIrRHJDwbSDSQbTrSkKupmDglOhzSDoolMGBzV0cRPpKFJI1w6tVbGLhEC7uIS4KbYmHSNyyVLtYhMSIRVB3++Sd17i3buX1z85P/C7u7z3cu97v/d7v3f3AGd0ZqvMDGa/j9k+de49DwkizPInIMLNjE6fjkwzOzhFMdwOOn3/45lBiLGLitgFGQMUwy3Pxcz7QAw3/Sw7PILDGA6KYSiKGY9omL0zhfPaKALBUau8WW9hY/kD9io1KKCfQdtVffNqO4VL8QuOdduFKu7NvIAKQ1AkoI241k2ENahCMfREpiENzVgoYJ5vPbiKxNyksG2j1sL3/R/mNfGz9QsySA0ZxcvLjyl28xGoQOJoCMulfc+2w5CgHbzdYlYW35nBS531srB0w/Qih7wUmw5JCVKOoa31XUcxxGsmtJdAUM67Qg/F4iFcToQxezfeVd6oHbqKIZqsjtrYvXr74TXTU/QgopQgjKHcl/sYDwctEVvrJXazOnbYtC6XvkEExd2VxEXmmXNIPb5uiaMHmRl75vo/oYe4GGJlsWDGDEfTNOi6jmKxiEql4li22fHERCRoxRSfdUqC7DTrh12/s9ms2Tl1HI1GXcsI0fD2ohzU5A2Zsn5RFpRMJpHJZMyzqKxfpIesFxqWdDrtWdYv0h6SzSNHReihzee7LAdNmdeURz6zTPu1WrfqG2a+6Q7YGHsDsM8kuuZ5jKcOEZ5rmc4W0advbrrWLy28tdIB5RsyN2g9o1cTEZ5D5jVlJ1k251BWPyrKs+yk+P8Eeb0y7FX/LpQ7gviggLZPCDcoqA0IPmcJWvUTczHHTjaW33eV0Yyyr4GcQq7suSAzinRYg3++y1aHOoL8Qo5f5DF47xh2ZRH4bLOB8NV2jN1TximKycNjhnNoR2QN7e234xZhoL2lpzt1/AfLekgsXhgSgQAAAABJRU5ErkJggg==",dragEvokingButton=({btnEle:t,onClick:e,onMoving:r,onStop:n,onMouseDown:s})=>{const a=checkIsMobile(),o=a?"touchstart":"mousedown",l=a?"touchend":"mouseup",h=a?"touchmove":"mousemove",c=A=>{var b;return a&&((b=A==null?void 0:A.touches)==null?void 0:b[0])||A},g=A=>{const b=c(A);typeof s=="function"&&s();const D=Date.now(),T=b.clientX-t.offsetLeft,S=b.clientY-t.offsetTop,L=b.clientX,E=b.clientY;let v=L,w=E,I=!1;const F=V=>{const $=c(V||window.event);let j=$.clientX-T,W=$.clientY-S;v=$.clientX,w=$.clientY,j<0?j=0:j>window.innerWidth-t.offsetWidth&&(j=window.innerWidth-t.offsetWidth),W<0?W=0:W>window.innerHeight-t.offsetHeight&&(W=window.innerHeight-t.offsetHeight),t.style.left=j+"px",t.style.top=W+"px",I||(typeof r=="function"&&r(),I=!0)},O=()=>{Date.now()-D<=300&&Math.abs(L-v)<10&&Math.abs(E-w)<10&&typeof e=="function"&&e();const V=t.offsetLeft<document.body.clientWidth/2?"left":"right";typeof n=="function"&&n(V),I=!1,document.removeEventListener(h,F,!1),document.removeEventListener(l,O,!1)};document.addEventListener(h,F,!1),document.addEventListener(l,O,!1)};t.addEventListener(o,g,!1)},St=class jt{constructor(){st(this,"message"),st(this,"metadata"),st(this,"ready",!1),st(this,"provider",{}),st(this,"telegramEventInterceptor",()=>{var h,c,g;const A=(h=window==null?void 0:window.TelegramGameProxy)==null?void 0:h.receiveEvent,b=(g=(c=window==null?void 0:window.Telegram)==null?void 0:c.WebView)==null?void 0:g.receiveEvent,D=window==null?void 0:window.TelegramGameProxy_receiveEvent,T=S=>(...L)=>{typeof S=="function"&&S(...L),this.message.sendDidMsg({methodName:INNER_EVENT_NAME.TELEGRAM_RECEIVE_EVENT,metadata:getMetadata(),params:[...L]})};try{let S=T(A);const L={receiveEvent:S};globalThis.TelegramGameProxy=L,Object.defineProperty(globalThis,"TelegramGameProxy",{get(){return L},set(E){L!==E&&Object.keys(E||{}).forEach(v=>{v!=="receiveEvent"&&(L[v]=E==null?void 0:E[v])})}}),Object.defineProperty(L,"receiveEvent",{get(){return S},set(E){S!==E&&(S=T(E))}})}catch(S){console.log(S)}try{const S=globalThis.Telegram||{};let L=T(b);const E={...(S==null?void 0:S.WebView)||{},receiveEvent:L},v={...S,WebView:E};Object.defineProperty(globalThis,"Telegram",{get(){return v},set(w){v!==w&&Object.keys(w||{}).forEach(I=>{I!=="receiveEvent"&&(v[I]=w==null?void 0:w[I])})}}),Object.defineProperty(v,"WebView",{get(){return E},set(w){E!==w&&Object.keys(w||{}).forEach(I=>{I!=="receiveEvent"&&(E[I]=w==null?void 0:w[I])})}}),Object.defineProperty(E,"receiveEvent",{get(){return L},set(w){L!==w&&(L=T(w))}})}catch(S){console.log(S)}try{let S=T(D);Object.defineProperty(globalThis,"TelegramGameProxy_receiveEvent",{get(){return S},set(L){S!==L&&(S=T(L))}})}catch(S){console.log(S)}}),st(this,"loaded",()=>{var h;const{loginModes:c}=((h=jt.userConf)==null?void 0:h.wallet)||{};this.message.sendDidMsg({methodName:INNER_EVENT_NAME.WALLET_CONFIG,metadata:this.metadata,params:{loginModes:c}})}),st(this,"open",()=>this.message.modal.openModal()),st(this,"close",()=>this.message.modal.closeModal()),st(this,"request",async h=>await this.message.send({...h,metadata:this.metadata})),st(this,"multipleRequest",async h=>{const{events:c,chainType:g}=h,A=c.map(async b=>await this.request({...b,chainType:g}));return Promise.all(A)}),st(this,"on",(h,c)=>{this.message.on(h,c)}),st(this,"oauth",async h=>{const c=h.chainType;if(!Object.values(exports.ChainType).includes(c))throw Error("chainType can only be one of Ethereum, PUT, Aptos, Endless and Solana");return await this.request({chainType:c,methodName:"oauth",params:h.params})}),st(this,"logout",()=>new Promise(h=>{const c=()=>{this.message.removeEvent(DID_EVENT_NAME.LOGOUT,c),h(null)};this.message.on(DID_EVENT_NAME.LOGOUT,c),this.message.sendDidMsg({methodName:"inner_wallet_logout",metadata:this.metadata})}));var e,r,n,s,a,o;if(jt._instance)return jt._instance;this.telegramEventInterceptor();const l=new Modal({...jt.userConf,url:"https://id.gelwallet.com",onLoad:this.loaded});this.message=new PostMessage(l),this.metadata=getMetadata(),jt._instance=this,jt.userConf.takeover&&JSON.stringify(jt.userConf.takeover)!=="{}"&&(globalThis.bw=this.provider),(e=jt.userConf.takeover)!=null&&e.put&&Promise.resolve().then(()=>require("./index-CqeMS3Gf-C4g86ca5.js")).then(({PutProvider:h})=>{const c=new h(this.message);try{this.provider.put=c,Object.defineProperty(globalThis,"put",{value:c,writable:!1})}catch(g){console.error(g)}}),(r=jt.userConf.takeover)!=null&&r.solana&&Promise.resolve().then(()=>require("./index-B3LF1VeP-58KzZv6u.js")).then(({SolanaProvider:h})=>{const c=new h(this.message);try{this.provider.solana=c,Object.defineProperty(globalThis,"solana",{value:c,writable:!1})}catch(g){console.error(g)}}),(n=jt.userConf.takeover)!=null&&n.ethereum&&Promise.resolve().then(()=>require("./index-DGMGsMkJ-BTPPfxmS.js")).then(({EvmProvider:h})=>{const c=new h(this.message);try{this.provider.ethereum=c,Object.defineProperty(globalThis,"ethereum",{value:c,writable:!1})}catch(g){console.error(g)}}),(s=jt.userConf.takeover)!=null&&s.tronLink&&Promise.resolve().then(()=>require("./index-9qmfDVzH-C6VVZD9P.js")).then(({TronProvider:h})=>{const c=new h(this.message);this.provider.tronLink=c;try{Object.defineProperty(globalThis,"tronLink",{value:c,writable:!1})}catch(g){console.error(g)}}),(a=jt.userConf.takeover)!=null&&a.aptos&&Promise.resolve().then(()=>require("./index-CCHY2zSF-ocS_tvXl.js")).then(({AptosProvider:h})=>{const c=new h(this);this.provider.aptos=c;try{Object.defineProperty(globalThis,"aptos",{value:c,writable:!1})}catch(g){console.error(g)}}),(o=jt.userConf.takeover)!=null&&o.endless&&Promise.resolve().then(()=>require("./index-yUF_S07V-Cm9-qVkc.js")).then(({EndlessProvider:h})=>{const c=new h(this);this.provider.endless=c;try{Object.defineProperty(globalThis,"endless",{value:c,writable:!1})}catch(g){console.error(g)}})}static clearInstance(){jt._instance=void 0}};st(St,"_instance"),st(St,"userConf",{}),st(St,"generateEvokingButton",()=>{const t=document.createElement("div");t.style.cssText=`
|
|
86
|
-
position: fixed;
|
|
87
|
-
bottom: 15%;
|
|
88
|
-
right: 0px;
|
|
89
|
-
width: 58px;
|
|
90
|
-
height: 40px;
|
|
91
|
-
background-color: #fff;
|
|
92
|
-
border-radius: 20px 0 0 20px;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
display: flex;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
align-items: center;
|
|
97
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.10);
|
|
98
|
-
border: 1px solid #E9EDF3;
|
|
99
|
-
border-right: none;
|
|
100
|
-
transition: width 0.3s,height 0.3s,backgroundColor 0.3s,border 0.3s,borderRadius 0.3s;
|
|
101
|
-
z-index: 999;
|
|
102
|
-
user-select: none;
|
|
103
|
-
`;let e=!1;const r=checkIsMobile(),n=()=>{e||(t.style.width="58px",t.style.height="40px",t.style.backgroundColor="#fff",t.style.border="1px solid #E9EDF3")};t.onmouseover=()=>{e||r||(t.style.width="68px",t.style.backgroundColor="#2a2a2a",t.style.border="none")},t.onmouseout=n,t.innerHTML=`<img src="${logo}" style="width: 28px; height: 28px;" draggable="false" />`,document.body.appendChild(t),dragEvokingButton({btnEle:t,onClick:new St().open,onMouseDown:()=>{e=!0},onMoving:()=>{t.style.width="50px",t.style.height="50px",t.style.borderRadius="50%",t.style.backgroundColor="#fff",t.style.border="1px solid #E9EDF3"},onStop:s=>{switch(e=!1,s){case"left":t.style.right="unset",t.style.left="0",t.style.borderRadius="0 20px 20px 0";break;case"right":t.style.left="unset",t.style.right="0",t.style.borderRadius="20px 0 0 20px";break}n()}})}),st(St,"config",t=>{St.userConf=t,t.hideEvokingButton||St.generateEvokingButton()});let Web3Kit=St;typeof window<"u"&&(globalThis.Web3Kit=Web3Kit);const dapp_es=Object.freeze(Object.defineProperty({__proto__:null,get ChainType(){return exports.ChainType},get PutNetType(){return PutNetType},get SolNetType(){return SolNetType},Web3Kit},Symbol.toStringTag,{value:"Module"}));exports.commonjsGlobal=commonjsGlobal;exports.dapp_es=dapp_es;exports.dist=dist;exports.getDefaultExportFromCjs=getDefaultExportFromCjs;exports.getMetadata=getMetadata;
|