cdn.jsdelivr.net
Open in
urlscan Pro
2606:4700::6810:5614
Public Scan
URL:
https://cdn.jsdelivr.net/npm/@ledgerhq/connect-kit@1
Submission: On December 14 via manual from CZ — Scanned from DE
Submission: On December 14 via manual from CZ — Scanned from DE
Form analysis
0 forms found in the DOMText Content
/** * Minified by jsDelivr using Terser v5.19.2. * Original file: /npm/@ledgerhq/connect-kit@1.1.8/dist/umd/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ledgerConnectKit={})}(this,(function(e){"use strict";let t=!1;const n=e=>(n,...r)=>{t&&console.debug(`[${e}] ${n}`,...r)},r=e=>(t,...n)=>{console.error(`[${e}] ${t}`,...n)};class i extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The Ledger Extension was not found."}}class o extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The specified provider is not supported."}}class s extends Error{constructor(){super(),this.name=this.constructor.name,this.code=4001,this.message="User rejected request"}}class a extends Error{constructor(){super(),this.message="Connect Kit does not support server side."}}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function f(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var h={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=63)}([function(e,t,n){(function(e){n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return u})),n.d(t,"i",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"e",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"o",(function(){return g})),n.d(t,"n",(function(){return y})),n.d(t,"q",(function(){return v})),n.d(t,"p",(function(){return m})),n.d(t,"D",(function(){return _})),n.d(t,"C",(function(){return b})),n.d(t,"E",(function(){return w})),n.d(t,"F",(function(){return E})),n.d(t,"w",(function(){return S})),n.d(t,"v",(function(){return O})),n.d(t,"x",(function(){return I})),n.d(t,"y",(function(){return x})),n.d(t,"t",(function(){return P})),n.d(t,"s",(function(){return C})),n.d(t,"u",(function(){return A})),n.d(t,"r",(function(){return N})),n.d(t,"m",(function(){return T})),n.d(t,"l",(function(){return M})),n.d(t,"k",(function(){return L})),n.d(t,"j",(function(){return j})),n.d(t,"A",(function(){return D})),n.d(t,"a",(function(){return z})),n.d(t,"B",(function(){return F})),n.d(t,"z",(function(){return B}));var r=n(22),i=n.n(r),o=n(58),s=n.n(o);function a(e){return new Uint8Array(e)}function u(e,t=!1){const n=e.toString("hex");return t?z(n):n}function c(e){return e.toString("utf8")}function l(e){return e.readUIntBE(0,e.length)}function f(e){return s()(e)}function h(e,t=!1){return u(f(e),t)}function d(e){return c(f(e))}function p(e){return l(f(e))}function g(t){return e.from(D(t),"hex")}function y(e){return a(g(e))}function v(e){return c(g(e))}function m(e){return p(y(e))}function _(t){return e.from(t,"utf8")}function b(e){return a(_(e))}function w(e,t=!1){return u(_(e),t)}function E(e){const t=parseInt(e,10);return function(e,t){if(!e)throw new Error("Number can only safely store up to 53 bits")}(!function(e){return void 0===e}(t)),t}function S(e){return f(k(R(e)))}function O(e){return k(R(e))}function I(e,t){return function(e,t){return h(k(e),t)}(R(e),t)}function x(e){return""+e}function R(e){return U((e>>>0).toString(2))}function k(e){return new Uint8Array(function(e,t=8){const n=U(e).match(new RegExp(`.{${t}}`,"gi"));return Array.from(n||[])}(e).map((e=>parseInt(e,2))))}function P(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function C(t){return e.isBuffer(t)}function A(e){return i.a.strict(e)&&!C(e)}function N(e){return!A(e)&&!C(e)&&void 0!==e.byteLength}function T(e){return C(e)?"buffer":A(e)?"typed-array":N(e)?"array-buffer":Array.isArray(e)?"array":typeof e}function M(e){return function(e){return!("string"!=typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8==0}(e)?"binary":P(e)?"hex":"utf8"}function L(...t){return e.concat(t)}function j(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function U(e,t=8,n="0"){return function(e,t,n="0"){return function(e,t,n,r="0"){const i=t-e.length;let o=e;if(i>0){const t=r.repeat(i);o=n?t+e:e+t}return o}(e,t,!0,n)}(e,function(e,t=8){const n=e%t;return n?(e-n)/t*t+t:e}(e.length,t),n)}function D(e){return e.replace(/^0x/,"")}function z(e){return e.startsWith("0x")?e:"0x"+e}function F(e){return(e=U(e=D(e),2))&&(e=z(e)),e}function B(e){const t=e.startsWith("0x");return e=(e=D(e)).startsWith("0")?e.substring(1):e,t?z(e):e}}).call(this,n(44).Buffer)},function(e,t,n){n.r(t),n.d(t,"convertArrayBufferToBuffer",(function(){return i})),n.d(t,"convertArrayBufferToUtf8",(function(){return o})),n.d(t,"convertArrayBufferToHex",(function(){return s})),n.d(t,"convertArrayBufferToNumber",(function(){return a})),n.d(t,"concatArrayBuffers",(function(){return u})),n.d(t,"convertBufferToArrayBuffer",(function(){return c})),n.d(t,"convertBufferToUtf8",(function(){return l})),n.d(t,"convertBufferToHex",(function(){return f})),n.d(t,"convertBufferToNumber",(function(){return h})),n.d(t,"concatBuffers",(function(){return d})),n.d(t,"convertUtf8ToArrayBuffer",(function(){return p})),n.d(t,"convertUtf8ToBuffer",(function(){return g})),n.d(t,"convertUtf8ToHex",(function(){return y})),n.d(t,"convertUtf8ToNumber",(function(){return v})),n.d(t,"convertHexToBuffer",(function(){return m})),n.d(t,"convertHexToArrayBuffer",(function(){return _})),n.d(t,"convertHexToUtf8",(function(){return b})),n.d(t,"convertHexToNumber",(function(){return w})),n.d(t,"convertNumberToBuffer",(function(){return E})),n.d(t,"convertNumberToArrayBuffer",(function(){return S})),n.d(t,"convertNumberToUtf8",(function(){return O})),n.d(t,"convertNumberToHex",(function(){return I})),n.d(t,"detectEnv",(function(){return F})),n.d(t,"detectOS",(function(){return B})),n.d(t,"isAndroid",(function(){return H})),n.d(t,"isIOS",(function(){return q})),n.d(t,"isMobile",(function(){return V})),n.d(t,"isNode",(function(){return $})),n.d(t,"isBrowser",(function(){return W})),n.d(t,"safeJsonParse",(function(){return G})),n.d(t,"safeJsonStringify",(function(){return Y})),n.d(t,"setLocal",(function(){return Q})),n.d(t,"getLocal",(function(){return J})),n.d(t,"removeLocal",(function(){return X})),n.d(t,"getClientMeta",(function(){return ee})),n.d(t,"sanitizeHex",(function(){return re})),n.d(t,"addHexPrefix",(function(){return ie})),n.d(t,"removeHexPrefix",(function(){return oe})),n.d(t,"removeHexLeadingZeros",(function(){return se})),n.d(t,"payloadId",(function(){return ae})),n.d(t,"uuid",(function(){return ue})),n.d(t,"logDeprecationWarning",(function(){return ce})),n.d(t,"getInfuraRpcUrl",(function(){return le})),n.d(t,"getRpcUrl",(function(){return fe})),n.d(t,"formatIOSMobile",(function(){return he})),n.d(t,"saveMobileLinkInfo",(function(){return de})),n.d(t,"getMobileRegistryEntry",(function(){return pe})),n.d(t,"getMobileLinkRegistry",(function(){return ge})),n.d(t,"promisify",(function(){return ye})),n.d(t,"formatRpcError",(function(){return ve})),n.d(t,"getWalletRegistryUrl",(function(){return _e})),n.d(t,"getDappRegistryUrl",(function(){return be})),n.d(t,"formatMobileRegistryEntry",(function(){return we})),n.d(t,"formatMobileRegistry",(function(){return Ee})),n.d(t,"isWalletConnectSession",(function(){return ke})),n.d(t,"parseWalletConnectUri",(function(){return Pe})),n.d(t,"getQueryString",(function(){return Oe})),n.d(t,"appendToQueryString",(function(){return Ie})),n.d(t,"parseQueryString",(function(){return xe})),n.d(t,"formatQueryString",(function(){return Re})),n.d(t,"isEmptyString",(function(){return Ce})),n.d(t,"isEmptyArray",(function(){return Ae})),n.d(t,"isBuffer",(function(){return Ne})),n.d(t,"isTypedArray",(function(){return Te})),n.d(t,"isArrayBuffer",(function(){return Me})),n.d(t,"getType",(function(){return Le})),n.d(t,"getEncoding",(function(){return je})),n.d(t,"isHexString",(function(){return Ue})),n.d(t,"isJsonRpcSubscription",(function(){return De})),n.d(t,"isJsonRpcRequest",(function(){return ze})),n.d(t,"isJsonRpcResponseSuccess",(function(){return Fe})),n.d(t,"isJsonRpcResponseError",(function(){return Be})),n.d(t,"isInternalEvent",(function(){return He})),n.d(t,"isReservedEvent",(function(){return qe})),n.d(t,"isSilentPayload",(function(){return Ve})),n.d(t,"getFromWindow",(function(){return k})),n.d(t,"getFromWindowOrThrow",(function(){return P})),n.d(t,"getDocumentOrThrow",(function(){return C})),n.d(t,"getDocument",(function(){return A})),n.d(t,"getNavigatorOrThrow",(function(){return N})),n.d(t,"getNavigator",(function(){return T})),n.d(t,"getLocationOrThrow",(function(){return M})),n.d(t,"getLocation",(function(){return L})),n.d(t,"getCryptoOrThrow",(function(){return j})),n.d(t,"getCrypto",(function(){return U})),n.d(t,"getLocalStorageOrThrow",(function(){return D})),n.d(t,"getLocalStorage",(function(){return z}));var r=n(0);function i(e){return r.b(new Uint8Array(e))}function o(e){return r.e(new Uint8Array(e))}function s(e,t){return r.c(new Uint8Array(e),!t)}function a(e){return r.d(new Uint8Array(e))}function u(...e){return r.n(e.map((e=>r.c(new Uint8Array(e)))).join("")).buffer}function c(e){return r.f(e).buffer}function l(e){return r.i(e)}function f(e,t){return r.g(e,!t)}function h(e){return r.h(e)}function d(...e){return r.k(...e)}function p(e){return r.C(e).buffer}function g(e){return r.D(e)}function y(e,t){return r.E(e,!t)}function v(e){return r.F(e)}function m(e){return r.o(e)}function _(e){return r.n(e).buffer}function b(e){return r.q(e)}function w(e){return r.p(e)}function E(e){return r.w(e)}function S(e){return r.v(e).buffer}function O(e){return r.y(e)}function I(e,t){return r.x(Number(e),!t)}var x=n(59),R=n(6);const k=R.getFromWindow,P=R.getFromWindowOrThrow,C=R.getDocumentOrThrow,A=R.getDocument,N=R.getNavigatorOrThrow,T=R.getNavigator,M=R.getLocationOrThrow,L=R.getLocation,j=R.getCryptoOrThrow,U=R.getCrypto,D=R.getLocalStorageOrThrow,z=R.getLocalStorage;function F(e){return Object(x.a)(e)}function B(){const e=F();return e&&e.os?e.os:void 0}function H(){const e=B();return!!e&&e.toLowerCase().includes("android")}function q(){const e=B();return!!e&&(e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function V(){return!!B()&&(H()||q())}function $(){const e=F();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function W(){return!$()&&!!T()}var K=n(12);const G=K.a,Y=K.b;function Q(e,t){const n=Y(t),r=z();r&&r.setItem(e,n)}function J(e){let t=null,n=null;const r=z();return r&&(n=r.getItem(e)),t=n?G(n):n,t}function X(e){const t=z();t&&t.removeItem(e)}var Z=n(60);function ee(){return Z.getWindowMetadata()}var te=n(7),ne=n(2);function re(e){return r.B(e)}function ie(e){return r.a(e)}function oe(e){return r.A(e)}function se(e){return r.z(r.a(e))}const ae=te.payloadId;function ue(){return((e,t)=>{for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t})()}function ce(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function le(e,t){let n;const r=ne.INFURA_NETWORKS[e];return r&&(n=`https://${r}.infura.io/v3/${t}`),n}function fe(e,t){let n;const r=le(e,t.infuraId);return t.custom&&t.custom[e]?n=t.custom[e]:r&&(n=r),n}function he(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function de(e){const t=e.href.split("?")[0];Q(ne.MOBILE_LINK_CHOICE_KEY,Object.assign(Object.assign({},e),{href:t}))}function pe(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function ge(e,t){let n=e;return t&&(n=t.map((t=>pe(e,t))).filter(Boolean)),n}function ye(e,t){return async(...n)=>new Promise(((r,i)=>{e.apply(t,[...n,(e,t)=>{null==e&&i(e),r(t)}])}))}function ve(e){const t=e.message||"Failed or Rejected Request";let n=-32e3;if(e&&!e.code)switch(t){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}const r={code:n,message:t};return e.data&&(r.data=e.data),r}const me="https://registry.walletconnect.com";function _e(){return me+"/api/v2/wallets"}function be(){return me+"/api/v2/dapps"}function we(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(n=e.image_url.sm)&&void 0!==n?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Ee(e,t="mobile"){return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>we(e,t)))}var Se=n(24);function Oe(e){const t=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return void 0!==t?e.substr(t):""}function Ie(e,t){let n=xe(e);return n=Object.assign(Object.assign({},n),t),Re(n)}function xe(e){return Se.parse(e)}function Re(e){return Se.stringify(e)}function ke(e){return void 0!==e.bridge}function Pe(e){const t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=function(e){const t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,n)),o=function(e){const t=xe(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return Object.assign(Object.assign({protocol:r},i),o)}function Ce(e){return""===e||"string"==typeof e&&""===e.trim()}function Ae(e){return!(e&&e.length)}function Ne(e){return r.s(e)}function Te(e){return r.u(e)}function Me(e){return r.r(e)}function Le(e){return r.m(e)}function je(e){return r.l(e)}function Ue(e,t){return r.t(e,t)}function De(e){return"object"==typeof e.params}function ze(e){return void 0!==e.method}function Fe(e){return void 0!==e.result}function Be(e){return void 0!==e.error}function He(e){return void 0!==e.event}function qe(e){return ne.RESERVED_EVENTS.includes(e)||e.startsWith("wc_")}function Ve(e){return!!e.method.startsWith("wc_")||!ne.SIGNING_METHODS.includes(e.method)}},function(e,t,n){n.r(t);var r=n(34);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(57);n.d(t,"ERROR_SESSION_CONNECTED",(function(){return o.k})),n.d(t,"ERROR_SESSION_DISCONNECTED",(function(){return o.l})),n.d(t,"ERROR_SESSION_REJECTED",(function(){return o.m})),n.d(t,"ERROR_MISSING_JSON_RPC",(function(){return o.e})),n.d(t,"ERROR_MISSING_RESULT",(function(){return o.h})),n.d(t,"ERROR_MISSING_ERROR",(function(){return o.c})),n.d(t,"ERROR_MISSING_METHOD",(function(){return o.f})),n.d(t,"ERROR_MISSING_ID",(function(){return o.d})),n.d(t,"ERROR_MISSING_REQUIRED",(function(){return o.g})),n.d(t,"ERROR_INVALID_RESPONSE",(function(){return o.a})),n.d(t,"ERROR_INVALID_URI",(function(){return o.b})),n.d(t,"ERROR_QRCODE_MODAL_NOT_PROVIDED",(function(){return o.i})),n.d(t,"ERROR_QRCODE_MODAL_USER_CLOSED",(function(){return o.j})),n.d(t,"RESERVED_EVENTS",(function(){return o.p})),n.d(t,"reservedEvents",(function(){return o.v})),n.d(t,"WALLET_METHODS",(function(){return o.s})),n.d(t,"SIGNING_METHODS",(function(){return o.q})),n.d(t,"STATE_METHODS",(function(){return o.r})),n.d(t,"signingMethods",(function(){return o.w})),n.d(t,"stateMethods",(function(){return o.x})),n.d(t,"MOBILE_LINK_CHOICE_KEY",(function(){return o.o})),n.d(t,"mobileLinkChoiceKey",(function(){return o.u})),n.d(t,"INFURA_NETWORKS",(function(){return o.n})),n.d(t,"infuraNetworks",(function(){return o.t}));var s=n(35);for(var i in s)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(i);var a=n(36);n.d(t,"IEvents",(function(){return a.a}));var u=n(37);for(var i in u)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(i);var c=n(38);for(var i in c)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(i);var l=n(39);for(var i in l)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return l[e]}))}(i);var f=n(40);for(var i in f)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return f[e]}))}(i);var h=n(41);for(var i in h)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return h[e]}))}(i);var d=n(42);for(var i in d)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return d[e]}))}(i);var p=n(43);for(var i in p)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return p[e]}))}(i)},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"i",(function(){return c})),n.d(t,"j",(function(){return l})),n.d(t,"h",(function(){return r})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"k",(function(){return d})),n.d(t,"l",(function(){return p}));const r=512,i=256,o=256,s="AES-CBC",a="SHA-"+i,u="HMAC",c="SHA-256",l="SHA-512",f="encrypt",h="decrypt",d="sign",p="verify"},function(e,t,n){n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"h",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return h}));const r="PARSE_ERROR",i="INVALID_REQUEST",o="METHOD_NOT_FOUND",s="INVALID_PARAMS",a="INTERNAL_ERROR",u="SERVER_ERROR",c=[-32700,-32600,-32601,-32602,-32603],l=[-32e3,-32099],f={[r]:{code:-32700,message:"Parse error"},[i]:{code:-32600,message:"Invalid Request"},[o]:{code:-32601,message:"Method not found"},[s]:{code:-32602,message:"Invalid params"},[a]:{code:-32603,message:"Internal error"},[u]:{code:-32e3,message:"Server error"}},h=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(17);r.__exportStar(n(64),t),r.__exportStar(n(65),t)},function(e,t,n){function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function i(e){const t=r(e);if(!t)throw new Error(e+" is not defined in Window");return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=i,t.getDocumentOrThrow=function(){return i("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return i("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return i("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return i("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return i("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},function(e,t,n){n.r(t);var r=n(4);n.d(t,"PARSE_ERROR",(function(){return r.f})),n.d(t,"INVALID_REQUEST",(function(){return r.d})),n.d(t,"METHOD_NOT_FOUND",(function(){return r.e})),n.d(t,"INVALID_PARAMS",(function(){return r.c})),n.d(t,"INTERNAL_ERROR",(function(){return r.b})),n.d(t,"SERVER_ERROR",(function(){return r.h})),n.d(t,"RESERVED_ERROR_CODES",(function(){return r.g})),n.d(t,"SERVER_ERROR_CODE_RANGE",(function(){return r.i})),n.d(t,"STANDARD_ERROR_MAP",(function(){return r.j})),n.d(t,"DEFAULT_ERROR",(function(){return r.a}));var i=n(11);n.d(t,"isServerErrorCode",(function(){return i.d})),n.d(t,"isReservedErrorCode",(function(){return i.c})),n.d(t,"isValidErrorCode",(function(){return i.e})),n.d(t,"getError",(function(){return i.a})),n.d(t,"getErrorByCode",(function(){return i.b})),n.d(t,"validateJsonRpcError",(function(){return i.g})),n.d(t,"parseConnectionError",(function(){return i.f}));var o=n(25);for(var s in o)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);var a=n(26);n.d(t,"payloadId",(function(){return a.e})),n.d(t,"formatJsonRpcRequest",(function(){return a.c})),n.d(t,"formatJsonRpcResult",(function(){return a.d})),n.d(t,"formatJsonRpcError",(function(){return a.b})),n.d(t,"formatErrorMessage",(function(){return a.a}));var u=n(27);n.d(t,"isValidRoute",(function(){return u.c})),n.d(t,"isValidDefaultRoute",(function(){return u.a})),n.d(t,"isValidWildcardRoute",(function(){return u.e})),n.d(t,"isValidLeadingWildcardRoute",(function(){return u.b})),n.d(t,"isValidTrailingWildcardRoute",(function(){return u.d}));var c=n(28);for(var s in c)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError","payloadId","formatJsonRpcRequest","formatJsonRpcResult","formatJsonRpcError","formatErrorMessage","isValidRoute","isValidDefaultRoute","isValidWildcardRoute","isValidLeadingWildcardRoute","isValidTrailingWildcardRoute"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(s);var l=n(32);n.d(t,"isHttpUrl",(function(){return l.a})),n.d(t,"isWsUrl",(function(){return l.c})),n.d(t,"isLocalhostUrl",(function(){return l.b}));var f=n(33);n.d(t,"isJsonRpcPayload",(function(){return f.b})),n.d(t,"isJsonRpcRequest",(function(){return f.c})),n.d(t,"isJsonRpcResponse",(function(){return f.d})),n.d(t,"isJsonRpcResult",(function(){return f.e})),n.d(t,"isJsonRpcError",(function(){return f.a})),n.d(t,"isJsonRpcValidationInvalid",(function(){return f.f}))},function(e,t,n){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f}));var r=n(5),i=n(3);async function o(e,t=i.a){return r.getSubtleCrypto().importKey("raw",e,function(e){return e===i.a?{length:i.b,name:i.a}:{hash:{name:i.f},name:i.e}}(t),!0,function(e){return e===i.a?[i.d,i.c]:[i.k,i.l]}(t))}async function s(e,t,n){const s=r.getSubtleCrypto(),a=await o(t,i.a),u=await s.encrypt({iv:e,name:i.a},a,n);return new Uint8Array(u)}async function a(e,t,n){const s=r.getSubtleCrypto(),a=await o(t,i.a),u=await s.decrypt({iv:e,name:i.a},a,n);return new Uint8Array(u)}async function u(e,t){const n=r.getSubtleCrypto(),s=await o(e,i.e),a=await n.sign({length:i.g,name:i.e},s,t);return new Uint8Array(a)}async function c(e,t){const n=r.getSubtleCrypto(),s=await o(e,i.e),a=await n.sign({length:i.h,name:i.e},s,t);return new Uint8Array(a)}async function l(e){const t=r.getSubtleCrypto(),n=await t.digest({name:i.i},e);return new Uint8Array(n)}async function f(e){const t=r.getSubtleCrypto(),n=await t.digest({name:i.j},e);return new Uint8Array(n)}},function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},function(e,t,n){const r=n(54),i=n(55);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},function(e,t,n){n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return l}));var r=n(4);function i(e){return e<=r.i[0]&&e>=r.i[1]}function o(e){return r.g.includes(e)}function s(e){return"number"==typeof e}function a(e){return Object.keys(r.j).includes(e)?r.j[e]:r.j[r.a]}function u(e){return Object.values(r.j).find((t=>t.code===e))||r.j[r.a]}function c(e){if(void 0===e.error.code)return{valid:!1,error:"Missing code for JSON-RPC error"};if(void 0===e.error.message)return{valid:!1,error:"Missing message for JSON-RPC error"};if(!s(e.error.code))return{valid:!1,error:"Invalid error code type for JSON-RPC: "+e.error.code};if(o(e.error.code)){const t=u(e.error.code);if(t.message!==r.j[r.a].message&&e.error.message===t.message)return{valid:!1,error:"Invalid error code message for JSON-RPC: "+e.error.code}}return{valid:!0}}function l(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}},function(e,t,n){function r(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}function i(e){return"string"==typeof e?e:JSON.stringify(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,s,a;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(45);n.d(t,"randomBytes",(function(){return r.a}));var i=n(46);n.d(t,"aesCbcDecrypt",(function(){return i.a})),n.d(t,"aesCbcEncrypt",(function(){return i.b}));var o=n(47);n.d(t,"hmacSha256Sign",(function(){return o.a})),n(52),n(16),n(3)},function(e,t,n){n.d(t,"a",(function(){return r}));class r{}},function(e,t,n){var r=n(48);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime})),n(49);var i=n(50);n.o(i,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return i.isConstantTime}));var o=n(51);n.d(t,"isConstantTime",(function(){return o.a}))},function(e,t,n){n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return h})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return _})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return S})),n.d(t,"__importDefault",(function(){return O})),n.d(t,"__classPrivateFieldGet",(function(){return I})),n.d(t,"__classPrivateFieldSet",(function(){return x})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function h(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function d(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){n.r(t);var r=n(29);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(15);n.d(t,"IEvents",(function(){return o.a}));var s=n(30);n.d(t,"IJsonRpcConnection",(function(){return s.b})),n.d(t,"IBaseJsonRpcProvider",(function(){return s.a})),n.d(t,"IJsonRpcProvider",(function(){return s.c}));var a=n(31);for(var i in a)["default","IEvents","IJsonRpcConnection","IBaseJsonRpcProvider","IJsonRpcProvider"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i)},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},function(e,t){e.exports=i,i.strict=o,i.loose=s;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return o(e)||s(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function s(e){return r[n.call(e)]}},function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){var n,r,i=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),m.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},v.call(_.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];w.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,o){var s=new _(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new w(i,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=_,e.Response=w),t.Headers=h,t.Request=_,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},function(e,t,n){const r=n(69),i=n(70),o=n(71),s=n(72);function a(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?i(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,s]=o(t.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(t.arrayFormat)?s:c(s,t),n(c(e,t),s,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else r[e]=h(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort(((e,t)=>Number(e)-Number(t))).map((e=>t[e])):t}(n):e[t]=n,e}),Object.create(null))}t.extract=f,t.parse=d,t.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[",i,"]"].join("")]:[...n,[u(t,e),"[",u(i,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[u(t,e),"[]"].join("")]:[...n,[u(t,e),"[]=",u(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[u(t,e),"=",u(r,e)].join("")]:[[n,u(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,u(t,e)]:[...n,[u(t,e),"=",u(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?u(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):u(n,t)+"="+u(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:c(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=l(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query);let a=t.stringify(s,n);a&&(a="?"+a);let c=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+u(e.fragmentIdentifier,n)),`${r}${a}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:a}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:s(o,n),fragmentIdentifier:a},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},function(e,t,n){n.r(t),n.d(t,"isNodeJs",(function(){return o}));var r=n(5);for(var i in r)["default","isNodeJs"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);const o=r.isNode},function(e,t,n){n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));var r=n(11),i=n(4);function o(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}function s(e,t,n){return{id:n||o(),jsonrpc:"2.0",method:e,params:t}}function a(e,t){return{id:e,jsonrpc:"2.0",result:t}}function u(e,t,n){return{id:e,jsonrpc:"2.0",error:c(t,n)}}function c(e,t){return void 0===e?Object(r.a)(i.b):("string"==typeof e&&(e=Object.assign(Object.assign({},Object(r.a)(i.h)),{message:e})),void 0!==t&&(e.data=t),Object(r.c)(e.code)&&(e=Object(r.b)(e.code)),e)}},function(e,t,n){function r(e){return e.includes("*")?o(e):!/\W/g.test(e)}function i(e){return"*"===e}function o(e){return!!i(e)||!!e.includes("*")&&2===e.split("*").length&&1===e.split("*").filter((e=>""===e.trim())).length}function s(e){return!i(e)&&o(e)&&!e.split("*")[0].trim()}function a(e){return!i(e)&&o(e)&&!e.split("*")[1].trim()}n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return a}))},function(e,t,n){n.r(t);var r=n(20);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i)},function(e,t){},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(15);class i extends r.a{constructor(e){super()}}class o extends r.a{constructor(){super()}}class s extends o{constructor(e){super()}}},function(e,t){},function(e,t,n){function r(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function i(e){return r(e,"^https?:")}function o(e){return r(e,"^wss?:")}function s(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}))},function(e,t,n){function r(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function i(e){return r(e)&&"method"in e}function o(e){return r(e)&&(s(e)||a(e))}function s(e){return"result"in e}function a(e){return"error"in e}function u(e){return"error"in e&&!1===e.valid}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return u}))},function(e,t){},function(e,t){},function(e,t,n){n.d(t,"a",(function(){return r}));class r{}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var r=n(66),i=n(67),o=n(68);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return H(B(t),e,n,r)}function O(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=z(e[o]);return i}function C(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:F(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(18))},function(e,t,n){n.d(t,"a",(function(){return i}));var r=n(5);function i(e){return r.getBrowerCrypto().getRandomValues(new Uint8Array(e))}},function(e,t,n){n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(8);function i(e,t,n){return Object(r.b)(e,t,n)}function o(e,t,n){return Object(r.a)(e,t,n)}},function(e,t,n){n.d(t,"a",(function(){return i}));var r=n(8);async function i(e,t){return await Object(r.c)(e,t)}n(16)},function(e,t,n){var r=n(5);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime}))},function(e,t,n){},function(e,t){},function(e,t,n){function r(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}n.d(t,"a",(function(){return r}))},function(e,t,n){n(8)},function(e,t,n){const r=n(21),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}}},function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},function(e,t){let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(r,"g"),t.NUMERIC=new RegExp("[0-9]+","g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+n+"$"),o=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,o=n.modules.data,s=t.getScale(i,r),a=Math.floor((i+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),f=r.color.light;t>=u&&n>=u&&t<a-u&&n<a-u&&(f=c[o[Math.floor((t-u)/s)*i+Math.floor((n-u)/s)]?1:0]),e[l++]=f.r,e[l++]=f.g,e[l++]=f.b,e[l]=f.a}}},function(e,t,n){n.d(t,"k",(function(){return r})),n.d(t,"l",(function(){return i})),n.d(t,"m",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"h",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return g})),n.d(t,"p",(function(){return y})),n.d(t,"v",(function(){return v})),n.d(t,"s",(function(){return m})),n.d(t,"q",(function(){return _})),n.d(t,"r",(function(){return b})),n.d(t,"w",(function(){return w})),n.d(t,"x",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"u",(function(){return O})),n.d(t,"n",(function(){return I})),n.d(t,"t",(function(){return x}));const r="Session currently connected",i="Session currently disconnected",o="Session Rejected",s="Missing JSON RPC response",a='JSON-RPC success response must include "result" field',u='JSON-RPC error response must include "error" field',c='JSON RPC request must have valid "method" value',l='JSON RPC request must have valid "id" value',f="Missing one of the required parameters: bridge / uri / session",h="JSON RPC response format is invalid",d="URI format is invalid",p="QRCode Modal not provided",g="User close QRCode Modal",y=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],v=y,m=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],_=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...m],b=["eth_accounts","eth_chainId","net_version"],w=_,E=b,S="WALLETCONNECT_DEEPLINK_CHOICE",O=S,I={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"},x=I},function(e,t,n){(function(t){var r=n(22).strict;e.exports=function(e){if(r(e)){var n=t.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}return t.from(e)}}).call(this,n(44).Buffer)},function(e,t,n){(function(e){n.d(t,"a",(function(){return h}));var r=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},o=function(t){this.version=t,this.type="node",this.name="node",this.os=e.platform},s=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},c=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function h(t){return t?p(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==e&&e.version?new o(e.version.slice(1)):null}function d(e){return""!==e&&l.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}function p(e){var t=d(e);if(!t)return null;var n=t[0],o=t[1];if("searchbot"===n)return new a;var u=o[1]&&o[1].split(".").join("_").split("_").slice(0,3);u?u.length<3&&(u=r(r([],u,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-u.length),!0)):u=[];var l=u.join("."),h=function(e){for(var t=0,n=f.length;t<n;t++){var r=f[t],i=r[0];if(r[1].exec(e))return i}return null}(e),p=c.exec(e);return p&&p[1]?new s(n,l,h,p[1]):new i(n,l,h)}}).call(this,n(19))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowMetadata=void 0;const r=n(6);t.getWindowMetadata=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const i=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:i}}},function(e,t,n){(function(e){var r=n(1),i=n(62);const o=void 0!==e.WebSocket?e.WebSocket:n(74);t.a=class{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new i.a,!e.url||"string"!=typeof e.url)throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set closing(e){}get closing(){return 2===this.readyState}set closed(e){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(e,t,n){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!n})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,t){this._events.push({event:e,callback:t})}_socketCreate(){if(this._nextSocket)return;const e=function(e,t,n){var i,o;const s=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),a=Object(r.isBrowser)()?{protocol:t,version:n,env:"browser",host:(null===(i=Object(r.getLocation)())||void 0===i?void 0:i.host)||""}:{protocol:t,version:n,env:(null===(o=Object(r.detectEnv)())||void 0===o?void 0:o.name)||""},u=Object(r.appendToQueryString)(Object(r.getQueryString)(s[1]||""),a);return s[0]+"?"+u}(this._url,this._protocol,this._version);if(this._nextSocket=new o(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let t;try{t=JSON.parse(e.data)}catch(e){return}if(this._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const e=this._events.filter((e=>"message"===e.event));e&&e.length&&e.forEach((e=>e.callback(t)))}}_socketError(e){const t=this._events.filter((e=>"error"===e.event));t&&t.length&&t.forEach((t=>t.callback(e)))}_queueSubscriptions(){this._subscriptions.forEach((e=>this._queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach((e=>this._socketSend(e))),this._queue=[]}}}).call(this,n(18))},function(e,t,n){t.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(e,t){this._eventEmitters.push({event:e,callback:t})}trigger(e){let t=[];e&&(t=this._eventEmitters.filter((t=>t.event===e))),t.forEach((e=>{e.callback()}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(17),i=r.__importDefault(n(13)),o=n(102),s=n(103),a=n(2),u=n(1),c=n(73);t.default=class{constructor(e){this.events=new i.default,this.rpc={infuraId:null==e?void 0:e.infuraId,custom:null==e?void 0:e.rpc},this.signer=new o.JsonRpcProvider(new c.SignerConnection(e));const t=this.signer.connection.chainId||(null==e?void 0:e.chainId)||1;this.http=this.setHttpProvider(t),this.registerEventListeners()}get connected(){return this.signer.connection.connected}get connector(){return this.signer.connection.connector}get accounts(){return this.signer.connection.accounts}get chainId(){return this.signer.connection.chainId}get rpcUrl(){var e;return(null===(e=this.http)||void 0===e?void 0:e.connection).url||""}request(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.method){case"eth_requestAccounts":return yield this.connect(),this.signer.connection.accounts;case"eth_accounts":return this.signer.connection.accounts;case"eth_chainId":return this.signer.connection.chainId}if(a.SIGNING_METHODS.includes(e.method))return this.signer.request(e);if(void 0===this.http)throw new Error(`Cannot request JSON-RPC method (${e.method}) without provided rpc url`);return this.http.request(e)}))}sendAsync(e,t){this.request(e).then((e=>t(null,e))).catch((e=>t(e,void 0)))}enable(){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.request({method:"eth_requestAccounts"})}))}connect(){return r.__awaiter(this,void 0,void 0,(function*(){this.signer.connection.connected||(yield this.signer.connect())}))}disconnect(){return r.__awaiter(this,void 0,void 0,(function*(){this.signer.connection.connected&&(yield this.signer.disconnect())}))}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}registerEventListeners(){this.signer.connection.on("accountsChanged",(e=>{this.events.emit("accountsChanged",e)})),this.signer.connection.on("chainChanged",(e=>{this.http=this.setHttpProvider(e),this.events.emit("chainChanged",e)})),this.signer.on("disconnect",(()=>{this.events.emit("disconnect")}))}setHttpProvider(e){const t=u.getRpcUrl(e,this.rpc);if(void 0!==t)return new o.JsonRpcProvider(new s.HttpConnection(t))}}},function(e,t,n){(function(e){function n(){return(null==e?void 0:e.crypto)||(null==e?void 0:e.msCrypto)||{}}function r(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=r,t.isBrowserCryptoAvailable=function(){return!!n()&&!!r()}}).call(this,n(18))},function(e,t,n){(function(e){function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function r(){return void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=r,t.isBrowser=function(){return!n()&&!r()}}).call(this,n(19))},function(e,t,n){t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(c(e,s,s+16383>a?a:s+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=c}return(d?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+d]=255&s,d+=p,s/=256,c-=8);e[n+d-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()))},function(e,t,n){var r=new RegExp("(%[a-f0-9]{2})|([^%]+?)","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function s(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=s(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var u=o[a];e=e.replace(new RegExp(u,"g"),t[u])}return e}(e)}}},function(e,t,n){e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignerConnection=void 0;const r=n(17),i=r.__importDefault(n(13)),o=r.__importDefault(n(100)),s=r.__importDefault(n(75)),a=n(20),u=n(7);class c extends a.IJsonRpcConnection{constructor(e){super(),this.events=new i.default,this.accounts=[],this.chainId=1,this.pending=!1,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModalOptions=void 0,this.opts=e,this.chainId=(null==e?void 0:e.chainId)||this.chainId,this.wc=this.register(e)}get connected(){return void 0!==this.wc&&this.wc.connected}get connecting(){return this.pending}get connector(){return this.wc=this.register(this.opts),this.wc}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}open(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.connected)return new Promise(((t,n)=>{this.on("error",(e=>{n(e)})),this.on("open",(()=>{t()})),this.create(e)}));this.onOpen()}))}close(){return r.__awaiter(this,void 0,void 0,(function*(){void 0!==this.wc&&(this.wc.connected&&this.wc.killSession(),this.onClose())}))}send(e){return r.__awaiter(this,void 0,void 0,(function*(){this.wc=this.register(this.opts),this.connected||(yield this.open()),this.sendPayload(e).then((e=>this.events.emit("payload",e))).catch((t=>this.events.emit("payload",u.formatJsonRpcError(e.id,t.message))))}))}register(e){if(this.wc)return this.wc;this.opts=e||this.opts,this.bridge=(null==e?void 0:e.connector)?e.connector.bridge:(null==e?void 0:e.bridge)||"https://bridge.walletconnect.org",this.qrcode=void 0===(null==e?void 0:e.qrcode)||!1!==e.qrcode,this.chainId=void 0!==(null==e?void 0:e.chainId)?e.chainId:this.chainId,this.qrcodeModalOptions=null==e?void 0:e.qrcodeModalOptions;const t={bridge:this.bridge,qrcodeModal:this.qrcode?s.default:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==e?void 0:e.storageId,signingMethods:null==e?void 0:e.signingMethods,clientMeta:null==e?void 0:e.clientMeta};if(this.wc=void 0!==(null==e?void 0:e.connector)?e.connector:new o.default(t),void 0===this.wc)throw new Error("Failed to register WalletConnect connector");return this.wc.accounts.length&&(this.accounts=this.wc.accounts),this.wc.chainId&&(this.chainId=this.wc.chainId),this.registerConnectorEvents(),this.wc}onOpen(e){this.pending=!1,e&&(this.wc=e),this.events.emit("open")}onClose(){this.pending=!1,this.wc&&(this.wc=void 0),this.events.emit("close")}onError(e,t="Failed or Rejected Request",n=-32e3){const r={id:e.id,jsonrpc:e.jsonrpc,error:{code:n,message:t}};return this.events.emit("payload",r),r}create(e){this.wc=this.register(this.opts),this.chainId=e||this.chainId,this.connected||this.pending||(this.pending=!0,this.registerConnectorEvents(),this.wc.createSession({chainId:this.chainId}).then((()=>this.events.emit("created"))).catch((e=>this.events.emit("error",e))))}registerConnectorEvents(){this.wc=this.register(this.opts),this.wc.on("connect",(e=>{var t,n;e?this.events.emit("error",e):(this.accounts=(null===(t=this.wc)||void 0===t?void 0:t.accounts)||[],this.chainId=(null===(n=this.wc)||void 0===n?void 0:n.chainId)||this.chainId,this.onOpen())})),this.wc.on("disconnect",(e=>{e?this.events.emit("error",e):this.onClose()})),this.wc.on("modal_closed",(()=>{this.events.emit("error",new Error("User closed modal"))})),this.wc.on("session_update",((e,t)=>{const{accounts:n,chainId:r}=t.params[0];(!this.accounts||n&&this.accounts!==n)&&(this.accounts=n,this.events.emit("accountsChanged",n)),(!this.chainId||r&&this.chainId!==r)&&(this.chainId=r,this.events.emit("chainChanged",r))}))}sendPayload(e){return r.__awaiter(this,void 0,void 0,(function*(){this.wc=this.register(this.opts);try{const t=yield this.wc.unsafeSend(e);return this.sanitizeResponse(t)}catch(t){return this.onError(e,t.message)}}))}sanitizeResponse(e){return void 0!==e.error&&void 0===e.error.code?u.formatJsonRpcError(e.id,e.error.message,e.error.data):e}}t.SignerConnection=c,t.default=c},function(e,t,n){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){(function(t){function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(1),o=r(n(76)),s=r(n(98)),a=n(101);function u(e){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function c(e){return a.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:"walletconnect-connect-button-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}function l(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function f(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick,s=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},r))}function h(e){var t=i.isAndroid(),n=a.useState(""),r=n[0],o=n[1],s=a.useState(""),u=s[0],h=s[1],d=a.useState(1),p=d[0],g=d[1],y=u?e.links.filter((function(e){return e.name.toLowerCase().includes(u.toLowerCase())})):e.links,v=e.errorMessage,m=u||y.length>5,_=Math.ceil(y.length/12),b=[12*(p-1)+1,12*p],w=y.length?y.filter((function(e,t){return t+1>=b[0]&&t+1<=b[1]})):[],E=!(t||!(_>1)),S=void 0;return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:function(e){o(e.target.value),clearTimeout(S),e.target.value?S=setTimeout((function(){h(e.target.value),g(1)}),1e3):(o(""),h(""),g(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":m&&y.length?"__wrap":"")},t?a.createElement(c,{name:e.text.connect,color:"rgb(64, 153, 255)",href:e.uri,onClick:a.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:e.uri})}),[])}):w.length?w.map((function(t){var n=t.color,r=t.name,o=t.shortName,s=t.logo,u=i.formatIOSMobile(e.uri,t),c=a.useCallback((function(){i.saveMobileLinkInfo({name:r,href:u})}),[w]);return m?a.createElement(f,{color:n,href:u,name:o||r,logo:s,onClick:c}):a.createElement(l,{color:n,href:u,name:r,logo:s,onClick:c})})):a.createElement(a.Fragment,null,a.createElement("p",null,v.length?e.errorMessage:e.links.length&&!y.length?e.text.no_wallets_found:e.text.loading))),E&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(_).fill(0).map((function(e,t){var n=t+1,r=p===n;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:r?"bold":"normal"},onClick:function(){return g(n)}},n)}))))}function d(e){var t=!!e.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}function p(e){var t=a.useState(""),n=t[0],r=t[1],i=a.useState(""),u=i[0],c=i[1];return a.useEffect((function(){try{return Promise.resolve(function(e){try{var t="";return Promise.resolve(o.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"==typeof e&&(t=e.replace("<svg",'<svg class="walletconnect-qrcode__image"')),t}))}catch(e){return Promise.reject(e)}}(e.uri)).then((function(e){c(e)}))}catch(e){Promise.reject(e)}}),[]),a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},e.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:u}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(e.uri)?(r(e.text.copied_to_clipboard),setInterval((function(){return r("")}),1200)):(r("Error"),setInterval((function(){return r("")}),1200))}},e.text.copy_to_clipboard)),a.createElement(d,{message:n}))}function g(e){var t=i.isAndroid(),n=i.isMobile(),r=n?e.qrcodeModalOptions&&e.qrcodeModalOptions.mobileLinks?e.qrcodeModalOptions.mobileLinks:void 0:e.qrcodeModalOptions&&e.qrcodeModalOptions.desktopLinks?e.qrcodeModalOptions.desktopLinks:void 0,o=a.useState(!1),s=o[0],c=o[1],l=a.useState(!1),f=l[0],d=l[1],g=a.useState(!n),y=g[0],v=g[1],m={mobile:n,text:e.text,uri:e.uri,qrcodeModalOptions:e.qrcodeModalOptions},_=a.useState(""),b=_[0],w=_[1],E=a.useState(!1),S=E[0],O=E[1],I=a.useState([]),x=I[0],R=I[1],k=a.useState(""),P=k[0],C=k[1],A=function(){f||s||r&&!r.length||x.length>0||a.useEffect((function(){!function(){try{if(t)return Promise.resolve();c(!0);var o=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(t)).then((function(t){return Promise.resolve(t.json()).then((function(t){var o=t.listings,s=n?"mobile":"desktop",a=i.getMobileLinkRegistry(i.formatMobileRegistry(o,s),r);c(!1),d(!0),C(a.length?"":e.text.no_supported_wallets),R(a);var u=1===a.length;u&&(w(i.formatIOSMobile(e.uri,a[0])),v(!0)),O(u)}))}))}),(function(t){c(!1),d(!0),C(e.text.something_went_wrong),console.error(t)}));Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}}()}))};A();var N=n?y:!y;return a.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(u,{onClose:e.onClose}),S&&y?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:x[0].name,href:b})},href:b,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(S?x[0].name:"")+" ›")):t||s||!s&&x.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(N?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return v(!1),A()}},e.text.mobile),a.createElement("a",{onClick:function(){return v(!0)}},e.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return v(!0)}},e.text.qrcode),a.createElement("a",{onClick:function(){return v(!1),A()}},e.text.desktop))):null,a.createElement("div",null,y||!t&&!s&&!x.length?a.createElement(p,Object.assign({},m)):a.createElement(h,Object.assign({},m,{links:x,errorMessage:P})))))}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var y={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function v(){var e=i.getDocumentOrThrow(),t=e.getElementById("walletconnect-qrcode-modal");t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById("walletconnect-wrapper");t&&e.body.removeChild(t)}),300))}function m(e){return function(){v(),e&&e()}}var _=function(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node},b={open:function(e,t,n){console.log(e),_()?function(e){o.toString(e,{type:"terminal"}).then(console.log)}(e):function(e,t,n){!function(){var e=i.getDocumentOrThrow(),t=e.getElementById("walletconnect-style-sheet");t&&e.head.removeChild(t);var n=e.createElement("style");n.setAttribute("id","walletconnect-style-sheet"),n.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',e.head.appendChild(n)}();var r,o=function(){var e=i.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id","walletconnect-wrapper"),e.body.appendChild(t),t}();a.render(a.createElement(g,{text:(r=i.getNavigatorOrThrow().language.split("-")[0]||"en",y[r]||y.en),uri:e,onClose:m(t),qrcodeModalOptions:n}),o)}(e,t,n)},close:function(){_()||v()}};e.exports=b}).call(this,n(19))},function(e,t,n){const r=n(77),i=n(78),o=n(96),s=n(97);function a(e,t,n,o,s){const a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=t,t=o=void 0):2!==u||t.getContext||(o=n,n=t,t=void 0),new Promise((function(r,s){try{const s=i.create(n,o);r(e(s,t,o))}catch(e){s(e)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=n,n=t,t=o=void 0):3===u&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=n,n=t,t=void 0));try{const r=i.create(n,o);s(null,e(r,t,o))}catch(e){s(e)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,n){return s.render(e,n)}))},function(e,t){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(e,t,n){const r=n(9),i=n(21),o=n(79),s=n(80),a=n(81),u=n(82),c=n(83),l=n(53),f=n(84),h=n(87),d=n(88),p=n(10),g=n(89);function y(e,t,n){const r=e.size,i=d.getEncodedBits(t,n);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(r-15+o,8,s,!0),o<8?e.set(8,r-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(r-8,8,1,!0)}function v(e,t,n){const i=new o;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)}));const s=8*(r.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let e=0;e<a;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),o=i-l.getTotalCodewordsCount(t,n),s=l.getBlocksCount(t,n),a=s-i%s,u=Math.floor(i/s),c=Math.floor(o/s),h=c+1,d=u-c,p=new f(d);let g=0;const y=new Array(s),v=new Array(s);let m=0;const _=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<a?c:h;y[e]=_.slice(g,g+t),v[e]=p.encode(y[e]),g+=t,m=Math.max(m,t)}const b=new Uint8Array(i);let w,E,S=0;for(w=0;w<m;w++)for(E=0;E<s;E++)w<y[E].length&&(b[S++]=y[E][w]);for(w=0;w<d;w++)for(E=0;E<s;E++)b[S++]=v[E][w];return b}(i,e,t)}function m(e,t,n,i){let o;if(Array.isArray(e))o=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=g.rawSplit(e);r=h.getBestVersionForData(t,n)}o=g.fromString(e,r||40)}}const l=h.getBestVersionForData(o,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else t=l;const f=v(t,n,o),d=r.getSymbolSize(t),p=new s(d);return function(e,t){const n=e.size,r=u.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],o=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,o+r,!0,!0):e.set(i+t,o+r,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(p),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(p,t),y(p,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,o,s;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+n-8-3,s=1==(r>>t&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(p,t),function(e,t){const n=e.size;let r=-1,i=n-1,o=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,a-n)){let r=!1;s<t.length&&(r=1==(t[s]>>>o&1)),e.set(i,a-n,r),o--,-1===o&&(s++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(p,f),isNaN(i)&&(i=c.getBestMask(p,y.bind(null,p,n))),c.applyMask(i,p),y(p,n,i),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:i,segments:o}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,o,s=i.M;return void 0!==t&&(s=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),o=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),m(e,n,s,o)}},function(e,t){function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},function(e,t){function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=n},function(e,t,n){const r=n(9).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),o=[n-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-i;return o.push(6),o.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}},function(e,t,n){const r=n(9).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,i=0,o=null,s=null;for(let a=0;a<t;a++){r=i=0,o=s=null;for(let u=0;u<t;u++){let t=e.get(a,u);t===o?r++:(r>=5&&(n+=r-5+3),o=t,r=1),t=e.get(u,a),t===s?i++:(i>=5&&(n+=i-5+3),s=t,i=1)}r>=5&&(n+=r-5+3),i>=5&&(n+=i-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return 3*n},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,i=0;for(let o=0;o<t;o++){r=i=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(o,s),s>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,t){const r=t.size;for(let i=0;i<r;i++)for(let o=0;o<r;o++)t.isReserved(o,i)||t.xor(o,i,n(e,o,i))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,o=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<o&&(o=r,i=s)}return i}},function(e,t,n){const r=n(85);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},function(e,t,n){const r=n(86);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<t.length;o++)n[i+o]^=r.mul(e[i],t[o]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},function(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},function(e,t,n){const r=n(9),i=n(53),o=n(21),s=n(10),a=n(54),u=r.getBCHDigit(7973);function c(e,t){return s.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const r=c(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);const o=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===s.MIXED)return o;const u=o-c(n,e);switch(n){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},t.getBestVersionForData=function(e,n){let r;const i=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(l(e,r)<=t.getCapacity(r,n,s.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-u>=0;)t^=7973<<r.getBCHDigit(t)-u;return e<<12|t}},function(e,t,n){const r=n(9),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},function(e,t,n){const r=n(10),i=n(90),o=n(91),s=n(92),a=n(94),u=n(55),c=n(9),l=n(95);function f(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){const t=h(u.NUMERIC,r.NUMERIC,e),n=h(u.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,o;return c.isKanjiModeEnabled()?(i=h(u.BYTE,r.BYTE,e),o=h(u.KANJI,r.KANJI,e)):(i=h(u.BYTE_KANJI,r.BYTE,e),o=[]),t.concat(n,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return o.getBitsLength(e);case r.KANJI:return a.getBitsLength(e);case r.BYTE:return s.getBitsLength(e)}}function g(e,t){let n;const u=r.getBestModeForData(e);if(n=r.from(t,u),n!==r.BYTE&&n.bit<u.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new o(e);case r.KANJI:return new a(e);case r.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e}),[])},t.fromString=function(e,n){const i=function(e,t){const n={},i={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],u=[];for(let e=0;e<a.length;e++){const c=a[e],l=""+s+e;u.push(l),n[l]={node:c,lastCount:0},i[l]={};for(let e=0;e<o.length;e++){const s=o[e];n[s]&&n[s].node.mode===c.mode?(i[s][l]=p(n[s].lastCount+c.length,c.mode)-p(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),i[s][l]=p(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}o=u}for(let e=0;e<o.length;e++)i[o[e]].end=0;return{map:i,table:n}}(function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:f(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:f(i.data)}])}}return t}(d(e,c.isKanjiModeEnabled())),n),o=l.find_path(i.map,"start","end"),s=[];for(let e=1;e<o.length-1;e++)s.push(i.table[o[e]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(d(e,c.isKanjiModeEnabled()))}},function(e,t,n){const r=n(10);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},function(e,t,n){const r=n(10),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=r.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},function(e,t,n){const r=n(93),i=n(10);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},function(e,t,n){e.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var o=e.charCodeAt(r+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,r+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},function(e,t,n){const r=n(10),i=n(9);function o(e){this.mode=r.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=o},function(e,t,n){var r={single_source_shortest_paths:function(e,t,n){var i={},o={};o[t]=0;var s,a,u,c,l,f,h,d=r.PriorityQueue.make();for(d.push(t,0);!d.empty();)for(u in a=(s=d.pop()).value,c=s.cost,l=e[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],h=o[u],(void 0===o[u]||h>f)&&(o[u]=f,d.push(u,f),i[u]=a));if(void 0!==n&&void 0===o[n]){var p=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,n){var i=r.single_source_shortest_paths(e,t,n);return r.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var t,n=r.PriorityQueue,i={};for(t in e=e||{},n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=r},function(e,t,n){const r=n(56);t.render=function(e,t,n){let i=n,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const s=r.getImageWidth(e.modules.size,i),a=o.getContext("2d"),u=a.createImageData(s,s);return r.qrToImageData(u.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(a,o,s),a.putImageData(u,0,0),o},t.renderToDataURL=function(e,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=t.render(e,n,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},function(e,t,n){const r=n(56);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const s=r.getOptions(t),a=e.modules.size,u=e.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+i(s.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,s=!1,a=0;for(let u=0;u<e.length;u++){const c=Math.floor(u%t),l=Math.floor(u/t);c||s||(s=!0),e[u]?(a++,u>0&&c>0&&e[u-1]||(r+=s?o("M",c+n,.5+l+n):o("m",i,0),i=0,s=!1),c+1<t&&e[u+1]||(r+=o("h",a),a=0)):i++}return r}(u,a,s.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof n&&n(null,d),d}},function(e,t,n){var r=n(99),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,s,a,u,c,l=!1;t||(t={}),n=t.debug||!1;try{if(s=r(),a=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),a.selectNodeContents(c),u.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(a):u.removeAllRanges()),c&&document.body.removeChild(c),s()}return l}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},function(e,t,n){n.r(t);var r={};n.r(r),n.d(r,"generateKey",(function(){return f})),n.d(r,"verifyHmac",(function(){return h})),n.d(r,"encrypt",(function(){return d})),n.d(r,"decrypt",(function(){return p}));var i=n(2),o=n(1),s=n(61);const a="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((e=>`https://${e}.bridge.walletconnect.org`));var u=class{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new class{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter((t=>t.event!==e))}trigger(e){let t,n=[];t=Object(o.isJsonRpcRequest)(e)?e.method:Object(o.isJsonRpcResponseSuccess)(e)||Object(o.isJsonRpcResponseError)(e)?"response:"+e.id:Object(o.isInternalEvent)(e)?e.event:"",t&&(n=this._eventEmitters.filter((e=>e.event===t))),n&&n.length||Object(o.isReservedEvent)(t)||Object(o.isInternalEvent)(t)||(n=this._eventEmitters.filter((e=>"call_request"===e.event))),n.forEach((t=>{if(Object(o.isJsonRpcResponseError)(e)){const n=new Error(e.error.message);t.callback(n,null)}else t.callback(null,e)}))}},this._clientMeta=Object(o.getClientMeta)()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new class{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const t=Object(o.getLocal)(this.storageId);return t&&Object(o.isWalletConnectSession)(t)&&(e=t),e}setSession(e){return Object(o.setLocal)(this.storageId,e),e}removeSession(){Object(o.removeLocal)(this.storageId)}}(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...i.SIGNING_METHODS,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(i.ERROR_MISSING_REQUIRED);var t;e.connectorOpts.bridge&&(this.bridge=function(e){return"walletconnect.org"===function(e){return function(e){let t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return t=t.split(":")[0],t=t.split("?")[0],t}(e).split(".").slice(-2).join(".")}(e)}(t=e.connectorOpts.bridge)?a[Math.floor(Math.random()*a.length)]:t),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new s.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const t=Object(o.convertHexToArrayBuffer)(e);this._key=t}get key(){return this._key?Object(o.convertArrayBufferToHex)(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Object(o.uuid)()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=Object(o.getClientMeta)()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:t,bridge:n,key:r}=this._parseUri(e);this.handshakeTopic=t,this.bridge=n,this.key=r}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,t){const n={event:e,callback:t};this._eventManager.subscribe(n)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const t=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=t.id,this.handshakeTopic=Object(o.uuid)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(i.ERROR_QRCODE_MODAL_USER_CLOSED)}));const n=()=>{this.killSession()};try{const e=await this._sendCallRequest(t);return e&&n(),e}catch(e){throw n(),e}}async connect(e){if(!this._qrcodeModal)throw new Error(i.ERROR_QRCODE_MODAL_NOT_PROVIDED);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise((async(e,t)=>{this.on("modal_closed",(()=>t(new Error(i.ERROR_QRCODE_MODAL_USER_CLOSED)))),this.on("connect",((n,r)=>{if(n)return t(n);e(r.params[0])}))})))}async createSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);if(this.pending)return;this._key=await this._generateKey();const t=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=t.id,this.handshakeTopic=Object(o.uuid)(),this._sendSessionRequest(t,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:t};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(i.ERROR_SESSION_CONNECTED);const t=e&&e.message?e.message:i.ERROR_SESSION_REJECTED,n=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[t]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const t=e?e.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(n),this._handleSessionDisconnect(t)}async sendTransaction(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=e,n=this._formatRequest({method:"eth_sendTransaction",params:[t]});return await this._sendCallRequest(n)}async signTransaction(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=e,n=this._formatRequest({method:"eth_signTransaction",params:[t]});return await this._sendCallRequest(n)}async signMessage(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(t)}async signPersonalMessage(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(t)}async signTypedData(e){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);const t=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(t)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const t=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(t)}unsafeSend(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise(((t,n)=>{this._subscribeToResponse(e.id,((e,r)=>{if(e)n(e);else{if(!r)throw new Error(i.ERROR_MISSING_JSON_RPC);t(r)}}))}))}async sendCustomRequest(e,t){if(!this._connected)throw new Error(i.ERROR_SESSION_DISCONNECTED);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return Object(o.convertNumberToHex)(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":case"personal_sign":e.params}const n=this._formatRequest(e);return await this._sendCallRequest(n,t)}approveRequest(e){if(!Object(o.isJsonRpcResponseSuccess)(e))throw new Error(i.ERROR_MISSING_RESULT);{const t=this._formatResponse(e);this._sendResponse(t)}}rejectRequest(e){if(!Object(o.isJsonRpcResponseError)(e))throw new Error(i.ERROR_MISSING_ERROR);{const t=this._formatResponse(e);this._sendResponse(t)}}transportClose(){this._transport.close()}async _sendRequest(e,t){const n=this._formatRequest(e),r=await this._encrypt(n),i=void 0!==(null==t?void 0:t.topic)?t.topic:this.peerId,s=JSON.stringify(r),a=void 0!==(null==t?void 0:t.forcePushNotification)?!t.forcePushNotification:Object(o.isSilentPayload)(n);this._transport.send(s,i,a)}async _sendResponse(e){const t=await this._encrypt(e),n=this.peerId,r=JSON.stringify(t);this._transport.send(r,n,!0)}async _sendSessionRequest(e,t,n){this._sendRequest(e,n),this._subscribeToSessionResponse(e.id,t)}_sendCallRequest(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(void 0===e.method)throw new Error(i.ERROR_MISSING_METHOD);return{id:void 0===e.id?Object(o.payloadId)():e.id,jsonrpc:"2.0",method:e.method,params:void 0===e.params?[]:e.params}}_formatResponse(e){if(void 0===e.id)throw new Error(i.ERROR_MISSING_ID);const t={id:e.id,jsonrpc:"2.0"};if(Object(o.isJsonRpcResponseError)(e)){const n=Object(o.formatRpcError)(e.error);return Object.assign(Object.assign(Object.assign({},t),e),{error:n})}if(Object(o.isJsonRpcResponseSuccess)(e))return Object.assign(Object.assign({},t),e);throw new Error(i.ERROR_INVALID_RESPONSE)}_handleSessionDisconnect(e){const t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(o.removeLocal)(i.MOBILE_LINK_CHOICE_KEY)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let t;try{t=JSON.parse(e.payload)}catch(e){return}const n=await this._decrypt(t);n&&this._eventManager.trigger(n)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,t){this.on("response:"+e,t)}_subscribeToSessionResponse(e,t){this._subscribeToResponse(e,((e,n)=>{e?this._handleSessionResponse(e.message):Object(o.isJsonRpcResponseSuccess)(n)?this._handleSessionResponse(t,n.result):n.error&&n.error.message?this._handleSessionResponse(n.error.message):this._handleSessionResponse(t)}))}_subscribeToCallResponse(e){return new Promise(((t,n)=>{this._subscribeToResponse(e,((e,r)=>{e?n(e):Object(o.isJsonRpcResponseSuccess)(r)?t(r.result):r.error&&r.error.message?n(r.error):n(new Error(i.ERROR_INVALID_RESPONSE))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((e,t)=>{const{request:n}=t.params[0];if(Object(o.isMobile)()&&this._signingMethods.includes(n.method)){const e=Object(o.getLocal)(i.MOBILE_LINK_CHOICE_KEY);e&&(window.location.href=e.href)}})),this.on("wc_sessionRequest",((e,t)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=t.id,this.peerId=t.params[0].peerId,this.peerMeta=t.params[0].peerMeta;const n=Object.assign(Object.assign({},t),{method:"session_request"});this._eventManager.trigger(n)})),this.on("wc_sessionUpdate",((e,t)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",t.params[0])}))}_initTransport(){this._transport.on("message",(e=>this._handleIncomingMessages(e))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(e){const t=Object(o.parseWalletConnectUri)(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const e=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");const n=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:e,bridge:n,key:t.key}}throw new Error(i.ERROR_INVALID_URI)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.encrypt(e,t):null}async _decrypt(e){const t=this._key;return this._cryptoLib&&t?await this._cryptoLib.decrypt(e,t):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||"string"!=typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!=typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!=typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",(async(n,r)=>{if(n)throw n;if(e.peerMeta){const e=r.params[0].peerMeta.name;t.peerName=e}try{const n=await fetch(e.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});if(!(await n.json()).success)throw Error("Failed to register in Push Server")}catch(n){throw Error("Failed to register in Push Server")}}))}},c=n(14),l=n(0);async function f(e){const t=(e||256)/8,n=c.randomBytes(t);return Object(o.convertBufferToArrayBuffer)(l.b(n))}async function h(e,t){const n=l.n(e.data),r=l.n(e.iv),i=l.n(e.hmac),o=l.c(i,!1),s=l.j(n,r),a=await c.hmacSha256Sign(t,s),u=l.c(a,!1);return l.A(o)===l.A(u)}async function d(e,t,n){const r=l.f(Object(o.convertArrayBufferToBuffer)(t)),i=n||await f(128),s=l.f(Object(o.convertArrayBufferToBuffer)(i)),a=l.c(s,!1),u=JSON.stringify(e),h=l.C(u),d=await c.aesCbcEncrypt(s,r,h),p=l.c(d,!1),g=l.j(d,s),y=await c.hmacSha256Sign(r,g);return{data:p,hmac:l.c(y,!1),iv:a}}async function p(e,t){const n=l.f(Object(o.convertArrayBufferToBuffer)(t));if(!n)throw new Error("Missing key: required for decryption");if(!await h(e,n))return null;const r=l.n(e.data),i=l.n(e.iv),s=await c.aesCbcDecrypt(i,n,r),a=l.e(s);let u;try{u=JSON.parse(a)}catch(e){return null}return u}t.default=class extends u{constructor(e,t){super({cryptoLib:r,connectorOpts:e,pushServerOpts:t})}}},function(e,t,n){n.r(t),n.d(t,"Component",(function(){return O})),n.d(t,"Fragment",(function(){return _})),n.d(t,"createContext",(function(){return V})),n.d(t,"createElement",(function(){return y})),n.d(t,"createRef",(function(){return m})),n.d(t,"useCallback",(function(){return fe})),n.d(t,"useContext",(function(){return he})),n.d(t,"useDebugValue",(function(){return de})),n.d(t,"useEffect",(function(){return se})),n.d(t,"useErrorBoundary",(function(){return pe})),n.d(t,"useId",(function(){return ge})),n.d(t,"useImperativeHandle",(function(){return ce})),n.d(t,"useLayoutEffect",(function(){return ae})),n.d(t,"useMemo",(function(){return le})),n.d(t,"useReducer",(function(){return oe})),n.d(t,"useRef",(function(){return ue})),n.d(t,"useState",(function(){return ie})),n.d(t,"Children",(function(){return Ne})),n.d(t,"PureComponent",(function(){return xe})),n.d(t,"StrictMode",(function(){return ht})),n.d(t,"Suspense",(function(){return Le})),n.d(t,"SuspenseList",(function(){return De})),n.d(t,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return rt})),n.d(t,"cloneElement",(function(){return at})),n.d(t,"createFactory",(function(){return ot})),n.d(t,"createPortal",(function(){return He})),n.d(t,"default",(function(){return mt})),n.d(t,"findDOMNode",(function(){return ct})),n.d(t,"flushSync",(function(){return ft})),n.d(t,"forwardRef",(function(){return Ce})),n.d(t,"hydrate",(function(){return Ge})),n.d(t,"isValidElement",(function(){return st})),n.d(t,"lazy",(function(){return Ue})),n.d(t,"memo",(function(){return Re})),n.d(t,"render",(function(){return Ke})),n.d(t,"startTransition",(function(){return dt})),n.d(t,"unmountComponentAtNode",(function(){return ut})),n.d(t,"unstable_batchedUpdates",(function(){return lt})),n.d(t,"useDeferredValue",(function(){return pt})),n.d(t,"useInsertionEffect",(function(){return yt})),n.d(t,"useSyncExternalStore",(function(){return vt})),n.d(t,"useTransition",(function(){return gt})),n.d(t,"version",(function(){return it}));var r,i,o,s,a,u,c,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return v(e,a,i,o,null)}function v(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(a),a}function m(){return{current:null}}function _(e){return e.children}function b(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function w(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||b(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||b(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?S:E,o):e.removeEventListener(t,o?S:E,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function E(e){s=!0;try{return this.l[e.type+!1](i.event?i.event(e):e)}finally{s=!1}}function S(e){s=!0;try{return this.l[e.type+!0](i.event?i.event(e):e)}finally{s=!1}}function O(e,t){this.props=e,this.context=t}function I(e,t){if(null==t)return e.__?I(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?I(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function R(e){s?setTimeout(e):c(e)}function k(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!P.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||R)(P)}function P(){var e,t,n,r,i,o,s,u;for(a.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=a.shift();)e.__d&&(t=a.length,r=void 0,i=void 0,s=(o=(n=e).__v).__e,(u=n.__P)&&(r=[],(i=p({},o)).__v=o.__v+1,L(u,o,i,n.__n,void 0!==u.ownerSVGElement,null!=o.__h?[s]:null,r,null==s?I(o):s,o.__h),j(r,o),o.__e!=s&&x(o)),a.length>t&&a.sort((function(e,t){return e.__v.__b-t.__v.__b})));P.__r=0}function C(e,t,n,r,i,o,s,a,u,c){var l,d,p,g,y,m,b,w=r&&r.__k||h,E=w.length;for(n.__k=[],l=0;l<t.length;l++)if(null!=(g=n.__k[l]=null==(g=t[l])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?v(null,g,null,null,g):Array.isArray(g)?v(_,{children:g},null,null,null):g.__b>0?v(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)){if(g.__=n,g.__b=n.__b+1,null===(p=w[l])||p&&g.key==p.key&&g.type===p.type)w[l]=void 0;else for(d=0;d<E;d++){if((p=w[d])&&g.key==p.key&&g.type===p.type){w[d]=void 0;break}p=null}L(e,g,p=p||f,i,o,s,a,u,c),y=g.__e,(d=g.ref)&&p.ref!=d&&(b||(b=[]),p.ref&&b.push(p.ref,null,g),b.push(d,g.__c||y,g)),null!=y?(null==m&&(m=y),"function"==typeof g.type&&g.__k===p.__k?g.__d=u=A(g,u,e):u=T(e,g,p,w,y,u),"function"==typeof n.type&&(n.__d=u)):u&&p.__e==u&&u.parentNode!=e&&(u=I(p))}for(n.__e=m,l=E;l--;)null!=w[l]&&("function"==typeof n.type&&null!=w[l].__e&&w[l].__e==n.__d&&(n.__d=M(r).nextSibling),z(w[l],w[l]));if(b)for(l=0;l<b.length;l++)D(b[l],b[++l],b[++l])}function A(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?A(r,t,n):T(n,r,r,i,r.__e,t));return t}function N(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){N(e,t)})):t.push(e)),t}function T(e,t,n,r,i,o){var s,a,u;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,u=0;(a=a.nextSibling)&&u<r.length;u+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function M(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=M(n)))return r;return null}function L(e,t,n,r,o,s,a,u,c){var l,f,h,d,g,y,v,m,b,w,E,S,I,x,R,k=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,u=t.__e=n.__e,t.__h=null,s=[u]),(l=i.__b)&&l(t);try{e:if("function"==typeof k){if(m=t.props,b=(l=k.contextType)&&r[l.__c],w=l?b?b.props.value:l.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:("prototype"in k&&k.prototype.render?t.__c=f=new k(m,w):(t.__c=f=new O(m,w),f.constructor=k,f.render=F),b&&b.sub(f),f.props=m,f.state||(f.state={}),f.context=w,f.__n=r,h=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=k.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,k.getDerivedStateFromProps(m,f.__s))),d=f.props,g=f.state,f.__v=t,h)null==k.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==k.getDerivedStateFromProps&&m!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(m,w),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(m,f.__s,w)||t.__v===n.__v){for(t.__v!==n.__v&&(f.props=m,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(m,f.__s,w),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(d,g,y)}))}if(f.context=w,f.props=m,f.__P=e,S=i.__r,I=0,"prototype"in k&&k.prototype.render){for(f.state=f.__s,f.__d=!1,S&&S(t),l=f.render(f.props,f.state,f.context),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[]}else do{f.__d=!1,S&&S(t),l=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++I<25);f.state=f.__s,null!=f.getChildContext&&(r=p(p({},r),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(y=f.getSnapshotBeforeUpdate(d,g)),R=null!=l&&l.type===_&&null==l.key?l.props.children:l,C(e,Array.isArray(R)?R:[R],t,n,r,o,s,a,u,c),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),v&&(f.__E=f.__=null),f.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=U(n.__e,t,n,r,o,s,a,c);(l=i.diffed)&&l(t)}catch(e){t.__v=null,(c||null!=s)&&(t.__e=u,t.__h=!!c,s[s.indexOf(u)]=null),i.__e(e,t,n)}}function j(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function U(e,t,n,i,o,s,a,u){var c,l,h,d=n.props,p=t.props,y=t.type,v=0;if("svg"===y&&(o=!0),null!=s)for(;v<s.length;v++)if((c=s[v])&&"setAttribute"in c==!!y&&(y?c.localName===y:3===c.nodeType)){e=c,s[v]=null;break}if(null==e){if(null===y)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,p.is&&p),s=null,u=!1}if(null===y)d===p||u&&e.data===p||(e.data=p);else{if(s=s&&r.call(e.childNodes),l=(d=n.props||f).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!u){if(null!=s)for(d={},v=0;v<e.attributes.length;v++)d[e.attributes[v].name]=e.attributes[v].value;(h||l)&&(h&&(l&&h.__html==l.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||w(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||w(e,o,t[o],n[o],r)}(e,p,d,o,u),h)t.__k=[];else if(v=t.props.children,C(e,Array.isArray(v)?v:[v],t,n,i,o&&"foreignObject"!==y,s,a,s?s[0]:n.__k&&I(n,0),u),null!=s)for(v=s.length;v--;)null!=s[v]&&g(s[v]);u||("value"in p&&void 0!==(v=p.value)&&(v!==e.value||"progress"===y&&!v||"option"===y&&v!==d.value)&&w(e,"value",v,d.value,!1),"checked"in p&&void 0!==(v=p.checked)&&v!==e.checked&&w(e,"checked",v,d.checked,!1))}return e}function D(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function z(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||D(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&z(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||g(e.__e),e.__=e.__e=e.__d=void 0}function F(e,t,n){return this.constructor(e,n)}function B(e,t,n){var o,s,a;i.__&&i.__(e,t),s=(o="function"==typeof n)?null:n&&n.__k||t.__k,a=[],L(t,e=(!o&&n||t).__k=y(_,null,[e]),s||f,f,void 0!==t.ownerSVGElement,!o&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!o&&n?n:s?s.__e:t.firstChild,o),j(a,e)}function H(e,t){B(e,t,H)}function q(e,t,n){var i,o,s,a=p({},e.props);for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];return arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),v(e.type,a,i||e.key,o||e.ref,null)}function V(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(k)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=h.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,s=!1,O.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},n),this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},O.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},O.prototype.render=_,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0,l=0;var $,W,K,G,Y=0,Q=[],J=[],X=i.__b,Z=i.__r,ee=i.diffed,te=i.__c,ne=i.unmount;function re(e,t){i.__h&&i.__h(W,e,Y||t),Y=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:J}),n.__[e]}function ie(e){return Y=1,oe(Ee,e)}function oe(e,t,n){var r=re($++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ee(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.u)){W.u=!0;var i=W.shouldComponentUpdate;W.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function se(e,t){var n=re($++,3);!i.__s&&we(n.__H,t)&&(n.__=e,n.i=t,W.__H.__h.push(n))}function ae(e,t){var n=re($++,4);!i.__s&&we(n.__H,t)&&(n.__=e,n.i=t,W.__h.push(n))}function ue(e){return Y=5,le((function(){return{current:e}}),[])}function ce(e,t,n){Y=6,ae((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function le(e,t){var n=re($++,7);return we(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function fe(e,t){return Y=8,le((function(){return e}),t)}function he(e){var t=W.context[e.__c],n=re($++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(W)),t.props.value):e.__}function de(e,t){i.useDebugValue&&i.useDebugValue(t?t(e):e)}function pe(e){var t=re($++,10),n=ie();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function ge(){var e=re($++,11);if(!e.__){for(var t=W.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ye(){for(var e;e=Q.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(be),e.__H.__h=[]}catch(t){e.__H.__h=[],i.__e(t,e.__v)}}i.__b=function(e){W=null,X&&X(e)},i.__r=function(e){Z&&Z(e),$=0;var t=(W=e.__c).__H;t&&(K===W?(t.__h=[],W.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=J,e.__N=e.i=void 0}))):(t.__h.forEach(_e),t.__h.forEach(be),t.__h=[])),K=W},i.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&G===i.requestAnimationFrame||((G=i.requestAnimationFrame)||me)(ye)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==J&&(e.__=e.__V),e.i=void 0,e.__V=J}))),K=W=null},i.__c=function(e,t){t.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||be(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],i.__e(n,e.__v)}})),te&&te(e,t)},i.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{_e(e)}catch(e){t=e}})),n.__H=void 0,t&&i.__e(t,n.__v))};var ve="function"==typeof requestAnimationFrame;function me(e){var t,n=function(){clearTimeout(r),ve&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ve&&(t=requestAnimationFrame(n))}function _e(e){var t=W,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),W=t}function be(e){var t=W;e.__c=e.__(),W=t}function we(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ee(e,t){return"function"==typeof t?t(e):t}function Se(e,t){for(var n in t)e[n]=t[n];return e}function Oe(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ie(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function xe(e){this.props=e}function Re(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Oe(this.props,e)}function r(t){return this.shouldComponentUpdate=n,y(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(xe.prototype=new O).isPureReactComponent=!0,xe.prototype.shouldComponentUpdate=function(e,t){return Oe(this.props,e)||Oe(this.state,t)};var ke=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ke&&ke(e)};var Pe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=Se({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Pe,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ae=function(e,t){return null==e?null:N(N(e).map(t))},Ne={map:Ae,forEach:Ae,count:function(e){return e?N(e).length:0},only:function(e){var t=N(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:N},Te=i.__e;i.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Te(e,t,n,r)};var Me=i.unmount;function Le(){this.__u=0,this.t=null,this.__b=null}function je(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ue(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return y(n,i)}return i.displayName="Lazy",i.__f=!0,i}function De(){this.u=null,this.o=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Me&&Me(e)},(Le.prototype=new O).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=je(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},u=!0===t.__h;r.__u++||u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Le.prototype.componentWillUnmount=function(){this.t=[]},Le.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=Se({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&y(_,null,e.fallback);return i&&(i.__h=null),[y(_,null,t.__a?null:e.children),i]};var ze=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Fe(e){return this.getChildContext=function(){return e.context},e.children}function Be(e){var t=this,n=e.i;t.componentWillUnmount=function(){B(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),B(y(Fe,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function He(e,t){var n=y(Be,{__v:e,i:t});return n.containerInfo=t,n}(De.prototype=new O).__a=function(e){var t=this,n=je(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ze(t,e,r)):i()};n?n(o):o()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=N(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ze(e,n,t)}))};var qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ve=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$e="undefined"!=typeof document,We=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ke(e,t,n){return null==t.__k&&(t.textContent=""),B(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ge(e,t,n){return H(e,t),"function"==typeof n&&n(),e?e.__c:null}O.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(O.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ye=i.event;function Qe(){}function Je(){return this.cancelBubble}function Xe(){return this.defaultPrevented}i.event=function(e){return Ye&&(e=Ye(e)),e.persist=Qe,e.isPropagationStopped=Je,e.isDefaultPrevented=Xe,e.nativeEvent=e};var Ze,et={configurable:!0,get:function(){return this.class}},tt=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];$e&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!We(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Ve.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=N(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=N(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(et.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",et))}e.$$typeof=qe,tt&&tt(e)};var nt=i.__r;i.__r=function(e){nt&&nt(e),Ze=e.__c};var rt={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},it="17.0.2";function ot(e){return y.bind(null,e)}function st(e){return!!e&&e.$$typeof===qe}function at(e){return st(e)?q.apply(null,arguments):e}function ut(e){return!!e.__k&&(B(null,e),!0)}function ct(e){return e&&(e.base||1===e.nodeType&&e)||null}var lt=function(e,t){return e(t)},ft=function(e,t){return e(t)},ht=_;function dt(e){e()}function pt(e){return e}function gt(){return[!1,dt]}var yt=ae;function vt(e,t){var n=t(),r=ie({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ae((function(){i.__=n,i.v=t,Ie(i.__,t())||o({h:i})}),[e,n,t]),se((function(){return Ie(i.__,i.v())||o({h:i}),e((function(){Ie(i.__,i.v())||o({h:i})}))}),[e]),n}var mt={useState:ie,useId:ge,useReducer:oe,useEffect:se,useLayoutEffect:ae,useInsertionEffect:ae,useTransition:gt,useDeferredValue:pt,useSyncExternalStore:vt,startTransition:dt,useRef:ue,useImperativeHandle:ce,useMemo:le,useCallback:fe,useContext:he,useDebugValue:de,version:"17.0.2",Children:Ne,render:Ke,hydrate:Ge,unmountComponentAtNode:ut,createPortal:He,createElement:y,createContext:V,createFactory:ot,cloneElement:at,createRef:m,Fragment:_,isValidElement:st,findDOMNode:ct,Component:O,PureComponent:xe,memo:Re,forwardRef:Ce,flushSync:ft,unstable_batchedUpdates:lt,StrictMode:_,Suspense:Le,SuspenseList:De,lazy:Ue,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rt}},function(e,t,n){n.r(t),n.d(t,"JsonRpcProvider",(function(){return o}));var r=n(13),i=n(7);class o extends i.IJsonRpcProvider{constructor(e){super(e),this.events=new r.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Object(i.formatJsonRpcRequest)(e.method,e.params||[]),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(""+e.id,(e=>{Object(i.isJsonRpcError)(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Object(i.isJsonRpcResponse)(e)?this.events.emit(""+e.id,e):this.events.emit("message",{type:e.method,data:e.params})}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(()=>this.events.emit("disconnect"))),this.connection.on("error",(e=>this.events.emit("error",e))),this.hasRegisteredEventListeners=!0)}}var s=o;t.default=s},function(e,t,n){n.r(t),n.d(t,"HttpConnection",(function(){return c}));var r=n(13),i=n(23),o=n.n(i),s=n(12),a=n(7);const u={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class c{constructor(e){if(this.url=e,this.events=new r.EventEmitter,this.isAvailable=!1,this.registering=!1,!Object(a.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: "+e);this.url=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=Object(s.b)(e),n=await o()(this.url,Object.assign(Object.assign({},u),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Object(a.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: "+e);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{const t=Object(s.b)({id:1,jsonrpc:"2.0",method:"test",params:[]});await o()(e,Object.assign(Object.assign({},u),{body:t})),this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?Object(s.a)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=n.message||n.toString(),i=Object(a.formatJsonRpcError)(e,r);this.events.emit("payload",i)}parseError(e,t=this.url){return Object(a.parseConnectionError)(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}var l=c;t.default=l}])}(h);var d,p=l(h.exports),g={exports:{}},y={},v={exports:{}},m={};!function(e){e.exports=function(){if(d)return m;d=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),f=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function v(){}function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var b=_.prototype=new v;b.constructor=_,p(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,E=Object.prototype.hasOwnProperty,S={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function I(t,n,r){var i,o={},s=null,a=null;if(null!=n)for(i in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(s=""+n.key),n)E.call(n,i)&&!O.hasOwnProperty(i)&&(o[i]=n[i]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:e,type:t,key:s,ref:a,props:o,_owner:S.current}}function x(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var R=/\/+/g;function k(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(n,r,i,o,s){var a=typeof n;"undefined"!==a&&"boolean"!==a||(n=null);var u=!1;if(null===n)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case e:case t:u=!0}}if(u)return s=s(u=n),n=""===o?"."+k(u,0):o,w(s)?(i="",null!=n&&(i=n.replace(R,"$&/")+"/"),P(s,r,i,"",(function(e){return e}))):null!=s&&(x(s)&&(s=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(s,i+(!s.key||u&&u.key===s.key?"":(""+s.key).replace(R,"$&/")+"/")+n)),r.push(s)),1;if(u=0,o=""===o?".":o+":",w(n))for(var c=0;c<n.length;c++){var l=o+k(a=n[c],c);u+=P(a,r,i,l,s)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(n),"function"==typeof l)for(n=l.call(n),c=0;!(a=n.next()).done;)u+=P(a=a.value,r,i,l=o+k(a,c++),s);else if("object"===a)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return u}function C(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},T={transition:null},M={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:T,ReactCurrentOwner:S};return m.Children={map:C,forEach:function(e,t,n){C(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return C(e,(function(){t++})),t},toArray:function(e){return C(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},m.Component=y,m.Fragment=n,m.Profiler=i,m.PureComponent=_,m.StrictMode=r,m.Suspense=u,m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,m.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=p({},t.props),o=t.key,s=t.ref,a=t._owner;if(null!=n){if(void 0!==n.ref&&(s=n.ref,a=S.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(c in n)E.call(n,c)&&!O.hasOwnProperty(c)&&(i[c]=void 0===n[c]&&void 0!==u?u[c]:n[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){u=Array(c);for(var l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}return{$$typeof:e,type:t.type,key:o,ref:s,props:i,_owner:a}},m.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},m.createElement=I,m.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},m.createRef=function(){return{current:null}},m.forwardRef=function(e){return{$$typeof:a,render:e}},m.isValidElement=x,m.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:A}},m.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},m.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},m.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},m.useCallback=function(e,t){return N.current.useCallback(e,t)},m.useContext=function(e){return N.current.useContext(e)},m.useDebugValue=function(){},m.useDeferredValue=function(e){return N.current.useDeferredValue(e)},m.useEffect=function(e,t){return N.current.useEffect(e,t)},m.useId=function(){return N.current.useId()},m.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},m.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},m.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},m.useMemo=function(e,t){return N.current.useMemo(e,t)},m.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},m.useRef=function(e){return N.current.useRef(e)},m.useState=function(e){return N.current.useState(e)},m.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},m.useTransition=function(){return N.current.useTransition()},m.version="18.2.0",m}()}(v);var _,b=l(v.exports); /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */!function(e){e.exports=function(){if(_)return y;_=1;var e=v.exports,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,s){var a,u={},c=null,l=null;for(a in void 0!==s&&(c=""+s),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(l=n.ref),n)r.call(n,a)&&!o.hasOwnProperty(a)&&(u[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===u[a]&&(u[a]=n[a]);return{$$typeof:t,type:e,key:c,ref:l,props:u,_owner:i.current}}return y.Fragment=n,y.jsx=s,y.jsxs=s,y}()}(g);var w,E={exports:{}},S={};function O(e){function t(e,r,u,c,h){for(var d,p,g,y,b,E=0,S=0,O=0,I=0,x=0,N=0,M=g=d=0,j=0,U=0,D=0,z=0,F=u.length,B=F-1,H="",q="",V="",$="";j<F;){if(p=u.charCodeAt(j),j===B&&0!==S+I+O+E&&(0!==S&&(p=47===S?10:47),I=O=E=0,F++,B++),0===S+I+O+E){if(j===B&&(0<U&&(H=H.replace(f,"")),0<H.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:H+=u.charAt(j)}p=59}switch(p){case 123:for(d=(H=H.trim()).charCodeAt(0),g=1,z=++j;j<F;){switch(p=u.charCodeAt(j)){case 123:g++;break;case 125:g--;break;case 47:switch(p=u.charCodeAt(j+1)){case 42:case 47:e:{for(M=j+1;M<B;++M)switch(u.charCodeAt(M)){case 47:if(42===p&&42===u.charCodeAt(M-1)&&j+2!==M){j=M+1;break e}break;case 10:if(47===p){j=M+1;break e}}j=M}}break;case 91:p++;case 40:p++;case 34:case 39:for(;j++<B&&u.charCodeAt(j)!==p;);}if(0===g)break;j++}if(g=u.substring(z,j),0===d&&(d=(H=H.replace(l,"").trim()).charCodeAt(0)),64===d){switch(0<U&&(H=H.replace(f,"")),p=H.charCodeAt(1)){case 100:case 109:case 115:case 45:U=r;break;default:U=A}if(z=(g=t(r,U,g,p,h+1)).length,0<T&&(b=a(3,g,U=n(A,H,D),r,k,R,z,p,h,c),H=U.join(""),void 0!==b&&0===(z=(g=b.trim()).length)&&(p=0,g="")),0<z)switch(p){case 115:H=H.replace(w,s);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(v,"$1 $2"))+"{"+g+"}",g=1===C||2===C&&o("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===c&&(q+=g,g="")}else g=""}else g=t(r,n(r,H,D),g,c,h+1);V+=g,g=D=U=M=d=0,H="",p=u.charCodeAt(++j);break;case 125:case 59:if(1<(z=(H=(0<U?H.replace(f,""):H).trim()).length))switch(0===M&&(d=H.charCodeAt(0),45===d||96<d&&123>d)&&(z=(H=H.replace(" ",":")).length),0<T&&void 0!==(b=a(1,H,r,e,k,R,q.length,c,h,c))&&0===(z=(H=b.trim()).length)&&(H="\0\0"),d=H.charCodeAt(0),p=H.charCodeAt(1),d){case 0:break;case 64:if(105===p||99===p){$+=H+u.charAt(j);break}default:58!==H.charCodeAt(z-1)&&(q+=i(H,d,p,H.charCodeAt(2)))}D=U=M=d=0,H="",p=u.charCodeAt(++j)}}switch(p){case 13:case 10:47===S?S=0:0===1+d&&107!==c&&0<H.length&&(U=1,H+="\0"),0<T*L&&a(0,H,r,e,k,R,q.length,c,h,c),R=1,k++;break;case 59:case 125:if(0===S+I+O+E){R++;break}default:switch(R++,y=u.charAt(j),p){case 9:case 32:if(0===I+E+S)switch(x){case 44:case 58:case 9:case 32:y="";break;default:32!==p&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===I+S+E&&(U=D=1,y="\f"+y);break;case 108:if(0===I+S+E+P&&0<M)switch(j-M){case 2:112===x&&58===u.charCodeAt(j-3)&&(P=x);case 8:111===N&&(P=N)}break;case 58:0===I+S+E&&(M=j);break;case 44:0===S+O+I+E&&(U=1,y+="\r");break;case 34:case 39:0===S&&(I=I===p?0:0===I?p:I);break;case 91:0===I+S+O&&E++;break;case 93:0===I+S+O&&E--;break;case 41:0===I+S+E&&O--;break;case 40:0===I+S+E&&(0===d&&(2*x+3*N==533||(d=1)),O++);break;case 64:0===S+O+I+E+M+g&&(g=1);break;case 42:case 47:if(!(0<I+E+O))switch(S){case 0:switch(2*p+3*u.charCodeAt(j+1)){case 235:S=47;break;case 220:z=j,S=42}break;case 42:47===p&&42===x&&z+2!==j&&(33===u.charCodeAt(z+2)&&(q+=u.substring(z,j+1)),y="",S=0)}}0===S&&(H+=y)}N=x,x=p,j++}if(0<(z=q.length)){if(U=r,0<T&&void 0!==(b=a(2,q,U,e,k,R,z,c,h,c))&&0===(q=b).length)return $+q+V;if(q=U.join(",")+"{"+q+"}",0!=C*P){switch(2!==C||o(q,2)||(P=0),P){case 111:q=q.replace(_,":-moz-$1")+q;break;case 112:q=q.replace(m,"::-webkit-input-$1")+q.replace(m,"::-moz-$1")+q.replace(m,":-ms-input-$1")+q}P=0}}return $+q+V}function n(e,t,n){var i=t.trim().split(g);t=i;var o=i.length,s=e.length;switch(s){case 0:case 1:var a=0;for(e=0===s?"":e[0]+" ";a<o;++a)t[a]=r(e,t[a],n).trim();break;default:var u=a=0;for(t=[];a<o;++a)for(var c=0;c<s;++c)t[u++]=r(e[c]+" ",i[a],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(y,"$1"+e.trim());case 58:return e.trim()+t.replace(y,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(y,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,r){var s=e+";",a=2*t+3*n+4*r;if(944===a){e=s.indexOf(":",9)+1;var u=s.substring(e,s.length-1).trim();return u=s.substring(0,e).trim()+u+";",1===C||2===C&&o(u,1)?"-webkit-"+u+u:u}if(0===C||2===C&&!o(s,1))return s;switch(a){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(x,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(u=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+u+s;case 1005:return d.test(s)?s.replace(h,":-webkit-")+s.replace(h,":-moz-")+s:s;case 1e3:switch(t=(u=s.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=s.replace(b,"tb");break;case 232:u=s.replace(b,"tb-rl");break;case 220:u=s.replace(b,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+u+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,a=(u=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:s=s.replace(u,"-webkit-"+u)+";"+s;break;case 207:case 102:s=s.replace(u,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(u,"-webkit-"+u)+";"+s.replace(u,"-ms-"+u+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return u=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+u+"-ms-flex-"+u+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(S,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(S,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===I.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):s.replace(u,"-webkit-"+u)+s.replace(u,"-moz-"+u.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+r&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+s}return s}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(O,"$1"),n,t)}function s(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,i,o,s,a,u,l){for(var f,h=0,d=t;h<T;++h)switch(f=N[h].call(c,e,d,n,r,i,o,s,a,u,l)){case void 0:case!1:case!0:case null:break;default:d=f}if(d!==t)return d}function u(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!=typeof e?C=1:(C=2,M=e):C=0),u}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<T){var i=a(-1,n,r,r,k,R,0,0,0,0);void 0!==i&&"string"==typeof i&&(n=i)}var o=t(A,r,n,0,0);return 0<T&&void 0!==(i=a(-2,o,r,r,k,R,o.length,0,0,0))&&(o=i),P=0,R=k=1,o}var l=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,g=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,_=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,S=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,I=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,R=1,k=1,P=0,C=1,A=[],N=[],T=0,M=null,L=0;return c.use=function e(t){switch(t){case void 0:case null:T=N.length=0;break;default:if("function"==typeof t)N[T++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else L=0|!!t}return e},c.set=u,void 0!==e&&u(e),c}!function(e){e.exports=function(){if(w)return S;w=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case u:case c:case r:case o:case i:case f:return e;default:switch(e=e&&e.$$typeof){case a:case l:case p:case d:case s:return e;default:return h}}case n:return h}}}function b(e){return _(e)===c}return S.AsyncMode=u,S.ConcurrentMode=c,S.ContextConsumer=a,S.ContextProvider=s,S.Element=t,S.ForwardRef=l,S.Fragment=r,S.Lazy=p,S.Memo=d,S.Portal=n,S.Profiler=o,S.StrictMode=i,S.Suspense=f,S.isAsyncMode=function(e){return b(e)||_(e)===u},S.isConcurrentMode=b,S.isContextConsumer=function(e){return _(e)===a},S.isContextProvider=function(e){return _(e)===s},S.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},S.isForwardRef=function(e){return _(e)===l},S.isFragment=function(e){return _(e)===r},S.isLazy=function(e){return _(e)===p},S.isMemo=function(e){return _(e)===d},S.isPortal=function(e){return _(e)===n},S.isProfiler=function(e){return _(e)===o},S.isStrictMode=function(e){return _(e)===i},S.isSuspense=function(e){return _(e)===f},S.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m||e.$$typeof===g)},S.typeOf=_,S}()}(E);var I={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var x=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,R=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return x.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),k=E.exports,P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},N={};function T(e){return k.isMemo(e)?A:N[e.$$typeof]||P}N[k.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},N[k.Memo]=A;var M=Object.defineProperty,L=Object.getOwnPropertyNames,j=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,z=Object.prototype,F=function e(t,n,r){if("string"!=typeof n){if(z){var i=D(n);i&&i!==z&&e(t,i,r)}var o=L(n);j&&(o=o.concat(j(n)));for(var s=T(t),a=T(n),u=0;u<o.length;++u){var c=o[u];if(!(C[c]||r&&r[c]||a&&a[c]||s&&s[c])){var l=U(n,c);try{M(t,c,l)}catch(e){}}}}return t};function B(){return(B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var H=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},q=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!E.exports.typeOf(e)},V=Object.freeze([]),$=Object.freeze({});function W(e){return"function"==typeof e}function K(e){return e.displayName||e.name||"Component"}function G(e){return e&&"string"==typeof e.styledComponentId}var Y="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Q="undefined"!=typeof window&&"HTMLElement"in window,J=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function X(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Z=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&X(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var s=this.indexOfGroup(e+1),a=0,u=t.length;a<u;a++)this.tag.insertRule(s,t[a])&&(this.groupSizes[e]++,s++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),ee=new Map,te=new Map,ne=1,re=function(e){if(ee.has(e))return ee.get(e);for(;te.has(ne);)ne++;var t=ne++;return ee.set(e,t),te.set(t,e),t},ie=function(e){return te.get(e)},oe=function(e,t){t>=ne&&(ne=t+1),ee.set(e,t),te.set(t,e)},se="style["+Y+'][data-styled-version="5.3.11"]',ae=new RegExp("^"+Y+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ue=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&e.registerName(t,r)},ce=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var s=n[i].trim();if(s){var a=s.match(ae);if(a){var u=0|parseInt(a[1],10),c=a[2];0!==u&&(oe(c,u),ue(e,c,a[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(s)}}},le=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(Y))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(Y,"active"),r.setAttribute("data-styled-version","5.3.11");var s="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},fe=function(){function e(e){var t=this.element=le(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}X(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),he=function(){function e(e){var t=this.element=le(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),de=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),pe=Q,ge={isServer:!Q,useCSSOMInjection:!J},ye=function(){function e(e,t,n){void 0===e&&(e=$),void 0===t&&(t={}),this.options=B({},ge,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Q&&pe&&(pe=!1,function(e){for(var t=document.querySelectorAll(se),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(Y)&&(ce(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return re(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(B({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new de(i):r?new fe(i):new he(i),new Z(e)));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(re(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(re(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(re(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var o=ie(i);if(void 0!==o){var s=e.names.get(o),a=t.getGroup(i);if(s&&a&&s.size){var u=Y+".g"+i+'[id="'+o+'"]',c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+a+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),ve=/(a)(d)/gi,me=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=me(t%52)+n;return(me(t%52)+n).replace(ve,"$1-$2")}var be=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},we=function(e){return be(5381,e)},Ee=we("5.3.11"),Se=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(W(n)&&!G(n))return!1}return!0}(e),this.componentId=t,this.baseHash=be(Ee,t),this.baseStyle=n,ye.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=Ue(this.rules,e,t,n).join(""),s=_e(be(this.baseHash,o)>>>0);if(!t.hasNameForId(r,s)){var a=n(o,"."+s,void 0,r);t.insertRules(r,s,a)}i.push(s),this.staticRulesId=s}else{for(var u=this.rules.length,c=be(this.baseHash,n.hash),l="",f=0;f<u;f++){var h=this.rules[f];if("string"==typeof h)l+=h;else if(h){var d=Ue(h,e,t,n),p=Array.isArray(d)?d.join(""):d;c=be(c,p+f),l+=p}}if(l){var g=_e(c>>>0);if(!t.hasNameForId(r,g)){var y=n(l,"."+g,void 0,r);t.insertRules(r,g,y)}i.push(g)}}return i.join(" ")},e}(),Oe=/^\s*\/\/.*$/gm,Ie=[":","[",".","#"],xe=b.createContext();xe.Consumer;var Re=b.createContext(),ke=(Re.Consumer,new ye),Pe=function(e){var t,n,r,i,o=$,s=o.options,a=void 0===s?$:s,u=o.plugins,c=void 0===u?V:u,l=new O(a),f=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,s,a,u,c,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),d=function(e,r,o){return 0===r&&-1!==Ie.indexOf(o[n.length])||o.match(i)?e:"."+t};function p(e,o,s,a){void 0===a&&(a="&");var u=e.replace(Oe,""),c=o&&s?s+" "+o+" { "+u+" }":u;return t=a,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),l(s||!o?"":o,c)}return l.use([].concat(c,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,d))},h,function(e){if(-2===e){var t=f;return f=[],t}}])),p.hash=c.length?c.reduce((function(e,t){return t.name||X(15),be(e,t.name)}),5381).toString():"",p}(),Ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return X(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),Ae=/([A-Z])/,Ne=/([A-Z])/g,Te=/^ms-/,Me=function(e){return"-"+e.toLowerCase()};function Le(e){return Ae.test(e)?e.replace(Ne,Me).replace(Te,"-ms-"):e}var je=function(e){return null==e||!1===e||""===e};function Ue(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,a=e.length;s<a;s+=1)""!==(i=Ue(e[s],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return je(e)?"":G(e)?"."+e.styledComponentId:W(e)?"function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t?e:Ue(e(t),t,n,r):e instanceof Ce?n?(e.inject(n,r),e.getName(r)):e:q(e)?function e(t,n){var r,i,o=[];for(var s in t)t.hasOwnProperty(s)&&!je(t[s])&&(Array.isArray(t[s])&&t[s].isCss||W(t[s])?o.push(Le(s)+":",t[s],";"):q(t[s])?o.push.apply(o,e(t[s],s)):o.push(Le(s)+": "+(r=s,(null==(i=t[s])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in I||r.startsWith("--")?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString();var u}var De=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return W(e)||q(e)?De(Ue(H(V,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:De(Ue(H(e,n)))}var Fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Be=/(^-|-$)/g;function He(e){return e.replace(Fe,"-").replace(Be,"")}function qe(e){return"string"==typeof e&&!0}var Ve=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},$e=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function We(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Ke(r,t):e[n]=t}function Ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];if(Ve(s))for(var a in s)$e(a)&&We(e,s[a],a)}return e}var Ge=b.createContext();Ge.Consumer;var Ye={};function Qe(e,t,n){var r=G(e),i=!qe(e),o=t.attrs,s=void 0===o?V:o,a=t.componentId,u=void 0===a?function(e,t){var n="string"!=typeof e?"sc":He(e);Ye[n]=(Ye[n]||0)+1;var r=n+"-"+function(e){return _e(we(e)>>>0)}("5.3.11"+n+Ye[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):a,c=t.displayName,l=void 0===c?function(e){return qe(e)?"styled."+e:"Styled("+K(e)+")"}(e):c,f=t.displayName&&t.componentId?He(t.displayName)+"-"+t.componentId:t.componentId||u,h=r&&e.attrs?Array.prototype.concat(e.attrs,s).filter(Boolean):s,d=t.shouldForwardProp;r&&e.shouldForwardProp&&(d=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var p,g=new Se(n,f,r?e.componentStyle:void 0),y=g.isStatic&&0===s.length,m=function(e,t){return function(e,t,n,r){var i=e.attrs,o=e.componentStyle,s=e.defaultProps,a=e.foldedComponentIds,u=e.shouldForwardProp,c=e.styledComponentId,l=e.target,f=function(e,t,n){void 0===e&&(e=$);var r=B({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,o,s=e;for(t in W(s)&&(s=s(r)),s)r[t]=i[t]="className"===t?(n=i[t],o=s[t],n&&o?n+" "+o:n||o):s[t]})),[r,i]}(function(e,t,n){return void 0===n&&(n=$),e.theme!==n.theme&&e.theme||t||n.theme}(t,v.exports.useContext(Ge),s)||$,t,i),h=f[0],d=f[1],p=function(e,t,n,r){var i=v.exports.useContext(xe)||ke,o=v.exports.useContext(Re)||Pe;return t?e.generateAndInjectStyles($,i,o):e.generateAndInjectStyles(n,i,o)}(o,r,h),g=n,y=d.$as||t.$as||d.as||t.as||l,m=qe(y),_=d!==t?B({},t,{},d):t,b={};for(var w in _)"$"!==w[0]&&"as"!==w&&("forwardedAs"===w?b.as=_[w]:(u?u(w,R,y):!m||R(w))&&(b[w]=_[w]));return t.style&&d.style!==t.style&&(b.style=B({},t.style,{},d.style)),b.className=Array.prototype.concat(a,c,p!==c?p:null,t.className,d.className).filter(Boolean).join(" "),b.ref=g,v.exports.createElement(y,b)}(p,e,t,y)};return m.displayName=l,(p=b.forwardRef(m)).attrs=h,p.componentStyle=g,p.displayName=l,p.shouldForwardProp=d,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):V,p.styledComponentId=f,p.target=r?e.target:e,p.withComponent=function(e){var r=t.componentId,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(qe(e)?e:He(K(e)));return Qe(e,B({},i,{attrs:h,componentId:o}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ke({},e.defaultProps,t):t}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&F(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Je=function(e){return function e(t,n,r){if(void 0===r&&(r=$),!E.exports.isValidElementType(n))return X(1,String(n));var i=function(){return t(n,r,ze.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,B({},r,{},i))},i.attrs=function(i){return e(t,n,B({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Je[e]=Je(e)}));const Xe=Je.div` z-index: 998; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.6); transition: opacity .25s; `,Ze="only screen and (min-width: 640px)",et="only screen and (max-height: 640px)",tt="1.2rem",nt=Je.div` z-index: 999; position: fixed; top: 0px; left: 0px; width: 100vw; height: 100%; font: 14px inter, sans-serif; font-family: "Segoe UI", Helvetica, Arial, sans-serif; font-feature-settings: "kern"; text-align: left !important; display: flex; flex-direction: column; justify-content: end; align-items: center; @media ${Ze} { justify-content: start; align-items: end; } `,rt=Je.div` position: relative; bottom: 0px; left: 0px; width: 100%; border-radius: ${tt} ${tt} 0 0; background: #131214; transform: scale(1); transition: opacity .25s,transform .25s; @media ${Ze} { max-width: 340px; margin: auto; border-radius: ${tt}; } `,it=Je.button` box-sizing: border-box; margin: 0.2rem 0.2rem 0 0; border: none; padding: 0; width: 18px; height: 18px; background: transparent; outline: none; cursor: pointer; & > img { width: 18px; height: 18px; } `,ot="15px",st=Je.div` display: flex; flex: 1; flex-direction: row; justify-content: space-between; padding: ${ot}; padding-bottom: 0.9rem; `,at=Je.div` margin-bottom: ${ot}; border-top: 1px solid #2b2a2b; padding: ${ot} ${ot} 0 ${ot}; color: #C3C3C3; ${({textAlign:e})=>e&&ze` text-align: ${e}; `} `,ut=Je.h2` color: #fff; margin: 0; line-height: 28px; font-size: 24px; font-weight: 600; @media ${et} { font-size: 18px; } `;Je.h3` color: #fff; margin: 0; font-size: 20px; font-weight: 500; line-height: 24px; `;const ct=Je.p` ${({noMargin:e})=>e?ze` margin: 0; `:"\n margin: 12px 0 0 0;\n "} font-size: 14px; font-weight: 500; line-height: 20px; `,lt=Je.button` width: 100%; ${({extraMargin:e})=>e?ze` margin: 2rem 0 1.2rem 0; `:ze` margin-top: 1.2rem; `} border-radius: 3rem; padding: 0.8rem 1rem; font-size: 14px; font-weight: 600; line-height: 17px; transition: all .5s ease; cursor: pointer; ${({variant:e})=>"primary"==e?ze` border: none; background-color: white; color: #000; &:hover, &:focus { background-color: rgba(255, 255, 255, 0.8); } `:ze` border: 1px solid #565656; background-color: transparent; color: #fff; &:hover { background-color: rgba(255, 255, 255, 0.05); } `} `,ft=Je.a` color: #BBB0FF; cursor: pointer; `;var ht=function(e,t){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ht(e,t)};function dt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ht(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var pt=function(){return pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pt.apply(this,arguments)};function gt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function yt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function vt(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function mt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var _t=function(e,t){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_t(e,t)};function bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_t(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var wt=function(){return wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wt.apply(this,arguments)};function Et(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function St(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function Ot(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function It(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}"function"==typeof SuppressedError&&SuppressedError;var xt=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return bt(t,e),t}(Error);function Rt(e){return"string"==typeof e}function kt(e){return"number"==typeof e}function Pt(e){return"function"==typeof e}function Ct(e){return null!=e}function At(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Nt="is not a string",Tt="is nil";function Mt(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function Lt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Mt(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var jt,Ut=function(){function e(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!==(t=null==e?void 0:e.maxListeners)&&void 0!==t?t:10}return e.prototype.warnIfPossibleMemoryLeak=function(e){this.warned||this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}(),Dt="onRemoveFromFuture",zt=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return bt(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t)||(e.queue.push(t),0))}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,s=e.attempt,a=e.maxTimeout,u=void 0===a?1/0:a;return Math.min(t*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(Dt)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(Ut),Ft=256,Bt=[];Ft--;)Bt[Ft]=(Ft+256).toString(16).substring(1);function Ht(){var e,t=0,n="";if(!jt||Ft+16>256){for(jt=Array(t=256);t--;)jt[t]=256*Math.random()|0;t=Ft=0}for(;t<16;t++)e=jt[Ft+t],n+=6==t?Bt[15&e|64]:8==t?Bt[63&e|128]:Bt[e],1&t&&t>1&&t<11&&(n+="-");return Ft++,n}var qt=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,o=wt(wt({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var s=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),wt(wt({},e),((n={})[s]=o,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),Vt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return wt(wt({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bt(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Vt),Wt=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},Kt=function(){function e(e,t,n,r){void 0===t&&(t=Ht()),void 0===n&&(n=new $t),void 0===r&&(r=new qt),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new Wt({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return It(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Gt(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return Et(this,void 0,void 0,(function(){var t;return St(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof Wt&&"middleware_cancellation"===n.type)throw n;return n instanceof Wt?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function Yt(e,t){return Gt(e,t).then((function(t){if(t instanceof Kt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Qt=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(Dt,(function(){o.scheduleFlush(0)})),o}return bt(t,e),t.prototype.register=function(e,t,n){return Et(this,void 0,void 0,(function(){var r=this;return St(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return Et(this,void 0,void 0,(function(){var r;return St(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return Et(this,void 0,void 0,(function(){var t;return St(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return Et(this,void 0,void 0,(function(){var t=this;return St(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return Et(this,void 0,void 0,(function(){var t=this;return St(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return Et(this,void 0,void 0,(function(){var t,n,r,i;return St(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof Wt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return Et(this,void 0,void 0,(function(){var e,t;return St(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),i=(t="type",n={},r.forEach((function(e){var r,i=void 0,o=e[t];void 0!==(i="string"!=typeof o?JSON.stringify(o):o)&&(n[i]=Ot(Ot([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n),o=i.before,s=void 0===o?[]:o,a=i.enrichment,u=void 0===a?[]:a,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:s,enrichment:u,destinations:l,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return Et(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return St(this,(function(v){switch(v.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,s=0,a=i,v.label=1;case 1:return s<a.length?(u=a[s],[4,Yt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Kt&&(e=h),this.emit("message_enriched",e,u),v.label=3;case 3:return s++,[3,1];case 4:c=0,l=o,v.label=5;case 5:return c<l.length?(f=l[c],[4,Gt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Kt&&(e=h),this.emit("message_enriched",e,f),v.label=7;case 7:return c++,[3,5];case 8:return d=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=d.destinations,g=d.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return Gt(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return v.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=g.map((function(t){return Gt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(Ut);function Jt(e,t,n,r){return Et(this,void 0,void 0,(function(){var i,o;return St(this,(function(s){switch(s.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=s.sent(),s.label=4;case 4:return(null==r?void 0:r.callback)?[4,Lt(o,r.callback,(a=i,u=r.timeout,c=Date.now()-a,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var a,u,c}))}))}function Xt(e,t,n,r){var i,o=[e,t,n,r],s=At(e)?e.event:e;if(!s||!Rt(s))throw new Error("Event missing");var a=At(e)?null!==(i=e.properties)&&void 0!==i?i:{}:At(t)?t:{},u={};return Pt(n)||(u=null!=n?n:{}),At(e)&&!Pt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Pt)]}function Zt(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Rt);void 0!==l[0]&&void 0!==l[1]&&(a=l[0],u=l[1]),1===l.length&&(a=null,u=l[0]);var f=c.find(Pt),h=c.filter((function(e){return null===u?At(e):At(e)||null===e})),d=null!==(o=h[0])&&void 0!==o?o:{},p=null!==(s=h[1])&&void 0!==s?s:{};return[a,u,d,p,f]}var en=function(e){return function(){for(var t,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var s={},a=["callback","options","traits","id"],u=0,c=i;u<c.length;u++){var l=c[u],f=a.pop();if("id"===f){if(Rt(l)||kt(l)){s.id=l.toString();continue}if(null==l)continue;f=a.pop()}if("traits"!==f&&"options"!==f||null!=l&&!At(l)||(s[f]=l),Pt(l)){s.callback=l;break}}return[null!==(t=s.id)&&void 0!==t?t:e.id(),null!==(n=s.traits)&&void 0!==n?n:{},null!==(r=s.options)&&void 0!==r?r:{},s.callback]}};function tn(e,t,n,r){kt(e)&&(e=e.toString()),kt(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Rt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(At)[0];return[a,c,void 0===l?{}:l,i.find(Pt)]}function nn(){return"undefined"!=typeof window}function rn(){return!nn()}function on(){return!nn()||window.navigator.onLine}function sn(){return!on()}function an(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}var un=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},cn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=un();return(n&&n.fetch||an).apply(void 0,e)},ln="1.62.0",fn="api.segment.io/v1";function hn(e){console.error("Error sending segment performance metrics",e)}var dn,pn=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:fn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(hn),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:pt(pt({},r),{library:"analytics.js",library_version:"npm:next-".concat(ln)})}}(e,t);this.queue.push(n),e.includes("error")&&this.flush().catch(hn)}},e.prototype.flush=function(){return yt(this,void 0,void 0,(function(){var e=this;return vt(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){hn(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return yt(this,void 0,void 0,(function(){var e,t,n;return vt(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,cn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dt(t,e),t.initRemoteMetrics=function(e){dn=new pn(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==dn||dn.increment(t,null!=r?r:[])},t}(Vt),yn=function(e){function t(t,n){return e.call(this,t,n,new gn)||this}return dt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Kt),vn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function f(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,o,s,a=this.byteLength,u=e(t,a),c=a;return undefined!==n&&(c=e(n,a)),u>c?new ArrayBuffer(0):(r=c-u,i=new ArrayBuffer(r),o=new Uint8Array(i),s=new Uint8Array(this,u,r),o.set(s),i)}}(),f.prototype.append=function(e){return this.appendBinary(c(e)),this},f.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},f.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=l(n)),this.reset(),n},f.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},f.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},f.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},f.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},f.hash=function(e,t){return f.hashBinary(c(e),t)},f.hashBinary=function(e,t){var n=u(o(e));return t?l(n):n},f.ArrayBuffer=function(){this.reset()},f.ArrayBuffer.prototype.append=function(e){var t,r=function(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},f.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=l(n)),this.reset(),n},f.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.ArrayBuffer.prototype.getState=function(){var e=f.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},f.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}(e.buff,!0),f.prototype.setState.call(this,e)},f.ArrayBuffer.prototype.destroy=f.prototype.destroy,f.ArrayBuffer.prototype._finish=f.prototype._finish,f.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?l(n):n},f}()}(vn);var mn=vn.exports,_n=function(e,t,n,r,i,o){return{__t:"bpc",c:t,p:r,u:e,s:n,t:i,r:o}},bn=Object.keys(_n("","","","","","")),wn=function(e){var t,n,r=e.c,i=e.p,o=e.s,s=e.u,a=e.r,u=e.t,c=r?function(e){try{return new URL(e).pathname}catch(t){return"/"===e[0]?e:"/"+e}}(r):i,l=r?function(e,t){return e.indexOf("?")>-1?e:e+t}(r,o):-1===(n=(t=s).indexOf("#"))?t:t.slice(0,n);return{path:c,referrer:a,search:o,title:u,url:l}},En=function(){var e=document.querySelector("link[rel='canonical']");return _n(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},Sn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r,i){return this.normalize(pt(pt({},this.baseEvent()),{event:e,type:"track",properties:t,options:pt({},n),integrations:pt({},r)}),i)},e.prototype.page=function(e,t,n,r,i,o){var s,a={type:"page",properties:pt({},n),options:pt({},r),integrations:pt({},i)};return null!==e&&(a.category=e,a.properties=null!==(s=a.properties)&&void 0!==s?s:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize(pt(pt({},this.baseEvent()),a),o)},e.prototype.screen=function(e,t,n,r,i,o){var s={type:"screen",properties:pt({},n),options:pt({},r),integrations:pt({},i)};return null!==e&&(s.category=e),null!==t&&(s.name=t),this.normalize(pt(pt({},this.baseEvent()),s),o)},e.prototype.identify=function(e,t,n,r,i){return this.normalize(pt(pt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:pt({},n),integrations:pt({},r)}),i)},e.prototype.group=function(e,t,n,r,i){return this.normalize(pt(pt({},this.baseEvent()),{type:"group",traits:t,options:pt({},n),integrations:pt({},r),groupId:e}),i)},e.prototype.alias=function(e,t,n,r,i){var o={userId:e,type:"alias",options:pt({},n),integrations:pt({},r)};return null!==t&&(o.previousId=t),void 0===e?this.normalize(pt(pt({},o),this.baseEvent())):this.normalize(pt(pt({},this.baseEvent()),o),i)},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?It(u,e,o[e]):It(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e,t){var n,r,i;(null===(n=e.options)||void 0===n?void 0:n.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var o=Object.keys(null!==(r=e.integrations)&&void 0!==r?r:{}).reduce((function(t,n){var r,i;return pt(pt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),s=pt(pt({},o),null===(i=e.options)||void 0===i?void 0:i.integrations),a=this.context(e),u=a[0],c=a[1];e.options;var l=gt(e,["options"]),f=pt(pt(pt(pt({timestamp:new Date},l),{context:u,integrations:s}),c),{messageId:"ajs-next-"+mn.hash(JSON.stringify(e)+Ht())});return function(e,t){void 0===t&&(t=wn(En()));var n,r,i,o=e.context;"page"===e.type&&(n=e.properties&&(r=e.properties,i=Object.keys(t),Object.assign.apply(Object,mt([{}],i.map((function(e){var t;if(r&&Object.prototype.hasOwnProperty.call(r,e))return(t={})[e]=r[e],t})),!1))),e.properties=pt(pt(pt({},t),e.properties),e.name?{name:e.name}:{})),o.page=pt(pt(pt({},t),n),o.page)}(f,t),f},e}(),On={getItem:function(){},setItem:function(){},removeItem:function(){}};try{On=nn()&&window.localStorage?window.localStorage:On}catch(e){console.warn("Unable to access localStorage",e)}function In(e){var t=On.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new yn(e.event,e.id)}))}function xn(e){var t=On.getItem(e);return t?JSON.parse(t):{}}function Rn(e){On.removeItem(e)}function kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=On.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return On.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void On.removeItem(r);!s&&n<3?setTimeout((function(){kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Pn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return kn(n,(function(){try{s=In(i),a=xn(o),Rn(i),Rn(o),r.queue=mt(mt([],s,!0),r.queue,!0),r.seen=pt(pt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=mt(mt([],r.queue,!0),r.future,!0);try{kn(n,(function(){!function(e,t){var n=In(e),r=mt(mt([],t,!0),n,!0).reduce((function(e,t){var n;return pt(pt({},e),((n={})[t.id]=t,n))}),{});On.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=xn(e);On.setItem(e,JSON.stringify(pt(pt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return dt(t,e),t}(zt),Cn=function(e){function t(t){return e.call(this,"string"==typeof t?new Pn(4,t):t)||this}return dt(t,e),t.prototype.flush=function(){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return sn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Qt);function An(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}/*! js-cookie v3.0.1 | MIT */function Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Tn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=Nn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Nn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Nn({},this.attributes,t))},withConverter:function(t){return e(Nn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function Mn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(Tn.set(i,"1",s),Tn.get(i))return Tn.remove(i,s),o}catch(e){return}}}var Ln=function(){function e(t){void 0===t&&(t=e.defaults),this.options=pt(pt({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:Mn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=Tn.get(e);if(null==n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?Tn.set(e,t,this.opts()):null===t?Tn.remove(e,this.opts()):Tn.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return Tn.remove(e,this.opts())},e}(),jn=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}(),Un=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),Dn={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function zn(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(Dn).includes(e)}))}var Fn=function(e,t,n,r){console.warn("".concat(e.constructor.name,": Can't ").concat(t,' key "').concat(n,'" | Err: ').concat(r))},Bn=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){Fn(i,"get",e,t)}}return null},e.prototype.set=function(e,t){this.stores.forEach((function(n){try{n.set(e,t)}catch(t){Fn(n,"set",e,t)}}))},e.prototype.clear=function(e){this.stores.forEach((function(t){try{t.remove(e)}catch(n){Fn(t,"remove",e,n)}}))},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();function Hn(e){return e.map((function(e){var t,n;switch(function(e){return"object"==typeof e&&void 0!==e.name}(e)?(t=e.name,n=e.settings):t=e,t){case Dn.Cookie:return new Ln(n);case Dn.LocalStorage:return new jn;case Dn.Memory:return new Un;default:throw new Error("Unknown Store Type: ".concat(e))}}))}function qn(e,t){return e.map((function(e){return t&&e===Dn.Cookie?{name:e,settings:t}:e}))}var Vn={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},$n=function(){function e(e,t){void 0===e&&(e=Vn);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(Vn.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:Ht()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=pt(pt({},Vn),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Vn.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:Vn.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,(function(e){return e===Dn.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==Dn.Cookie}));var a=this.legacyUserStore.get(Vn.cookie.oldKey);a&&"object"==typeof a&&(a.id&&this.id(a.id),a.traits&&this.traits(a.traits)),An(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=pt(pt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[Dn.LocalStorage,Dn.Cookie,Dn.Memory];return e.disable?new Bn([]):e.persist?(void 0!==e.storage&&null!==e.storage&&zn(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==Dn.LocalStorage}))),n&&(r=r.filter(n)),new Bn(Hn(qn(r,t)))):new Bn([new Un])},e.defaults=Vn,e}(),Wn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Kn=function(e){function t(t,n){void 0===t&&(t=Wn);var r=e.call(this,pt(pt({},Wn),t),n)||this;return r.anonymousId=function(e){},An(r),r}return dt(t,e),t}($n),Gn="analytics";function Yn(){return window[Gn]}var Qn=function(e,t,n){n.getCalls(e).forEach((function(e){or(t,e).catch(console.error)}))},Jn=function(e,t){return yt(void 0,void 0,void 0,(function(){var n,r,i;return vt(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,or(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},Xn=Qn.bind(void 0,"on"),Zn=Qn.bind(void 0,"setAnonymousId"),er=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){or(e,t).catch(console.error)}),0)}))},tr=function(e){if(nr(e)){var t=e.pop();return wn(t)}},nr=function(e){return function(e){if(!At(e))return!1;if("bpc"!==e.__t)return!1;for(var t in e)if(!bn.includes(t))return!1;return!0}(e[e.length-1])},rr=function(e,t,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=e,this.resolve=n,this.reject=r,this.called=!1,this.args=t},ir=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._callMap={},this.push.apply(this,e)}return Object.defineProperty(e.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(e){this._callMap=e},enumerable:!1,configurable:!0}),e.prototype.getCalls=function(e){var t;return null!==(t=this.calls[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.forEach((function(t){["track","screen","alias","group","page","identify"].includes(t.method)&&!nr(t.args)&&(t.args=mt(mt([],t.args,!0),[En()],!1)),e.calls[t.method]?e.calls[t.method].push(t):e.calls[t.method]=[t]}))},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){var e=Yn();if(Array.isArray(e)){var t=e.splice(0,e.length).map((function(e){var t=e[0],n=e.slice(1);return new rr(t,n)}));this.push.apply(this,t)}},e}();function or(e,t){return yt(this,void 0,void 0,(function(){var n,r;return vt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,"object"==typeof(o=n=e[t.method].apply(e,t.args))&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var sr=function(){function e(e){var t=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=ln,this._preInitBuffer=new ir,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push(new rr(e,r,n,i))}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push(new rr(e,r)),t)}},e}(),ar="This is being deprecated and will be not be available in future releases of Analytics JS",ur=un(),cr=null==ur?void 0:ur.analytics;function lr(){console.warn(ar)}var fr=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=lr,c.addIntegrationMiddleware=lr,c.listeners=lr,c.addEventListener=lr,c.removeAllListeners=lr,c.removeListener=lr,c.removeEventListener=lr,c.hasListeners=lr,c.add=lr,c.addIntegration=lr;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?10:1,i=n?new zt(r,[]):new Pn(r,e);return new Cn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f);var h=null==n?void 0:n.storage;return c._universalStorage=c.createStore(f,h,l),c._user=null!=i?i:new $n(pt({persist:!f,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),c._group=null!=o?o:new Kn(pt({persist:!f,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),c.eventFactory=new Sn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},An(c),c}return dt(t,e),t.prototype.createStore=function(e,t,n){return e?new Bn([new Un]):t&&zn(t)?new Bn(Hn(qn(t.stores,n))):new Bn(Hn([Dn.LocalStorage,{name:Dn.Cookie,settings:n},Dn.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return vt(this,(function(c){return t=tr(e),n=Xt.apply(void 0,e),r=n[0],i=n[1],o=n[2],s=n[3],a=this.eventFactory.track(r,i,o,this.integrations,t),[2,this._dispatch(a,s).then((function(e){return u.emit("track",r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c=this;return vt(this,(function(l){return t=tr(e),n=Zt.apply(void 0,e),r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=this.eventFactory.page(r,i,o,s,this.integrations,t),[2,this._dispatch(u,a).then((function(e){return c.emit("page",r,i,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return vt(this,(function(c){return t=tr(e),n=en(this._user).apply(void 0,e),r=n[0],i=n[1],o=n[2],s=n[3],this._user.identify(r,i),a=this.eventFactory.identify(this._user.id(),this._user.traits(),o,this.integrations,t),[2,this._dispatch(a,s).then((function(e){return u.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=tr(t);if(0===t.length)return this._group;var i=en(this._group).apply(void 0,t),o=i[0],s=i[1],a=i[2],u=i[3];this._group.identify(o,s);var c=this._group.id(),l=this._group.traits(),f=this.eventFactory.group(c,l,a,this.integrations,r);return this._dispatch(f,u).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return vt(this,(function(c){return t=tr(e),n=tn.apply(void 0,e),r=n[0],i=n[1],o=n[2],s=n[3],a=this.eventFactory.alias(r,i,o,this.integrations,t),[2,this._dispatch(a,s).then((function(e){return u.emit("alias",r,i,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c=this;return vt(this,(function(l){return t=tr(e),n=Zt.apply(void 0,e),r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=this.eventFactory.screen(r,i,o,s,this.integrations,t),[2,this._dispatch(u,a).then((function(e){return c.emit("screen",r,i,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n;return vt(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return $c}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,mt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n;return vt(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return $c}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,mt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n;return vt(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return $c}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,mt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n;return vt(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return $c}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,mt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r=this;return vt(this,(function(i){switch(i.label){case 0:return t=yn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yt(this,void 0,void 0,(function(){var t,n,r=this;return vt(this,(function(i){switch(i.label){case 0:return t=yn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return yt(this,void 0,void 0,(function(){var n;return vt(this,(function(r){return n=new yn(e),sn()&&!this.options.retryQueue?[2,n]:[2,Jt(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return yt(this,void 0,void 0,(function(){var t=this;return vt(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return yt(t,void 0,void 0,(function(){var t,n,r;return vt(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return uo}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return Kc}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){var e;return console.warn(ar),e=null!=cr?cr:this,window[Gn]=e,this},t.prototype.normalize=function(e){return console.warn(ar),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(ar),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return ln},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return yt(this,void 0,void 0,(function(){return vt(this,(function(e){return console.warn(ar),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){switch(t.label){case 0:return console.warn(ar),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(ar),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(ar);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(Ut),hr=function(e){function t(){var t=e.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return t.initialized=!0,t}return dt(t,e),t}(fr);function dr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(G){}var pr,gr,yr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,vr=function(){var e=function(){var e;return null!=pr?pr:null===(e=Yn())||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=yr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},mr=function(){var e=vr();return"".concat(e,"/next-integrations")};function _r(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return pt(pt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return pt(pt({},e),((n={})[i]=pt(pt({},o),r[i]),n))}),{})}function br(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function wr(e){return yt(this,void 0,void 0,(function(){var t;return vt(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function Er(){if(gr)return gr;var e=Mn(window.location.href);return gr={expires:31536e6,secure:!1,path:"/"},e&&(gr.domain=e),gr}var Sr=new function(){var e=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(t,n){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(t){switch(t.label){case 0:this.instance=n,t.label=1;case 1:return t.trys.push([1,3,,4]),e=this,[4,wr(this.instance.options.highEntropyValuesClientHints)];case 2:return e.userAgentData=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2,Promise.resolve()]}}))}))},this.enrich=function(t){var n,r,i=t.event.context,o=i.page.search||"",s="object"==typeof o?function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];Array.isArray(r)?r.forEach((function(e){return t.append(n,e)})):t.append(n,r)})),t.toString()}catch(e){return""}}(o):o;i.userAgent=navigator.userAgent,i.userAgentData=e.userAgentData;var a=navigator.userLanguage||navigator.language;void 0===i.locale&&void 0!==a&&(i.locale=a),null!==(n=i.library)&&void 0!==n||(i.library={name:"analytics.js",version:"".concat("npm:next","-").concat(ln)}),s&&!i.campaign&&(i.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.slice(4);"campaign"===s&&(s="name"),e[s]=br(o)}return e}),{})}(s));var u=function(){var e=Tn.get("_ga");if(e&&e.startsWith("amp"))return e}();u&&(i.amp={id:u}),function(e,t,n){var r,i=new Bn(n?[]:[new Ln(Er())]),o=i.get("s:context.referrer"),s=null!==(r=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e))&&void 0!==r?r:o;s&&(t&&(t.referrer=pt(pt({},t.referrer),s)),i.set("s:context.referrer",s))}(s,i,null!==(r=e.instance.options.disableClientPersistence)&&void 0!==r&&r);try{i.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return t},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich};function Or(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function Ir(e,t){var n=Or(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function xr(e){var t=Or(e);return void 0!==t&&t.remove(),Promise.resolve()}var Rr={},kr={},Pr={},Cr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(Cr);var Ar=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pr,"__esModule",{value:!0});var Nr=Ar(Cr.exports);function Tr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return Nr.default(n,"address."+e)||Nr.default(n,e)||(t?Nr.default(n,"address."+t):null)||(t?Nr.default(n,t):null)||Nr.default(r,"address."+e)||Nr.default(r,e)||(t?Nr.default(r,"address."+t):null)||(t?Nr.default(r,t):null)}}Pr.default=function(e){e.zip=Tr("postalCode","zip"),e.country=Tr("country"),e.street=Tr("street"),e.state=Tr("state"),e.city=Tr("city"),e.region=Tr("region")};var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.clone=void 0,Mr.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});var jr={Salesforce:!0};Lr.default=function(e){return!jr[e]};var Ur={},Dr=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;Ur.parse=function(e){var t=[1,5,6,7,11,12],n=Dr.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},Ur.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Dr.test(e)};var zr={},Fr=/\d{13}/;zr.is=function(e){return Fr.test(e)},zr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Br={},Hr=/\d{10}/;Br.is=function(e){return Hr.test(e)},Br.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var qr=Ur,Vr=zr,$r=Br,Wr=Object.prototype.toString,Kr=function(e){return t=e,"[object Date]"===Wr.call(t)?e:function(e){return"[object Number]"===Wr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):qr.is(e)?qr.parse(e):Vr.is(e)?Vr.parse(e):$r.is(e)?$r.parse(e):new Date(e);var t,n},Gr=Ur,Yr=function e(t,n){return void 0===n&&(n=!0),t&&"object"==typeof t?function(t,n){return Object.keys(t).forEach((function(r){t[r]=e(t[r],n)})),t}(t,n):Array.isArray(t)?function(t,n){return t.forEach((function(r,i){t[i]=e(r,n)})),t}(t,n):Gr.is(t,n)?Gr.parse(t):t};var Qr=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0}),kr.Facade=void 0;var Jr=Qr(Pr),Xr=Mr,Zr=Qr(Lr),ei=Qr(Kr),ti=Qr(Cr.exports),ni=Qr(Yr);function ri(e,t){t=t||{},this.raw=Xr.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Xr.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?ei.default(e.timestamp):new Date,t.traverse&&ni.default(e),this.opts=t,this.obj=e}kr.Facade=ri;var ii=ri.prototype;function oi(e){return Xr.clone(e)}ii.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=ti.default(n,t.join("."))),this.opts.clone?oi(n):n):n},ii.field=function(e){var t=this.obj[e];return this.opts.clone?oi(t):t},ri.proxy=function(e){return function(){return this.proxy(e)}},ri.field=function(e){return function(){return this.field(e)}},ri.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Xr.clone(n):n]),n||[]}},ri.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},ii.json=function(){var e=this.opts.clone?Xr.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},ii.rawEvent=function(){return this.raw},ii.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Xr.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||ti.default(r,e);return"object"!=typeof i&&(i=ti.default(this.options(),e)),"object"==typeof i?i:{}}},ii.context=ii.options,ii.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Zr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},ii.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},ii.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},ii.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},ii.sessionId=ii.anonymousId,ii.groupId=ri.proxy("options.groupId"),ii.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},ii.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},ii.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},ii.userAgent=ri.proxy("context.userAgent"),ii.timezone=ri.proxy("context.timezone"),ii.timestamp=ri.field("timestamp"),ii.channel=ri.field("channel"),ii.ip=ri.proxy("context.ip"),ii.userId=ri.field("userId"),Jr.default(ii);var si={},ai={exports:{}};"function"==typeof Object.create?ai.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ai.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var ui=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(si,"__esModule",{value:!0}),si.Alias=void 0;var ci=ui(ai.exports),li=kr;function fi(e,t){li.Facade.call(this,e,t)}si.Alias=fi,ci.default(fi,li.Facade),fi.prototype.action=function(){return"alias"},fi.prototype.type=fi.prototype.action,fi.prototype.previousId=function(){return this.field("previousId")||this.field("from")},fi.prototype.from=fi.prototype.previousId,fi.prototype.userId=function(){return this.field("userId")||this.field("to")},fi.prototype.to=fi.prototype.userId;var hi={},di={};Object.defineProperty(di,"__esModule",{value:!0});var pi=/.+\@.+\..+/;di.default=function(e){return pi.test(e)};var gi=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hi,"__esModule",{value:!0}),hi.Group=void 0;var yi=gi(ai.exports),vi=gi(di),mi=gi(Kr),_i=kr;function bi(e,t){_i.Facade.call(this,e,t)}hi.Group=bi,yi.default(bi,_i.Facade);var wi=bi.prototype;wi.action=function(){return"group"},wi.type=wi.action,wi.groupId=_i.Facade.field("groupId"),wi.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return mi.default(e)},wi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return vi.default(t)?t:void 0},wi.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},wi.name=_i.Facade.proxy("traits.name"),wi.industry=_i.Facade.proxy("traits.industry"),wi.employees=_i.Facade.proxy("traits.employees"),wi.properties=function(){return this.field("traits")||this.field("properties")||{}};var Ei={},Si=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.Identify=void 0;var Oi=kr,Ii=Si(Cr.exports),xi=Si(ai.exports),Ri=Si(di),ki=Si(Kr),Pi=function(e){return e.trim()};function Ci(e,t){Oi.Facade.call(this,e,t)}Ei.Identify=Ci,xi.default(Ci,Oi.Facade);var Ai=Ci.prototype;Ai.action=function(){return"identify"},Ai.type=Ai.action,Ai.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},Ai.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return Ri.default(t)?t:void 0},Ai.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return ki.default(e)},Ai.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return ki.default(e)},Ai.companyName=function(){return this.proxy("traits.company.name")},Ai.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return Pi(e);var t=this.firstName(),n=this.lastName();return t&&n?Pi(t+" "+n):void 0},Ai.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return Pi(e);var t=this.proxy("traits.name");return"string"==typeof t?Pi(t).split(" ")[0]:void 0},Ai.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return Pi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=Pi(t).indexOf(" ");if(-1!==n)return Pi(t.substr(n+1))}},Ai.uid=function(){return this.userId()||this.username()||this.email()},Ai.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},Ai.age=function(){var e=this.birthday(),t=Ii.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},Ai.avatar=function(){var e=this.traits();return Ii.default(e,"avatar")||Ii.default(e,"photoUrl")||Ii.default(e,"avatarUrl")},Ai.position=function(){var e=this.traits();return Ii.default(e,"position")||Ii.default(e,"jobTitle")},Ai.username=Oi.Facade.proxy("traits.username"),Ai.website=Oi.Facade.one("traits.website"),Ai.websites=Oi.Facade.multi("traits.website"),Ai.phone=Oi.Facade.one("traits.phone"),Ai.phones=Oi.Facade.multi("traits.phone"),Ai.address=Oi.Facade.proxy("traits.address"),Ai.gender=Oi.Facade.proxy("traits.gender"),Ai.birthday=Oi.Facade.proxy("traits.birthday");var Ni={},Ti=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.Track=void 0;var Mi=Ti(ai.exports),Li=kr,ji=Ei,Ui=Ti(di),Di=Ti(Cr.exports);function zi(e,t){Li.Facade.call(this,e,t)}Ni.Track=zi,Mi.default(zi,Li.Facade);var Fi=zi.prototype;Fi.action=function(){return"track"},Fi.type=Fi.action,Fi.event=Li.Facade.field("event"),Fi.value=Li.Facade.proxy("properties.value"),Fi.category=Li.Facade.proxy("properties.category"),Fi.id=Li.Facade.proxy("properties.id"),Fi.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Fi.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Fi.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Fi.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Fi.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Fi.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Fi.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Fi.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Fi.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Fi.sku=Li.Facade.proxy("properties.sku"),Fi.tax=Li.Facade.proxy("properties.tax"),Fi.name=Li.Facade.proxy("properties.name"),Fi.price=Li.Facade.proxy("properties.price"),Fi.total=Li.Facade.proxy("properties.total"),Fi.repeat=Li.Facade.proxy("properties.repeat"),Fi.coupon=Li.Facade.proxy("properties.coupon"),Fi.shipping=Li.Facade.proxy("properties.shipping"),Fi.discount=Li.Facade.proxy("properties.discount"),Fi.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Fi.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Fi.description=Li.Facade.proxy("properties.description"),Fi.plan=Li.Facade.proxy("properties.plan"),Fi.subtotal=function(){var e=Di.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Fi.products=function(){var e=this.properties(),t=Di.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Fi.quantity=function(){return(this.obj.properties||{}).quantity||1},Fi.currency=function(){return(this.obj.properties||{}).currency||"USD"},Fi.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Fi.query=Li.Facade.proxy("options.query"),Fi.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Fi.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Fi.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ui.default(t)?t:void 0},Fi.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(e){if("number"==typeof e)return e;if("string"==typeof e)return e=e.replace(/\$/g,""),e=parseFloat(e),isNaN(e)?void 0:e}}(e)},Fi.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Fi.identify=function(){var e=this.json();return e.traits=this.traits(),new ji.Identify(e,this.opts)};var Bi={},Hi=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Page=void 0;var qi=Hi(ai.exports),Vi=kr,$i=Ni,Wi=Hi(di);function Ki(e,t){Vi.Facade.call(this,e,t)}Bi.Page=Ki,qi.default(Ki,Vi.Facade);var Gi=Ki.prototype;Gi.action=function(){return"page"},Gi.type=Gi.action,Gi.category=Vi.Facade.field("category"),Gi.name=Vi.Facade.field("name"),Gi.title=Vi.Facade.proxy("properties.title"),Gi.path=Vi.Facade.proxy("properties.path"),Gi.url=Vi.Facade.proxy("properties.url"),Gi.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Gi.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Gi.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Wi.default(t)?t:void 0},Gi.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Gi.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Gi.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new $i.Track(t,this.opts)};var Yi={},Qi=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.Screen=void 0;var Ji=Qi(ai.exports),Xi=Bi,Zi=Ni;function eo(e,t){Xi.Page.call(this,e,t)}Yi.Screen=eo,Ji.default(eo,Xi.Page),eo.prototype.action=function(){return"screen"},eo.prototype.type=eo.prototype.action,eo.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},eo.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Zi.Track(t,this.opts)};var to={},no=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(to,"__esModule",{value:!0}),to.Delete=void 0;var ro=no(ai.exports),io=kr;function oo(e,t){io.Facade.call(this,e,t)}function so(e,t){var n=new Rr.Facade(e,t);return"track"===e.type&&(n=new Rr.Track(e,t)),"identify"===e.type&&(n=new Rr.Identify(e,t)),"page"===e.type&&(n=new Rr.Page(e,t)),"alias"===e.type&&(n=new Rr.Alias(e,t)),"group"===e.type&&(n=new Rr.Group(e,t)),"screen"===e.type&&(n=new Rr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function ao(e,t,n){return yt(this,void 0,void 0,(function(){function r(t,n){return yt(this,void 0,void 0,(function(){var r,i,o;return vt(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:so(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=pt(pt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return vt(this,(function(e){switch(e.label){case 0:i=so(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}to.Delete=oo,ro.default(oo,io.Facade),oo.prototype.type=function(){return"delete"},function(e){var t=c&&c.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=kr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=si;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=hi;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Ei;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=Ni;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Bi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Yi;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var l=to;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return l.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:l.Delete})}(Rr);var uo=Object.freeze({__proto__:null,applyDestinationMiddleware:ao,sourceMiddlewarePlugin:function(e,t){function n(n){return yt(this,void 0,void 0,(function(){var r;return vt(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:so(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Wt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}});function co(e,t){var n=t.methodName,r=t.integrationName,i=t.type,o=t.didError,s=void 0!==o&&o;e.stats.increment("analytics_js.integration.invoke".concat(s?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}var lo=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return yt(this,void 0,void 0,(function(){var t;return vt(this,(function(n){switch(n.label){case 0:return[4,ao(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Wt({retry:!1,reason:"dropped by destination middleware"})),[2,new yn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return yt(t,void 0,void 0,(function(){var t,r;return vt(this,(function(i){switch(i.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),co(n,{integrationName:this.action.name,methodName:e,type:"action"}),[4,this.action[e](t)];case 3:return i.sent(),[3,5];case 4:throw r=i.sent(),co(n,{integrationName:this.action.name,methodName:e,type:"action",didError:!0}),r;case 5:return[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return yt(this,void 0,void 0,(function(){var n;return vt(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),co(e,{integrationName:this.action.name,methodName:"load",type:"action"}),[4,this.action.load(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),co(e,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),n;case 3:return[2]}}))}))},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function fo(e,t){return yt(this,void 0,void 0,(function(){var n,r,i,o,s;return vt(this,(function(a){switch(a.label){case 0:if(n=new RegExp("https://cdn.segment.(com|build)"),r=vr(),!t)return[3,6];i=e.url.split("/"),o=i[i.length-2],s=e.url.replace(o,btoa(o).replace(/=/g,"")),a.label=1;case 1:return a.trys.push([1,3,,5]),[4,Ir(s.replace(n,r))];case 2:return a.sent(),[3,5];case 3:return a.sent(),[4,Ir(e.url.replace(n,r))];case 4:return a.sent(),[3,5];case 5:return[3,8];case 6:return[4,Ir(e.url.replace(n,r))];case 7:a.sent(),a.label=8;case 8:return"function"==typeof window[e.libraryName]?[2,window[e.libraryName]]:[2]}}))}))}function ho(e,t,n,r,i,o){var s,a,u;return yt(this,void 0,void 0,(function(){var c,l,f,h=this;return vt(this,(function(d){switch(d.label){case 0:return c=[],l=null!==(a=null===(s=e.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],f=(null!==(u=e.remotePlugins)&&void 0!==u?u:[]).map((function(e){return yt(h,void 0,void 0,(function(){var s,a,u,f,h,d;return vt(this,(function(p){switch(p.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];p.label=1;case 1:return p.trys.push([1,6,,7]),(a=null==o?void 0:o.find((function(t){return t.pluginName===e.name})))?[3,3]:[4,fo(e,r)];case 2:a=p.sent(),p.label=3;case 3:return(s=a)?[4,s(pt(pt({},e.settings),n[e.name]))]:[3,5];case 4:u=p.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(f=Array.isArray(u)?u:[u]),h=l.filter((function(t){return t.destinationName===e.creationName})),f.forEach((function(t){var n=new lo(e.creationName,t);h.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),p.label=5;case 5:return[3,7];case 6:return d=p.sent(),console.warn("Failed to load Remote Plugin",d),[3,7];case 7:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,c.filter(Boolean)]}}))}))}var po=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},go=500;function yo(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function vo(e,t,n,r){var i,o=e.user();delete t.options,t.writeKey=null==n?void 0:n.apiKey,t.userId=t.userId||o.id(),t.anonymousId=t.anonymousId||o.anonymousId(),t.sentAt=new Date;var s=e.queue.failedInitializations||[];s.length>0&&(t._metadata={failedInitializations:s});var a=[],u=[];for(var c in r){var l=r[c];"Segment.io"===c&&a.push(c),"bundled"===l.bundlingStatus&&a.push(c),"unbundled"===l.bundlingStatus&&u.push(c)}for(var f=0,h=(null==n?void 0:n.unbundledIntegrations)||[];f<h.length;f++){var d=h[f];u.includes(d)||u.push(d)}var p=null!==(i=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==i?i:{},g=[];return a.sort().forEach((function(e){var t;(null!==(t=p[e])&&void 0!==t?t:[]).forEach((function(e){g.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=pt(pt({},t._metadata),{bundled:a.sort(),unbundled:u.sort(),bundledIds:g})),t}var mo=function(e,t){return yt(void 0,void 0,void 0,(function(){var n;return vt(this,(function(r){return n=function(r){return yt(void 0,void 0,void 0,(function(){var i;return vt(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function _o(e,t){return yt(this,void 0,void 0,(function(){var n,r=this;return vt(this,(function(i){switch(i.label){case 0:return n=[],sn()?[2,t]:[4,mo((function(){return t.length>0&&!sn()}),(function(){return yt(r,void 0,void 0,(function(){var r;return vt(this,(function(i){switch(i.label){case 0:return(r=t.pop())?[4,Gt(r,e)]:[2];case 1:return i.sent()instanceof yn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function bo(e,t,n,r){var i=this;e||setTimeout((function(){return yt(i,void 0,void 0,(function(){var e,i;return vt(this,(function(o){switch(o.label){case 0:return e=!0,[4,_o(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function wo(e,t,n){var r,i,o;window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()}));var s,a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new zt(e.queue.queue.maxAttempts,[]):new Pn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:fn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?function(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey,i=t.map((function(e){var t=e;return t.sentAt,gt(t,["sentAt"])}));return cn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function l(){return yt(this,void 0,void 0,(function(){var e;return vt(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return po((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){yo(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return yt(this,void 0,void 0,(function(){return vt(this,(function(e){return o.push(t),[2,o.length>=a||function(e){return yo(e)>=go-50}(o)||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}(f,p.config):(s=null==p?void 0:p.config,{dispatch:function(e,t){return cn(e,{keepalive:null==s?void 0:s.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}});function y(r){return yt(this,void 0,void 0,(function(){var i,o;return vt(this,(function(s){return sn()?(u.push(r),bo(l,u,v,bo),[2,r]):(c.add(r),i=r.event.type.charAt(0),o=so(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),vo(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),bo(l,u,v,bo),r})).finally((function(){c.delete(r)}))])}))}))}var v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:y,identify:y,page:y,alias:y,group:y,screen:y};return u.todo&&bo(l,u,v,bo),v}function Eo(e){var t,n=e.event;!function(e){if(!Ct(e))throw new xt("Event",Tt);if("object"!=typeof e)throw new xt("Event","is not an object")}(n),function(e){if(!Rt(e.type))throw new xt(".type",Nt)}(n),"track"===n.type&&function(e){if(!Rt(e.event))throw new xt(".event",Nt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!At(r))throw new xt(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Ct(n))throw new xt(t,Tt);if(!Rt(n))throw new xt(t,Nt)}(n),e}var So,Oo,Io={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:Eo,identify:Eo,page:Eo,alias:Eo,group:Eo,screen:Eo},xo=null!==(So=(Oo=un()).__SEGMENT_INSPECTOR__)&&void 0!==So?So:Oo.__SEGMENT_INSPECTOR__={};function Ro(e,t){return yt(this,void 0,void 0,(function(){return vt(this,(function(n){switch(n.label){case 0:return[4,Jn(e,t)];case 1:return n.sent(),er(e,t),t.clear(),[2]}}))}))}function ko(e,t,n,r,i,o,s){var a,u,c;return void 0===o&&(o=[]),yt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E,S,O=this;return vt(this,(function(I){switch(I.label){case 0:return l=null==o?void 0:o.filter((function(e){return"object"==typeof e})),f=null==o?void 0:o.filter((function(e){return"function"==typeof e&&"string"==typeof e.pluginName})),function(e){var t,n,r;return"test"!==dr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return Ih})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=I.sent(),[3,3];case 2:d=void 0,I.label=3;case 3:return h=d,x=t,"test"!==dr().NODE_ENV&&Object.keys(x.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return Nh})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,h,s)}))]:[3,5];case 4:return g=I.sent(),[3,6];case 5:g=[],I.label=6;case 6:return p=g,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return Th})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:I.sent(),I.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return Mh})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return v=I.sent(),[3,11];case 10:v=void 0,I.label=11;case 11:return y=v,m=_r(t,i),[4,ho(t,n.integrations,m,i.obfuscate,h,f).catch((function(){return[]}))];case 12:return _=I.sent(),b=mt(mt(mt([Io,Sr],l,!0),p,!0),_,!0),y&&b.push(y),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(E=(w=b).push,[4,wo(n,m["Segment.io"],t.integrations)]);case 13:E.apply(w,[I.sent()]),I.label=14;case 14:return[4,n.register.apply(n,b)];case 15:return S=I.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Lh})).then((function(e){var r=e.remoteMiddlewares;return yt(O,void 0,void 0,(function(){var e,o;return vt(this,(function(s){switch(s.label){case 0:return[4,r(S,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:I.sent(),I.label=17;case 17:return[2,S]}var x}))}))}var Po=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(e){return s.then((function(t){return function(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),yt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return vt(this,(function(w){switch(w.label){case 0:return!0===t.disable?[2,[new hr,yn.system()]]:(t.globalAnalyticsKey&&(R=t.globalAnalyticsKey,Gn=R),e.cdnURL&&(I=e.cdnURL,(x=Yn())&&(x._cdn=I),pr=I),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]));case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:vr(),cn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),"function"!=typeof t.disable?[3,5]:[4,t.disable(l)];case 4:if(w.sent())return[2,[new hr,yn.system()]];w.label=5;case 5:return h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=pt({retryQueue:h},t),function(e){var t;null===(t=xo.attach)||void 0===t||t.call(xo,e)}(p=new fr(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],gn.initRemoteMetrics(l.metrics),function(e,t){Zn(e,t),Xn(e,t)}(p,n),[4,ko(e.writeKey,l,p,d,t,g,y)];case 6:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,8];case 7:w.sent(),w.label=8;case 8:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,Ro(p,n)];case 9:return w.sent(),[2,[p,v]]}var E,S,O,I,x,R}))}))}(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return dt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(sr);let Co;const Ao=new Uint8Array(16);function No(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Ao)}var To=/^(?:[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;const Mo=[];for(let e=0;e<256;++e)Mo.push((e+256).toString(16).slice(1));function Lo(e,t=0){return Mo[e[t+0]]+Mo[e[t+1]]+Mo[e[t+2]]+Mo[e[t+3]]+"-"+Mo[e[t+4]]+Mo[e[t+5]]+"-"+Mo[e[t+6]]+Mo[e[t+7]]+"-"+Mo[e[t+8]]+Mo[e[t+9]]+"-"+Mo[e[t+10]]+Mo[e[t+11]]+Mo[e[t+12]]+Mo[e[t+13]]+Mo[e[t+14]]+Mo[e[t+15]]}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=function(e){if(!function(e){return"string"==typeof e&&To.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Lo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||No)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Lo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=v.exports.useCallback(((e={},t={})=>u(this,void 0,void 0,(function*(){if(!Go){const n=Po.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9",cdnURL:"https://proxyseg.api.live.ledger.com/"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=v.exports.useCallback((e=>u(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=v.exports.useCallback((()=>u(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:v.exports.useCallback(((e,t={})=>u(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:v.exports.useCallback(((e,t={})=>u(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=v.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()};return i?g.exports.jsxs(g.exports.Fragment,{children:[g.exports.jsx(Xe,{}),g.exports.jsx(nt,Object.assign({id:"ModalWrapper",onClick:e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()}},{children:g.exports.jsxs(rt,{children:[g.exports.jsxs(st,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),g.exports.jsx(it,Object.assign({onClick:s},{children:g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),g.exports.jsx(g.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(I),I=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,I=-1,x=5,R=-1;function k(){return!(e.unstable_now()-R<x)}function P(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(P)};else if("undefined"!=typeof MessageChannel){var C=new MessageChannel,A=C.port2;C.port1.onmessage=P,E=function(){A.postMessage(null)}}else E=function(){y(P,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){I=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(I),I=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports} /** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function us(){if(ts)return is;ts=1;var e=v.exports,t=as();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var a=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,l={},f={};function h(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var d={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){d[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];d[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){d[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){d[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){d[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){d[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){d[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){d[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){d[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var p=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=d.hasOwnProperty(t)?d[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!u.call(f,e)||!u.call(l,e)&&(c.test(e)?f[e]=!0:(l[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(p,g);d[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){d[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),d.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){d[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),I=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),N=Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=N&&e[N]||e["@@iterator"])?e:null}var M,L=Object.assign;function j(e){if(void 0===M)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var U=!1;function D(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var u="\n"+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=s&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function z(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return D(e.type,!1);case 11:return D(e.type.render,!1);case 1:return D(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case b:return"Portal";case S:return"Profiler";case E:return"StrictMode";case R:return"Suspense";case k:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case x:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return F(e(t))}catch(e){}}return null}function B(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function G(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Q(e,t){Y(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?X(e,t.type,n):t.hasOwnProperty("defaultValue")&&X(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function X(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Z=Array.isArray;function ee(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function te(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ne(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(Z(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:H(r)}}function re(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ae,ue,ce=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ae=ae||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function de(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function pe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=de(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ge=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var me=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var be=null,we=null,Ee=null;function Se(e){if(e=vi(e)){if("function"!=typeof be)throw Error(n(280));var t=e.stateNode;t&&(t=_i(t),be(e.stateNode,e.type,t))}}function Oe(e){we?Ee?Ee.push(e):Ee=[e]:we=e}function Ie(){if(we){var e=we,t=Ee;if(Ee=we=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function xe(e,t){return e(t)}function Re(){}var ke=!1;function Pe(e,t,n){if(ke)return e(t,n);ke=!0;try{return xe(e,t,n)}finally{ke=!1,(null!==we||null!==Ee)&&(Re(),Ie())}}function Ce(e,t){var r=e.stateNode;if(null===r)return null;var i=_i(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Ae=!1;if(a)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(ue){Ae=!1}function Te(e,t,n,r,i,o,s,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Me=!1,Le=null,je=!1,Ue=null,De={onError:function(e){Me=!0,Le=e}};function ze(e,t,n,r,i,o,s,a,u){Me=!1,Le=null,Te.apply(De,arguments)}function Fe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Be(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function He(e){if(Fe(e)!==e)throw Error(n(188))}function qe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Fe(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(i=o.return)){r=i;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===r)return He(o),e;if(s===i)return He(o),t;s=s.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=s;else{for(var a=!1,u=o.child;u;){if(u===r){a=!0,r=o,i=s;break}if(u===i){a=!0,i=o,r=s;break}u=u.sibling}if(!a){for(u=s.child;u;){if(u===r){a=!0,r=s,i=o;break}if(u===i){a=!0,i=s,r=o;break}u=u.sibling}if(!a)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e),null!==e?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var $e=t.unstable_scheduleCallback,We=t.unstable_cancelCallback,Ke=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ye=t.unstable_now,Qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Xe=t.unstable_UserBlockingPriority,Ze=t.unstable_NormalPriority,et=t.unstable_LowPriority,tt=t.unstable_IdlePriority,nt=null,rt=null,it=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ot(e)/st|0)|0},ot=Math.log,st=Math.LN2,at=64,ut=4194304;function ct(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=ct(a):0!=(o&=s)&&(r=ct(o))}else 0!=(s=n&~i)?r=ct(s):0!==o&&(r=ct(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-it(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function dt(){var e=at;return 0==(4194240&(at<<=1))&&(at=64),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function mt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,bt,wt,Et,St,Ot=!1,It=[],xt=null,Rt=null,kt=null,Pt=new Map,Ct=new Map,At=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Tt(e,t){switch(e){case"focusin":case"focusout":xt=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":kt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ct.delete(t.pointerId)}}function Mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=vi(t))&&bt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lt(e){var t=yi(e.target);if(null!==t){var n=Fe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Be(n)))return e.blockedOn=t,void St(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=vi(n))&&bt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);me=r,n.target.dispatchEvent(r),me=null,t.shift()}return!0}function Ut(e,t,n){jt(e)&&n.delete(t)}function Dt(){Ot=!1,null!==xt&&jt(xt)&&(xt=null),null!==Rt&&jt(Rt)&&(Rt=null),null!==kt&&jt(kt)&&(kt=null),Pt.forEach(Ut),Ct.forEach(Ut)}function zt(e,n){e.blockedOn===n&&(e.blockedOn=null,Ot||(Ot=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Dt)))}function Ft(e){function t(t){return zt(t,e)}if(0<It.length){zt(It[0],e);for(var n=1;n<It.length;n++){var r=It[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==xt&&zt(xt,e),null!==Rt&&zt(Rt,e),null!==kt&&zt(kt,e),Pt.forEach(t),Ct.forEach(t),n=0;n<At.length;n++)(r=At[n]).blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&null===(n=At[0]).blockedOn;)Lt(n),null===n.blockedOn&&At.shift()}var Bt=m.ReactCurrentBatchConfig,Ht=!0;function qt(e,t,n,r){var i=vt,o=Bt.transition;Bt.transition=null;try{vt=1,$t(e,t,n,r)}finally{vt=i,Bt.transition=o}}function Vt(e,t,n,r){var i=vt,o=Bt.transition;Bt.transition=null;try{vt=4,$t(e,t,n,r)}finally{vt=i,Bt.transition=o}}function $t(e,t,n,r){if(Ht){var i=Kt(e,t,n,r);if(null===i)Hr(e,t,r,Wt,n),Tt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return xt=Mt(xt,e,t,n,r,i),!0;case"dragenter":return Rt=Mt(Rt,e,t,n,r,i),!0;case"mouseover":return kt=Mt(kt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Pt.set(o,Mt(Pt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ct.set(o,Mt(Ct.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Tt(e,r),4&t&&-1<Nt.indexOf(e)){for(;null!==i;){var o=vi(i);if(null!==o&&_t(o),null===(o=Kt(e,t,n,r))&&Hr(e,t,r,Wt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Wt=null;function Kt(e,t,n,r){if(Wt=null,null!==(e=yi(e=_e(r))))if(null===(t=Fe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Be(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Wt=e,null}function Gt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case Xe:return 4;case Ze:case et:return 16;case tt:return 536870912;default:return 16}default:return 16}}var Yt=null,Qt=null,Jt=null;function Xt(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function Zt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function en(){return!0}function tn(){return!1}function nn(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?en:tn,this.isPropagationStopped=tn,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=en)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=en)},persist:function(){},isPersistent:en}),t}var rn,on,sn,an={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=nn(an),cn=L({},an,{view:0,detail:0}),ln=nn(cn),fn=L({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(rn=e.screenX-sn.screenX,on=e.screenY-sn.screenY):on=rn=0,sn=e),rn)},movementY:function(e){return"movementY"in e?e.movementY:on}}),hn=nn(fn),dn=nn(L({},fn,{dataTransfer:0})),pn=nn(L({},cn,{relatedTarget:0})),gn=nn(L({},an,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=L({},an,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=nn(yn),mn=nn(L({},an,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function Sn(){return En}var On=L({},cn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Zt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?bn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?Zt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Zt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=nn(On),xn=nn(L({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=nn(L({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),kn=nn(L({},an,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=L({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Cn=nn(Pn),An=[9,13,27,32],Nn=a&&"CompositionEvent"in window,Tn=null;a&&"documentMode"in document&&(Tn=document.documentMode);var Mn=a&&"TextEvent"in window&&!Tn,Ln=a&&(!Nn||Tn&&8<Tn&&11>=Tn),jn=String.fromCharCode(32),Un=!1;function Dn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fn=!1,Bn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Bn[e.type]:"textarea"===t}function qn(e,t,n,r){Oe(r),0<(t=Vr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,$n=null;function Wn(e){jr(e,0)}function Kn(e){if($(mi(e)))return e}function Gn(e,t){if("change"===e)return t}var Yn=!1;if(a){var Qn;if(a){var Jn="oninput"in document;if(!Jn){var Xn=document.createElement("div");Xn.setAttribute("oninput","return;"),Jn="function"==typeof Xn.oninput}Qn=Jn}else Qn=!1;Yn=Qn&&(!document.documentMode||9<document.documentMode)}function Zn(){Vn&&(Vn.detachEvent("onpropertychange",er),$n=Vn=null)}function er(e){if("value"===e.propertyName&&Kn($n)){var t=[];qn(t,$n,e,_e(e)),Pe(Wn,t)}}function tr(e,t,n){"focusin"===e?(Zn(),$n=n,(Vn=t).attachEvent("onpropertychange",er)):"focusout"===e&&Zn()}function nr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn($n)}function rr(e,t){if("click"===e)return Kn(t)}function ir(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!or(e[i],t[i]))return!1}return!0}function ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=ar(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ar(r)}}function cr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?cr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var s=ur(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dr=a&&"documentMode"in document&&11>=document.documentMode,pr=null,gr=null,yr=null,vr=!1;function mr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==pr||pr!==W(r)||(r="selectionStart"in(r=pr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&sr(yr,r)||(yr=r,0<(r=Vr(gr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},wr={},Er={};function Sr(e){if(wr[e])return wr[e];if(!br[e])return e;var t,n=br[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return wr[e]=n[t];return e}a&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);var Or=Sr("animationend"),Ir=Sr("animationiteration"),xr=Sr("animationstart"),Rr=Sr("transitionend"),kr=new Map,Pr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cr(e,t){kr.set(e,t),o(t,[e])}for(var Ar=0;Ar<Pr.length;Ar++){var Nr=Pr[Ar];Cr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Cr(Or,"onAnimationEnd"),Cr(Ir,"onAnimationIteration"),Cr(xr,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(Rr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function Lr(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,s,a,u,c){if(ze.apply(this,arguments),Me){if(!Me)throw Error(n(198));var l=Le;Me=!1,Le=null,je||(je=!0,Ue=l)}}(i,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;Lr(i,a,c),o=u}else for(s=0;s<r.length;s++){if(u=(a=r[s]).instance,c=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;Lr(i,a,c),o=u}}}if(je)throw e=Ue,je=!1,Ue=null,e}function Ur(e,t){var n=t[di];void 0===n&&(n=t[di]=new Set);var r=e+"__bubble";n.has(r)||(Br(t,e,2,!1),n.add(r))}function Dr(e,t,n){var r=0;t&&(r|=4),Br(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Fr(e){if(!e[zr]){e[zr]=!0,r.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||Dr(t,!1,e),Dr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Dr("selectionchange",!1,t))}}function Br(e,t,n,r){switch(Gt(t)){case 1:var i=qt;break;case 4:i=Vt;break;default:i=$t}n=i.bind(null,t,n,e),i=void 0,!Ae||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var u=s.tag;if((3===u||4===u)&&((u=s.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=yi(a)))return;if(5===(u=s.tag)||6===u){r=o=s;continue e}a=a.parentNode}}r=r.return}Pe((function(){var r=o,i=_e(n),s=[];e:{var a=kr.get(e);if(void 0!==a){var u=un,c=e;switch(e){case"keypress":if(0===Zt(n))break e;case"keydown":case"keyup":u=In;break;case"focusin":c="focus",u=pn;break;case"focusout":c="blur",u=pn;break;case"beforeblur":case"afterblur":u=pn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=dn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Rn;break;case Or:case Ir:case xr:u=gn;break;case Rr:u=kn;break;case"scroll":u=ln;break;case"wheel":u=Cn;break;case"copy":case"cut":case"paste":u=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=xn}var l=0!=(4&t),f=!l&&"scroll"===e,h=l?null!==a?a+"Capture":null:a;l=[];for(var d,p=r;null!==p;){var g=(d=p).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==h&&null!=(g=Ce(p,h))&&l.push(qr(p,g,d))),f)break;p=p.return}0<l.length&&(a=new u(a,c,null,n,i),s.push({event:a,listeners:l}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===me||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[hi])&&(u||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(f=Fe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=hn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=xn,g="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?a:mi(u),d=null==c?a:mi(c),(a=new l(g,p+"leave",u,n,i)).target=f,a.relatedTarget=d,g=null,yi(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,g=l),f=g,u&&c)e:{for(h=c,p=0,d=l=u;d;d=$r(d))p++;for(d=0,g=h;g;g=$r(g))d++;for(;0<p-d;)l=$r(l),p--;for(;0<d-p;)h=$r(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=$r(l),h=$r(h)}l=null}else l=null;null!==u&&Wr(s,a,u,l,!1),null!==c&&null!==f&&Wr(s,f,c,l,!0)}if("select"===(u=(a=r?mi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===u&&"file"===a.type)var y=Gn;else if(Hn(a))if(Yn)y=ir;else{y=nr;var v=tr}else(u=a.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(y=rr);switch(y&&(y=y(e,r))?qn(s,y,n,i):(v&&v(e,a,r),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&X(a,"number",a.value)),v=r?mi(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(pr=v,gr=r,yr=null);break;case"focusout":yr=gr=pr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,mr(s,n,i);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":mr(s,n,i)}var m;if(Nn)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Fn?Dn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(Ln&&"ko"!==n.locale&&(Fn||"onCompositionStart"!==_?"onCompositionEnd"===_&&Fn&&(m=Xt()):(Qt="value"in(Yt=i)?Yt.value:Yt.textContent,Fn=!0)),0<(v=Vr(r,_)).length&&(_=new mn(_,e,null,n,i),s.push({event:_,listeners:v}),(m||null!==(m=zn(n)))&&(_.data=m))),(m=Mn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Un=!0,jn);case"textInput":return(e=t.data)===jn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Fn)return"compositionend"===e||!Nn&&Dn(e,t)?(e=Xt(),Jt=Qt=Yt=null,Fn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ln&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Vr(r,"onBeforeInput")).length&&(i=new mn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=m)}jr(s,t)}))}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ce(e,n))&&r.unshift(qr(e,o,i)),null!=(o=Ce(e,t))&&r.push(qr(e,o,i))),e=e.return}return r}function $r(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Wr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(null!==u&&u===r)break;5===a.tag&&null!==c&&(a=c,i?null!=(u=Ce(n,o))&&s.unshift(qr(n,u,a)):i||null!=(u=Ce(n,o))&&s.push(qr(n,u,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Kr=/\r\n?/g,Gr=/\u0000|\uFFFD/g;function Yr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace(Gr,"")}function Qr(e,t,r){if(t=Yr(t),Yr(e)!==t&&r)throw Error(n(425))}function Jr(){}var Xr=null,Zr=null;function ei(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ti="function"==typeof setTimeout?setTimeout:void 0,ni="function"==typeof clearTimeout?clearTimeout:void 0,ri="function"==typeof Promise?Promise:void 0,ii="function"==typeof queueMicrotask?queueMicrotask:void 0!==ri?function(e){return ri.resolve(null).then(e).catch(oi)}:ti;function oi(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ft(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ft(t)}function ai(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ci=Math.random().toString(36).slice(2),li="__reactFiber$"+ci,fi="__reactProps$"+ci,hi="__reactContainer$"+ci,di="__reactEvents$"+ci,pi="__reactListeners$"+ci,gi="__reactHandles$"+ci;function yi(e){var t=e[li];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hi]||n[li]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[li])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function vi(e){return!(e=e[li]||e[hi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function mi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function _i(e){return e[fi]||null}var bi=[],wi=-1;function Ei(e){return{current:e}}function Si(e){0>wi||(e.current=bi[wi],bi[wi]=null,wi--)}function Oi(e,t){wi++,bi[wi]=e.current,e.current=t}var Ii={},xi=Ei(Ii),Ri=Ei(!1),ki=Ii;function Pi(e,t){var n=e.type.contextTypes;if(!n)return Ii;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ci(e){return null!=e.childContextTypes}function Ai(){Si(Ri),Si(xi)}function Ni(e,t,r){if(xi.current!==Ii)throw Error(n(168));Oi(xi,t),Oi(Ri,r)}function Ti(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,B(e)||"Unknown",o));return L({},r,i)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ii,ki=xi.current,Oi(xi,e),Oi(Ri,Ri.current),!0}function Li(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Ti(e,t,ki),i.__reactInternalMemoizedMergedChildContext=e,Si(Ri),Si(xi),Oi(xi,e)):Si(Ri),Oi(Ri,r)}var ji=null,Ui=!1,Di=!1;function zi(e){null===ji?ji=[e]:ji.push(e)}function Fi(){if(!Di&&null!==ji){Di=!0;var e=0,t=vt;try{var n=ji;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ji=null,Ui=!1}catch(t){throw null!==ji&&(ji=ji.slice(e+1)),$e(Je,Fi),t}finally{vt=t,Di=!1}}return null}var Bi=[],Hi=0,qi=null,Vi=0,$i=[],Wi=0,Ki=null,Gi=1,Yi="";function Qi(e,t){Bi[Hi++]=Vi,Bi[Hi++]=qi,qi=e,Vi=t}function Ji(e,t,n){$i[Wi++]=Gi,$i[Wi++]=Yi,$i[Wi++]=Ki,Ki=e;var r=Gi;e=Yi;var i=32-it(r)-1;r&=~(1<<i),n+=1;var o=32-it(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Gi=1<<32-it(t)+i|n<<i|r,Yi=o+e}else Gi=1<<o|n<<i|r,Yi=e}function Xi(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function Zi(e){for(;e===qi;)qi=Bi[--Hi],Bi[Hi]=null,Vi=Bi[--Hi],Bi[Hi]=null;for(;e===Ki;)Ki=$i[--Wi],$i[Wi]=null,Yi=$i[--Wi],$i[Wi]=null,Gi=$i[--Wi],$i[Wi]=null}var eo=null,to=null,no=!1,ro=null;function io(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,eo=e,to=ai(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,eo=e,to=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ki?{id:Gi,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,eo=e,to=null,!0);default:return!1}}function so(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ao(e){if(no){var t=to;if(t){var r=t;if(!oo(e,t)){if(so(e))throw Error(n(418));t=ai(r.nextSibling);var i=eo;t&&oo(e,t)?io(i,r):(e.flags=-4097&e.flags|2,no=!1,eo=e)}}else{if(so(e))throw Error(n(418));e.flags=-4097&e.flags|2,no=!1,eo=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;eo=e}function co(e){if(e!==eo)return!1;if(!no)return uo(e),no=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ei(e.type,e.memoizedProps)),t&&(t=to)){if(so(e))throw lo(),Error(n(418));for(;t;)io(e,t),t=ai(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){to=ai(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}to=null}}else to=eo?ai(e.stateNode.nextSibling):null;return!0}function lo(){for(var e=to;e;)e=ai(e.nextSibling)}function fo(){to=eo=null,no=!1}function ho(e){null===ro?ro=[e]:ro.push(e)}var po=m.ReactCurrentBatchConfig;function go(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yo=Ei(null),vo=null,mo=null,_o=null;function bo(){_o=mo=vo=null}function wo(e){var t=yo.current;Si(yo),e._currentValue=t}function Eo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function So(e,t){vo=e,_o=mo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(wa=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(_o!==e)if(e={context:e,memoizedValue:t,next:null},null===mo){if(null===vo)throw Error(n(308));mo=e,vo.dependencies={lanes:0,firstContext:e}}else mo=mo.next=e;return t}var Io=null;function xo(e){null===Io?Io=[e]:Io.push(e)}function Ro(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,xo(t)):(n.next=i.next,i.next=n),t.interleaved=n,ko(e,r)}function ko(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Po=!1;function Co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function No(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function To(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cu)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ko(e,n)}return null===(i=r.interleaved)?(t.next=t,xo(r)):(t.next=i.next,i.next=t),r.interleaved=t,ko(e,n)}function Mo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Lo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jo(e,t,n,r){var i=e.updateQueue;Po=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var u=a,c=u.next;u.next=null,null===s?o=c:s.next=c,s=u;var l=e.alternate;null!==l&&(a=(l=l.updateQueue).lastBaseUpdate)!==s&&(null===a?l.firstBaseUpdate=c:a.next=c,l.lastBaseUpdate=u)}if(null!==o){var f=i.baseState;for(s=0,l=c=u=null,a=o;;){var h=a.lane,d=a.eventTime;if((r&h)===h){null!==l&&(l=l.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(h=t,d=n,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(d,f,h):p))break e;f=L({},f,h);break e;case 2:Po=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else d={eventTime:d,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===l?(c=l=d,u=f):l=l.next=d,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===l&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Du|=s,e.lanes=s,e.memoizedState=f}}function Uo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var Do=(new e.Component).refs;function zo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:L({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Fo={isMounted:function(e){return!!(e=e._reactInternals)&&Fe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nc(),i=rc(e),o=No(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=To(e,o,i))&&(ic(t,e,i,r),Mo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nc(),i=rc(e),o=No(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=To(e,o,i))&&(ic(t,e,i,r),Mo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nc(),r=rc(e),i=No(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=To(e,i,r))&&(ic(t,e,r,n),Mo(t,e,r))}};function Bo(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&sr(n,r)&&sr(i,o))}function Ho(e,t,n){var r=!1,i=Ii,o=t.contextType;return"object"==typeof o&&null!==o?o=Oo(o):(i=Ci(t)?ki:xi.current,o=(r=null!=(r=t.contextTypes))?Pi(e,i):Ii),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Fo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function qo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Fo.enqueueReplaceState(t,t.state,null)}function Vo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Do,Co(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Oo(o):(o=Ci(t)?ki:xi.current,i.context=Pi(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(zo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Fo.enqueueReplaceState(i,i.state,null),jo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function $o(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=o.refs;t===Do&&(t=o.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function Wo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ko(e){return(0,e._init)(e._payload)}function Go(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Lc(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=zc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===w?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===C&&Ko(i)===t.type)?((r=o(t,n.props)).ref=$o(e,t,n),r.return=e,r):((r=jc(n.type,n.key,n.props,null,e.mode,r)).ref=$o(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Uc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=jc(t.type,t.key,t.props,null,e.mode,n)).ref=$o(e,null,t),n.return=e,n;case b:return(t=Fc(t,e.mode,n)).return=e,t;case C:return h(e,(0,t._init)(t._payload),n)}if(Z(t)||T(t))return(t=Uc(t,e.mode,n,null)).return=e,t;Wo(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?c(e,t,n,r):null;case b:return n.key===i?l(e,t,n,r):null;case C:return d(e,t,(i=n._init)(n._payload),r)}if(Z(n)||T(n))return null!==i?null:f(e,t,n,r,null);Wo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case C:return p(e,t,n,(0,r._init)(r._payload),i)}if(Z(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);Wo(t,r)}return null}function g(n,o,a,u){for(var c=null,l=null,f=o,g=o=0,y=null;null!==f&&g<a.length;g++){f.index>g?(y=f,f=null):y=f.sibling;var v=d(n,f,a[g],u);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(n,f),o=s(v,o,g),null===l?c=v:l.sibling=v,l=v,f=y}if(g===a.length)return r(n,f),no&&Qi(n,g),c;if(null===f){for(;g<a.length;g++)null!==(f=h(n,a[g],u))&&(o=s(f,o,g),null===l?c=f:l.sibling=f,l=f);return no&&Qi(n,g),c}for(f=i(n,f);g<a.length;g++)null!==(y=p(f,n,g,a[g],u))&&(e&&null!==y.alternate&&f.delete(null===y.key?g:y.key),o=s(y,o,g),null===l?c=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(n,e)})),no&&Qi(n,g),c}function y(o,a,u,c){var l=T(u);if("function"!=typeof l)throw Error(n(150));if(null==(u=l.call(u)))throw Error(n(151));for(var f=l=null,g=a,y=a=0,v=null,m=u.next();null!==g&&!m.done;y++,m=u.next()){g.index>y?(v=g,g=null):v=g.sibling;var _=d(o,g,m.value,c);if(null===_){null===g&&(g=v);break}e&&g&&null===_.alternate&&t(o,g),a=s(_,a,y),null===f?l=_:f.sibling=_,f=_,g=v}if(m.done)return r(o,g),no&&Qi(o,y),l;if(null===g){for(;!m.done;y++,m=u.next())null!==(m=h(o,m.value,c))&&(a=s(m,a,y),null===f?l=m:f.sibling=m,f=m);return no&&Qi(o,y),l}for(g=i(o,g);!m.done;y++,m=u.next())null!==(m=p(g,o,y,m.value,c))&&(e&&null!==m.alternate&&g.delete(null===m.key?y:m.key),a=s(m,a,y),null===f?l=m:f.sibling=m,f=m);return e&&g.forEach((function(e){return t(o,e)})),no&&Qi(o,y),l}return function e(n,i,s,u){if("object"==typeof s&&null!==s&&s.type===w&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var c=s.key,l=i;null!==l;){if(l.key===c){if((c=s.type)===w){if(7===l.tag){r(n,l.sibling),(i=o(l,s.props.children)).return=n,n=i;break e}}else if(l.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===C&&Ko(c)===l.type){r(n,l.sibling),(i=o(l,s.props)).ref=$o(n,l,s),i.return=n,n=i;break e}r(n,l);break}t(n,l),l=l.sibling}s.type===w?((i=Uc(s.props.children,n.mode,u,s.key)).return=n,n=i):((u=jc(s.type,s.key,s.props,null,n.mode,u)).ref=$o(n,i,s),u.return=n,n=u)}return a(n);case b:e:{for(l=s.key;null!==i;){if(i.key===l){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){r(n,i.sibling),(i=o(i,s.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Fc(s,n.mode,u)).return=n,n=i}return a(n);case C:return e(n,i,(l=s._init)(s._payload),u)}if(Z(s))return g(n,i,s,u);if(T(s))return y(n,i,s,u);Wo(n,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,s)).return=n,n=i):(r(n,i),(i=zc(s,n.mode,u)).return=n,n=i),a(n)):r(n,i)}}var Yo=Go(!0),Qo=Go(!1),Jo={},Xo=Ei(Jo),Zo=Ei(Jo),es=Ei(Jo);function ns(e){if(e===Jo)throw Error(n(174));return e}function rs(e,t){switch(Oi(es,t),Oi(Zo,e),Oi(Xo,Jo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Xo),Oi(Xo,t)}function os(){Si(Xo),Si(Zo),Si(es)}function ss(e){ns(es.current);var t=ns(Xo.current),n=se(t,e.type);t!==n&&(Oi(Zo,e),Oi(Xo,n))}function us(e){Zo.current===e&&(Si(Xo),Si(Zo))}var cs=Ei(0);function ls(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fs=[];function hs(){for(var e=0;e<fs.length;e++)fs[e]._workInProgressVersionPrimary=null;fs.length=0}var ds=m.ReactCurrentDispatcher,ps=m.ReactCurrentBatchConfig,gs=0,ys=null,vs=null,ms=null,_s=!1,bs=!1,ws=0,Es=0;function Ss(){throw Error(n(321))}function Os(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function Is(e,t,r,i,o,s){if(gs=s,ys=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?ua:ca,e=r(i,o),bs){s=0;do{if(bs=!1,ws=0,25<=s)throw Error(n(301));s+=1,ms=vs=null,t.updateQueue=null,ds.current=la,e=r(i,o)}while(bs)}if(ds.current=aa,t=null!==vs&&null!==vs.next,gs=0,ms=vs=ys=null,_s=!1,t)throw Error(n(300));return e}function xs(){var e=0!==ws;return ws=0,e}function Rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ms?ys.memoizedState=ms=e:ms=ms.next=e,ms}function ks(){if(null===vs){var e=ys.alternate;e=null!==e?e.memoizedState:null}else e=vs.next;var t=null===ms?ys.memoizedState:ms.next;if(null!==t)ms=t,vs=e;else{if(null===e)throw Error(n(310));e={memoizedState:(vs=e).memoizedState,baseState:vs.baseState,baseQueue:vs.baseQueue,queue:vs.queue,next:null},null===ms?ys.memoizedState=ms=e:ms=ms.next=e}return ms}function Ps(e,t){return"function"==typeof t?t(e):t}function Cs(e){var t=ks(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=vs,o=i.baseQueue,s=r.pending;if(null!==s){if(null!==o){var a=o.next;o.next=s.next,s.next=a}i.baseQueue=o=s,r.pending=null}if(null!==o){s=o.next,i=i.baseState;var u=a=null,c=null,l=s;do{var f=l.lane;if((gs&f)===f)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),i=l.hasEagerState?l.eagerState:e(i,l.action);else{var h={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(u=c=h,a=i):c=c.next=h,ys.lanes|=f,Du|=f}l=l.next}while(null!==l&&l!==s);null===c?a=i:c.next=u,or(i,t.memoizedState)||(wa=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=c,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{s=o.lane,ys.lanes|=s,Du|=s,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function As(e){var t=ks(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,s=t.memoizedState;if(null!==o){r.pending=null;var a=o=o.next;do{s=e(s,a.action),a=a.next}while(a!==o);or(s,t.memoizedState)||(wa=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),r.lastRenderedState=s}return[s,i]}function Ns(){}function Ts(e,t){var r=ys,i=ks(),o=t(),s=!or(i.memoizedState,o);if(s&&(i.memoizedState=o,wa=!0),i=i.queue,$s(js.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==ms&&1&ms.memoizedState.tag){if(r.flags|=2048,Fs(9,Ls.bind(null,r,i,o,t),void 0,null),null===Au)throw Error(n(349));0!=(30&gs)||Ms(r,t,o)}return o}function Ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ls(e,t,n,r){t.value=n,t.getSnapshot=r,Us(t)&&Ds(e)}function js(e,t,n){return n((function(){Us(t)&&Ds(e)}))}function Us(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Ds(e){var t=ko(e,1);null!==t&&ic(t,e,1,-1)}function zs(e){var t=Rs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t.queue=e,e=e.dispatch=ra.bind(null,ys,e),[t.memoizedState,e]}function Fs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ys.updateQueue)?(t={lastEffect:null,stores:null},ys.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bs(){return ks().memoizedState}function Hs(e,t,n,r){var i=Rs();ys.flags|=e,i.memoizedState=Fs(1|t,n,void 0,void 0===r?null:r)}function qs(e,t,n,r){var i=ks();r=void 0===r?null:r;var o=void 0;if(null!==vs){var s=vs.memoizedState;if(o=s.destroy,null!==r&&Os(r,s.deps))return void(i.memoizedState=Fs(t,n,o,r))}ys.flags|=e,i.memoizedState=Fs(1|t,n,o,r)}function Vs(e,t){return Hs(8390656,8,e,t)}function $s(e,t){return qs(2048,8,e,t)}function Ws(e,t){return qs(4,2,e,t)}function Ks(e,t){return qs(4,4,e,t)}function Gs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ys(e,t,n){return n=null!=n?n.concat([e]):null,qs(4,4,Gs.bind(null,t,e),n)}function Qs(){}function Js(e,t){var n=ks();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=ks();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Os(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zs(e,t,n){return 0==(21&gs)?(e.baseState&&(e.baseState=!1,wa=!0),e.memoizedState=n):(or(n,t)||(n=dt(),ys.lanes|=n,Du|=n,e.baseState=!0),t)}function ea(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ps.transition;ps.transition={};try{e(!1),t()}finally{vt=n,ps.transition=r}}function ta(){return ks().memoizedState}function na(e,t,n){var r=rc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ia(e)?oa(t,n):null!==(n=Ro(e,t,n,r))&&(ic(n,e,r,nc()),sa(n,t,r))}function ra(e,t,n){var r=rc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ia(e))oa(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,or(a,s)){var u=t.interleaved;return null===u?(i.next=i,xo(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ro(e,t,i,r))&&(ic(n,e,r,i=nc()),sa(n,t,r))}}function ia(e){var t=e.alternate;return e===ys||null!==t&&t===ys}function oa(e,t){bs=_s=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sa(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var aa={readContext:Oo,useCallback:Ss,useContext:Ss,useEffect:Ss,useImperativeHandle:Ss,useInsertionEffect:Ss,useLayoutEffect:Ss,useMemo:Ss,useReducer:Ss,useRef:Ss,useState:Ss,useDebugValue:Ss,useDeferredValue:Ss,useTransition:Ss,useMutableSource:Ss,useSyncExternalStore:Ss,useId:Ss,unstable_isNewReconciler:!1},ua={readContext:Oo,useCallback:function(e,t){return Rs().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Vs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Hs(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hs(4,2,e,t)},useMemo:function(e,t){var n=Rs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=na.bind(null,ys,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Rs().memoizedState=e},useState:zs,useDebugValue:Qs,useDeferredValue:function(e){return Rs().memoizedState=e},useTransition:function(){var e=zs(!1),t=e[0];return e=ea.bind(null,e[1]),Rs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ys,o=Rs();if(no){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Au)throw Error(n(349));0!=(30&gs)||Ms(i,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,Vs(js.bind(null,i,s,e),[e]),i.flags|=2048,Fs(9,Ls.bind(null,i,s,r,t),void 0,null),r},useId:function(){var e=Rs(),t=Au.identifierPrefix;if(no){var n=Yi;t=":"+t+"R"+(n=(Gi&~(1<<32-it(Gi)-1)).toString(32)+n),0<(n=ws++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Es++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ca={readContext:Oo,useCallback:Js,useContext:Oo,useEffect:$s,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Ks,useMemo:Xs,useReducer:Cs,useRef:Bs,useState:function(){return Cs(Ps)},useDebugValue:Qs,useDeferredValue:function(e){return Zs(ks(),vs.memoizedState,e)},useTransition:function(){return[Cs(Ps)[0],ks().memoizedState]},useMutableSource:Ns,useSyncExternalStore:Ts,useId:ta,unstable_isNewReconciler:!1},la={readContext:Oo,useCallback:Js,useContext:Oo,useEffect:$s,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Ks,useMemo:Xs,useReducer:As,useRef:Bs,useState:function(){return As(Ps)},useDebugValue:Qs,useDeferredValue:function(e){var t=ks();return null===vs?t.memoizedState=e:Zs(t,vs.memoizedState,e)},useTransition:function(){return[As(Ps)[0],ks().memoizedState]},useMutableSource:Ns,useSyncExternalStore:Ts,useId:ta,unstable_isNewReconciler:!1};function fa(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ha(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var pa="function"==typeof WeakMap?WeakMap:Map;function ga(e,t,n){(n=No(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wu||(Wu=!0,Ku=r),da(0,t)},n}function ya(e,t,n){(n=No(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!=typeof r&&(null===Gu?Gu=new Set([this]):Gu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function va(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pa;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Rc.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function _a(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=No(-1,1)).tag=2,To(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ba=m.ReactCurrentOwner,wa=!1;function Ea(e,t,n,r){t.child=null===e?Qo(t,null,n,r):Yo(t,e.child,n,r)}function Sa(e,t,n,r,i){n=n.render;var o=t.ref;return So(t,i),r=Is(e,t,n,r,o,i),n=xs(),null===e||wa?(no&&n&&Xi(t),t.flags|=1,Ea(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wa(e,t,i))}function Oa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Mc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=jc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ia(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(s,r)&&e.ref===t.ref)return Wa(e,t,i)}return t.flags|=1,(e=Lc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ia(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(sr(o,r)&&e.ref===t.ref){if(wa=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Wa(e,t,i);0!=(131072&e.flags)&&(wa=!0)}}return ka(e,t,n,r,i)}function xa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(Lu,Mu),Mu|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(Lu,Mu),Mu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Oi(Lu,Mu),Mu|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Oi(Lu,Mu),Mu|=r;return Ea(e,t,i,n),t.child}function Ra(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ka(e,t,n,r,i){var o=Ci(n)?ki:xi.current;return o=Pi(t,o),So(t,i),n=Is(e,t,n,r,o,i),r=xs(),null===e||wa?(no&&r&&Xi(t),t.flags|=1,Ea(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wa(e,t,i))}function Pa(e,t,n,r,i){if(Ci(n)){var o=!0;Mi(t)}else o=!1;if(So(t,i),null===t.stateNode)$a(e,t),Ho(t,n,r),Vo(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;c="object"==typeof c&&null!==c?Oo(c):Pi(t,c=Ci(n)?ki:xi.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof s.getSnapshotBeforeUpdate;f||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||u!==c)&&qo(t,s,r,c),Po=!1;var h=t.memoizedState;s.state=h,jo(t,r,s,i),u=t.memoizedState,a!==r||h!==u||Ri.current||Po?("function"==typeof l&&(zo(t,n,l,r),u=t.memoizedState),(a=Po||Bo(t,n,a,r,h,u,c))?(f||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ao(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:go(t.type,a),s.props=c,f=t.pendingProps,h=s.context,u="object"==typeof(u=n.contextType)&&null!==u?Oo(u):Pi(t,u=Ci(n)?ki:xi.current);var d=n.getDerivedStateFromProps;(l="function"==typeof d||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==f||h!==u)&&qo(t,s,r,u),Po=!1,h=t.memoizedState,s.state=h,jo(t,r,s,i);var p=t.memoizedState;a!==f||h!==p||Ri.current||Po?("function"==typeof d&&(zo(t,n,d,r),p=t.memoizedState),(c=Po||Bo(t,n,c,r,h,p,u)||!1)?(l||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,u),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=u,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ca(e,t,n,r,o,i)}function Ca(e,t,n,r,i,o){Ra(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Li(t,n,!1),Wa(e,t,o);r=t.stateNode,ba.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,a,o)):Ea(e,t,a,o),t.memoizedState=r.state,i&&Li(t,n,!0),t.child}function Aa(e){var t=e.stateNode;t.pendingContext?Ni(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ni(0,t.context,!1),rs(e,t.containerInfo)}function Na(e,t,n,r,i){return fo(),ho(i),t.flags|=256,Ea(e,t,n,r),t.child}var Ta,Ma,La,ja,Ua={dehydrated:null,treeContext:null,retryLane:0};function Da(e){return{baseLanes:e,cachePool:null,transitions:null}}function za(e,t,r){var i,o=t.pendingProps,s=cs.current,a=!1,u=0!=(128&t.flags);if((i=u)||(i=(null===e||null!==e.memoizedState)&&0!=(2&s)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Oi(cs,1&s),null===e)return ao(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=o.children,e=o.fallback,a?(o=t.mode,a=t.child,u={mode:"hidden",children:u},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=u):a=Dc(u,o,0,null),e=Uc(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Da(r),t.memoizedState=Ua,e):Fa(t,u));if(null!==(s=e.memoizedState)&&null!==(i=s.dehydrated))return function(e,t,r,i,o,s,a){if(r)return 256&t.flags?(t.flags&=-257,Ba(e,t,a,i=ha(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,o=t.mode,i=Dc({mode:"visible",children:i.children},o,0,null),(s=Uc(s,o,a,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!=(1&t.mode)&&Yo(t,e.child,null,a),t.child.memoizedState=Da(a),t.memoizedState=Ua,s);if(0==(1&t.mode))return Ba(e,t,a,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var u=i.dgst;return i=u,Ba(e,t,a,i=ha(s=Error(n(419)),i,void 0))}if(u=0!=(a&e.childLanes),wa||u){if(null!==(i=Au)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(i.suspendedLanes|a))?0:o)&&o!==s.retryLane&&(s.retryLane=o,ko(e,o),ic(i,e,o,-1))}return vc(),Ba(e,t,a,i=ha(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Pc.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,to=ai(o.nextSibling),eo=t,no=!0,ro=null,null!==e&&($i[Wi++]=Gi,$i[Wi++]=Yi,$i[Wi++]=Ki,Gi=e.id,Yi=e.overflow,Ki=t),(t=Fa(t,i.children)).flags|=4096,t)}(e,t,u,o,i,s,r);if(a){a=o.fallback,u=t.mode,i=(s=e.child).sibling;var c={mode:"hidden",children:o.children};return 0==(1&u)&&t.child!==s?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=Lc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==i?a=Lc(i,a):(a=Uc(a,u,r,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,u=null===(u=e.child.memoizedState)?Da(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=e.childLanes&~r,t.memoizedState=Ua,o}return e=(a=e.child).sibling,o=Lc(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Fa(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ba(e,t,n,r){return null!==r&&ho(r),Yo(t,e.child,null,n),(e=Fa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ha(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Eo(e.return,t,n)}function qa(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Va(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ea(e,t,r.children,n),0!=(2&(r=cs.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n,t);else if(19===e.tag)Ha(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(cs,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ls(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),qa(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ls(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}qa(t,!0,n,null,o);break;case"together":qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $a(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wa(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Du|=t.lanes,0==(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Lc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Lc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Ka(e,t){if(!no)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ga(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ya(e,t,r){var o=t.pendingProps;switch(Zi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ga(t),null;case 1:case 17:return Ci(t.type)&&Ai(),Ga(t),null;case 3:return o=t.stateNode,os(),Si(Ri),Si(xi),hs(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(co(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==ro&&(uc(ro),ro=null))),Ma(e,t),Ga(t),null;case 5:us(t);var s=ns(es.current);if(r=t.type,null!==e&&null!=t.stateNode)La(e,t,r,o,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Ga(t),null}if(e=ns(Xo.current),co(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[li]=t,o[fi]=a,e=0!=(1&t.mode),r){case"dialog":Ur("cancel",o),Ur("close",o);break;case"iframe":case"object":case"embed":Ur("load",o);break;case"video":case"audio":for(s=0;s<Tr.length;s++)Ur(Tr[s],o);break;case"source":Ur("error",o);break;case"img":case"image":case"link":Ur("error",o),Ur("load",o);break;case"details":Ur("toggle",o);break;case"input":G(o,a),Ur("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Ur("invalid",o);break;case"textarea":ne(o,a),Ur("invalid",o)}for(var u in ye(r,a),s=null,a)if(a.hasOwnProperty(u)){var c=a[u];"children"===u?"string"==typeof c?o.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(o.textContent,c,e),s=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(o.textContent,c,e),s=["children",""+c]):i.hasOwnProperty(u)&&null!=c&&"onScroll"===u&&Ur("scroll",o)}switch(r){case"input":V(o),J(o,a,!0);break;case"textarea":V(o),ie(o);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(o.onclick=Jr)}o=s,t.updateQueue=o,null!==o&&(t.flags|=4)}else{u=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(r,{is:o.is}):(e=u.createElement(r),"select"===r&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,r),e[li]=t,e[fi]=o,Ta(e,t,!1,!1),t.stateNode=e;e:{switch(u=ve(r,o),r){case"dialog":Ur("cancel",e),Ur("close",e),s=o;break;case"iframe":case"object":case"embed":Ur("load",e),s=o;break;case"video":case"audio":for(s=0;s<Tr.length;s++)Ur(Tr[s],e);s=o;break;case"source":Ur("error",e),s=o;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),s=o;break;case"details":Ur("toggle",e),s=o;break;case"input":G(e,o),s=K(e,o),Ur("invalid",e);break;case"option":default:s=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},s=L({},o,{value:void 0}),Ur("invalid",e);break;case"textarea":ne(e,o),s=te(e,o),Ur("invalid",e)}for(a in ye(r,s),c=s)if(c.hasOwnProperty(a)){var l=c[a];"style"===a?pe(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&ce(e,l):"children"===a?"string"==typeof l?("textarea"!==r||""!==l)&&le(e,l):"number"==typeof l&&le(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(i.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Ur("scroll",e):null!=l&&y(e,a,l,u))}switch(r){case"input":V(e),J(e,o,!1);break;case"textarea":V(e),ie(e);break;case"option":null!=o.value&&e.setAttribute("value",""+H(o.value));break;case"select":e.multiple=!!o.multiple,null!=(a=o.value)?ee(e,!!o.multiple,a,!1):null!=o.defaultValue&&ee(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=Jr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ga(t),null;case 6:if(e&&null!=t.stateNode)ja(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=ns(es.current),ns(Xo.current),co(t)){if(o=t.stateNode,r=t.memoizedProps,o[li]=t,(a=o.nodeValue!==r)&&null!==(e=eo))switch(e.tag){case 3:Qr(o.nodeValue,r,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(o.nodeValue,r,0!=(1&e.mode))}a&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[li]=t,t.stateNode=o}return Ga(t),null;case 13:if(Si(cs),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(no&&null!==to&&0!=(1&t.mode)&&0==(128&t.flags))lo(),fo(),t.flags|=98560,a=!1;else if(a=co(t),null!==o&&null!==o.dehydrated){if(null===e){if(!a)throw Error(n(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(n(317));a[li]=t}else fo(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ga(t),a=!1}else null!==ro&&(uc(ro),ro=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&cs.current)?0===ju&&(ju=3):vc())),null!==t.updateQueue&&(t.flags|=4),Ga(t),null);case 4:return os(),Ma(e,t),null===e&&Fr(t.stateNode.containerInfo),Ga(t),null;case 10:return wo(t.type._context),Ga(t),null;case 19:if(Si(cs),null===(a=t.memoizedState))return Ga(t),null;if(o=0!=(128&t.flags),null===(u=a.rendering))if(o)Ka(a,!1);else{if(0!==ju||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=ls(e))){for(t.flags|=128,Ka(a,!1),null!==(o=u.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(a=r).flags&=14680066,null===(u=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,e=u.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Oi(cs,1&cs.current|2),t.child}e=e.sibling}null!==a.tail&&Ye()>Vu&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=ls(u))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Ka(a,!0),null===a.tail&&"hidden"===a.tailMode&&!u.alternate&&!no)return Ga(t),null}else 2*Ye()-a.renderingStartTime>Vu&&1073741824!==r&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(null!==(r=a.last)?r.sibling=u:t.child=u,a.last=u)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,r=cs.current,Oi(cs,o?1&r|2:1&r),t):(Ga(t),null);case 22:case 23:return dc(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&0!=(1&t.mode)?0!=(1073741824&Mu)&&(Ga(t),6&t.subtreeFlags&&(t.flags|=8192)):Ga(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Qa(e,t){switch(Zi(t),t.tag){case 1:return Ci(t.type)&&Ai(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),Si(Ri),Si(xi),hs(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return us(t),null;case 13:if(Si(cs),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(cs),null;case 4:return os(),null;case 10:return wo(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ta=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ma=function(){},La=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ns(Xo.current);var s,a=null;switch(n){case"input":o=K(e,o),r=K(e,r),a=[];break;case"select":o=L({},o,{value:void 0}),r=L({},r,{value:void 0}),a=[];break;case"textarea":o=te(e,o),r=te(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(l in ye(n,r),n=null,o)if(!r.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if("style"===l){var u=o[l];for(s in u)u.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(i.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var c=r[l];if(u=null!=o?o[l]:void 0,r.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(s in u)!u.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&u[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(a=a||[]).push(l,c)):"children"===l?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(i.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Ur("scroll",e),a||u===c||(a=[])):(a=a||[]).push(l,c))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ja=!1,Xa=!1,Za="function"==typeof WeakSet?WeakSet:Set,eu=null;function tu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xc(e,t,n)}else n.current=null}function nu(e,t,n){try{n()}catch(n){xc(e,t,n)}}var ru=!1;function iu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&nu(t,n,o)}i=i.next}while(i!==r)}}function ou(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function su(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[li],delete t[fi],delete t[di],delete t[pi],delete t[gi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uu(e){return 5===e.tag||3===e.tag||4===e.tag}function cu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||uu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(lu(e,t,n),e=e.sibling;null!==e;)lu(e,t,n),e=e.sibling}function fu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(fu(e,t,n),e=e.sibling;null!==e;)fu(e,t,n),e=e.sibling}var hu=null,du=!1;function pu(e,t,n){for(n=n.child;null!==n;)gu(e,t,n),n=n.sibling}function gu(e,t,n){if(rt&&"function"==typeof rt.onCommitFiberUnmount)try{rt.onCommitFiberUnmount(nt,n)}catch(e){}switch(n.tag){case 5:Xa||tu(n,t);case 6:var r=hu,i=du;hu=null,pu(e,t,n),du=i,null!==(hu=r)&&(du?(e=hu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hu.removeChild(n.stateNode));break;case 18:null!==hu&&(du?(e=hu,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),Ft(e)):si(hu,n.stateNode));break;case 4:r=hu,i=du,hu=n.stateNode.containerInfo,du=!0,pu(e,t,n),hu=r,du=i;break;case 0:case 11:case 14:case 15:if(!Xa&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!=(2&o)||0!=(4&o))&&nu(n,t,s),i=i.next}while(i!==r)}pu(e,t,n);break;case 1:if(!Xa&&(tu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xc(n,t,e)}pu(e,t,n);break;case 21:pu(e,t,n);break;case 22:1&n.mode?(Xa=(r=Xa)||null!==n.memoizedState,pu(e,t,n),Xa=r):pu(e,t,n);break;default:pu(e,t,n)}}function yu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Za),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vu(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var s=e,a=t,u=a;e:for(;null!==u;){switch(u.tag){case 5:hu=u.stateNode,du=!1;break e;case 3:case 4:hu=u.stateNode.containerInfo,du=!0;break e}u=u.return}if(null===hu)throw Error(n(160));gu(s,a,o),hu=null,du=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){xc(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mu(t,e),t=t.sibling}function mu(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vu(t,e),_u(e),4&i){try{iu(3,e,e.return),ou(3,e)}catch(t){xc(e,e.return,t)}try{iu(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:vu(t,e),_u(e),512&i&&null!==r&&tu(r,r.return);break;case 5:if(vu(t,e),_u(e),512&i&&null!==r&&tu(r,r.return),32&e.flags){var o=e.stateNode;try{le(o,"")}catch(t){xc(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var s=e.memoizedProps,a=null!==r?r.memoizedProps:s,u=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===u&&"radio"===s.type&&null!=s.name&&Y(o,s),ve(u,a);var l=ve(u,s);for(a=0;a<c.length;a+=2){var f=c[a],h=c[a+1];"style"===f?pe(o,h):"dangerouslySetInnerHTML"===f?ce(o,h):"children"===f?le(o,h):y(o,f,h,l)}switch(u){case"input":Q(o,s);break;case"textarea":re(o,s);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ee(o,!!s.multiple,p,!1):d!==!!s.multiple&&(null!=s.defaultValue?ee(o,!!s.multiple,s.defaultValue,!0):ee(o,!!s.multiple,s.multiple?[]:"",!1))}o[fi]=s}catch(t){xc(e,e.return,t)}}break;case 6:if(vu(t,e),_u(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(t){xc(e,e.return,t)}}break;case 3:if(vu(t,e),_u(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{Ft(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:vu(t,e),_u(e);break;case 13:vu(t,e),_u(e),8192&(o=e.child).flags&&(s=null!==o.memoizedState,o.stateNode.isHidden=s,!s||null!==o.alternate&&null!==o.alternate.memoizedState||(qu=Ye())),4&i&&yu(e);break;case 22:if(f=null!==r&&null!==r.memoizedState,1&e.mode?(Xa=(l=Xa)||f,vu(t,e),Xa=l):vu(t,e),_u(e),8192&i){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&0!=(1&e.mode))for(eu=e,f=e.child;null!==f;){for(h=eu=f;null!==eu;){switch(p=(d=eu).child,d.tag){case 0:case 11:case 14:case 15:iu(4,d,d.return);break;case 1:tu(d,d.return);var g=d.stateNode;if("function"==typeof g.componentWillUnmount){i=d,r=d.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){xc(i,r,e)}}break;case 5:tu(d,d.return);break;case 22:if(null!==d.memoizedState){Su(h);continue}}null!==p?(p.return=d,eu=p):Su(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{o=h.stateNode,l?"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none":(u=h.stateNode,a=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,u.style.display=de("display",a))}catch(t){xc(e,e.return,t)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vu(t,e),_u(e),4&i&&yu(e);case 21:}}function _u(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(uu(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(le(o,""),i.flags&=-33),fu(e,cu(e),o);break;case 3:case 4:var s=i.stateNode.containerInfo;lu(e,cu(e),s);break;default:throw Error(n(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bu(e,t,n){eu=e,wu(e)}function wu(e,t,n){for(var r=0!=(1&e.mode);null!==eu;){var i=eu,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Ja;if(!s){var a=i.alternate,u=null!==a&&null!==a.memoizedState||Xa;a=Ja;var c=Xa;if(Ja=s,(Xa=u)&&!c)for(eu=i;null!==eu;)u=(s=eu).child,22===s.tag&&null!==s.memoizedState?Ou(i):null!==u?(u.return=s,eu=u):Ou(i);for(;null!==o;)eu=o,wu(o),o=o.sibling;eu=i,Ja=a,Xa=c}Eu(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,eu=o):Eu(e)}}function Eu(e){for(;null!==eu;){var t=eu;if(0!=(8772&t.flags)){var r=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xa||ou(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Xa)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:go(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Uo(t,s,i);break;case 3:var a=t.updateQueue;if(null!==a){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Uo(t,a,r)}break;case 5:var u=t.stateNode;if(null===r&&4&t.flags){r=u;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Ft(h)}}}break;default:throw Error(n(163))}Xa||512&t.flags&&su(t)}catch(e){xc(t,t.return,e)}}if(t===e){eu=null;break}if(null!==(r=t.sibling)){r.return=t.return,eu=r;break}eu=t.return}}function Su(e){for(;null!==eu;){var t=eu;if(t===e){eu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,eu=n;break}eu=t.return}}function Ou(e){for(;null!==eu;){var t=eu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ou(4,t)}catch(e){xc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xc(t,i,e)}}var o=t.return;try{su(t)}catch(e){xc(t,o,e)}break;case 5:var s=t.return;try{su(t)}catch(e){xc(t,s,e)}}}catch(e){xc(t,t.return,e)}if(t===e){eu=null;break}var a=t.sibling;if(null!==a){a.return=t.return,eu=a;break}eu=t.return}}var Iu,xu=Math.ceil,Ru=m.ReactCurrentDispatcher,ku=m.ReactCurrentOwner,Pu=m.ReactCurrentBatchConfig,Cu=0,Au=null,Nu=null,Tu=0,Mu=0,Lu=Ei(0),ju=0,Uu=null,Du=0,zu=0,Fu=0,Bu=null,Hu=null,qu=0,Vu=1/0,$u=null,Wu=!1,Ku=null,Gu=null,Yu=!1,Qu=null,Ju=0,Xu=0,Zu=null,ec=-1,tc=0;function nc(){return 0!=(6&Cu)?Ye():-1!==ec?ec:ec=Ye()}function rc(e){return 0==(1&e.mode)?1:0!=(2&Cu)&&0!==Tu?Tu&-Tu:null!==po.transition?(0===tc&&(tc=dt()),tc):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Gt(e.type)}function ic(e,t,r,i){if(50<Xu)throw Xu=0,Zu=null,Error(n(185));gt(e,r,i),0!=(2&Cu)&&e===Au||(e===Au&&(0==(2&Cu)&&(zu|=r),4===ju&&cc(e,Tu)),oc(e,i),1===r&&0===Cu&&0==(1&t.mode)&&(Vu=Ye()+500,Ui&&Fi()))}function oc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-it(o),a=1<<s,u=i[s];-1===u?0!=(a&n)&&0==(a&r)||(i[s]=ft(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=lt(e,e===Au?Tu:0);if(0===r)null!==n&&We(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&We(n),1===t)0===e.tag?function(e){Ui=!0,zi(e)}(lc.bind(null,e)):zi(lc.bind(null,e)),ii((function(){0==(6&Cu)&&Fi()})),n=null;else{switch(mt(r)){case 1:n=Je;break;case 4:n=Xe;break;case 16:default:n=Ze;break;case 536870912:n=tt}n=Ac(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(ec=-1,tc=0,0!=(6&Cu))throw Error(n(327));var r=e.callbackNode;if(Oc()&&e.callbackNode!==r)return null;var i=lt(e,e===Au?Tu:0);if(0===i)return null;if(0!=(30&i)||0!=(i&e.expiredLanes)||t)t=mc(e,i);else{t=i;var o=Cu;Cu|=2;var s=yc();for(Au===e&&Tu===t||($u=null,Vu=Ye()+500,pc(e,t));;)try{bc();break}catch(t){gc(e,t)}bo(),Ru.current=s,Cu=o,null!==Nu?t=0:(Au=null,Tu=0,t=ju)}if(0!==t){if(2===t&&0!==(o=ht(e))&&(i=o,t=ac(e,o)),1===t)throw r=Uu,pc(e,0),cc(e,i),oc(e,Ye()),r;if(6===t)cc(e,i);else{if(o=e.current.alternate,0==(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!or(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=mc(e,i))&&0!==(s=ht(e))&&(i=s,t=ac(e,s)),1===t))throw r=Uu,pc(e,0),cc(e,i),oc(e,Ye()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:Sc(e,Hu,$u);break;case 3:if(cc(e,i),(130023424&i)===i&&10<(t=qu+500-Ye())){if(0!==lt(e,0))break;if(((o=e.suspendedLanes)&i)!==i){nc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ti(Sc.bind(null,e,Hu,$u),t);break}Sc(e,Hu,$u);break;case 4:if(cc(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var a=31-it(i);s=1<<a,(a=t[a])>o&&(o=a),i&=~s}if(i=o,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*xu(i/1960))-i)){e.timeoutHandle=ti(Sc.bind(null,e,Hu,$u),i);break}Sc(e,Hu,$u);break;default:throw Error(n(329))}}}return oc(e,Ye()),e.callbackNode===r?sc.bind(null,e):null}function ac(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Hu,Hu=n,null!==t&&uc(t)),e}function uc(e){null===Hu?Hu=e:Hu.push.apply(Hu,e)}function cc(e,t){for(t&=~Fu,t&=~zu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!=(6&Cu))throw Error(n(327));Oc();var t=lt(e,0);if(0==(1&t))return oc(e,Ye()),null;var r=mc(e,t);if(0!==e.tag&&2===r){var i=ht(e);0!==i&&(t=i,r=ac(e,i))}if(1===r)throw r=Uu,pc(e,0),cc(e,t),oc(e,Ye()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sc(e,Hu,$u),oc(e,Ye()),null}function fc(e,t){var n=Cu;Cu|=1;try{return e(t)}finally{0===(Cu=n)&&(Vu=Ye()+500,Ui&&Fi())}}function hc(e){null!==Qu&&0===Qu.tag&&0==(6&Cu)&&Oc();var t=Cu;Cu|=1;var n=Pu.transition,r=vt;try{if(Pu.transition=null,vt=1,e)return e()}finally{vt=r,Pu.transition=n,0==(6&(Cu=t))&&Fi()}}function dc(){Mu=Lu.current,Si(Lu)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ni(n)),null!==Nu)for(n=Nu.return;null!==n;){var r=n;switch(Zi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ai();break;case 3:os(),Si(Ri),Si(xi),hs();break;case 5:us(r);break;case 4:os();break;case 13:case 19:Si(cs);break;case 10:wo(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Au=e,Nu=e=Lc(e.current,null),Tu=Mu=t,ju=0,Uu=null,Fu=zu=Du=0,Hu=Bu=null,null!==Io){for(t=0;t<Io.length;t++)if(null!==(r=(n=Io[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Io=null}return e}function gc(e,t){for(;;){var r=Nu;try{if(bo(),ds.current=aa,_s){for(var i=ys.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}_s=!1}if(gs=0,ms=vs=ys=null,bs=!1,ws=0,ku.current=null,null===r||null===r.return){ju=1,Uu=t,Nu=null;break}e:{var s=e,a=r.return,u=r,c=t;if(t=Tu,u.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var l=c,f=u,h=f.tag;if(0==(1&f.mode)&&(0===h||11===h||15===h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=ma(a);if(null!==p){p.flags&=-257,_a(p,a,u,0,t),1&p.mode&&va(s,l,t),c=l;var g=(t=p).updateQueue;if(null===g){var y=new Set;y.add(c),t.updateQueue=y}else g.add(c);break e}if(0==(1&t)){va(s,l,t),vc();break e}c=Error(n(426))}else if(no&&1&u.mode){var v=ma(a);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),_a(v,a,u,0,t),ho(fa(c,u));break e}}s=c=fa(c,u),4!==ju&&(ju=2),null===Bu?Bu=[s]:Bu.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Lo(s,ga(0,c,t));break e;case 1:u=c;var m=s.type,_=s.stateNode;if(0==(128&s.flags)&&("function"==typeof m.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===Gu||!Gu.has(_)))){s.flags|=65536,t&=-t,s.lanes|=t,Lo(s,ya(s,u,t));break e}}s=s.return}while(null!==s)}Ec(r)}catch(e){t=e,Nu===r&&null!==r&&(Nu=r=r.return);continue}break}}function yc(){var e=Ru.current;return Ru.current=aa,null===e?aa:e}function vc(){0!==ju&&3!==ju&&2!==ju||(ju=4),null===Au||0==(268435455&Du)&&0==(268435455&zu)||cc(Au,Tu)}function mc(e,t){var r=Cu;Cu|=2;var i=yc();for(Au===e&&Tu===t||($u=null,pc(e,t));;)try{_c();break}catch(t){gc(e,t)}if(bo(),Cu=r,Ru.current=i,null!==Nu)throw Error(n(261));return Au=null,Tu=0,ju}function _c(){for(;null!==Nu;)wc(Nu)}function bc(){for(;null!==Nu&&!Ke();)wc(Nu)}function wc(e){var t=Iu(e.alternate,e,Mu);e.memoizedProps=e.pendingProps,null===t?Ec(e):Nu=t,ku.current=null}function Ec(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Ya(n,t,Mu)))return void(Nu=n)}else{if(null!==(n=Qa(n,t)))return n.flags&=32767,void(Nu=n);if(null===e)return ju=6,void(Nu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Nu=t);Nu=t=e}while(null!==t);0===ju&&(ju=5)}function Sc(e,t,r){var i=vt,o=Pu.transition;try{Pu.transition=null,vt=1,function(e,t,r,i){do{Oc()}while(null!==Qu);if(0!=(6&Cu))throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-it(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===Au&&(Nu=Au=null,Tu=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||Yu||(Yu=!0,Ac(Ze,(function(){return Oc(),null}))),s=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||s){s=Pu.transition,Pu.transition=null;var a=vt;vt=1;var u=Cu;Cu|=4,ku.current=null,function(e,t){if(Xr=Ht,fr(e=lr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{r.nodeType,s.nodeType}catch(e){r=null;break e}var a=0,u=-1,c=-1,l=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==r||0!==o&&3!==h.nodeType||(u=a+o),h!==s||0!==i&&3!==h.nodeType||(c=a+i),3===h.nodeType&&(a+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===r&&++l===o&&(u=a),d===s&&++f===i&&(c=a),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}r=-1===u||-1===c?null:{start:u,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zr={focusedElem:e,selectionRange:r},Ht=!1,eu=t;null!==eu;)if(e=(t=eu).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,eu=e;else for(;null!==eu;){t=eu;try{var g=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var y=g.memoizedProps,v=g.memoizedState,m=t.stateNode,_=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:go(t.type,y),v);m.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(n(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,eu=e;break}eu=t.return}g=ru,ru=!1}(e,r),mu(r,e),hr(Zr),Ht=!!Xr,Zr=Xr=null,e.current=r,bu(r),Ge(),Cu=u,vt=a,Pu.transition=s}else e.current=r;if(Yu&&(Yu=!1,Qu=e,Ju=o),0===(s=e.pendingLanes)&&(Gu=null),function(e){if(rt&&"function"==typeof rt.onCommitFiberRoot)try{rt.onCommitFiberRoot(nt,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),oc(e,Ye()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)i((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(Wu)throw Wu=!1,e=Ku,Ku=null,e;0!=(1&Ju)&&0!==e.tag&&Oc(),0!=(1&(s=e.pendingLanes))?e===Zu?Xu++:(Xu=0,Zu=e):Xu=0,Fi()}(e,t,r,i)}finally{Pu.transition=o,vt=i}return null}function Oc(){if(null!==Qu){var e=mt(Ju),t=Pu.transition,r=vt;try{if(Pu.transition=null,vt=16>e?16:e,null===Qu)var i=!1;else{if(e=Qu,Qu=null,Ju=0,0!=(6&Cu))throw Error(n(331));var o=Cu;for(Cu|=4,eu=e.current;null!==eu;){var s=eu,a=s.child;if(0!=(16&eu.flags)){var u=s.deletions;if(null!==u){for(var c=0;c<u.length;c++){var l=u[c];for(eu=l;null!==eu;){var f=eu;switch(f.tag){case 0:case 11:case 15:iu(8,f,s)}var h=f.child;if(null!==h)h.return=f,eu=h;else for(;null!==eu;){var d=(f=eu).sibling,p=f.return;if(au(f),f===l){eu=null;break}if(null!==d){d.return=p,eu=d;break}eu=p}}}var g=s.alternate;if(null!==g){var y=g.child;if(null!==y){g.child=null;do{var v=y.sibling;y.sibling=null,y=v}while(null!==y)}}eu=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,eu=a;else e:for(;null!==eu;){if(0!=(2048&(s=eu).flags))switch(s.tag){case 0:case 11:case 15:iu(9,s,s.return)}var m=s.sibling;if(null!==m){m.return=s.return,eu=m;break e}eu=s.return}}var _=e.current;for(eu=_;null!==eu;){var b=(a=eu).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,eu=b;else e:for(a=_;null!==eu;){if(0!=(2048&(u=eu).flags))try{switch(u.tag){case 0:case 11:case 15:ou(9,u)}}catch(e){xc(u,u.return,e)}if(u===a){eu=null;break e}var w=u.sibling;if(null!==w){w.return=u.return,eu=w;break e}eu=u.return}}if(Cu=o,Fi(),rt&&"function"==typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(nt,e)}catch(e){}i=!0}return i}finally{vt=r,Pu.transition=t}}return!1}function Ic(e,t,n){e=To(e,t=ga(0,t=fa(n,t),1),1),t=nc(),null!==e&&(gt(e,1,t),oc(e,t))}function xc(e,t,n){if(3===e.tag)Ic(e,e,n);else for(;null!==t;){if(3===t.tag){Ic(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gu||!Gu.has(r))){t=To(t,e=ya(t,e=fa(n,e),1),1),e=nc(),null!==t&&(gt(t,1,e),oc(t,e));break}}t=t.return}}function Rc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=nc(),e.pingedLanes|=e.suspendedLanes&n,Au===e&&(Tu&n)===n&&(4===ju||3===ju&&(130023424&Tu)===Tu&&500>Ye()-qu?pc(e,0):Fu|=n),oc(e,t)}function kc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=nc();null!==(e=ko(e,t))&&(gt(e,t,n),oc(e,n))}function Pc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),kc(e,n)}function Cc(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),kc(e,r)}function Ac(e,t){return $e(e,t)}function Nc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Nc(e,t,n,r)}function Mc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jc(e,t,r,i,o,s){var a=2;if(i=e,"function"==typeof e)Mc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case w:return Uc(r.children,o,s,t);case E:a=8,o|=8;break;case S:return(e=Tc(12,r,t,2|o)).elementType=S,e.lanes=s,e;case R:return(e=Tc(13,r,t,o)).elementType=R,e.lanes=s,e;case k:return(e=Tc(19,r,t,o)).elementType=k,e.lanes=s,e;case A:return Dc(r,o,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:a=10;break e;case I:a=9;break e;case x:a=11;break e;case P:a=14;break e;case C:a=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Tc(a,r,t,o)).elementType=e,t.type=i,t.lanes=s,t}function Uc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Dc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=A,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pt(0),this.expirationTimes=pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hc(e,t,n,r,i,o,s,a,u){return e=new Bc(e,t,n,a,u),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Co(o),e}function qc(e){if(!e)return Ii;e:{if(Fe(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ci(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Ci(r))return Ti(e,r,t)}return t}function Vc(e,t,n,r,i,o,s,a,u){return(e=Hc(n,r,!0,e,0,o,0,a,u)).context=qc(null),n=e.current,(o=No(r=nc(),i=rc(n))).callback=null!=t?t:null,To(n,o,i),e.current.lanes=i,gt(e,i,r),oc(e,r),e}function $c(e,t,n,r){var i=t.current,o=nc(),s=rc(i);return n=qc(n),null===t.context?t.context=n:t.pendingContext=n,(t=No(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=To(i,t,s))&&(ic(e,i,s,o),Mo(e,i,s)),s}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}Iu=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ri.current)wa=!0;else{if(0==(e.lanes&r)&&0==(128&t.flags))return wa=!1,function(e,t,n){switch(t.tag){case 3:Aa(t),fo();break;case 5:ss(t);break;case 1:Ci(t.type)&&Mi(t);break;case 4:rs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oi(yo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oi(cs,1&cs.current),t.flags|=128,null):0!=(n&t.child.childLanes)?za(e,t,n):(Oi(cs,1&cs.current),null!==(e=Wa(e,t,n))?e.sibling:null);Oi(cs,1&cs.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Va(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oi(cs,cs.current),r)break;return null;case 22:case 23:return t.lanes=0,xa(e,t,n)}return Wa(e,t,n)}(e,t,r);wa=0!=(131072&e.flags)}else wa=!1,no&&0!=(1048576&t.flags)&&Ji(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;$a(e,t),e=t.pendingProps;var o=Pi(t,xi.current);So(t,r),o=Is(null,t,i,e,o,r);var s=xs();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ci(i)?(s=!0,Mi(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Co(t),o.updater=Fo,t.stateNode=o,o._reactInternals=t,Vo(t,i,e,r),t=Ca(null,t,i,!0,s,r)):(t.tag=0,no&&s&&Xi(t),Ea(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch($a(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Mc(e)?1:0;if(null!=e){if((e=e.$$typeof)===x)return 11;if(e===P)return 14}return 2}(i),e=go(i,e),o){case 0:t=ka(null,t,i,e,r);break e;case 1:t=Pa(null,t,i,e,r);break e;case 11:t=Sa(null,t,i,e,r);break e;case 14:t=Oa(null,t,i,go(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,ka(e,t,i,o=t.elementType===i?o:go(i,o),r);case 1:return i=t.type,o=t.pendingProps,Pa(e,t,i,o=t.elementType===i?o:go(i,o),r);case 3:e:{if(Aa(t),null===e)throw Error(n(387));i=t.pendingProps,o=(s=t.memoizedState).element,Ao(e,t),jo(t,i,null,r);var a=t.memoizedState;if(i=a.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Na(e,t,i,r,o=fa(Error(n(423)),t));break e}if(i!==o){t=Na(e,t,i,r,o=fa(Error(n(424)),t));break e}for(to=ai(t.stateNode.containerInfo.firstChild),eo=t,no=!0,ro=null,r=Qo(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(fo(),i===o){t=Wa(e,t,r);break e}Ea(e,t,i,r)}t=t.child}return t;case 5:return ss(t),null===e&&ao(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,a=o.children,ei(i,o)?a=null:null!==s&&ei(i,s)&&(t.flags|=32),Ra(e,t),Ea(e,t,a,r),t.child;case 6:return null===e&&ao(t),null;case 13:return za(e,t,r);case 4:return rs(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Yo(t,null,i,r):Ea(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,Sa(e,t,i,o=t.elementType===i?o:go(i,o),r);case 7:return Ea(e,t,t.pendingProps,r),t.child;case 8:case 12:return Ea(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value,Oi(yo,i._currentValue),i._currentValue=a,null!==s)if(or(s.value,a)){if(s.children===o.children&&!Ri.current){t=Wa(e,t,r);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var u=s.dependencies;if(null!==u){a=s.child;for(var c=u.firstContext;null!==c;){if(c.context===i){if(1===s.tag){(c=No(-1,r&-r)).tag=2;var l=s.updateQueue;if(null!==l){var f=(l=l.shared).pending;null===f?c.next=c:(c.next=f.next,f.next=c),l.pending=c}}s.lanes|=r,null!==(c=s.alternate)&&(c.lanes|=r),Eo(s.return,r,t),u.lanes|=r;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(n(341));a.lanes|=r,null!==(u=a.alternate)&&(u.lanes|=r),Eo(a,r,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}Ea(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,So(t,r),i=i(o=Oo(o)),t.flags|=1,Ea(e,t,i,r),t.child;case 14:return o=go(i=t.type,t.pendingProps),Oa(e,t,i,o=go(i.type,o),r);case 15:return Ia(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:go(i,o),$a(e,t),t.tag=1,Ci(i)?(e=!0,Mi(t)):e=!1,So(t,r),Ho(t,i,o),Vo(t,i,o,r),Ca(null,t,i,!0,e,r);case 19:return Va(e,t,r);case 22:return xa(e,t,r)}throw Error(n(156,t.tag))};var Yc="function"==typeof reportError?reportError:function(e){console.error(e)};function Qc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function el(){}function tl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Wc(s);a.call(e)}}$c(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Wc(s);o.call(e)}}var s=Vc(t,r,e,0,null,!1,0,"",el);return e._reactRootContainer=s,e[hi]=s.current,Fr(8===e.nodeType?e.parentNode:e),hc(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Wc(u);a.call(e)}}var u=Hc(e,0,!1,null,0,!1,0,"",el);return e._reactRootContainer=u,e[hi]=u.current,Fr(8===e.nodeType?e.parentNode:e),hc((function(){$c(t,u,n,r)})),u}(n,t,e,i,r);return Wc(s)}Jc.prototype.render=Qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));$c(e,t,null,null)},Jc.prototype.unmount=Qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc((function(){$c(null,e,null,null)})),t[hi]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&0!==t&&t<At[n].priority;n++);At.splice(n,0,e),0===n&&Lt(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ct(t.pendingLanes);0!==n&&(yt(t,1|n),oc(t,Ye()),0==(6&Cu)&&(Vu=Ye()+500,Fi()))}break;case 13:hc((function(){var t=ko(e,1);if(null!==t){var n=nc();ic(t,e,1,n)}})),Gc(e,1)}},bt=function(e){if(13===e.tag){var t=ko(e,134217728);null!==t&&ic(t,e,134217728,nc()),Gc(e,134217728)}},wt=function(e){if(13===e.tag){var t=rc(e),n=ko(e,t);null!==n&&ic(n,e,t,nc()),Gc(e,t)}},Et=function(){return vt},St=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},be=function(e,t,r){switch(t){case"input":if(Q(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=_i(i);if(!o)throw Error(n(90));$(i),Q(i,o)}}}break;case"textarea":re(e,r);break;case"select":null!=(t=r.value)&&ee(e,!!r.multiple,t,!1)}},xe=fc,Re=hc;var nl={usingClientEntryPoint:!1,Events:[vi,mi,_i,Oe,Ie,fc]},rl={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},il={bundleType:rl.bundleType,version:rl.version,rendererPackageName:rl.rendererPackageName,rendererConfig:rl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:m.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:rl.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{nt=ol.inject(il),rt=ol}catch(ue){}}return is.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nl,is.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},is.createRoot=function(e,t){if(!Xc(e))throw Error(n(299));var r=!1,i="",o=Yc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hc(e,1,!1,null,0,r,0,i,o),e[hi]=t.current,Fr(8===e.nodeType?e.parentNode:e),new Qc(t)},is.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=qe(t))?null:e.stateNode},is.flushSync=function(e){return hc(e)},is.hydrate=function(e,t,r){if(!Zc(t))throw Error(n(200));return tl(null,e,t,!0,r)},is.hydrateRoot=function(e,t,r){if(!Xc(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,s="",a=Yc;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(s=r.identifierPrefix),void 0!==r.onRecoverableError&&(a=r.onRecoverableError)),t=Vc(t,null,e,1,null!=r?r:null,o,0,s,a),e[hi]=t.current,Fr(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Jc(t)},is.render=function(e,t,r){if(!Zc(t))throw Error(n(200));return tl(null,e,t,!1,r)},is.unmountComponentAtNode=function(e){if(!Zc(e))throw Error(n(40));return!!e._reactRootContainer&&(hc((function(){tl(null,null,e,!1,(function(){e._reactRootContainer=null,e[hi]=null}))})),!0)},is.unstable_batchedUpdates=fc,is.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Zc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return tl(e,t,r,!1,i)},is.version="18.2.0-next-9e3b772b8-20220608",is}!function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=us()}(rs);var cs=rs.exports;ns=cs.createRoot,cs.hydrateRoot;const ls=Je.div` display: flex; flex-direction: row; align-items: center; margin: 12px 0 0 0; padding: 0 3rem 0 0; & > img { width: 48px; height: 48px; margin-right: 12px; } `,fs=n("ExtensionInstallModal"),hs=({onClose:e=(()=>{})})=>(fs("initializing"),g.exports.jsx(Xo,Object.assign({onClose:e},{children:g.exports.jsx(g.exports.Fragment,{children:g.exports.jsxs(at,{children:[g.exports.jsx(ut,{children:"With Ledger Extension, you can:"}),g.exports.jsxs(ls,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M16.56 32.4h16.8V19.2h-15V21h13.2v9.6h-15c-.12 0-.12 0-.12-.12V17.52c0-.12 0-.12.12-.12h14.88c-.048-1.056-.864-1.8-1.92-1.8H16.56c-1.104 0-1.92.816-1.92 1.92v12.96c0 1.104.816 1.92 1.92 1.92Zm10.488-6.48a1.28 1.28 0 0 0 1.272 1.272c.696 0 1.248-.6 1.248-1.272a1.24 1.24 0 0 0-1.248-1.248c-.72 0-1.272.552-1.272 1.248Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Connect your Ledger directly to any dApp on Ethereum and Polygon"]}),g.exports.jsxs(ls,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M24 33.84c6.24-2.472 9.36-6.408 9.36-11.712v-5.04c-2.664-1.92-5.904-2.928-9.36-2.928-3.456 0-6.696 1.008-9.36 2.928v5.04c0 5.304 3.12 9.24 9.36 11.712Zm-7.44-11.712V18c2.232-1.392 4.632-2.04 7.44-2.04 2.808 0 5.208.648 7.44 2.04v4.128c0 4.512-2.232 7.512-7.44 9.744-5.208-2.232-7.44-5.232-7.44-9.744Zm3.36 1.176 3.36 3.384L28.944 21 27.6 19.656l-4.32 4.296-2.016-1.992-1.344 1.344Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Get warnings about risky transactions before signing them."]}),g.exports.jsx(lt,Object.assign({variant:"primary",onClick:()=>{window.open("https://apps.apple.com/app/ledger-extension-browse-web3/id1627727841?pt=516048&ct=ledger_button&mt=8","_blank")}},{children:"Install Ledger Extension"}))]})})})));var ds,ps,gs=Object.defineProperty,ys=Object.getOwnPropertySymbols,vs=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable,_s=(e,t,n)=>t in e?gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(r);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,n,i=1,s=40,u=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");let l,f;for(l=i;;l++){const r=8*t.getNumDataCodewords(l,n),i=a.getTotalBits(e,l);if(i<=r){f=i;break}if(l>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&f<=8*t.getNumDataCodewords(l,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(l),h);for(const e of t.getData())h.push(e)}o(h.length==f);const d=8*t.getNumDataCodewords(l,n);o(h.length<=d),r(0,Math.min(4,d-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<d;e^=253)r(e,8,h);let p=[];for(;8*p.length<h.length;)p.push(0);return h.forEach(((e,t)=>p[t>>>3]|=e<<7-(7&t))),new t(l,n,p,u)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(r,e));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),r=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(r,o,n),this.setFunctionModule(o,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,s=t+n;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),u=i-a%i,c=Math.floor(a/i);let l=[];const f=t.reedSolomonComputeDivisor(s);for(let n=0,r=0;n<i;n++){let i=e.slice(r,r+c-s+(n<u?0:1));r+=i.length;const o=t.reedSolomonComputeRemainder(i,f);n<u&&i.push(0),l.push(i.concat(o))}let h=[];for(let e=0;e<l[0].length;e++)l.forEach(((t,n)=>{(e!=c-s||n>=u)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-r:r;!this.isFunction[a][s]&&n<8*e.length&&(this.modules[a][s]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[n][s]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[n][s],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][n]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[s][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const s=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);r(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(i,11,n)}return t<e.length&&r(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new s(s.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(ds||(ds={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((ps=ds||(ds={})).QrCode||(ps.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(ds||(ds={}));var bs=ds,ws={L:bs.QrCode.Ecc.LOW,M:bs.QrCode.Ecc.MEDIUM,Q:bs.QrCode.Ecc.QUARTILE,H:bs.QrCode.Ecc.HIGH},Es=128,Ss="L",Os="#FFFFFF",Is="#000000",xs=!1; /** * @license qrcode.react * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC */!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();const Rs=Je((function(e){const t=e,{value:n,size:r=Es,level:i=Ss,bgColor:o=Os,fgColor:s=Is,includeMargin:a=xs,imageSettings:u}=t,c=((e,t)=>{var n={};for(var r in e)vs.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ys)for(var r of ys(e))t.indexOf(r)<0&&ms.call(e,r)&&(n[r]=e[r]);return n})(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let l=bs.QrCode.encodeText(n,ws[i]).getModules();const f=a?4:0,h=l.length+2*f,d=function(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,u=(r.width||s)*a,c=(r.height||s)*a,l=null==r.x?e.length/2-u/2:r.x*a,f=null==r.y?e.length/2-c/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(f);h={x:e,y:t,w:Math.ceil(u+l-e),h:Math.ceil(c+f-t)}}return{x:l,y:f,h:c,w:u,excavation:h}}(l,r,a,u);let p=null;var g,y;null!=u&&null!=d&&(null!=d.excavation&&(g=l,y=d.excavation,l=g.slice().map(((e,t)=>t<y.y||t>=y.y+y.h?e:e.map(((e,t)=>(t<y.x||t>=y.x+y.w)&&e))))),p=b.createElement("image",{xlinkHref:u.src,height:d.h,width:d.w,x:d.x+f,y:d.y+f,preserveAspectRatio:"none"}));const v=function(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}(l,f);return b.createElement("svg",((e,t)=>{for(var n in t||(t={}))vs.call(t,n)&&_s(e,n,t[n]);if(ys)for(var n of ys(t))ms.call(t,n)&&_s(e,n,t[n]);return e})({height:r,width:r,viewBox:`0 0 ${h} ${h}`},c),b.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),b.createElement("path",{fill:s,d:v,shapeRendering:"crispEdges"}),p)}))` box-sizing: border-box; flex-grow: 0; flex-shrink: 0; padding: 15px; margin-left: auto; margin-right: auto; margin-top: 0.1rem; border-radius: 1rem; background-color: white; @media ${et} { width: 200px; height: 200px; } `,ks=Je.div` margin: 1rem 0; border-top: none; padding-top: 0; `,Ps=n("UseLedgerLiveModal");let Cs=e=>{},As=e=>{Ps("setModalUri",e),Cs(e)};const Ns=({isDesktop:e=!1,uri:t="",onClose:n=(()=>{})})=>{Ps("initializing",{isDesktop:e,uri:t});const{init:r,track:i,sendUserFlow:o,addStepToFlow:s}=Qo(),[a,u]=v.exports.useState(t);Cs=u;const c=v.exports.useRef(),l=c.current;t!==l&&t!==a&&u(t),v.exports.useEffect((()=>{c.current=t}));const f=v.exports.useCallback((()=>(s("Click on 'Connect with Ledger Live desktop/mobile' "),o(),Ps("loading Ledger Live, ",a),window.location.href=`ledgerlive://wc?uri=${encodeURIComponent(a)}`,Jo(!1),!1)),[a]),h=v.exports.useCallback((()=>(s("Click on 'Install Ledger Live' "),window.open("https://www.ledger.com/ledger-live"),!1)),[]);return v.exports.useEffect((()=>{r({dappName:"connect-kit"},{ip:"0.0.0.0"}).then((()=>{i("source",{hostname:window.location.hostname}),s("Open Ledger Live Modal")}))}),[]),g.exports.jsx(Xo,Object.assign({onClose:n},{children:g.exports.jsxs(at,Object.assign({textAlign:"center"},{children:[g.exports.jsx(ut,{children:"Connect with Ledger Live"}),e&&""!==a&&g.exports.jsxs(g.exports.Fragment,{children:[g.exports.jsx(ct,{children:"Scan for Ledger Live mobile"}),g.exports.jsx(ks,{children:g.exports.jsx(Rs,{value:a,size:310})}),g.exports.jsx(ct,Object.assign({noMargin:!0},{children:"or"})),g.exports.jsx(lt,Object.assign({variant:"primary",onClick:f},{children:"Connect with Ledger Live desktop"}))]}),!e&&""!==a&&g.exports.jsx(lt,Object.assign({variant:"primary",onClick:f,extraMargin:!0},{children:"Connect with Ledger Live mobile"})),g.exports.jsxs(ct,{children:["Don't have Ledger Live for ",e?"desktop":"mobile","?"]}),g.exports.jsx(ct,Object.assign({noMargin:!0},{children:g.exports.jsx(ft,Object.assign({onClick:h},{children:"Install it"}))}))]}))}))},Ts=Je.div` margin: 1.4rem 0; display: flex; flex-direction: column; flex: 1; align-items: start; font-size: 1rem; gap: 12px 20px; `,Ms=Je.div` display: flex; flex-direction: row; align-items: center; word-break: keep-all; & > img { width: 24px; height: 24px; margin-right: 8px; } `,Ls=n("PlatformNotSupportedModal"),js=()=>(Ls("initializing"),g.exports.jsx(Xo,{children:g.exports.jsx(g.exports.Fragment,{children:g.exports.jsxs(at,{children:[g.exports.jsx(ut,{children:"Sorry, we don't support this platform just yet."}),g.exports.jsxs(ct,{children:["We're working hard to expand our coverage.",g.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),g.exports.jsx(Ts,{children:g.exports.jsxs(Ms,{children:[g.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var Us={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,u=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),n&&s(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),o=u(n(94)),s=u(n(95)),a=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(Us);var Ds=l(Us.exports);function zs(){const e=Ds.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return function(){var e,t;return"isBrave"===(null===(t=null===(e=window.navigator.brave)||void 0===e?void 0:e.isBrave)||void 0===t?void 0:t.name)}()&&(n.name="Brave"),{type:r,os:t,browser:n}}let Fs=null;function Bs(e,t){if(!Fs){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),Fs=ns(t)}if(Fs&&e){let n;switch(e){case"UseLedgerLiveModal":n=g.exports.jsx(Ns,Object.assign({},t));break;case"PlatformNotSupportedModal":n=g.exports.jsx(js,{});break;case"ExtensionInstallModal":n=g.exports.jsx(hs,Object.assign({},t))}Fs.render(n)}Jo(!0)}const Hs=n("WalletConnectLegacy"),qs=r("WalletConnectLegacy");function Vs(){return u(this,void 0,void 0,(function*(){Hs("getWalletConnectLegacyProvider");try{const e=yield function(){return u(this,void 0,void 0,(function*(){Hs("initWalletConnectLegacyProvider");const e=jc();return Hs("walletConnectProviderOptions is",e),Hs("created a new legacy provider instance"),new p({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){Hs("assignWalletConnectLegacyProviderEvents"),e.on("connect",(function(e){Hs("connectHandler",e),Jo(!1)})),e.on("disconnect",(function t(n,r){Hs("disconnectHandler",n,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",t)}))}(e),e.request=function(e){Hs("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=jc();return function({method:r,params:i}){return u(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Hs("calling patched",r,i),new Promise(((o,a)=>u(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),Hs("created a new session"),function(e){const t=zs(),n=(qc("getSupportResult"),Vc);jc(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?Bs("ExtensionInstallModal",{onClose:e.onClose}):Bs("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}({uri:e.connector.uri,onClose:()=>{qs("user rejected"),a(new s)}}),o(yield t({method:r,params:i}));Hs("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return qs("error",e),a(e)}}))))):(Hs("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw qs("error",t),t}}))}var $s,Ws={exports:{}},Ks="object"==typeof Reflect?Reflect:null,Gs=Ks&&"function"==typeof Ks.apply?Ks.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};$s=Ks&&"function"==typeof Ks.ownKeys?Ks.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Ys=Number.isNaN||function(e){return e!=e};function Qs(){Qs.init.call(this)}Ws.exports=Qs,Ws.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}sa(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&sa(e,"error",t,{once:!0})}(e,i)}))},Qs.EventEmitter=Qs,Qs.prototype._events=void 0,Qs.prototype._eventsCount=0,Qs.prototype._maxListeners=void 0;var Js=10;function Xs(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Zs(e){return void 0===e._maxListeners?Qs.defaultMaxListeners:e._maxListeners}function ea(e,t,n,r){var i,o,s,a;if(Xs(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=Zs(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function ta(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function na(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ta.bind(r);return i.listener=n,r.wrapFn=i,i}function ra(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):oa(i,i.length)}function ia(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function oa(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function sa(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(Qs,"defaultMaxListeners",{enumerable:!0,get:function(){return Js},set:function(e){if("number"!=typeof e||e<0||Ys(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Js=e}}),Qs.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Ys(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Qs.prototype.getMaxListeners=function(){return Zs(this)},Qs.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)Gs(a,this,t);else{var u=a.length,c=oa(a,u);for(n=0;n<u;++n)Gs(c[n],this,t)}return!0},Qs.prototype.addListener=function(e,t){return ea(this,e,t,!1)},Qs.prototype.on=Qs.prototype.addListener,Qs.prototype.prependListener=function(e,t){return ea(this,e,t,!0)},Qs.prototype.once=function(e,t){return Xs(t),this.on(e,na(this,e,t)),this},Qs.prototype.prependOnceListener=function(e,t){return Xs(t),this.prependListener(e,na(this,e,t)),this},Qs.prototype.removeListener=function(e,t){var n,r,i,o,s;if(Xs(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},Qs.prototype.off=Qs.prototype.removeListener,Qs.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},Qs.prototype.listeners=function(e){return ra(this,e,!0)},Qs.prototype.rawListeners=function(e){return ra(this,e,!1)},Qs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ia.call(e,t)},Qs.prototype.listenerCount=ia,Qs.prototype.eventNames=function(){return this._eventsCount>0?$s(this._events):[]};var aa={},ua={},ca={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(ca),Object.defineProperty(ua,"__esModule",{value:!0});var la=ca;function fa(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function ha(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function da(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function pa(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function ga(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function ya(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function va(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function ma(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function _a(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),va(e/4294967296>>>0,t,n),va(e>>>0,t,n+4),t}function ba(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),ma(e>>>0,t,n),ma(e/4294967296>>>0,t,n+4),t}ua.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},ua.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},ua.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},ua.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},ua.writeUint16BE=fa,ua.writeInt16BE=fa,ua.writeUint16LE=ha,ua.writeInt16LE=ha,ua.readInt32BE=da,ua.readUint32BE=pa,ua.readInt32LE=ga,ua.readUint32LE=ya,ua.writeUint32BE=va,ua.writeInt32BE=va,ua.writeUint32LE=ma,ua.writeInt32LE=ma,ua.readInt64BE=function(e,t){void 0===t&&(t=0);var n=da(e,t),r=da(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},ua.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*pa(e,t)+pa(e,t+4)},ua.readInt64LE=function(e,t){void 0===t&&(t=0);var n=ga(e,t);return 4294967296*ga(e,t+4)+n-4294967296*(n>>31)},ua.readUint64LE=function(e,t){void 0===t&&(t=0);var n=ya(e,t);return 4294967296*ya(e,t+4)+n},ua.writeUint64BE=_a,ua.writeInt64BE=_a,ua.writeUint64LE=ba,ua.writeInt64LE=ba,ua.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},ua.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},ua.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!la.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},ua.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!la.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},ua.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},ua.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},ua.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},ua.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},ua.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},ua.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},ua.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},ua.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var wa={};Object.defineProperty(wa,"__esModule",{value:!0}),wa.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(aa,"__esModule",{value:!0});var Ea=ua,Sa=wa,Oa=20;function Ia(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],c=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=u,I=c,x=l,R=f,k=h,P=d,C=p,A=g,N=y,T=v,M=m,L=0;L<Oa;L+=2)S=(S^=R=R+(A=(A^=_=_+S|0)>>>16|A<<16)|0)>>>20|S<<12,O=(O^=k=k+(N=(N^=b=b+O|0)>>>16|N<<16)|0)>>>20|O<<12,I=(I^=P=P+(T=(T^=w=w+I|0)>>>16|T<<16)|0)>>>20|I<<12,x=(x^=C=C+(M=(M^=E=E+x|0)>>>16|M<<16)|0)>>>20|x<<12,I=(I^=P=P+(T=(T^=w=w+I|0)>>>24|T<<8)|0)>>>25|I<<7,x=(x^=C=C+(M=(M^=E=E+x|0)>>>24|M<<8)|0)>>>25|x<<7,O=(O^=k=k+(N=(N^=b=b+O|0)>>>24|N<<8)|0)>>>25|O<<7,S=(S^=R=R+(A=(A^=_=_+S|0)>>>24|A<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,I=(I^=C=C+(A=(A^=b=b+I|0)>>>16|A<<16)|0)>>>20|I<<12,x=(x^=R=R+(N=(N^=w=w+x|0)>>>16|N<<16)|0)>>>20|x<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,x=(x^=R=R+(N=(N^=w=w+x|0)>>>24|N<<8)|0)>>>25|x<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,I=(I^=C=C+(A=(A^=b=b+I|0)>>>24|A<<8)|0)>>>25|I<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;Ea.writeUint32LE(_+r|0,e,0),Ea.writeUint32LE(b+i|0,e,4),Ea.writeUint32LE(w+o|0,e,8),Ea.writeUint32LE(E+s|0,e,12),Ea.writeUint32LE(S+a|0,e,16),Ea.writeUint32LE(O+u|0,e,20),Ea.writeUint32LE(I+c|0,e,24),Ea.writeUint32LE(x+l|0,e,28),Ea.writeUint32LE(R+f|0,e,32),Ea.writeUint32LE(k+h|0,e,36),Ea.writeUint32LE(P+d|0,e,40),Ea.writeUint32LE(C+p|0,e,44),Ea.writeUint32LE(A+g|0,e,48),Ea.writeUint32LE(N+y|0,e,52),Ea.writeUint32LE(T+v|0,e,56),Ea.writeUint32LE(M+m|0,e,60)}function xa(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),u=0;u<n.length;u+=64){Ia(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];Ra(o,0,s)}return Sa.wipe(a),0===i&&Sa.wipe(o),r}function Ra(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}aa.streamXOR=xa,aa.stream=function(e,t,n,r){return void 0===r&&(r=0),Sa.wipe(n),xa(e,t,n,n,r)};var ka={},Pa={};function Ca(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.select=function(e,t,n){return~(e-1)&t|e-1&n},Pa.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Pa.compare=Ca,Pa.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Ca(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Pa,n=wa;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var u=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|u<<5);var c=t[14]|t[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var I=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|I<<3);var x=e[t+4]|e[t+5]<<8;s+=8191&(I>>>10|x<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(x>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|P<<2);var C=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|C<<5);var A=e[t+14]|e[t+15]<<8,N=0,T=N;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),N=(T+=u*(5*b))>>>13,T&=8191,T+=c*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(C>>>8|A<<8))*(5*y);var M=N+=(T+=(d+=A>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),N=(M+=u*(5*w))>>>13,M&=8191,M+=c*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),N+=(M+=d*(5*y))>>>13,M&=8191;var L=N;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),N=(L+=u*(5*E))>>>13,L&=8191,L+=c*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var j=N+=(L+=d*(5*v))>>>13;j+=i*v,j+=o*y,j+=s*g,j+=a*p,N=(j+=u*(5*S))>>>13,j&=8191,j+=c*(5*E),j+=l*(5*w),j+=f*(5*b),j+=h*(5*_);var U=N+=(j+=d*(5*m))>>>13;U+=i*m,U+=o*v,U+=s*y,U+=a*g,N=(U+=u*p)>>>13,U&=8191,U+=c*(5*S),U+=l*(5*E),U+=f*(5*w),U+=h*(5*b);var D=N+=(U+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,N=(D+=u*g)>>>13,D&=8191,D+=c*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=N+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,N=(z+=u*y)>>>13,z&=8191,z+=c*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var F=N+=(z+=d*(5*w))>>>13;F+=i*w,F+=o*b,F+=s*_,F+=a*m,N=(F+=u*v)>>>13,F&=8191,F+=c*y,F+=l*g,F+=f*p,F+=h*(5*S);var B=N+=(F+=d*(5*E))>>>13;B+=i*E,B+=o*w,B+=s*b,B+=a*_,N=(B+=u*m)>>>13,B&=8191,B+=c*v,B+=l*y,B+=f*g,B+=h*p;var H=N+=(B+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,N=(H+=u*_)>>>13,H&=8191,H+=c*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(N=(N=((N+=(H+=d*p)>>>13)<<2)+N|0)+(T&=8191)|0),o=M+=N>>>=13,s=L&=8191,a=j&=8191,u=U&=8191,c=D&=8191,l=z&=8191,f=F&=8191,h=B&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(ka),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=aa,n=ka,r=wa,i=ua,o=Pa;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var u,c=n.length+this.tagLength;if(o){if(o.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=o}else u=new Uint8Array(c);return t.streamXOR(this._key,s,n,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),a,u.subarray(0,u.length-this.tagLength),i),r.wipe(s),u},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var u=new Uint8Array(32);t.stream(this._key,a,u,4);var c=new Uint8Array(this.tagLength);if(this._authenticate(c,u,n.subarray(0,n.length-this.tagLength),i),!o.equal(c,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var u=new n.Poly1305(t);a&&(u.update(a),a.length%16>0&&u.update(s.subarray(a.length%16))),u.update(o),o.length%16>0&&u.update(s.subarray(o.length%16));var c=new Uint8Array(8);a&&i.writeUint64LE(a.length,c),u.update(c),i.writeUint64LE(o.length,c),u.update(c);for(var l=u.digest(),f=0;f<l.length;f++)e[f]=l[f];u.clean(),r.wipe(l),r.wipe(c)},a}();e.ChaCha20Poly1305=a}({});var Aa={},Na={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(Na,"__esModule",{value:!0});var Ma=Ta,La=Pa,ja=wa,Ua=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;for(this._inner.update(n),r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Ma.isSerializableHash(this._inner)&&Ma.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),ja.wipe(n)}return e.prototype.reset=function(){if(!Ma.isSerializableHash(this._inner)||!Ma.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Ma.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ma.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Ma.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Ma.isSerializableHash(this._inner)||!Ma.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Ma.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();Na.HMAC=Ua,Na.hmac=function(e,t,n){var r=new Ua(e,t);r.update(n);var i=r.digest();return r.clean(),i},Na.equal=La.equal,Object.defineProperty(Aa,"__esModule",{value:!0});var Da=Na,za=wa,Fa=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=Da.hmac(this._hash,n,t);this._hmac=new Da.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),za.wipe(this._buffer),za.wipe(this._counter),this._bufpos=0},e}();Aa.HKDF=Fa;var Ba={},Ha={},qa={};function Va(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Object.defineProperty(qa,"__esModule",{value:!0}),qa.BrowserRandomSource=void 0,qa.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var $a={},Wa=f(Object.freeze({__proto__:null,default:{}}));Object.defineProperty($a,"__esModule",{value:!0}),$a.NodeRandomSource=void 0;const Ka=wa;$a.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==Va){const e=Wa;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,Ka.wipe)(t),n}},Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.SystemRandomSource=void 0;const Ga=qa,Ya=$a;Ha.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new Ga.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Ya.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=Ha,n=ua,r=wa;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const u=n.length,c=256-256%u;for(;t>0;){const e=i(Math.ceil(256*t/c),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<c&&(a+=n.charAt(i%u),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(Ba),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ua,n=wa;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/4;u++)t.writeUint32BE(this._state[u],e,4*u);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],u=n[1],c=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++)m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&u^a&c^u&c)|0,p=d,d=h,h=f,f=l+m|0,l=c,c=u,u=a,a=m+_|0;n[0]+=a,n[1]+=u,n[2]+=c,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Ba,n=wa;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,I=0,x=0,R=0,k=0,P=0,C=0,A=0,N=0,T=0,M=0,L=0,j=n[0],U=n[1],D=n[2],z=n[3],F=n[4],B=n[5],H=n[6],q=n[7],V=n[8],$=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*j,s+=r*U,a+=r*D,u+=r*z,c+=r*F,l+=r*B,f+=r*H,h+=r*q,d+=r*V,p+=r*$,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*j,a+=r*U,u+=r*D,c+=r*z,l+=r*F,f+=r*B,h+=r*H,d+=r*q,p+=r*V,g+=r*$,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*j,u+=r*U,c+=r*D,l+=r*z,f+=r*F,h+=r*B,d+=r*H,p+=r*q,g+=r*V,y+=r*$,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],u+=r*j,c+=r*U,l+=r*D,f+=r*z,h+=r*F,d+=r*B,p+=r*H,g+=r*q,y+=r*V,v+=r*$,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],c+=r*j,l+=r*U,f+=r*D,h+=r*z,d+=r*F,p+=r*B,g+=r*H,y+=r*q,v+=r*V,m+=r*$,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*j,f+=r*U,h+=r*D,d+=r*z,p+=r*F,g+=r*B,y+=r*H,v+=r*q,m+=r*V,_+=r*$,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,I+=r*J,r=t[6],f+=r*j,h+=r*U,d+=r*D,p+=r*z,g+=r*F,y+=r*B,v+=r*H,m+=r*q,_+=r*V,b+=r*$,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,I+=r*Q,x+=r*J,r=t[7],h+=r*j,d+=r*U,p+=r*D,g+=r*z,y+=r*F,v+=r*B,m+=r*H,_+=r*q,b+=r*V,w+=r*$,E+=r*W,S+=r*K,O+=r*G,I+=r*Y,x+=r*Q,R+=r*J,r=t[8],d+=r*j,p+=r*U,g+=r*D,y+=r*z,v+=r*F,m+=r*B,_+=r*H,b+=r*q,w+=r*V,E+=r*$,S+=r*W,O+=r*K,I+=r*G,x+=r*Y,R+=r*Q,k+=r*J,r=t[9],p+=r*j,g+=r*U,y+=r*D,v+=r*z,m+=r*F,_+=r*B,b+=r*H,w+=r*q,E+=r*V,S+=r*$,O+=r*W,I+=r*K,x+=r*G,R+=r*Y,k+=r*Q,P+=r*J,r=t[10],g+=r*j,y+=r*U,v+=r*D,m+=r*z,_+=r*F,b+=r*B,w+=r*H,E+=r*q,S+=r*V,O+=r*$,I+=r*W,x+=r*K,R+=r*G,k+=r*Y,P+=r*Q,C+=r*J,r=t[11],y+=r*j,v+=r*U,m+=r*D,_+=r*z,b+=r*F,w+=r*B,E+=r*H,S+=r*q,O+=r*V,I+=r*$,x+=r*W,R+=r*K,k+=r*G,P+=r*Y,C+=r*Q,A+=r*J,r=t[12],v+=r*j,m+=r*U,_+=r*D,b+=r*z,w+=r*F,E+=r*B,S+=r*H,O+=r*q,I+=r*V,x+=r*$,R+=r*W,k+=r*K,P+=r*G,C+=r*Y,A+=r*Q,N+=r*J,r=t[13],m+=r*j,_+=r*U,b+=r*D,w+=r*z,E+=r*F,S+=r*B,O+=r*H,I+=r*q,x+=r*V,R+=r*$,k+=r*W,P+=r*K,C+=r*G,A+=r*Y,N+=r*Q,T+=r*J,r=t[14],_+=r*j,b+=r*U,w+=r*D,E+=r*z,S+=r*F,O+=r*B,I+=r*H,x+=r*q,R+=r*V,k+=r*$,P+=r*W,C+=r*K,A+=r*G,N+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*j,w+=r*U,E+=r*D,S+=r*z,O+=r*F,I+=r*B,x+=r*H,R+=r*q,k+=r*V,P+=r*$,C+=r*W,A+=r*K,N+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,u+=38*O,c+=38*I,l+=38*x,f+=38*R,h+=38*k,d+=38*P,p+=38*C,g+=38*A,y+=38*N,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),u(y,h,p),c(h,h,p),u(p,d,g),c(d,d,g),f(g,y),f(v,h),l(h,p,h),l(p,d,y),u(y,h,p),c(h,h,p),f(d,h),c(p,g,v),l(h,p,o),u(h,h,g),l(p,p,h),l(h,g,v),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(m,m),l(_,_,m);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var Qa=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===u;)r++,t++;for(var o=(e.length-t)*c+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,c=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*c[d]>>>0,c[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===c[p];)p++;for(var g=u.repeat(n);p<s;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};class Ja{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Xa{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return eu(this,e)}}class Za{constructor(e){this.decoders=e}or(e){return eu(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const eu=(e,t)=>new Za({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class tu{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new Ja(e,t,n),this.decoder=new Xa(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const nu=({name:e,prefix:t,encode:n,decode:r})=>new tu(e,t,n,r),ru=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=Qa(n,t);return nu({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")})(i(e))})},iu=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>nu({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,u=0,c=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);u=u<<n|o,a+=n,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=n||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});nu({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)}),iu({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),iu({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),ru({prefix:"9",name:"base10",alphabet:"0123456789"}),iu({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),iu({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),iu({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),iu({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),iu({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),iu({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),iu({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),iu({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),iu({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),iu({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),iu({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),ru({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ru({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),ru({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ru({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),iu({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iu({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),iu({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),iu({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const ou=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),su=ou.reduce(((e,t,n)=>(e[n]=t,e)),[]),au=ou.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);nu({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+su[t]),"")},decode:function(e){const t=[];for(const n of e){const e=au[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var uu=128,cu=-128,lu=Math.pow(2,31),fu=Math.pow(2,7),hu=Math.pow(2,14),du=Math.pow(2,21),pu=Math.pow(2,28),gu=Math.pow(2,35),yu=Math.pow(2,42),vu=Math.pow(2,49),mu=Math.pow(2,56),_u=Math.pow(2,63),bu=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=lu;)n[r++]=255&t|uu,t/=128;for(;t&cu;)n[r++]=255&t|uu,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},wu=function(e){return e<fu?1:e<hu?2:e<du?3:e<pu?4:e<gu?5:e<yu?6:e<vu?7:e<mu?8:e<_u?9:10};const Eu=(e,t,n=0)=>(bu(e,t,n),t),Su=e=>wu(e),Ou=(e,t)=>{const n=t.byteLength,r=Su(e),i=r+Su(n),o=new Uint8Array(i+n);return Eu(e,o,0),Eu(n,o,r),o.set(t,i),new Iu(e,n,t,o)};class Iu{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const xu=({name:e,code:t,encode:n})=>new Ru(e,t,n);class Ru{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Ou(this.code,t):t.then((e=>Ou(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ku=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));xu({name:"sha2-256",code:18,encode:ku("SHA-256")}),xu({name:"sha2-512",code:19,encode:ku("SHA-512")}),new TextEncoder,new TextDecoder;var Pu=function(e,t){return Pu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Pu(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */},Cu=function(){return Cu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cu.apply(this,arguments)};function Au(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Nu(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Tu(e){return this instanceof Tu?(this.v=e,this):new Tu(e)}var Mu,Lu,ju,Uu,Du,zu,Fu=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Pu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return Cu},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:Au,__read:Nu,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Nu(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:Tu,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof Tu?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Tu(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Au(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),Bu=f(Fu),Hu={},qu={},Vu={},$u={},Wu={},Ku={};function Gu(){return Uu||(Uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Bu;t.__exportStar((Lu||(Lu=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.ONE_THOUSAND=Wu.ONE_HUNDRED=void 0,Wu.ONE_HUNDRED=100,Wu.ONE_THOUSAND=1e3),Wu),e),t.__exportStar((ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(Ku)),Ku),e)}($u)),$u}var Yu,Qu,Ju,Xu={},Zu={},ec={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Bu;t.__exportStar((zu||(zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Bu;t.__exportStar((Mu||(Mu=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.delay=void 0,qu.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),qu),e),t.__exportStar(function(){if(Du)return Vu;Du=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.fromMiliseconds=Vu.toMiliseconds=void 0;const e=Gu();return Vu.toMiliseconds=function(t){return t*e.ONE_THOUSAND},Vu.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},Vu}(),e)}(Hu)),Hu),e),t.__exportStar(function(){if(Yu)return Xu;Yu=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return Xu.Watch=e,Xu.default=e,Xu}(),e),t.__exportStar((Ju||(Ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Bu.__exportStar((Qu||(Qu=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.IWatch=void 0,ec.IWatch=class{}),ec),e)}(Zu)),Zu),e),t.__exportStar(Gu(),e)}({});var tc={};function nc(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function rc(e){const t=nc(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(tc,"__esModule",{value:!0}),tc.getLocalStorage=tc.getLocalStorageOrThrow=tc.getCrypto=tc.getCryptoOrThrow=tc.getLocation=tc.getLocationOrThrow=tc.getNavigator=tc.getNavigatorOrThrow=tc.getDocument=tc.getDocumentOrThrow=tc.getFromWindowOrThrow=tc.getFromWindow=void 0,tc.getFromWindow=nc,tc.getFromWindowOrThrow=rc,tc.getDocumentOrThrow=function(){return rc("document")},tc.getDocument=function(){return nc("document")},tc.getNavigatorOrThrow=function(){return rc("navigator")},tc.getNavigator=function(){return nc("navigator")},tc.getLocationOrThrow=function(){return rc("location")},tc.getLocation=function(){return nc("location")},tc.getCryptoOrThrow=function(){return rc("crypto")},tc.getCrypto=function(){return nc("crypto")},tc.getLocalStorageOrThrow=function(){return rc("localStorage")},tc.getLocalStorage=function(){return nc("localStorage")};var ic={};Object.defineProperty(ic,"__esModule",{value:!0}),ic.getWindowMetadata=void 0;const oc=tc;ic.getWindowMetadata=function(){let e,t;try{e=oc.getDocumentOrThrow(),t=oc.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}(),i=n("description","og:description","twitter:description","keywords"),o=t.origin,s=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}();return{description:i,url:o,icons:s,name:r}};var sc=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),ac="%[a-f0-9]{2}",uc=new RegExp("("+ac+")|([^%]+?)","gi"),cc=new RegExp("("+ac+")+","gi");function lc(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],lc(n),lc(r))}function fc(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(uc)||[],n=1;n<t.length;n++)t=(e=lc(t,n).join("")).match(uc)||[];return e}}var hc=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=cc.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=fc(n[0]);r!==n[0]&&(t[n[0]]=r)}n=cc.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var s=i[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}},dc=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},pc=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n};!function(e){const t=sc,n=hc,r=dc,i=pc,o=Symbol("encodeFragmentIdentifier");function s(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function c(e){return Array.isArray(e)?e.sort():"object"==typeof e?c(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&u(n,e).includes(e.arrayFormatSeparator);n=o?u(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===n?n:u(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?u(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),n(u(e,t),s,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else i[e]=h(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=c(n):e[t]=n,e}),Object.create(null))}e.extract=f,e.parse=d,e.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[",i,"]"].join("")]:[...n,[a(t,e),"[",a(i,e),"]=",a(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[]"].join("")]:[...n,[a(t,e),"[]=",a(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),":list="].join("")]:[...n,[a(t,e),":list=",a(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[a(n,e),t,a(i,e)].join("")]:[[r,a(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,a(t,e)]:[...n,[a(t,e),"=",a(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?a(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?a(n,t)+"[]":i.reduce(r(n),[]).join("&"):a(n,t)+"="+a(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:u(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),s=e.parse(i,{sort:!1}),u=Object.assign(s,t.query);let c=e.stringify(u,n);c&&(c=`?${c}`);let f=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(f=`#${n[o]?a(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${c}${f}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:s,query:a,fragmentIdentifier:u}=e.parseUrl(t,r);return e.stringifyUrl({url:s,query:i(a,n),fragmentIdentifier:u},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}({});const gc={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function yc(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}var vc,mc,_c={exports:{}};!function(e,t){!function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof c<"u"?c:typeof self<"u"?self:{};function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r,i={exports:{}},o="object"==typeof Reflect?Reflect:null,s=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}i.exports=u,i.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n)}(e,i,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var l=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,s;if(f(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=h(e))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){console&&console.warn&&console.warn(e)}(a)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function y(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function v(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),u.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return h(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=m(u,c);for(n=0;n<c;++n)s(l[n],this,t)}return!0},u.prototype.addListener=function(e,t){return d(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return d(this,e,t,!0)},u.prototype.once=function(e,t){return f(t),this.on(e,g(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,g(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,i,o,s;if(f(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return y(this,e,!0)},u.prototype.rawListeners=function(e){return y(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},u.prototype.listenerCount=v,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};const b=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,w=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,E=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function S(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function O(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!E.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(b.test(e)||w.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,S)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function I(e,...t){try{return function(e){return e&&"function"==typeof e.then?e:Promise.resolve(e)}(e(...t))}catch(e){return Promise.reject(e)}}function x(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return x(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function R(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const k="base64:";function P(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function C(...e){return P(e.join(":"))}function A(e){return(e=P(e))?e+":":""}const N=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)||null,getItemRaw:t=>e.get(t)||null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function T(e={}){const t={mounts:{"":e.driver||N()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=P(n);for(const r of t.watchListeners)r(e,n)}},o=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},s=(e,t,r)=>{const i=new Map,o=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=P(e?r:r.key),s=e?void 0:r.value,a=e||!r.options?t:{...t,...r.options},u=n(i);o(u).items.push({key:i,value:s,relativeKey:u.relativeKey,options:a})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},a={hasItem(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return I(i.hasItem,r,t)},getItem(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return I(i.getItem,r,t).then((e=>O(e)))},getItems:(e,t)=>s(e,t,(e=>e.driver.getItems?I(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:C(e.base,t.key),value:O(t.value)}))))):Promise.all(e.items.map((t=>I(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:O(e)})))))))),getItemRaw(e,t={}){e=P(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?I(i.getItemRaw,r,t):I(i.getItem,r,t).then((e=>function(e){return"string"==typeof e&&e.startsWith(k)?(R(),Buffer.from(e.slice(k.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return a.removeItem(e);e=P(e);const{relativeKey:o,driver:s}=n(e);s.setItem&&(await I(s.setItem,o,x(t),r),s.watch||i("update",e))},async setItems(e,t){await s(e,t,(async e=>{e.driver.setItems&&await I(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:x(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>I(e.driver.setItem,t.relativeKey,x(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return a.removeItem(e,r);e=P(e);const{relativeKey:o,driver:s}=n(e);if(s.setItemRaw)await I(s.setItemRaw,o,t,r);else{if(!s.setItem)return;await I(s.setItem,o,function(e){if("string"==typeof e)return e;R();const t=Buffer.from(e).toString("base64");return k+t}(t),r)}s.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=P(e);const{relativeKey:r,driver:o}=n(e);o.removeItem&&(await I(o.removeItem,r,t),(t.removeMeta||t.removeMata)&&await I(o.removeItem,r+"$",t),o.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=P(e);const{relativeKey:r,driver:i}=n(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await I(i.getMeta,r,t)),!t.nativeOnly){const e=await I(i.getItem,r+"$",t).then((e=>O(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=A(e);const n=r(e,!0);let i=[];const o=[];for(const e of n){const n=(await I(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+P(t))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=A(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return I(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>L(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await M(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,n){if((e=A(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(M(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),a},async unmount(e,n=!0){(e=A(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await L(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=P(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>(e=P(e),r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint}))))};return a}function M(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function L(e){"function"==typeof e.dispose&&await I(e.dispose)}function j(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function U(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=j(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let D;function z(){return D||(D=U("keyval-store","keyval")),D}function F(e,t=z()){return t("readonly",(t=>j(t.get(e))))}function B(e=z()){return e("readonly",(e=>{if(e.getAllKeys)return j(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},j(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const H=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),q=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function V(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return q(e)}catch{return e}}function $(e){return"string"==typeof e?e:H(e)||""}var W=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=U(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await F(n(e),r)>"u"),getItem:async e=>await F(n(e),r)??null,setItem:(e,t)=>function(e,t,n=z()){return n("readwrite",(n=>(n.put(t,e),j(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=z()){return t("readwrite",(t=>(t.delete(e),j(t.transaction))))}(n(e),r),getKeys:()=>B(r),clear:()=>function(e=z()){return e("readwrite",(e=>(e.clear(),j(e.transaction))))}(r)}};class K{constructor(){this.indexedDb=T({driver:W({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,$(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var G=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof c<"u"?c:typeof self<"u"?self:{},Y={exports:{}};function Q(e){var t;return[e[0],V(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof G<"u"&&G.localStorage?Y.exports=G.localStorage:typeof window<"u"&&window.localStorage?Y.exports=window.localStorage:Y.exports=new t}();class J{constructor(){this.localStorage=Y.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Q)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return V(t)}async setItem(e,t){this.localStorage.setItem(e,$(t))}async removeItem(e){this.localStorage.removeItem(e)}}const X=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};class Z{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new J;this.storage=e;try{(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const o=await e.getKeys();if(!o.length)return void n(t);const s=[];for(;o.length;){const n=o.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),s.push(n)}}await t.setItem(r,1),n(t),X(e,s)})(e,new K,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}var ee={},te=function(e,t){return te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},te(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */};var ne=function(){return ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ne.apply(this,arguments)};function re(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ie(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function oe(e){return this instanceof oe?(this.v=e,this):new oe(e)}var se=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}te(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ne},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,a)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:re,__read:ie,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ie(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:oe,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof oe?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:oe(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=re(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),ae={},ue={},ce=function(e,t){return ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},ce(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */};var le=function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},le.apply(this,arguments)};function fe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function he(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function de(e){return this instanceof de?(this.v=e,this):new de(e)}var pe,ge=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}ce(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return le},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,a)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:fe,__read:he,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(he(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:de,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof de?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:de(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=fe(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),ye={},ve={};var me,_e={},be={},we={};var Ee,Se,Oe,Ie,xe={};function Re(){return Se||(Se=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ge;t.__exportStar((me||(me=1,Object.defineProperty(we,"__esModule",{value:!0}),we.ONE_THOUSAND=we.ONE_HUNDRED=void 0,we.ONE_HUNDRED=100,we.ONE_THOUSAND=1e3),we),e),t.__exportStar(function(){return Ee||(Ee=1,e=xe,Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY),xe;var e}(),e)}(be)),be}function ke(){return Ie||(Ie=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ge;t.__exportStar((pe||(pe=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.delay=void 0,ve.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),ve),e),t.__exportStar(function(){if(Oe)return _e;Oe=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.fromMiliseconds=_e.toMiliseconds=void 0;const e=Re();return _e.toMiliseconds=function(t){return t*e.ONE_THOUSAND},_e.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},_e}(),e)}(ye)),ye}var Pe,Ce={};var Ae,Ne,Te={},Me={};function Le(){return Ne||(Ne=1,e=Te,Object.defineProperty(e,"__esModule",{value:!0}),ge.__exportStar((Ae||(Ae=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.IWatch=void 0,Me.IWatch=class{}),Me),e)),Te;var e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ge;t.__exportStar(ke(),e),t.__exportStar(function(){if(Pe)return Ce;Pe=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(typeof t.elapsed<"u")throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(typeof t>"u")throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return Ce.Watch=e,Ce.default=e,Ce}(),e),t.__exportStar(Le(),e),t.__exportStar(Re(),e)}(ue);var je={},Ue={};class De{}var ze,Fe,Be=n(Object.freeze({__proto__:null,IEvents:De}));function He(){return Fe||(Fe=1,e=je,Object.defineProperty(e,"__esModule",{value:!0}),se.__exportStar(function(){if(ze)return Ue;ze=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.IHeartBeat=void 0;const e=Be;class t extends e.IEvents{constructor(e){super()}}return Ue.IHeartBeat=t,Ue}(),e)),je;var e}var qe,Ve,$e,We={},Ke={};function Ge(){return Ve||(Ve=1,e=We,Object.defineProperty(e,"__esModule",{value:!0}),se.__exportStar(function(){if(qe)return Ke;qe=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.HEARTBEAT_EVENTS=Ke.HEARTBEAT_INTERVAL=void 0;const e=ue;return Ke.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,Ke.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Ke}(),e)),We;var e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=se;t.__exportStar(function(){if($e)return ae;$e=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.HeartBeat=void 0;const e=se,t=i.exports,n=ue,r=He(),o=Ge();class s extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=e?.interval||o.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new s(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return ae.HeartBeat=s,ae}(),e),t.__exportStar(He(),e),t.__exportStar(Ge(),e)}(ee);var Ye={},Qe=function(e,t){return Qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Qe(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */};var Je=function(){return Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Je.apply(this,arguments)};function Xe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ze(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function et(e){return this instanceof et?(this.v=e,this):new et(e)}var tt,nt,rt,it,ot=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Qe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return Je},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,a)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:Xe,__read:Ze,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ze(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:et,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof et?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:et(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Xe(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}));function st(){if(it)return rt;it=1;const e=function(){if(nt)return tt;function e(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}return nt=1,tt=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var o=n.length+1;if(1===o)return t;var s=new Array(o);s[0]=i(t);for(var a=1;a<o;a++)s[a]=i(n[a]);return s.join(" ")}if("string"!=typeof t)return t;var u=n.length;if(0===u)return t;for(var c="",l=0,f=-1,h=t&&t.length||0,d=0;d<h;){if(37===t.charCodeAt(d)&&d+1<h){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(l>=u||null==n[l])break;f<d&&(c+=t.slice(f,d)),c+=Number(n[l]),f=d+2,d++;break;case 105:if(l>=u||null==n[l])break;f<d&&(c+=t.slice(f,d)),c+=Math.floor(Number(n[l])),f=d+2,d++;break;case 79:case 111:case 106:if(l>=u||void 0===n[l])break;f<d&&(c+=t.slice(f,d));var p=typeof n[l];if("string"===p){c+="'"+n[l]+"'",f=d+2,d++;break}if("function"===p){c+=n[l].name||"<anonymous>",f=d+2,d++;break}c+=i(n[l]),f=d+2,d++;break;case 115:if(l>=u)break;f<d&&(c+=t.slice(f,d)),c+=String(n[l]),f=d+2,d++;break;case 37:f<d&&(c+=t.slice(f,d)),c+="%",f=d+2,d++,l--}++l}++d}return-1===f?t:(f<h&&(c+=t.slice(f)),c)}}();rt=r;const t=function(){function e(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:h,mapHttpResponse:h,wrapRequestSerializer:d,wrapResponseSerializer:d,wrapErrorSerializer:d,req:h,res:h,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const o=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const s=e.serializers||{},c=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,s);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"==typeof o&&(o.error=o.fatal=o.warn=o.info=o.debug=o.trace=o),!1===e.enabled&&(e.level="silent");const d=e.level||"info",g=Object.create(o);g.log||(g.log=p),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,g,"error","log"),i(y,g,"fatal","error"),i(y,g,"warn","error"),i(y,g,"info","log"),i(y,g,"debug","log"),i(y,g,"trace","log")}});const y={transmit:n,serialize:c,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:f(e)};return g.levels=r.levels,g.level=d,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=p,g.serializers=s,g._serialize=c,g._stdErrSerialize=h,g.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},c&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(c&&i){var o=Object.assign({},s,i),f=!0===e.browser.serialize?Object.keys(o):c;delete t.serializers,a([t],f,o,this._stdErrSerialize)}function h(e){this._childLevel=1+(0|e._childLevel),this.error=u(e,t,"error"),this.fatal=u(e,t,"fatal"),this.warn=u(e,t,"warn"),this.info=u(e,t,"info"),this.debug=u(e,t,"debug"),this.trace=u(e,t,"trace"),o&&(this.serializers=o,this._serialize=f),n&&(this._logEvent=l([].concat(e._logEvent.bindings,t)))}return h.prototype=this,new h(this)},n&&(g._logEvent=l()),g}function i(e,n,r,i){const s=Object.getPrototypeOf(n);n[r]=n.levelVal>n.levels.values[r]?p:s[r]?s[r]:t[r]||t[i]||p,o(e,n,r)}function o(e,n,i){!e.transmit&&n[i]===p||(n[i]=function(o){return function(){const u=e.timestamp(),l=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var h=0;h<l.length;h++)l[h]=arguments[h];if(e.serialize&&!e.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?o.call(f,s(this,i,l,u)):o.apply(f,l),e.transmit){const t=e.transmit.level||n.level,o=r.levels.values[t],s=r.levels.values[i];if(s<o)return;c(this,{ts:u,methodLevel:i,methodValue:s,transmitLevel:t,transmitValue:r.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},l)}}}(n[i]))}function s(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let u=s[0];const c={};o&&(c.time=o),c.level=r.levels.values[n];let l=1+(0|t._childLevel);if(l<1&&(l=1),null!==u&&"object"==typeof u){for(;l--&&"object"==typeof s[0];)Object.assign(c,s.shift());u=s.length?e(s.shift(),s):void 0}else"string"==typeof u&&(u=e(s.shift(),s));return void 0!==u&&(c.msg=u),c}function a(e,t,n,i){for(const o in e)if(i&&e[o]instanceof Error)e[o]=r.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const r in e[o])t&&t.indexOf(r)>-1&&r in n&&(e[o][r]=n[r](e[o][r]))}function u(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function c(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===c.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=s,r(o,e._logEvent,u),e._logEvent=l(c)}function l(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?g:y}function h(){return{}}function d(e){return e}function p(){}function g(){return!1}function y(){return Date.now()}return r.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:g,epochTime:y,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),rt}var at,ut={};function ct(){return at||(at=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.PINO_CUSTOM_CONTEXT_KEY=ut.PINO_LOGGER_DEFAULTS=void 0,ut.PINO_LOGGER_DEFAULTS={level:"info"},ut.PINO_CUSTOM_CONTEXT_KEY="custom_context"),ut}var lt,ft={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=ot,n=t.__importDefault(st());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(ct(),e),t.__exportStar(function(){if(lt)return ft;lt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.generateChildLogger=ft.formatChildLoggerContext=ft.getLoggerContext=ft.setBrowserLoggerContext=ft.getBrowserLoggerContext=ft.getDefaultLoggerOptions=void 0;const e=ct();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=typeof n.bindings>"u"?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const o=r(t,i);return o.trim()?`${o}/${n}`:n}return ft.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:t?.level||e.PINO_LOGGER_DEFAULTS.level})},ft.getBrowserLoggerContext=t,ft.setBrowserLoggerContext=n,ft.getLoggerContext=r,ft.formatChildLoggerContext=i,ft.generateChildLogger=function(t,r,o=e.PINO_CUSTOM_CONTEXT_KEY){const s=i(t,r,o);return n(t.child({context:s}),s,o)},ft}(),e)}(Ye);class ht extends De{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class dt extends De{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class pt{constructor(e,t){this.logger=e,this.core=t}}class gt extends De{constructor(e,t){super(),this.relayer=e,this.logger=t}}class yt extends De{constructor(e){super()}}class vt{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}}class mt extends De{constructor(e,t){super(),this.relayer=e,this.logger=t}}class _t extends De{constructor(e,t){super(),this.core=e,this.logger=t}}class bt{constructor(e,t){this.projectId=e,this.logger=t}}class wt{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class Et{constructor(e){this.client=e}}var St={},Ot={},It={},xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.BrowserRandomSource=void 0;xt.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var Rt={},kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e};var Pt=n(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.NodeRandomSource=void 0;const Ct=kt;Rt.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=Pt;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,Ct.wipe)(t),n}},Object.defineProperty(It,"__esModule",{value:!0}),It.SystemRandomSource=void 0;const At=xt,Nt=Rt;It.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new At.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Nt.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};var Tt={},Mt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}})(Mt),Object.defineProperty(Tt,"__esModule",{value:!0});var Lt=Mt;function jt(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function Ut(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function Dt(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function zt(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Ft(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Bt(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Ht(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function qt(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Vt(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Ht(e/4294967296>>>0,t,n),Ht(e>>>0,t,n+4),t}function $t(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),qt(e>>>0,t,n),qt(e/4294967296>>>0,t,n+4),t}Tt.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Tt.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Tt.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Tt.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Tt.writeUint16BE=jt,Tt.writeInt16BE=jt,Tt.writeUint16LE=Ut,Tt.writeInt16LE=Ut,Tt.readInt32BE=Dt,Tt.readUint32BE=zt,Tt.readInt32LE=Ft,Tt.readUint32LE=Bt,Tt.writeUint32BE=Ht,Tt.writeInt32BE=Ht,Tt.writeUint32LE=qt,Tt.writeInt32LE=qt,Tt.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Dt(e,t),r=Dt(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Tt.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*zt(e,t)+zt(e,t+4)},Tt.readInt64LE=function(e,t){void 0===t&&(t=0);var n=Ft(e,t);return 4294967296*Ft(e,t+4)+n-4294967296*(n>>31)},Tt.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Bt(e,t);return 4294967296*Bt(e,t+4)+n},Tt.writeUint64BE=Vt,Tt.writeInt64BE=Vt,Tt.writeUint64LE=$t,Tt.writeInt64LE=$t,Tt.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Tt.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Tt.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Lt.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Tt.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Lt.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Tt.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Tt.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Tt.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Tt.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Tt.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},Tt.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},Tt.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},Tt.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=It,n=Tt,r=kt;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const u=n.length,c=256-256%u;for(;t>0;){const e=i(Math.ceil(256*t/c),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<c&&(a+=n.charAt(i%u),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(Ot);var Wt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Tt,n=kt;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%128<112?128:256;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/8;u++)t.writeUint32BE(this._stateHi[u],e,8*u),t.writeUint32BE(this._stateLo[u],e,8*u+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(e,n,r,o,s,a,u){for(var c,l,f,h,d,p,g,y,v=r[0],m=r[1],_=r[2],b=r[3],w=r[4],E=r[5],S=r[6],O=r[7],I=o[0],x=o[1],R=o[2],k=o[3],P=o[4],C=o[5],A=o[6],N=o[7];u>=128;){for(var T=0;T<16;T++){var M=8*T+a;e[T]=t.readUint32BE(s,M),n[T]=t.readUint32BE(s,M+4)}for(T=0;T<80;T++){var L,j,U=v,D=m,z=_,F=b,B=w,H=E,q=S,V=I,$=x,W=R,K=k,G=P,Y=C,Q=A;if(d=65535&(l=N),p=l>>>16,g=65535&(c=O),y=c>>>16,d+=65535&(l=(P>>>14|w<<18)^(P>>>18|w<<14)^(w>>>9|P<<23)),p+=l>>>16,g+=65535&(c=(w>>>14|P<<18)^(w>>>18|P<<14)^(P>>>9|w<<23)),y+=c>>>16,d+=65535&(l=P&C^~P&A),p+=l>>>16,g+=65535&(c=w&E^~w&S),y+=c>>>16,c=i[2*T],d+=65535&(l=i[2*T+1]),p+=l>>>16,g+=65535&c,y+=c>>>16,c=e[T%16],p+=(l=n[T%16])>>>16,g+=65535&c,y+=c>>>16,g+=(p+=(d+=65535&l)>>>16)>>>16,d=65535&(l=h=65535&d|p<<16),p=l>>>16,g=65535&(c=f=65535&g|(y+=g>>>16)<<16),y=c>>>16,d+=65535&(l=(I>>>28|v<<4)^(v>>>2|I<<30)^(v>>>7|I<<25)),p+=l>>>16,g+=65535&(c=(v>>>28|I<<4)^(I>>>2|v<<30)^(I>>>7|v<<25)),y+=c>>>16,p+=(l=I&x^I&R^x&R)>>>16,g+=65535&(c=v&m^v&_^m&_),y+=c>>>16,L=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,j=65535&d|p<<16,d=65535&(l=K),p=l>>>16,g=65535&(c=F),y=c>>>16,p+=(l=h)>>>16,g+=65535&(c=f),y+=c>>>16,m=U,_=D,b=z,w=F=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,E=B,S=H,O=q,v=L,x=V,R=$,k=W,P=K=65535&d|p<<16,C=G,A=Y,N=Q,I=j,T%16==15)for(M=0;M<16;M++)c=e[M],d=65535&(l=n[M]),p=l>>>16,g=65535&c,y=c>>>16,c=e[(M+9)%16],d+=65535&(l=n[(M+9)%16]),p+=l>>>16,g+=65535&c,y+=c>>>16,f=e[(M+1)%16],d+=65535&(l=((h=n[(M+1)%16])>>>1|f<<31)^(h>>>8|f<<24)^(h>>>7|f<<25)),p+=l>>>16,g+=65535&(c=(f>>>1|h<<31)^(f>>>8|h<<24)^f>>>7),y+=c>>>16,f=e[(M+14)%16],p+=(l=((h=n[(M+14)%16])>>>19|f<<13)^(f>>>29|h<<3)^(h>>>6|f<<26))>>>16,g+=65535&(c=(f>>>19|h<<13)^(h>>>29|f<<3)^f>>>6),y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&g|y<<16,n[M]=65535&d|p<<16}d=65535&(l=I),p=l>>>16,g=65535&(c=v),y=c>>>16,c=r[0],p+=(l=o[0])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[0]=v=65535&g|y<<16,o[0]=I=65535&d|p<<16,d=65535&(l=x),p=l>>>16,g=65535&(c=m),y=c>>>16,c=r[1],p+=(l=o[1])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[1]=m=65535&g|y<<16,o[1]=x=65535&d|p<<16,d=65535&(l=R),p=l>>>16,g=65535&(c=_),y=c>>>16,c=r[2],p+=(l=o[2])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[2]=_=65535&g|y<<16,o[2]=R=65535&d|p<<16,d=65535&(l=k),p=l>>>16,g=65535&(c=b),y=c>>>16,c=r[3],p+=(l=o[3])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[3]=b=65535&g|y<<16,o[3]=k=65535&d|p<<16,d=65535&(l=P),p=l>>>16,g=65535&(c=w),y=c>>>16,c=r[4],p+=(l=o[4])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[4]=w=65535&g|y<<16,o[4]=P=65535&d|p<<16,d=65535&(l=C),p=l>>>16,g=65535&(c=E),y=c>>>16,c=r[5],p+=(l=o[5])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&g|y<<16,o[5]=C=65535&d|p<<16,d=65535&(l=A),p=l>>>16,g=65535&(c=S),y=c>>>16,c=r[6],p+=(l=o[6])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[6]=S=65535&g|y<<16,o[6]=A=65535&d|p<<16,d=65535&(l=N),p=l>>>16,g=65535&(c=O),y=c>>>16,c=r[7],p+=(l=o[7])>>>16,g+=65535&c,y+=c>>>16,y+=(g+=(p+=(d+=65535&l)>>>16)>>>16)>>>16,r[7]=O=65535&g|y<<16,o[7]=N=65535&d|p<<16,a+=128,u-=128}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}})(Wt),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=Ot,n=Wt,r=kt;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32,new Uint8Array(32)[0]=9;const o=i(),s=i([1]),a=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),f=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function d(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function p(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function g(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];d(r),d(r),d(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,p(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function v(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return g(n,e),g(r,t),y(n,r)}function m(e){const t=new Uint8Array(32);return g(t,e),1&t[0]}function _(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function b(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function w(e,t,n){let r,i,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,I=0,x=0,R=0,k=0,P=0,C=0,A=0,N=0,T=0,M=0,L=0,j=n[0],U=n[1],D=n[2],z=n[3],F=n[4],B=n[5],H=n[6],q=n[7],V=n[8],$=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*j,s+=r*U,a+=r*D,u+=r*z,c+=r*F,l+=r*B,f+=r*H,h+=r*q,d+=r*V,p+=r*$,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*j,a+=r*U,u+=r*D,c+=r*z,l+=r*F,f+=r*B,h+=r*H,d+=r*q,p+=r*V,g+=r*$,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*j,u+=r*U,c+=r*D,l+=r*z,f+=r*F,h+=r*B,d+=r*H,p+=r*q,g+=r*V,y+=r*$,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],u+=r*j,c+=r*U,l+=r*D,f+=r*z,h+=r*F,d+=r*B,p+=r*H,g+=r*q,y+=r*V,v+=r*$,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],c+=r*j,l+=r*U,f+=r*D,h+=r*z,d+=r*F,p+=r*B,g+=r*H,y+=r*q,v+=r*V,m+=r*$,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*j,f+=r*U,h+=r*D,d+=r*z,p+=r*F,g+=r*B,y+=r*H,v+=r*q,m+=r*V,_+=r*$,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,I+=r*J,r=t[6],f+=r*j,h+=r*U,d+=r*D,p+=r*z,g+=r*F,y+=r*B,v+=r*H,m+=r*q,_+=r*V,b+=r*$,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,I+=r*Q,x+=r*J,r=t[7],h+=r*j,d+=r*U,p+=r*D,g+=r*z,y+=r*F,v+=r*B,m+=r*H,_+=r*q,b+=r*V,w+=r*$,E+=r*W,S+=r*K,O+=r*G,I+=r*Y,x+=r*Q,R+=r*J,r=t[8],d+=r*j,p+=r*U,g+=r*D,y+=r*z,v+=r*F,m+=r*B,_+=r*H,b+=r*q,w+=r*V,E+=r*$,S+=r*W,O+=r*K,I+=r*G,x+=r*Y,R+=r*Q,k+=r*J,r=t[9],p+=r*j,g+=r*U,y+=r*D,v+=r*z,m+=r*F,_+=r*B,b+=r*H,w+=r*q,E+=r*V,S+=r*$,O+=r*W,I+=r*K,x+=r*G,R+=r*Y,k+=r*Q,P+=r*J,r=t[10],g+=r*j,y+=r*U,v+=r*D,m+=r*z,_+=r*F,b+=r*B,w+=r*H,E+=r*q,S+=r*V,O+=r*$,I+=r*W,x+=r*K,R+=r*G,k+=r*Y,P+=r*Q,C+=r*J,r=t[11],y+=r*j,v+=r*U,m+=r*D,_+=r*z,b+=r*F,w+=r*B,E+=r*H,S+=r*q,O+=r*V,I+=r*$,x+=r*W,R+=r*K,k+=r*G,P+=r*Y,C+=r*Q,A+=r*J,r=t[12],v+=r*j,m+=r*U,_+=r*D,b+=r*z,w+=r*F,E+=r*B,S+=r*H,O+=r*q,I+=r*V,x+=r*$,R+=r*W,k+=r*K,P+=r*G,C+=r*Y,A+=r*Q,N+=r*J,r=t[13],m+=r*j,_+=r*U,b+=r*D,w+=r*z,E+=r*F,S+=r*B,O+=r*H,I+=r*q,x+=r*V,R+=r*$,k+=r*W,P+=r*K,C+=r*G,A+=r*Y,N+=r*Q,T+=r*J,r=t[14],_+=r*j,b+=r*U,w+=r*D,E+=r*z,S+=r*F,O+=r*B,I+=r*H,x+=r*q,R+=r*V,k+=r*$,P+=r*W,C+=r*K,A+=r*G,N+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*j,w+=r*U,E+=r*D,S+=r*z,O+=r*F,I+=r*B,x+=r*H,R+=r*q,k+=r*V,P+=r*$,C+=r*W,A+=r*K,N+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,u+=38*O,c+=38*I,l+=38*x,f+=38*R,h+=38*k,d+=38*P,p+=38*C,g+=38*A,y+=38*N,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function E(e,t){w(e,t,t)}function S(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&w(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function O(e,t){const n=i(),r=i(),o=i(),s=i(),a=i(),c=i(),l=i(),f=i(),h=i();b(n,e[1],e[0]),b(h,t[1],t[0]),w(n,n,h),_(r,e[0],e[1]),_(h,t[0],t[1]),w(r,r,h),w(o,e[3],t[3]),w(o,o,u),w(s,e[2],t[2]),_(s,s,s),b(a,r,n),b(c,s,o),_(l,s,o),_(f,r,n),w(e[0],a,c),w(e[1],f,l),w(e[2],l,c),w(e[3],a,f)}function I(e,t,n){for(let r=0;r<4;r++)p(e[r],t[r],n)}function x(e,t){const n=i(),r=i(),o=i();S(o,t[2]),w(n,t[0],o),w(r,t[1],o),g(e,r),e[31]^=m(n)<<7}function R(e,t,n){h(e[0],o),h(e[1],s),h(e[2],s),h(e[3],o);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;I(e,t,i),O(t,e),O(e,e),I(e,t,i)}}function k(e,t){const n=[i(),i(),i(),i()];h(n[0],c),h(n[1],l),h(n[2],s),w(n[3],c,l),R(e,n,t)}function P(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const o=new Uint8Array(32),s=[i(),i(),i(),i()];k(s,r),x(o,s);const a=new Uint8Array(64);return a.set(t),a.set(o,32),{publicKey:o,secretKey:a}}e.generateKeyPairFromSeed=P,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=P(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const C=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function A(e,t){let n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*C[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*C[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*C[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function N(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;A(e,t)}function T(e,t){const n=i(),r=i(),u=i(),c=i(),l=i(),d=i(),p=i();return h(e[2],s),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(u,e[1]),w(c,u,a),b(u,u,e[2]),_(c,e[2],c),E(l,c),E(d,l),w(p,d,l),w(n,p,u),w(n,n,c),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&w(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),w(n,n,u),w(n,n,c),w(n,n,c),w(e[0],n,c),E(r,e[0]),w(r,r,c),v(r,u)&&w(e[0],e[0],f),E(r,e[0]),w(r,r,c),v(r,u)?-1:(m(e[0])===t[31]>>7&&b(e[0],o,e[0]),w(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],s=(0,n.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const u=new n.SHA512;u.update(a.subarray(32)),u.update(t);const c=u.digest();u.clean(),N(c),k(o,c),x(a,o),u.reset(),u.update(a.subarray(0,32)),u.update(e.subarray(32)),u.update(t);const l=u.digest();N(l);for(let e=0;e<32;e++)r[e]=c[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*s[t];return A(a.subarray(32),r),a},e.verify=function(t,r,o){const s=new Uint8Array(32),a=[i(),i(),i(),i()],u=[i(),i(),i(),i()];if(o.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(T(u,t))return!1;const c=new n.SHA512;c.update(o.subarray(0,32)),c.update(t),c.update(r);const l=c.digest();return N(l),R(a,u,l),k(u,o.subarray(32)),O(a,u),x(s,a),!y(o,s)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(T(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),o=t[1];_(n,s,o),b(r,s,o),S(r,r),w(n,n,r);let a=new Uint8Array(32);return g(a,n),a},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(St);const Kt=".",Gt="base64url",Yt="utf8",Qt="utf8",Jt=":",Xt="did",Zt="key",en="base58btc",tn="z",nn="K36";function rn(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function on(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?rn(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function sn(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=on(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return rn(n)}var an=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===u;)r++,t++;for(var o=(e.length-t)*c+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,c=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*c[d]>>>0,c[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===c[p];)p++;for(var g=u.repeat(n);p<s;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};const un=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class cn{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class ln{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return hn(this,e)}}class fn{constructor(e){this.decoders=e}or(e){return hn(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const hn=(e,t)=>new fn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class dn{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new cn(e,t,n),this.decoder=new ln(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const pn=({name:e,prefix:t,encode:n,decode:r})=>new dn(e,t,n,r),gn=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=an(n,t);return pn({prefix:e,name:t,encode:r,decode:e=>un(i(e))})},yn=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>pn({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,u=0,c=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);u=u<<n|o,a+=n,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=n||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),vn=pn({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var mn=Object.freeze({__proto__:null,identity:vn});const _n=yn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var bn=Object.freeze({__proto__:null,base2:_n});const wn=yn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var En=Object.freeze({__proto__:null,base8:wn});const Sn=gn({prefix:"9",name:"base10",alphabet:"0123456789"});var On=Object.freeze({__proto__:null,base10:Sn});const In=yn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),xn=yn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Rn=Object.freeze({__proto__:null,base16:In,base16upper:xn});const kn=yn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Pn=yn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Cn=yn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),An=yn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nn=yn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Tn=yn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Mn=yn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ln=yn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),jn=yn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Un=Object.freeze({__proto__:null,base32:kn,base32upper:Pn,base32pad:Cn,base32padupper:An,base32hex:Nn,base32hexupper:Tn,base32hexpad:Mn,base32hexpadupper:Ln,base32z:jn});const Dn=gn({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),zn=gn({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Fn=Object.freeze({__proto__:null,base36:Dn,base36upper:zn});const Bn=gn({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Hn=gn({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var qn=Object.freeze({__proto__:null,base58btc:Bn,base58flickr:Hn});const Vn=yn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$n=yn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Wn=yn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Kn=yn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Gn=Object.freeze({__proto__:null,base64:Vn,base64pad:$n,base64url:Wn,base64urlpad:Kn});const Yn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Qn=Yn.reduce(((e,t,n)=>(e[n]=t,e)),[]),Jn=Yn.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const Xn=pn({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+Qn[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Jn[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Zn=Object.freeze({__proto__:null,base256emoji:Xn}),er=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=rr;)n[r++]=255&t|tr,t/=128;for(;t&nr;)n[r++]=255&t|tr,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},tr=128,nr=-128,rr=Math.pow(2,31);var ir=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&sr)<<o:(r&sr)*Math.pow(2,o),o+=7}while(r>=or);return e.bytes=s-n,i},or=128,sr=127;var ar=Math.pow(2,7),ur=Math.pow(2,14),cr=Math.pow(2,21),lr=Math.pow(2,28),fr=Math.pow(2,35),hr=Math.pow(2,42),dr=Math.pow(2,49),pr=Math.pow(2,56),gr=Math.pow(2,63),yr={encode:er,decode:ir,encodingLength:function(e){return e<ar?1:e<ur?2:e<cr?3:e<lr?4:e<fr?5:e<hr?6:e<dr?7:e<pr?8:e<gr?9:10}};const vr=(e,t,n=0)=>(yr.encode(e,t,n),t),mr=e=>yr.encodingLength(e),_r=(e,t)=>{const n=t.byteLength,r=mr(e),i=r+mr(n),o=new Uint8Array(i+n);return vr(e,o,0),vr(n,o,r),o.set(t,i),new br(e,n,t,o)};class br{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const wr=({name:e,code:t,encode:n})=>new Er(e,t,n);class Er{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?_r(this.code,t):t.then((e=>_r(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Sr=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Or=wr({name:"sha2-256",code:18,encode:Sr("SHA-256")}),Ir=wr({name:"sha2-512",code:19,encode:Sr("SHA-512")});Object.freeze({__proto__:null,sha256:Or,sha512:Ir});const xr=un;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:xr,digest:e=>_r(0,xr(e))}}),new TextEncoder,new TextDecoder;const Rr={...mn,...bn,...En,...On,...Rn,...Un,...Fn,...qn,...Gn,...Zn};function kr(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Pr=kr("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Cr=kr("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=on((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Ar={utf8:Pr,"utf-8":Pr,hex:Rr.base16,latin1:Cr,ascii:Cr,binary:Cr,...Rr};function Nr(e,t="utf8"){const n=Ar[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}function Tr(e,t="utf8"){const n=Ar[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):rn(globalThis.Buffer.from(e,"utf-8"))}function Mr(e){return Nr(Tr($(e),Yt),Gt)}function Lr(e){const t=Tr(nn,en),n=tn+Nr(sn([t,e]),en);return[Xt,Zt,n].join(Jt)}function jr(e){return Nr(e,Gt)}function Ur(e=Ot.randomBytes(32)){return St.generateKeyPairFromSeed(e)}async function Dr(e,t,n,r,i=ue.fromMiliseconds(Date.now())){const o={alg:"EdDSA",typ:"JWT"},s={iss:Lr(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},a=function(e){return Tr([Mr(e.header),Mr(e.payload)].join(Kt),Qt)}({header:o,payload:s});return function(e){return[Mr(e.header),Mr(e.payload),jr(e.signature)].join(Kt)}({header:o,payload:s,signature:St.sign(r.secretKey,a)})}var zr={},Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});var Br=Tt,Hr=kt,qr=20;function Vr(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],c=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=u,I=c,x=l,R=f,k=h,P=d,C=p,A=g,N=y,T=v,M=m,L=0;L<qr;L+=2)S=(S^=R=R+(A=(A^=_=_+S|0)>>>16|A<<16)|0)>>>20|S<<12,O=(O^=k=k+(N=(N^=b=b+O|0)>>>16|N<<16)|0)>>>20|O<<12,I=(I^=P=P+(T=(T^=w=w+I|0)>>>16|T<<16)|0)>>>20|I<<12,x=(x^=C=C+(M=(M^=E=E+x|0)>>>16|M<<16)|0)>>>20|x<<12,I=(I^=P=P+(T=(T^=w=w+I|0)>>>24|T<<8)|0)>>>25|I<<7,x=(x^=C=C+(M=(M^=E=E+x|0)>>>24|M<<8)|0)>>>25|x<<7,O=(O^=k=k+(N=(N^=b=b+O|0)>>>24|N<<8)|0)>>>25|O<<7,S=(S^=R=R+(A=(A^=_=_+S|0)>>>24|A<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,I=(I^=C=C+(A=(A^=b=b+I|0)>>>16|A<<16)|0)>>>20|I<<12,x=(x^=R=R+(N=(N^=w=w+x|0)>>>16|N<<16)|0)>>>20|x<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,x=(x^=R=R+(N=(N^=w=w+x|0)>>>24|N<<8)|0)>>>25|x<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,I=(I^=C=C+(A=(A^=b=b+I|0)>>>24|A<<8)|0)>>>25|I<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;Br.writeUint32LE(_+r|0,e,0),Br.writeUint32LE(b+i|0,e,4),Br.writeUint32LE(w+o|0,e,8),Br.writeUint32LE(E+s|0,e,12),Br.writeUint32LE(S+a|0,e,16),Br.writeUint32LE(O+u|0,e,20),Br.writeUint32LE(I+c|0,e,24),Br.writeUint32LE(x+l|0,e,28),Br.writeUint32LE(R+f|0,e,32),Br.writeUint32LE(k+h|0,e,36),Br.writeUint32LE(P+d|0,e,40),Br.writeUint32LE(C+p|0,e,44),Br.writeUint32LE(A+g|0,e,48),Br.writeUint32LE(N+y|0,e,52),Br.writeUint32LE(T+v|0,e,56),Br.writeUint32LE(M+m|0,e,60)}function $r(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),u=0;u<n.length;u+=64){Vr(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];Wr(o,0,s)}return Hr.wipe(a),0===i&&Hr.wipe(o),r}function Wr(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}Fr.streamXOR=$r,Fr.stream=function(e,t,n,r){return void 0===r&&(r=0),Hr.wipe(n),$r(e,t,n,n,r)};var Kr={},Gr={};function Yr(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.select=function(e,t,n){return~(e-1)&t|e-1&n},Gr.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Gr.compare=Yr,Gr.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Yr(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Gr,n=kt;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var u=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|u<<5);var c=t[14]|t[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var I=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|I<<3);var x=e[t+4]|e[t+5]<<8;s+=8191&(I>>>10|x<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(x>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|P<<2);var C=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|C<<5);var A=e[t+14]|e[t+15]<<8,N=0,T=N;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),N=(T+=u*(5*b))>>>13,T&=8191,T+=c*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(C>>>8|A<<8))*(5*y);var M=N+=(T+=(d+=A>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),N=(M+=u*(5*w))>>>13,M&=8191,M+=c*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),N+=(M+=d*(5*y))>>>13,M&=8191;var L=N;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),N=(L+=u*(5*E))>>>13,L&=8191,L+=c*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var j=N+=(L+=d*(5*v))>>>13;j+=i*v,j+=o*y,j+=s*g,j+=a*p,N=(j+=u*(5*S))>>>13,j&=8191,j+=c*(5*E),j+=l*(5*w),j+=f*(5*b),j+=h*(5*_);var U=N+=(j+=d*(5*m))>>>13;U+=i*m,U+=o*v,U+=s*y,U+=a*g,N=(U+=u*p)>>>13,U&=8191,U+=c*(5*S),U+=l*(5*E),U+=f*(5*w),U+=h*(5*b);var D=N+=(U+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,N=(D+=u*g)>>>13,D&=8191,D+=c*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=N+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,N=(z+=u*y)>>>13,z&=8191,z+=c*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var F=N+=(z+=d*(5*w))>>>13;F+=i*w,F+=o*b,F+=s*_,F+=a*m,N=(F+=u*v)>>>13,F&=8191,F+=c*y,F+=l*g,F+=f*p,F+=h*(5*S);var B=N+=(F+=d*(5*E))>>>13;B+=i*E,B+=o*w,B+=s*b,B+=a*_,N=(B+=u*m)>>>13,B&=8191,B+=c*v,B+=l*y,B+=f*g,B+=h*p;var H=N+=(B+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,N=(H+=u*_)>>>13,H&=8191,H+=c*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(N=(N=((N+=(H+=d*p)>>>13)<<2)+N|0)+(T&=8191)|0),o=M+=N>>>=13,s=L&=8191,a=j&=8191,u=U&=8191,c=D&=8191,l=z&=8191,f=F&=8191,h=B&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Kr),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Fr,n=Kr,r=kt,i=Tt,o=Gr;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var u,c=n.length+this.tagLength;if(o){if(o.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=o}else u=new Uint8Array(c);return t.streamXOR(this._key,s,n,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),a,u.subarray(0,u.length-this.tagLength),i),r.wipe(s),u},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var u=new Uint8Array(32);t.stream(this._key,a,u,4);var c=new Uint8Array(this.tagLength);if(this._authenticate(c,u,n.subarray(0,n.length-this.tagLength),i),!o.equal(c,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var u=new n.Poly1305(t);a&&(u.update(a),a.length%16>0&&u.update(s.subarray(a.length%16))),u.update(o),o.length%16>0&&u.update(s.subarray(o.length%16));var c=new Uint8Array(8);a&&i.writeUint64LE(a.length,c),u.update(c),i.writeUint64LE(o.length,c),u.update(c);for(var l=u.digest(),f=0;f<l.length;f++)e[f]=l[f];u.clean(),r.wipe(l),r.wipe(c)},a}();e.ChaCha20Poly1305=a}(zr);var Qr={},Jr={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.isSerializableHash=function(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"},Object.defineProperty(Jr,"__esModule",{value:!0});var Zr=Xr,ei=Gr,ti=kt,ni=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;for(this._inner.update(n),r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Zr.isSerializableHash(this._inner)&&Zr.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),ti.wipe(n)}return e.prototype.reset=function(){if(!Zr.isSerializableHash(this._inner)||!Zr.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Zr.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Zr.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Zr.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Zr.isSerializableHash(this._inner)||!Zr.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Zr.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();Jr.HMAC=ni,Jr.hmac=function(e,t,n){var r=new ni(e,t);r.update(n);var i=r.digest();return r.clean(),i},Jr.equal=ei.equal,Object.defineProperty(Qr,"__esModule",{value:!0});var ri=Jr,ii=kt,oi=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=ri.hmac(this._hash,n,t);this._hmac=new ri.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),ii.wipe(this._buffer),ii.wipe(this._counter),this._bufpos=0},e}(),si=Qr.HKDF=oi,ai={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Tt,n=kt;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/4;u++)t.writeUint32BE(this._state[u],e,4*u);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],u=n[1],c=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++)m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&u^a&c^u&c)|0,p=d,d=h,h=f,f=l+m|0,l=c,c=u,u=a,a=m+_|0;n[0]+=a,n[1]+=u,n[2]+=c,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(ai);var ui={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Ot,n=kt;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function u(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function f(e,t,n){let r,i,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,I=0,x=0,R=0,k=0,P=0,C=0,A=0,N=0,T=0,M=0,L=0,j=n[0],U=n[1],D=n[2],z=n[3],F=n[4],B=n[5],H=n[6],q=n[7],V=n[8],$=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*j,s+=r*U,a+=r*D,u+=r*z,c+=r*F,l+=r*B,f+=r*H,h+=r*q,d+=r*V,p+=r*$,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*j,a+=r*U,u+=r*D,c+=r*z,l+=r*F,f+=r*B,h+=r*H,d+=r*q,p+=r*V,g+=r*$,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*j,u+=r*U,c+=r*D,l+=r*z,f+=r*F,h+=r*B,d+=r*H,p+=r*q,g+=r*V,y+=r*$,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],u+=r*j,c+=r*U,l+=r*D,f+=r*z,h+=r*F,d+=r*B,p+=r*H,g+=r*q,y+=r*V,v+=r*$,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],c+=r*j,l+=r*U,f+=r*D,h+=r*z,d+=r*F,p+=r*B,g+=r*H,y+=r*q,v+=r*V,m+=r*$,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*j,f+=r*U,h+=r*D,d+=r*z,p+=r*F,g+=r*B,y+=r*H,v+=r*q,m+=r*V,_+=r*$,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,I+=r*J,r=t[6],f+=r*j,h+=r*U,d+=r*D,p+=r*z,g+=r*F,y+=r*B,v+=r*H,m+=r*q,_+=r*V,b+=r*$,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,I+=r*Q,x+=r*J,r=t[7],h+=r*j,d+=r*U,p+=r*D,g+=r*z,y+=r*F,v+=r*B,m+=r*H,_+=r*q,b+=r*V,w+=r*$,E+=r*W,S+=r*K,O+=r*G,I+=r*Y,x+=r*Q,R+=r*J,r=t[8],d+=r*j,p+=r*U,g+=r*D,y+=r*z,v+=r*F,m+=r*B,_+=r*H,b+=r*q,w+=r*V,E+=r*$,S+=r*W,O+=r*K,I+=r*G,x+=r*Y,R+=r*Q,k+=r*J,r=t[9],p+=r*j,g+=r*U,y+=r*D,v+=r*z,m+=r*F,_+=r*B,b+=r*H,w+=r*q,E+=r*V,S+=r*$,O+=r*W,I+=r*K,x+=r*G,R+=r*Y,k+=r*Q,P+=r*J,r=t[10],g+=r*j,y+=r*U,v+=r*D,m+=r*z,_+=r*F,b+=r*B,w+=r*H,E+=r*q,S+=r*V,O+=r*$,I+=r*W,x+=r*K,R+=r*G,k+=r*Y,P+=r*Q,C+=r*J,r=t[11],y+=r*j,v+=r*U,m+=r*D,_+=r*z,b+=r*F,w+=r*B,E+=r*H,S+=r*q,O+=r*V,I+=r*$,x+=r*W,R+=r*K,k+=r*G,P+=r*Y,C+=r*Q,A+=r*J,r=t[12],v+=r*j,m+=r*U,_+=r*D,b+=r*z,w+=r*F,E+=r*B,S+=r*H,O+=r*q,I+=r*V,x+=r*$,R+=r*W,k+=r*K,P+=r*G,C+=r*Y,A+=r*Q,N+=r*J,r=t[13],m+=r*j,_+=r*U,b+=r*D,w+=r*z,E+=r*F,S+=r*B,O+=r*H,I+=r*q,x+=r*V,R+=r*$,k+=r*W,P+=r*K,C+=r*G,A+=r*Y,N+=r*Q,T+=r*J,r=t[14],_+=r*j,b+=r*U,w+=r*D,E+=r*z,S+=r*F,O+=r*B,I+=r*H,x+=r*q,R+=r*V,k+=r*$,P+=r*W,C+=r*K,A+=r*G,N+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*j,w+=r*U,E+=r*D,S+=r*z,O+=r*F,I+=r*B,x+=r*H,R+=r*q,k+=r*V,P+=r*$,C+=r*W,A+=r*K,N+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,u+=38*O,c+=38*I,l+=38*x,f+=38*R,h+=38*k,d+=38*P,p+=38*C,g+=38*A,y+=38*N,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function h(e,t){f(e,t,t)}function d(e,t){const n=new Uint8Array(32),i=new Float64Array(80),s=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];s[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(s,d,t),a(p,g,t),c(y,s,p),l(s,s,p),c(p,d,g),l(d,d,g),h(g,y),h(v,s),f(s,p,s),f(p,d,y),c(y,s,p),l(s,s,p),h(d,s),l(p,g,v),f(s,p,o),c(s,s,g),f(p,p,s),f(s,g,v),f(g,d,i),h(d,y),a(s,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=s[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);(function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)h(n,n),2!==e&&4!==e&&f(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]})(m,m),f(_,_,m);const b=new Uint8Array(32);return u(b,_),b}function p(e){return d(e,i)}function g(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=d,e.scalarMultBase=p,e.generateKeyPairFromSeed=g,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=g(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=d(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(ui);var ci=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},li=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},fi=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},hi=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},di=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},pi=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},gi=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,yi=3,vi=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],mi=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function _i(e){return e?bi(e):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new pi:typeof navigator<"u"?bi(navigator.userAgent):typeof process<"u"&&process.version?new fi(process.version.slice(1)):null}function bi(e){var t=function(e){return""!==e&&vi.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new di;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<yi&&(i=ci(ci([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(yi-i.length),!0)):i=[];var o=i.join("."),s=function(e){for(var t=0,n=mi.length;t<n;t++){var r=mi[t],i=r[0];if(r[1].exec(e))return i}return null}(e),a=gi.exec(e);return a&&a[1]?new hi(n,o,s,a[1]):new li(n,o,s)}var wi={};function Ei(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}function Si(e){const t=Ei(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(wi,"__esModule",{value:!0}),wi.getLocalStorage=wi.getLocalStorageOrThrow=wi.getCrypto=wi.getCryptoOrThrow=xi=wi.getLocation=wi.getLocationOrThrow=Ii=wi.getNavigator=wi.getNavigatorOrThrow=Oi=wi.getDocument=wi.getDocumentOrThrow=wi.getFromWindowOrThrow=wi.getFromWindow=void 0,wi.getFromWindow=Ei,wi.getFromWindowOrThrow=Si,wi.getDocumentOrThrow=function(){return Si("document")};var Oi=wi.getDocument=function(){return Ei("document")};wi.getNavigatorOrThrow=function(){return Si("navigator")};var Ii=wi.getNavigator=function(){return Ei("navigator")};wi.getLocationOrThrow=function(){return Si("location")};var xi=wi.getLocation=function(){return Ei("location")};wi.getCryptoOrThrow=function(){return Si("crypto")},wi.getCrypto=function(){return Ei("crypto")},wi.getLocalStorageOrThrow=function(){return Si("localStorage")},wi.getLocalStorage=function(){return Ei("localStorage")};var Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});var ki=Ri.getWindowMetadata=void 0;const Pi=wi;ki=Ri.getWindowMetadata=function(){let e,t;try{e=Pi.getDocumentOrThrow(),t=Pi.getLocationOrThrow()}catch{return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:r}};var Ci={},Ai=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Ni="%[a-f0-9]{2}",Ti=new RegExp("("+Ni+")|([^%]+?)","gi"),Mi=new RegExp("("+Ni+")+","gi");function Li(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],Li(n),Li(r))}function ji(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Ti)||[],n=1;n<t.length;n++)t=(e=Li(t,n).join("")).match(Ti)||[];return e}}var Ui=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Mi.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=ji(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Mi.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var s=i[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}},Di=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},zi=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n};!function(e){const t=Ai,n=Ui,r=Di,i=zi,o=Symbol("encodeFragmentIdentifier");function s(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function c(e){return Array.isArray(e)?e.sort():"object"==typeof e?c(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function d(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&u(n,e).includes(e.arrayFormatSeparator);n=o?u(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===n?n:u(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&u(n,e));const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),n(u(e,t),s,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=h(n[e],t);else i[e]=h(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=c(n):e[t]=n,e}),Object.create(null))}e.extract=f,e.parse=d,e.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&(e=>null==e)(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[",i,"]"].join("")]:[...n,[a(t,e),"[",a(i,e),"]=",a(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),"[]"].join("")]:[...n,[a(t,e),"[]=",a(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[a(t,e),":list="].join("")]:[...n,[a(t,e),":list=",a(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[a(n,e),t,a(i,e)].join("")]:[[r,a(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,a(t,e)]:[...n,[a(t,e),"=",a(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((n=>{const i=e[n];return void 0===i?"":null===i?a(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?a(n,t)+"[]":i.reduce(r(n),[]).join("&"):a(n,t)+"="+a(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:d(f(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:u(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),s=e.parse(i,{sort:!1}),u=Object.assign(s,t.query);let c=e.stringify(u,n);c&&(c=`?${c}`);let f=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(f=`#${n[o]?a(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${c}${f}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:s,query:a,fragmentIdentifier:u}=e.parseUrl(t,r);return e.stringifyUrl({url:s,query:i(a,n),fragmentIdentifier:u},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(Ci);const Fi={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},Bi=":";function Hi(e,t){return e.includes(":")?[e]:t.chains||[]}const qi="base10",Vi="base16",$i="base64pad",Wi="utf8",Ki=0,Gi=1,Yi=0,Qi=1,Ji=12,Xi=32;function Zi(){return Nr(Ot.randomBytes(Xi),Vi)}function eo(e){return Nr(ai.hash(Tr(e,Wi)),Vi)}function to(e){return Number(Nr(e,qi))}function no(e){const t=function(e){return Tr(`${e}`,qi)}(typeof e.type<"u"?e.type:Ki);if(to(t)===Gi&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?Tr(e.senderPublicKey,Vi):void 0,r=typeof e.iv<"u"?Tr(e.iv,Vi):Ot.randomBytes(Ji);return function(e){if(to(e.type)===Gi){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Nr(sn([e.type,e.senderPublicKey,e.iv,e.sealed]),$i)}return Nr(sn([e.type,e.iv,e.sealed]),$i)}({type:t,sealed:new zr.ChaCha20Poly1305(Tr(e.symKey,Vi)).seal(r,Tr(e.message,Wi)),iv:r,senderPublicKey:n})}function ro(e){const t=Tr(e,$i),n=t.slice(Yi,Qi),r=Qi;if(to(n)===Gi){const e=r+Xi,i=e+Ji,o=t.slice(r,e),s=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:s,senderPublicKey:o}}const i=r+Ji,o=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:o}}function io(e){const t=e?.type||Ki;if(t===Gi){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function oo(e){return e.type===Gi&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var so=Object.defineProperty,ao=Object.getOwnPropertySymbols,uo=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable,lo=(e,t,n)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fo=(e,t)=>{for(var n in t||(t={}))uo.call(t,n)&&lo(e,n,t[n]);if(ao)for(var n of ao(t))co.call(t,n)&&lo(e,n,t[n]);return e};const ho="ReactNative",po={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},go="js";function yo(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function vo(){return!Oi()&&!!Ii()&&navigator.product===ho}function mo(){return!yo()&&!!Ii()}function _o(){return vo()?po.reactNative:yo()?po.node:mo()?po.browser:po.unknown}function bo(e,t,n){const r=function(){if(_o()===po.reactNative&&typeof c<"u"&&typeof(null==c?void 0:c.Platform)<"u"){const{OS:e,Version:t}=c.Platform;return[e,t].join("-")}const e=_i();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=_o();return t===po.browser?[t,(null==(e=xi())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[go,n].join("-"),r,i].join("/")}function wo({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:s,bundleId:a}){const u=n.split("?"),c={auth:i,ua:bo(e,t,r),projectId:o,useOnCloseEvent:s||void 0,origin:a||void 0},l=function(e,t){let n=Ci.parse(e);return n=fo(fo({},n),t),Ci.stringify(n)}(u[1]||"",c);return u[0]+"?"+l}function Eo(e,t){return e.filter((e=>t.includes(e))).length===e.length}function So(e){return Object.fromEntries(e.entries())}function Oo(e){return new Map(Object.entries(e))}function Io(e=ue.FIVE_MINUTES,t){const n=ue.toMiliseconds(e||ue.FIVE_MINUTES);let r,i,o;return{resolve:e=>{o&&r&&(clearTimeout(o),r(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,s)=>{o=setTimeout((()=>{s(new Error(t))}),n),r=e,i=s}))}}function xo(e,t,n){return new Promise((async(r,i)=>{const o=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(o)}))}function Ro(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function ko(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function Po(e,t){return ue.fromMiliseconds((t||Date.now())+ue.toMiliseconds(e))}function Co(e){return Date.now()>=ue.toMiliseconds(e)}function Ao(e,t){return`${e}${t?`:${t}`:""}`}function No(e=[],t=[]){return[...new Set([...e,...t])]}function To(e){return e?.relay||{protocol:"irn"}}function Mo(e){const t=Fi[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Lo=Object.defineProperty,jo=Object.getOwnPropertySymbols,Uo=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable,zo=(e,t,n)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Fo(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),o=e[t];n[i]=o}})),n}function Bo(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),o=typeof n<"u"?e.substring(n):"",s=Ci.parse(o);return{protocol:r,topic:Ho(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:Fo(s)}}function Ho(e){return e.startsWith("//")?e.substring(2):e}function qo(e){return`${e.protocol}:${e.topic}@${e.version}?`+Ci.stringify(((e,t)=>{for(var n in t||(t={}))Uo.call(t,n)&&zo(e,n,t[n]);if(jo)for(var n of jo(t))Do.call(t,n)&&zo(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)))}function Vo(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function $o(e){return e.includes(":")}function Wo(e){return $o(e)?e.split(":")[0]:e}const Ko={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Go={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Yo(e,t){const{message:n,code:r}=Go[e];return{message:t?`${n} ${t}`:n,code:r}}function Qo(e,t){const{message:n,code:r}=Ko[e];return{message:t?`${n} ${t}`:n,code:r}}function Jo(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function Xo(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Zo(e){return typeof e>"u"}function es(e,t){return!(!t||!Zo(e))||"string"==typeof e&&!!e.trim().length}function ts(e,t){return!(!t||!Zo(e))||"number"==typeof e&&!isNaN(e)}function ns(e){return!(!es(e,!1)||!e.includes(":"))&&2===e.split(":").length}function rs(e){let t=!0;return Jo(e)?e.length&&(t=e.every((e=>es(e,!1)))):t=!1,t}function is(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const o=function(e,t,n){let r=null;return Jo(t)&&t.length?t.forEach((e=>{r||ns(e)||(r=Qo("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):ns(e)||(r=Qo("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(e,Hi(e,i),`${t} ${n}`);o&&(r=o)})),r}function os(e,t){let n=null;return Jo(e)?e.forEach((e=>{n||function(e){if(es(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&ns(e)}}return!1}(e)||(n=Qo("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=Qo("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function ss(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return rs(e?.methods)?rs(e?.events)||(n=Qo("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=Qo("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function as(e,t){let n=null;if(e&&Xo(e)){const r=ss(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=os(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=Yo("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function us(e){return es(e.protocol,!0)}function cs(e){return typeof e<"u"&&null!==typeof e}function ls(e,t){return!(!ns(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Vo(e.accounts))})),t}(e).includes(t))}function fs(e,t,n){return!!es(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Vo(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function hs(e,t,n){return!!es(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Vo(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function ds(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=Vo(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),s=Object.keys(i),a=Object.keys(o),u=ps(Object.keys(e)),c=ps(Object.keys(t)),l=u.filter((e=>!c.includes(e)));return l.length&&(r=Yo("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),Eo(s,a)||(r=Yo("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${s.toString()}\n Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=Vo(t[e].accounts);i.includes(e)||(r=Yo("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),s.forEach((e=>{r||(Eo(i[e].methods,o[e].methods)?Eo(i[e].events,o[e].events)||(r=Yo("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=Yo("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function ps(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function gs(){const e=_o();return new Promise((t=>{switch(e){case po.browser:t(mo()&&navigator?.onLine);break;case po.reactNative:t(async function(){if(vo()&&typeof c<"u"&&null!=c&&c.NetInfo){const e=await(null==c?void 0:c.NetInfo.fetch());return e?.isConnected}return!0}());break;case po.node:default:t(!0)}}))}function ys(e){switch(_o()){case po.browser:!function(e){!vo()&&mo()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case po.reactNative:!function(e){vo()&&typeof c<"u"&&null!=c&&c.NetInfo&&c?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const vs={};class ms{static get(e){return vs[e]}static set(e,t){vs[e]=t}static delete(e){delete vs[e]}}const _s="INTERNAL_ERROR",bs="SERVER_ERROR",ws=[-32700,-32600,-32601,-32602,-32603],Es={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[_s]:{code:-32603,message:"Internal error"},[bs]:{code:-32e3,message:"Server error"}},Ss=bs;function Os(e){return Object.keys(Es).includes(e)?Es[e]:Es[Ss]}function Is(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var xs={},Rs=function(e,t){return Rs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Rs(e,t) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */};var ks=function(){return ks=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ks.apply(this,arguments)};function Ps(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cs(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function As(e){return this instanceof As?(this.v=e,this):new As(e)}var Ns,Ts=n(Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Rs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ks},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,a)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])},__values:Ps,__read:Cs,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Cs(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__await:As,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof As?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:As(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Ps(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}})),Ms={};function Ls(){if(Ns)return Ms;function e(){return t?.crypto||t?.msCrypto||{}}function n(){const t=e();return t.subtle||t.webkitSubtle}return Ns=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.isBrowserCryptoAvailable=Ms.getSubtleCrypto=Ms.getBrowerCrypto=void 0,Ms.getBrowerCrypto=e,Ms.getSubtleCrypto=n,Ms.isBrowserCryptoAvailable=function(){return!!e()&&!!n()},Ms}var js,Us={};function Ds(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function zs(e=6){return BigInt(Ds(e))}function Fs(e,t,n){return{id:n||Ds(),jsonrpc:"2.0",method:e,params:t}}function Bs(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Hs(e,t,n){return{id:e,jsonrpc:"2.0",error:qs(t,n)}}function qs(e,t){return typeof e>"u"?Os(_s):("string"==typeof e&&(e=Object.assign(Object.assign({},Os(bs)),{message:e})),typeof t<"u"&&(e.data=t),function(e){return ws.includes(e)}(e.code)&&(e=function(e){return Object.values(Es).find((t=>t.code===e))||Es[Ss]}(e.code)),e)}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Ts;t.__exportStar(Ls(),e),t.__exportStar(function(){if(js)return Us;function e(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}return js=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.isBrowser=Us.isNode=Us.isReactNative=void 0,Us.isReactNative=e,Us.isNode=t,Us.isBrowser=function(){return!e()&&!t()},Us}(),e)}(xs);class Vs{}class $s extends Vs{constructor(){super()}}class Ws extends $s{constructor(e){super()}}function Ks(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return!(typeof n>"u")&&new RegExp(t).test(n)}function Gs(e){return Ks(e,"^https?:")}function Ys(e){return Ks(e,"^wss?:")}function Qs(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function Js(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function Xs(e){return Js(e)&&"method"in e}function Zs(e){return Js(e)&&(ea(e)||ta(e))}function ea(e){return"result"in e}function ta(e){return"error"in e}class na extends Ws{constructor(e){super(e),this.events=new i.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Fs(e.method,e.params||[],e.id||zs().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{ta(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Zs(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const ra=e=>e.split("?")[0],ia=typeof WebSocket<"u"?WebSocket:typeof c<"u"&&typeof c.WebSocket<"u"?c.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:mc?vc:(mc=1,vc=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")});class oa{constructor(e){if(this.url=e,this.events=new i.exports.EventEmitter,this.registering=!1,!Ys(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send($(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!Ys(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=xs.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!Qs(e)},o=new ia(e,[],i);typeof WebSocket<"u"||typeof c<"u"&&typeof c.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?o.onerror=e=>{const t=e;n(this.emitError(t.error))}:o.on("error",(e=>{n(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?V(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hs(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return Is(e,ra(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${ra(this.url)}`));return this.events.emit("register_error",t),t}}var sa={exports:{}};!function(e,n){var r="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",u="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",f="[object Date]",h="[object Error]",d="[object Function]",p="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",m="[object Object]",_="[object Promise]",b="[object Proxy]",w="[object RegExp]",E="[object Set]",S="[object String]",O="[object Symbol]",I="[object Undefined]",x="[object WeakMap]",R="[object ArrayBuffer]",k="[object DataView]",P=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[a]=A[u]=A[R]=A[l]=A[k]=A[f]=A[h]=A[d]=A[g]=A[y]=A[m]=A[w]=A[E]=A[S]=A[x]=!1;var N="object"==typeof t&&t&&t.Object===Object&&t,T="object"==typeof self&&self&&self.Object===Object&&self,M=N||T||Function("return this")(),L=n&&!n.nodeType&&n,j=L&&e&&!e.nodeType&&e,U=j&&j.exports===L,D=U&&N.process,z=function(){try{return D&&D.binding&&D.binding("util")}catch{}}(),F=z&&z.isTypedArray;function B(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function H(e,t){return e.has(t)}function q(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $=Array.prototype,W=Function.prototype,K=Object.prototype,G=M["__core-js_shared__"],Y=W.toString,Q=K.hasOwnProperty,J=function(){var e=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),X=K.toString,Z=RegExp("^"+Y.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=U?M.Buffer:void 0,te=M.Symbol,ne=M.Uint8Array,re=K.propertyIsEnumerable,ie=$.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,ue=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=De(M,"DataView"),le=De(M,"Map"),fe=De(M,"Promise"),he=De(M,"Set"),de=De(M,"WeakMap"),pe=De(Object,"create"),ge=He(ce),ye=He(le),ve=He(fe),me=He(he),_e=He(de),be=te?te.prototype:void 0,we=be?be.valueOf:void 0;function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new Se(e);this.size=t.size}function Re(e,t){var n=$e(e),r=!n&&Ve(e),i=!n&&!r&&We(e),o=!n&&!r&&!i&&Je(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var c in e)(t||Q.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Be(c,u)))&&a.push(c);return a}function ke(e,t){for(var n=e.length;n--;)if(qe(e[n][0],t))return n;return-1}function Pe(e){return null==e?void 0===e?I:v:oe&&oe in Object(e)?function(e){var t=Q.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=X.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}(e):function(e){return X.call(e)}(e)}function Ce(e){return Qe(e)&&Pe(e)==a}function Ae(e,t,n,r,o){return e===t||(null==e||null==t||!Qe(e)&&!Qe(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var c=$e(e),l=$e(t),f=c?u:Fe(e),h=l?u:Fe(t),d=(f=f==a?m:f)==m,p=(h=h==a?m:h)==m,g=f==h;if(g&&We(e)){if(!We(t))return!1;c=!0,d=!1}if(g&&!d)return s||(s=new xe),c||Je(e)?Me(e,t,n,r,o,s):Le(e,t,f,n,r,o,s);if(!(n&i)){var y=d&&Q.call(e,"__wrapped__"),v=p&&Q.call(t,"__wrapped__");if(y||v){var _=y?e.value():e,b=v?t.value():t;return s||(s=new xe),o(_,b,n,r,s)}}return!!g&&(s||(s=new xe),function(e,t,n,r,o,s){var a=n&i,u=je(e),c=u.length;if(c!=je(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Q.call(t,f)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var d=!0;s.set(e,t),s.set(t,e);for(var p=a;++l<c;){var g=e[f=u[l]],y=t[f];if(r)var v=a?r(y,g,f,t,e,s):r(g,y,f,e,t,s);if(!(void 0===v?g===y||o(g,y,n,r,s):v)){d=!1;break}p||(p="constructor"==f)}if(d&&!p){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return s.delete(e),s.delete(t),d}(e,t,n,r,o,s))}(e,t,n,r,Ae,o))}function Ne(e){return!(!Ye(e)||function(e){return!!J&&J in e}(e))&&(Ke(e)?Z:P).test(He(e))}function Te(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||K)}(e))return ue(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Me(e,t,n,r,s,a){var u=n&i,c=e.length,l=t.length;if(c!=l&&!(u&&l>c))return!1;var f=a.get(e);if(f&&a.get(t))return f==t;var h=-1,d=!0,p=n&o?new Ie:void 0;for(a.set(e,t),a.set(t,e);++h<c;){var g=e[h],y=t[h];if(r)var v=u?r(y,g,h,t,e,a):r(g,y,h,e,t,a);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!B(t,(function(e,t){if(!H(p,t)&&(g===e||s(g,e,n,r,a)))return p.push(t)}))){d=!1;break}}else if(g!==y&&!s(g,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Le(e,t,n,r,s,a,u){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!a(new ne(e),new ne(t)));case l:case f:case y:return qe(+e,+t);case h:return e.name==t.name&&e.message==t.message;case w:case S:return e==t+"";case g:var c=q;case E:var d=r&i;if(c||(c=V),e.size!=t.size&&!d)return!1;var p=u.get(e);if(p)return p==t;r|=o,u.set(e,t);var v=Me(c(e),c(t),r,s,a,u);return u.delete(e),v;case O:if(we)return we.call(e)==we.call(t)}return!1}function je(e){return function(e,t,n){var r=t(e);return $e(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Xe,ze)}function Ue(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function De(e,t){var n=function(e,t){return e?.[t]}(e,t);return Ne(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ee.prototype.get=function(e){var t=this.__data__;if(pe){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Q.call(t,e)},Ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return ke(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(le||Se),string:new Ee}},Oe.prototype.delete=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return Ue(this,e).get(e)},Oe.prototype.has=function(e){return Ue(this,e).has(e)},Oe.prototype.set=function(e,t){var n=Ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ie.prototype.add=Ie.prototype.push=function(e){return this.__data__.set(e,r),this},Ie.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new Se,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(r)}return n.set(e,t),this.size=n.size,this};var ze=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(se(e),(function(t){return re.call(e,t)})))}:function(){return[]},Fe=Pe;function Be(e,t){return!!(t=t??s)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e){if(null!=e){try{return Y.call(e)}catch{}try{return e+""}catch{}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(ce&&Fe(new ce(new ArrayBuffer(1)))!=k||le&&Fe(new le)!=g||fe&&Fe(fe.resolve())!=_||he&&Fe(new he)!=E||de&&Fe(new de)!=x)&&(Fe=function(e){var t=Pe(e),n=t==m?e.constructor:void 0,r=n?He(n):"";if(r)switch(r){case ge:return k;case ye:return g;case ve:return _;case me:return E;case _e:return x}return t});var Ve=Ce(function(){return arguments}())?Ce:function(e){return Qe(e)&&Q.call(e,"callee")&&!re.call(e,"callee")},$e=Array.isArray;var We=ae||function(){return!1};function Ke(e){if(!Ye(e))return!1;var t=Pe(e);return t==d||t==p||t==c||t==b}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Qe(e){return null!=e&&"object"==typeof e}var Je=F?function(e){return function(t){return e(t)}}(F):function(e){return Qe(e)&&Ge(e.length)&&!!A[Pe(e)]};function Xe(e){return function(e){return null!=e&&Ge(e.length)&&!Ke(e)}(e)?Re(e):Te(e)}e.exports=function(e,t){return Ae(e,t)}}(sa,sa.exports);var aa=sa.exports,ua=Object.defineProperty,ca=Object.getOwnPropertySymbols,la=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,ha=(e,t,n)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,da=(e,t)=>{for(var n in t||(t={}))la.call(t,n)&&ha(e,n,t[n]);if(ca)for(var n of ca(t))fa.call(t,n)&&ha(e,n,t[n]);return e};var pa=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===u;)r++,t++;for(var o=(e.length-t)*c+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,c=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*c[d]>>>0,c[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===c[p];)p++;for(var g=u.repeat(n);p<s;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}};const ga=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class ya{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class va{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return _a(this,e)}}class ma{constructor(e){this.decoders=e}or(e){return _a(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _a=(e,t)=>new ma(da(da({},e.decoders||{[e.prefix]:e}),t.decoders||{[t.prefix]:t}));class ba{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new ya(e,t,n),this.decoder=new va(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const wa=({name:e,prefix:t,encode:n,decode:r})=>new ba(e,t,n,r),Ea=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=pa(n,t);return wa({prefix:e,name:t,encode:r,decode:e=>ga(i(e))})},Sa=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>wa({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,u=0,c=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);u=u<<n|o,a+=n,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=n||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),Oa=wa({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var Ia=Object.freeze({__proto__:null,identity:Oa});const xa=Sa({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Ra=Object.freeze({__proto__:null,base2:xa});const ka=Sa({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Pa=Object.freeze({__proto__:null,base8:ka});const Ca=Ea({prefix:"9",name:"base10",alphabet:"0123456789"});var Aa=Object.freeze({__proto__:null,base10:Ca});const Na=Sa({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ta=Sa({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Ma=Object.freeze({__proto__:null,base16:Na,base16upper:Ta});const La=Sa({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ja=Sa({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Ua=Sa({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Da=Sa({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),za=Sa({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Fa=Sa({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ba=Sa({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ha=Sa({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),qa=Sa({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Va=Object.freeze({__proto__:null,base32:La,base32upper:ja,base32pad:Ua,base32padupper:Da,base32hex:za,base32hexupper:Fa,base32hexpad:Ba,base32hexpadupper:Ha,base32z:qa});const $a=Ea({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Wa=Ea({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Ka=Object.freeze({__proto__:null,base36:$a,base36upper:Wa});const Ga=Ea({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ya=Ea({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Qa=Object.freeze({__proto__:null,base58btc:Ga,base58flickr:Ya});const Ja=Sa({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Xa=Sa({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Za=Sa({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),eu=Sa({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var tu=Object.freeze({__proto__:null,base64:Ja,base64pad:Xa,base64url:Za,base64urlpad:eu});const nu=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ru=nu.reduce(((e,t,n)=>(e[n]=t,e)),[]),iu=nu.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ou=wa({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+ru[t]),"")},decode:function(e){const t=[];for(const n of e){const e=iu[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var su=Object.freeze({__proto__:null,base256emoji:ou}),au=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=lu;)n[r++]=255&t|uu,t/=128;for(;t&cu;)n[r++]=255&t|uu,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},uu=128,cu=-128,lu=Math.pow(2,31);var fu=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&du)<<o:(r&du)*Math.pow(2,o),o+=7}while(r>=hu);return e.bytes=s-n,i},hu=128,du=127;var pu=Math.pow(2,7),gu=Math.pow(2,14),yu=Math.pow(2,21),vu=Math.pow(2,28),mu=Math.pow(2,35),_u=Math.pow(2,42),bu=Math.pow(2,49),wu=Math.pow(2,56),Eu=Math.pow(2,63),Su={encode:au,decode:fu,encodingLength:function(e){return e<pu?1:e<gu?2:e<yu?3:e<vu?4:e<mu?5:e<_u?6:e<bu?7:e<wu?8:e<Eu?9:10}};const Ou=(e,t,n=0)=>(Su.encode(e,t,n),t),Iu=e=>Su.encodingLength(e),xu=(e,t)=>{const n=t.byteLength,r=Iu(e),i=r+Iu(n),o=new Uint8Array(i+n);return Ou(e,o,0),Ou(n,o,r),o.set(t,i),new Ru(e,n,t,o)};class Ru{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ku=({name:e,code:t,encode:n})=>new Pu(e,t,n);class Pu{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?xu(this.code,t):t.then((e=>xu(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Cu=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Au=ku({name:"sha2-256",code:18,encode:Cu("SHA-256")}),Nu=ku({name:"sha2-512",code:19,encode:Cu("SHA-512")});var Tu=Object.freeze({__proto__:null,sha256:Au,sha512:Nu});const Mu=ga;var Lu=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Mu,digest:e=>xu(0,Mu(e))}});new TextEncoder,new TextDecoder;const ju=da(da(da(da(da(da(da(da(da(da({},Ia),Ra),Pa),Aa),Ma),Va),Ka),Qa),tu),su);function Uu(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Du(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}da(da({},Tu),Lu);const zu=Du("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Fu=Du("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Uu(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),Bu=da({utf8:zu,"utf-8":zu,hex:ju.base16,latin1:Fu,ascii:Fu,binary:Fu},ju);const Hu="core",qu=`wc@2:${Hu}:`,Vu="error",$u={database:":memory:"},Wu="client_ed25519_seed",Ku=ue.ONE_DAY,Gu=ue.SIX_HOURS,Yu="wss://relay.walletconnect.com",Qu="wss://relay.walletconnect.org",Ju="relayer_message",Xu="relayer_message_ack",Zu="relayer_connect",ec="relayer_disconnect",tc="relayer_error",nc="relayer_connection_stalled",rc="relayer_publish",ic="payload",oc="connect",sc="disconnect",ac="error",uc=ue.ONE_SECOND,cc="subscription_created",lc="subscription_deleted",fc="subscription_sync",hc="subscription_resubscribed",dc=1e3*ue.FIVE_SECONDS,pc={wc_pairingDelete:{req:{ttl:ue.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:ue.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:ue.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:ue.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:ue.ONE_DAY,prompt:!1,tag:0},res:{ttl:ue.ONE_DAY,prompt:!1,tag:0}}},gc="pairing_create",yc="pairing_expire",_c="pairing_delete",bc="pairing_ping",wc="history_created",Ec="history_updated",Sc="history_deleted",Oc="history_sync",Ic="expirer_created",xc="expirer_deleted",Rc="expirer_expired",kc="expirer_sync",Pc="verify-api",Cc="https://verify.walletconnect.com",Ac="https://verify.walletconnect.org",Nc=[Cc,Ac];class Tc{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=qu,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=Yo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=Ye.generateChildLogger(t,this.name)}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,So(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Oo(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Mc{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),Lr(Ur(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=ui.generateKeyPair();return{privateKey:Nr(e.secretKey,Vi),publicKey:Nr(e.publicKey,Vi)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=Ur(await this.getClientSeed()),n=Zi();return await Dr(n,e,Ku,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=ui.sharedKey(Tr(e,Vi),Tr(t,Vi),!0);return Nr(new si(ai.SHA256,n).expand(Xi),Vi)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return Nr(ai.hash(Tr(e,Vi)),Vi)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=io(n),i=$(t);if(oo(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const o=this.getSymKey(e),{type:s,senderPublicKey:a}=r;return no({type:s,symKey:o,message:i,senderPublicKey:a})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=ro(e);return io({type:to(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Nr(n.senderPublicKey,Vi):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(oo(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{return V(function(e){const t=new zr.ChaCha20Poly1305(Tr(e.symKey,Vi)),{sealed:n,iv:r}=ro(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return Nr(i,Wi)}({symKey:this.getSymKey(e),encoded:t}))}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>to(ro(e).type),this.getPayloadSenderPublicKey=e=>{const t=ro(e);return t.senderPublicKey?Nr(t.senderPublicKey,Vi):void 0},this.core=e,this.logger=Ye.generateChildLogger(t,this.name),this.keychain=n||new Tc(this.core,this.logger)}get context(){return Ye.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Wu)}catch{e=Zi(),await this.keychain.set(Wu,e)}return function(e,t="utf8"){const n=Bu[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):Uu(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Lc extends pt{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=qu,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=eo(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[eo(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=Ye.generateChildLogger(e,this.name),this.core=t}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,So(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Oo(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class jc extends gt{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new i.exports.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=ue.toMiliseconds(ue.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||Gu,o=To(n),s=n?.prompt||!1,a=n?.tag||0,u=n?.id||zs().toString(),c={topic:e,message:t,opts:{ttl:i,relay:o,prompt:s,tag:a,id:u}},l=setTimeout((()=>this.queue.set(u,c)),this.publishTimeout);try{await await xo(this.rpcPublish(e,t,i,o,s,a,u),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(u),this.relayer.events.emit(rc,c)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(u),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=Ye.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return Ye.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,o,s){var a,u,c,l;const f={method:Mo(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:o},id:s};return Zo(null==(a=f.params)?void 0:a.prompt)&&(null==(u=f.params)||delete u.prompt),Zo(null==(c=f.params)?void 0:c.tag)&&(null==(l=f.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(ee.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(nc);this.checkQueue()})),this.relayer.on(Xu,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Uc{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Dc=Object.defineProperty,zc=Object.defineProperties,Fc=Object.getOwnPropertyDescriptors,Bc=Object.getOwnPropertySymbols,Hc=Object.prototype.hasOwnProperty,qc=Object.prototype.propertyIsEnumerable,Vc=(e,t,n)=>t in e?Dc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$c=(e,t)=>{for(var n in t||(t={}))Hc.call(t,n)&&Vc(e,n,t[n]);if(Bc)for(var n of Bc(t))qc.call(t,n)&&Vc(e,n,t[n]);return e},Wc=(e,t)=>zc(e,Fc(t));class Kc extends mt{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Uc,this.events=new i.exports.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=qu,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=To(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,n)=>{const r=new ue.Watch;r.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),r.stop(this.pendingSubscriptionWatchLabel),t(!0)),r.elapsed(this.pendingSubscriptionWatchLabel)>=dc&&(clearInterval(i),r.stop(this.pendingSubscriptionWatchLabel),n(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=Ye.generateChildLogger(t,this.name),this.clientId=""}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=To(n);await this.rpcUnsubscribe(e,t,r);const i=Qo("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:Mo(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await xo(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(nc)}return eo(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:Mo(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await xo(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(nc)}}rpcUnsubscribe(e,t,n){const r={method:Mo(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,Wc($c({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,$c({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,$c({},t)),this.topicMap.set(t.topic,e),this.events.emit(cc,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=Yo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(lc,Wc($c({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(fc)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(hc)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=Yo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Jo(t)&&this.onBatchSubscribe(t.map(((t,n)=>Wc($c({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(ee.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Zu,(async()=>{await this.onConnect()})),this.relayer.on(ec,(()=>{this.onDisconnect()})),this.events.on(cc,(async e=>{const t=cc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(lc,(async e=>{const t=lc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var Gc=Object.defineProperty,Yc=Object.getOwnPropertySymbols,Qc=Object.prototype.hasOwnProperty,Jc=Object.prototype.propertyIsEnumerable,Xc=(e,t,n)=>t in e?Gc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Zc extends yt{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new i.exports.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(Zu)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(tc,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(ic,this.onPayloadHandler),this.provider.on(oc,this.onConnectHandler),this.provider.on(sc,this.onDisconnectHandler),this.provider.on(ac,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?Ye.generateChildLogger(e.logger,this.name):Ye.pino(Ye.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new Lc(this.logger,e.core),this.subscriber=new Kc(this,this.logger),this.publisher=new jc(this,this.logger),this.relayUrl=e?.relayUrl||Yu,this.projectId=e.projectId,this.bundleId=function(){var e;try{return vo()&&typeof c<"u"&&typeof(null==c?void 0:c.Application)<"u"?null==(e=c.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Qu}...`),await this.restartTransport(Qu)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return Ye.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const o=t=>{t.topic===e&&(this.subscriber.off(cc,o),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(cc,o)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await xo(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(hc,(()=>{e()}))})),new Promise((async(e,t)=>{try{await xo(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(sc)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await gs())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new na(new oa(wo({sdkVersion:"2.10.6",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Xs(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,o={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))Qc.call(t,n)&&Xc(e,n,t[n]);if(Yc)for(var n of Yc(t))Jc.call(t,n)&&Xc(e,n,t[n]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Zs(e)&&this.events.emit(Xu,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Ju,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Bs(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(ic,this.onPayloadHandler),this.provider.off(oc,this.onConnectHandler),this.provider.off(sc,this.onDisconnectHandler),this.provider.off(ac,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(nc,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await gs();ys((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(ec),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),ue.toMiliseconds(uc)))}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var el=Object.defineProperty,tl=Object.getOwnPropertySymbols,nl=Object.prototype.hasOwnProperty,rl=Object.prototype.propertyIsEnumerable,il=(e,t,n)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ol=(e,t)=>{for(var n in t||(t={}))nl.call(t,n)&&il(e,n,t[n]);if(tl)for(var n of tl(t))rl.call(t,n)&&il(e,n,t[n]);return e};class sl extends vt{constructor(e,t,n,r=qu,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=qu,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!Zo(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>aa(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=ol(ol({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=Ye.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=Yo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=Yo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class al{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new i.exports,this.initialized=!1,this.storagePrefix=qu,this.ignoredPayloadTypes=[Gi],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=Zi(),t=await this.core.crypto.setSymKey(e),n=Po(ue.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},o=qo({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r}=Bo(e.uri);let i;if(this.pairings.keys.includes(t)&&(i=this.pairings.get(t),i.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=Po(ue.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(gc,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=Po(ue.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=Io();this.events.once(Ao("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",Qo("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=Fs(t,n),i=await this.core.crypto.encode(e,r),o=pc[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,o),r.id},this.sendResult=async(e,t,n)=>{const r=Bs(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=pc[o.request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=Hs(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=pc[o.request.method]?pc[o.request.method].res:pc.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,Qo("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>Co(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(bc,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{ea(t)?this.events.emit(Ao("pairing_ping",n),{}):ta(t)&&this.events.emit(Ao("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(_c,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=Qo("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(Qo("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(es(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=Yo("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=Bo(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=Yo("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=Yo("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}},this.isValidPing=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!es(e,!1)){const{message:t}=Yo("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=Yo("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Co(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=Yo("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=Ye.generateChildLogger(t,this.name),this.pairings=new sl(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ye.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Ju,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{Xs(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):Zs(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(Rc,(async e=>{const{topic:t}=ko(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(yc,{topic:t}))}))}}class ul extends dt{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new i.exports.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=qu,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:Po(ue.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(wc,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=ta(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Ec,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(Sc,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=Ye.generateChildLogger(t,this.name)}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:Fs(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=Yo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Oc)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=Yo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(wc,(e=>{const t=wc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Ec,(e=>{const t=Ec;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Sc,(e=>{const t=Sc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(ee.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{ue.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class cl extends _t{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new i.exports.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=qu,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(Ic,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(xc,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=Ye.generateChildLogger(t,this.name)}get context(){return Ye.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return Ro("topic",e)}(e);if("number"==typeof e)return function(e){return Ro("id",e)}(e);const{message:t}=Yo("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(kc)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=Yo("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=Yo("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;ue.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Rc,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(ee.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Ic,(e=>{const t=Ic;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Rc,(e=>{const t=Rc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(xc,(e=>{const t=xc;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}}}class ll extends bt{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Pc,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||vo()||!mo())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=Ac;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,Ac)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*ue.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(Pc))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=Pc,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),ue.toMiliseconds(ue.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Cc;return Nc.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Cc}`),t=Cc),t},this.logger=Ye.generateChildLogger(t,this.name),this.verifyUrl=Cc,this.abortController=new AbortController,this.isDevEnv=yo()&&process.env.IS_VITEST}get context(){return Ye.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),ue.toMiliseconds(e))}}var fl=Object.defineProperty,hl=Object.getOwnPropertySymbols,dl=Object.prototype.hasOwnProperty,pl=Object.prototype.propertyIsEnumerable,gl=(e,t,n)=>t in e?fl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yl=(e,t)=>{for(var n in t||(t={}))dl.call(t,n)&&gl(e,n,t[n]);if(hl)for(var n of hl(t))pl.call(t,n)&&gl(e,n,t[n]);return e};class vl extends ht{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Hu,this.events=new i.exports.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Yu,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ye.pino(Ye.getDefaultLoggerOptions({level:e?.logger||Vu}));this.logger=Ye.generateChildLogger(t,this.name),this.heartbeat=new ee.HeartBeat,this.crypto=new Mc(this,this.logger,e?.keychain),this.history=new ul(this,this.logger),this.expirer=new cl(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new Z(yl(yl({},$u),e?.storageOptions)),this.relayer=new Zc({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new al(this,this.logger),this.verify=new ll(this.projectId||"",this.logger)}static async init(e){const t=new vl(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",n),t}get context(){return Ye.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const ml=vl,_l="client",bl=`wc@2:${_l}:`,wl=_l,El="error",Sl="WALLETCONNECT_DEEPLINK_CHOICE",Ol="Proposal expired",Il=ue.SEVEN_DAYS,xl={wc_sessionPropose:{req:{ttl:ue.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ue.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ue.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ue.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ue.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ue.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ue.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ue.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ue.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ue.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ue.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ue.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ue.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ue.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ue.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ue.THIRTY_SECONDS,prompt:!1,tag:1115}}},Rl={min:ue.FIVE_MINUTES,max:ue.SEVEN_DAYS},kl="IDLE",Pl="ACTIVE",Cl=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Al=Object.defineProperty,Nl=Object.defineProperties,Tl=Object.getOwnPropertyDescriptors,Ml=Object.getOwnPropertySymbols,Ll=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable,Ul=(e,t,n)=>t in e?Al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dl=(e,t)=>{for(var n in t||(t={}))Ll.call(t,n)&&Ul(e,n,t[n]);if(Ml)for(var n of Ml(t))jl.call(t,n)&&Ul(e,n,t[n]);return e},zl=(e,t)=>Nl(e,Tl(t));class Fl extends Et{constructor(e){super(e),this.name="engine",this.events=new i.exports,this.initialized=!1,this.ignoredPayloadTypes=[Gi],this.requestQueue={state:kl,queue:[]},this.sessionRequestQueue={state:kl,queue:[]},this.requestQueueDelay=ue.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(xl)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),ue.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=zl(Dl({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:o,relays:s}=t;let a,u=n,c=!1;if(u&&(c=this.client.core.pairing.pairings.get(u).active),!u||!c){const{topic:e,uri:t}=await this.client.core.pairing.create();u=e,a=t}const l=await this.client.core.crypto.generateKeyPair(),f=Dl({requiredNamespaces:r,optionalNamespaces:i,relays:s??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:h,resolve:d,done:p}=Io(ue.FIVE_MINUTES,Ol);if(this.events.once(Ao("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=zl(Dl({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:t.peer.metadata}),d(e)}})),!u){const{message:e}=Yo("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(e)}const g=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:f}),y=Po(ue.FIVE_MINUTES);return await this.setProposal(g,Dl({id:g,expiry:y},f)),{uri:a,approval:p}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,o=this.client.proposal.get(t);let{pairingTopic:s,proposer:a,requiredNamespaces:u,optionalNamespaces:c}=o;s=s||"",Xo(u)||(u=function(e,t){const n=as(e,t);if(n)throw new Error(n.message);const r={};for(const[t,n]of Object.entries(e))r[t]={methods:n.methods,events:n.events,chains:n.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return r}(r,"approve()"));const l=await this.client.core.crypto.generateKeyPair(),f=a.publicKey,h=await this.client.core.crypto.generateSharedKey(l,f);s&&t&&(await this.client.core.pairing.updateMetadata({topic:s,metadata:a.metadata}),await this.sendResult({id:t,topic:s,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,Qo("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}));const d=Dl({relay:{protocol:n??"irn"},namespaces:r,requiredNamespaces:u,optionalNamespaces:c,pairingTopic:s,controller:{publicKey:l,metadata:this.client.metadata},expiry:Po(Il)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(h),await this.sendRequest({topic:h,method:"wc_sessionSettle",params:d,throwOnFailedPublish:!0});const p=zl(Dl({},d),{topic:h,pairingTopic:s,acknowledged:!1,self:d.controller,peer:{publicKey:a.publicKey,metadata:a.metadata},controller:l});return await this.client.session.set(h,p),await this.setExpiry(h,Po(Il)),{topic:h,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(h))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,Qo("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:o,reject:s}=Io();return this.events.once(Ao("session_update",r),(({error:e})=>{e?s(e):o()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:o}=Io();return this.events.once(Ao("session_extend",n),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,Po(Il)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i}=e,o=Ds(),{done:s,resolve:a,reject:u}=Io(i,"Request expired. Please try again.");return this.events.once(Ao("session_request",o),(({error:e,result:t})=>{e?u(e):a(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:r,method:"wc_sessionRequest",params:{request:n,chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>u(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:o}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(mo()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,Sl);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const o=`${i}/wc?requestId=${e}&sessionTopic=${t}`,s=_o();s===po.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):s===po.reactNative&&typeof(null==c?void 0:c.Linking)<"u"&&await c.Linking.openURL(o)}catch(e){console.error(e)}})({id:o,topic:r,wcDeepLink:t}),e()})),s()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;ea(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):ta(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=Io();this.events.once(Ao("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.client.session.keys.includes(t)?(await this.sendRequest({topic:t,method:"wc_sessionDelete",params:Qo("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(t)):await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let o=!0;return!!Eo(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:s}=e.namespaces[t],a=Vo(r),u=n[t];Eo(Hi(t,u),a)&&Eo(u.methods,i)&&Eo(u.events,s)||(o=!1)})),o)}(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(e,t)=>{const{self:n}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,Qo("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(n.publicKey)&&await this.client.core.crypto.deleteKeyPair(n.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e),this.client.core.storage.removeItem(Sl).catch((e=>this.client.logger.warn(e)))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,Qo("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=kl)},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=xl.wc_sessionRequest.req.ttl,{id:n,topic:r,params:i,verifyContext:o}=e;await this.client.pendingRequest.set(n,{id:n,topic:r,params:i,verifyContext:o}),t&&this.client.core.expirer.set(n,Po(t))},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:o,clientRpcId:s,throwOnFailedPublish:a}=e,u=Fs(n,r,s);if(mo()&&Cl.includes(n)){const e=eo(JSON.stringify(u));this.client.core.verify.register({attestationId:e})}const c=await this.client.core.crypto.encode(t,u),l=xl[n].req;return i&&(l.ttl=i),o&&(l.id=o),this.client.core.history.set(t,u),a?(l.internal=zl(Dl({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,c,l)):this.client.core.relayer.publish(t,c,l).catch((e=>this.client.logger.error(e))),u.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,o=Bs(t,r),s=await this.client.core.crypto.encode(n,o),a=await this.client.core.history.get(n,t),u=xl[a.request.method].res;i?(u.internal=zl(Dl({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,s,u)):this.client.core.relayer.publish(n,s,u).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,n)=>{const r=Hs(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),s=xl[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{Co(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{Co(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==Pl){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Pl;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=kl}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=Yo("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(Dl({},t.params));const i=Po(ue.FIVE_MINUTES),o=Dl({id:r,pairingTopic:e,expiry:i},n);await this.setProposal(r,o);const s=eo(JSON.stringify(t)),a=await this.getVerifyContext(s,o.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:o,verifyContext:a})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(ea(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const s=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});const a=await this.client.core.crypto.generateSharedKey(o,s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const u=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:e})}else ta(t)&&(await this.client.proposal.delete(n,Qo("USER_DISCONNECTED")),this.events.emit(Ao("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:o,namespaces:s,requiredNamespaces:a,optionalNamespaces:u,sessionProperties:c,pairingTopic:l}=t.params,f=Dl({topic:e,relay:n,expiry:o,namespaces:s,acknowledged:!0,pairingTopic:l,requiredNamespaces:a,optionalNamespaces:u,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},c&&{sessionProperties:c});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(Ao("session_connect"),{session:f}),this.cleanupDuplicatePairings(f)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;ea(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(Ao("session_approve",n),{})):ta(t)&&(await this.client.session.delete(e,Qo("USER_DISCONNECTED")),this.events.emit(Ao("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=ms.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(Dl({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),ms.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;ea(t)?this.events.emit(Ao("session_update",n),{}):ta(t)&&this.events.emit(Ao("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,Po(Il)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;ea(t)?this.events.emit(Ao("session_extend",n),{}):ta(t)&&this.events.emit(Ao("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{ea(t)?this.events.emit(Ao("session_ping",n),{}):ta(t)&&this.events.emit(Ao("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(rc,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult({id:n,topic:e,result:!0})]),this.client.events.emit("session_delete",{id:n,topic:e})}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(Dl({topic:e},r));const t=eo(JSON.stringify(Fs("wc_sessionRequest",r,n))),i=this.client.session.get(e),o={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;ea(t)?this.events.emit(Ao("session_request",n),{result:t.result}):ta(t)&&this.events.emit(Ao("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=ms.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(Dl({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),ms.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=kl,this.processSessionRequestQueue()}),ue.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Pl)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=Pl,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,Fs("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:o}=e;if(Zo(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&Jo(e)&&e.length&&e.forEach((e=>{n=us(e)})),n}(o,!0)){const{message:e}=Yo("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!Zo(n)&&0!==Xo(n)&&this.validateNamespaces(n,"requiredNamespaces"),!Zo(r)&&0!==Xo(r)&&this.validateNamespaces(r,"optionalNamespaces"),Zo(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&Xo(e)){const i=ss(e,t);i&&(r=i);const o=is(e,t,n);o&&(r=o)}else r=Yo("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!cs(e))throw new Error(Yo("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),s=as(n,"approve()");if(s)throw new Error(s.message);const a=ds(o.requiredNamespaces,n,"approve()");if(a)throw new Error(a.message);if(!es(r,!0)){const{message:e}=Yo("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}Zo(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&ts(e.code,!1)&&e.message&&es(e.message,!1))}(n)){const{message:e}=Yo("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!us(t)){const{message:e}=Yo("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=function(e,t){let n=null;return es(e?.publicKey,!1)||(n=Yo("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);const s=as(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);if(Co(i)){const{message:e}=Yo("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=as(n,"update()");if(i)throw new Error(i.message);const o=ds(r.requiredNamespaces,n,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:o}=this.client.session.get(t);if(!ls(o,r)){const{message:e}=Yo("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Zo(e)||!es(e.method,!1))}(n)){const{message:e}=Yo("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!fs(o,r,n.method)){const{message:e}=Yo("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return ts(e,!1)&&e<=t.max&&e>=t.min}(i,Rl)){const{message:e}=Yo("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Rl.min} and ${Rl.max}`);throw new Error(e)}},this.isValidRespond=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:t,response:n}=e;if(await this.isValidSessionTopic(t),!function(e){return!(Zo(e)||Zo(e.result)&&Zo(e.error)||!ts(e.id,!1)||!es(e.jsonrpc,!1))}(n)){const{message:e}=Yo("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!ls(i,r)){const{message:e}=Yo("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Zo(e)||!es(e.name,!1))}(n)){const{message:e}=Yo("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!hs(i,r,n.name)){const{message:e}=Yo("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!cs(e)){const{message:t}=Yo("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||Cc,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!es(e,!1)){const{message:n}=Yo("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=Yo("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ju,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{Xs(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):Zs(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(Rc,(async e=>{const{topic:t,id:n}=ko(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Yo("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(gc,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!es(e,!1)){const{message:t}=Yo("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Yo("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Co(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Yo("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!es(e,!1)){const{message:t}=Yo("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=Yo("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(Co(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=Yo("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(es(e,!1)){const{message:t}=Yo("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=Yo("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=Yo("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Yo("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(Co(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=Yo("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class Bl extends sl{constructor(e,t){super(e,t,"proposal",bl),this.core=e,this.logger=t}}class Hl extends sl{constructor(e,t){super(e,t,"session",bl),this.core=e,this.logger=t}}class ql extends sl{constructor(e,t){super(e,t,"request",bl,(e=>e.id)),this.core=e,this.logger=t}}class Vl extends wt{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=wl,this.events=new i.exports.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||wl,this.metadata=e?.metadata||ki()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ye.pino(Ye.getDefaultLoggerOptions({level:e?.logger||El}));this.core=e?.core||new ml(e),this.logger=Ye.generateChildLogger(t,this.name),this.session=new Hl(this.core,this.logger),this.proposal=new Bl(this.core,this.logger),this.pendingRequest=new ql(this.core,this.logger),this.engine=new Fl(this)}static async init(e){const t=new Vl(e);return await t.initialize(),t}get context(){return Ye.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}const $l="error",Wl="wc@2:universal_provider:",Kl="default_chain_changed";var Gl,Yl,Ql={exports:{}}; /** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */Gl=Ql,Yl=Ql.exports,function(){var e,n="Expected a function",r="__lodash_hash_undefined__",i="__lodash_placeholder__",o=16,s=32,a=64,u=128,c=256,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",s],["partialRight",a],["rearg",c]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",m="[object Date]",_="[object Error]",b="[object Function]",w="[object GeneratorFunction]",E="[object Map]",S="[object Number]",O="[object Object]",I="[object Promise]",x="[object RegExp]",R="[object Set]",k="[object String]",P="[object Symbol]",C="[object WeakMap]",A="[object ArrayBuffer]",N="[object DataView]",T="[object Float32Array]",M="[object Float64Array]",L="[object Int8Array]",j="[object Int16Array]",U="[object Int32Array]",D="[object Uint8Array]",z="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",H=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,K=RegExp($.source),G=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,be=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",Pe="["+we+"]",Ce="["+Re+"]",Ae="["+Ee+"]",Ne="\\d+",Te="["+Se+"]",Me="["+Oe+"]",Le="[^"+we+Re+Ne+Se+Oe+Ie+"]",je="\\ud83c[\\udffb-\\udfff]",Ue="[^"+we+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ie+"]",Be="\\u200d",He="(?:"+Me+"|"+Le+")",qe="(?:"+Fe+"|"+Le+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Ae+"|"+je+")?",Ke="["+xe+"]?",Ge=Ke+We+"(?:"+Be+"(?:"+[Ue,De,ze].join("|")+")"+Ke+We+")*",Ye="(?:"+[Te,De,ze].join("|")+")"+Ge,Qe="(?:"+[Ue+Ae+"?",Ae,De,ze,Pe].join("|")+")",Je=RegExp(ke,"g"),Xe=RegExp(Ae,"g"),Ze=RegExp(je+"(?="+je+")|"+Qe+Ge,"g"),et=RegExp([Fe+"?"+Me+"+"+Ve+"(?="+[Ce,Fe,"$"].join("|")+")",qe+"+"+$e+"(?="+[Ce,Fe+He,"$"].join("|")+")",Fe+"?"+He+"+"+Ve,Fe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ye].join("|"),"g"),tt=RegExp("["+Be+we+Ee+xe+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,ot={};ot[T]=ot[M]=ot[L]=ot[j]=ot[U]=ot[D]=ot[z]=ot[F]=ot[B]=!0,ot[g]=ot[y]=ot[A]=ot[v]=ot[N]=ot[m]=ot[_]=ot[b]=ot[E]=ot[S]=ot[O]=ot[x]=ot[R]=ot[k]=ot[C]=!1;var st={};st[g]=st[y]=st[A]=st[N]=st[v]=st[m]=st[T]=st[M]=st[L]=st[j]=st[U]=st[E]=st[S]=st[O]=st[x]=st[R]=st[k]=st[P]=st[D]=st[z]=st[F]=st[B]=!0,st[_]=st[b]=st[C]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof t&&t&&t.Object===Object&&t,ft="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ft||Function("return this")(),dt=Yl&&!Yl.nodeType&&Yl,pt=dt&&Gl&&!Gl.nodeType&&Gl,gt=pt&&pt.exports===dt,yt=gt&<.process,vt=function(){try{return pt&&pt.require&&pt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch{}}(),mt=vt&&vt.isArrayBuffer,_t=vt&&vt.isDate,bt=vt&&vt.isMap,wt=vt&&vt.isRegExp,Et=vt&&vt.isSet,St=vt&&vt.isTypedArray;function Ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function It(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function xt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function At(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Tt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Mt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Lt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ut=$t("length");function Dt(e){return e.match(ue)||[]}function zt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ft(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,qt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?Gt(e,t)/n:h}function $t(t){return function(n){return null==n?e:n[t]}}function Wt(t){return function(n){return null==t?e:t[n]}}function Kt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Gt(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qt(e){return e&&e.slice(0,pn(e)+1).replace(re,"")}function Jt(e){return function(t){return e(t)}}function Xt(e,t){return Nt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}var nn=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+at[e]}function sn(e){return tt.test(e)}function an(e){return nt.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,o=0,s=[];++n<r;){var a=e[n];(a===t||a===i)&&(e[n]=i,s[o++]=n)}return s}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){return sn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ut(e)}function dn(e){return sn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var gn=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"});function yn(e){return e.match(et)||[]}var vn=function t(ie){var ue=(ie=null==ie?ht:vn.defaults(ht.Object(),ie,vn.pick(ht,rt))).Array,we=ie.Date,Ee=ie.Error,Se=ie.Function,Oe=ie.Math,Ie=ie.Object,xe=ie.RegExp,Re=ie.String,ke=ie.TypeError,Pe=ue.prototype,Ce=Se.prototype,Ae=Ie.prototype,Ne=ie["__core-js_shared__"],Te=Ce.toString,Me=Ae.hasOwnProperty,Le=0,je=function(){var e=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ue=Ae.toString,De=Te.call(Ie),ze=ht._,Fe=xe("^"+Te.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=gt?ie.Buffer:e,He=ie.Symbol,qe=ie.Uint8Array,Ve=Be?Be.allocUnsafe:e,$e=cn(Ie.getPrototypeOf,Ie),We=Ie.create,Ke=Ae.propertyIsEnumerable,Ge=Pe.splice,Ye=He?He.isConcatSpreadable:e,Qe=He?He.iterator:e,Ze=He?He.toStringTag:e,et=function(){try{var e=po(Ie,"defineProperty");return e({},"",{}),e}catch{}}(),tt=ie.clearTimeout!==ht.clearTimeout&&ie.clearTimeout,nt=we&&we.now!==ht.Date.now&&we.now,at=ie.setTimeout!==ht.setTimeout&&ie.setTimeout,lt=Oe.ceil,ft=Oe.floor,dt=Ie.getOwnPropertySymbols,pt=Be?Be.isBuffer:e,yt=ie.isFinite,vt=Pe.join,Ut=cn(Ie.keys,Ie),Wt=Oe.max,mn=Oe.min,_n=we.now,bn=ie.parseInt,wn=Oe.random,En=Pe.reverse,Sn=po(ie,"DataView"),On=po(ie,"Map"),In=po(ie,"Promise"),xn=po(ie,"Set"),Rn=po(ie,"WeakMap"),kn=po(Ie,"create"),Pn=Rn&&new Rn,Cn={},An=Ho(Sn),Nn=Ho(On),Tn=Ho(In),Mn=Ho(xn),Ln=Ho(Rn),jn=He?He.prototype:e,Un=jn?jn.valueOf:e,Dn=jn?jn.toString:e;function zn(e){if(oa(e)&&!Gs(e)&&!(e instanceof qn)){if(e instanceof Hn)return e;if(Me.call(e,"__wrapped__"))return qo(e)}return new Hn(e)}var Fn=function(){function t(){}return function(n){if(!ia(n))return{};if(We)return We(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Bn(){}function Hn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new $n(e);this.size=t.size}function Yn(e,t){var n=Gs(e),r=!n&&Ks(e),i=!n&&!r&&Xs(e),o=!n&&!r&&!i&&da(e),s=n||r||i||o,a=s?Yt(e.length,Re):[],u=a.length;for(var c in e)(t||Me.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wo(c,u)))&&a.push(c);return a}function Qn(t){var n=t.length;return n?t[Gr(0,n-1)]:e}function Jn(e,t){return zo(Pi(e),sr(t,0,e.length))}function Xn(e){return zo(Pi(e))}function Zn(t,n,r){(r!==e&&!Vs(t[n],r)||r===e&&!(n in t))&&ir(t,n,r)}function er(t,n,r){var i=t[n];(!Me.call(t,n)||!Vs(i,r)||r===e&&!(n in t))&&ir(t,n,r)}function tr(e,t){for(var n=e.length;n--;)if(Vs(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ci(t,La(t),e)}function ir(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(t,n){for(var r=-1,i=n.length,o=ue(i),s=null==t;++r<i;)o[r]=s?e:Ca(t,n[r]);return o}function sr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function ar(t,n,r,i,o,s){var a,u=1&n,c=2&n,l=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!ia(t))return t;var f=Gs(t);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!u)return Pi(t,a)}else{var h=vo(t),d=h==b||h==w;if(Xs(t))return Si(t,u);if(h==O||h==g||d&&!o){if(a=c||d?{}:_o(t),!u)return c?function(e,t){return Ci(e,yo(e),t)}(t,function(e,t){return e&&Ci(t,ja(t),e)}(a,t)):function(e,t){return Ci(e,go(e),t)}(t,rr(a,t))}else{if(!st[h])return o?t:{};a=function(e,t,n){var r=e.constructor;switch(t){case A:return Oi(e);case v:case m:return new r(+e);case N:return function(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case T:case M:case L:case j:case U:case D:case z:case F:case B:return Ii(e,n);case E:return new r;case S:case k:return new r(e);case x:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case P:return function(e){return Un?Ie(Un.call(e)):{}}(e)}}(t,h,u)}}s||(s=new Gn);var p=s.get(t);if(p)return p;s.set(t,a),la(t)?t.forEach((function(e){a.add(ar(e,n,r,e,t,s))})):sa(t)&&t.forEach((function(e,i){a.set(i,ar(e,n,r,i,t,s))}));var y=f?e:(l?c?so:oo:c?ja:La)(t);return xt(y||t,(function(e,i){y&&(e=t[i=e]),er(a,i,ar(e,n,r,i,t,s))})),a}function ur(t,n,r){var i=r.length;if(null==t)return!i;for(t=Ie(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function cr(t,r,i){if("function"!=typeof t)throw new ke(n);return Lo((function(){t.apply(e,i)}),r)}function lr(e,t,n,r){var i=-1,o=Ct,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=Nt(t,Jt(n))),r?(o=At,s=!1):t.length>=200&&(o=Zt,s=!1,t=new Kn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}zn.templateSettings={escape:Y,evaluate:Q,interpolate:J,variable:"",imports:{_:zn}},zn.prototype=Bn.prototype,zn.prototype.constructor=zn,Hn.prototype=Fn(Bn.prototype),Hn.prototype.constructor=Hn,qn.prototype=Fn(Bn.prototype),qn.prototype.constructor=qn,Vn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(t){var n=this.__data__;if(kn){var i=n[t];return i===r?e:i}return Me.call(n,t)?n[t]:e},Vn.prototype.has=function(t){var n=this.__data__;return kn?n[t]!==e:Me.call(n,t)},Vn.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=kn&&n===e?r:n,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,0))},$n.prototype.get=function(t){var n=this.__data__,r=tr(n,t);return r<0?e:n[r][1]},$n.prototype.has=function(e){return tr(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(On||$n),string:new Vn}},Wn.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return fo(this,e).get(e)},Wn.prototype.has=function(e){return fo(this,e).has(e)},Wn.prototype.set=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,r),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new $n,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ti(br),hr=Ti(wr,!0);function dr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function pr(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(u===e?a==a&&!ha(a):r(a,u)))var u=a,c=s}return c}function gr(t,n,r,i){var o=t.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:ma(i))<0&&(i+=o),i=r>i?0:_a(i);r<i;)t[r++]=n;return t}function yr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function vr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=bo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?vr(a,t-1,n,r,i):Tt(i,a):r||(i[i.length]=a)}return i}var mr=Mi(),_r=Mi(!0);function br(e,t){return e&&mr(e,t,La)}function wr(e,t){return e&&_r(e,t,La)}function Er(e,t){return Pt(t,(function(t){return ta(e[t])}))}function Sr(t,n){for(var r=0,i=(n=_i(n,t)).length;null!=t&&r<i;)t=t[Bo(n[r++])];return r&&r==i?t:e}function Or(e,t,n){var r=t(e);return Gs(e)?r:Tt(r,n(e))}function Ir(t){return null==t?t===e?"[object Undefined]":"[object Null]":Ze&&Ze in Ie(t)?function(t){var n=Me.call(t,Ze),r=t[Ze];try{t[Ze]=e;var i=!0}catch{}var o=Ue.call(t);return i&&(n?t[Ze]=r:delete t[Ze]),o}(t):function(e){return Ue.call(e)}(t)}function xr(e,t){return e>t}function Rr(e,t){return null!=e&&Me.call(e,t)}function kr(e,t){return null!=e&&t in Ie(e)}function Pr(t,n,r){for(var i=r?At:Ct,o=t[0].length,s=t.length,a=s,u=ue(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=Nt(f,Jt(n))),c=mn(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Kn(a&&f):e}f=t[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?Zt(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?Zt(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Cr(t,n,r){var i=null==(t=Ao(t,n=_i(n,t)))?t:t[Bo(es(n))];return null==i?e:Ot(i,t,r)}function Ar(e){return oa(e)&&Ir(e)==g}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!oa(e)&&!oa(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var s=Gs(e),a=Gs(t),u=s?y:vo(e),c=a?y:vo(t),l=(u=u==g?O:u)==O,f=(c=c==g?O:c)==O,h=u==c;if(h&&Xs(e)){if(!Xs(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Gn),s||da(e)?to(e,t,n,r,i,o):no(e,t,u,n,r,i,o);if(!(1&n)){var d=l&&Me.call(e,"__wrapped__"),p=f&&Me.call(t,"__wrapped__");if(d||p){var v=d?e.value():e,m=p?t.value():t;return o||(o=new Gn),i(v,m,n,r,o)}}return!!h&&(o||(o=new Gn),ro(e,t,n,r,i,o))}(e,t,n,r,Nr,i))}function Tr(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=Ie(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],l=t[c],f=u[1];if(a&&u[2]){if(l===e&&!(c in t))return!1}else{var h=new Gn;if(i)var d=i(l,f,c,t,n,h);if(!(d===e?Nr(f,l,3,i,h):d))return!1}}return!0}function Mr(e){return!(!ia(e)||function(e){return!!je&&je in e}(e))&&(ta(e)?Fe:ge).test(Ho(e))}function Lr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Gs(e)?Br(e[0],e[1]):Fr(e):yu(e)}function jr(e){if(!xo(e))return Ut(e);var t=[];for(var n in Ie(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ur(e){if(!ia(e))return function(e){var t=[];if(null!=e)for(var n in Ie(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)"constructor"==r&&(t||!Me.call(e,r))||n.push(r);return n}function Dr(e,t){return e<t}function zr(e,t){var n=-1,r=Qs(e)?ue(e.length):[];return fr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Fr(e){var t=ho(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(n){return n===e||Tr(n,e,t)}}function Br(t,n){return So(t)&&Ro(n)?ko(Bo(t),n):function(r){var i=Ca(r,t);return i===e&&i===n?Aa(r,t):Nr(n,i,3)}}function Hr(t,n,r,i,o){t!==n&&mr(n,(function(s,a){if(o||(o=new Gn),ia(s))!function(t,n,r,i,o,s,a){var u=To(t,r),c=To(n,r),l=a.get(c);if(l)Zn(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=Gs(c),p=!d&&Xs(c),g=!d&&!p&&da(c);f=c,d||p||g?Gs(u)?f=u:Js(u)?f=Pi(u):p?(h=!1,f=Si(c,!0)):g?(h=!1,f=Ii(c,!0)):f=[]:ua(c)||Ks(c)?(f=u,Ks(u)?f=wa(u):(!ia(u)||ta(u))&&(f=_o(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),Zn(t,r,f)}}(t,n,a,r,Hr,i,o);else{var u=i?i(To(t,a),s,a+"",t,n,o):e;u===e&&(u=s),Zn(t,a,u)}}),ja)}function qr(t,n){var r=t.length;if(r)return wo(n+=n<0?r:0,r)?t[n]:e}function Vr(e,t,n){t=t.length?Nt(t,(function(e){return Gs(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;t=Nt(t,Jt(lo()));var i=zr(e,(function(e,n,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=xi(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function $r(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Sr(e,s);n(a,s)&&Zr(o,_i(s,e),a)}return o}function Wr(e,t,n,r){var i=r?Ht:Bt,o=-1,s=t.length,a=e;for(e===t&&(t=Pi(t)),n&&(a=Nt(e,Jt(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&Ge.call(a,u,1),Ge.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;wo(i)?Ge.call(e,i,1):fi(e,i)}}return e}function Gr(e,t){return e+ft(wn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return jo(Co(e,t,au),e+"")}function Jr(e){return Qn(Va(e))}function Xr(e,t){var n=Va(e);return zo(n,sr(t,0,n.length))}function Zr(t,n,r,i){if(!ia(t))return t;for(var o=-1,s=(n=_i(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Bo(n[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var f=u[c];(l=i?i(f,c,u):e)===e&&(l=ia(f)?f:wo(n[o+1])?[]:{})}er(u,c,l),u=u[c]}return t}var ei=Pn?function(e,t){return Pn.set(e,t),e}:au,ti=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:iu(t),writable:!0})}:au;function ni(e){return zo(Va(e))}function ri(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ue(i);++r<i;)o[r]=e[r+t];return o}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ha(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return si(e,t,au,n)}function si(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,c=ha(n),l=n===e;o<s;){var f=ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=ha(h);if(a)var v=i||g;else v=l?g&&(i||d):u?g&&d&&(i||!p):c?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return mn(s,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Vs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function ui(e){return"number"==typeof e?e:ha(e)?h:+e}function ci(e){if("string"==typeof e)return e;if(Gs(e))return Nt(e,ci)+"";if(ha(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function li(e,t,n){var r=-1,i=Ct,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=At;else if(o>=200){var c=t?null:Yi(e);if(c)return fn(c);s=!1,i=Zt,u=new Kn}else u=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function fi(e,t){return null==(e=Ao(e,t=_i(t,e)))||delete e[Bo(es(t))]}function hi(e,t,n,r){return Zr(e,t,n(Sr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof qn&&(n=n.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))}),n)}function gi(e,t,n){var r=e.length;if(r<2)return r?li(e[0]):[];for(var i=-1,o=ue(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=lr(o[i]||s,e[a],t,n));return li(vr(o,1),t,n)}function yi(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var u=i<s?n[i]:e;r(a,t[i],u)}return a}function vi(e){return Js(e)?e:[]}function mi(e){return"function"==typeof e?e:au}function _i(e,t){return Gs(e)?e:So(e,t)?[e]:Fo(Ea(e))}var bi=Qr;function wi(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ri(t,n,r)}var Ei=tt||function(e){return ht.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function Oi(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Ii(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=ha(t),a=n!==e,u=null===n,c=n==n,l=ha(n);if(!u&&!l&&!s&&t>n||s&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ri(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Wt(o-s,0),l=ue(u+c),f=!r;++a<u;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function ki(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Wt(o-a,0),f=ue(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function Pi(e,t){var n=-1,r=e.length;for(t||(t=ue(r));++n<r;)t[n]=e[n];return t}function Ci(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],c=i?i(r[u],t[u],u,r,t):e;c===e&&(c=t[u]),o?ir(r,u,c):er(r,u,c)}return r}function Ai(e,t){return function(n,r){var i=Gs(n)?It:nr,o=t?t():{};return i(n,e,lo(r,2),o)}}function Ni(t){return Qr((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&Eo(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=Ie(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function Ti(e,t){return function(n,r){if(null==n)return n;if(!Qs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ie(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Mi(e){return function(t,n,r){for(var i=-1,o=Ie(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Li(t){return function(n){var r=sn(n=Ea(n))?dn(n):e,i=r?r[0]:n.charAt(0),o=r?wi(r,1).join(""):n.slice(1);return i[t]()+o}}function ji(e){return function(t){return Mt(tu(Ka(t).replace(Je,"")),e,"")}}function Ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ia(r)?r:n}}function Di(t){return function(n,r,i){var o=Ie(n);if(!Qs(n)){var s=lo(r,3);n=La(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function zi(t){return io((function(r){var i=r.length,o=i,s=Hn.prototype.thru;for(t&&r.reverse();o--;){var a=r[o];if("function"!=typeof a)throw new ke(n);if(s&&!u&&"wrapper"==uo(a))var u=new Hn([],!0)}for(o=u?o:i;++o<i;){var c=uo(a=r[o]),l="wrapper"==c?ao(a):e;u=l&&Oo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==a.length&&Oo(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&Gs(t))return u.plant(t).value();for(var n=0,o=i?r[n].apply(this,e):t;++n<i;)o=r[n].call(this,o);return o}}))}function Fi(t,n,r,i,o,s,a,c,l,f){var h=n&u,d=1&n,p=2&n,g=24&n,y=512&n,v=p?e:Ui(t);return function e(){for(var u=arguments.length,m=ue(u),_=u;_--;)m[_]=arguments[_];if(g)var b=co(e),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(m,b);if(i&&(m=Ri(m,i,o,g)),s&&(m=ki(m,s,a,g)),u-=w,g&&u<f){var E=ln(m,b);return Ki(t,n,Fi,e.placeholder,r,m,E,c,l,f-u)}var S=d?r:this,O=p?S[t]:t;return u=m.length,c?m=No(m,c):y&&u>1&&m.reverse(),h&&l<u&&(m.length=l),this&&this!==ht&&this instanceof e&&(O=v||Ui(O)),O.apply(S,m)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ui(r),i=ui(i)),o=t(r,i)}return o}}function qi(e){return io((function(t){return t=Nt(t,Jt(lo())),Qr((function(n){var r=this;return e(t,(function(e){return Ot(e,r,n)}))}))}))}function Vi(t,n){var r=(n=n===e?" ":ci(n)).length;if(r<2)return r?Yr(n,t):n;var i=Yr(n,lt(t/hn(n)));return sn(n)?wi(dn(i),0,t).join(""):i.slice(0,t)}function $i(t){return function(n,r,i){return i&&"number"!=typeof i&&Eo(n,r,i)&&(r=i=e),n=va(n),r===e?(r=n,n=0):r=va(r),function(e,t,n,r){for(var i=-1,o=Wt(lt((t-e)/(n||1)),0),s=ue(o);o--;)s[r?o:++i]=e,e+=n;return s}(n,r,i=i===e?n<r?1:-1:va(i),t)}}function Wi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ba(t),n=ba(n)),e(t,n)}}function Ki(t,n,r,i,o,u,c,l,f,h){var d=8&n;n|=d?s:a,4&(n&=~(d?a:s))||(n&=-4);var p=[t,n,o,d?u:e,d?c:e,d?e:u,d?e:c,l,f,h],g=r.apply(e,p);return Oo(t)&&Mo(g,p),g.placeholder=i,Uo(g,t,n)}function Gi(e){var t=Oe[e];return function(e,n){if(e=ba(e),(n=null==n?0:mn(ma(n),292))&&yt(e)){var r=(Ea(e)+"e").split("e");return+((r=(Ea(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=xn&&1/fn(new xn([,-0]))[1]==l?function(e){return new xn(e)}:hu;function Qi(e){return function(t){var n=vo(t);return n==E?un(t):n==R?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(t,r,i,u,c,l,f,h){var d=2&r;if(!d&&"function"!=typeof t)throw new ke(n);var p=u?u.length:0;if(p||(r&=-97,u=c=e),f=f===e?f:Wt(ma(f),0),h=h===e?h:ma(h),p-=c?c.length:0,r&a){var g=u,y=c;u=c=e}var v=d?e:ao(t),m=[t,r,i,u,c,g,y,l,f,h];if(v&&Po(m,v),t=m[0],r=m[1],i=m[2],u=m[3],c=m[4],!(h=m[9]=m[9]===e?d?0:t.length:Wt(m[9]-p,0))&&24&r&&(r&=-25),r&&1!=r)_=8==r||r==o?function(t,n,r){var i=Ui(t);return function o(){for(var s=arguments.length,a=ue(s),u=s,c=co(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:ln(a,c);return(s-=l.length)<r?Ki(t,n,Fi,o.placeholder,e,a,l,e,e,r-s):Ot(this&&this!==ht&&this instanceof o?i:t,this,a)}}(t,r,h):r!=s&&33!=r||c.length?Fi.apply(e,m):function(e,t,n,r){var i=1&t,o=Ui(e);return function t(){for(var s=-1,a=arguments.length,u=-1,c=r.length,l=ue(c+a),f=this&&this!==ht&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++s];return Ot(f,i?n:this,l)}}(t,r,i,u);else var _=function(e,t,n){var r=1&t,i=Ui(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(t,r,i);return Uo((v?ei:Mo)(_,m),t,r)}function Xi(t,n,r,i){return t===e||Vs(t,Ae[r])&&!Me.call(i,r)?n:t}function Zi(t,n,r,i,o,s){return ia(t)&&ia(n)&&(s.set(n,t),Hr(t,n,e,Zi,s),s.delete(n)),t}function eo(t){return ua(t)?e:t}function to(t,n,r,i,o,s){var a=1&r,u=t.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,d=!0,p=2&r?new Kn:e;for(s.set(t,n),s.set(n,t);++h<u;){var g=t[h],y=n[h];if(i)var v=a?i(y,g,h,n,t,s):i(g,y,h,t,n,s);if(v!==e){if(v)continue;d=!1;break}if(p){if(!jt(n,(function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,s)))return p.push(t)}))){d=!1;break}}else if(g!==y&&!o(g,y,r,i,s)){d=!1;break}}return s.delete(t),s.delete(n),d}function no(e,t,n,r,i,o,s){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case v:case m:case S:return Vs(+e,+t);case _:return e.name==t.name&&e.message==t.message;case x:case k:return e==t+"";case E:var a=un;case R:var u=1&r;if(a||(a=fn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=to(a(e),a(t),r,i,o,s);return s.delete(e),l;case P:if(Un)return Un.call(e)==Un.call(t)}return!1}function ro(t,n,r,i,o,s){var a=1&r,u=oo(t),c=u.length;if(c!=oo(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:Me.call(n,f)))return!1}var h=s.get(t),d=s.get(n);if(h&&d)return h==n&&d==t;var p=!0;s.set(t,n),s.set(n,t);for(var g=a;++l<c;){var y=t[f=u[l]],v=n[f];if(i)var m=a?i(v,y,f,n,t,s):i(y,v,f,t,n,s);if(!(m===e?y===v||o(y,v,r,i,s):m)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var _=t.constructor,b=n.constructor;_!=b&&"constructor"in t&&"constructor"in n&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(n),p}function io(t){return jo(Co(t,e,Yo),t+"")}function oo(e){return Or(e,La,go)}function so(e){return Or(e,ja,yo)}var ao=Pn?function(e){return Pn.get(e)}:hu;function uo(e){for(var t=e.name+"",n=Cn[t],r=Me.call(Cn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function co(e){return(Me.call(zn,"placeholder")?zn:e).placeholder}function lo(){var e=zn.iteratee||uu;return e=e===uu?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ho(e){for(var t=La(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ro(i)]}return t}function po(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Mr(r)?r:e}var go=dt?function(e){return null==e?[]:(e=Ie(e),Pt(dt(e),(function(t){return Ke.call(e,t)})))}:_u,yo=dt?function(e){for(var t=[];e;)Tt(t,go(e)),e=$e(e);return t}:_u,vo=Ir;function mo(e,t,n){for(var r=-1,i=(t=_i(t,e)).length,o=!1;++r<i;){var s=Bo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ra(i)&&wo(s,i)&&(Gs(e)||Ks(e))}function _o(e){return"function"!=typeof e.constructor||xo(e)?{}:Fn($e(e))}function bo(e){return Gs(e)||Ks(e)||!!(Ye&&e&&e[Ye])}function wo(e,t){var n=typeof e;return!!(t=t??f)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function Eo(e,t,n){if(!ia(n))return!1;var r=typeof t;return!!("number"==r?Qs(n)&&wo(t,n.length):"string"==r&&t in n)&&Vs(n[t],e)}function So(e,t){if(Gs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ha(e))||Z.test(e)||!X.test(e)||null!=t&&e in Ie(t)}function Oo(e){var t=uo(e),n=zn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=ao(n);return!!r&&e===r[0]}(Sn&&vo(new Sn(new ArrayBuffer(1)))!=N||On&&vo(new On)!=E||In&&vo(In.resolve())!=I||xn&&vo(new xn)!=R||Rn&&vo(new Rn)!=C)&&(vo=function(t){var n=Ir(t),r=n==O?t.constructor:e,i=r?Ho(r):"";if(i)switch(i){case An:return N;case Nn:return E;case Tn:return I;case Mn:return R;case Ln:return C}return n});var Io=Ne?ta:bu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Ro(e){return e==e&&!ia(e)}function ko(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Ie(r))}}function Po(e,t){var n=e[1],r=t[1],o=n|r,s=o<131,a=r==u&&8==n||r==u&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var f=e[3];e[3]=f?Ri(f,l,t[4]):l,e[4]=f?ln(e[3],i):t[4]}return(l=t[5])&&(f=e[5],e[5]=f?ki(f,l,t[6]):l,e[6]=f?ln(e[5],i):t[6]),(l=t[7])&&(e[7]=l),r&u&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function Co(t,n,r){return n=Wt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Wt(e.length-n,0),s=ue(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ue(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),Ot(t,this,a)}}function Ao(e,t){return t.length<2?e:Sr(e,ri(t,0,-1))}function No(t,n){for(var r=t.length,i=mn(n.length,r),o=Pi(t);i--;){var s=n[i];t[i]=wo(s,r)?o[s]:e}return t}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Do(ei),Lo=at||function(e,t){return ht.setTimeout(e,t)},jo=Do(ti);function Uo(e,t,n){var r=t+"";return jo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return xt(p,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Do(t){var n=0,r=0;return function(){var i=_n(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function zo(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=Gr(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Fo=function(e){var t=Ds(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}));function Bo(e){if("string"==typeof e||ha(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function Ho(e){if(null!=e){try{return Te.call(e)}catch{}try{return e+""}catch{}}return""}function qo(e){if(e instanceof qn)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Qr((function(e,t){return Js(e)?lr(e,vr(t,1,Js,!0)):[]})),$o=Qr((function(t,n){var r=es(n);return Js(r)&&(r=e),Js(t)?lr(t,vr(n,1,Js,!0),lo(r,2)):[]})),Wo=Qr((function(t,n){var r=es(n);return Js(r)&&(r=e),Js(t)?lr(t,vr(n,1,Js,!0),e,r):[]}));function Ko(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=Wt(r+i,0)),Ft(e,lo(t,3),i)}function Go(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=ma(r),o=r<0?Wt(i+o,0):mn(o,i-1)),Ft(t,lo(n,3),o,!0)}function Yo(e){return null!=e&&e.length?vr(e,1):[]}function Qo(t){return t&&t.length?t[0]:e}var Jo=Qr((function(e){var t=Nt(e,vi);return t.length&&t[0]===e[0]?Pr(t):[]})),Xo=Qr((function(t){var n=es(t),r=Nt(t,vi);return n===es(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Pr(r,lo(n,2)):[]})),Zo=Qr((function(t){var n=es(t),r=Nt(t,vi);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Pr(r,e,n):[]}));function es(t){var n=null==t?0:t.length;return n?t[n-1]:e}var ts=Qr(ns);function ns(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var rs=io((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Kr(e,Nt(t,(function(e){return wo(e,n)?+e:e})).sort(xi)),r}));function is(e){return null==e?e:En.call(e)}var os=Qr((function(e){return li(vr(e,1,Js,!0))})),ss=Qr((function(t){var n=es(t);return Js(n)&&(n=e),li(vr(t,1,Js,!0),lo(n,2))})),as=Qr((function(t){var n=es(t);return n="function"==typeof n?n:e,li(vr(t,1,Js,!0),e,n)}));function us(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Js(e))return t=Wt(e.length,t),!0})),Yt(t,(function(t){return Nt(e,$t(t))}))}function cs(t,n){if(!t||!t.length)return[];var r=us(t);return null==n?r:Nt(r,(function(t){return Ot(n,e,t)}))}var ls=Qr((function(e,t){return Js(e)?lr(e,t):[]})),fs=Qr((function(e){return gi(Pt(e,Js))})),hs=Qr((function(t){var n=es(t);return Js(n)&&(n=e),gi(Pt(t,Js),lo(n,2))})),ds=Qr((function(t){var n=es(t);return n="function"==typeof n?n:e,gi(Pt(t,Js),e,n)})),ps=Qr(us);var gs=Qr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,cs(t,r)}));function ys(e){var t=zn(e);return t.__chain__=!0,t}function vs(e,t){return t(e)}var ms=io((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return or(e,t)};return!(n>1||this.__actions__.length)&&i instanceof qn&&wo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:vs,args:[o],thisArg:e}),new Hn(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));var _s=Ai((function(e,t,n){Me.call(e,n)?++e[n]:ir(e,n,1)}));var bs=Di(Ko),ws=Di(Go);function Es(e,t){return(Gs(e)?xt:fr)(e,lo(t,3))}function Ss(e,t){return(Gs(e)?Rt:hr)(e,lo(t,3))}var Os=Ai((function(e,t,n){Me.call(e,n)?e[n].push(t):ir(e,n,[t])}));var Is=Qr((function(e,t,n){var r=-1,i="function"==typeof t,o=Qs(e)?ue(e.length):[];return fr(e,(function(e){o[++r]=i?Ot(t,e,n):Cr(e,t,n)})),o})),xs=Ai((function(e,t,n){ir(e,n,t)}));function Rs(e,t){return(Gs(e)?Nt:zr)(e,lo(t,3))}var ks=Ai((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ps=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Eo(e,t[0],t[1])?t=[]:n>2&&Eo(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,vr(t,1),[])})),Cs=nt||function(){return ht.Date.now()};function As(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Ji(t,u,e,e,e,e,n)}function Ns(t,r){var i;if("function"!=typeof r)throw new ke(n);return t=ma(t),function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=e),i}}var Ts=Qr((function(e,t,n){var r=1;if(n.length){var i=ln(n,co(Ts));r|=s}return Ji(e,r,t,n,i)})),Ms=Qr((function(e,t,n){var r=3;if(n.length){var i=ln(n,co(Ms));r|=s}return Ji(t,r,e,n,i)}));function Ls(t,r,i){var o,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ke(n);function g(n){var r=o,i=s;return o=s=e,f=n,u=t.apply(i,r)}function y(t){var n=t-l;return l===e||n>=r||n<0||d&&t-f>=a}function v(){var e=Cs();if(y(e))return m(e);c=Lo(v,function(e){var t=r-(e-l);return d?mn(t,a-(e-f)):t}(e))}function m(t){return c=e,p&&o?g(t):(o=s=e,u)}function _(){var t=Cs(),n=y(t);if(o=arguments,s=this,l=t,n){if(c===e)return function(e){return f=e,c=Lo(v,r),h?g(e):u}(l);if(d)return Ei(c),c=Lo(v,r),g(l)}return c===e&&(c=Lo(v,r)),u}return r=ba(r)||0,ia(i)&&(h=!!i.leading,a=(d="maxWait"in i)?Wt(ba(i.maxWait)||0,r):a,p="trailing"in i?!!i.trailing:p),_.cancel=function(){c!==e&&Ei(c),f=0,o=l=s=c=e},_.flush=function(){return c===e?u:m(Cs())},_}var js=Qr((function(e,t){return cr(e,1,t)})),Us=Qr((function(e,t,n){return cr(e,ba(t)||0,n)}));function Ds(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ds.Cache||Wn),r}function zs(e){if("function"!=typeof e)throw new ke(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ds.Cache=Wn;var Fs=bi((function(e,t){var n=(t=1==t.length&&Gs(t[0])?Nt(t[0],Jt(lo())):Nt(vr(t,1),Jt(lo()))).length;return Qr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ot(e,this,r)}))})),Bs=Qr((function(t,n){var r=ln(n,co(Bs));return Ji(t,s,e,n,r)})),Hs=Qr((function(t,n){var r=ln(n,co(Hs));return Ji(t,a,e,n,r)})),qs=io((function(t,n){return Ji(t,c,e,e,e,n)}));function Vs(e,t){return e===t||e!=e&&t!=t}var $s=Wi(xr),Ws=Wi((function(e,t){return e>=t})),Ks=Ar(function(){return arguments}())?Ar:function(e){return oa(e)&&Me.call(e,"callee")&&!Ke.call(e,"callee")},Gs=ue.isArray,Ys=mt?Jt(mt):function(e){return oa(e)&&Ir(e)==A};function Qs(e){return null!=e&&ra(e.length)&&!ta(e)}function Js(e){return oa(e)&&Qs(e)}var Xs=pt||bu,Zs=_t?Jt(_t):function(e){return oa(e)&&Ir(e)==m};function ea(e){if(!oa(e))return!1;var t=Ir(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ua(e)}function ta(e){if(!ia(e))return!1;var t=Ir(e);return t==b||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function na(e){return"number"==typeof e&&e==ma(e)}function ra(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ia(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oa(e){return null!=e&&"object"==typeof e}var sa=bt?Jt(bt):function(e){return oa(e)&&vo(e)==E};function aa(e){return"number"==typeof e||oa(e)&&Ir(e)==S}function ua(e){if(!oa(e)||Ir(e)!=O)return!1;var t=$e(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Te.call(n)==De}var ca=wt?Jt(wt):function(e){return oa(e)&&Ir(e)==x};var la=Et?Jt(Et):function(e){return oa(e)&&vo(e)==R};function fa(e){return"string"==typeof e||!Gs(e)&&oa(e)&&Ir(e)==k}function ha(e){return"symbol"==typeof e||oa(e)&&Ir(e)==P}var da=St?Jt(St):function(e){return oa(e)&&ra(e.length)&&!!ot[Ir(e)]};var pa=Wi(Dr),ga=Wi((function(e,t){return e<=t}));function ya(e){if(!e)return[];if(Qs(e))return fa(e)?dn(e):Pi(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=vo(e);return(t==E?un:t==R?fn:Va)(e)}function va(e){return e?(e=ba(e))===l||e===-l?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=va(e),n=t%1;return t==t?n?t-n:t:0}function _a(e){return e?sr(ma(e),0,d):0}function ba(e){if("number"==typeof e)return e;if(ha(e))return h;if(ia(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ia(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=pe.test(e);return n||ye.test(e)?ct(e.slice(2),n?2:8):de.test(e)?h:+e}function wa(e){return Ci(e,ja(e))}function Ea(e){return null==e?"":ci(e)}var Sa=Ni((function(e,t){if(xo(t)||Qs(t))Ci(t,La(t),e);else for(var n in t)Me.call(t,n)&&er(e,n,t[n])})),Oa=Ni((function(e,t){Ci(t,ja(t),e)})),Ia=Ni((function(e,t,n,r){Ci(t,ja(t),e,r)})),xa=Ni((function(e,t,n,r){Ci(t,La(t),e,r)})),Ra=io(or);var ka=Qr((function(t,n){t=Ie(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&Eo(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=ja(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||Vs(f,Ae[l])&&!Me.call(t,l))&&(t[l]=s[l])}return t})),Pa=Qr((function(t){return t.push(e,Zi),Ot(Da,e,t)}));function Ca(t,n,r){var i=null==t?e:Sr(t,n);return i===e?r:i}function Aa(e,t){return null!=e&&mo(e,t,kr)}var Na=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),iu(au)),Ta=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]}),lo),Ma=Qr(Cr);function La(e){return Qs(e)?Yn(e):jr(e)}function ja(e){return Qs(e)?Yn(e,!0):Ur(e)}var Ua=Ni((function(e,t,n){Hr(e,t,n)})),Da=Ni((function(e,t,n,r){Hr(e,t,n,r)})),za=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=_i(t,e),r||(r=t.length>1),t})),Ci(e,so(e),n),r&&(n=ar(n,7,eo));for(var i=t.length;i--;)fi(n,t[i]);return n}));var Fa=io((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return Aa(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=Nt(so(e),(function(e){return[e]}));return t=lo(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var Ha=Qi(La),qa=Qi(ja);function Va(e){return null==e?[]:Xt(e,La(e))}var $a=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?Wa(t):t)}));function Wa(e){return eu(Ea(e).toLowerCase())}function Ka(e){return(e=Ea(e))&&e.replace(me,nn).replace(Xe,"")}var Ga=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ya=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Qa=Li("toLowerCase");var Ja=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Xa=ji((function(e,t,n){return e+(n?" ":"")+eu(t)}));var Za=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),eu=Li("toUpperCase");function tu(t,n,r){return t=Ea(t),(n=r?e:n)===e?an(t)?yn(t):Dt(t):t.match(n)||[]}var nu=Qr((function(t,n){try{return Ot(t,e,n)}catch(e){return ea(e)?e:new Ee(e)}})),ru=io((function(e,t){return xt(t,(function(t){t=Bo(t),ir(e,t,Ts(e[t],e))})),e}));function iu(e){return function(){return e}}var ou=zi(),su=zi(!0);function au(e){return e}function uu(e){return Lr("function"==typeof e?e:ar(e,1))}var cu=Qr((function(e,t){return function(n){return Cr(n,e,t)}})),lu=Qr((function(e,t){return function(n){return Cr(e,n,t)}}));function fu(e,t,n){var r=La(t),i=Er(t,r);null==n&&(!ia(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Er(t,La(t)));var o=!(ia(n)&&"chain"in n&&!n.chain),s=ta(e);return xt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Pi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function hu(){}var du=qi(Nt),pu=qi(kt),gu=qi(jt);function yu(e){return So(e)?$t(Bo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var vu=$i(),mu=$i(!0);function _u(){return[]}function bu(){return!1}var wu=Hi((function(e,t){return e+t}),0),Eu=Gi("ceil"),Su=Hi((function(e,t){return e/t}),1),Ou=Gi("floor");var Iu=Hi((function(e,t){return e*t}),1),xu=Gi("round"),Ru=Hi((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new ke(n);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=As,zn.assign=Sa,zn.assignIn=Oa,zn.assignInWith=Ia,zn.assignWith=xa,zn.at=Ra,zn.before=Ns,zn.bind=Ts,zn.bindAll=ru,zn.bindKey=Ms,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gs(e)?e:[e]},zn.chain=ys,zn.chunk=function(t,n,r){n=(r?Eo(t,n,r):n===e)?1:Wt(ma(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ue(lt(i/n));o<i;)a[s++]=ri(t,o,o+=n);return a},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ue(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Tt(Gs(n)?Pi(n):[n],vr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,r=lo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new ke(n);return[r(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ot(i[0],this,n))return Ot(i[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=La(e);return function(n){return ur(n,e,t)}}(ar(e,1))},zn.constant=iu,zn.countBy=_s,zn.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},zn.curry=function t(n,r,i){var o=Ji(n,8,e,e,e,e,e,r=i?e:r);return o.placeholder=t.placeholder,o},zn.curryRight=function t(n,r,i){var s=Ji(n,o,e,e,e,e,e,r=i?e:r);return s.placeholder=t.placeholder,s},zn.debounce=Ls,zn.defaults=ka,zn.defaultsDeep=Pa,zn.defer=js,zn.delay=Us,zn.difference=Vo,zn.differenceBy=$o,zn.differenceWith=Wo,zn.drop=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,(n=r||n===e?1:ma(n))<0?0:n,i):[]},zn.dropRight=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,0,(n=i-(n=r||n===e?1:ma(n)))<0?0:n):[]},zn.dropRightWhile=function(e,t){return e&&e.length?di(e,lo(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?di(e,lo(t,3),!0):[]},zn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Eo(e,t,n)&&(n=0,r=i),gr(e,t,n,r)):[]},zn.filter=function(e,t){return(Gs(e)?Pt:yr)(e,lo(t,3))},zn.flatMap=function(e,t){return vr(Rs(e,t),1)},zn.flatMapDeep=function(e,t){return vr(Rs(e,t),l)},zn.flatMapDepth=function(t,n,r){return r=r===e?1:ma(r),vr(Rs(t,n),r)},zn.flatten=Yo,zn.flattenDeep=function(e){return null!=e&&e.length?vr(e,l):[]},zn.flattenDepth=function(t,n){return null!=t&&t.length?vr(t,n=n===e?1:ma(n)):[]},zn.flip=function(e){return Ji(e,512)},zn.flow=ou,zn.flowRight=su,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:Er(e,La(e))},zn.functionsIn=function(e){return null==e?[]:Er(e,ja(e))},zn.groupBy=Os,zn.initial=function(e){return null!=e&&e.length?ri(e,0,-1):[]},zn.intersection=Jo,zn.intersectionBy=Xo,zn.intersectionWith=Zo,zn.invert=Na,zn.invertBy=Ta,zn.invokeMap=Is,zn.iteratee=uu,zn.keyBy=xs,zn.keys=La,zn.keysIn=ja,zn.map=Rs,zn.mapKeys=function(e,t){var n={};return t=lo(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},zn.mapValues=function(e,t){var n={};return t=lo(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},zn.matches=function(e){return Fr(ar(e,1))},zn.matchesProperty=function(e,t){return Br(e,ar(t,1))},zn.memoize=Ds,zn.merge=Ua,zn.mergeWith=Da,zn.method=cu,zn.methodOf=lu,zn.mixin=fu,zn.negate=zs,zn.nthArg=function(e){return e=ma(e),Qr((function(t){return qr(t,e)}))},zn.omit=za,zn.omitBy=function(e,t){return Ba(e,zs(lo(t)))},zn.once=function(e){return Ns(2,e)},zn.orderBy=function(t,n,r,i){return null==t?[]:(Gs(n)||(n=null==n?[]:[n]),Gs(r=i?e:r)||(r=null==r?[]:[r]),Vr(t,n,r))},zn.over=du,zn.overArgs=Fs,zn.overEvery=pu,zn.overSome=gu,zn.partial=Bs,zn.partialRight=Hs,zn.partition=ks,zn.pick=Fa,zn.pickBy=Ba,zn.property=yu,zn.propertyOf=function(t){return function(n){return null==t?e:Sr(t,n)}},zn.pull=ts,zn.pullAll=ns,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,lo(n,2)):e},zn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Wr(t,n,e,r):t},zn.pullAt=rs,zn.range=vu,zn.rangeRight=mu,zn.rearg=qs,zn.reject=function(e,t){return(Gs(e)?Pt:yr)(e,zs(lo(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Kr(e,i),n},zn.rest=function(t,r){if("function"!=typeof t)throw new ke(n);return Qr(t,r=r===e?r:ma(r))},zn.reverse=is,zn.sampleSize=function(t,n,r){return n=(r?Eo(t,n,r):n===e)?1:ma(n),(Gs(t)?Jn:Xr)(t,n)},zn.set=function(e,t,n){return null==e?e:Zr(e,t,n)},zn.setWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Zr(t,n,r,i)},zn.shuffle=function(e){return(Gs(e)?Xn:ni)(e)},zn.slice=function(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Eo(t,n,r)?(n=0,r=i):(n=null==n?0:ma(n),r=r===e?i:ma(r)),ri(t,n,r)):[]},zn.sortBy=Ps,zn.sortedUniq=function(e){return e&&e.length?ai(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,lo(t,2)):[]},zn.split=function(t,n,r){return r&&"number"!=typeof r&&Eo(t,n,r)&&(n=r=e),(r=r===e?d:r>>>0)?(t=Ea(t))&&("string"==typeof n||null!=n&&!ca(n))&&!(n=ci(n))&&sn(t)?wi(dn(t),0,r):t.split(n,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new ke(n);return t=null==t?0:Wt(ma(t),0),Qr((function(n){var r=n[t],i=wi(n,0,t);return r&&Tt(i,r),Ot(e,this,i)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},zn.take=function(t,n,r){return t&&t.length?ri(t,0,(n=r||n===e?1:ma(n))<0?0:n):[]},zn.takeRight=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,(n=i-(n=r||n===e?1:ma(n)))<0?0:n,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?di(e,lo(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?di(e,lo(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new ke(n);return ia(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ls(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=vs,zn.toArray=ya,zn.toPairs=Ha,zn.toPairsIn=qa,zn.toPath=function(e){return Gs(e)?Nt(e,Bo):ha(e)?[e]:Pi(Fo(Ea(e)))},zn.toPlainObject=wa,zn.transform=function(e,t,n){var r=Gs(e),i=r||Xs(e)||da(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ia(e)&&ta(o)?Fn($e(e)):{}}return(i?xt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},zn.unary=function(e){return As(e,1)},zn.union=os,zn.unionBy=ss,zn.unionWith=as,zn.uniq=function(e){return e&&e.length?li(e):[]},zn.uniqBy=function(e,t){return e&&e.length?li(e,lo(t,2)):[]},zn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?li(t,e,n):[]},zn.unset=function(e,t){return null==e||fi(e,t)},zn.unzip=us,zn.unzipWith=cs,zn.update=function(e,t,n){return null==e?e:hi(e,t,mi(n))},zn.updateWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:hi(t,n,mi(r),i)},zn.values=Va,zn.valuesIn=function(e){return null==e?[]:Xt(e,ja(e))},zn.without=ls,zn.words=tu,zn.wrap=function(e,t){return Bs(mi(t),e)},zn.xor=fs,zn.xorBy=hs,zn.xorWith=ds,zn.zip=ps,zn.zipObject=function(e,t){return yi(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return yi(e||[],t||[],Zr)},zn.zipWith=gs,zn.entries=Ha,zn.entriesIn=qa,zn.extend=Oa,zn.extendWith=Ia,fu(zn,zn),zn.add=wu,zn.attempt=nu,zn.camelCase=$a,zn.capitalize=Wa,zn.ceil=Eu,zn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=ba(r))==r?r:0),n!==e&&(n=(n=ba(n))==n?n:0),sr(ba(t),n,r)},zn.clone=function(e){return ar(e,4)},zn.cloneDeep=function(e){return ar(e,5)},zn.cloneDeepWith=function(t,n){return ar(t,5,n="function"==typeof n?n:e)},zn.cloneWith=function(t,n){return ar(t,4,n="function"==typeof n?n:e)},zn.conformsTo=function(e,t){return null==t||ur(e,t,La(t))},zn.deburr=Ka,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=Su,zn.endsWith=function(t,n,r){t=Ea(t),n=ci(n);var i=t.length,o=r=r===e?i:sr(ma(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n},zn.eq=Vs,zn.escape=function(e){return(e=Ea(e))&&G.test(e)?e.replace(W,rn):e},zn.escapeRegExp=function(e){return(e=Ea(e))&&ne.test(e)?e.replace(te,"\\$&"):e},zn.every=function(t,n,r){var i=Gs(t)?kt:dr;return r&&Eo(t,n,r)&&(n=e),i(t,lo(n,3))},zn.find=bs,zn.findIndex=Ko,zn.findKey=function(e,t){return zt(e,lo(t,3),br)},zn.findLast=ws,zn.findLastIndex=Go,zn.findLastKey=function(e,t){return zt(e,lo(t,3),wr)},zn.floor=Ou,zn.forEach=Es,zn.forEachRight=Ss,zn.forIn=function(e,t){return null==e?e:mr(e,lo(t,3),ja)},zn.forInRight=function(e,t){return null==e?e:_r(e,lo(t,3),ja)},zn.forOwn=function(e,t){return e&&br(e,lo(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,lo(t,3))},zn.get=Ca,zn.gt=$s,zn.gte=Ws,zn.has=function(e,t){return null!=e&&mo(e,t,Rr)},zn.hasIn=Aa,zn.head=Qo,zn.identity=au,zn.includes=function(e,t,n,r){e=Qs(e)?e:Va(e),n=n&&!r?ma(n):0;var i=e.length;return n<0&&(n=Wt(i+n,0)),fa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Bt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=Wt(r+i,0)),Bt(e,t,i)},zn.inRange=function(t,n,r){return n=va(n),r===e?(r=n,n=0):r=va(r),function(e,t,n){return e>=mn(t,n)&&e<Wt(t,n)}(t=ba(t),n,r)},zn.invoke=Ma,zn.isArguments=Ks,zn.isArray=Gs,zn.isArrayBuffer=Ys,zn.isArrayLike=Qs,zn.isArrayLikeObject=Js,zn.isBoolean=function(e){return!0===e||!1===e||oa(e)&&Ir(e)==v},zn.isBuffer=Xs,zn.isDate=Zs,zn.isElement=function(e){return oa(e)&&1===e.nodeType&&!ua(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Qs(e)&&(Gs(e)||"string"==typeof e||"function"==typeof e.splice||Xs(e)||da(e)||Ks(e)))return!e.length;var t=vo(e);if(t==E||t==R)return!e.size;if(xo(e))return!jr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Nr(e,t)},zn.isEqualWith=function(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Nr(t,n,e,r):!!i},zn.isError=ea,zn.isFinite=function(e){return"number"==typeof e&&yt(e)},zn.isFunction=ta,zn.isInteger=na,zn.isLength=ra,zn.isMap=sa,zn.isMatch=function(e,t){return e===t||Tr(e,t,ho(t))},zn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Tr(t,n,ho(n),r)},zn.isNaN=function(e){return aa(e)&&e!=+e},zn.isNative=function(e){if(Io(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=aa,zn.isObject=ia,zn.isObjectLike=oa,zn.isPlainObject=ua,zn.isRegExp=ca,zn.isSafeInteger=function(e){return na(e)&&e>=-f&&e<=f},zn.isSet=la,zn.isString=fa,zn.isSymbol=ha,zn.isTypedArray=da,zn.isUndefined=function(t){return t===e},zn.isWeakMap=function(e){return oa(e)&&vo(e)==C},zn.isWeakSet=function(e){return oa(e)&&"[object WeakSet]"==Ir(e)},zn.join=function(e,t){return null==e?"":vt.call(e,t)},zn.kebabCase=Ga,zn.last=es,zn.lastIndexOf=function(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=ma(r))<0?Wt(i+o,0):mn(o,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,o):Ft(t,qt,o,!0)},zn.lowerCase=Ya,zn.lowerFirst=Qa,zn.lt=pa,zn.lte=ga,zn.max=function(t){return t&&t.length?pr(t,au,xr):e},zn.maxBy=function(t,n){return t&&t.length?pr(t,lo(n,2),xr):e},zn.mean=function(e){return Vt(e,au)},zn.meanBy=function(e,t){return Vt(e,lo(t,2))},zn.min=function(t){return t&&t.length?pr(t,au,Dr):e},zn.minBy=function(t,n){return t&&t.length?pr(t,lo(n,2),Dr):e},zn.stubArray=_u,zn.stubFalse=bu,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Iu,zn.nth=function(t,n){return t&&t.length?qr(t,ma(n)):e},zn.noConflict=function(){return ht._===this&&(ht._=ze),this},zn.noop=hu,zn.now=Cs,zn.pad=function(e,t,n){e=Ea(e);var r=(t=ma(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Vi(ft(i),n)+e+Vi(lt(i),n)},zn.padEnd=function(e,t,n){e=Ea(e);var r=(t=ma(t))?hn(e):0;return t&&r<t?e+Vi(t-r,n):e},zn.padStart=function(e,t,n){e=Ea(e);var r=(t=ma(t))?hn(e):0;return t&&r<t?Vi(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(Ea(e).replace(re,""),t||0)},zn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&Eo(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=va(t),n===e?(n=t,t=0):n=va(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=wn();return mn(t+o*(n-t+ut("1e-"+((o+"").length-1))),n)}return Gr(t,n)},zn.reduce=function(e,t,n){var r=Gs(e)?Mt:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,fr)},zn.reduceRight=function(e,t,n){var r=Gs(e)?Lt:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},zn.repeat=function(t,n,r){return n=(r?Eo(t,n,r):n===e)?1:ma(n),Yr(Ea(t),n)},zn.replace=function(){var e=arguments,t=Ea(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(t,n,r){var i=-1,o=(n=_i(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Bo(n[i])];s===e&&(i=o,s=r),t=ta(s)?s.call(t):s}return t},zn.round=xu,zn.runInContext=t,zn.sample=function(e){return(Gs(e)?Qn:Jr)(e)},zn.size=function(e){if(null==e)return 0;if(Qs(e))return fa(e)?hn(e):e.length;var t=vo(e);return t==E||t==R?e.size:jr(e).length},zn.snakeCase=Ja,zn.some=function(t,n,r){var i=Gs(t)?jt:ii;return r&&Eo(t,n,r)&&(n=e),i(t,lo(n,3))},zn.sortedIndex=function(e,t){return oi(e,t)},zn.sortedIndexBy=function(e,t,n){return si(e,t,lo(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Vs(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return oi(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return si(e,t,lo(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=oi(e,t,!0)-1;if(Vs(e[n],t))return n}return-1},zn.startCase=Xa,zn.startsWith=function(e,t,n){return e=Ea(e),n=null==n?0:sr(ma(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},zn.subtract=Ru,zn.sum=function(e){return e&&e.length?Gt(e,au):0},zn.sumBy=function(e,t){return e&&e.length?Gt(e,lo(t,2)):0},zn.template=function(t,n,r){var i=zn.templateSettings;r&&Eo(t,n,r)&&(n=e),t=Ea(t),n=Ia({},n,i,Xi);var o,s,a=Ia({},n.imports,i.imports,Xi),u=La(a),c=Xt(a,u),l=0,f=n.interpolate||_e,h="__p += '",d=xe((n.escape||_e).source+"|"+f.source+"|"+(f===J?fe:_e).source+"|"+(n.evaluate||_e).source+"|$","g"),p="//# sourceURL="+(Me.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";t.replace(d,(function(e,n,r,i,a,u){return r||(r=i),h+=t.slice(l,u).replace(be,on),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),h+="';\n";var g=Me.call(n,"variable")&&n.variable;if(g){if(ce.test(g))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(H,""):h).replace(q,"$1").replace(V,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=nu((function(){return Se(u,p+"return "+h).apply(e,c)}));if(y.source=h,ea(y))throw y;return y},zn.times=function(e,t){if((e=ma(e))<1||e>f)return[];var n=d,r=mn(e,d);t=lo(t),e-=d;for(var i=Yt(r,t);++n<e;)t(n);return i},zn.toFinite=va,zn.toInteger=ma,zn.toLength=_a,zn.toLower=function(e){return Ea(e).toLowerCase()},zn.toNumber=ba,zn.toSafeInteger=function(e){return e?sr(ma(e),-f,f):0===e?e:0},zn.toString=Ea,zn.toUpper=function(e){return Ea(e).toUpperCase()},zn.trim=function(t,n,r){if((t=Ea(t))&&(r||n===e))return Qt(t);if(!t||!(n=ci(n)))return t;var i=dn(t),o=dn(n);return wi(i,en(i,o),tn(i,o)+1).join("")},zn.trimEnd=function(t,n,r){if((t=Ea(t))&&(r||n===e))return t.slice(0,pn(t)+1);if(!t||!(n=ci(n)))return t;var i=dn(t);return wi(i,0,tn(i,dn(n))+1).join("")},zn.trimStart=function(t,n,r){if((t=Ea(t))&&(r||n===e))return t.replace(re,"");if(!t||!(n=ci(n)))return t;var i=dn(t);return wi(i,en(i,dn(n))).join("")},zn.truncate=function(t,n){var r=30,i="...";if(ia(n)){var o="separator"in n?n.separator:o;r="length"in n?ma(n.length):r,i="omission"in n?ci(n.omission):i}var s=(t=Ea(t)).length;if(sn(t)){var a=dn(t);s=a.length}if(r>=s)return t;var u=r-hn(i);if(u<1)return i;var c=a?wi(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),ca(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=xe(o.source,Ea(he.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===e?u:h)}}else if(t.indexOf(ci(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},zn.unescape=function(e){return(e=Ea(e))&&K.test(e)?e.replace($,gn):e},zn.uniqueId=function(e){var t=++Le;return Ea(e)+t},zn.upperCase=Za,zn.upperFirst=eu,zn.each=Es,zn.eachRight=Ss,zn.first=Qo,fu(zn,function(){var e={};return br(zn,(function(t,n){Me.call(zn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),zn.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),xt(["drop","take"],(function(t,n){qn.prototype[t]=function(r){r=r===e?1:Wt(ma(r),0);var i=this.__filtered__&&!n?new qn(this):this.clone();return i.__filtered__?i.__takeCount__=mn(r,i.__takeCount__):i.__views__.push({size:mn(r,d),type:t+(i.__dir__<0?"Right":"")}),i},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),xt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(au)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Cr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(zs(lo(e)))},qn.prototype.slice=function(t,n){t=ma(t);var r=this;return r.__filtered__&&(t>0||n<0)?new qn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=ma(n))<0?r.dropRight(-n):r.take(n-t)),r)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(d)},br(qn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=zn[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(zn.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof qn,c=a[0],l=u||Gs(n),f=function(e){var t=o.apply(zn,Tt([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){n=g?n:new qn(this);var y=t.apply(n,a);return y.__actions__.push({func:vs,args:[f],thisArg:e}),new Hn(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Gs(i)?i:[],e)}return this[n]((function(n){return t.apply(Gs(n)?n:[],e)}))}})),br(qn.prototype,(function(e,t){var n=zn[t];if(n){var r=n.name+"";Me.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Fi(e,2).name]=[{name:"wrapper",func:e}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Gs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=mn(t,e+s);break;case"takeRight":e=Wt(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=mn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(2==_)y=b;else if(!b){if(1==_)continue e;break e}}p[h++]=y}return p},zn.prototype.at=ms,zn.prototype.chain=function(){return ys(this)},zn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===e&&(this.__values__=ya(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},zn.prototype.plant=function(t){for(var n,r=this;r instanceof Bn;){var i=qo(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n},zn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var n=t;return this.__actions__.length&&(n=new qn(this)),(n=n.reverse()).__actions__.push({func:vs,args:[is],thisArg:e}),new Hn(n,this.__chain__)}return this.thru(is)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Qe&&(zn.prototype[Qe]=function(){return this}),zn}();pt?((pt.exports=vn)._=vn,dt._=vn):ht._=vn}.call(t);var Jl=Object.defineProperty,Xl=Object.defineProperties,Zl=Object.getOwnPropertyDescriptors,ef=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,nf=Object.prototype.propertyIsEnumerable,rf=(e,t,n)=>t in e?Jl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,of=(e,t)=>{for(var n in t||(t={}))tf.call(t,n)&&rf(e,n,t[n]);if(ef)for(var n of ef(t))nf.call(t,n)&&rf(e,n,t[n]);return e},sf=(e,t)=>Xl(e,Zl(t));function af(e,t,n){var r;const i=function(e){const[t,n]=e.split(Bi);return{namespace:t,reference:n}}(e);return(null==(r=t.rpcMap)?void 0:r[i.reference])||`https://rpc.walletconnect.com/v1/?chainId=${i.namespace}:${i.reference}&projectId=${n}`}function uf(e){return e.includes(":")?e.split(":")[1]:e}function cf(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function lf(e){var t,n,r,i;const o={};if(!Xo(e))return o;for(const[s,a]of Object.entries(e)){const e=$o(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=Wo(s);o[f]=sf(of(of({},o[f]),a),{chains:No(e,null==(t=o[f])?void 0:t.chains),methods:No(u,null==(n=o[f])?void 0:n.methods),events:No(c,null==(r=o[f])?void 0:r.events),rpcMap:of(of({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function ff(e){return e.includes(":")?e.split(":")[2]:e}function hf(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=$o(n)?[n]:r.chains?r.chains:cf(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}function df(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):e.includes(":")?Number(e.split(":")[1]):Number(e)}const pf={},gf=e=>pf[e],yf=(e,t)=>{pf[e]=t};var vf={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t="URLSearchParams"in r,n="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new h;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},v.call(_.prototype),v.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(t,n){return new Promise((function(r,o){var s=new _(t,n);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;r(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=E),e.Headers=h,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(vf,vf.exports);var mf=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(vf.exports);const _f={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class bf{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new i.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Gs(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=$(e),n=await(await mf(this.url,Object.assign(Object.assign({},_f),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Gs(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=$({id:1,jsonrpc:"2.0",method:"test",params:[]});await mf(e,Object.assign(Object.assign({},_f),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?V(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hs(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return Is(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}class wf{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=uf(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class Ef{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Kl,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||af(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=parseInt(uf(t));e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Sf{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=uf(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class Of{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=uf(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class If{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t),r=uf(t);e[r]=this.createHttpProvider(r,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class xf{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=uf(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class Rf{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Kl,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=uf(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new na(new bf(n,gf("disableProviderPing")))}}class kf{constructor(e){this.name="near",this.namespace=e.namespace,this.events=gf("events"),this.client=gf("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||af(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Kl,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||af(e,this.namespace);return typeof n>"u"?void 0:new na(new bf(n,gf("disableProviderPing")))}}var Pf=Object.defineProperty,Cf=Object.defineProperties,Af=Object.getOwnPropertyDescriptors,Nf=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,Mf=Object.prototype.propertyIsEnumerable,Lf=(e,t,n)=>t in e?Pf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jf=(e,t)=>{for(var n in t||(t={}))Tf.call(t,n)&&Lf(e,n,t[n]);if(Nf)for(var n of Nf(t))Mf.call(t,n)&&Lf(e,n,t[n]);return e},Uf=(e,t)=>Cf(e,Af(t));class Df{constructor(e){this.events=new i.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Ye.pino(Ye.getDefaultLoggerOptions({level:e?.logger||$l})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new Df(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:jf({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:Qo("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=hf(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Ol)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Jo(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Vl.init({logger:this.providerOpts.logger||$l,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>Wo(e))))];yf("client",this.client),yf("events",this.events),yf("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}(e,this.session),n=cf(t),r=function(e={},t={}){const n=lf(e),r=lf(t);return Ql.exports.merge(n,r)}(this.namespaces,this.optionalNamespaces),i=Uf(jf({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Ef({namespace:i});break;case"solana":this.rpcProviders[e]=new Sf({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Of({namespace:i});break;case"polkadot":this.rpcProviders[e]=new wf({namespace:i});break;case"cip34":this.rpcProviders[e]=new If({namespace:i});break;case"elrond":this.rpcProviders[e]=new xf({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Rf({namespace:i});break;case"near":this.rpcProviders[e]=new kf({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&Jo(e)&&this.events.emit("accountsChanged",e.map(ff))}else if("chainChanged"===n.name){const e=t.chainId,n=t.event.data,r=Wo(e),i=df(e)!==df(n)?`${r}:${df(n)}`:e;this.onChainChanged(i)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=Uf(jf({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Uf(jf({},Qo("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Kl,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>Wo(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=Wo(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Wl}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Wl}/${e}`)}}const zf=Df;e.UniversalProvider=zf,e.default=Df,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,_c.exports);const bc=["eth_sendTransaction","personal_sign"],wc=["chainChanged","accountsChanged"];function Ec(e){return Number(e[0].split(":")[1])}function Sc(e){return`0x${e.toString(16)}`}class Oc{constructor(){this.events=new Ws.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return u(this,void 0,void 0,(function*(){const t=new Oc;return yield t.initialize(e),t}))}request(e){return u(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return u(this,void 0,void 0,(function*(){return this.session||(yield this.connect()),yield this.request({method:"eth_requestAccounts"})}))}connect(e){return u(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!yc(t))throw new Error("Invalid chains");const u=t,c=r||bc,l=o||wc,f={chains:u,methods:c,events:l,rpcMap:{[Ec(u)]:a[Ec(u)]}},h=null==o?void 0:o.filter((e=>!wc.includes(e))),d=null==r?void 0:r.filter((e=>!bc.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?u.concat(n||[]):n)],methods:[...new Set(c.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>u(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Sc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return u(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Sc(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=gc.USER_DISCONNECTED;return{message:n,code:r}}()),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Sc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||bc,events:(null==e?void 0:e.events)||wc,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return u(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Ec(this.rpc.chains),this.signer=yield _c.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&yc(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&yc(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return u(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Ic=n("WalletConnectEvm"),xc=r("WalletConnectEvm");function Rc(e){Ic("displayUriHandler",e),As(e)}const kc=n("getProvider"),Pc=[1];var Cc,Ac;let Nc;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(Cc||(Cc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Ac||(Ac={}));const Tc=e=>(kc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),Mc=n("supportOptions");let Lc;const jc=()=>(Mc("getSupportOptions"),Lc),Uc=n("ExtensionEvm");var Dc;function zc(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Fc(e){return!!Dc[e]}function Bc(e){return e.every(Fc)}function Hc(){if(Uc("getEthereumProvider"),"undefined"==typeof window)throw new a;let e=window.ethereum;if(Uc("provider is",e),void 0===e||void 0===e.isLedgerConnect)throw new i;const t=jc(),n=Tc(t.chainId||0);return Tc(e.chainId)!=n&&(Uc("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Dc||(Dc={}));const qc=n("support");let Vc;var $c=Object.freeze({__proto__:null,link:function(e,t,n,r){var i=this;return e?((e instanceof Element?[e]:"toArray"in e?e.toArray():e).forEach((function(e){e.addEventListener("click",(function(o){var s,a,u=t instanceof Function?t(e):t,c=n instanceof Function?n(e):n,l=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(s=e.getElementsByTagName("a")[0])||void 0===s?void 0:s.getAttribute("href")),f=Mt(i.track(u,c,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(e,t){return!("_blank"!==e.target||!t)})(e,l)||function(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this},form:function(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach((function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var s;o.preventDefault?o.preventDefault():o.returnValue=!1;var a=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;Mt(i.track(a,u,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500).catch(console.error).then((function(){e.submit()})).catch(console.error)},s=window.jQuery||window.Zepto;s?s(e).submit(o):e.addEventListener("submit",o,!1)})),this):this}});function Wc(e,t){return Object.keys(t).reduce((function(n,r){return r.startsWith(e)&&(n[r.substr(e.length)]=t[r]),n}),{})}for(var Kc=Object.freeze({__proto__:null,queryString:function(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=br(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=At(e.options.useQueryString)?e.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,h=void 0===f?/.+/:f;if(a){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&e.setAnonymousId(d)}if(o){var p=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(h.test(p)){var g=Wc("ajs_trait_",r);i.push(e.identify(p,g))}}if(s){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,v=Wc("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),Gc={},Yc={},Qc=[],Jc=0;Jc<64;)Qc[Jc]=0|4294967296*Math.sin(++Jc%Math.PI);var Xc=Object.freeze({__proto__:null,default:function(e){var t,n,r,i=[t=1732584193,n=4023233417,~t,~n],o=[],s=unescape(encodeURI(e))+"",a=s.length;for(e=--a/4+2|15,o[--e]=8*a;~a;)o[a>>2]|=s.charCodeAt(a)<<8*a--;for(Jc=s=0;Jc<e;Jc+=16){for(a=i;s<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=s>>4]+Qc[s]+~~o[Jc|15&[s,5*s+1,3*s+5,7*s][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+s++%4])|r>>>-a),t,n])t=0|a[1],n=a[2];for(s=4;s;)i[--s]+=a[s]}for(e="";s<32;)e+=(i[s>>3]>>4*(1^s++)&15).toString(16);return e}}),Zc=f(Xc),el={exports:{}};!function(e,t){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}(el); /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var tl,nl=Number.POSITIVE_INFINITY,rl=Number.NEGATIVE_INFINITY,il= /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(e){return e!=e},ol=nl,sl=rl,al=function(e){return e===ol||e===sl},ul="function"==typeof Object.defineProperty?Object.defineProperty:null,cl=Object.defineProperty,ll=Object.prototype,fl=ll.toString,hl=ll.__defineGetter__,dl=ll.__defineSetter__,pl=ll.__lookupGetter__,gl=ll.__lookupSetter__,yl=cl,vl=function(){try{return ul({},"x",{}),!0}catch(e){return!1}}()?yl:function(e,t,n){var r,i,o,s;if("object"!=typeof e||null===e||"[object Array]"===fl.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof n||null===n||"[object Array]"===fl.call(n))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+n+"`.");if((i="value"in n)&&(pl.call(e,t)||gl.call(e,t)?(r=e.__proto__,e.__proto__=ll,delete e[t],e[t]=n.value,e.__proto__=r):e[t]=n.value),o="get"in n,s="set"in n,i&&(o||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&hl&&hl.call(e,t,n.get),s&&dl&&dl.call(e,t,n.set),e},ml=function(e,t,n){vl(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})},_l="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),bl=Object.prototype.toString,wl=bl,El=Object.prototype.hasOwnProperty,Sl="function"==typeof Symbol?Symbol.toStringTag:"",Ol=function(e,t){return null!=e&&El.call(e,t)},Il=Sl,xl=bl,Rl=function(e){return wl.call(e)},kl=function(e){var t,n,r;if(null==e)return xl.call(e);n=e[Il],t=Ol(e,Il);try{e[Il]=void 0}catch(t){return xl.call(e)}return r=xl.call(e),t?e[Il]=n:delete e[Il],r},Pl=_l&&"symbol"==typeof Symbol.toStringTag?kl:Rl,Cl=Pl,Al="function"==typeof Uint32Array,Nl="function"==typeof Uint32Array?Uint32Array:null,Tl=Nl,Ml="function"==typeof Uint32Array?Uint32Array:void 0,Ll=function(){var e,t;if("function"!=typeof Tl)return!1;try{e=function(e){return Al&&e instanceof Uint32Array||"[object Uint32Array]"===Cl(e)}(t=new Tl(t=[1,3.14,-3.14,4294967296,4294967297]))&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}()?Ml: /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(){throw new Error("not implemented")},jl=Pl,Ul="function"==typeof Float64Array,Dl="function"==typeof Float64Array?Float64Array:null,zl=Dl,Fl="function"==typeof Float64Array?Float64Array:void 0,Bl=function(){var e,t;if("function"!=typeof zl)return!1;try{e=function(e){return Ul&&e instanceof Float64Array||"[object Float64Array]"===jl(e)}(t=new zl([1,3.14,-3.14,NaN]))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){e=!1}return e}()?Fl: /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(){throw new Error("not implemented")},Hl=Pl,ql="function"==typeof Uint8Array,Vl="function"==typeof Uint8Array?Uint8Array:null,$l=Vl,Wl="function"==typeof Uint8Array?Uint8Array:void 0,Kl=function(){var e,t;if("function"!=typeof $l)return!1;try{e=function(e){return ql&&e instanceof Uint8Array||"[object Uint8Array]"===Hl(e)}(t=new $l(t=[1,3.14,-3.14,256,257]))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}()?Wl: /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(){throw new Error("not implemented")},Gl=Pl,Yl="function"==typeof Uint16Array,Ql="function"==typeof Uint16Array?Uint16Array:null,Jl=Ql,Xl="function"==typeof Uint16Array?Uint16Array:void 0,Zl={uint16:function(){var e,t;if("function"!=typeof Jl)return!1;try{e=function(e){return Yl&&e instanceof Uint16Array||"[object Uint16Array]"===Gl(e)}(t=new Jl(t=[1,3.14,-3.14,65536,65537]))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}()?Xl: /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(){throw new Error("not implemented")},uint8:Kl}; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (tl=new Zl.uint16(1))[0]=4660;var ef,tf,nf=52===new Zl.uint8(tl.buffer)[0]; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */!0===nf?(ef=1,tf=0):(ef=0,tf=1);var rf=Ll,of={HIGH:ef,LOW:tf},sf=new Bl(1),af=new rf(sf.buffer),uf=of.HIGH,cf=of.LOW,lf=function(e,t,n,r){return sf[0]=e,t[r]=af[uf],t[r+n]=af[cf],t},ff=lf,hf=function(e){return ff(e,[0,0],1,0)}; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ ml(hf,"assign",lf);var df,pf,gf=hf,yf=Ll,vf=!0===nf?1:0,mf=new Bl(1),_f=new yf(mf.buffer),bf=function(e){return mf[0]=e,_f[vf]}; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !0===nf?(df=1,pf=0):(df=0,pf=1);var wf=Ll,Ef={HIGH:df,LOW:pf},Sf=new Bl(1),Of=new wf(Sf.buffer),If=Ef.HIGH,xf=Ef.LOW,Rf=function(e,t){return Of[If]=e,Of[xf]=t,Sf[0]},kf=gf,Pf=bf,Cf=Rf,Af=[0,0],Nf=function(e,t){var n,r;return kf.assign(e,Af,1,0),n=Af[0],n&=2147483647,r=Pf(t),Cf(n|=r&=2147483648,Af[1])},Tf=al,Mf=il,Lf= /** * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function(e){return Math.abs(e)},jf=function(e,t,n,r){return Mf(e)||Tf(e)?(t[r]=e,t[r+n]=0,t):0!==e&&Lf(e)<22250738585072014e-324?(t[r]=4503599627370496*e,t[r+n]=-52,t):(t[r]=e,t[r+n]=0,t)},Uf=jf,Df=function(e){return Uf(e,[0,0],1,0)}; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ ml(Df,"assign",jf);var zf=bf,Ff=nl,Bf=rl,Hf=il,qf=al,Vf=Nf,$f=Df,Wf=function(e){var t=zf(e);return(t=(2146435072&t)>>>20)-1023|0},Kf=gf,Gf=Rf,Yf=[0,0],Qf=[0,0],Jf=function(e,t){var n,r;return 0===e||Hf(e)||qf(e)?e:($f(Yf),t+=Yf[1],(t+=Wf(e=Yf[0]))<-1074?Vf(0,e):t>1023?e<0?Bf:Ff:(t<=-1023?(t+=52,r=2220446049250313e-31):r=1,Kf(Qf),n=Qf[0],n&=2148532223,r*Gf(n|=t+1023<<20,Qf[1])))},Xf={ /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ dset:function(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}},Zf={},eh=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}}; /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.unset=void 0;var th=eh(el.exports);Zf.unset=function(e,t){if((0,th.default)(e,t)){for(var n=t.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)e=e[t=n.shift()];return delete e[r]}return!0};var nh=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yc,"__esModule",{value:!0});var rh=nh(Zc),ih=nh(el.exports),oh=nh(Jf),sh=Xf,ah=Zf;function uh(e,t){lh(e,t.drop,(function(e,t){t.forEach((function(t){return delete e[t]}))}))}function ch(e,t){lh(e,t.allow,(function(e,t){Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]}))}))}function lh(e,t,n){Object.entries(t).forEach((function(t){var r=t[0],i=t[1],o=function(e){"object"==typeof e&&null!==e&&n(e,i)},s=""===r?e:(0,ih.default)(e,r);Array.isArray(s)?s.forEach(o):o(s)}))}function fh(e,t){var n=JSON.parse(JSON.stringify(e));for(var r in t.map)if(t.map.hasOwnProperty(r)){var i=t.map[r],o=r.split("."),s=void 0;if(o.length>1?(o.pop(),s=(0,ih.default)(n,o.join("."))):s=e,"object"==typeof s){if(i.copy){var a=(0,ih.default)(n,i.copy);void 0!==a&&(0,sh.dset)(e,r,a)}else if(i.move){var u=(0,ih.default)(n,i.move);void 0!==u&&(0,sh.dset)(e,r,u),(0,ah.unset)(e,i.move)}else i.hasOwnProperty("set")&&(0,sh.dset)(e,r,i.set);if(i.to_string){var c=(0,ih.default)(e,r);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,sh.dset)(e,r,JSON.stringify(c)):(0,sh.dset)(e,r,"undefined")}}}}function hh(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,ih.default)(e,t.sample.path),r=(0,rh.default)(JSON.stringify(n)),i=-64,o=[];dh(r.slice(0,8),o);for(var s=0,a=0;a<64&&1!==o[a];a++)s++;if(0!==s){var u=[];dh(r.slice(9,16),u),i-=s,o.splice(0,s),u.splice(64-s),o=o.concat(u)}return o[63]=0===o[63]?1:0,(0,oh.default)(parseInt(o.join(""),2),i)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function dh(e,t){for(var n=0;n<8;n++)for(var r=e[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,t.push(1)):t.push(0)}Yc.default=function(e,t){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":uh(n,o.config);break;case"allow_properties":ch(n,o.config);break;case"sample_event":if(hh(n,o.config))break;return null;case"map_properties":fh(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n};var ph={},gh=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ph,"__esModule",{value:!0});var yh=gh(el.exports);function vh(e,t){if(!Array.isArray(e))return!0===mh(e,t);var n=e[0];switch(n){case"!":return!vh(e[1],t);case"or":for(var r=1;r<e.length;r++)if(vh(e[r],t))return!0;return!1;case"and":for(r=1;r<e.length;r++)if(!vh(e[r],t))return!1;return!0;case"=":case"!=":return function(e,t,n,r){switch(_h(e)&&(e=vh(e,r)),_h(t)&&(t=vh(t,r)),"object"==typeof e&&"object"==typeof t&&(e=JSON.stringify(e),t=JSON.stringify(t)),n){case"=":return e===t;case"!=":return e!==t;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(mh(e[1],t),mh(e[2],t),n,t);case"<=":case"<":case">":case">=":return function(e,t,n,r){if(_h(e)&&(e=vh(e,r)),_h(t)&&(t=vh(t,r)),"number"!=typeof e||"number"!=typeof t)return!1;switch(n){case"<=":return e<=t;case">=":return e>=t;case"<":return e<t;case">":return e>t;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(mh(e[1],t),mh(e[2],t),n,t);case"in":return function(e,t,n){return void 0!==t.find((function(t){return mh(t,n)===e}))}(mh(e[1],t),mh(e[2],t),t);case"contains":return function(e,t){return"string"==typeof e&&"string"==typeof t&&-1!==e.indexOf(t)}(mh(e[1],t),mh(e[2],t));case"match":return function(e,t){return"string"==typeof e&&"string"==typeof t&&function(e,t){var n,r;e:for(;e.length>0;){var i,o;if(i=(n=bh(e)).star,o=n.chunk,e=n.pattern,i&&""===o)return!0;var s=wh(o,t),a=s.t,u=s.ok,c=s.err;if(c)return!1;if(!u||!(0===a.length||e.length>0)){if(i)for(var l=0;l<t.length;l++){if(a=(r=wh(o,t.slice(l+1))).t,u=r.ok,c=r.err,u){if(0===e.length&&a.length>0)continue;t=a;continue e}if(c)return!1}return!1}t=a}return 0===t.length}(t,e)}(mh(e[1],t),mh(e[2],t));case"lowercase":var i=mh(e[1],t);return"string"!=typeof i?null:i.toLowerCase();case"typeof":return typeof mh(e[1],t);case"length":return function(e){return null===e?0:Array.isArray(e)||"string"==typeof e?e.length:NaN}(mh(e[1],t));default:throw new Error("FQL IR could not evaluate for token: ".concat(n))}}function mh(e,t){return Array.isArray(e)?e:"object"==typeof e?e.value:(0,yh.default)(t,e)}function _h(e){return!!Array.isArray(e)&&(("lowercase"===e[0]||"length"===e[0]||"typeof"===e[0])&&2===e.length||("contains"===e[0]||"match"===e[0])&&3===e.length)}function bh(e){for(var t={star:!1,chunk:"",pattern:""};e.length>0&&"*"===e[0];)e=e.slice(1),t.star=!0;var n,r=!1;e:for(n=0;n<e.length;n++)switch(e[n]){case"\\":n+1<e.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break e}return t.chunk=e.slice(0,n),t.pattern=e.slice(n),t}function wh(e,t){for(var n,r,i={t:"",ok:!1,err:!1};e.length>0;){if(0===t.length)return i;switch(e[0]){case"[":var o=t[0];t=t.slice(1);var s=!0;(e=e.slice(1)).length>0&&"^"===e[0]&&(s=!1,e=e.slice(1));for(var a=!1,u=0;;){if(e.length>0&&"]"===e[0]&&u>0){e=e.slice(1);break}var c,l="";if(c=(n=Eh(e)).char,e=n.newChunk,n.err)return i;if(l=c,"-"===e[0]&&(l=(r=Eh(e.slice(1))).char,e=r.newChunk,r.err))return i;c<=o&&o<=l&&(a=!0),u++}if(a!==s)return i;break;case"?":t=t.slice(1),e=e.slice(1);break;case"\\":if(0===(e=e.slice(1)).length)return i.err=!0,i;default:if(e[0]!==t[0])return i;t=t.slice(1),e=e.slice(1)}}return i.t=t,i.ok=!0,i.err=!1,i}function Eh(e){var t={char:"",newChunk:"",err:!1};return 0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length?(t.err=!0,t):(t.char=e[0],t.newChunk=e.slice(1),0===t.newChunk.length&&(t.err=!0),t)}ph.default=function(e,t){if(!t)throw new Error("No matcher supplied!");switch(t.type){case"all":return!0;case"fql":return function(e,t){if(!e)return!1;try{e=JSON.parse(e)}catch(t){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(t))}var n=vh(e,t);return"boolean"==typeof n&&n}(t.ir,e);default:throw new Error("Matcher of type ".concat(t.type," unsupported."))}};var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0});var Oh=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var t=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==e&&void 0!==i.destinationName||t.push(i)}return t},e}();Sh.default=Oh,function(e){var t=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var n=Yc;Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return t(n).default}});var r=ph;Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return t(r).default}});var i=Sh;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return t(i).default}})}(Gc);var Ih=Object.freeze({__proto__:null,tsubMiddleware:function(e){return function(t){var n=t.payload,r=t.integration,i=t.next;new Gc.Store(e).getRulesByDestinationName(r).forEach((function(e){for(var t=e.matchers,r=e.transformers,o=0;o<t.length;o++)if(Gc.matches(n.obj,t[o])&&(n.obj=Gc.transform(n.obj,r[o]),null===n.obj))return i(null)})),i(n)}}});function xh(e,t){var n,r;return"boolean"==typeof(null==t?void 0:t.enabled)?t.enabled:null===(r=null===(n=null==e?void 0:e.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}function Rh(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function kh(e,t){return void 0===t&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function Ph(e,t,n,r){return yt(this,void 0,void 0,(function(){var i,o,s,a,u,c;return vt(this,(function(l){switch(l.label){case 0:i=Rh(t),o=kh(i,r),s=mr(),a="".concat(s,"/integrations/").concat(null!=o?o:i,"/").concat(n,"/").concat(null!=o?o:i,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Ir(a)];case 2:return l.sent(),function(e,t,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(e,"resource"))&&void 0!==i?i:[])[0];o&&t.stats.gauge("legacy_destination_time",Math.round(o.duration),mt([n],o.duration<100?["cached"]:[],!0))}catch(e){}}(a,e,t),[3,4];case 3:throw u=l.sent(),e.stats.gauge("legacy_destination_time",-1,["plugin:".concat(t),"failed"]),u;case 4:return c=window["".concat(i,"Deps")],[4,Promise.all(c.map((function(e){return Ir(s+e+".gz")})))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}}))}))}function Ch(e,t){return yt(this,void 0,void 0,(function(){var n,r=this;return vt(this,(function(i){switch(i.label){case 0:return n=[],sn()?[2,t]:[4,mo((function(){return t.length>0&&on()}),(function(){return yt(r,void 0,void 0,(function(){var r;return vt(this,(function(i){switch(i.label){case 0:return(r=t.pop())?[4,Gt(r,e)]:[2];case 1:return i.sent()instanceof yn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}var Ah=function(){function e(e,t,n,r,i,o){void 0===r&&(r={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=e,this.version=t,this.settings=pt({},r),this.disableAutoISOConversion=i.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=i,this.buffer=i.disableClientPersistence?new zt(4,[]):new Pn(4,"".concat(n,":dest-").concat(e)),this.scheduleFlush()}return e.prototype.isLoaded=function(){return this._ready},e.prototype.ready=function(){var e;return null!==(e=this.onReady)&&void 0!==e?e:Promise.resolve()},e.prototype.load=function(e,t){var n;return yt(this,void 0,void 0,(function(){var r,i,o=this;return vt(this,(function(s){switch(s.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(n=this.integrationSource)||void 0===n?[3,1]:(i=n,[3,3]);case 1:return[4,Ph(e,this.name,this.version,this.options.obfuscate)];case 2:i=s.sent(),s.label=3;case 3:r=i,this.integration=function(e,t,n){var r;"Integration"in e?(e({user:function(){return n.user()},addIntegration:function(){}}),r=e.Integration):r=e;var i=new r(t);return i.analytics=n,i}(r,this.settings,t),this.onReady=new Promise((function(e){o.integration.once("ready",(function(){o._ready=!0,e(!0)}))})),this.onInitialize=new Promise((function(e){o.integration.on("initialize",(function(){o._initialized=!0,e(!0)}))}));try{co(e,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(t){throw co(e,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),t}return[2]}}))}))},e.prototype.unload=function(e,t){return function(e,t,n){return yt(this,void 0,void 0,(function(){var r,i,o;return vt(this,(function(s){return r=mr(),i=Rh(e),o=kh(e,n),[2,xr("".concat(r,"/integrations/").concat(null!=o?o:i,"/").concat(t,"/").concat(null!=o?o:i,".dynamic.js.gz"))]}))}))}(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.middleware=(e=this.middleware).concat.apply(e,t)},e.prototype.shouldBuffer=function(e){return"page"!==e.event.type&&(sn()||!1===this._ready||!1===this._initialized)},e.prototype.send=function(e,t,n){var r,i;return yt(this,void 0,void 0,(function(){var o,s,a,u,c,l;return vt(this,(function(f){switch(f.label){case 0:if(this.shouldBuffer(e))return this.buffer.push(e),this.scheduleFlush(),[2,e];if(o=null===(i=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===i?void 0:i.track,s=e.event.event,o&&s&&"Segment.io"!==this.name){if(a=o[s],!xh(o,a))return e.updateEvent("integrations",pt(pt({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new Wt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e];if(e.updateEvent("integrations",pt(pt({},e.event.integrations),null==a?void 0:a.integrations)),(null==a?void 0:a.enabled)&&!1===(null==a?void 0:a.integrations[this.name]))return e.cancel(new Wt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e]}return[4,ao(this.name,e.event,this.middleware)];case 1:if(null===(u=f.sent()))return[2,e];c=new t(u,{traverse:!this.disableAutoISOConversion}),co(e,{integrationName:this.name,methodName:n,type:"classic"}),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,c)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw l=f.sent(),co(e,{integrationName:this.name,methodName:n,type:"classic",didError:!0}),l;case 6:return[2,e]}}))}))},e.prototype.track=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2,this.send(e,Rr.Track,"track")]}))}))},e.prototype.page=function(e){var t;return yt(this,void 0,void 0,(function(){var n=this;return vt(this,(function(r){return(null===(t=this.integration)||void 0===t?void 0:t._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return n.send(e,Rr.Page,"page")}))]}))}))},e.prototype.identify=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2,this.send(e,Rr.Identify,"identify")]}))}))},e.prototype.alias=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2,this.send(e,Rr.Alias,"alias")]}))}))},e.prototype.group=function(e){return yt(this,void 0,void 0,(function(){return vt(this,(function(t){return[2,this.send(e,Rr.Group,"group")]}))}))},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout((function(){return yt(e,void 0,void 0,(function(){var e;return vt(this,(function(t){switch(t.label){case 0:return this.flushing=!0,e=this,[4,Ch(this,this.buffer)];case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},e}(),Nh=Object.freeze({__proto__:null,LegacyDestination:Ah,ajsDestinations:function(e,t,n,r,i,o){var s,a;if(void 0===n&&(n={}),void 0===r&&(r={}),rn())return[];t.plan&&((r=null!=r?r:{}).plan=t.plan);var u=null!==(a=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],c=t.integrations,l=r.integrations,f=_r(t,null!=r?r:{}),h=null==o?void 0:o.reduce((function(e,t){var n;return pt(pt({},e),((n={})[function(e){return("Integration"in e?e.Integration:e).prototype.name}(t)]=t,n))}),{}),d=new Set(mt(mt([],Object.keys(c).filter((function(e){return function(e,t){var n,r=t.type,i=t.bundlingStatus,o=t.versionSettings,s="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!e.startsWith("Segment")&&"Iterable"!==e&&s}(e,c[e])})),!0),Object.keys(h||{}).filter((function(e){return At(c[e])||At(null==l?void 0:l[e])})),!0));return Array.from(d).filter((function(e){return!function(e,t){var n=!1===t.All&&void 0===t[e];return!1===t[e]||n}(e,n)})).map((function(t){var n=function(e){var t,n,r,i;return null!==(i=null!==(n=null===(t=null==e?void 0:e.versionSettings)||void 0===t?void 0:t.override)&&void 0!==n?n:null===(r=null==e?void 0:e.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(c[t]),o=new Ah(t,n,e,f[t],r,null==h?void 0:h[t]);return u.filter((function(e){return e.destinationName===t})).length>0&&i&&o.addMiddleware(i),o}))}}),Th=Object.freeze({__proto__:null,loadLegacyVideoPlugins:function(e){return yt(this,void 0,void 0,(function(){var t;return vt(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Uh}))];case 1:return t=n.sent(),e._plugins=t,[2]}}))}))}}),Mh=Object.freeze({__proto__:null,schemaFilter:function(e,t){function n(n){var r=e,i=n.event.event;if(r&&i){var o=r[i];if(!xh(r,o))return n.updateEvent("integrations",pt(pt({},n.event.integrations),{All:!1,"Segment.io":!0})),n;var s=function(e,t){var n,r;if(!e||!Object.keys(e))return{};var i=e.integrations?Object.keys(e.integrations).filter((function(t){return!1===e.integrations[t]})):[],o=[];return(null!==(n=t.remotePlugins)&&void 0!==n?n:[]).forEach((function(e){i.forEach((function(t){(e.name.includes(t)||t.includes(e.name))&&o.push(e.name)}))})),(null!==(r=t.remotePlugins)&&void 0!==r?r:[]).reduce((function(e,t){return t.settings.subscriptions&&o.includes(t.name)&&t.settings.subscriptions.forEach((function(n){return e["".concat(t.name," ").concat(n.partnerAction)]=!1})),e}),{})}(o,t);n.updateEvent("integrations",pt(pt(pt({},n.event.integrations),null==o?void 0:o.integrations),s))}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:n,alias:n,track:n,identify:n,group:n}}}),Lh=Object.freeze({__proto__:null,remoteMiddlewares:function(e,t,n){var r;return yt(this,void 0,void 0,(function(){var i,o,s,a,u=this;return vt(this,(function(c){switch(c.label){case 0:return rn()?[2,[]]:(i=mr(),o=null!==(r=t.enabledMiddleware)&&void 0!==r?r:{},s=Object.entries(o).filter((function(e){return e[0],e[1]})).map((function(e){return e[0]})),a=s.map((function(t){return yt(u,void 0,void 0,(function(){var r,o,s,a;return vt(this,(function(u){switch(u.label){case 0:r=t.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),s="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Ir(s)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return a=u.sent(),e.log("error",a),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}}))}))})),[4,Promise.all(a)]);case 1:return[2,c.sent().filter(Boolean)]}}))}))}}),jh={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){n.r(t);var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest;for(var o in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(o,t.headers[o]);function s(){var e,t=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,o,s){t.push(o=o.toLowerCase()),n.push([o,s]),e=r[o],r[o]=e?e+","+s:s})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}i.withCredentials="include"==t.credentials,i.onload=function(){n(s())},i.onerror=r,i.send(t.body)}))};t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return r(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var r=o(n(3)),i=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=r.default,t.YouTubeAnalytics=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=e,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in t)this.registerHandler(n,t[n]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:"registerHandler",value:function(e,t){var n=this;this.player.on(e,(function(e){n.updateMetadata(e),t.call(n,e)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise((function(n,r){var o=e.id;(0,i.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+t.authToken}}).then((function(e){return e.ok?e.json():r(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error("Request to Vimeo API Failed with: ",e),r(e)}))}))}},{key:"updateMetadata",value:function(e){var t=this;return new Promise((function(n,r){t.player.getVolume().then((function(r){r&&(t.metadata.playback.sound=100*r),t.metadata.playback.position=e.seconds,n()})).catch(r)}))}}]),t}(o(n(1)).default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return r.player=e,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise((function(t,n){var r=e.player.getVideoData(),o=e.player.getPlaylist()||[r.video_id],s=o.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then((function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()})).then((function(n){e.metadata=[];for(var r=0,i=0;i<o.length;i++){var s=n.items[i];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),r+=a(s.contentDetails.duration)}for(i=0;i<o.length;i++)e.metadata[i].playback={total_length:r,video_player:"youtube"};t()})).catch((function(t){e.metadata=o.map((function(e){return{playback:{video_player:"youtube"},content:{}}})),n(t)}))}))}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(o(n(1)).default);function a(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(null!=e)return e.replace(/\D/,"")})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}(jh);var Uh=function(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}({__proto__:null,default:l(jh.exports)},[jh.exports]);e.checkSupport=function(e){qc("checkSupport",e),(e=>{var t;Mc("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||Pc,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{walletConnectVersion:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");Lc=s})(e);const t=jc();let n;return t.providerType,Cc.Ethereum,n=function(e){qc("checkEthereumSupport",e);const t=zs();let n=!1;try{n=!!Hc()}catch(e){}const r={isLedgerConnectSupported:zc(t),isLedgerConnectEnabled:!!n,isChainIdSupported:Bc(e.chains),providerImplementation:Ac.LedgerConnect};return r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=Ac.WalletConnect),function(e){kc("setProviderImplementation",e),Nc=e}(r.providerImplementation),r}(t),qc("checkSupportResult is",n),Vc=n,n},e.enableDebugLogs=()=>{t=!0},e.getProvider=function(){return u(this,void 0,void 0,(function*(){kc("getProvider",Nc);const e=jc();if(e.providerType===Cc.Ethereum)return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||Nc!==Ac.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==e.walletConnectVersion&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield function(){return u(this,void 0,void 0,(function*(){Ic("getWalletConnectProvider");try{const e=yield function(){return u(this,void 0,void 0,(function*(){Ic("initWalletConnectProvider");const e=jc();Ic("walletConnectProviderOptions is",e);const t={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:e.optionalMethods||[],events:e.events,optionalEvents:e.optionalEvents||[],rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};Ic("ethereum init options are",t),Ic("creating a new provider instance");try{return Oc.init(t)}catch(e){throw xc("Error while initializing ethereum provider"),e}}))}();return function(e){function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Ic("connectHandler",e),Jo(!1)}function r(n){Ic("disconnectHandler",n),e.disconnect(),t(e)}Ic("assignWalletConnectProviderEvents"),e&&(t(e),e.on("connect",n),e.on("session_delete",r),Ic("provider is",e))}(e),e.request=function(e){Ic("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=jc();return Ic("walletConnectProviderOptions is",n),function({method:r,params:i}){return u(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Ic("calling patched",r,i),Ic("handling display_uri once"),e.once("display_uri",Rc),new Promise(((o,a)=>u(this,void 0,void 0,(function*(){var u,c;try{(null===(u=null==e?void 0:e.session)||void 0===u?void 0:u.connected)?(Ic("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{xc("user rejected"),a(new s)}},Bs("UseLedgerLiveModal",{isDesktop:"desktop"===zs().type,uri:c.uri,onClose:c.onClose}),Ic("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return xc("error",e),a(e)}}))))):(Ic("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw xc("error",t),t}}))}():yield Vs():Hc();throw new o}))},Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=/sm/168b8bdbe3ebd8d097ab69cdb14c9bc3f27dfc0ce301737920e52d4b3566a05d.map